1
0
mirror of synced 2026-04-29 13:32:13 +00:00

distributions.conf now supports arbitrary keyring files

Any tag ending in ".gpg" will be considered to be the according
keyring file in /usr/share/keyrings/. This is at least needed for some
Ubuntu releases which were eol'ed in the past few years, especially
because Ubuntu split up their keyrings much more finegrained than just
"archive" and "archive-removed-keys".
This commit is contained in:
Axel Beckert
2019-02-08 17:37:11 +01:00
parent 0d9a7cb12e
commit a8df6e002f
4 changed files with 12 additions and 3 deletions

View File

@@ -1314,9 +1314,13 @@ sub setupDefaultOptions
$CONFIG{ 'mirror_'.$debdist } = $MIRROR{$dist.'_archive'} or
die $dist.'_archive not defined in /etc/xen-tools/mirrors.conf';
my $removed_keys = "/usr/share/keyrings/$dist-archive-removed-keys.gpg";
if ($debdistinfo !~ /default-keyring/ and -s $removed_keys) {
if ($debdistinfo =~ /(\S*\.gpg)($|\s)/ and -s "/usr/share/keyrings/${1}") {
$CONFIG{ 'keyring_'.$debdist } = "/usr/share/keyrings/${1}";
} elsif ($debdistinfo !~ /default-keyring/ and -s $removed_keys) {
$CONFIG{ 'keyring_'.$debdist } = $removed_keys;
}
} elsif ($debdistinfo =~ /(\S*\.gpg)($|\s)/ and -s "/usr/share/keyrings/${1}") {
$CONFIG{ 'keyring_'.$debdist } = "/usr/share/keyrings/${1}";
} else {
$CONFIG{ 'mirror_'.$debdist } = $MIRROR{$dist} or
die $dist.' not defined in /etc/xen-tools/mirrors.conf';