8.38. dinit 0.21.0

Build and install dinit as the target system service manager and init-capable supervisor.

Input assumption: dinit-0.21.0.tar.xz is already present in /sources from the chapter 4 source staging step.

Source URL: https://github.com/davmac314/dinit/releases/download/v0.21.0/dinit-0.21.0.tar.xz

Upstream build note: upstream documents dinit as a C++11 project built with GNU make, a C++ compiler, POSIX utilities, and m4 for generating manual pages. The release ships a custom configure script, not an autotools one, and it accepts only its own directory options; this section calls it directly instead of using lbi_configure.

Licenses:

Dependencies:

dinit is a service supervisor and init-capable dependency manager. we need it to provide the target system's service manager, service control tools, and shutdown command set.

Extract and Enter the Source Tree

cd /sources
rm -rf dinit-0.21.0
tar -xf dinit-0.21.0.tar.xz
cd dinit-0.21.0

Configure dinit

--disable-capabilities avoids a dependency on libcap, which is not part of the base package set. The remaining Linux service-management features are enabled explicitly so the generated mconfig records the intended target behavior.
./configure \
    --prefix=/system \
    --exec-prefix=/system \
    --bindir=/system/binaries \
    --sbindir=/system/systembinaries \
    --mandir=/system/documentation/man-pages \
    --syscontrolsocket=/run/dinitctl \
    --disable-capabilities \
    --enable-cgroups \
    --enable-ioprio \
    --enable-oom-adj \
    CXX=clang++

Build dinit

make $LWI_MAKE_FLAGS

Install dinit

make install

Verify dinit

dinit --version
dinitctl --help >/dev/null
dinit-check --help >/dev/null
shutdown --help >/dev/null
This installs dinit, dinitctl, dinit-check, and dinit-monitor in /system/binaries; shutdown, halt, reboot, soft-reboot, and poweroff in /system/systembinaries; and the generated manual pages in /system/documentation/man-pages.

Command Explanations