From 05062fed9f3789b6a8d1841d192410d8a3d6d14d Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Fri, 30 Oct 2026 17:15:09 -0400 Subject: [PATCH 1/3] packaging: Ship system-reinstall-bootc man page in its subpackage The %{_mandir}/man*/*bootc* glob in the main bootc package also matched system-reinstall-bootc.8, so the man page ended up in the wrong package. Exclude it from bootc and list it under system-reinstall-bootc instead. This also resolves the rpmlint no-manual-page-for-binary and no-documentation warnings for system-reinstall-bootc. Assisted-by: AI Signed-off-by: John Eckersberg --- contrib/packaging/bootc.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/packaging/bootc.spec b/contrib/packaging/bootc.spec index 164dd6ee87..42692c1082 100644 --- a/contrib/packaging/bootc.spec +++ b/contrib/packaging/bootc.spec @@ -213,6 +213,7 @@ fi %endif %{_unitdir}/* %{_mandir}/man*/*bootc* +%exclude %{_mandir}/man8/system-reinstall-bootc.8* %if 0%{?rhel} && 0%{?rhel} <= 9 %{_datadir}/bash-completion/completions/bootc %{_datadir}/zsh/site-functions/_bootc @@ -226,6 +227,7 @@ fi %files -n system-reinstall-bootc %{_bindir}/system-reinstall-bootc %{system_reinstall_bootc_install_podman_path} +%{_mandir}/man8/system-reinstall-bootc.8* %if %{with tests} %files tests From bb39ea949304603e3cc9fbb2355c119b002e3267 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Fri, 30 Oct 2026 17:15:16 -0400 Subject: [PATCH 2/3] packaging: Fix rpmlint errors - Silence stderr from the rustc version probe, which otherwise produces a specfile-error when rustc isn't installed (as in the Fedora CI rpmlint environment). - Wrap the system-reinstall-bootc description to avoid description-line-too-long. - Write explanatory text into the sysroot .keepdir placeholder rather than creating an empty file, which rpmlint flags as zero-length. Closes: https://github.com/bootc-dev/bootc/issues/2401 Assisted-by: AI Signed-off-by: John Eckersberg --- contrib/packaging/bootc.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/packaging/bootc.spec b/contrib/packaging/bootc.spec index 42692c1082..6b3964f947 100644 --- a/contrib/packaging/bootc.spec +++ b/contrib/packaging/bootc.spec @@ -20,7 +20,7 @@ %bcond_with rhel9 %endif -%global rust_minor %(rustc --version | cut -f2 -d" " | cut -f2 -d".") +%global rust_minor %(rustc --version 2>/dev/null | cut -f2 -d" " | cut -f2 -d".") # https://github.com/bootc-dev/bootc/issues/1640 %if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?rust_minor} >= 89 @@ -95,7 +95,8 @@ Recommends: podman # The reinstall subpackage intentionally does not require bootc, as it pulls in many unnecessary dependencies %description -n system-reinstall-bootc -This package provides a utility to simplify reinstalling the current system to a given bootc image. +This package provides a utility to simplify reinstalling the current system +to a given bootc image. %if %{with tests} %package tests @@ -181,7 +182,7 @@ EOF chmod +x %{?buildroot}/%{system_reinstall_bootc_install_podman_path} # generate doc file list excluding directories; workaround for # https://github.com/coreos/rpm-ostree/issues/5420 -touch %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir +echo "Placeholder to preserve this directory, see https://github.com/coreos/rpm-ostree/issues/5420" > %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir find %{?buildroot}/%{_docdir} ! -type d -printf '%{_docdir}/%%P\n' | sort > bootcdoclist.txt rm -f %{buildroot}/%{_datadir}/elvish/lib/bootc.elv From 6bd1d720e8a8f399841c71a289d820bd5fad2d63 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Fri, 30 Oct 2026 17:15:41 -0400 Subject: [PATCH 3/3] packaging: Address rpmlint warnings Escape macros in spec comments to avoid macro-in-comment, and add an rpmlintrc filtering warnings that are expected for this package: - "Bootable" flagged as a spelling error - symlinks into /sysroot, which only exists on a booted system - the made-up unversioned ostree-cli(ostree-container) provides - the hidden .keepdir placeholder Fedora CI picks up bootc.rpmlintrc from the root of dist-git, so sync it there via files_to_sync in the propose_downstream job. The spec and .packit.yaml are listed too, since setting files_to_sync replaces Packit's default list. Assisted-by: AI Signed-off-by: John Eckersberg --- .packit.yaml | 6 ++++++ contrib/packaging/bootc.rpmlintrc | 13 +++++++++++++ contrib/packaging/bootc.spec | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 contrib/packaging/bootc.rpmlintrc diff --git a/.packit.yaml b/.packit.yaml index e2f7430571..4ad646476f 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -128,6 +128,12 @@ jobs: trigger: release dist_git_branches: - fedora-all + files_to_sync: + - src: contrib/packaging/bootc.spec + dest: bootc.spec + - src: contrib/packaging/bootc.rpmlintrc + dest: bootc.rpmlintrc + - .packit.yaml - job: koji_build trigger: commit diff --git a/contrib/packaging/bootc.rpmlintrc b/contrib/packaging/bootc.rpmlintrc new file mode 100644 index 0000000000..291607e833 --- /dev/null +++ b/contrib/packaging/bootc.rpmlintrc @@ -0,0 +1,13 @@ +# "Bootable" is a legitimate term here +addFilter(r"spelling-error .*Bootable") + +# These point into /sysroot, which only exists on a booted bootc system +addFilter(r"dangling-relative-symlink /usr/lib/bootc/storage ") +addFilter(r"dangling-relative-symlink /usr/share/doc/bootc/baseimage/base/ostree ") + +# A made up provides so that rpm-ostree can depend on it +addFilter(r"unversioned-explicit-provides ostree-cli\(ostree-container\)") + +# Placeholder to preserve an otherwise empty directory, +# see https://github.com/coreos/rpm-ostree/issues/5420 +addFilter(r"hidden-file-or-dir /usr/share/doc/bootc/baseimage/base/sysroot/\.keepdir") diff --git a/contrib/packaging/bootc.spec b/contrib/packaging/bootc.spec index 6b3964f947..0c066385aa 100644 --- a/contrib/packaging/bootc.spec +++ b/contrib/packaging/bootc.spec @@ -124,8 +124,8 @@ cat vendor-config.toml >> .cargo/config.toml rm vendor-config.toml %else # Container build: source already at _builddir (/src), nothing to extract -# RPM's %mkbuilddir creates a subdirectory; symlink it back to the source. -# F45+ RPM also creates rpmbuild.env in the subdir that %build will source, +# RPM's %%mkbuilddir creates a subdirectory; symlink it back to the source. +# F45+ RPM also creates rpmbuild.env in the subdir that %%build will source, # so preserve it before replacing the directory with a symlink. cd .. if [ -f %{name}-%{version}-build/rpmbuild.env ]; then