diff --git a/contrib/alpine/build.sh b/contrib/alpine/build.sh index 47a7a7c1..5a7ec886 100755 --- a/contrib/alpine/build.sh +++ b/contrib/alpine/build.sh @@ -14,12 +14,14 @@ fi # The plugins are optional, but you may need D-Bus and X11 if you want # to run X-Window, the other configure flags are however required. PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig ./configure \ - --prefix=/usr --exec-prefix= --enable-progress \ + --prefix=/usr --exec-prefix= \ + --sysconfdir=/etc --localstatedir=/var \ + --enable-progress \ --enable-dbus-plugin --enable-x11-common-plugin \ --enable-alsa-utils-plugin --enable-inetd-echo-plugin \ --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ --enable-inetd-discard-plugin --enable-inetd-time-plugin \ - --with-heading="Alpine Linux 3.6" --with-hostname=alpine + --with-heading="Alpine Linux 3.13" --with-hostname=alpine echo echo "*** Building ..." diff --git a/contrib/debian/build.sh b/contrib/debian/build.sh index 4ecf7205..6ac4a7a2 100755 --- a/contrib/debian/build.sh +++ b/contrib/debian/build.sh @@ -21,13 +21,15 @@ echo # The plugins are optional, but you may need D-Bus and X11 if you want # to run X-Window, the other configure flags are however required. -./configure \ - --prefix=/usr --exec-prefix= --enable-progress \ - --enable-dbus-plugin --enable-x11-common-plugin \ - --enable-alsa-utils-plugin --enable-inetd-echo-plugin \ - --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ - --enable-inetd-discard-plugin --enable-inetd-time-plugin \ - --with-random-seed=/var/lib/urandom/random-seed \ +./configure \ + --prefix=/usr --exec-prefix= \ + --sysconfdir=/etc --localstatedir=/var \ + --enable-progress \ + --enable-dbus-plugin --enable-x11-common-plugin \ + --enable-alsa-utils-plugin --enable-inetd-echo-plugin \ + --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ + --enable-inetd-discard-plugin --enable-inetd-time-plugin \ + --with-random-seed=/var/lib/urandom/random-seed \ --with-heading="Debian GNU/Linux" --with-hostname="stretch" if [ $? -ne 0 ]; then diff --git a/contrib/void/build.sh b/contrib/void/build.sh index 47be88dd..9d427858 100755 --- a/contrib/void/build.sh +++ b/contrib/void/build.sh @@ -14,7 +14,9 @@ fi # The plugins are optional, but you may need D-Bus and X11 if you want # to run X-Window, the other configure flags are however required. PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig ./configure \ - --prefix=/usr --exec-prefix= --enable-progress \ + --prefix=/usr --exec-prefix= \ + --sysconfdir=/etc --localstatedir=/var \ + --enable-progress \ --enable-dbus-plugin --enable-x11-common-plugin \ --enable-alsa-utils-plugin --enable-inetd-echo-plugin \ --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ diff --git a/doc/build.md b/doc/build.md index 8edb831e..20a0113f 100644 --- a/doc/build.md +++ b/doc/build.md @@ -38,6 +38,17 @@ Configure Below are a few of the main switches to configure: +* `--prefix=..`: Usually you want to set this to `/usr`, default is the GNU + default: `/usr/local` + +* `--exec-prefix=..`: This you want to set to the empty string, or `/`, to + ensure the programs `finit` and `initctl` are installed to the proper + locations. Linux expects an "init" in `/sbin`, default: `--prefix` + +* `--sysconfdir=..`: follows `--prefix`, you likely want it to be `/etc` + +* `--localstatedir=..`: follows `--prefix`, you likely want `/var` + * `--disable-inetd`: Disable the built-in inetd server. * `--enable-static`: Build Finit statically. The plugins will be @@ -61,22 +72,24 @@ Example First, unpack the archive: ```shell - $ tar xf finit-3.0.tar.xz - $ cd finit-3.0/ +$ tar xf finit-3.0.tar.xz +$ cd finit-3.0/ ``` Then configure, build and install: ```shell - $ ./configure --prefix=/usr --exec-prefix= --enable-inetd-echo-plugin \ - --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ - --enable-inetd-discard-plugin --enable-inetd-time-plugin \ - --with-heading="Alpine Linux 3.4" --with-hostname=alpine - $ make - . - . - . - $ DESTDIR=/tmp/finit make install +$ ./configure --prefix=/usr --exec-prefix= \ + --sysconfdir=/etc --localstatedir=/var \ + --enable-inetd-echo-plugin \ + --enable-inetd-chargen-plugin --enable-inetd-daytime-plugin \ + --enable-inetd-discard-plugin --enable-inetd-time-plugin \ + --with-heading="Alpine Linux 3.13" --with-hostname=alpine +$ make +. +. +. +$ DESTDIR=/tmp/finit make install ``` In this example the [finit-3.0.tar.xz][1] archive is unpacked to the diff --git a/doc/distro.md b/doc/distro.md index 6fdf5042..cdc0c646 100644 --- a/doc/distro.md +++ b/doc/distro.md @@ -34,6 +34,9 @@ build time: ./configure --with-rcsd=/etc/init.d --with-config=/etc/init.d/init.conf ``` +> **Note:** remember `--prefix` et al as well, the default is likely +> *not* what you want. See the [build docs][1] for details. + The resulting directory structure is depicted below. Please notice how `/etc/finit.conf` now resides in the same sub-directory as a non-symlink `/etc/init.d/init.conf`: @@ -73,3 +76,4 @@ requires the `available/` sub-directory. Any non-symlink in the parent directory, here `/etc/init.d/`, will be considered a system override by `initctl`. +[1]: build.md#configure