public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Luke Harding <luke@lukeh990.io>
To: pve-devel@lists.proxmox.com
Cc: Luke Harding <luke@lukeh990.io>
Subject: [pve-devel] [PATCH dab 1/7] Add a '--no-ssh' option to dab bootstrap to disable ssh packages that are automatically included.
Date: Tue, 18 Nov 2025 17:01:16 -0500	[thread overview]
Message-ID: <20251118220122.61257-2-luke@lukeh990.io> (raw)
In-Reply-To: <20251118220122.61257-1-luke@lukeh990.io>

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


  reply	other threads:[~2025-11-18 22:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251118220122.61257-2-luke@lukeh990.io \
    --to=luke@lukeh990.io \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal