Name: txnupd-rootfs Version: 0.1.0 Release: 9%{?dist} Summary: Read-only root file system support for transactional updates License: GPL-2.0-or-later # TODO: set URL and Source0 once the project has a public home URL: https://example.invalid/txnupd-rootfs Source0: %{name}-%{version}.tar.gz BuildArch: noarch # For %%check BuildRequires: bash BuildRequires: btrfs-progs BuildRequires: coreutils BuildRequires: python3 BuildRequires: rsync BuildRequires: scdoc BuildRequires: systemd BuildRequires: util-linux # The tool is a Python script (standard library only) Requires: python3 Requires: btrfs-progs Requires: coreutils Requires: rsync Requires: systemd Requires: util-linux # /etc subvolumes are managed by the snapper plugin of tukit, which pulls in # tukit and snapper Requires: tukit-snapper-plugin Recommends: libdnf5-plugin-txnupd # grub2-editenv, to set up the GRUB environment block on btrfs Recommends: grub2-tools-minimal %description Support files for running Fedora with a read-only root file system and transactional updates (tukit, libdnf5-plugin-txnupd) on btrfs. This package contains - txnupd-rootfs-setup, which prepares the btrfs root file system of a NEW installation: it turns /etc into a nested subvolume and adjusts fstab. Installing this package does not change the system. The root file system is only converted when an installer or an image build runs txnupd-rootfs-setup against a target that is not the running system; converting an installed, running system is deliberately not supported. %package -n dracut-volatile-overlay Summary: Dracut module to mount tmpfs overlays on /etc and /var # Taken from the openSUSE read-only-root-fs package, whose files carry no # per-file notice and whose COPYING is the plain GPL, version 2: "or later" is # not granted there, so it is not claimed here either. License: GPL-2.0-only Requires: dracut %description -n dracut-volatile-overlay A dracut module that mounts an overlay file system on /etc and on /var, with the upper layer in a tmpfs, so that a system with a read-only root file system boots with writable, non-persistent /etc and /var. To have more persistent locations, such as /root or /home, add further fstab entries. The module is never included in an initramfs by default. Request it explicitly, for example with add_dracutmodules+=" volatile-overlay " in a file in /etc/dracut.conf.d/. %prep %autosetup %build scdoc < man/txnupd-rootfs-setup.8.scd > man/txnupd-rootfs-setup.8 %install install -D -p -m 0755 sbin/txnupd-rootfs-setup \ %{buildroot}%{_sbindir}/txnupd-rootfs-setup install -D -p -m 0644 man/txnupd-rootfs-setup.8 \ %{buildroot}%{_mandir}/man8/txnupd-rootfs-setup.8 mkdir -p %{buildroot}%{_prefix}/lib/dracut/modules.d cp -a dracut/99volatile-overlay %{buildroot}%{_prefix}/lib/dracut/modules.d/ chmod 0755 %{buildroot}%{_prefix}/lib/dracut/modules.d/99volatile-overlay/*.sh %check bash tests/test-fstab.sh # creates real subvolumes, so it is skipped when the build directory is not on # btrfs (as in mock) WORKDIR=%{_builddir} bash tests/test-setup.sh %files %license COPYING %{_sbindir}/txnupd-rootfs-setup %{_mandir}/man8/txnupd-rootfs-setup.8* %files -n dracut-volatile-overlay %license COPYING %{_prefix}/lib/dracut/modules.d/99volatile-overlay/ %changelog * Wed Oct 14 2026 Shawn W Dunn - 0.1.0-9 - Rewrite txnupd-rootfs-setup in Python (standard library only); same options, messages and behaviour. No longer needs awk * Wed Oct 14 2026 Shawn W Dunn - 0.1.0-8 - Write the manual page in scdoc and build it with scdoc * Wed Oct 14 2026 Shawn W Dunn - 0.1.0-7 - Add SPDX license identifiers to the sources - Declare dracut-volatile-overlay as GPL-2.0-only, as its files come from openSUSE's read-only-root-fs, which does not grant "or later" * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-6 - Drop x-systemd.growfs from the read-only / entry when another, writable, mount of the same btrfs has it: systemd-growfs-root.service fails with EROFS on every boot otherwise * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-5 - Pass /boot/grub2/grubenv, not //boot/grub2/grubenv, to grub2-editenv when the target is /: it only sets up the external environment block for exactly that path, so 0.1.0-4 did nothing in an image build * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-4 - Add the env_block entry to grubenv on btrfs, so that GRUB can save its environment (boot_success, next_entry) instead of failing with "sparse file not allowed" on every boot * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-3 - Enable create-dirs-from-rpmdb.service through a preset file, so that the first boot preset-all does not disable it again * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-2 - Write the /etc bind mount with an explicit "rw" and upgrade old-style entries; /etc is then writable from the start, so first boot preset-all no longer fails on a read-only /etc - Drop the systemd-remount-fs drop-in, which is no longer needed * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-1 - Initial package