From 9851edc1113f32dcb1d3b0a47b5b4289b43ba9d3 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 28 Aug 2024 09:31:28 -0400 Subject: [PATCH] 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 --- mmdebstrap | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index aeebebb..53e901f 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -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";