spf-unpack
programspf-unpack [$SP_ROOT]/package/host/example.org/foreign/foo[+spf+tag][-2.0[+spf+tag]] [...]
spf-unpack
unpacks one or more package source archives. It is
typically invoked by way of
spf-install
. For each package
directory name like
"/package/host/example.org/foreign/foo-2.0+spf+0
"
given on the command line, it:
spf-download /package/host/example.org/foreign/foo-2.0+spf+0
";
package/foreign_info
within
the package directory (or the file named in $SPF_INFO
if
that variable is set);
conf-compile/
files base on the info snippet;
$SP_TARDIR_FLAT
(if that variable is set),
$SP_TARDIR/host/example.org/foreign
(if that variable is
set),
$SP_ROOT/usr/local/src/package/host/example.org/foreign
, and
/usr/local/src/package/host/example.org/foreign
, and unpacks
them in the package directory;
package/
subdirectory; and
$SPF_INFO
to package/foreign_info
if
the latter does not already exist.
spf-unpack
can handle source archives in tar, zip, cpio,
RPM/SRPM, and shar format, possibly compressed with compress
,
gzip
, bzip2
, or lzma
.
If a compressed file or SRPM is unpacked, temporary files are created in
$TMPDIR
(defaulting to /tmp
).
If the sources already exist for a given package, spf-unpack
will not unpack the archives again, to save time and preserve local
modifications. You can set $SP_REUNPACK=y
to force
spf-unpack
to unpack an archive even when the sources exist.
If $SP_COMPILE_USER
is set, spf-unpack
will create
the package directory, chown it to $SP_COMPILE_USER
, unpack the
archives as $SP_COMPILE_USER
, and chown it back to the calling
user and group. This ensures that no files outside the package directory
will be overwritten by unpacking the archive, assuming no other files under
$SP_ROOT/package
are owned by that user.