all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0
@ 2025-11-18 22:01 Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included Luke Harding
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

DISCLAIMER:
This patch set is unsolicited. No fixes or discussions about these
changes has occured. This is also: my first commit to any Proxmox
repository (CLA is signed), my first time contributing perl, and my
first time using a mailing list. I apologize for all of the above but
hope this will be considered.

This patch set addresses a couple of frustrations I have had with DAB.
First, I was trying to create a Devuan 6 appliance and failed after
adding the suite information, this was because the Devuan suites were
not properly given the origin of Devuan and were trying to install
'systemd-sysv'. Next, I couldn't install packages like 'openssh-server'
which depends on: 'systemd | systemd-standalone-sysusers | 
systemd-sysusers'. DAB would fail to grab 'systemd' which is obvious.
But DAB would not fall back on the systemd-standalone-sysusers package
which provides the bare minimum needed without being systemd. I changed
the closure function to exhaust all options before failing. I also added
an option to remove the MTA and SSH packages as they were not necessary
for my use.

Patch 6 here adds a bunch of new lines. I just ran proxmox-perltidy. If
I used it incorrectly, I'd be happy to drop that one patch.

Luke Harding (7):
  Add a '--no-ssh' option to dab bootstrap to disable ssh packages that
    are automatically included.
  Add origin for devuan suites
  Add devuan "Excalibur" 6.0 suite.
  Change closure algorithm to use an alternate package if the most
    preferred candidate fails.
  Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim.
  Run proxmox-perltidy
  Bump version to 3.8.0

 PVE/DAB.pm       | 1495 ++++++++++++++++++++++++----------------------
 dab              |  237 ++++----
 debian/changelog |    8 +
 3 files changed, 912 insertions(+), 828 deletions(-)

-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included.
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 2/7] Add origin for devuan suites Luke Harding
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 PVE/DAB.pm | 9 +++++++++
 dab        | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index 59397f2..eb77aa1 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -1295,6 +1295,15 @@ sub bootstrap {
     my $add_systemd_sysv_as_required = $suiteinfo->{systemd};
     push @$required, 'systemd-sysv' if $add_systemd_sysv_as_required;
 
+    if ($opts->{'no-ssh'}) {
+        my %remove = (
+            'ssh' => 1,
+            'openssh-server' => 1,
+        );
+
+        @{ $important } = grep { !$remove{$_} } @{ $important };
+    }
+
     my $mta = $opts->{exim} ? 'exim' : 'postfix';
     if ($mta eq 'postfix') {
 	push @$important, "postfix";
diff --git a/dab b/dab
index c01c513..3a4c017 100755
--- a/dab
+++ b/dab
@@ -11,7 +11,7 @@ $ENV{'LC_ALL'} = 'C';
 
 my $commands = {
     'init' => '',
-    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal] [--device-skelleton]',
+    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal] [--device-skelleton] [--no-ssh]',
     'finalize' => '[--keepmycnf] [--compressor <gz[ip] (default)|zst[d]|zstd-max>]',
     'veid' => '',
     'basedir' => '',
@@ -84,7 +84,7 @@ eval {
 
     } elsif ($cmd eq 'bootstrap') {
 	my $opts = {};
-	if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s', 'exclude=s')) {
+	if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s', 'exclude=s', 'no-ssh')) {
 	    fatal_usage();
 	}
 	die "command 'bootstrap' expects no arguments.\n" if scalar (@ARGV) != 0;
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 2/7] Add origin for devuan suites
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 3/7] Add devuan "Excalibur" 6.0 suite Luke Harding
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 PVE/DAB.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index eb77aa1..d437a42 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -89,12 +89,15 @@ my $supported_suites = {
 # DEVUAN (imply systemd = 0 default)
     'beowulf' => {
 	ostype => "devuan-3.0",
+    origin => 'devuan',
     },
     'chimaera' => {
 	ostype => "devuan-4.0",
+    origin => 'devuan',
     },
     'daedalus' => {
 	ostype => "devuan-5.0",
+    origin => 'devuan',
     },
 
 # UBUNTU
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 3/7] Add devuan "Excalibur" 6.0 suite.
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 2/7] Add origin for devuan suites Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 4/7] Change closure algorithm to use an alternate package if the most preferred candidate fails Luke Harding
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 PVE/DAB.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index d437a42..da117c0 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -99,6 +99,10 @@ my $supported_suites = {
 	ostype => "devuan-5.0",
     origin => 'devuan',
     },
+    'excalibur' => {
+    ostype => "devuan-6.0",
+    origin => 'devuan',
+    },
 
 # UBUNTU
     'bionic' => {
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 4/7] Change closure algorithm to use an alternate package if the most preferred candidate fails.
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
                   ` (2 preceding siblings ...)
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 3/7] Add devuan "Excalibur" 6.0 suite Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 5/7] Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 7/7] Bump version to 3.8.0 Luke Harding
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 PVE/DAB.pm | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index da117c0..8b93c1b 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -1207,19 +1207,30 @@ sub __closure_single {
 	  }
       }
       # search for non-excluded alternative
-      my $found;
+      my $success;
       foreach my $p1 (@l1) {
-	  if ($p1 =~ m/^\s*(\S+).*/) {
-	      next if grep { $1 eq $_ } @$excl;
-	      $found = $1;
-	      last;
-	  }
+          next unless $p1 =~ /^\s*(\S+)/;
+          my $candidate = $1;
+
+          next if grep { $candidate eq $_ } @$excl;
+
+          #print STDERR "$pname: trying $candidate for '$p'\n";
+
+          my $ok = eval {
+              __closure_single($pkginfo, $closure, $pkghash, $pkglist, $candidate, $excl);
+              1;
+          };
+
+          if ($ok) {
+              $success = 1;
+              last;
+          } else {
+              print STDERR "$pname: $candidate failed, trying next alternative...\n";
+          }
       }
-      die "package '$pname' depends on exclusion '$p'\n" if !$found;
 
-      #printf (STDERR "$pname: $p --> $found\n");
-	  
-      __closure_single ($pkginfo, $closure, $pkghash, $pkglist, $found, $excl);
+      die "package '$pname' could not satisfy dependency '$p' (all alternatives failed)\n"
+          unless $success;
   }
 }
 
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 5/7] Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim.
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
                   ` (3 preceding siblings ...)
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 4/7] Change closure algorithm to use an alternate package if the most preferred candidate fails Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 7/7] Bump version to 3.8.0 Luke Harding
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 PVE/DAB.pm | 10 ++++++++--
 dab        |  6 ++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index 8b93c1b..f42b937 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -1322,9 +1322,15 @@ sub bootstrap {
         @{ $important } = grep { !$remove{$_} } @{ $important };
     }
 
-    my $mta = $opts->{exim} ? 'exim' : 'postfix';
+    my $mta = $opts->{mta} ? $opts->{mta} : "postfix";
+    
+    # Maintain compatibility with `--exim` flag
+    if ($opts->{exim}) {
+        $mta = "exim";
+    }
+
     if ($mta eq 'postfix') {
-	push @$important, "postfix";
+        push @$important, "postfix";
     }
 
     if ($opts->{include}) {
diff --git a/dab b/dab
index 3a4c017..9a010c0 100755
--- a/dab
+++ b/dab
@@ -11,7 +11,8 @@ $ENV{'LC_ALL'} = 'C';
 
 my $commands = {
     'init' => '',
-    'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal] [--device-skelleton] [--no-ssh]',
+    'bootstrap' => '[--mta <postfix|exim|none>] [--exim (deprecated)] [--include <a[,b..]]>]'
+        . '[--exclude [<a[,b..]]>] [--minimal] [--device-skelleton] [--no-ssh]',
     'finalize' => '[--keepmycnf] [--compressor <gz[ip] (default)|zst[d]|zstd-max>]',
     'veid' => '',
     'basedir' => '',
@@ -84,7 +85,8 @@ eval {
 
     } elsif ($cmd eq 'bootstrap') {
 	my $opts = {};
-	if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s', 'exclude=s', 'no-ssh')) {
+	if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s',
+	        'exclude=s', 'no-ssh', 'mta=s')) {
 	    fatal_usage();
 	}
 	die "command 'bootstrap' expects no arguments.\n" if scalar (@ARGV) != 0;
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH dab 7/7] Bump version to 3.8.0
  2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
                   ` (4 preceding siblings ...)
  2025-11-18 22:01 ` [pve-devel] [PATCH dab 5/7] Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim Luke Harding
@ 2025-11-18 22:01 ` Luke Harding
  5 siblings, 0 replies; 7+ messages in thread
From: Luke Harding @ 2025-11-18 22:01 UTC (permalink / raw)
  To: pve-devel; +Cc: Luke Harding

I felt the deprecation of --exim was significant enough to warrant a
moderate bump in version.

Signed-off-by: Luke Harding <luke@lukeh990.io>
---
 debian/changelog | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c06abb1..409f677 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dab (3.8.0) stable; urgency=medium
+
+  * Deprecate `--exim` in favor of `--mta <postfix|exim|none>`
+  
+  * Add support for Devuan 6.0 "Excalibur" (Also fixed Devuan <= 5??)
+
+  * Add `--no-ssh` option to not include ssh packages
+
 dab (3.7.1) stable; urgency=medium
 
   * add support for configuring repositories through an `Install-Source`
-- 
2.52.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-18 22:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-18 22:01 [pve-devel] [PATCH dab 0/7] Improvements to DAB; Support Devuan 6.0 Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 2/7] Add origin for devuan suites Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 3/7] Add devuan "Excalibur" 6.0 suite Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 4/7] Change closure algorithm to use an alternate package if the most preferred candidate fails Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 5/7] Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim Luke Harding
2025-11-18 22:01 ` [pve-devel] [PATCH dab 7/7] Bump version to 3.8.0 Luke Harding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal