spf-install
programspf-install [$SP_ROOT]/package/host/example.org/foreign/foo[+spf+tag][-2.0[+spf+tag]] [...]
spf-install
installs one or more packages. Each argument names a
package directory. By default, spf-install
will:
+spf+0
" version tag if none was
given in the package directory name;
spf-unpack
on the package
directory name;
conf-compile/
files for version-sensitive
dependencies to point to the version-specific paths of their current
versions;
-data
package, if the snippet says
one is needed;
package/compile
script to build the package;
package/own
script if it exists, so the package
can set any special ownership or setuid/setgid bits that it needs;
package/check
script if it exists, to check that
the package is working correctly;
compile/
subdirectory again;
sp-version
to
set the current-version symlink;
sp-links
(with
$SP_REPLACE_LINKS
set to "n
" by
default) to install symlinks in /command
and
/usr/local/bin
, pointing to the files in the package's
command/
subdirectory, if it exists; and
You can alter this behavior by setting these environment variables:
$SP_ROOT
: install the command symlinks in
$SP_ROOT/command
and $SP_ROOT/usr/local/bin
.
This is useful mainly for non-root users.
$SP_UPGRADE_DEPS=n
: dependency packages will not be added
to the list of packages to install/upgrade.
$SP_HOOK
: this specifies a program to be run at various
points during the installation. It is invoked with its first argument
indicating what point it is being invoked from, and with these
environment variables indicating the package being installed:
$SP_PATH
, $SP_DIR
, $SP_PATH_ROOT
,
$SP_CATEGORY
, $SP_BASE
,
$SP_VERSION
, SPF_HOST
, SPF_BASE
,
SPF_BTAG
, SPF_VERSION
, and
SPF_VTAG
. If the hook program exits with status 99, the
rest of the installation of that package is skipped.
$SP_HOOK
is run with these arguments during installation:
BEFORE_UNPACK
, AFTER_UNPACK
,
, AFTER_COMPILE
,
AFTER_OWN
, AFTER_CHECK
,
AFTER_CLEAN
, AFTER_VERSION
, and
AFTER_LINKS
.
$SP_ROOT
also causes spf-install
to
automatically adjust the compile-time configuration to use the augmented
path for this package and dependencies.
$SP_COMPILE_USER
: unpack the tarball and run
package/compile
and package/check
as this user;
this is useful only for root and requires one of the
admin/daemontools package,
Perl,
Python, or
Guile.
spf-install
will also edit the compile-time configuration to
compile as this user.
$SP_REINSTALL=y
: install a new copy of a package even if
the given or default version is already installed.
$SP_SKIP_TEST=y
: don't run package/check
.
$SP_DEREF_VERSION=n
: any paths to dependency packages are
left as the current-version path, even if the dependency is
version-sensitive.
$SP_IGNORE_TEST_FAIL=y
: if set to
"y
", spf-install
will continue with
installation even if the package/check
script fails. If set
to "skip
" and package/check
fails,
spf-install
will not complete the installation of this
package, but it will continue with the installation of other packages
given on the command line and exit 0.
$SP_DO_OWN=n
: don't run package/own
. This is
the default when running as non-root.
$SP_KEEP_COMPILE=y
: don't remove the compile/
subdirectory after building the package.
$SP_COMPAT=n
: don't create command symlinks in
$SP_ROOT/usr/local/bin
.
If the package declares any dependencies, those will be automatically installed first, if they are not already installed.
spf-install
stores temporary files in $TMPDIR
(defaulting to /tmp
).
A note on security: if you run spf-install
as root with
$SP_COMPILE_USER=somebody
, then spf-install
will
not run any code from the package as root, so you only need to trust
spftools and the spf build script for the package, not the package's own
build machinery. However, package/own
may add setuid bits to
some of the installed programs. Ideally, there should be some sort of
automatic signature verification, but I'm not sure how it should work.