From 256508bf15cfdac4e0d0fa3f1d86584dcc016c30 Mon Sep 17 00:00:00 2001 From: Takuya Wakazono Date: Mon, 12 Feb 2024 16:54:12 +0900 Subject: [PATCH] test: prevent rpmbuild from writing to system rpmdb rpmbuild with default dbpath will write to /var/lib/rpm. Set it to the temporary directory. --- test/data/build-rpms-and-repos.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/data/build-rpms-and-repos.sh b/test/data/build-rpms-and-repos.sh index 0406c2a9c..f46178840 100755 --- a/test/data/build-rpms-and-repos.sh +++ b/test/data/build-rpms-and-repos.sh @@ -32,12 +32,14 @@ function build_rpms() { # Note: _build_name_fmt requires escaped %% for use in headerSprintf() rpmbuild -ba \ + --dbpath "${RPMBUILD_TOPDIR}" \ --define="_topdir ${RPMBUILD_TOPDIR}" \ --define="_srcrpmdir ${TARGET_DIR}" \ --define="_rpmdir ${TARGET_DIR}" \ --define="_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \ --define="_source_payload w1.gzdio" \ --define="_binary_payload w1.gzdio" \ + --nodeps \ "${SPEC}" rm -rf "${RPMBUILD_TOPDIR}"