This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2go-keyring. commit 88ecbb066fb52cf0f0ca698f541c79c264c2c7b0 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 17 11:14:31 2019 +0200 Makefile: manually try to clean up keyrings via --export | --import if the filtering command that uses newer GnuPG 2 syntax fails. --- Makefile | 40 +++++++++++++++++++++++++++++++++++----- debian/changelog | 2 ++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e14ee9f..5bae230 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,13 @@ keyrings/x2go-archive-keyring.gpg: active-keys/index ${GPG} ${GPG_OPTIONS} --keyring $@ --fingerprint; \ else \ jetring-build -I $@ active-keys; \ - ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + { \ + ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + } || \ + { \ + $$(: "The command above should only fail if GnuPG 2 is too old."); \ + ${GPG} ${GPG_OPTIONS} --keyring $@ --export | ${GPG} ${GPG_OPTIONS} --keyring $@.tmp --import; \ + }; \ mv -f $@.tmp $@; \ fi @@ -40,7 +46,13 @@ keyrings/x2go-archive-removed-keys.gpg: removed-keys/index ${GPG} ${GPG_OPTIONS} --keyring $@ --fingerprint; \ else \ jetring-build -I $@ removed-keys; \ - ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + { \ + ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + } || \ + { \ + $$(: "The command above should only fail if GnuPG 2 is too old."); \ + ${GPG} ${GPG_OPTIONS} --keyring $@ --export | ${GPG} ${GPG_OPTIONS} --keyring $@.tmp --import; \ + }; \ mv -f $@.tmp $@; \ fi @@ -49,7 +61,13 @@ keyrings/x2go-maintainers-keyring.gpg: x2go-maintainers/index ${GPG} ${GPG_OPTIONS} --keyring $@ --fingerprint; \ else \ jetring-build -I $@ x2go-maintainers; \ - ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + { \ + ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + } || \ + { \ + $$(: "The command above should only fail if GnuPG 2 is too old."); \ + ${GPG} ${GPG_OPTIONS} --keyring $@ --export | ${GPG} ${GPG_OPTIONS} --keyring $@.tmp --import; \ + }; \ mv -f $@.tmp $@; \ fi @@ -58,7 +76,13 @@ keyrings/x2go-maintainers-removed-keys.gpg: x2go-maintainers-removed-keys/index ${GPG} ${GPG_OPTIONS} --keyring $@ --fingerprint; \ else \ jetring-build -I $@ x2go-maintainers-removed-keys; \ - ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + { \ + ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + } || \ + { \ + $$(: "The command above should only fail if GnuPG 2 is too old."); \ + ${GPG} ${GPG_OPTIONS} --keyring $@ --export | ${GPG} ${GPG_OPTIONS} --keyring $@.tmp --import; \ + }; \ mv -f $@.tmp $@; \ fi @@ -68,7 +92,13 @@ $(TRUSTED-LIST) :: trusted.gpg/x2go-archive-%.gpg : active-keys/add-% active-key cp $< $(TMPRING) jetring-build -I $@ $(TMPRING) rm -rf $(TMPRING) - ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp + { \ + ${GPG} ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp; \ + } || \ + { \ + $$(: "The command above should only fail if GnuPG 2 is too old."); \ + ${GPG} ${GPG_OPTIONS} --keyring $@ --export | ${GPG} ${GPG_OPTIONS} --keyring $@.tmp --import; \ + } mv -f $@.tmp $@ clean: diff --git a/debian/changelog b/debian/changelog index a554c23..7e89794 100644 --- a/debian/changelog +++ b/debian/changelog @@ -65,6 +65,8 @@ x2go-keyring (2019.08.04) UNRELEASED; urgency=medium * keyrings/: refresh signature. * Makefile: make gpg binary pseudo-selectable via a variable, defaulting to "gpg2". + * Makefile: manually try to clean up keyrings via --export | --import if the + filtering command that uses newer GnuPG 2 syntax fails. * debian/control: - Change maintainer to the mailing list. - Add the old package maintainer to the Uploaders field and myself. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2go-keyring.git