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

Stoiko Ivanov s.ivanov at proxmox.com
Thu Oct 15 14:43:18 CEST 2020


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 <ml11045 at adreyer.com> 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..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;
>  	}







More information about the pve-devel mailing list