Skip to content

Commit

Permalink
test: prevent rpmbuild from writing to system rpmdb
Browse files Browse the repository at this point in the history
rpmbuild with default dbpath will write to /var/lib/rpm. Set it to the
temporary directory.
  • Loading branch information
pastalian committed Feb 12, 2024
1 parent aad06db commit 256508b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/data/build-rpms-and-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 256508b

Please sign in to comment.