summaryrefslogtreecommitdiffstats
path: root/t/no-dupes.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:25:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:25:47 +0000
commit4ed1a6e1d4fcb1ba272a4fb3931b33d1c6fbee0d (patch)
tree26048107dbe7d72d60d9339d90f5cfe678937863 /t/no-dupes.t
parentInitial commit. (diff)
downloaddebian-keyring-upstream/2023.12.24.tar.xz
debian-keyring-upstream/2023.12.24.zip
Adding upstream version 2023.12.24.upstream/2023.12.24
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xt/no-dupes.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/no-dupes.t b/t/no-dupes.t
new file mode 100755
index 0000000..5f2b6a6
--- /dev/null
+++ b/t/no-dupes.t
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Looks for keys that are duplicated in a keyring
+set -e
+
+find_dupes () {
+ k=$1
+ for key in $(gpg --no-options --no-auto-check-trustdb \
+ --no-default-keyring --keyring "./output/keyrings/$k" \
+ --list-keys --with-colons | grep '^pub' \
+ | cut -d: -f 5 | sort | uniq -c | sort -n \
+ | grep -v ' 1 ' | sed -e 's/^ .* //'); do
+ echo -e "$k:\t0x$key is duplicated"
+ fail=1
+ done
+}
+
+fail=0
+for keyring in debian-keyring.gpg debian-maintainers.gpg \
+ debian-nonupload.gpg; do
+ find_dupes $keyring
+done
+
+exit $fail