From dc4a8ad078d75057f67cc3b2f71d6c48999d4129 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 16 Jan 2025 13:28:27 +0200 Subject: [PATCH] Migrate "personal" config in tests to new-style XDG config dir Signing key configuration is obviously something that belongs to the user's macros, but lets get on with the times and use the new XDG config directory for that. The remaining references to ~/.rpmmacros in rpmmacro.at are related to testing behavior with the old-style configuration and need to be preserved. This is the fourth and final step to #3521. Fixes: #3521 --- tests/mktree.common | 3 +++ tests/rpmi.at | 2 +- tests/rpmsigdig.at | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/mktree.common b/tests/mktree.common index 403da9242d..4583c57a9d 100644 --- a/tests/mktree.common +++ b/tests/mktree.common @@ -29,4 +29,7 @@ make_install() # gpg-connect-agent is very, very unhappy if this doesn't exist mkdir -p $DESTDIR/root/.gnupg chmod 700 $DESTDIR/root/.gnupg + + # set up new-style XDG config directory + mkdir -p $DESTDIR/root/.config/rpm } diff --git a/tests/rpmi.at b/tests/rpmi.at index 8898301bb3..c9771ae9b2 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -904,7 +904,7 @@ for e in 1 2; do runroot_other cp /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm /tmp/epoch${e}.rpm done # for testing sanity -echo '%_query_all_fmt %%{nevra}' >> ${HOME}/.rpmmacros +echo '%_query_all_fmt %%{nevra}' >> ${HOME}/.config/rpm/macros RPMTEST_CHECK([ RPMDB_INIT diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at index 24873becc1..60840482ed 100644 --- a/tests/rpmsigdig.at +++ b/tests/rpmsigdig.at @@ -1398,7 +1398,7 @@ AT_SKIP_IF([test x$PGP = xdummy]) RPMDB_INIT RPMTEST_CHECK([ -cat << EOF >> ${HOME}/.rpmmacros +cat << EOF >> ${HOME}/.config/rpm/macros %_openpgp_sign sq %_openpgp_sign_id 771B18D3D7BAA28734333C424344591E1964C5FC EOF @@ -1458,7 +1458,7 @@ AT_SKIP_IF([test x$PGP = xdummy]) RPMDB_INIT RPMTEST_CHECK([ -cat << EOF >> ${HOME}/.rpmmacros +cat << EOF >> ${HOME}/.config/rpm/macros %_openpgp_sign sq %_openpgp_sign_id 771B18D3D7BAA28734333C424344591E1964C5FC EOF @@ -1568,7 +1568,7 @@ AT_SKIP_IF([test x$PGP = xdummy]) RPMDB_INIT RPMTEST_CHECK([ -cat << EOF >> ${HOME}/.rpmmacros +cat << EOF >> ${HOME}/.config/rpm/macros %_openpgp_sign sq %_openpgp_sign_id 771B18D3D7BAA28734333C424344591E1964C5FC EOF