From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id CA5511FF0AF for ; Fri, 06 Nov 2026 18:00:15 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 6198821665; Fri, 06 Nov 2026 18:00:06 +0100 (CET) From: Stoiko Ivanov 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 Message-ID: <20261106165941.40622-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261106165941.40622-1-s.ivanov@proxmox.com> References: <20261106165941.40622-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793984402106 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.449 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: B7QTNXNSMX63BQGNY4YMZT534B43CZXS X-Message-ID-Hash: B7QTNXNSMX63BQGNY4YMZT534B43CZXS X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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