debian-keyring/Makefile
Gunnar Wolf a9833e1136
Use pgp instead of gpg when referring to keyrings and pathnames (Closes: #1101418). Thanks to Guillem for the work put into this!
These keyrings and pathnames contain OpenPGP certificates, and are
not vendor specific, so naming them with an extension after GnuPG in
detriment to the other multiple OpenPGP implementations does not
promote the interoperability one would expect from that ecosystem.

Given that these files are API, and will have external references,
we add backwards compatibility symlinks for now for the .deb package
but hardlinks for now for the infrastructure (to not entangle these
changes), but which should be considered deprecated and should eventually
(in the future) be obsoleted and removed.
2025-04-25 13:15:36 -06:00

56 lines
1.6 KiB
Makefile

OUTPUT_MEMBER_KEYRINGS := \
output/keyrings/debian-keyring.pgp \
output/keyrings/debian-nonupload.pgp \
output/keyrings/debian-role-keys.pgp \
# EOL
OUTPUT_KEYRINGS := \
$(OUTPUT_MEMBER_KEYRINGS) \
output/keyrings/debian-maintainers.pgp \
output/keyrings/emeritus-keyring.pgp \
# EOL
OUTPUT_COMPAT_KEYRINGS := \
$(patsubst %.pgp,%.gpg,$(OUTPUT_KEYRINGS)) \
# EOL
OUTPUT_FILES := \
$(OUTPUT_KEYRINGS) \
$(OUTPUT_COMPAT_KEYRINGS) \
output/sha512sums.txt \
output/README \
output/changelog \
# EOL
all: $(OUTPUT_FILES)
output/keyrings/%.pgp: %-pgp %-pgp/0x*
cat $*-pgp/0x* > $@
# FIXME: To have a smooth transition, for now we hardlink the keyrings, so
# that we do not entangle the Debian infrastructure updates that would need
# to cope with the symlinks, from the Debian packaging updates for the
# archive. Once the infra is updated we can switch from the first command
# to the second commented command.
output/keyrings/%.gpg: output/keyrings/%.pgp
ln -f $< $@
# ln -sf $(<F) $@
output/sha512sums.txt: $(OUTPUT_KEYRINGS)
cd output; sha512sum keyrings/* > sha512sums.txt
output/README: README
cp README output/
output/changelog: debian/changelog
cp debian/changelog output/
output/openpgpkey: $(OUTPUT_MEMBER_KEYRINGS)
cd output && ../scripts/update-keyrings build-wkd debian.org keyrings/debian-keyring.pgp keyrings/debian-nonupload.pgp keyrings/debian-role-keys.pgp
test: all
./runtests
clean:
rm -f output/keyrings/*.pgp output/keyrings/*.gpg output/sha512sums.txt output/README output/changelog output/keyrings/*~
rm -rf gpghome output/openpgpkey