diff --git a/.packit.yaml b/.packit.yaml index e2f743057..4ad646476 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 000000000..291607e83 --- /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 164dd6ee8..0c066385a 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 @@ -123,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 @@ -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 @@ -213,6 +214,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 +228,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