diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | cmdline/apt-key.in (renamed from cmdline/apt-key) | 10 | ||||
-rw-r--r-- | cmdline/makefile | 8 | ||||
-rw-r--r-- | vendor/debian/apt-vendor.ent | 2 | ||||
-rwxr-xr-x | vendor/getinfo | 2 | ||||
-rw-r--r-- | vendor/ubuntu/apt-vendor.ent | 2 |
6 files changed, 19 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index 76b24f9c5..321b15471 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ /debian/apt-transport-https/ # generated from *.in files +/cmdline/apt-key /doc/apt-vendor.ent /doc/examples/sources.list /debian/libapt-pkg*.install diff --git a/cmdline/apt-key b/cmdline/apt-key.in index 64cf5a6f4..779872b4c 100755..100644 --- a/cmdline/apt-key +++ b/cmdline/apt-key.in @@ -25,13 +25,13 @@ GPG_CMD="$GPG_CMD --no-auto-check-trustdb --trust-model always" GPG="$GPG_CMD" -MASTER_KEYRING='' +MASTER_KEYRING='&keyring-master-filename;' eval $(apt-config shell MASTER_KEYRING APT::Key::MasterKeyring) -ARCHIVE_KEYRING='/usr/share/keyrings/debian-archive-keyring.gpg' +ARCHIVE_KEYRING='&keyring-filename;' eval $(apt-config shell ARCHIVE_KEYRING APT::Key::ArchiveKeyring) -REMOVED_KEYS='/usr/share/keyrings/debian-archive-removed-keys.gpg' +REMOVED_KEYS='&keyring-removed-filename;' eval $(apt-config shell REMOVED_KEYS APT::Key::RemovedKeys) -ARCHIVE_KEYRING_URI='' +ARCHIVE_KEYRING_URI='&keyring-uri;' eval $(apt-config shell ARCHIVE_KEYRING_URI APT::Key::ArchiveKeyringURI) TMP_KEYRING=/var/lib/apt/keyrings/maybe-import-keyring.gpg @@ -142,7 +142,7 @@ net_update() { update() { if [ ! -f $ARCHIVE_KEYRING ]; then echo >&2 "ERROR: Can't find the archive-keyring" - echo >&2 "Is the debian-archive-keyring package installed?" + echo >&2 "Is the &keyring-package; package installed?" exit 1 fi requires_root diff --git a/cmdline/makefile b/cmdline/makefile index e77ad5669..06f170b6a 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -41,6 +41,14 @@ SOURCE = apt-cdrom.cc include $(PROGRAM_H) # The apt-key program +apt-key: apt-key.in + sed -e "s#&keyring-filename;#$(shell ../vendor/getinfo keyring-filename)#" \ + -e "s#&keyring-removed-filename;#$(shell ../vendor/getinfo keyring-removed-filename)#" \ + -e "s#&keyring-master-filename;#$(shell ../vendor/getinfo keyring-master-filename)#" \ + -e "s#&keyring-uri;#$(shell ../vendor/getinfo keyring-uri)#" \ + -e "s#&keyring-package;#$(shell ../vendor/getinfo keyring-package)#" $< > $@ + chmod 755 $@ + SOURCE=apt-key TO=$(BIN) TARGET=program diff --git a/vendor/debian/apt-vendor.ent b/vendor/debian/apt-vendor.ent index 56775bbaa..6cda5995c 100644 --- a/vendor/debian/apt-vendor.ent +++ b/vendor/debian/apt-vendor.ent @@ -3,3 +3,5 @@ <!ENTITY keyring-package "<package>debian-archive-keyring</package>"> <!ENTITY keyring-filename "<filename>/usr/share/keyrings/debian-archive-keyring.gpg</filename>"> <!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/debian-archive-removed-keys.gpg</filename>"> +<!ENTITY keyring-master-filename ""> +<!ENTITY keyring-uri ""> diff --git a/vendor/getinfo b/vendor/getinfo index df5a44e5c..ac816e10e 100755 --- a/vendor/getinfo +++ b/vendor/getinfo @@ -26,7 +26,7 @@ debian-stable-codename) ubuntu-codename) getrawfield 'stable-codename' "${BASEDIR}/../doc/apt-verbatim.ent" ;; -keyring-package) +keyring-package|keyring-filename|keyring-master-filename|keyring-removed-filename|keyring-uri) getfield "$1" ;; *) diff --git a/vendor/ubuntu/apt-vendor.ent b/vendor/ubuntu/apt-vendor.ent index fd5e5a7cf..caa532699 100644 --- a/vendor/ubuntu/apt-vendor.ent +++ b/vendor/ubuntu/apt-vendor.ent @@ -3,3 +3,5 @@ <!ENTITY keyring-package "<package>ubuntu-keyring</package>"> <!ENTITY keyring-filename "<filename>/usr/share/keyrings/ubuntu-archive-keyring.gpg</filename>"> <!ENTITY keyring-removed-filename "<filename>/usr/share/keyrings/ubuntu-archive-removed-keys.gpg</filename>"> +<!ENTITY keyring-master-filename "/usr/share/keyrings/ubuntu-master-keyring.gpg"> +<!ENTITY keyring-uri "http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg"> |