From b41db7f878f36ba56fe3b2b61127b266b20499e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 25 Nov 2020 02:26:01 +0100 Subject: DEB trinity-keyring: Remove the binary package dependency on gnupg. Use the code to remove the old keys the same as debian-archive-keyring. Add package trinity-keyring-udeb, which could be suitable for the installer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resolves bug 3170. Signed-off-by: Slávek Banko (cherry picked from commit 8eb14d96104de9e24fd1d700528f4b9fe2c0c9e9) --- .../metapackages/trinity-keyring/debian/control | 17 +++++++++-- .../metapackages/trinity-keyring/debian/install | 1 - .../metapackages/trinity-keyring/debian/preinst | 29 ------------------ .../debian/trinity-keyring-udeb.install | 1 + .../trinity-keyring/debian/trinity-keyring.install | 1 + .../trinity-keyring/debian/trinity-keyring.preinst | 34 ++++++++++++++++++++++ 6 files changed, 51 insertions(+), 32 deletions(-) delete mode 100644 debian/_base/metapackages/trinity-keyring/debian/install delete mode 100644 debian/_base/metapackages/trinity-keyring/debian/preinst create mode 100644 debian/_base/metapackages/trinity-keyring/debian/trinity-keyring-udeb.install create mode 100644 debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.install create mode 100644 debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.preinst diff --git a/debian/_base/metapackages/trinity-keyring/debian/control b/debian/_base/metapackages/trinity-keyring/debian/control index 85fe9741b..5b1fef513 100644 --- a/debian/_base/metapackages/trinity-keyring/debian/control +++ b/debian/_base/metapackages/trinity-keyring/debian/control @@ -8,7 +8,20 @@ Standards-Version: 3.8.4 Package: trinity-keyring Priority: important Architecture: all -Depends: gnupg (>= 1.0.6-4) -Description: GnuPG key of the Trinity Desktop Environment repository +Multi-Arch: foreign +Depends: ${misc:Depends} +Description: GnuPG keys of the Trinity Desktop Environment repository The Trinity repository digitally signs its Release files. This package contains the repository key used for that. + +Package: trinity-keyring-udeb +Package-Type: udeb +Priority: important +Architecture: all +Section: debian-installer +Depends: ${misc:Depends} +Recommends: gpgv-udeb +Description: GnuPG keys of the Trinity Desktop Environment repository + The Trinity repository digitally signs its Release files. This package + contains the repository key used for that, in a minimal form for use + in the installer. diff --git a/debian/_base/metapackages/trinity-keyring/debian/install b/debian/_base/metapackages/trinity-keyring/debian/install deleted file mode 100644 index b3a5bac5c..000000000 --- a/debian/_base/metapackages/trinity-keyring/debian/install +++ /dev/null @@ -1 +0,0 @@ -keyrings usr/share diff --git a/debian/_base/metapackages/trinity-keyring/debian/preinst b/debian/_base/metapackages/trinity-keyring/debian/preinst deleted file mode 100644 index 53c7d0cbc..000000000 --- a/debian/_base/metapackages/trinity-keyring/debian/preinst +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -# preinst script for trinity-keyring - -set -e - -case "$1" in - install|upgrade) - if [ ! -f /etc/apt/trusted.gpg.d/trinity-keyring.gpg ] && - [ -f /etc/apt/trusted.gpg ]; then - # Remove key F5CFC95C (2014.06.08) from apt keyring - apt-key --keyring /etc/apt/trusted.gpg del F5CFC95C 2> /dev/null || true - - # Remove key 2B8638D0 (2010.06.15) from apt keyring - apt-key --keyring /etc/apt/trusted.gpg del 2B8638D0 2> /dev/null || true - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring-udeb.install b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring-udeb.install new file mode 100644 index 000000000..b3a5bac5c --- /dev/null +++ b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring-udeb.install @@ -0,0 +1 @@ +keyrings usr/share diff --git a/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.install b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.install new file mode 100644 index 000000000..b3a5bac5c --- /dev/null +++ b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.install @@ -0,0 +1 @@ +keyrings usr/share diff --git a/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.preinst b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.preinst new file mode 100644 index 000000000..ba8d428b1 --- /dev/null +++ b/debian/_base/metapackages/trinity-keyring/debian/trinity-keyring.preinst @@ -0,0 +1,34 @@ +#! /bin/sh +# preinst script for trinity-keyring + +set -e + +case "$1" in + install|upgrade) + # remove keys from the trusted.gpg file as they are now shipped in fragment files in trusted.gpg.d + if dpkg --compare-versions "$2" 'lt' "2012.1" && which gpg > /dev/null && which apt-key > /dev/null; then + TRUSTEDFILE='/etc/apt/trusted.gpg' + eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) + eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) + if [ -e "$TRUSTEDFILE" ]; then + # Key F5CFC95C - 2014.06.08 + # Key 2B8638D0 - 2010.06.15 + for KEY in F5CFC95C 2B8638D0; do + apt-key --keyring "$TRUSTEDFILE" del $KEY > /dev/null 2>&1 || : + done + fi + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 -- cgit v1.2.1