sp-unpack [$SP_ROOT]/package/admin/foo-2.0 [...]
sp-unpack unpacks one or more package tarballs. It is
typically invoked by way of
/package/admin/foo-2.0, it first runs
sp-download /package/admin/foo-2.0", then looks
foo-2.0.tar, possibly with an extension of
that variable is set),
$SP_TARDIR/admin (if that variable is
/usr/local/src/package/admin. If a compressed file is found,
temporary files are created in
$TMPDIR (defaulting to
If the given package directory already exists,
not unpack the tarball again, to save time and preserve local modifications.
You can set
$SP_REUNPACK=y to force
unpack a tarball even when the directory exists.
$SP_COMPILE_USER is set,
sp-unpack will create
the package directory, chown it to
$SP_COMPILE_USER, unpack the
$SP_COMPILE_USER, and chown it back to the calling
user and group. This ensures that a tarball cannot overwrite any files
outside its own package directory, assuming no other files under
$SP_ROOT/pakcage are owned by that user.