summaryrefslogtreecommitdiff
path: root/debian/preinst
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2016-03-03 17:57:46 +0100
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2016-03-04 11:16:15 +0100
commitb72649b4cac635e91a1ea2028c36f4688808894c (patch)
treedaf42b0d3f382570e9d4272cecec6c9883027db9 /debian/preinst
parent30002f1d2d3cd45af6026b58e027b2ac2ec8aa6f (diff)
overhaul/simplify keyring package
Diffstat (limited to 'debian/preinst')
-rwxr-xr-xdebian/preinst21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/preinst b/debian/preinst
new file mode 100755
index 0000000..7524ff8
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+# cleanup keys from the old /etc/apt/trusted.gpg, because it was not
+# properly cleaned up by previous versions of leap-keyring.
+
+# we could try to limit this cleanup to just upgrade moving from
+# versions before 2016.03.03, but due to the package rename and the
+# possibility of someone having purged the old package before
+# installing this new one, it's better to do it unconditionally.
+
+# another way of looking at this is that the installation of this
+# package will ensure that the keys in question don't show up in two
+# keyrings at once.
+
+if [ -e /etc/apt/trusted.gpg ] && which gpg >/dev/null; then
+ # remove the version of the keys that were shipped in leap-keyring before version 2016.03.03:
+ gpg --batch --no-tty --no-default-keyring --keyring /etc/apt/trusted.gpg --delete-key 0x1E453B2CE87BEE2F7DFE99661E34A1828E207901 || true
+ gpg --batch --no-tty --no-default-keyring --keyring /etc/apt/trusted.gpg --delete-key 0xCE433F407BAB443AFEA196C1837C1AD5367429D9 || true
+fi
+
+#DEBHELPER#