Skip to content
Open

rpmlint #2608

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions contrib/packaging/bootc.rpmlintrc
Original file line number Diff line number Diff line change
@@ -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")
13 changes: 8 additions & 5 deletions contrib/packaging/bootc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading