public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] SPAM: [PATCH container 0/1] fix numbering scheme detection for CentOS Stream
@ 2020-10-13 17:08 Achim Dreyer
  2020-10-13 17:08 ` [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases Achim Dreyer
  0 siblings, 1 reply; 3+ messages in thread
From: Achim Dreyer @ 2020-10-13 17:08 UTC (permalink / raw)
  To: pve-devel; +Cc: Achim Dreyer

*** BLURB HERE ***

Achim Dreyer (1):
  Fix numbering scheme detection for CentOS Stream releases.
  Stream releases contain only the major version number.

 src/PVE/LXC/Setup/CentOS.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.28.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases.
  2020-10-13 17:08 [pve-devel] SPAM: [PATCH container 0/1] fix numbering scheme detection for CentOS Stream Achim Dreyer
@ 2020-10-13 17:08 ` Achim Dreyer
  2020-10-15 12:43   ` Stoiko Ivanov
  0 siblings, 1 reply; 3+ messages in thread
From: Achim Dreyer @ 2020-10-13 17:08 UTC (permalink / raw)
  To: pve-devel; +Cc: Achim Dreyer

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..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+)?/) {
 	if ($1 >= 5 && $1 <= 9) {
 	    $version = $1;
 	}
-- 
2.28.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases.
  2020-10-13 17:08 ` [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases Achim Dreyer
@ 2020-10-15 12:43   ` Stoiko Ivanov
  0 siblings, 0 replies; 3+ messages in thread
From: Stoiko Ivanov @ 2020-10-15 12:43 UTC (permalink / raw)
  To: Achim Dreyer; +Cc: Proxmox VE development discussion

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






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-15 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 17:08 [pve-devel] SPAM: [PATCH container 0/1] fix numbering scheme detection for CentOS Stream Achim Dreyer
2020-10-13 17:08 ` [pve-devel] SPAM: [PATCH container 1/1] Fix numbering scheme detection for CentOS Stream releases Achim Dreyer
2020-10-15 12:43   ` Stoiko Ivanov

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