Add support for elxr

eLxr is a debian derative based on Debian 12. We use
mmdebstrap to bootstrap our edge images. This patch
allows users to use the correct mirror, and right
suite when bootstrapping eLxr.

Signed-off-by: Charles Short <charles.short@windriver.com>
This commit is contained in:
Charles Short 2024-08-28 09:31:28 -04:00
parent 98b3c7f2cd
commit 9851edc111

View file

@ -4087,6 +4087,7 @@ sub get_suite_by_vendor {
'ubuntu' => {},
'tanglu' => {},
'kali' => {},
'elxr' => {},
);
# pre-fill with some known values
@ -4108,6 +4109,9 @@ sub get_suite_by_vendor {
foreach my $suite ('kali-dev', 'kali-rolling', 'kali-bleeding-edge') {
$suite_by_vendor{'kali'}->{$suite} = 0;
}
foreach my $suite ('aria') {
$suite_by_vendor{'elxr'}->{$suite} = 0;
}
foreach
my $suite ('trusty', 'xenial', 'zesty', 'artful', 'bionic', 'cosmic') {
$suite_by_vendor{'ubuntu'}->{$suite} = 0;
@ -4156,6 +4160,9 @@ sub get_suite_by_vendor {
} elsif ($target eq "kali"
and not exists $suite_by_vendor{'kali'}->{$suite}) {
$suite_by_vendor{'kali'}->{$suite} = 0;
} elsif ($target eq "elxr"
and not exists $suite_by_vendor{'elxr'}->{$suite}) {
$suite_by_vendor{'elxr'}->{$suite} = 0;
}
}
closedir($dh);
@ -4210,6 +4217,8 @@ sub get_keyring_by_suite {
return '/usr/share/keyrings/tanglu-archive-keyring.gpg';
} elsif ($vendor eq 'kali') {
return '/usr/share/keyrings/kali-archive-keyring.gpg';
} elsif ($vendor eq 'elxr') {
return '/usr/share/keyrings/elxr-archive-keyring.gpg';
} else {
error "unknown vendor: $vendor";
}
@ -4242,6 +4251,7 @@ sub get_sourceslist_by_suite {
my @ubuntustable = keys %{ $suite_by_vendor->{'ubuntu'} };
my @tanglustable = keys %{ $suite_by_vendor->{'tanglu'} };
my @kali = keys %{ $suite_by_vendor->{'kali'} };
my @elxr = keys %{ $suite_by_vendor->{'elxr'} };
my $mirror = 'http://deb.debian.org/debian';
my $secmirror = 'http://security.debian.org/debian-security';
@ -4279,6 +4289,8 @@ sub get_sourceslist_by_suite {
$mirror = 'http://archive.tanglu.org/tanglu';
} elsif (any { $_ eq $suite } @kali) {
$mirror = 'https://http.kali.org/kali';
} elsif (any { $_ eq $suite } @elxr) {
$mirror = 'https://mirror.elxr.dev';
}
my $sourceslist = '';
$sourceslist .= "deb$signedby $mirror $suite $compstr\n";