Skip to content

Commit c0ff2d2

Browse files
committed
publish: the audit grades the rpmdb with the image's own rpm - the runner's apt rpm is 4.18 and its dbpath is the pre-4.20 /root/.rpmdb, so the freeworld guard's query failed against a Fedora 44 image and set -e + pipefail exited the audit wordlessly (2026-10-10's red publish, log ending at the last build-path ok, no FAIL line). A query that cannot run now says so by name with its stderr kept, and the audit step's swallowed apt lines are gone - a gate that fails red must fail with a name.
1 parent ba2c37a commit c0ff2d2

2 files changed

Lines changed: 36 additions & 22 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ jobs:
152152
# Before the registry, never after. A published image cannot be
153153
# unpublished from anybody who already pulled it.
154154
- name: audit for personal information
155-
run: |
156-
# The freeworld guard queries the image's rpmdb by EVR, and the
157-
# runner ships no rpm. Uninstalled here, the guard's answer
158-
# would be "no mesa in the rpmdb" -- a false red on every
159-
# publish, which is how a gate that cries wolf stops being read.
160-
sudo apt-get update >/dev/null 2>&1
161-
sudo apt-get install -y --no-install-recommends rpm >/dev/null 2>&1
162-
./scripts/publish-audit.sh "${{ steps.ref.outputs.local }}"
155+
# No rpm to install: the freeworld guard grades the rpmdb with
156+
# the image's own rpm (podman run --entrypoint), because the
157+
# runner's apt rpm is 4.18 and cannot read a Fedora 44 database
158+
# (its dbpath predates the sysimage move). The apt lines this
159+
# replaces also swallowed their own output, so when the query
160+
# failed the audit died wordlessly -- a gate that fails red must
161+
# fail with a name.
162+
run: ./scripts/publish-audit.sh "${{ steps.ref.outputs.local }}"
163163

164164
# Pinned to the cosign 2.6 line, not the installer's default: v4 of
165165
# this action installs cosign v3, and cosign v3 changed where

‎scripts/publish-audit.sh‎

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,36 @@ fi
156156
# together and is self-consistent at the old EVR -- so this check is a
157157
# floor, not the whole guard; the validation laps on a GPU-less runner
158158
# are what catches the rest, which is the promotion gate's job.
159-
mesa_all=$(rpm --root="$mnt" -qa --qf '%{NAME} %{EVR} %{SOURCERPM}\n' 2>/dev/null \
160-
| awk '$3 ~ /^mesa-[0-9]/ {print $1, $2}')
161-
if [ -z "$mesa_all" ]; then
162-
bad "no mesa-sourced packages in the rpmdb" \
163-
"the freeworld guard cannot grade an image that does not ship them"
159+
#
160+
# The query runs the IMAGE's own rpm, not the build runner's: the
161+
# runner's apt rpm is 4.18, and 4.18's dbpath is the pre-4.20
162+
# /root/.rpmdb, so against a Fedora 44 image it answers "cannot open
163+
# Packages database" -- and under set -e + pipefail that failure exited
164+
# this audit wordlessly (2026-10-10's publish went red with a log that
165+
# ends at the last build-path ok). A query that cannot run says so by
166+
# name, which is also why its stderr is kept.
167+
mesa_raw=""
168+
if ! mesa_raw=$(podman run --rm --entrypoint /usr/bin/rpm "$image" -qa \
169+
--qf '%{NAME} %{EVR} %{SOURCERPM}\n' 2>&1); then
170+
bad "the image's own rpm could not read its rpmdb" \
171+
"$(head -n1 <<< "$mesa_raw")"
164172
else
165-
evrs=$(awk '{print $2}' <<< "$mesa_all" | sort -u | sort -V)
166-
if [ "$(wc -l <<< "$evrs")" -eq 1 ]; then
167-
ok "mesa stack and freeworld build at one EVR ($(head -n1 <<< "$evrs"))"
173+
mesa_all=$(awk '$3 ~ /^mesa-[0-9]/ {print $1, $2}' <<< "$mesa_raw")
174+
if [ -z "$mesa_all" ]; then
175+
bad "no mesa-sourced packages in the rpmdb" \
176+
"the freeworld guard cannot grade an image that does not ship them"
168177
else
169-
newest=$(tail -n1 <<< "$evrs")
170-
while read -r pkg evr; do
171-
[ -n "$pkg" ] || continue
172-
bad "$pkg $evr is older than the freeworld build's $newest" \
173-
"the freeworld resolution dragged mesa down (issue #36); wait for rpmfusion to catch up and compose again"
174-
done <<< "$(awk -v newest="$newest" '$2 != newest {print $1, $2}' <<< "$mesa_all")"
178+
evrs=$(awk '{print $2}' <<< "$mesa_all" | sort -u | sort -V)
179+
if [ "$(wc -l <<< "$evrs")" -eq 1 ]; then
180+
ok "mesa stack and freeworld build at one EVR ($(head -n1 <<< "$evrs"))"
181+
else
182+
newest=$(tail -n1 <<< "$evrs")
183+
while read -r pkg evr; do
184+
[ -n "$pkg" ] || continue
185+
bad "$pkg $evr is older than the freeworld build's $newest" \
186+
"the freeworld resolution dragged mesa down (issue #36); wait for rpmfusion to catch up and compose again"
187+
done <<< "$(awk -v newest="$newest" '$2 != newest {print $1, $2}' <<< "$mesa_all")"
188+
fi
175189
fi
176190
fi
177191

0 commit comments

Comments
 (0)