[X2Go-Commits] [x2go-keyring] 16/47: Makefile: replace with jetring-based top-level Makefile from debian-archive-keyring package.

git-admin at x2go.org git-admin at x2go.org
Sun Aug 4 16:28:15 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2go-keyring.

commit 75aa1b1142b03845a704e4f5d18e0d95773bde52
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun Aug 4 13:22:14 2019 +0200

    Makefile: replace with jetring-based top-level Makefile from debian-archive-keyring package.
    
    Changes:
      - Renamed files. Added test target.
      - "team-members" renamed to x2go-maintainers.
      - Added x2go-maintainers-removed-keys.
      - Both files get installed as well.
---
 Makefile         | 91 ++++++++++++++++++++++++++++++++++++++++++++++----------
 debian/changelog |  4 +++
 2 files changed, 80 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 8c585e7..38029b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,25 +1,86 @@
-all: output/keyrings/x2go-maintainers.gpg output/keyrings/x2go-keyring.gpg output/sha512sums.txt output/README output/changelog debian/prerm
+TRUSTED-LIST := $(patsubst active-keys/add-%,trusted.gpg/x2go-archive-%.gpg,$(wildcard active-keys/add-*))
+TMPRING := trusted.gpg/build-area
 
-output/keyrings/x2go-maintainers.gpg: x2go-maintainers-gpg/0x*
-	cat x2go-maintainers-gpg/0x* > output/keyrings/x2go-maintainers.gpg
+GPG_OPTIONS := --no-options --no-default-keyring --no-auto-check-trustdb --trustdb-name ./trustdb.gpg
 
-output/keyrings/x2go-keyring.gpg: x2go-keyring-gpg/0x*
-	cat x2go-keyring-gpg/0x* > output/keyrings/x2go-keyring.gpg
+build: verify-indices keyrings/x2go-archive-keyring.gpg keyrings/x2go-archive-removed-keys.gpg verify-results $(TRUSTED-LIST)
 
-output/sha512sums.txt: output/keyrings/x2go-maintainers.gpg
-	cd output; sha512sum keyrings/* > sha512sums.txt
+verify-indices: keyrings/x2go-maintainers-keyring.gpg keyrings/x2go-maintainers-removed-keys.gpg
+	gpg ${GPG_OPTIONS} \
+		--keyring keyrings/x2go-maintainers-keyring.gpg \
+		--verify active-keys/index.gpg active-keys/index
+	gpg ${GPG_OPTIONS} \
+		--keyring keyrings/x2go-maintainers-keyring.gpg \
+		--verify removed-keys/index.gpg removed-keys/index
 
-output/README: README
-	cp README output/
+verify-results: keyrings/x2go-maintainers-keyring.gpg keyrings/x2go-maintainers-removed-keys.gpg keyrings/x2go-archive-keyring.gpg keyrings/x2go-archive-removed-keys.gpg
+	gpg ${GPG_OPTIONS} \
+		--keyring keyrings/x2go-maintainers-keyring.gpg --verify \
+		keyrings/x2go-archive-keyring.gpg.asc \
+		keyrings/x2go-archive-keyring.gpg
+	gpg ${GPG_OPTIONS} \
+		--keyring keyrings/x2go-maintainers-keyring.gpg --verify \
+		keyrings/x2go-archive-removed-keys.gpg.asc \
+		keyrings/x2go-archive-removed-keys.gpg
+	#FIXME: Do we need to verify the created keyrings in trusted.gpg.d, too?
+	#	Maybe "just" checking that no key is added if we merge, but how…
 
-output/changelog: debian/changelog
-	cp debian/changelog output/
+keyrings/x2go-archive-keyring.gpg: active-keys/index
+	jetring-build -I $@ active-keys
+	gpg ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp
+	mv -f $@.tmp $@
 
-debian/prerm: debian/prerm.template
-	scripts/create-prerm-script
+keyrings/x2go-archive-removed-keys.gpg: removed-keys/index
+	jetring-build -I $@ removed-keys
+	gpg ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp
+	mv -f $@.tmp $@
+
+keyrings/x2go-maintainers-keyring.gpg: x2go-maintainers/index
+	jetring-build -I $@ x2go-maintainers
+	gpg ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp
+	mv -f $@.tmp $@
+
+keyrings/x2go-maintainers-removed-keys.gpg: x2go-maintainers-removed-keys/index
+	jetring-build -I $@ x2go-maintainers-removed-keys
+	gpg ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp
+	mv -f $@.tmp $@
+
+$(TRUSTED-LIST) :: trusted.gpg/x2go-archive-%.gpg : active-keys/add-% active-keys/index
+	mkdir -p $(TMPRING) trusted.gpg
+	grep -F $(shell basename $<) -- active-keys/index > $(TMPRING)/index
+	cp $< $(TMPRING)
+	jetring-build -I $@ $(TMPRING)
+	rm -rf $(TMPRING)
+	gpg ${GPG_OPTIONS} --no-keyring --import-options import-export --import < $@ > $@.tmp
+	mv -f $@.tmp $@
+
+clean:
+	rm -f keyrings/x2go-archive-keyring.gpg \
+		keyrings/x2go-archive-keyring.gpg~ \
+		keyrings/x2go-archive-keyring.gpg.lastchangeset
+	rm -f keyrings/x2go-archive-removed-keys.gpg \
+		keyrings/x2go-archive-removed-keys.gpg~ \
+		keyrings/x2go-archive-removed-keys.gpg.lastchangeset
+	rm -f keyrings/x2go-maintainers-keyring.gpg \
+		keyrings/x2go-maintainers-keyring.gpg~ \
+		keyrings/x2go-maintainers-keyring.gpg.lastchangeset
+	rm -f keyrings/x2go-maintainers-removed-keys.gpg \
+		keyrings/x2go-maintainers-removed-keys.gpg~ \
+		keyrings/x2go-maintainers-removed-keys.gpg.lastchangeset
+	rm -rf $(TMPRING) trusted.gpg trustdb.gpg
+	rm -f keyrings/*.cache
+
+install: build
+	install -d $(DESTDIR)/usr/share/keyrings/
+	cp trusted.gpg/x2go-archive-*.gpg $(DESTDIR)/usr/share/keyrings/
+	cp keyrings/x2go-archive-keyring.gpg $(DESTDIR)/usr/share/keyrings/
+	cp keyrings/x2go-archive-removed-keys.gpg $(DESTDIR)/usr/share/keyrings/
+	cp keyrings/x2go-maintainers-keyring.gpg $(DESTDIR)/usr/share/keyrings/
+	cp keyrings/x2go-maintainers-removed-keys.gpg $(DESTDIR)/usr/share/keyrings/
+	install -d $(DESTDIR)/etc/apt/trusted.gpg.d/
+	cp $(shell find trusted.gpg/ -name '*.gpg' -type f) $(DESTDIR)/etc/apt/trusted.gpg.d/
 
 test:
 	./runtests
 
-clean:
-	rm -f output/keyrings/*.gpg output/sha512sums.txt output/README output/changelog debian/prerm output/keyrings/*~
+.PHONY: verify-indices verify-results clean build install test
diff --git a/debian/changelog b/debian/changelog
index be21198..712fe55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,10 @@ x2go-keyring (2014.07.09) UNRELEASED; urgency=medium
   * runtests: switch to bash.
   * runtests: rework counters and exit status.
   * runtests: rework quoting and shellcheck warnings.
+  * Makefile: replace with jetring-based top-level Makefile from
+    debian-archive-keyring package. Changes: Renamed files. Added test target.
+    "team-members" renamed to x2go-maintainers. Added
+    x2go-maintainers-removed-keys. Both files get installed as well.
   * 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


More information about the x2go-commits mailing list