From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH container 1/2] setup: ubuntu: get version from os-release
Date: Fri, 6 Nov 2026 17:59:35 +0100 [thread overview]
Message-ID: <20261106165941.40622-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20261106165941.40622-1-s.ivanov@proxmox.com>
ubuntu 26.10 does not ship /etc/lsb-release anymore, breaking setting
up a container with this version.
using /etc/lsb-release was added in 2015, and has not been touched
since:
a8e58e9 ("add support for Ubuntu 15.04")
as /etc/os-release has the information we need in all supported
releases (checked by installing a Ubuntu 17.04 container), just use
that and drop the special treatment here.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PVE/LXC/Setup/Ubuntu.pm | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/PVE/LXC/Setup/Ubuntu.pm b/src/PVE/LXC/Setup/Ubuntu.pm
index e4b8c1e..374678f 100644
--- a/src/PVE/LXC/Setup/Ubuntu.pm
+++ b/src/PVE/LXC/Setup/Ubuntu.pm
@@ -45,15 +45,7 @@ my $known_versions = {
sub new {
my ($class, $conf, $rootdir, $os_release, $log_warn) = @_;
- my $lsb_fn = "$rootdir/etc/lsb-release";
- my $lsbinfo = PVE::Tools::file_get_contents($lsb_fn);
-
- die "got unknown DISTRIB_ID\n" if $lsbinfo !~ m/^DISTRIB_ID=Ubuntu$/mi;
-
- my $version;
- if ($lsbinfo =~ m/^DISTRIB_RELEASE=(\d+\.\d+)$/mi) {
- $version = $1;
- }
+ my $version = $os_release->{VERSION_ID};
die "unable to read version info\n" if !defined($version);
--
2.47.3
next prev parent reply other threads:[~2026-11-06 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 16:59 [PATCH container 0/2] add support for Ubuntu 26.10 Stoiko Ivanov
2026-11-06 16:59 ` Stoiko Ivanov [this message]
2026-11-06 16:59 ` [PATCH container 2/2] ubuntu setup: add preliminary support for 27.04 Stoiko Ivanov
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=20261106165941.40622-2-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--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