public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH container] fix #5762: lxc: setup: support `opensuse-slowroll` as OpenSUSE flavor
@ 2024-10-11 11:29 Christoph Heiss
  2024-10-24 17:12 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2024-10-11 11:29 UTC (permalink / raw)
  To: 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 <c.heiss@proxmox.com>
---
 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


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

* [pve-devel] applied: [PATCH container] fix #5762: lxc: setup: support `opensuse-slowroll` as OpenSUSE flavor
  2024-10-11 11:29 [pve-devel] [PATCH container] fix #5762: lxc: setup: support `opensuse-slowroll` as OpenSUSE flavor Christoph Heiss
@ 2024-10-24 17:12 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-10-24 17:12 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 11/10/2024 um 13:29 schrieb Christoph Heiss:
> 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 <c.heiss@proxmox.com>
> ---
>  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
> 
>

applied, thanks!


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


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

end of thread, other threads:[~2024-10-24 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-11 11:29 [pve-devel] [PATCH container] fix #5762: lxc: setup: support `opensuse-slowroll` as OpenSUSE flavor Christoph Heiss
2024-10-24 17:12 ` [pve-devel] applied: " Thomas Lamprecht

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