Browse Source

DEB trinity-keyring: Key is installed as file into /etc/apt/trusted.gpg.d

instead of adding into apt keyring

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 8b0882da7e)
tags/r14.0.5
Slávek Banko 9 months ago
parent
commit
11a46d9043

+ 0
- 31
ubuntu/maverick/metapackages/trinity-keyring/debian/postinst View File

@@ -1,31 +0,0 @@
1
-#!/bin/sh
2
-# postinst script for trinity-keyring
3
-
4
-set -e
5
-
6
-case "$1" in
7
-    configure)
8
-      if [ -x /usr/bin/apt-key ]; then
9
-        # Key F5CFC95C (2014.06.08)
10
-        apt-key add /usr/share/keyrings/trinity-keyring.gpg > /dev/null
11
-
12
-        # Key 2B8638D0 (2010.06.15)
13
-        apt-key del 2B8638D0 2> /dev/null || true
14
-      fi
15
-    ;;
16
-
17
-    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
18
-    ;;
19
-
20
-    *)
21
-        echo "postinst called with unknown argument \`$1'" >&2
22
-        exit 1
23
-    ;;
24
-esac
25
-
26
-# dh_installdeb will replace this with shell code automatically
27
-# generated by other debhelper scripts.
28
-
29
-#DEBHELPER#
30
-
31
-exit 0

+ 29
- 0
ubuntu/maverick/metapackages/trinity-keyring/debian/preinst View File

@@ -0,0 +1,29 @@
1
+#! /bin/sh
2
+# preinst script for trinity-keyring
3
+
4
+set -e
5
+
6
+case "$1" in
7
+    install|upgrade)
8
+        if [ ! -f /etc/apt/trusted.gpg.d/trinity-keyring.gpg ] &&
9
+           [ -f /etc/apt/trusted.gpg ]; then
10
+            # Remove key F5CFC95C (2014.06.08) from apt keyring
11
+            apt-key --keyring /etc/apt/trusted.gpg del F5CFC95C 2> /dev/null || true
12
+
13
+            # Remove key 2B8638D0 (2010.06.15) from apt keyring
14
+            apt-key --keyring /etc/apt/trusted.gpg del 2B8638D0 2> /dev/null || true
15
+        fi
16
+    ;;
17
+
18
+    abort-upgrade)
19
+    ;;
20
+
21
+    *)
22
+        echo "preinst called with unknown argument \`$1'" >&2
23
+        exit 1
24
+    ;;
25
+esac
26
+
27
+#DEBHELPER#
28
+
29
+exit 0

+ 0
- 28
ubuntu/maverick/metapackages/trinity-keyring/debian/prerm View File

@@ -1,28 +0,0 @@
1
-#!/bin/sh
2
-# prerm script for trinity-keyring
3
-
4
-set -e
5
-
6
-case "$1" in
7
-    remove)
8
-      if [ -x /usr/bin/apt-key ]; then
9
-        # Key F5CFC95C (2014.06.08)
10
-        apt-key del F5CFC95C 2> /dev/null || true
11
-      fi
12
-    ;;
13
-
14
-    upgrade|failed-upgrade|deconfigure)
15
-    ;;
16
-
17
-    *)
18
-        echo "postinst called with unknown argument \`$1'" >&2
19
-        exit 1
20
-    ;;
21
-esac
22
-
23
-# dh_installdeb will replace this with shell code automatically
24
-# generated by other debhelper scripts.
25
-
26
-#DEBHELPER#
27
-
28
-exit 0

+ 5
- 0
ubuntu/maverick/metapackages/trinity-keyring/debian/rules View File

@@ -26,3 +26,8 @@ clean::
26 26
 
27 27
 binary-install/trinity-keyring::
28 28
 	dh_testdir
29
+	mkdir -p debian/$(cdbs_curpkg)/etc/apt/trusted.gpg.d
30
+	gpg --output debian/$(cdbs_curpkg)/etc/apt/trusted.gpg.d/$(cdbs_curpkg).gpg \
31
+	    --dearmor keyrings/$(cdbs_curpkg).gpg
32
+	touch -r keyrings/$(cdbs_curpkg).gpg \
33
+	    debian/$(cdbs_curpkg)/etc/apt/trusted.gpg.d/$(cdbs_curpkg).gpg

Loading…
Cancel
Save