From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D7A4760872 for ; Thu, 15 Oct 2020 14:43:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CEADD12C50 for ; Thu, 15 Oct 2020 14:43:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4740A12C40 for ; Thu, 15 Oct 2020 14:43:22 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 143CE45D90; Thu, 15 Oct 2020 14:43:22 +0200 (CEST) Date: Thu, 15 Oct 2020 14:43:18 +0200 From: Stoiko Ivanov To: Achim Dreyer Cc: Proxmox VE development discussion Message-ID: <20201015144318.3beba0f8@rosa.proxmox.com> In-Reply-To: <20201013170858.1458272-2-ml11045@adreyer.com> References: <20201013170858.1458272-1-ml11045@adreyer.com> <20201013170858.1458272-2-ml11045@adreyer.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.047 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, centos.pm] Subject: Re: [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases. 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: , X-List-Received-Date: Thu, 15 Oct 2020 12:43:23 -0000 Thanks for the patch! I could reproduce the issue by creating a centos container and installing 'centos-release-stream' and the patch does fix it. We'd still need a signed CLA from you in order to be able to incorporate it - see: https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright one suggestion inline: On Tue, 13 Oct 2020 18:08:58 +0100 Achim Dreyer wrote: > Signed-off-by: Achim Dreyer > --- > src/PVE/LXC/Setup/CentOS.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/PVE/LXC/Setup/CentOS.pm b/src/PVE/LXC/Setup/CentOS.pm > index 0825273..aab0488 100644 > --- a/src/PVE/LXC/Setup/CentOS.pm > +++ b/src/PVE/LXC/Setup/CentOS.pm > @@ -19,7 +19,7 @@ sub new { > > my $version; > > - if ($release =~ m/release\s+(\d+\.\d+)(\.\d+)?/) { > + if ($release =~ m/release\s+(\d+)(\.\d+)?(\.\d+)?/) { I would rather make the 2 matches in 2 separate if-branches (leave the current one, for regular centos release number (e.g. 'CentOS Linux release 8.0.1905 (Core)') and add one explicitly matching CentOS streams (Stream release\s+(\d+)) Mostly because it increases readability (IMHO), but also because currently the code could match for particular point-releases (7.1), which would get lost if you only take the first number. > if ($1 >= 5 && $1 <= 9) { > $version = $1; > }