public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Achim Dreyer <ml11045@adreyer.com>
Subject: Re: [pve-devel] SPAM: [PATCH v2 container 1/1] Fix numbering scheme detection for CentOS Stream releases.
Date: Mon, 19 Oct 2020 14:25:32 +0200	[thread overview]
Message-ID: <2caf3f2a-26b9-aef6-2595-6032afec66e3@proxmox.com> (raw)
In-Reply-To: <20201017134556.2871759-2-ml11045@adreyer.com>

On 17.10.20 15:45, Achim Dreyer wrote:
> Signed-off-by: Achim Dreyer <ml11045@adreyer.com>
> ---
>  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..77eb6f7 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+)?/) || ($release =~ m/release\s+(\d+)/)) {
>  	if ($1 >= 5 && $1 <= 9) {
>  	    $version = $1;
>  	}
> 

Patch and organizational stuff looks OK, but can you please tell me what the
issue was with the original code?

A CentOS 8 Stream template from the LXC repo[0] shows the following redhat-release (linked
to centos-release) file content:
> CentOS Linux release 8.2.2004 (Core)

and would match the original regex.

What do the release files making problems here look like?

Would be good to have some rationale with what/why we can expect here, as if I had to
guess it's looking like `<CentOS-base-version>.<year-month>` but that would not had
triggered you sending this patch, I guess.

cheers,
Thomas

[0]: https://uk.images.linuxcontainers.org/images/centos/8-Stream/amd64/default/20201019_07:44/?C=S;O=A





  reply	other threads:[~2020-10-19 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 13:45 [pve-devel] SPAM: [PATCH v2 container 0/1] " Achim Dreyer
2020-10-17 13:45 ` [pve-devel] SPAM: [PATCH v2 container 1/1] " Achim Dreyer
2020-10-19 12:25   ` Thomas Lamprecht [this message]
2020-10-19 19:06   ` Achim Dreyer (proxmox)
2020-10-23 19:10 ` [pve-devel] applied: SPAM: [PATCH v2 container 0/1] " Thomas Lamprecht

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=2caf3f2a-26b9-aef6-2595-6032afec66e3@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=ml11045@adreyer.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal