Changeset ec56744 in rtems-source-builder


Ignore:
Timestamp:
Apr 21, 2013, 8:36:36 AM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
5142bec
Parents:
29a300a
Message:

Add source and patches section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/source-builder.txt

    r29a300a rec56744  
    599599block comment.
    600600
     601Source and Patches
     602~~~~~~~~~~~~~~~~~~
     603
     604The RTEMS Source Builder provides a flexible way to manage source. Source and
     605patches are declare in configurations file using the +source+ and +patch+
     606directives. There are a single line containing a Universal Resource Location or
     607URL and can contain macros and shell expansions. The <<_prep,%prep>> section
     608details the source and patch directives
     609
     610The URL can reference remote and local source and patch resources. The
     611following schemes are provided:
     612
     613'http':: Remote access using the HTTP protocol.
     614'https':: Remote access using the Secure HTTP protocol.
     615'ftp:: Remote access using the FTP protocol.
     616'git:: Remote access to a GIT repository.
     617'cvs:: Remote access to a CVS repository.
     618'file:: Local access to an existing source directory.
     619
     620HTTP, HTTPS, and FTP
     621^^^^^^^^^^^^^^^^^^^^
     622
     623Remote access to TAR files is provided using HTTP, HTTPS and FTP protocols. The
     624full URL provided is used to access the remote file including any query
     625components. The URL is parsed to extract the file component and the local
     626source directory is checked for that file. If the file is located the remote
     627file is not downloaded. Currently no other checks are made. If a download fails
     628you need to manually remove the file from the source directory and start the
     629build process again.
     630
     631The URL can contain macros. These are expand before issuing the request to
     632download the file. The GNU GCC compiler source URL is:
     633
     634-------------------------------------------------------------
     635Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
     636-------------------------------------------------------------
     637
     638The type of compression is automatically detected from the file extension. The
     639supported compression formats are:
     640
     641`gz`:: GNU ZIP
     642`bzip2`:: BZIP2 ??
     643`zip`:: ??
     644'xy':: XY ??
     645
     646The output of the decompression tool is feed to the standard `tar` utility and
     647unpacked into the build directory.
     648
     649If the URL references the GitHub API server 'https://api.github.com/' a tarball
     650of the specified version is download. For example the URL for the STLINK
     651project on GitHub and version is:
     652
     653-------------------------------------------------------------
     654%define stlink_version 3494c11
     655Source0: https://api.github.com/repos/texane/stlink/texane-stlink-%{stlink_version}.tar.gz
     656-------------------------------------------------------------
     657
     658the TAR file is downloaded and used.
     659
     660GIT
     661^^^
     662
     663A GIT repository can be cloned and used as source. The GIT repository resides
     664in the 'source' directory under the `git` directory. You can edit, update and
     665use the repository as you normally do and the results will used to build the
     666tools. This allows you to prepare and test patches in the build environment the
     667tools are built in. The GIT URL only supports the GIT protocol. You can control
     668the repository via the URL by appending options and arguments to the GIT
     669path. The options are delimited by `?` and option arguments are delimited from
     670the options with `=`. The options are:
     671
     672`branch`:: Checkout the specified branch.
     673`pull`:: Perform a pull to update the repository.
     674`fetch`:: Perform a fetch to get any remote updates.
     675`reset`:: Reset the repository. Useful to remove any local changes. You can
     676pass the `hard` argument to force a hard reset.
     677
     678-------------------------------------------------------------
     679Source0: git://gcc.gnu.org/git/gcc.git?branch=gcc-4_7-branch?reset=hard
     680-------------------------------------------------------------
     681
     682This will clone the GCC git repository and checkout the 4.7-branch and perform
     683a hard reset.
     684
     685CVS
     686^^^
     687
     688A CVS repository can be checked out. CVS is more complex than GIT to handle
     689because of the modules support. This can effect the paths the source ends up
     690in. The CVS URL only supports the CVS protocol. You can control the repository
     691via the URL by appending options and arguments to the CVS path. The options are
     692delimited by `?` and option arguments are delimited from the options with
     693`=`. The options are:
     694
     695`module`:: The module to checkout.
     696`src-prefix`:: The path into the source where the module starts.
     697`tag`:: The CVS tag to checkout.
     698`date`:: The CVS date to checkout.
     699
     700-------------------------------------------------------------
     701Source0: cvs://pserver:anoncvs@sourceware.org/cvs/src?module=newlib?src-prefix=src
     702-------------------------------------------------------------
     703
    601704Macros and Defaults
    602705~~~~~~~~~~~~~~~~~~~
     
    9691072%ifn %{defined Source0}
    9701073 Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
    971  VersionContro0: git clone git://gcc.gnu.org/git/gcc.git <1>
    9721074%endif
    9731075-------------------------------------------------------------
    974 
    975 <1> The version control macro is currently not implemented.
    9761076
    9771077You could optionally have a few source files that make up the package. For
Note: See TracChangeset for help on using the changeset viewer.