]> git.proxmox.com Git - pve-container.git/commitdiff
fix #3176: allow development Devuan versions, improve version detection
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Feb 2021 09:12:43 +0000 (10:12 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Feb 2021 09:14:23 +0000 (10:14 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC/Setup/Devuan.pm

index bf388a6318e69aab52ecf5a72d91d8c9f67d7e6c..d3d9019ec4a51a59bfa79fbd8411a254b47abbb0 100644 (file)
@@ -16,10 +16,24 @@ sub new {
     die "unable to read version info\n" if !defined($version);
     $version = lc($version);
 
-    die "unsupported Devuan version '$version'\n"
-       if $version !~ /jessie|ascii|beowulf|chimaera/;
-
-    my $self = { conf => $conf, rootdir => $rootdir, version => $version };
+    # map to Debian version, we sometimes check that
+    my $version_map = {
+       'jessie' => 8, # Devuan 1.0
+       'ascii' => 9, # Devuan 2.0
+       'ascii/ceres' => 9,
+       'beowulf' => 10, # Devuan 3.0
+       'beowulf/ceres' => 10,
+       'chimaera' => 11, # Devuan 4.0
+       'chimaera/ceres' => 11,
+    };
+    die "unsupported Devuan version '$version'\n" if !exists($version_map->{$version});
+
+    my $self = {
+       conf => $conf,
+       rootdir => $rootdir,
+       version => $version_map->{$version},
+       devuan_version => $version,
+    };
 
     $conf->{ostype} = "devuan";