Chapter 1. Installation


Porting and compatibility notes

The stasher and LIBCXX development toolkits must be installed before building distreboot. On Fedora, executing rpmbuild -ta stasher-distreboot-version.tar.bz2 produces an RPM package. Execute systemctl enable stasher-distreboot.service and systemctl start stasher-distreboot.service. If the server has more than one object repository node directory (and multiple instances of the stasher server), distreboot needs to know which one to use. Edit stasher-distreboot.service, or install an override in /etc/systemd, and add the --node directory parameter after --start.

distreboot gets installed on all nodes in a stasher cluster. Install the RPM package on every node in the stasher cluster. On other Linux distributions, use the following instructions as a guide to preparing a similar installable package.

  1. Unpack the tarball, run the configure script, that takes the usual autoconf options, followed by make or gmake.


    The same configure options, specifically the installation directories, that were used to build stasher are required. Otherwise distreboot will not get installed properly.

  2. Execute make install DESTDIR=/tmp/instimage. This creates an installation image in /tmp/instimage (or some other directory of your choosing). Use this installation image to create an installable package for your platform.

  3. distreboot's application properties must be configured by the installation script. The default configuration installs distreboot in /usr/local/sbin, and the property file in /usr/local/etc. The installation script should then execute the following, as part of distreboot package instllation:

    properties --set /usr/local/etc/ /usr/local/sbin/distreboot

    Adjust the directories according to any non-default options to the configure script. Alternatively, if your platform's installable package format preserves extended file attributes, this can be executed as part of the package build script, and have include the distreboot binary, with the extended attribute that points to the property file, in the installable package. See properties(1) for more information.

Porting and compatibility notes

distreboot depends on stasher, of course, and LIBCXX, which currently builds only on Linux. An earliver version of LIBCXX was also ported to FreeBSD 10, but has not been maintained to-date. Any patches required for porting to the current version are welcome, This appendix contains the last build instructions and notes as of FreeBSD 10:

  • The stasher package must already be installed (with LIBCXX).

  • Copy the distreboot tarball to /usr/ports/distfiles.

  • Extract the tarball's contents into a temporary directory, then from the packaging/freebsd9/databases/stasher-distreboot subdirectory run make makesum followed by make install (or make package).

  • Add distreboot_enable=YES to /etc/rc.conf. This starts distreboot when the server boots.

  • If the server has more than one object repository node directory (and multiple instances of the stasher server), distreboot needs to know which one to use. Put --node directory in /usr/local/etc/distrebootrc. If /usr/local/etc/distrebootrc exists, /usr/local/etc/rc.d/distreboot sets its contents as additional parameters to distreboot.