%global snapshot 1550.20261124gitccaebe2 Name: schema-init Version: 0.4.33 Release: 1%{?snapshot:.%{snapshot}}%{?dist} Summary: Minimal PID 1 init system driven by a weight-state machine License: AGPL-3.0-or-later AND OFL-1.1 URL: https://github.com/ajax80/schema-init Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: make BuildRequires: glibc-static BuildRequires: libacl-devel BuildRequires: dbus-devel BuildRequires: libzstd-devel BuildRequires: pkgconf-pkg-config BuildRequires: cargo Requires: python3 Requires: /usr/bin/gdbus # ISO-installed and migrated boxes run both daemons; an upgrade must pull them. Requires: %{name}-daemons = %{version}-%{release} Recommends: python3-dbus Recommends: python3-gobject-base # Only these two are built and tested. COPR has no armv7hl target; 32-bit ARM # is a manual cross-build via `make armhf`. ExclusiveArch: x86_64 aarch64 %description schema-init is a PID 1 init system for Linux that supervises services through a weight-state machine instead of unit files and dependency graphs. It mounts pseudo-filesystems, spawns services in dependency order, reaps children and supervises restarts with bounded backoff, and does socket activation itself. There is no journal daemon and no D-Bus event loop; PID 1 is a single statically linked binary holding a few MB of RSS in one thread. Installing this package does NOT change your init system. It only places the binaries and reference service files on disk. Booting schema-init is an explicit, manual step: you add init=/sbin/schema-init to a kernel command line yourself. Read the "Replacing a running init" and "GRUB setup" sections of the README before you do — a broken PID 1 is a machine that will not boot. Keep a working systemd boot entry. A kernel-install hook keeps a schema-init boot entry for every installed kernel, but only on a box that opted in with /etc/schema-init/boot-default (the installer writes it). Without that file the hook leaves the boot menu alone. Reference .svc and .grp files are installed to %{_datadir}/%{name}/services as examples. They are deliberately NOT installed into %{_sysconfdir}/%{name}, which is created empty, so that installing or upgrading this package can never overwrite a service file a running system depends on. %prep %autosetup %build # The Makefile takes CFLAGS from the environment and appends the flags the code # requires, so rpm's %%{optflags} -- fortify, stack-protector, annobin -- apply # to the dynamically linked helpers. PID 1 and schema-init-pi link with the # Makefile's STATIC_LDFLAGS (-static-pie where the toolchain links it, else plain # -static; full RELRO), not LDFLAGS: the # hardened-ld specs there would add a plain -pie to a static link. # # schema-udev (the native device manager) lives in the same tree but is a # separate, still-maturing concern that is deliberately NOT shipped by the # base package -- installing schema-init must not change your init system, # but retiring systemd-udevd is a manual, hardware-specific cutover, not a # package upgrade. It is built here (migrate_bins) only so the -migrate # subpackage below can ship it; the base %%files list never references it. %global core_bins schema-init schema-user schema-ctl schema-subreaper schema-journal-sink schema-board schema-coredump schema-recorder %global migrate_bins schema-udev verify-rules-live schema-systemctl schema-dbus %make_build BINS="%{core_bins} %{migrate_bins}" SCHEMA_VERSION="%{version}-%{release}" # binaries only: under %%{optflags} LTO the objects show no canary references sh tests/test_hardening_flags.sh %{core_bins} %{migrate_bins} RUSTFLAGS="%{build_rustflags}" CARGO_PROFILE_RELEASE_STRIP=false %make_build analyze CARGO="cargo --offline" gcc %{optflags} -shared -fPIC -o mock_sd.so distros/fedora-kde/scripts/mock_sd.c -ldl %{build_ldflags} %install %make_install PREFIX=%{_prefix} SYSCONFDIR=%{_sysconfdir} BINS="%{core_bins}" make install-migrate DESTDIR=%{buildroot} PREFIX=%{_prefix} SYSCONFDIR=%{_sysconfdir} make install-wizard DESTDIR=%{buildroot} PREFIX=%{_prefix} SYSCONFDIR=%{_sysconfdir} make install-analyze DESTDIR=%{buildroot} PREFIX=%{_prefix} install -Dm0755 scripts/schema-bootok %{buildroot}%{_bindir}/schema-bootok install -Dm0644 services/schema-verify-baseline.svc %{buildroot}%{_sysconfdir}/schema-init/services/schema-verify-baseline.svc install -Dm0755 scripts/schema-doctor.py %{buildroot}/usr/local/bin/schema-doctor install -Dm0755 scripts/schema-logind.py %{buildroot}/usr/local/bin/schema-logind.py install -Dm0755 scripts/schema-systemd1.py %{buildroot}/usr/local/bin/schema-systemd1.py install -Dm0755 scripts/schema-session-register %{buildroot}/usr/local/bin/schema-session-register install -Dm0755 scripts/schema-session-unregister %{buildroot}/usr/local/bin/schema-session-unregister install -Dm0755 scripts/schema-sysctl-apply %{buildroot}%{_libexecdir}/schema-init/schema-sysctl-apply install -Dm0755 distros/fedora-installer/rail/scripts/schema-udevd-launch %{buildroot}%{_libexecdir}/schema-init/schema-udevd-launch install -Dm0644 distros/fedora-installer/rail/services/udevd.svc %{buildroot}%{_datadir}/%{name}/udevd.svc install -Dm0755 scripts/schema-mount-fstab %{buildroot}%{_libexecdir}/schema-init/schema-mount-fstab install -Dm0755 distros/fedora-installer/rail/scripts/schema-sysprep.sh %{buildroot}/usr/local/bin/schema-sysprep.sh install -Dm0755 distros/fedora-installer/rail/scripts/schema-sshd-start.sh %{buildroot}/usr/local/bin/schema-sshd-start.sh install -Dm0755 distros/fedora-installer/rail/scripts/schema-zram-start.sh %{buildroot}/usr/local/bin/schema-zram-start.sh install -Dm0755 scripts/09_schema_fallback %{buildroot}%{_sysconfdir}/grub.d/09_schema_fallback install -Dm0755 scripts/09_schema_bls_save %{buildroot}%{_sysconfdir}/grub.d/09_schema_bls_save install -Dm0755 scripts/11_schema_bls_restore %{buildroot}%{_sysconfdir}/grub.d/11_schema_bls_restore install -Dm0755 distros/shared/kernel-install/99-schema-init.install %{buildroot}%{_prefix}/lib/kernel/install.d/99-schema-init.install install -Dm0755 distros/fedora-kde/scripts/schema-plasma-autologin.sh %{buildroot}/usr/local/bin/schema-plasma-autologin.sh install -Dm0755 distros/fedora-kde/scripts/plasma-session-start.sh %{buildroot}/usr/local/bin/plasma-session-start.sh install -Dm0755 distros/fedora-kde/scripts/plasmashell-shim %{buildroot}/usr/local/bin/plasmashell-shim install -Dm0755 distros/fedora-kde/scripts/schema-autostart-runner.sh %{buildroot}/usr/local/lib/schema/schema-autostart-runner.sh install -Dm0755 distros/fedora-kde/scripts/schema-plasma-watchdog.sh %{buildroot}/usr/local/lib/schema/schema-plasma-watchdog.sh install -Dm0755 scripts/schema-dbus-session-run.sh %{buildroot}/usr/local/bin/schema-dbus-session-run.sh install -Dm0755 distros/fedora-kde/scripts/schema-wayland-wait %{buildroot}/usr/local/lib/schema/schema-wayland-wait install -Dm0644 distros/fedora-kde/config/plasma-autologin.svc.d/50-stop-timeout.conf %{buildroot}%{_sysconfdir}/schema-init/services/plasma-autologin.svc.d/50-stop-timeout.conf install -Dm0644 -t %{buildroot}/usr/local/lib/schema/dbus-1/services distros/fedora-kde/config/dbus-1/services/org.freedesktop.impl.portal.desktop.kde.service install -Dm0644 -t %{buildroot}/usr/local/lib/schema/dbus-1/services distros/fedora-kde/config/dbus-1/services/org.freedesktop.systemd1.service install -Dm0755 scripts/schema-systemd1-session.py %{buildroot}/usr/local/bin/schema-systemd1-session install -Dm0755 mock_sd.so %{buildroot}/usr/local/lib/mock_sd.so install -Dm0644 distros/fedora-kde/config/plasma-env/zzz-environment-d.sh %{buildroot}/usr/local/lib/schema/zzz-environment-d.sh install -Dm0644 -t %{buildroot}/usr/local/lib/schema/plasma-env distros/fedora-kde/config/plasma-env/{05-kdedefaults,no-app-scope,ssh-agent-sock}.sh distros/fedora-kde/config/plasma-workspace/env/zz-schema-autostart.sh %package daemons Summary: schema-udev and schema-dbus, schema-init's udev and D-Bus daemons Requires: %{name} = %{version}-%{release} Conflicts: %{name}-migrate < %{version}-%{release} # dissect_policy.py runs under python3 every boot on a flipped box Requires: python3 %description daemons The reclaimed udev daemon and D-Bus broker. A box whose udev or D-Bus was flipped onto them (ISO install, migrate wizard) needs these kept current; installing them changes nothing until a flip points a service at them. The D-Bus launcher, policy dissolver and flip/rollback helpers live here too: they run every boot on a flipped box, however it was flipped. The base package requires this one so a plain upgrade keeps them current. %post daemons md5sum %{_bindir}/schema-udev | cut -d' ' -f1 > %{_sysconfdir}/schema-init/schema-udev.ship-md5 if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/schema-init/schema-udev.live ] && [ ! -e %{_sysconfdir}/schema-init/net-naming ] && ls /sys/class/net 2>/dev/null | grep -qE '^(eth|wlan)[0-9]+$'; then echo kernel > %{_sysconfdir}/schema-init/net-naming echo "schema-init: kept this box's eth*/wlan* interface names; firewall rules, scripts and" echo "schema-init: profiles may name them. For systemd's predictable names (enp3s0, wlo1), update" echo "schema-init: those references and delete /etc/schema-init/net-naming, then reboot." fi %posttrans daemons if [ -S /run/schema-init.sock ] && [ /proc/1/root -ef / ]; then svcd=%{_sysconfdir}/schema-init/services pid=$(pgrep -x schema-udev) if [ -f "$svcd/sysprep.svc" ] && [ ! -e "$svcd/udevd.svc" ] && [ -e %{_sysconfdir}/schema-init/schema-udev.live ] && [ "$(pgrep -cx schema-udev)" = 1 ] && st=$(%{_bindir}/schema-ctl status 2>/dev/null) && ! printf '%s\n' "$st" | awk -v p="pid=$pid" '$2 == p { f = 1 } END { exit !f }' && ! grep -qsE '^exec=.*/(schema-udev|schema-udevd-launch)$' "$svcd"/*.svc && cp %{_datadir}/%{name}/udevd.svc "$svcd/udevd.svc"; then mkdir -p %{_sharedstatedir}/schema-init touch %{_sharedstatedir}/schema-init/rail-udevd-added stamp=$(mktemp /run/schema-udev-upgrade.XXXXXX) if %{_bindir}/schema-ctl add "$svcd/udevd.svc" >/dev/null; then n=0 until [ /run/schema-udev/ready -nt "$stamp" ] || [ $n -ge 60 ]; do sleep 0.5; n=$((n + 1)); done if [ /run/schema-udev/ready -nt "$stamp" ]; then echo "schema-init: schema-udev now runs supervised (udevd.svc)" else echo "schema-init: udevd.svc added but schema-udev has not finished coldplug after 30 s" fi else echo "schema-init: added udevd.svc; udev comes under supervision at next boot" fi rm -f "$stamp" fi for pid in $(pgrep -x schema-udev); do case "$(readlink /proc/$pid/exe)" in *" (deleted)") ;; *) continue ;; esac cmp -s /proc/$pid/exe %{_bindir}/schema-udev && continue svc=$(%{_bindir}/schema-ctl status 2>/dev/null | awk -v p="pid=$pid" '$2 == p { print $1 }') if [ -z "$svc" ]; then echo "schema-init: schema-udev (pid $pid) is not supervised; restart it to pick up the upgrade" continue fi stamp=$(mktemp /run/schema-udev-upgrade.XXXXXX) || continue if %{_bindir}/schema-ctl restart "$svc" >/dev/null; then n=0 until [ /run/schema-udev/ready -nt "$stamp" ] || [ $n -ge 60 ]; do sleep 0.5; n=$((n + 1)); done [ /run/schema-udev/ready -nt "$stamp" ] || echo "schema-init: $svc restarted but has not finished coldplug after 30 s" else echo "schema-init: restart $svc to pick up the upgraded schema-udev" fi rm -f "$stamp" done for pid in $(pgrep -x schema-dbus); do case "$(readlink /proc/$pid/exe)" in *" (deleted)") echo "schema-init: schema-dbus picks up the upgrade at the next reboot"; break ;; esac done fi %postun daemons if [ $1 -eq 0 ]; then rm -f %{_sysconfdir}/schema-init/schema-udev.ship-md5 fi %files daemons %{_bindir}/schema-udev %{_bindir}/schema-dbus %{_libexecdir}/schema-init/schema-dbus-run.sh %{_libexecdir}/schema-init/schema-dbus-flip.sh %{_libexecdir}/schema-init/schema-dbus-flip-healthcheck.sh %{_libexecdir}/schema-init/dissect_policy.py %dir %{_sysconfdir}/schema-dbus %config(noreplace) %{_sysconfdir}/schema-dbus/masked %{_datadir}/%{name}/udevd.svc %ghost %attr(0644,root,root) %{_sysconfdir}/schema-init/schema-udev.ship-md5 %package session Summary: Autologin Plasma session pipeline for installer-built boxes Requires: %{name} = %{version}-%{release} Requires: %{name}-daemons = %{version}-%{release} # schema-systemd1-session (session-bus org.freedesktop.systemd1) Requires: python3-dbus Requires: python3-gobject-base %description session The Fedora KDE desktop session the installer ISO lays down: the autologin launcher, the session-bus wrapper, the direct kwin/plasmashell session start, the XDG-autostart runner, the plasmashell watchdog and the session env hooks. Not pulled in by the base package: a box running its own session scripts keeps them. Removing this package removes these files, and a rail whose plasma-autologin.svc execs them loses its desktop. The session bus runs schema-dbus only when /etc/schema-init/dbus-broker exists, stock dbus-daemon otherwise. %files session /usr/local/bin/schema-plasma-autologin.sh /usr/local/bin/schema-dbus-session-run.sh /usr/local/bin/plasma-session-start.sh /usr/local/bin/plasmashell-shim /usr/local/bin/schema-systemd1-session /usr/local/lib/mock_sd.so %dir /usr/local/lib/schema %dir /usr/local/lib/schema/plasma-env /usr/local/lib/schema/zzz-environment-d.sh /usr/local/lib/schema/schema-autostart-runner.sh /usr/local/lib/schema/schema-plasma-watchdog.sh /usr/local/lib/schema/schema-wayland-wait %dir /usr/local/lib/schema/dbus-1 /usr/local/lib/schema/dbus-1/services %dir %{_sysconfdir}/schema-init/services/plasma-autologin.svc.d %config(noreplace) %{_sysconfdir}/schema-init/services/plasma-autologin.svc.d/50-stop-timeout.conf /usr/local/lib/schema/plasma-env/*.sh %package migrate Summary: Guided in-place Fedora KDE onboarding onto schema-init (prebuilt) Requires: %{name} = %{version}-%{release} Requires: %{name}-daemons = %{version}-%{release} Requires: python3 Requires: btrfs-progs %description migrate Prebuilt engine that converts a running Fedora KDE box onto schema-init in place across two reboots, keeping a systemd fallback boot entry. Drives the foundation flip (schema-init PID 1) and the desktop-seam flip (schema-udev) from the schema-migrate CLI. Front-ended by schema-wizard. The D-Bus broker and its launchers live in -daemons and stay dormant: both buses run stock dbus-daemon until /etc/schema-init/dbus-broker exists, and nothing here creates it. %post migrate if alternatives --display systemctl >/dev/null 2>&1; then alternatives --install /usr/bin/systemctl systemctl %{_bindir}/schema-systemctl 100 else if [ ! -L /usr/bin/systemctl ] && [ -f /usr/bin/systemctl ]; then mv /usr/bin/systemctl /usr/bin/systemctl.real fi ln -sf %{_bindir}/schema-systemctl /usr/bin/systemctl fi %postun migrate if [ $1 -eq 0 ]; then for f in /usr/local/share/dbus-1/system-services/*.service; do if [ "$(head -n1 "$f" 2>/dev/null)" = "# generated by schema-import --bus-overrides" ]; then rm -f "$f" fi done if alternatives --display systemctl >/dev/null 2>&1; then alternatives --remove systemctl %{_bindir}/schema-systemctl elif [ -f /usr/bin/systemctl.real ]; then rm -f /usr/bin/systemctl mv /usr/bin/systemctl.real /usr/bin/systemctl elif [ "$(readlink /usr/bin/systemctl 2>/dev/null)" = "%{_bindir}/schema-systemctl" ]; then rm -f /usr/bin/systemctl fi fi %posttrans migrate m=/var/lib/schema-init/initrd-systemctl-checked if [ ! -e "$m" ] && [ -x /usr/bin/systemctl.real ] && command -v lsinitrd >/dev/null; then for img in /boot/initramfs-*.img; do kver=${img#/boot/initramfs-}; kver=${kver%.img} [ -d "/usr/lib/modules/$kver" ] || continue l=$(lsinitrd "$img" 2>/dev/null) if echo "$l" | grep -q ' usr/bin/schema-systemctl$' && ! echo "$l" | grep -q ' usr/bin/systemctl.real$'; then dracut -f --kver "$kver" "$img" || : fi done mkdir -p "${m%/*}" && touch "$m" fi # ISO installs (the installer rail's sysprep.svc) carry their rail in /etc, which # no package owns, so rail fixes reach them only here, once each. The kickstart # sets the markers; an install whose rail already had udevd.svc came from an ISO # that also ran the import (v0.4.3), so it is marked done without touching it. svcd=%{_sysconfdir}/schema-init/services st=%{_sharedstatedir}/schema-init if [ -f "$svcd/sysprep.svc" ]; then mkdir -p "$st" if [ -e "$svcd/udevd.svc" ] && [ ! -e "$st/rail-udevd-added" ]; then touch "$st/rail-udevd-added" "$st/enabled-units-imported" fi if [ ! -e "$st/rail-udevd-added" ] && cp %{_datadir}/%{name}/migrate/distros/fedora-installer/rail/services/udevd.svc "$svcd/udevd.svc"; then touch "$st/rail-udevd-added" if [ "$(cat /proc/1/comm 2>/dev/null)" = schema-init ] && [ /proc/1/root -ef / ] && [ -S /run/schema-init.sock ]; then %{_bindir}/schema-ctl add "$svcd/udevd.svc" >/dev/null || echo "schema-init: udev comes under supervision at next boot" fi fi if [ ! -e "$st/enabled-units-imported" ]; then mkdir -p /var/log/schema-init %{_bindir}/schema-import --enabled > /var/log/schema-init/upgrade-import.log 2>&1 || echo "schema-init: some enabled units did not import; see /var/log/schema-init/upgrade-import.log" touch "$st/enabled-units-imported" echo "schema-init: imported the services systemd had enabled; they start at next boot" fi if [ ! -e "$st/rail-seatd-removed" ]; then if grep -qsx 'exec=/usr/local/bin/seatd-run.sh' "$svcd/seatd.svc" && [ ! -e /usr/local/bin/seatd-run.sh ]; then rm -f "$svcd/seatd.svc" echo "schema-init: removed seatd.svc (the installer never shipped its seatd-run.sh); it leaves schema-ctl status at next boot" fi touch "$st/rail-seatd-removed" fi fi # zram-recompress.svc joined the rail after some installs went out; give it to # a box whose zram.svc runs the rail script, once. It starts at next boot, when # zram0 comes up with the recompression tier. A copy put there by hand counts. if grep -qs '^exec=/usr/local/bin/schema-zram-start.sh$' "$svcd/zram.svc" && [ ! -e "$st/rail-zram-recompress-added" ]; then mkdir -p "$st" if [ -e "$svcd/zram-recompress.svc" ] || cp %{_datadir}/%{name}/migrate/distros/fedora-installer/rail/services/zram-recompress.svc "$svcd/zram-recompress.svc"; then touch "$st/rail-zram-recompress-added" fi fi %{_bindir}/schema-import --bus-overrides >/dev/null 2>&1 || : r=%{_sysconfdir}/schema-init/services/selinux-autorelabel-mark if [ -f "$r.svc.skipped" ] && [ ! -e "$r.svc" ] && %{_bindir}/schema-import selinux-autorelabel-mark >/dev/null 2>&1 && [ -e "$r.svc" ]; then rm -f "$r.svc.skipped" fi %transfiletriggerin migrate -- /usr/bin/systemctl if [ ! -L /usr/bin/systemctl ] && [ -f /usr/bin/systemctl ]; then mv -f /usr/bin/systemctl /usr/bin/systemctl.real ln -sf %{_bindir}/schema-systemctl /usr/bin/systemctl fi %transfiletriggerin migrate -- /usr/lib/systemd/system %{_bindir}/schema-import || : %transfiletriggerin migrate -- /usr/share/dbus-1/system-services %{_bindir}/schema-import --bus-overrides >/dev/null 2>&1 || : %transfiletriggerpostun migrate -- /usr/share/dbus-1/system-services %{_bindir}/schema-import --bus-overrides >/dev/null 2>&1 || : # akmods installs the nvidia kmod rpm minutes after the kernel; a kernel the # kernel-install hook held for want of it can become the default now %transfiletriggerin -- /lib/modules /usr/lib/modules if grep -q '/nvidia[^/]*\.ko'; then %{_prefix}/lib/kernel/install.d/99-schema-init.install promote || : fi %files migrate %dir %{_libexecdir}/schema-init %dir %{_datadir}/%{name}/migrate %{_bindir}/schema-migrate %{_bindir}/schema-systemctl %{_prefix}/lib/dracut/dracut.conf.d/90-schema-systemctl.conf %{_libexecdir}/schema-init/schema-flip-apply %{_libexecdir}/schema-init/schema-udev-flip-arm.sh %{_libexecdir}/schema-init/schema-udev-flip-backup.sh %{_libexecdir}/schema-init/schema-udev-flip-healthcheck.sh %{_libexecdir}/schema-init/verify-rules-live %{_libexecdir}/schema-init/stage.py %{_datadir}/%{name}/migrate/prevent-set.list %{_datadir}/%{name}/migrate/distros %{_datadir}/%{name}/migrate/scripts %config(noreplace) %{_sysconfdir}/sudoers.d/schema-wizard %package wizard Summary: Guided PySide6 GUI that converts a Fedora KDE box onto schema-init Requires: %{name}-migrate = %{version}-%{release} Requires: python3-pyside6 BuildArch: noarch %description wizard The onboarding wizard: a native Plasma (Qt/QML) GUI that walks a novice through the two-reboot in-place conversion, driving the migrate engine, the flip helper, and schema-doctor. Unprivileged; escalates only through the fixed helpers. %post wizard [ "$1" -eq 1 ] && echo 'schema-wizard: run "schema-wizard" (or open "Set up schema" in the app menu) to start.' || : %files wizard %dir %{_libexecdir}/schema-init/wizard %dir %{_libexecdir}/schema-init/wizard/qml %{_bindir}/schema-wizard %{_libexecdir}/schema-init/wizard/*.py %{_libexecdir}/schema-init/wizard/qml/*.qml %{_sysconfdir}/xdg/autostart/schema-wizard.desktop %{_datadir}/applications/schema-wizard.desktop %pre # The running login1 stub re-execs itself on SIGHUP, keeping its pid and the # DRM/VT fds the desktop session depends on. Stubs older than that handoff # die on SIGHUP instead, so only reload one whose file knows the signal. if grep -qs SIGHUP /usr/local/bin/schema-logind.py; then touch /run/schema-logind.hup-ok 2>/dev/null || : fi %post if [ -e /run/schema-logind.hup-ok ]; then rm -f /run/schema-logind.hup-ok pkill -HUP -f '^(/usr/bin/)?python3(\.[0-9]+)? /usr/local/bin/schema-logind\.py( |$)' || : fi if [ $1 -ge 2 ]; then touch /run/schema-init.reexec-pending 2>/dev/null || : fi # Installers before this package copied the kernel-install hook into /etc, # where it shadows the packaged one and never gets fixes. Retire it once; # without the .install suffix kernel-install ignores it. An /etc copy put back # after that is an admin override and is left alone. if [ -f %{_sysconfdir}/kernel/install.d/99-schema-init.install ] && [ ! -e %{_sharedstatedir}/schema-init/kernel-hook-etc-retired ]; then mv -f %{_sysconfdir}/kernel/install.d/99-schema-init.install \ %{_sysconfdir}/kernel/install.d/99-schema-init.install.retired || : echo "schema-init: kernel-install hook now ships in %{_prefix}/lib/kernel/install.d; old /etc copy kept as 99-schema-init.install.retired" fi mkdir -p %{_sharedstatedir}/schema-init && touch %{_sharedstatedir}/schema-init/kernel-hook-etc-retired || : # Installer ISOs before 0.4.13 copied the rail with the build host's uid, # which on the target is the first user: PID 1 runs those .svc files as root. if [ -n "$(find %{_sysconfdir}/schema-init -xdev \( ! -uid 0 -o ! -gid 0 -o \( ! -type l -perm /022 \) \) -print -quit 2>/dev/null)" ]; then find %{_sysconfdir}/schema-init -xdev \( ! -uid 0 -o ! -gid 0 \) -exec chown -h root:root {} + 2>/dev/null find %{_sysconfdir}/schema-init -xdev ! -type l -perm /022 -exec chmod go-w {} + 2>/dev/null if [ -n "$(find %{_sysconfdir}/schema-init -xdev \( ! -uid 0 -o ! -gid 0 -o \( ! -type l -perm /022 \) \) -print -quit 2>/dev/null)" ]; then echo "schema-init: WARNING: files under %{_sysconfdir}/schema-init are still writable by non-root users; PID 1 runs them as root" else echo "schema-init: files under %{_sysconfdir}/schema-init were writable by non-root users; now root:root, go-w" fi fi %preun # Last removal on an opted-in box: drop the per-kernel schema entries (their # init= would point at a deleted binary) and move a default that pointed at one # back to its stock twin. if [ $1 -eq 0 ] && [ -f %{_sysconfdir}/schema-init/boot-default ]; then tok=$(cat %{_sysconfdir}/machine-id 2>/dev/null) saved=$(grub2-editenv list 2>/dev/null | sed -n 's/^saved_entry=//p') for e in /boot/loader/entries/schema-*.conf; do [ -f "$e" ] || continue v=${e##*/schema-}; v=${v%%.conf} [ -f "/boot/loader/entries/$tok-$v.conf" ] || continue rm -f "$e" [ "$saved" = "schema-$v" ] && grub2-set-default "$tok-$v" || : done fi %posttrans # Kernels installed before the hook shipped never got a schema entry; on an # opted-in box, give each one its entry now (the hook is idempotent). if [ -f %{_sysconfdir}/schema-init/boot-default ]; then for kv in $(ls /lib/modules 2>/dev/null | sort -V); do [ -f "/lib/modules/$kv/vmlinuz" ] || continue %{_prefix}/lib/kernel/install.d/99-schema-init.install add "$kv" "/boot/vmlinuz-$kv" || : done fi # PID 1 swaps itself onto the upgraded binary in place. schema-ctl runs verify # first and refuses on any problem with the next boot (its report goes to the # transaction log); a refusal (that, memory pressure, a binary that fails its # dry run, a PID 1 too old to know the verb) leaves the running one untouched # and never fails the transaction. if [ -e /run/schema-init.reexec-pending ]; then rm -f /run/schema-init.reexec-pending if [ "$(cat /proc/1/comm 2>/dev/null)" = schema-init ] && [ /proc/1/root -ef / ] && [ -S /run/schema-init.sock ]; then %{_bindir}/schema-ctl reexec || echo "schema-init: PID 1 kept its old binary; see above, then run 'schema-ctl reexec'" fi fi # Each user's schema-user swaps onto the new binary in place too, its # services and containers kept. Only instances still on the replaced file; # independent of the PID 1 re-exec above, and never fails the transaction. # The process name and the socket are the user's to fake, so the client runs # as that user (PID 1's root-only socket stays out of reach) and is time- # limited. Found by exe, not comm: after an fexecve the comm is the fd # number on older kernels. An instance already re-exec'd is no longer deleted. for exe in /proc/[0-9]*/exe; do [ "$(readlink "$exe" 2>/dev/null)" = "%{_bindir}/schema-user (deleted)" ] || continue pid=${exe#/proc/}; pid=${pid%%/exe} cmp -s /proc/$pid/exe %{_bindir}/schema-user && continue uid=$(stat -c %u /proc/$pid 2>/dev/null) || continue gid=$(stat -c %g /proc/$pid 2>/dev/null) || continue [ "$uid" != 0 ] || continue [ -S "/run/user/$uid/schema-user/ctl.sock" ] || continue timeout 30 setpriv --reuid="$uid" --regid="$gid" --clear-groups \ env XDG_RUNTIME_DIR="/run/user/$uid" %{_bindir}/schema-ctl --user reexec >/dev/null 2>&1 || echo "schema-init: schema-user for uid $uid kept its old binary; log out and back in to finish" done # The org.freedesktop.systemd1 shim is a Python daemon: the new file only # takes effect when it is restarted. Only a box that runs it is touched. if [ -S /run/schema-init.sock ] && [ /proc/1/root -ef / ] && %{_bindir}/schema-ctl status schema-systemd1 2>/dev/null | grep -q '^schema-systemd1 .*pid=[1-9]'; then %{_bindir}/schema-ctl restart schema-systemd1 >/dev/null || echo "schema-init: restart schema-systemd1 to pick up the upgrade" fi %files %license LICENSE fonts/OFL.terminus %{_prefix}/lib/kbd/consolefonts/schema-10x20.psfu.gz %doc README.md docs/ %{_bindir}/schema-init %{_bindir}/schema-user %{_bindir}/schema-ctl %{_bindir}/schema-subreaper %{_bindir}/schema-journal-sink %{_bindir}/schema-board %{_bindir}/schema-top %{_bindir}/schema-coredump %{_bindir}/schema-recorder %{_bindir}/schema-snapshot %{_bindir}/schema-bootok %config(noreplace) %{_sysconfdir}/schema-init/services/schema-verify-baseline.svc %{_bindir}/schema-analyze /usr/local/bin/schema-doctor /usr/local/bin/schema-recorder-earlyoom /usr/local/bin/schema-logind.py /usr/local/bin/schema-systemd1.py /usr/local/bin/schema-session-register /usr/local/bin/schema-session-unregister /usr/local/bin/schema-sysprep.sh /usr/local/bin/schema-sshd-start.sh /usr/local/bin/schema-zram-start.sh %dir %{_libexecdir}/schema-init %{_libexecdir}/schema-init/schema-sysctl-apply %{_libexecdir}/schema-init/schema-udevd-launch %{_libexecdir}/schema-init/schema-mount-fstab %{_libexecdir}/schema-init/schema-bus-activate %{_libexecdir}/schema-init/schema-import %{_bindir}/schema-import %config(noreplace) %{_sysconfdir}/schema-init/user-skip %{_datadir}/bash-completion/completions/schema-ctl %{_datadir}/zsh/site-functions/_schema-ctl %dir /usr/local/share/dbus-1 %dir /usr/local/share/dbus-1/system-services /usr/local/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service %{_sysconfdir}/grub.d/09_schema_fallback %{_sysconfdir}/grub.d/09_schema_bls_save %{_sysconfdir}/grub.d/11_schema_bls_restore %{_prefix}/lib/kernel/install.d/99-schema-init.install %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/services %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %{_datadir}/%{name} %{_datadir}/%{name}/services %changelog * Mon Nov 23 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.33-1 - schema-user re-execs in place: schema-ctl --user reexec swaps the running binary with PID 1's own handoff, services and rootless containers kept (same pids, same cgroups). An RPM upgrade does it for every running instance, asking each as its own user. The first upgrade from an older schema-user prints "log out and back in" once (#579) - An upgrade no longer moves the volume: schema-udev's restart replayed sound-card adds and alsactl restored the last saved mixer state (#580) - schema-ctl top runs schema-top; an unknown command is named, with a pointer to --help (#578) * Mon Nov 23 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.32-1 - First-boot: the wizard's first flip could cut Plasma's first-run panel short (no tray, clock or show-desktop, kept on every later login). The wizard now waits for the layout to settle, and session start sets aside a half-built layout so plasmashell rebuilds the default (#576) - schema-top: live per-service CPU/MEM view with sort and scroll; schema-ctl status colours its states on a tty; new schema-ctl log [-f] [-n N] tails a service log across logrotate (#575) * Sun Nov 22 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.31-1 - Security: any local user could call every org.freedesktop.login1 method. schema-logind served hostname1/timedate1/locale1/ConsoleKit on login1's own bus connection, and their stock "anyone may send" policies matched the whole connection, past login1.conf's deny. CreateSession then let a non-root caller have root move any pid (PID 1 included) into a user session scope. Each extra name now has its own connection; CreateSession answers only root (pam_systemd); Lock, SetLockedHint, SetIdleHint and LockSession(s) check the caller, and Manager lock/unlock relays reach the session again (#572) - uaccess device ACLs are revoked when a seat has no active session, and a failed setfacl is retried (gated to 5 s) instead of cached as done (#567) - verify never writes to the root it inspects: dirty btrfs/ext3/ext4 roots are opened without log replay, unknown or unsafe ones are UNRESOLVED; unchecked rootflags= on an already-mounted root are flagged (#565) - verify: a grubenv or env block with more variables than verify holds is UNRESOLVED instead of silently cut; grub.cfg sets past verify's room are unknown by name, and only an entry that uses one is unresolved (#568, #570) - verify: btrfs's lifetime error counters, printed at every mount, no longer read as an error since boot; they are a note (#569) - The rail's console palette is applied only once the original is saved; the D-Bus broker's bus GUID is random, not derived from its PID (#568) * Sun Nov 22 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.30-1 - Supersedes 0.4.29, which was tagged but never released: on a Pi, verify ran the next boot's --check against /usr/sbin/schema-init, which the deb does not ship, so a package upgrade's re-exec was refused. It now checks /usr/bin/schema-init, what schema-init-pi execs (#561) - schema-ctl verify (#550, #552, #553): a pre-reboot check of the next boot (the entry GRUB will actually pick, its kernel, initrd, root and init=, the candidate's own --check in a read-only chroot), services against the last good boot's baseline, the guard's ways back, and disks. reexec, arm and an interactive reboot/poweroff run it first and refuse on FAIL, an unaccepted CHANGE or (reexec) UNRESOLVED; --force overrides. Package upgrades re-exec through the gate without failing the transaction. Spare snapshots are inspected within a 45 s budget; the rest are a WARN (#559) - The rail look (#554, #555, #557): a styled boot rail and board in a blue-violet palette on the Terminus-based schema-10x20 console font; the board falls back to ASCII on any other font - schema-snapshot: prune and delete never remove the snapshot the armed guard falls back to (#558) - schema-board: names and card replies cleaned of control bytes, restart counts kept to their column, standby tallied as STANDBY (#559) * Sat Nov 21 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.29-1 - schema-ctl verify (#550, #552, #553): a pre-reboot check of the next boot (the entry GRUB will actually pick, its kernel, initrd, root and init=, the candidate's own --check in a read-only chroot), services against the last good boot's baseline, the guard's ways back, and disks. reexec, arm and an interactive reboot/poweroff run it first and refuse on FAIL, an unaccepted CHANGE or (reexec) UNRESOLVED; --force overrides. Package upgrades re-exec through the gate without failing the transaction. Spare snapshots are inspected within a 45 s budget; the rest are a WARN (#559) - The rail look (#554, #555, #557): a styled boot rail and board in a blue-violet palette on the Terminus-based schema-10x20 console font; the board falls back to ASCII on any other font - schema-snapshot: prune and delete never remove the snapshot the armed guard falls back to (#558) - schema-board: names and card replies cleaned of control bytes, restart counts kept to their column, standby tallied as STANDBY (#559) * Wed Nov 18 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.28-1 - syscall_deny= (#546, #547): a denylist preset (@clock @cpu-emulation @debug @module @mount @obsolete @raw-io @reboot @swap kexec_load kexec_file_load bpf), a list, or 0. Opt-in only: an unset key adds nothing, whatever the host hardening default says. The importer and every shipped .svc pin syscall_deny=0 - schema-snapshot no longer writes a blank initrd line for a kernel without an initramfs; grub stopped reading the entry there and booted it without root= (#547) - schema-import: --out is honoured for system units; a bare command name in the final ExecStart= is resolved on the search path or the unit skipped, so ssh-host-keys-migration no longer shows excised on a fresh install (#545) * Wed Nov 18 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.27-1 - Audit tier 4: the systemd unit semantics the engine was missing. - exec_reload= and reload_signal=, schema-ctl reload (#529); restart=, success_exit_status=, restart_prevent_exit_status= (#530); kill_mode=, kill_signal=, final_kill_signal=, and a runtime stop escalates (#531) - runtime_dir=, state_dir=, cache_dir=, logs_dir= (#533). Units imported before this keep their install -d lines until re-imported with schema-import -f - protect_kernel_tunables/modules, protect_control_groups, private_devices, protect_hostname, private_network, memory_deny_write_execute (refused on kernels before 6.3), umask= (#534, #535) - nice=, io_class=/io_priority=, sched_policy=/sched_priority= (#536) - watch_path= for systemd .path units: exists, exists_glob, dir_not_empty, changed, modified, make_directory=, trigger limit 200 per 2 s; the importer takes .path units (#538) - Timers: randomized_delay_sec=, on_calendar= with weekdays, days of month, ranges and steps (up to 4 lines), "next fire" in status; the importer maps RandomizedDelaySec= and OnActiveSec=. Hourly timers re-import as wall-aligned *:00 (#539) - supplementary_groups=, dynamic_user=1 (uid 61184-65519 from the name, private state dirs); the importer maps DynamicUser=, so earlyoom and fwupd-refresh no longer run as root (#540) - syscall_filter=, syscall_error_number=, syscall_architectures=, restrict_suid_sgid, lock_personality, restrict_realtime, restrict_namespaces (#541). A blocked call fails with EPERM instead of killing the service; any filter refuses foreign ABIs, so 32-bit binaries can't run under a filtered service. The importer maps SystemCallFilter= * Sat Nov 14 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.26-1 - Full audit (2026-11-12) fixes. Stricter .svc parsing refuses bad on_calendar, cpu_limit, mem_limit and watchdog_sec values, duplicate names and odd names (#514); hardened builds, PID 1 static-pie (armhf plain -static) (#515-#517) - journal-sink no longer hangs on a hostile fd; the control socket can't stall the supervisor; PID 1 locks its memory (mlockall) (#518) - logind trusts only the real seat and gives devices to the session controller only (#519) - systemctl shim: disable removes only untouched generated .svc and keeps a hand-written one as .svc.disabled; mask/unmask work (#520) - /run capped at 20% of RAM, /dev/shm inode-capped; private_tmp lives under /tmp/schema-private on the host /tmp (#521) - Hardware watchdog is opt-in (schema.watchdog=1 or /etc/schema-init/watchdog); mem_low= and swap_max= keys, critical services never swap, zram sized min(RAM, 8G), status shows memory (#522) - modules-load runs in one modprobe child, reads /usr/lib and friends in systemd order and the modules_load= cmdline; no fixed 1 s shutdown sleep (#523, #525) - Parallel fsck, one per device (#524) - schema-udev: hotplug events run in parallel workers, so one stuck device no longer freezes hotplug; helper timeout 180 -> 30 s (#526). RUN helpers' output is discarded like udevd's, with one line per failing helper; SCHEMA_UDEV_RUN_OUTPUT=1 keeps it (#527) - Engine: group=, pids_max=, cpu_weight=, cpu_limit= above one core; survival mode keeps a service's own cpu_limit; importer maps Group=, Slice= and the resource directives (#508, #510, #511) - Pi timesync floors on the last agreed sync, softly (#512); a failed udev rules reload keeps the live set (#506); status --json escapes names (#507) * Wed Nov 11 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.25-1 - Fedora systemctl shim and Pi shutdown wrapper: shutdown with a delay (+10, -k, a clock time) is refused instead of powering off at once; --help and -w no longer act (#499) - schema-doctor session-agents matches agents by process name, so a command line merely mentioning one no longer hides a missing agent (#500) - Autostart runner skips an entry only when this user's own copy is running, matched by program, not by any command line that names it (#501, #502) - Plasma watchdog and session start look only at this user's processes: a greeter's kwin no longer keeps the watchdog alive, another login's plasmashell no longer blocks a respawn (#502) - schema-bootok counts only a login user's session, and now confirms GNOME and X11 sessions (Fedora Cinnamon: an X server holding the GPU beside the user's shell); /dev/nvidia* counts as holding it (#503, #504) * Mon Nov 09 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.24-1 - Autostart runner waits up to 300 s for this user's plasmashell (falling back to kwin's Wayland socket), so a slow first login no longer starts the wizard with no display. Its log is kept in ~/.local/state/schema-user/log (#487) - schema-doctor: powerdevil-running stays clean until the desktop is up, so the boot run no longer flags PowerDevil before plasmashell starts it (#491) - Wizard: "Restart now" on the waiting-for-restart screen. schema-migrate --reboot restarts only while a stage waits on a restart armed in this boot; a restart killed by the shutdown's SIGTERM is not reported as a failure (#492) - ISO first-boot wizard: a flip opened again in the boot it was armed in shows "One restart left" instead of rolling back an untried switch (#494) - Raspberry Pi: reboot, poweroff, halt and shutdown work under schema-init. The deb diverts systemd-sysv's links to an init-aware wrapper that falls back to systemd's originals; delayed or cancelled shutdowns are refused (#495) * Sat Nov 07 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.23-1 - Security: a client on the control socket can no longer hold PID 1. Replies go out in one non-blocking send, a client gets 250 ms to send its line, and an unfinished line is refused. ctl_writef no longer sends bytes past its buffer. schema-ctl reports a reply that was cut short (#479) - Security: schema-migrate writes the home recovery card as the user, schema-doctor checks the process it reads a session from, and the wizard's sudo grant lists exact arguments, so --deploy and --uninstall need a password (#478). The ISO's sudo grant lists exact subcommands and is removed when the wizard finishes (#479) - schema-ctl reset with no name retries only what failed, not services stopped on purpose or oneshots that finished (#479) - Wizard: stays responsive while a password prompt is open or a deploy runs, says when a password was wrong, tells a failure before anything changed from one after, and keeps Continue on screen. --uninstall removes the recovery cards (#480) - schema-import: migration brings along what an enabled unit needs, as systemd would start it, and warns about a hard dependency with no service (#482). StateDirectory=, CacheDirectory=, LogsDirectory= and ConfigurationDirectory= now get their directory and variable, RuntimeDirectory= gets its variable, and all of them expand in commands (#483, #484). Reads system drop-ins, warns about sandboxing it can't carry over, keeps a 0600 unit's secrets private, and one bad unit no longer stops the rest (#477) - Stable apt now moves when the GitHub release is published, with the exact debs the tag run tested, not when the tag is pushed (#481) * Thu Nov 05 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.22-1 - Security: the systemd1 bridge authorizes callers through polkit (#469). schema-logind checks authorization on the hostname, timedate and locale setters and on session unlock, activate and device calls (#470). schema-systemd1 closes a race while creating its private socket (#471). schema-dbus caps inbound buffering per connection (#472) and enforces recipient receive_* policy (#473) - Devuan: devuan-boot sets the hostname before the display manager starts. Without it LightDM's greeter died once on every boot without autologin, and the supervisor restarted it (#474) - New service keys: working_dir= with WorkingDirectory= import (#452), rw_path= to keep a path writable inside protect_system (#448), bind= to stop with a service and start again with it (#465), circuit_broken=1 names the crash-loop breaker when it trips (#455), excise_reason names why a service was excised (#456) - systemd compatibility: template specifiers %i %I %p %P %f (#453). The session shim takes multiple ExecStart= and empty-value resets (#454), reads unit drop-ins and keeps '@' argv0 in oneshot chains (#457). Escaped quotes in udev rules and StopUnit on shim-spawned units fixed (#468) - Rootless podman: `podman exec` from a login shell works through podman scopes (#466). Quadlet Pod= containers import with their pod (#458), and a warning says a Pod= container won't follow its pod (#463). Quadlet pods get the stop grace podman pod stop needs (#461). exec_stop_post runs when exec_stop took the service down (#460) - Boot: schema-udev replays module, bus and driver uevents at coldplug (#467). PID 1 creates static device nodes (#445) and sets the correct 1777 modes on /dev/shm, /run/lock and /run/shm (#446). A just-registered logind session answers lookups at once (#462) - Raspberry Pi: `schema-pi enable` sets up a stock Pi OS box with the service kit (#444), which gains a sysctl service (#449). schema-pi-early runs systemd-tmpfiles and clears /run/nologin (#447). `schema-pi refresh` updates untouched kit .svc files on upgrade (#448) - schema-doctor: a non-root --check prints its results instead of a traceback (#462). limits-mismatch names the cgroup and its real value (#459) * Wed Oct 28 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.21-1 - Raspberry Pi: signed apt repo (ajax80.github.io/schema-init-apt) with amd64, arm64 and armhf debs; armhf is ARMv6, built on Raspbian, so Zero and Pi 1 run it. `schema-pi enable` boots through schema-init-pi, a static boot guard: two failed boots fall back to the last known-good set, else systemd for one boot. A 300 s deadline reboots a boot that never confirms, panic=10 reboots a crashed PID 1, and `schema-pi disable` returns to systemd. apt upgrades re-exec PID 1 in place - Shutdown: PID 1 stdio left on a regular file under / (the Pi guard's boot.log) no longer keeps / busy, so the remount read-only succeeds - 32-bit: memory.high, memory.max and reclaim byte math no longer overflow at 1 GiB; udev input_id reads capability words at the kernel's word width, so keyboards and mice are tagged on 32-bit Pis - Rootless podman + Quadlet under schema-user: `schema-import --user` runs user generators; exec_stop=/exec_stop_post=; opt-in main_pid_notify=1 follows MAINPID=; services whose cgroup podman splits clean up fully; verify_memory_max/cpu_max/pids_max check the container's limits after READY - schema-import: SocketBindAllow/Deny= become landlock_bind_tcp= - schema-udev: coldplug events carry a SEQNUM, so libudev consumers stop dropping them (NetworkManager no longer waits forever on lo) - schema-logind reaps the processes it cgroup-kills; a refused main pid is logged; stopping a service still waiting on its main pid runs exec_stop_post - livetest boot-capture logs moved out of the repo * Mon Oct 26 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.20-1 - Persistent timers on a box with a separate /var: the catch-up for a run missed while the machine was off now fires. The stamp was read before mount-fstab mounted /var, from the empty directory beneath it, so every boot looked like a first deploy (a box off at 00:10 skipped that day's logrotate). Timers now wait for mount-fstab's first attempt - ready_bus_name services wait for their bus name once a readiness reporter is live (up to 90 s), instead of being promoted on the stable timer: tuned-ppd no longer starts before TuneD is on the bus and excises - schema-doctor unported-timers: flags systemd timers that are enabled but have no schema-init schedule (logrotate on an RPM-only install, plocate-updatedb, dnf-makecache) and names the fix - logrotate covers /var/log/schema-autologin.log (grew to 6.9G unrotated) - schema-import is on PATH from the base package; it shipped only in -migrate, so an RPM-only install had it only under /usr/libexec - Importer: ExecStart=+ drops the sandbox as systemd does, not just User= (kept, with a warning, when plain ExecStartPre lines need it) - schema-migrate and the wizard refuse while a kernel installed by an update is waiting for a reboot, and the wizard says to restart instead of showing a generic error * Sat Oct 24 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.19-1 - Session bus launcher: one bus per session attempt. A slow first broker start no longer races the dbus-daemon fallback, a dead broker no longer kills the fallback session, and a previous attempt's bus is stopped before the new one binds (it unlinked the new socket on exit: black screen after the message-bus flip) * Sat Oct 24 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.18-1 - Migrate: a mount-fstab barrier; imported units with DefaultDependencies, After=local-fs.target or RequiresMountsFor= wait on it, so a separate /var is mounted before they start (stage no longer sticks at R1_PENDING) - Importer: ExecStart=! and ExecStart=+ run as root (!! keeps User=) - Uninstall removes config dirs and the flip backups it left behind - Wizard summary screen shows the doctor's results - schema-user: runs the user's enabled units; systemctl --user shim and daemon-reload; session D-Bus activation through schema-user; ConditionUser=, import.log rotation - restart_sec= waits between a death and the respawn (RestartSec=) - schema-dbus: live config reload (SIGHUP, ReloadConfig, inotify); its runtime ships in -daemons - schema-import --user: socket/timer units follow the deps of the service they start; one network-online oneshot - Session autostart runs `sh -c` entries and passes WAYLAND_DISPLAY - Docs: run `dnf upgrade --refresh` and reboot before installing * Wed Oct 21 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.17-1 - Per-user supervisor: schema-user runs a user's own services (deps, stop order, restarts, timers, logs) in their own cgroups under a delegated user@.service; `schema-ctl --user` talks to it - schema-logind starts schema-user at a user's first login, restarts it with backoff, stops it at last logout, and adopts a running one across re-exec; a dead instance's leftovers are killed first - Linger: SetUserLinger and the Linger property keep a user's schema-user running with no session; existing /var/lib/systemd/linger entries count - Kill switch: /etc/schema-init/user-supervisor.disabled keeps logind from starting schema-user on that machine - PID 1 shutdown SIGTERMs each schema-user with the containers, so user services stop in order before the final SIGKILL - `wait_socket=` holds a service until a unix socket accepts * Wed Oct 21 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.16-1 - Flight recorder (opt-in): schema-recorder keeps a rolling record of what happened (service events, CPU/memory pressure, earlyoom kills); the board shows the latest line and `schema-ctl trace` prints the history - Descriptor store: `fdstore=N` lets a service park file descriptors in PID 1 across restarts (`schema-ctl status` shows `fds=K`); schema-dbus uses it so `schema-ctl restart dbus` keeps every client connected. The package does not restart the broker itself yet - Limp mode: `card=exec:` / `card=fallback:` give a failing service a mitigation ladder before it is excised; the board shows the deck - Landlock TCP rules: `landlock_bind_tcp=` / `landlock_connect_tcp=` - Eviction on reload: an evicted service's cgroup is killed and removed, a reaped eviction no longer reports a false force-kill, and a name that comes back kills its old leftovers first - PID 1 never closes a received descriptor itself; descriptor closers are capped and a stuck one refuses re-exec instead of hanging PID 1 - The supervisor engine moved out of init.c into engine.c (groundwork for a per-user supervisor); PID 1 behaviour unchanged - Over-limit dep=/env=/member= lines are refused; up to 128 services; close_range fallback for older kernels - schema-mount-fstab waits for every member of a multi-device btrfs - Artix port beside dinit, s6 and OpenRC - schema-ctl add accepts a bare service name; autologin exits with Plasma's code after a crash * Sat Oct 17 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.15-1 - grub2-mkconfig no longer clobbers schema-init boot entries: 10_linux rewrote every BLS options line, dropping init= (the schema-init entry booted systemd) and a snapshot's rootflags=subvol=; new grub.d 09_schema_bls_save / 11_schema_bls_restore put them back, twins re-cloned by the kernel-install hook (new reclone verb) - schema-dbus never takes over a live bus socket; unknown arguments print usage and exit 2 - Rescue boot: schema.rescue / single / s / S / 1 / rescue on the cmdline runs sulogin before any service; Ctrl-D continues the boot - fsck at boot: schema-mount-fstab runs fsck -a on fstab entries with pass > 0 (forcefsck / fsck.mode= honoured); fsck.fat skipped when the FAT dirty bit is clear - PID 1: first pass runs at once, a pass that moves a service triggers the next immediately, ready_path polled every 10 ms after spawn; answers runit's stopit/reboot + SIGCONT handshake - Builds and passes make test on musl - Devuan / LCOS profile beside sysvinit (install.sh, LightDM/SLiM, chrony, bluetoothd, opt-in schema-dbus system bus, schema-import --rc, udevd ready on its control socket); Void Linux profile beside runit (install.sh, schema-import --runit, sv wrapper), glibc and musl * Thu Oct 15 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.14-1 - PID 1 refuses a .svc, drop-in or .svc.d not owned by root or writable by others; an unsafe services dir is warned about and reload is refused - env_file and PID 1's env file checked for owner/mode like a .svc - No more silent truncation: over-long .svc lines, args= past the word cap (now 62) and expand_args overflow are refused instead of cut; schema-ctl, .grp, the env file and modules-load.d read whole lines; args= before exec= is kept - exec_pre: landlock covers plain exec_pre; importer maps %n/%N/%p/%t - schema-udev: an orphaned ISO-rail schema-udev is brought under supervision on upgrade; root= accepts hex, PARTLABEL, PARTNROFF and quotes; one /proc/cmdline tokenizer for root=, IMPORT{cmdline} and net.ifnames - Installer: seatd.svc dropped from the ISO rail (healed on upgrade); build-iso fails when a rail service's exec= is shipped by nothing * Wed Oct 14 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.13-1 - schema-analyze: boot timing recorded across reboots, history and regress reports (first Rust component; shipped in the base package) - schema-udev: rules stored compactly (86 MB -> 0.8 MB resident) - schema-udev: restarted when an upgrade replaces it - schema-udev: run systemd-vconsole-setup directly for 90-vconsole.rules - schema-udev: resolve the root disk from root= when / is /dev/root, so /dev/disk/by-designator links appear on initramfs-less boots - Re-exec guard names the stall that blocked it - Installer ISO: rail .svc files were owned by the first user (the build host's uid carried through the payload copy); now root, and upgrades fix existing installs * Sun Oct 11 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.12-1 - schema-udev: predictable network interface names (enp*/wlp*, same as systemd); upgrades of boxes still on eth*/wlan* keep kernel names via /etc/schema-init/net-naming - D-Bus: PolicyKit1 and every imported bus daemon's activation routed to PID 1 - schema-logind: refuse non-VT CreateSession with SessionBusy (silences the per-sudo "only for real VTs" log flood) - Log rotation scheduled by default on install - schema-ctl graph, bash/zsh completion - Wizard: retry a rolled-back flip and say why it rolled back - Migrate uninstall clears flip gates and relabels SELinux - Plasma: own ActivityManager before plasmashell; watchdog for a spinning shell - CI on every PR; README rewritten around the story, docs/ map * Fri Oct 09 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.11-1 - schema-init-wizard: "Set up schema" in the app menu, a first-install hint on how to start it, and the start step in the README - README: migrate benchmark on real hardware (stock vs migrated) * Fri Oct 09 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.10-1 - Migrate: bus daemons that aren't Type=dbus (firewalld) wait for polkitd; fixes the first schema-init boot stalling before the desktop on stock Fedora 44 KDE - Gettys ask for a password; no root autologin on any VT - .svc limit_* rlimit keys; user= accepts a uid, sets HOME, and an unknown user fails closed instead of running as root - Readiness-lost services restart; non-critical dormant deps don't block spawn; autologin takes its VT back after plymouth - Shutdown logs per-service exit time for slow stoppers; kded6 re-TERMed - expand_args honors quotes when splitting $VAR (systemd parity) - zram: lz4 hot tier + zstd recompression of idle pages, zswap disabled in front of zram; existing rail installs get zram-recompress.svc - schema-dbus bounds its outbound chunk array; schema-udev polls helper output instead of a 20 ms sleep loop - Importer skips intel_lpmd on CPUs it cannot run on * Wed Oct 07 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.9-1 - Services get /dev/null on stdin instead of PID 1's console; PID 1 fills fds 0-2 at start so no socket can land there - schema-ctl only tries ./run/schema-init.sock with SCHEMA_CTL_FALLBACK set - Restart cooldown, socket idle exit and eviction grace use the monotonic clock; stray fds are closed before a service execs - The importer skips StandardInput=tty units with a note - README: socket activation, conditions, env_file/exec_pre, drop-ins and the real shutdown sequence documented * Wed Oct 07 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.8-1 - schema-migrate --deploy imports every unit systemd had enabled (crond, firewalld, tuned, the fstrim/logrotate timers...), as ISO installs do; --uninstall removes them - Docs: schema-dbus is an alternative D-Bus broker, not something taken back from systemd; the IEC 62304 skeleton moves to docs/daedalus/ and is marked aspirational * Tue Oct 06 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.7-1 - Shutdown drops PID 1's copies of socket-activation sockets: a client of a service that is not running gets refused at once instead of hanging - The importer carries TimeoutStopSec= / TimeoutSec= over as stop_timeout_sec=, so imported daemons get systemd's stop time * Tue Oct 06 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.6-1 - Shutdown stops the desktop session before system services (new stop_first= and stop_timeout_sec= service keys). plasmashell hung on exit while CUPS was stopping and was killed at every shutdown; after a first login that left a broken panel - Documented that the first systemd boot after schema-init relabels the disk * Tue Oct 06 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.5-1 - The KDE portal backend no longer aborts at every login: when the session bus starts it before kwin's display exists, it now waits for the display instead of crashing (also under the stock dbus-daemon fallback) * Tue Oct 06 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.4-1 - Upgrades bring the installer's fixes to existing ISO installs: udev is put under supervision live, and the services systemd had enabled are imported once (they start at next boot) * Tue Oct 06 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.3-1 - Installer imports the systemd-enabled units (cron, firewalld, smartd, tuned, timers and the rest) so an ISO install no longer boots without them - Imported Type=dbus services wait for polkitd instead of racing it - Installer supervises udev (udevd.svc): a crashed device manager is respawned instead of leaving /dev frozen until reboot - schema-udev: optical drives get their identity (IDENTIFY PACKET DEVICE), fixing a udisksd crash at boot with a CD/DVD drive present * Mon Oct 05 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.2-1 - Installer ISO is package-managed: installs the schema-init RPMs and the COPR repo; -migrate ships the systemctl shim and importer - Importer: .timer units, EnvironmentFile=, ExecStartPre=, socket activation, Condition*/Assert*, ordering deps, forking daemons with PIDFile= - PID 1: reverse-dependency shutdown, pstore crash records, live /etc/fstab, INVOCATION_ID - Fix: initramfs built with -migrate installed could hang after initrd-cleanup; real systemctl now carried in, broken images repaired once - Fix: fresh installs reported limited connectivity (resolved tmpfiles rule) * Sat Oct 03 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.1-1 - PID 1 upgrades in place: `dnf upgrade` re-execs PID 1 with every service adopted, no reboot; schema-ctl exit codes are meaningful - Idle PID 1: events and deadlines instead of a 250 ms tick; PSI memory triggers drive the survival posture - Services: sd_notify readiness (notify=1), bus-name readiness, per-service watchdog (watchdog_sec), .svc.d drop-ins, Landlock read/write rules, death reasons and opt-in oom_score_adj, a real restart counter - PID 1 hands services umask 022 and a default PATH (Go programs could not find helpers); keeps crashes (schema-coredump); re-applies sysctl.d after switch-root; schema-ctl analyze gives an honest boot total - schema-udev: rule SYMLINK+= links in live mode, coldplug timing log - Installer: no boot splash (plymouth/drm out of the initramfs) with a wait for the real GPU before the desktop; the first-boot wizard survives a shutdown or logout with a dialog open; the Plasma watchdog no longer kills healthy shells (broken first-login panel); the udev seatbelt no longer rolls back a healthy flip during the GPU handover - Migrate: schema-init becomes the default boot entry and stays the default across kernel updates; GRUB_DEFAULT=saved is pinned - RPM: -daemons and opt-in -session subpackages; kernel-install hook shipped * Sun Sep 27 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.4.0-1 - PID 1 replaces its own binary in place (schema-ctl reexec), and an upgrade does it automatically: services keep running, no reboot - schema-ctl exits 1 when PID 1 refuses a command - The migrate wizard and the ISO first-boot wizard offer the schema-dbus switch as a separate, optional last step, with a headless seatbelt that rolls back to dbus-daemon and reboots if the broker does not take - -migrate ships schema-dbus, its launcher and the flip helpers - schema-dbus: stricter message validation and bounded per-peer resources - The udev switch actually takes on a migrated box; both seatbelts wait on boot uptime (not the RTC) and say so on screen while they wait - Migrated boxes keep DNS under schema-init, including after booting the stock entry; Plasma session support and wizard autostart are installed - Every --advanced-* opt-out is acted on; the btrfs pre-change snapshot is recorded, named on the recovery card and removed by --uninstall - systemctl shim passes through to the real systemctl while PID 1 is systemd, and reboot/poweroff/halt reach schema-ctl under schema-init - Service hardening: mount-namespace isolation, per-host default switch (off by default), hardened reference .svc files - exec= with inline arguments is refused by both parsers - login1 stub accepts SetWallMessage - The login1 stub and its session register/unregister helpers ship in the package; an update reloads the running stub in place with SIGHUP - schema-udev and schema-dbus move to a -daemons subpackage, so ISO-installed boxes can keep them current without the -migrate systemctl shim - sysctl.d is re-applied after switch-root (sysctl.svc on installed and migrated boxes), then core_pattern is taken back for schema-coredump - The installer rail's sysprep, sshd and zram start scripts ship in the package, so installed boxes get fixes to them on update - The kernel-install hook ships in the package (/usr/lib/kernel/install.d) and acts only on boxes with /etc/schema-init/boot-default; installing the package backfills entries for kernels already on disk, removing it drops them, and the installer's old /etc copy is retired once - The hook's default fallback after a kernel removal ignores schema-init.conf and schema-good-* entries, which sort above every kernel version - New -session subpackage ships the installer's Plasma autologin session pipeline; nothing requires it, so hand-built sessions are left alone * Fri Sep 25 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.3.1-1 - kernel-install plugin finds the GRUB BLS entries when kernel-install resolves BOOT_ROOT to the ESP, so dnf kernel updates get a schema-init entry again instead of silently staying on the install-time kernel - Installer ships the XDG autostart runner, plasmashell watchdog and session env hooks system-wide, so ~/.config/autostart apps start on installed boxes - Autostart runner no longer waits 20s for an Xwayland cookie Plasma 6 never creates, and logs "no ssh key" instead of a false ssh-add failure - Spec version catches up with the v0.3.0 installer release * Tue Sep 01 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.2.1-1 - Hardware watchdog: PID 1 loads the sp5100_tco module itself and arms /dev/watchdog0, so boxes without an initramfs still get a hardware watchdog - Memory-pressure reclaim: a service's cgroup path and freeze state now survive a schema-ctl reload, so freeze/reclaim keeps working after a reload instead of silently becoming a no-op - cgroup efficiency: io.weight / cpu.idle shielding keeps non-critical services off the critical path - init: gracefully stops container cgroups during the shutdown sweep, applies /etc/hostname at boot, and raises PID 1's own RLIMIT_NOFILE while keeping children off the raised limit - Service hardening: opt-in no_new_privs and a keep_caps bounding set (chronyd hardened as the reference service) - Timers: on_calendar day-of-week and day-of-month; a completed run-once boot timer stays terminal across a reload - schema-ctl: reports a rejected reload instead of answering ok; guards a strncat length against a size_t underflow - args= values are left-trimmed of leading whitespace - Per-service boot-timing cost column, sorted by the critical path - rail: persists service_log lines to rail.log and logs excise/recovery transitions on a start-timeout - logrotate: rotates daily, covers sddm-schema.log, and arms the timer persistently - schema-board: increment 3 -- apply a card to a lit slot * Mon Jul 27 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.1.3-1 - PID 1 resets the child signal mask before every exec, so services no longer inherit a blocked SIGCHLD and can reap their own children - Shutdown no longer blocks PID 1 on a console write, bounds sync, and kills what the cgroup sweep misses; the transcript is persisted - The remount sweep no longer takes / read-only before the log is written - VT switches are mediated with VT_PROCESS, so consoles repaint on a graphical session; IXON is disarmed on the mediated session VT * Fri Jul 24 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.1.2-1 - Ship schema-board, the read-only weight-state board; needs no root - Ship a logrotate config and an example rotation timer - schema-ctl gains --help/--version and reports the real connect error * Fri Jul 24 2026 Jonathan Ayers <44883767+ajax80@users.noreply.github.com> - 0.1.1-1 - Initial RPM package - Adds the AGPL-3.0 license text, which v0.1.0 shipped without