Skip to content

Commit b7e8a8e

Browse files
committed
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: #2401 Assisted-by: AI Signed-off-by: John Eckersberg <dev@eckersberg.com>
1 parent 30ca1fd commit b7e8a8e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎contrib/packaging/bootc.spec‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
%bcond_with rhel9
2121
%endif
2222

23-
%global rust_minor %(rustc --version | cut -f2 -d" " | cut -f2 -d".")
23+
%global rust_minor %(rustc --version 2>/dev/null | cut -f2 -d" " | cut -f2 -d".")
2424

2525
# https://github.com/bootc-dev/bootc/issues/1640
2626
%if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?rust_minor} >= 89
@@ -95,7 +95,8 @@ Recommends: podman
9595
# The reinstall subpackage intentionally does not require bootc, as it pulls in many unnecessary dependencies
9696

9797
%description -n system-reinstall-bootc
98-
This package provides a utility to simplify reinstalling the current system to a given bootc image.
98+
This package provides a utility to simplify reinstalling the current system
99+
to a given bootc image.
99100

100101
%if %{with tests}
101102
%package tests
@@ -181,7 +182,7 @@ EOF
181182
chmod +x %{?buildroot}/%{system_reinstall_bootc_install_podman_path}
182183
# generate doc file list excluding directories; workaround for
183184
# https://github.com/coreos/rpm-ostree/issues/5420
184-
touch %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir
185+
echo "Placeholder to preserve this directory, see https://github.com/coreos/rpm-ostree/issues/5420" > %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir
185186
find %{?buildroot}/%{_docdir} ! -type d -printf '%{_docdir}/%%P\n' | sort > bootcdoclist.txt
186187

187188
rm -f %{buildroot}/%{_datadir}/elvish/lib/bootc.elv

0 commit comments

Comments
 (0)