# COPR-only build of bootvine. # # This spec is not intended for Fedora proper. It vendors all Rust crates from # Cargo.lock into a second source tarball, so the package does not need the six # crate packages that are missing from Fedora nor the seven crate updates that # would otherwise have to land first. The trade-off is that the bundled copies # of the dependencies are not tracked by Fedora, do not get security updates # from the distribution, and cannot be rebuilt by relinking against system # libraries. See ~/fgit/bootvine-proper for the Fedora-proper spec # (bootvine.spec), the dependency specs, and the review order. # # One licensing caveat remains: utf8-cstr 0.1.6 (pulled in through systemd) # declares "Apache-2.0 OR MIT" but ships no license text files. Its license is # represented in the License tag below, but no copy of those texts is installed # with this package. Existing Fedora packages have the same problem; this is # one of the quality compromises accepted for the COPR build. %bcond_without check # Built from a commit on the packaging maintainer's fork rather than from an # upstream release tag. %%forgemeta turns this into Source0 and the unpack # directory; %%forgeversion appends the snapshot suffix to Version, so this # builds as 0.1.3^20261111gite52af08. Bump %%{commit} and %%{date} (the commit # date, to keep the version deterministic) and re-fetch the sources to follow a # different revision; see README.md. %global forgeurl https://codeberg.org/michich/bootvine %global commit e52af086662c887f04917171ec2571864ef0554d %global date 20261111 %global version0 0.1.3 %forgemeta Name: bootvine Version: %{forgeversion} Release: %autorelease Summary: Live dependency tree of systemd jobs on the boot console # bootvine is GPL-3.0-or-later. The License tag also covers the crates that # are statically linked into the binary. Output of %%cargo_license_summary: # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # GPL-3.0-or-later # LGPL-2.1-or-later WITH GCC-exception-2.0 # MIT # MIT OR Apache-2.0 # Unlicense # Unlicense OR MIT # Zlib # LICENSE.dependencies contains the complete breakdown. License: %{shrink: GPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) AND MIT AND Unlicense AND Zlib } URL: %{forgeurl} Source0: %{forgesource} # Generated from the source tarball with ./generate-vendor.sh, which runs: # cargo vendor-filterer --versioned-dirs \ # --platform=x86_64-unknown-linux-gnu \ # --exclude-crate-path='*#tests' vendor # tar -I 'xz -T0 -6' -cf ../bootvine-%%{version}-vendor.tar.xz vendor # The full workspace lock file is vendored, including crates that are only # needed by the scripted-demos and xtask members that %%prep removes again. # Non-Linux crates are replaced with empty stubs by cargo-vendor-filterer. Source1: %{name}-%{version}-vendor.tar.xz # Manifest of the crates bundled in Source1, generated by ./generate-vendor.sh. # It is installed as a license file so the bundled code is documented. Source2: cargo-vendor.txt # Static build requirements instead of %%cargo_generate_buildrequires: the # generated requirements would name crate packages that do not exist in Fedora. # Everything from Cargo.lock is provided by the vendor tarball. BuildRequires: cargo-rpm-macros BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libsystemd) BuildRequires: systemd-rpm-macros %description bootvine replaces the scrolling kernel and systemd lines of a boot with a live dependency tree of the units still pending and, in the room the tree leaves, a timeline of the slowest jobs that ran. It shows the journal lines behind a failed unit, follows shutdowns, and answers passphrase prompts such as a LUKS unlock in place. It runs as a systemd service on a virtual terminal. The bootvine-dracut package adds it to a dracut initramfs, so the boot from the initramfs is shown as well. %package dracut Summary: Dracut module that adds bootvine to the initramfs BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: dracut %description dracut Dracut module that installs bootvine and its unit files into the initramfs, so bootvine shows the boot from the initramfs as well as stage 2. %prep %forgesetup # The vendor tarball has a top-level "vendor/" directory. tar -xJf %{SOURCE1} # Only the bootvine crate is packaged. The workspace also contains the # scripted-demos and the xtask helper, which are development tools. sed -i 's/^members = .*/members = ["bootvine"]/' Cargo.toml # Cargo.lock still lists the removed members, but Cargo prunes it offline while # resolving against the vendor directory, so no network access is needed. %cargo_prep -v vendor %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies cp %{SOURCE2} . %install install -Dpm 0755 target/rpm/%{name} %{buildroot}%{_bindir}/%{name} install -Dpm 0644 bootvine/system-files/systemd/bootvine.service \ %{buildroot}%{_unitdir}/bootvine.service install -Dpm 0644 bootvine/system-files/systemd/bootvine-release.service \ %{buildroot}%{_unitdir}/bootvine-release.service install -Dpm 0644 bootvine/system-files/systemd/bootvine-shutdown.service \ %{buildroot}%{_unitdir}/bootvine-shutdown.service install -Dpm 0644 \ bootvine/system-files/systemd/systemd-hibernate-resume.service.d/bootvine.conf \ %{buildroot}%{_unitdir}/systemd-hibernate-resume.service.d/bootvine.conf install -Dpm 0755 bootvine/system-files/dracut/90bootvine/module-setup.sh \ %{buildroot}%{_prefix}/lib/dracut/modules.d/90bootvine/module-setup.sh mkdir -p %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d echo 'add_dracutmodules+=" bootvine "' \ > %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/90-bootvine.conf %check %cargo_test %post %systemd_post bootvine.service bootvine-release.service bootvine-shutdown.service %preun %systemd_preun bootvine.service bootvine-release.service bootvine-shutdown.service %postun %systemd_postun bootvine.service bootvine-release.service bootvine-shutdown.service %files %license LICENSE LICENSE.dependencies cargo-vendor.txt %doc README.md CHANGELOG.md docs %{_bindir}/bootvine %{_unitdir}/bootvine.service %{_unitdir}/bootvine-release.service %{_unitdir}/bootvine-shutdown.service %dir %{_unitdir}/systemd-hibernate-resume.service.d %{_unitdir}/systemd-hibernate-resume.service.d/bootvine.conf %files dracut %doc README.md %{_prefix}/lib/dracut/modules.d/90bootvine/ %{_prefix}/lib/dracut/dracut.conf.d/90-bootvine.conf %changelog %autochangelog