Appending signing macros is tricky as the user running the build isn't usually the one running this script. Output instructions instead.

This commit is contained in:
Dave Page 2020-03-31 17:03:48 +01:00
parent f0d077fed8
commit e576a886d0

View File

@ -31,12 +31,11 @@ else
fi fi
# Setup RPM macros for signing # Setup RPM macros for signing
read -p "Do you want to append RPM macros for signing packages to ~/.rpmmacros (y/n)? " RESPONSE echo "Please add the following macros to ~/.rpmmacros for the user that will "
case ${RESPONSE} in echo "sign the RPMs if required:"
y|Y ) echo
cat << EOF >> ~$USER/.rpmmacros echo << EOF
# Macros for signing RPMs. # Macros for signing RPMs.
# Added by the pgAdmin 4 build environment setup script at the users request.
%_signature gpg %_signature gpg
%_gpg_path ~/.gnupg %_gpg_path ~/.gnupg
@ -44,11 +43,8 @@ case ${RESPONSE} in
%_gpgbin /usr/bin/gpg2 %_gpgbin /usr/bin/gpg2
%__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}' %__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}'
EOF EOF
echo "RPM macros for signing appended to ~$USER/.rpmmacros." echo
;;
* )
exit 1;;
esac