Merge branch 'silence-konflux' into 'main'

minimal: Add tmpfiles entries for Konflux injected content

See merge request fedora/bootc/base-images!574
This commit is contained in:
John Eckersberg 2026-06-02 09:09:53 -04:00
commit f689944b3f
2 changed files with 26 additions and 0 deletions

View file

@ -6,5 +6,13 @@ postprocess:
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=771713
d /var/lib/rpm-state 0755 - - -
EOF
cat > /usr/lib/tmpfiles.d/konflux-buildinfo-contentsets.conf <<'EOF'
# Workaround for https://github.com/konflux-ci/build-tasks-dockerfiles/pull/243
d /var/roothome/buildinfo 0755 - - -
d /var/roothome/buildinfo/content_manifests 0755 - - -
# Note we don't actually try to recreate the content; this just makes the linter ignore it
f /var/roothome/buildinfo/content_manifests/content-sets.json 0644 - - -
f /var/roothome/buildinfo/labels.json 0644 - - -
EOF
# Workaround for https://issues.redhat.com/browse/RHEL-106203
rm -f /usr/lib/tmpfiles.d/home.conf

View file

@ -0,0 +1,18 @@
#!/bin/bash
set -xeuo pipefail
# Verify our custom tmpfiles.d configs by actually running systemd-tmpfiles
# against a temporary root and checking the expected paths are created.
# Workaround for https://github.com/konflux-ci/build-tasks-dockerfiles/pull/243
tmproot=$(mktemp -d)
trap 'rm -rf "${tmproot}"' EXIT
systemd-tmpfiles --create --root="${tmproot}" \
/usr/lib/tmpfiles.d/bootc-base-rpmstate.conf \
/usr/lib/tmpfiles.d/konflux-buildinfo-contentsets.conf
test -d "${tmproot}/var/lib/rpm-state"
test -d "${tmproot}/var/roothome/buildinfo"
test -d "${tmproot}/var/roothome/buildinfo/content_manifests"
test -f "${tmproot}/var/roothome/buildinfo/content_manifests/content-sets.json"
test -f "${tmproot}/var/roothome/buildinfo/labels.json"