Skip to content

Commit 6bd1d72

Browse files
committed
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 <dev@eckersberg.com>
1 parent bb39ea9 commit 6bd1d72

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎.packit.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ jobs:
128128
trigger: release
129129
dist_git_branches:
130130
- fedora-all
131+
files_to_sync:
132+
- src: contrib/packaging/bootc.spec
133+
dest: bootc.spec
134+
- src: contrib/packaging/bootc.rpmlintrc
135+
dest: bootc.rpmlintrc
136+
- .packit.yaml
131137

132138
- job: koji_build
133139
trigger: commit

‎contrib/packaging/bootc.rpmlintrc‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# "Bootable" is a legitimate term here
2+
addFilter(r"spelling-error .*Bootable")
3+
4+
# These point into /sysroot, which only exists on a booted bootc system
5+
addFilter(r"dangling-relative-symlink /usr/lib/bootc/storage ")
6+
addFilter(r"dangling-relative-symlink /usr/share/doc/bootc/baseimage/base/ostree ")
7+
8+
# A made up provides so that rpm-ostree can depend on it
9+
addFilter(r"unversioned-explicit-provides ostree-cli\(ostree-container\)")
10+
11+
# Placeholder to preserve an otherwise empty directory,
12+
# see https://github.com/coreos/rpm-ostree/issues/5420
13+
addFilter(r"hidden-file-or-dir /usr/share/doc/bootc/baseimage/base/sysroot/\.keepdir")

‎contrib/packaging/bootc.spec‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ cat vendor-config.toml >> .cargo/config.toml
124124
rm vendor-config.toml
125125
%else
126126
# Container build: source already at _builddir (/src), nothing to extract
127-
# RPM's %mkbuilddir creates a subdirectory; symlink it back to the source.
128-
# F45+ RPM also creates rpmbuild.env in the subdir that %build will source,
127+
# RPM's %%mkbuilddir creates a subdirectory; symlink it back to the source.
128+
# F45+ RPM also creates rpmbuild.env in the subdir that %%build will source,
129129
# so preserve it before replacing the directory with a symlink.
130130
cd ..
131131
if [ -f %{name}-%{version}-build/rpmbuild.env ]; then

0 commit comments

Comments
 (0)