| Home | Trees | Indices | Help |
|
|---|
|
|
action.Action --+
|
action.RecipeAction --+
|
_AnySource --+
|
_Source --+
|
addArchive
r.addArchive() - Add a source code archive
r.addArchive(archivename, [dir=,]
[keyid=,] [rpm=,] [httpHeaders=,]
[package)=,] [use=,] [preserveOwnership=,]
[sourceDir=])
The r.addArchive() class adds a source code archive
consisting of an optionally compressed tar, cpio, xpi or zip archive,
or binary/source RPM, and unpacks it to the proper directory.
If the specified archivename is only a URL in the form of
http://www.site.org/, r.addArchive will
automatically attempt several combinations of
%(name)s-%(version)s combined with common archive file
extensions, such as (.tar.bz2, .tar.gz, .tbz2, and .tgz) to complete
archivename.
If the specified archivename is a URL that begins with
mirror://, r.addArchive will search a set of
mirrors contained in files specified by the mirrorDirs
Conary configuration file entry or a set of default mirror files
located in the /etc/conary/mirrors directory. The mirror
files are comprised of mirror URLs, listed one entry per line.
r.addArchive will attempt to download the files, using the
rules described above, from each URL, until one of them succeeds. Note
that the archive base name (as would be printed by the
"basename" shell command), if non-empty, has to be identical
for all URLs.
The following keywords are recognized by
r.addArchive:
dir : Instructs r.addArchive to change to the
directory specified by dir prior to unpacking the source
archive. An absolute dir value will be considered relative
to %(destdir)s, whereas a relative dir value
will be considered relative to %(builddir)s.
keyid : Using the keyid keyword indicates the
eight-digit GNU Privacy Guard (GPG) key ID, without leading
0x for the source code archive signature should be sought,
and checked. If you provide the keyid keyword,
r.addArchive will search for a file named
archivename.{sig,sign,asc}, and ensure it is signed
with the appropriate GPG key. A missing signature results in a warning;
a failed signature check is fatal.
preserveOwnership : If preserveOwnership is True
and the files are unpacked into the build directory, the packaged files
are owned by the same user and group which owned them in the archive.
Only cpio, rpm, and tar achives are allowed when
preserveOwnership is used.
rpm : If the rpm keyword is used,
r.addArchive looks in the file or URL specified by
rpm for a binary or source RPM containing
archivename.
use : A Use flag, or boolean, or a tuple of Use flags, and/or boolean values which determine whether the source code archive is actually unpacked, or merely stored in the archive.
httpHeaders : A dictionary containing a list of headers to send with the http request to download the source archive. For example, you could set Authorization credentials, fudge a Cookie, or, if direct links are not allowed for some reason (e.g. a click through EULA), a Referer can be provided.
package : (None) If set, must be a string that specifies the
package (package='packagename'), component
(package=':componentname'), or package and component
(package='packagename:componentname') in which to place
the files added while executing this command. Previously-specified
PackageSpec or ComponentSpec lines will
override the package specification, since all package and component
specifications are considered in strict order as provided by the
recipe
r.addArchive to look in
the directory specified by sourceDir for the source
archive to unpack. An absolute sourceDir value will be
considered relative to %(destdir)s, whereas a relative
sourceDir value will be considered relative to
%(builddir)s.
The following examples demonstrate invocations of
r.addArchive from within a recipe:
r.addArchive('initscripts-%(upmajver)s.tar.bz2',
rpm=srpm)
Demonstrates use with a local source code archive file, and the
rpm keyword.
r.addArchive('ftp://ftp.visi.com/users/hawkeyd/X/Xaw3d-%(version)s.tar.gz')
Demonstrates use with a source code archive accessed via an FTP URL.
r.addArchive('ftp://ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/g/gc/gcompris/gcompris-7.4-1.i586.rpm')
Demonstrates use with a binary RPM file accessed via an FTP URL.
r.addArchive('http://ipw2200.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=%(name)s-%(version)s.tgz',
httpHeaders={'Referer':
'http://ipw2200.sourceforge.net/firmware.php?fid=7'})
Demonstrates use with a source code archive accessed via an HTTP URL, and sending a Referer header through the httpHeader keyword.
r.addArchive('http://example.com/downloads/blah.iso',
dir='/')
Demonstrates unpacking the contents of an iso image directly into the destdir. Note that only Rock Ridge or Joliet images are handled, and that permissions and special files are not preserved.
r.addArchive('mirror://sourceforge/%(name)s/%(name)s-%(version)s.tar.gz',
keyid='9BB19A22')
sourceforge
mirrors list for retrieving package source from SourceForge.
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
keywords = The keywords and default values accepted by the class |
|||
|
Inherited from |
|||
|
|||
|
|
|
|||
keywordsThe keywords and default values accepted by the class
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 10 11:46:07 2008 | http://epydoc.sourceforge.net |