# origin: debian
my $supported_suites = {
'bullseye' => {
- ostype => "debian-11.0",
+ ostype => "debian-11",
},
'buster' => {
ostype => "debian-10",
'ascii' => {
ostype => "devuan-2.0",
},
+ 'beowulf' => {
+ ostype => "devuan-3.0",
+ },
+ 'chimaera' => {
+ ostype => "devuan-4.0",
+ },
# UBUNTU
'hardy' => {
ostype => "ubuntu-20.04",
origin => 'ubuntu',
},
+ 'groovy' => {
+ ostype => "ubuntu-20.10",
+ origin => 'ubuntu',
+ },
+ 'hirsute' => {
+ ostype => "ubuntu-21.04",
+ origin => 'ubuntu',
+ },
};
sub get_suite_info {
if ($suite eq 'vivid' || $suite eq 'wily' || $suite eq 'xenial' ||
$suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful' ||
$suite eq 'bionic' || $suite eq 'cosmic' || $suite eq 'disco' ||
- $suite eq 'eoan' || $suite eq 'focal') {
+ $suite eq 'eoan' || $suite eq 'focal' || $suite eq 'groovy'
+ || $suite eq 'hirsute'
+ ) {
push @$incl, 'isc-dhcp-client';
push @$excl, qw(libmodule-build-perl);
} elsif ($suite eq 'trusty') {
$self->logmsg ("creating final appliance archive\n");
my $target = "$self->{targetname}.tar";
- my $final_archive = "${target}.gz";
+
+ my $compressor = $opts->{compressor} // 'gz';
+ my $compressor2cmd_map = {
+ gz => 'gzip',
+ gzip => 'gzip',
+ zst => 'zstd -9',
+ zstd => 'zstd -9',
+ 'zstd-max' => 'zstd -19 -T0', # maximal level where the decompressor can still run efficiently
+ };
+ my $compressor2ending = {
+ gzip => 'gz',
+ zstd => 'zst',
+ 'zstd-max' => 'zst',
+ };
+ my $compressor_cmd = $compressor2cmd_map->{$compressor};
+ die "unkown compressor '$compressor', use one of: ". join(', ', sort keys %$compressor2cmd_map)
+ if !defined($compressor_cmd);
+
+ my $ending = $compressor2ending->{$compressor} // $compressor;
+ my $final_archive = "${target}.${ending}";
unlink $target;
unlink $final_archive;
$self->run_command ("tar cpf $target --numeric-owner -C '$rootdir' ./etc/appliance.info");
$self->run_command ("tar rpf $target --numeric-owner -C '$rootdir' --exclude ./etc/appliance.info .");
- $self->run_command ("gzip $target");
+ $self->run_command ("$compressor_cmd $target");
$self->logmsg ("detecting final commpressed appliance size: ");
$size = $get_path_size->($final_archive);
} elsif ($suite eq 'xenial' || $suite eq 'wily' || $suite eq 'vivid' ||
$suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful' ||
$suite eq 'bionic' || $suite eq 'cosmic' || $suite eq 'disco' ||
- $suite eq 'eoan' || $suite eq 'focal') {
+ $suite eq 'eoan' || $suite eq 'focal' || $suite eq 'groovy'
+ || $suite eq 'hirsute'
+ ) {
die "unable to install init script (system uses systemd)\n";
} elsif ($suite eq 'trusty' || $suite eq 'precise') {
die "unable to install init script (system uses upstart)\n";
# avoid warnings about non-existent resolv.conf
write_file ("", "$rootdir/etc/resolv.conf", 0644);
- if ($suite eq 'focal' || $suite eq 'eoan' || $suite eq 'disco' || $suite eq 'cosmic' ||
+ if (
+ $suite eq 'hirsute' || $suite eq 'groovy' || $suite eq 'focal' ||
+ $suite eq 'eoan' || $suite eq 'disco' || $suite eq 'cosmic' ||
$suite eq 'bionic' || $suite eq 'artful' ||
$suite eq 'zesty' || $suite eq 'yakkety' || $suite eq 'xenial' ||
$suite eq 'wily') {