Name: txnupd-rootfs Version: 0.1.0 Release: 1%{?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: gawk BuildRequires: rsync BuildRequires: systemd BuildRequires: util-linux # The tool is a bash script Requires: bash Requires: btrfs-progs Requires: coreutils Requires: /usr/bin/awk 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 %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, - a systemd drop-in that remounts the /etc bind mount read-write after boot. 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 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 # nothing to build %install install -D -p -m 0755 sbin/txnupd-rootfs-setup \ %{buildroot}%{_sbindir}/txnupd-rootfs-setup install -D -p -m 0644 systemd/systemd-remount-fs.service.d/txnupd-rootfs.conf \ %{buildroot}%{_unitdir}/systemd-remount-fs.service.d/txnupd-rootfs.conf 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 %dir %{_unitdir}/systemd-remount-fs.service.d %{_unitdir}/systemd-remount-fs.service.d/txnupd-rootfs.conf %{_mandir}/man8/txnupd-rootfs-setup.8* %files -n dracut-volatile-overlay %license COPYING %{_prefix}/lib/dracut/modules.d/99volatile-overlay/ %changelog * Tue Oct 13 2026 Shawn W Dunn - 0.1.0-1 - Initial package