spf-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+0" version tag if none was given in the package directory name;
spf-unpackon the package directory name;
conf-compile/files for version-sensitive dependencies to point to the version-specific paths of their current versions;
-datapackage, if the snippet says one is needed;
package/compilescript to build the package;
package/ownscript if it exists, so the package can set any special ownership or setuid/setgid bits that it needs;
package/checkscript if it exists, to check that the package is working correctly;
sp-versionto set the current-version symlink;
$SP_REPLACE_LINKSset to "
n" by default) to install symlinks in
/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/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:
SPF_VTAG. If the hook program exits with status 99, the rest of the installation of that package is skipped.
$SP_HOOKis run with these arguments during installation:
spf-installto 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/checkas this user; this is useful only for root and requires one of the admin/daemontools package, Perl, Python, or Guile.
spf-installwill 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
$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 "
spf-installwill continue with installation even if the
package/checkscript fails. If set to "
spf-installwill 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
If the package declares any dependencies, those will be automatically installed first, if they are not already installed.
spf-install stores temporary files in
A note on security: if you run
spf-install as root with
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.