[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990277: unblock: feature-check/0.2.2-7



Control: tags -1 moreinfo confirmed

On 2021-06-24 15:42:28 +0300, Peter Pentchev wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> This is a pre-approval request before I upload feature-check/0.2.2-7
> to unstable to fix an RC bug.

Please go ahead and remove the moreinfo tag once the new version is
available in unstable.

> 
> [ Reason ]
> See #990276 (https://bugs.debian.org/990276): Version comparisons may
> return the wrong result.
> 
> [ Impact ]
> If the feature-check command-line tool is used by other programs to
> make sure that an installed program has a recent enough version of
> a supported feature, the checks may fail for some versions containing
> non-numeric characters (pre-release, patch, etc).
> 
> [ Tests ]
> The patches include additions to the feature-check unit-test suite that
> is run both at build time and as an autopkgtest.
> 
> [ Risks ]
> Leaf package, not widely used yet; targeted fix, so hopefully
> any risks are very low.
> 
> [ Checklist ]
>   [x] all changes are documented in the d/changelog
>   [x] I reviewed all changes and I approve them
>   [x] attach debdiff against the package in testing
> 
> unblock feature-check/0.2.2-7

> diff -Nru feature-check-0.2.2/debian/changelog feature-check-0.2.2/debian/changelog
> --- feature-check-0.2.2/debian/changelog	2020-10-26 11:14:52.000000000 +0200
> +++ feature-check-0.2.2/debian/changelog	2021-06-24 15:33:07.000000000 +0300
> @@ -1,3 +1,10 @@
> +feature-check (0.2.2-7) unstable; urgency=medium
> +
> +  * Add the cmp-num and cmp-rest upstream patches to fix some version
> +    string comparisons. Closes: #990276
> +
> + -- Peter Pentchev <roam@debian.org>  Thu, 24 Jun 2021 15:33:07 +0300
> +
>  feature-check (0.2.2-6) unstable; urgency=medium
>  
>    [ Michael Hudson-Doyle ]
> diff -Nru feature-check-0.2.2/debian/patches/cmp-num.patch feature-check-0.2.2/debian/patches/cmp-num.patch
> --- feature-check-0.2.2/debian/patches/cmp-num.patch	1970-01-01 02:00:00.000000000 +0200
> +++ feature-check-0.2.2/debian/patches/cmp-num.patch	2021-06-24 15:30:21.000000000 +0300
> @@ -0,0 +1,46 @@
> +Description: Fix a 2 < 10 version int/string bug.
> +Origin: upstream; https://gitlab.com/ppentchev/feature-check/-/commit/ed0da5159562fa37cf32386a1baf2a1114562822
> +Bug-Debian: https://bugs.debian.org/990276
> +Author: Peter Pentchev <roam@ringlet.net>
> +Last-Update: 2021-06-24
> +
> +--- a/perl5/feature-check.pl
> ++++ b/perl5/feature-check.pl
> +@@ -269,7 +269,7 @@
> + 	if ($na ne '') {
> + 		if ($nb ne '') {
> + 			if ($nb != $na) {
> +-				return $na cmp $nb;
> ++				return $na <=> $nb;
> + 			}
> + 		} else {
> + 			return 1;
> +--- a/t/04-simple.t
> ++++ b/t/04-simple.t
> +@@ -1,6 +1,6 @@
> + #!/usr/bin/perl
> + #
> +-# Copyright (c) 2018  Peter Pentchev
> ++# Copyright (c) 2018, 2021  Peter Pentchev
> + # All rights reserved.
> + #
> + # Redistribution and use in source and binary forms, with or without
> +@@ -89,6 +89,18 @@
> + 	['base ge 3', 0],
> + 	['base gt 3', 0],
> + 	['base eq 3', 0],
> ++
> ++	['base lt 10', 1],
> ++	['base le 10', 1],
> ++	['base ge 10', 0],
> ++	['base gt 10', 0],
> ++	['base eq 10', 0],
> ++
> ++	['base lt 10.1', 1],
> ++	['base le 10.1', 1],
> ++	['base ge 10.1', 0],
> ++	['base gt 10.1', 0],
> ++	['base eq 10.1', 0],
> + );
> + 
> + my %c = env_init;
> diff -Nru feature-check-0.2.2/debian/patches/cmp-rest.patch feature-check-0.2.2/debian/patches/cmp-rest.patch
> --- feature-check-0.2.2/debian/patches/cmp-rest.patch	1970-01-01 02:00:00.000000000 +0200
> +++ feature-check-0.2.2/debian/patches/cmp-rest.patch	2021-06-24 15:30:28.000000000 +0300
> @@ -0,0 +1,62 @@
> +Description: Fix a 3.0.beta2 < 3.0 version int/string bug.
> +Origin: upstream; https://gitlab.com/ppentchev/feature-check/-/commit/59e618baff6836f281697561f5a9cfa22ccd28df
> +Bug-Debian: https://bugs.debian.org/990276
> +Author: Peter Pentchev <roam@ringlet.net>
> +Last-Update: 2021-06-24
> +
> +--- a/perl5/feature-check.pl
> ++++ b/perl5/feature-check.pl
> +@@ -282,7 +282,7 @@
> + 	if ($ra ne '') {
> + 		if ($rb ne '') {
> + 			if ($ra ne $rb) {
> +-				return $ra <=> $rb;
> ++				return $ra cmp $rb;
> + 			}
> + 		} else {
> + 			return 1;
> +--- a/t/04-simple.t
> ++++ b/t/04-simple.t
> +@@ -101,6 +101,42 @@
> + 	['base ge 10.1', 0],
> + 	['base gt 10.1', 0],
> + 	['base eq 10.1', 0],
> ++
> ++	['beta lt 1', 0],
> ++	['beta le 1', 0],
> ++	['beta eq 1', 0],
> ++	['beta ge 1', 1],
> ++	['beta gt 1', 1],
> ++
> ++	['beta lt 3.0', 1],
> ++	['beta le 3.0', 1],
> ++	['beta eq 3.0', 0],
> ++	['beta ge 3.0', 0],
> ++	['beta gt 3.0', 0],
> ++
> ++	['beta lt 3.0.beta1', 0],
> ++	['beta le 3.0.beta1', 0],
> ++	['beta eq 3.0.beta1', 0],
> ++	['beta ge 3.0.beta1', 1],
> ++	['beta gt 3.0.beta1', 1],
> ++
> ++	['beta lt 3.0.beta2', 0],
> ++	['beta le 3.0.beta2', 1],
> ++	['beta eq 3.0.beta2', 1],
> ++	['beta ge 3.0.beta2', 1],
> ++	['beta gt 3.0.beta2', 0],
> ++
> ++	['beta lt 3.0.beta3', 1],
> ++	['beta le 3.0.beta3', 1],
> ++	['beta eq 3.0.beta3', 0],
> ++	['beta ge 3.0.beta3', 0],
> ++	['beta gt 3.0.beta3', 0],
> ++
> ++	['beta lt 3.0.0', 1],
> ++	['beta le 3.0.0', 1],
> ++	['beta eq 3.0.0', 0],
> ++	['beta ge 3.0.0', 0],
> ++	['beta gt 3.0.0', 0],
> + );
> + 
> + my %c = env_init;
> diff -Nru feature-check-0.2.2/debian/patches/series feature-check-0.2.2/debian/patches/series
> --- feature-check-0.2.2/debian/patches/series	2019-09-22 22:47:39.000000000 +0300
> +++ feature-check-0.2.2/debian/patches/series	2021-06-24 15:29:45.000000000 +0300
> @@ -1 +1,3 @@
>  python-no-executable.patch
> +cmp-num.patch
> +cmp-rest.patch




-- 
Sebastian Ramacher

Attachment: signature.asc
Description: PGP signature


Reply to: