From 7c8302be1c7b23264bf0b473910717f2b6e412e2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 16 Jan 2025 12:33:20 +0200 Subject: [PATCH] Move test-suite build config out of root's ~/.rpmmacros The second step to fixing #3521 --- tests/data/macros.testenv | 2 +- tests/mktree.common | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/data/macros.testenv b/tests/data/macros.testenv index 6720bea775..d0eebb2705 100644 --- a/tests/data/macros.testenv +++ b/tests/data/macros.testenv @@ -1,4 +1,4 @@ -# root's macro config in the test-environment +# common macro config in the test-environment %_buildhost testhost %_topdir %{getenv:RPMTEST}/build %_tmppath %{getenv:RPMTEST}/tmp diff --git a/tests/mktree.common b/tests/mktree.common index c1bcd4d2ae..e3ac29978e 100644 --- a/tests/mktree.common +++ b/tests/mktree.common @@ -30,8 +30,9 @@ make_install() 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 + # system-wide config to match our test environment + cp @CMAKE_CURRENT_SOURCE_DIR@/data/macros.testenv $DESTDIR/@CMAKE_INSTALL_FULL_SYSCONFDIR@/rpm/ + # gpg-connect-agent is very, very unhappy if this doesn't exist mkdir -p $DESTDIR/root/.gnupg chmod 700 $DESTDIR/root/.gnupg