Skip to content

Instantly share code, notes, and snippets.

@hnakamur hnakamur/.rpmmacros
Last active Nov 13, 2018

Embed
What would you like to do?
rpm sign
# The original settings confirmed by running: rpm --showrc
# -14: __gpg %{_bindir}/gpg2
# -14: __gpg_check_password_cmd %{__gpg}
# gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
#
# -14: __gpg_sign_cmd %{__gpg}
# gpg --batch --no-verbose --no-armor --passphrase-fd 3
# %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}}
# --no-secmem-warning
# -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
%_gpg_name hnakamur@gmail.com
%__gpg_check_password_cmd /bin/true
%__gpg_sign_cmd %{__gpg} \
gpg --batch --no-verbose --no-armor \
--passphrase-file /home/admin/rpmsign-work/passphrase \
%{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} \
--no-secmem-warning \
-u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
@hnakamur

This comment has been minimized.

Copy link
Owner Author

commented Mar 11, 2017

  • Modify _gpg_name and the filename for --passphrase-file for your environments
  • Use the fowllowing command to sign a rpm
cat /dev/null | setsid rpmsign --resign /path/to/your-rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.