use Dpkg::Vendor::Debian and Dpkg::Vendor::Ubuntu for keyring locations, if they are available
This commit is contained in:
parent
89e7dd6756
commit
3922851636
1 changed files with 30 additions and 6 deletions
36
mmdebstrap
36
mmdebstrap
|
@ -3285,6 +3285,14 @@ sub main() {
|
||||||
my $signedby = '';
|
my $signedby = '';
|
||||||
{
|
{
|
||||||
# try to guess the right keyring path for the given suite
|
# try to guess the right keyring path for the given suite
|
||||||
|
my $debianvendor;
|
||||||
|
my $ubuntuvendor;
|
||||||
|
eval {
|
||||||
|
require Dpkg::Vendor::Debian;
|
||||||
|
require Dpkg::Vendor::Ubuntu;
|
||||||
|
$debianvendor = Dpkg::Vendor::Debian->new();
|
||||||
|
$ubuntuvendor = Dpkg::Vendor::Ubuntu->new();
|
||||||
|
};
|
||||||
my $keyring;
|
my $keyring;
|
||||||
if (
|
if (
|
||||||
any { $_ eq $suite } (
|
any { $_ eq $suite } (
|
||||||
|
@ -3292,8 +3300,14 @@ sub main() {
|
||||||
'lenny', 'squeeze', 'wheezy'
|
'lenny', 'squeeze', 'wheezy'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$keyring
|
if (defined $debianvendor) {
|
||||||
= '/usr/share/keyrings/debian-archive-removed-keys.gpg';
|
$keyring = $debianvendor->run_hook(
|
||||||
|
'archive-keyrings-historic');
|
||||||
|
} else {
|
||||||
|
$keyring
|
||||||
|
= '/usr/share/keyrings/'
|
||||||
|
. 'debian-archive-removed-keys.gpg';
|
||||||
|
}
|
||||||
} elsif (
|
} elsif (
|
||||||
any { $_ eq $suite }
|
any { $_ eq $suite }
|
||||||
('aequorea', 'bartholomea', 'chromodoris', 'dasyatis')
|
('aequorea', 'bartholomea', 'chromodoris', 'dasyatis')
|
||||||
|
@ -3311,16 +3325,26 @@ sub main() {
|
||||||
'cosmic'
|
'cosmic'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$keyring
|
if (defined $ubuntuvendor) {
|
||||||
= '/usr/share/keyrings/ubuntu-archive-keyring.gpg';
|
$keyring = $ubuntuvendor->run_hook('archive-keyrings');
|
||||||
|
} else {
|
||||||
|
$keyring
|
||||||
|
= '/usr/share/keyrings/'
|
||||||
|
. 'ubuntu-archive-keyring.gpg';
|
||||||
|
}
|
||||||
} elsif (
|
} elsif (
|
||||||
any { $_ eq $suite } (
|
any { $_ eq $suite } (
|
||||||
'unstable', 'stable', 'oldstable', 'jessie',
|
'unstable', 'stable', 'oldstable', 'jessie',
|
||||||
'stretch', 'buster', 'bullseye', 'bookworm'
|
'stretch', 'buster', 'bullseye', 'bookworm'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$keyring
|
if (defined $debianvendor) {
|
||||||
= '/usr/share/keyrings/debian-archive-keyring.gpg';
|
$keyring = $debianvendor->run_hook('archive-keyrings');
|
||||||
|
} else {
|
||||||
|
$keyring
|
||||||
|
= '/usr/share/keyrings/'
|
||||||
|
. 'debian-archive-keyring.gpg';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue