From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 938B21FF166 for ; Fri, 11 Oct 2024 13:29:37 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B07333C6BE; Fri, 11 Oct 2024 13:30:04 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Fri, 11 Oct 2024 13:29:47 +0200 Message-ID: <20241011112955.929789-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment LOTS_OF_MONEY 0.001 Huge... sums of money RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [setup.pm, opensuse.org, proxmox.com, src.com, a.com, getty.target, b.com] Subject: [pve-devel] [PATCH container] fix #5762: lxc: setup: support `opensuse-slowroll` as OpenSUSE flavor X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" See the original bug report [0]. OpenSUSE Tumbleweed Slowroll fails to be detected corrected due to featuring a different ID in /etc/os-release. Simply map that ID to the existing opensuse plugin - much like Tumbleweed itself. Slowroll is basically just a midway solution between Leap and Tumbleweed, so there shouldn't be any incompatibilities really - since we determine specifics in the plugin by version anyway. [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5762 [1] https://en.opensuse.org/Portal:Slowroll Signed-off-by: Christoph Heiss --- src/PVE/LXC/Setup.pm | 1 + src/test/test-opensuse-slowroll-001/config | 5 +++++ .../test-opensuse-slowroll-001/etc/hosts.exp | 5 +++++ .../test-opensuse-slowroll-001/etc/os-release | 16 +++++++++++++++ .../etc/resolv.conf.exp | 5 +++++ .../test-opensuse-slowroll-001/etc/securetty | 7 +++++++ .../etc/securetty.exp | 12 +++++++++++ .../etc/sysconfig/network/ifcfg-eth0.exp | 3 +++ .../etc/sysconfig/network/ifcfg-eth1.exp | 3 +++ .../etc/sysconfig/network/ifcfg-eth2.exp | 2 ++ .../etc/sysconfig/network/ifcfg-eth3.exp | 2 ++ .../etc/sysconfig/network/ifroute-eth0.exp | 3 +++ .../etc/sysconfig/network/ifroute-eth1 | 1 + .../etc/sysconfig/network/ifroute-eth1.exp | 1 + .../root/.ssh/authorized_keys.exp | 3 +++ .../systemd/system/container-getty@.service | 20 +++++++++++++++++++ 16 files changed, 89 insertions(+) create mode 100644 src/test/test-opensuse-slowroll-001/config create mode 100644 src/test/test-opensuse-slowroll-001/etc/hosts.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/os-release create mode 100644 src/test/test-opensuse-slowroll-001/etc/resolv.conf.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/securetty create mode 100644 src/test/test-opensuse-slowroll-001/etc/securetty.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth0.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth1.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth2.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth3.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth0.exp create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1 create mode 100644 src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1.exp create mode 100644 src/test/test-opensuse-slowroll-001/root/.ssh/authorized_keys.exp create mode 100644 src/test/test-opensuse-slowroll-001/usr/lib/systemd/system/container-getty@.service diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm index 5c9114c..3a937a9 100644 --- a/src/PVE/LXC/Setup.pm +++ b/src/PVE/LXC/Setup.pm @@ -38,6 +38,7 @@ my $plugins = { my $plugin_alias = { 'opensuse-leap' => 'opensuse', 'opensuse-tumbleweed' => 'opensuse', + 'opensuse-slowroll' => 'opensuse', arch => 'archlinux', sles => 'opensuse', }; diff --git a/src/test/test-opensuse-slowroll-001/config b/src/test/test-opensuse-slowroll-001/config new file mode 100644 index 0000000..6c4e028 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/config @@ -0,0 +1,5 @@ +hostname: pvesuseslow1 +net0: bridge=vmbr0,name=eth0,ip=1.2.3.4/24,gw=1.2.3.1 +net1: bridge=vmbr0,name=eth1,ip=10.2.3.4/24 +net2: bridge=vmbr0,name=eth2,ip=manual +net3: bridge=vmbr0,name=eth3 diff --git a/src/test/test-opensuse-slowroll-001/etc/hosts.exp b/src/test/test-opensuse-slowroll-001/etc/hosts.exp new file mode 100644 index 0000000..69cc2b7 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/hosts.exp @@ -0,0 +1,5 @@ +# --- BEGIN PVE --- +127.0.0.1 localhost.localnet localhost +::1 localhost.localnet localhost +1.2.3.4 pvesuseslow1.proxmox.com pvesuseslow1 +# --- END PVE --- diff --git a/src/test/test-opensuse-slowroll-001/etc/os-release b/src/test/test-opensuse-slowroll-001/etc/os-release new file mode 100644 index 0000000..2ff0f75 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/os-release @@ -0,0 +1,16 @@ +NAME="openSUSE Tumbleweed-Slowroll" +# VERSION="20240901" +ID="opensuse-slowroll" +ID_LIKE="opensuse suse" +VERSION_ID="20240901" +PRETTY_NAME="openSUSE Tumbleweed-Slowroll" +ANSI_COLOR="0;32" +# CPE 2.3 format, boo#1217921 +CPE_NAME="cpe:2.3:o:opensuse:slowroll:20240901:*:*:*:*:*:*:*" +#CPE 2.2 format +#CPE_NAME="cpe:/o:opensuse:slowroll:20240901" +BUG_REPORT_URL="https://bugzilla.opensuse.org" +SUPPORT_URL="https://bugs.opensuse.org" +HOME_URL="https://www.opensuse.org" +DOCUMENTATION_URL="https://en.opensuse.org/openSUSE:Slowroll" +LOGO="distributor-logo-Slowroll" diff --git a/src/test/test-opensuse-slowroll-001/etc/resolv.conf.exp b/src/test/test-opensuse-slowroll-001/etc/resolv.conf.exp new file mode 100644 index 0000000..35181cc --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/resolv.conf.exp @@ -0,0 +1,5 @@ +# --- BEGIN PVE --- +search proxmox.com +nameserver 8.8.8.8 +nameserver 8.8.8.9 +# --- END PVE --- diff --git a/src/test/test-opensuse-slowroll-001/etc/securetty b/src/test/test-opensuse-slowroll-001/etc/securetty new file mode 100644 index 0000000..e0bd229 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/securetty @@ -0,0 +1,7 @@ +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +console diff --git a/src/test/test-opensuse-slowroll-001/etc/securetty.exp b/src/test/test-opensuse-slowroll-001/etc/securetty.exp new file mode 100644 index 0000000..a0f3062 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/securetty.exp @@ -0,0 +1,12 @@ +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +console +lxc/console +lxc/tty1 +lxc/tty2 +lxc/tty3 +lxc/tty4 diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth0.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth0.exp new file mode 100644 index 0000000..65bbdac --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth0.exp @@ -0,0 +1,3 @@ +STARTMODE=onboot +BOOTPROTO=static +IPADDR=1.2.3.4/24 diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth1.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth1.exp new file mode 100644 index 0000000..eeeb459 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth1.exp @@ -0,0 +1,3 @@ +STARTMODE=onboot +BOOTPROTO=static +IPADDR=10.2.3.4/24 diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth2.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth2.exp new file mode 100644 index 0000000..28fdc31 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth2.exp @@ -0,0 +1,2 @@ +STARTMODE=manual +BOOTPROTO=static diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth3.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth3.exp new file mode 100644 index 0000000..28fdc31 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifcfg-eth3.exp @@ -0,0 +1,2 @@ +STARTMODE=manual +BOOTPROTO=static diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth0.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth0.exp new file mode 100644 index 0000000..2f6cdb5 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth0.exp @@ -0,0 +1,3 @@ +# --- BEGIN PVE --- +default 1.2.3.1 0.0.0.0 eth0 +# --- END PVE --- diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1 b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1 new file mode 100644 index 0000000..b864673 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1 @@ -0,0 +1 @@ +# Nothing else diff --git a/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1.exp b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1.exp new file mode 100644 index 0000000..b864673 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/etc/sysconfig/network/ifroute-eth1.exp @@ -0,0 +1 @@ +# Nothing else diff --git a/src/test/test-opensuse-slowroll-001/root/.ssh/authorized_keys.exp b/src/test/test-opensuse-slowroll-001/root/.ssh/authorized_keys.exp new file mode 100644 index 0000000..1cb3ec3 --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/root/.ssh/authorized_keys.exp @@ -0,0 +1,3 @@ +# --- BEGIN PVE --- +ssh-rsa ABCDEFG ABC@DEF +# --- END PVE --- diff --git a/src/test/test-opensuse-slowroll-001/usr/lib/systemd/system/container-getty@.service b/src/test/test-opensuse-slowroll-001/usr/lib/systemd/system/container-getty@.service new file mode 100644 index 0000000..9740d3d --- /dev/null +++ b/src/test/test-opensuse-slowroll-001/usr/lib/systemd/system/container-getty@.service @@ -0,0 +1,20 @@ +[Unit] +Description=Container Getty on /dev/lxc/tty%I +Documentation=man:agetty(8) man:machinectl(1) +After=systemd-user-sessions.service plymouth-quit-wait.service +After=rc-local.service +Before=getty.target +IgnoreOnIsolate=yes + +[Service] +ExecStart=-/sbin/agetty --noclear --keep-baud lxc/tty%I 115200,38400,9600 $TERM +Type=idle +Restart=always +RestartSec=0 +UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +SendSIGHUP=yes -- 2.46.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel