Skip to content

Commit

Permalink
Migrate "personal" config in tests to new-style XDG config dir
Browse files Browse the repository at this point in the history
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 rpm-software-management#3521.

Fixes: rpm-software-management#3521
  • Loading branch information
pmatilai committed Jan 16, 2025
1 parent a54e29f commit dc4a8ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tests/mktree.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion tests/rpmi.at
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/rpmsigdig.at
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dc4a8ad

Please sign in to comment.