]> git.proxmox.com Git - dab.git/blobdiff - DAB.pm
add support for Debian 10 Buster
[dab.git] / DAB.pm
diff --git a/DAB.pm b/DAB.pm
index b00368a8b507d2789e18139b42dbc62394d43a3a..2a6f3ded8ebc189061fd710cef7da706f4a502b2 100644 (file)
--- a/DAB.pm
+++ b/DAB.pm
@@ -237,15 +237,15 @@ sub __sample_config {
 
     my $ostype = $self->{config}->{ostype};
 
-    if ($ostype =~ m/^debian-/) {
+    if ($ostype =~ m/^de(bi|vu)an-/) {
        $data .= "lxc.include = /usr/share/lxc/config/debian.common.conf\n";
     } elsif ($ostype =~ m/^ubuntu-/) {
        $data .= "lxc.include = /usr/share/lxc/config/ubuntu.common.conf\n";
     } else {
        die "unknown os type '$ostype'\n";
     }
-    $data .= "lxc.utsname = localhost\n";
-    $data .= "lxc.rootfs = $self->{rootfs}\n";
+    $data .= "lxc.uts.name = localhost\n";
+    $data .= "lxc.rootfs.path = $self->{rootfs}\n";
     
     return $data;
 }
@@ -319,7 +319,9 @@ sub new {
        if $arch !~ m/^(i386|amd64)$/;
 
     my $suite = $config->{suite} || die "no 'suite' specified\n";
-    if ($suite eq 'stretch') {
+    if ($suite eq 'buster') {
+       $config->{ostype} = "debian-10.0";
+    } elsif ($suite eq 'stretch') {
        $config->{ostype} = "debian-9.0";
     } elsif ($suite eq 'jessie') {
          $config->{ostype} = "debian-8.0";
@@ -331,6 +333,12 @@ sub new {
        $config->{ostype} = "debian-5.0";
     } elsif ($suite eq 'etch') { 
        $config->{ostype} = "debian-4.0";
+    } elsif ($suite eq 'devuan-jessie') {
+       $suite = 'jessie';
+       $config->{ostype} = "devuan-1.0";
+    } elsif ($suite eq 'devuan-ascii' || $suite eq 'ascii') {
+       $suite = 'ascii';
+       $config->{ostype} = "devuan-2.0";
     } elsif ($suite eq 'hardy') { 
        $config->{ostype} = "ubuntu-8.04";
     } elsif ($suite eq 'intrepid') { 
@@ -353,6 +361,10 @@ sub new {
        $config->{ostype} = "ubuntu-17.04";
     } elsif ($suite eq 'artful') {
        $config->{ostype} = "ubuntu-17.10";
+    } elsif ($suite eq 'bionic') {
+       $config->{ostype} = "ubuntu-18.04";
+    } elsif ($suite eq 'cosmic') {
+       $config->{ostype} = "ubuntu-18.10";
     } else {
        die "unsupported debian suite '$suite'\n";
     }
@@ -379,15 +391,16 @@ sub new {
        if ($suite eq 'etch' || $suite eq 'lenny') {
            push @{$config->{source}}, "http://ftp.debian.org/debian SUITE main contrib";
            push @{$config->{source}}, "http://security.debian.org SUITE/updates main contrib";
-       } elsif ($suite eq 'squeeze' || $suite eq 'wheezy' ||
-                $suite eq 'jessie' || $suite eq 'stretch' ) {
+       } elsif ($suite eq 'squeeze' || $suite eq 'stretch' ||
+                $suite eq 'jessie' || $suite eq 'buster' ) {
            push @{$config->{source}}, "http://ftp.debian.org/debian SUITE main contrib";
            push @{$config->{source}}, "http://ftp.debian.org/debian SUITE-updates main contrib";
            push @{$config->{source}}, "http://security.debian.org SUITE/updates main contrib";
        } elsif ($suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty' ||
                 $suite eq 'xenial' || $suite eq 'wily' || $suite eq 'vivid' ||
                 $suite eq 'trusty' || $suite eq 'precise' || $suite eq 'yakkety' ||
-                $suite eq 'zesty' || $suite eq 'artful' ) {
+                $suite eq 'zesty' || $suite eq 'artful' || $suite eq 'bionic' ||
+                $suite eq 'cosmic') {
            my $comp = "main restricted universe multiverse";
            push @{$config->{source}}, "http://archive.ubuntu.com/ubuntu SUITE $comp"; 
            push @{$config->{source}}, "http://archive.ubuntu.com/ubuntu SUITE-updates $comp"; 
@@ -455,7 +468,8 @@ sub new {
     # we cannot exclude it (instead we disable udevd)
 
     if ($suite eq 'vivid' || $suite eq 'wily' || $suite eq 'xenial' ||
-       $suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful') {
+       $suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful' ||
+       $suite eq 'bionic' || $suite eq 'cosmic') {
        push @$incl, 'isc-dhcp-client';
        push @$excl, qw(libmodule-build-perl);
     } elsif ($suite eq 'trusty') {
@@ -474,7 +488,7 @@ sub new {
        push @$incl, 'libperl4-corelibs-perl'; # to make lsof happy
        push @$excl, qw(systemd systemd-sysv udev module-init-tools pciutils hdparm 
                        memtest86+ parted);
-    } elsif ($suite eq 'stretch') {
+    } elsif ($suite eq 'stretch' || $suite eq 'buster') {
        push @$excl, qw(module-init-tools pciutils hdparm
                        memtest86+ parted);
      } else {
@@ -1139,7 +1153,8 @@ sub install_init_script {
     if ($suite eq 'etch' || $suite eq 'lenny') {
        $self->ve_command ("update-rc.d $base start $prio $runlevel .");
     } elsif ($suite eq 'xenial' || $suite eq 'wily' || $suite eq 'vivid' ||
-            $suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful') {
+            $suite eq 'yakkety' || $suite eq 'zesty' || $suite eq 'artful' ||
+            $suite eq 'bionic' || $suite eq 'cosmic') {
        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";
@@ -1258,8 +1273,9 @@ sub bootstrap {
     # avoid warnings about non-existent resolv.conf
     write_file ("", "$rootdir/etc/resolv.conf", 0644);
 
-    if ($suite eq 'artful' || $suite eq 'zesty' || $suite eq 'yakkety' ||
-       $suite eq 'xenial' || $suite eq 'wily') {
+    if ($suite eq 'cosmic' || $suite eq 'bionic' || $suite eq 'artful' ||
+       $suite eq 'zesty' || $suite eq 'yakkety' || $suite eq 'xenial' ||
+       $suite eq 'wily') {
        # no need to configure loopback device
     } else {
        $data = "auto lo\niface lo inet loopback\n";
@@ -1543,6 +1559,9 @@ sub task_postgres {
     } elsif ($suite eq 'stretch') {
         @supp = ('9.6');
         $pgversion = '9.6';
+    } elsif ($suite eq 'buster') {
+        @supp = ('11');
+        $pgversion = '11';
     }
 
     $pgversion = $opts->{version} if $opts->{version};