diff --git a/tests/Dockerfile.fedora b/tests/Dockerfile.fedora index d325c60493..def449db83 100644 --- a/tests/Dockerfile.fedora +++ b/tests/Dockerfile.fedora @@ -61,8 +61,6 @@ RUN rm -f /usr/lib/rpm/macros.d/macros.transaction_ima RUN dnf -y --enablerepo=updates install "sequoia-sq >= 1.0" RUN dnf clean all -RUN echo "%_dbpath $(rpm --eval '%_dbpath')" > /root/.rpmmacros - # Workaround for pkgconf(1)'s unlisted dependency on rpm. # This is needed for cmake to work without an rpm installation. RUN ln -sf $(rpm --eval '%{_target_platform}%{?_gnu}')-pkg-config \ diff --git a/tests/mktree.common b/tests/mktree.common index 6c00a95b19..c1bcd4d2ae 100644 --- a/tests/mktree.common +++ b/tests/mktree.common @@ -24,6 +24,12 @@ make_install() mkdir -p $DESTDIR/build ln -sf ../data/SOURCES $DESTDIR/build/ + # setup an empty db that all tests are pointed to by default + dbpath="/var/lib/rpm-testsuite" + mkdir -p $DESTDIR/$dbpath + echo "%_dbpath $dbpath" > $DESTDIR/@CMAKE_INSTALL_FULL_SYSCONFDIR@/rpm/macros.db + rpmdb --dbpath $DESTDIR/$dbpath --initdb + # append in case Dockerfile put something in there already cat @CMAKE_CURRENT_SOURCE_DIR@/data/macros.testenv >> $DESTDIR/root/.rpmmacros # gpg-connect-agent is very, very unhappy if this doesn't exist