/* * openrc — the service manager / init system (first init). * * kappa generates openrc service files (boot.init = "openrc") — this * package provides the manager itself: openrc-init, openrc-run, * rc-update, start-stop-daemon, plus the /etc/init.d + runlevel layout. * * BUILD REQUIREMENTS: meson + ninja + python + pkg-config (all kappa * packages, prepended to PATH). Optional deps (pam/audit/selinux) are * disabled for barebones compatibility. * * ROOT HANDOFF (kappa has no activation step yet) * ============================================== * The store cannot boot anything by itself. To actually boot this init: * cp -a /bin//sbin/. /sbin/ * cp -a /bin//bin/. /bin/ * cp -a /bin//lib/. /lib/ * cp -a /bin//etc/init.d /etc/ * cp -a /bin//etc/conf.d /etc/ * then set `init=/sbin/openrc-init` on the kernel command line. * kappa's rebuild writes generated service scripts into /etc/init.d. */ package "openrc" { const version = "0.63.3" const source = "https://github.com/OpenRC/openrc/archive/${version}.tar.gz" sha256 = "f5bc2257f22ca7f0920a12698ad1e8f85a0f91a90e8e83106611514ea409b8ec" license = "BSD-2-Clause" provides = ["openrc", "rc-update", "openrc-init"] depends = [ { name = "python" }, { name = "meson" }, { name = "ninja" }, { name = "pkgconf" }, ] // $ORIGIN rpath: the store has no activation/ld.so.conf wiring, so // openrc's own shared libs (librc, libeinfo) must resolve relative to // the binary. $ORIGIN is interpreted by the linker, not the shell. env { LDFLAGS = "-Wl,-rpath,$ORIGIN/../usr/lib" } prepare { curl -L -o openrc-${version}.tar.gz ${source} echo "f5bc2257f22ca7f0920a12698ad1e8f85a0f91a90e8e83106611514ea409b8ec openrc-${version}.tar.gz" | sha256sum -c - tar xf openrc-${version}.tar.gz --strip-components=1 ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/python/destdir/usr/bin ]; then echo $ROOT/temp/python/destdir/usr/bin; else echo $ROOT/bin/$(grep '^python ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > py.path; if [ -d $ROOT/temp/meson/destdir/usr/bin ]; then echo $ROOT/temp/meson/destdir/usr/bin; else echo $ROOT/bin/$(grep '^meson ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > meson.path; if [ -d $ROOT/temp/ninja/destdir/usr/bin ]; then echo $ROOT/temp/ninja/destdir/usr/bin; else echo $ROOT/bin/$(grep '^ninja ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > ninja.path; if [ -d $ROOT/temp/pkgconf/destdir/usr/bin ]; then echo $ROOT/temp/pkgconf/destdir/usr/bin; else echo $ROOT/bin/$(grep '^pkgconf ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > pc.path } build { PATH=$(cat meson.path):$(cat ninja.path):$(cat py.path):$(cat pc.path):$PATH meson setup builddir --prefix=${prefix} -Daudit=disabled -Dpam=false -Dselinux=disabled PATH=$(cat ninja.path):$PATH ninja -C builddir } install { PATH=$(cat ninja.path):$PATH DESTDIR=${destdir} ninja -C builddir install } }