[pve-devel] SPAM: [PATCH v2 container 1/1] Fix numbering scheme detection for CentOS Stream releases.

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Oct 19 14:25:32 CEST 2020


On 17.10.20 15:45, Achim Dreyer wrote:
> Signed-off-by: Achim Dreyer <ml11045 at 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






More information about the pve-devel mailing list