debian-bootc-base-images/tests/rootfs/cases/rpmdb
Colin Walters e89565789c Use rpmdb-normalize, add rootfs tests
I just saw the sqlite-shm corruption in
https://gitlab.com/redhat/centos-stream/containers/bootc/-/merge_requests/437#note_2372766792
so let's just go ahead and turn on rpmdb_normalize which
also aids the reproducibility of the rpmdb.

While we're here let's also add a long overdue "unit test" for
the rootfs. This operates as a container build that mounts
the container-under-test as part of a multi-stage build.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-28 09:14:45 -05:00

7 lines
151 B
Bash
Executable file

#!/bin/bash
set -xeuo pipefail
for d in usr/share/rpm usr/lib/sysimage/rpm; do
if test -d "$d"; then
test '!' -f "$d/rpmdb.sqlite-shm"
fi
done