* Re: [PR PATCH] [Updated] musl: backport patch to fix strverscmp
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45289@inbox.vuxu.org>
@ 2023-07-27 21:46 ` Piraty
2023-08-04 0:23 ` Piraty
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2023-07-27 21:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
There is an updated pull request by Piraty against master on the void-packages repository
https://github.com/Piraty/void-packages musl-fix-strverscmp
https://github.com/void-linux/void-packages/pull/45289
musl: backport patch to fix strverscmp
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
a test of libtasn1 revealed the broken behavior
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/45289.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-musl-fix-strverscmp-45289.patch --]
[-- Type: text/x-diff, Size: 2679 bytes --]
From 83a948865e683bb4c169d22cd4ab2026a8551a95 Mon Sep 17 00:00:00 2001
From: Piraty <mail@piraty.dev>
Date: Thu, 27 Jul 2023 23:36:24 +0200
Subject: [PATCH] musl: backport patch to fix strverscmp
it's part of 1.2.4 upstream
---
...son-of-digit-sequence-with-non.patch.patch | 38 +++++++++++++++++++
srcpkgs/musl/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
diff --git a/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
new file mode 100644
index 0000000000000..e0f0b8bffffc9
--- /dev/null
+++ b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
@@ -0,0 +1,38 @@
+From b50eb8c36c20f967bd0ed70c0b0db38a450886ba Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Mon, 7 Nov 2022 22:17:55 -0500
+Subject: [PATCH] fix strverscmp comparison of digit sequence with non-digits
+
+the rule that longest digit sequence not beginning with a zero is
+greater only applies when both sequences being compared are
+non-degenerate. this is spelled out explicitly in the man page, which
+may be deemed authoritative for this nonstandard function: "If one or
+both of these is empty, then return what strcmp(3) would have
+returned..."
+
+we were wrongly treating any sequence of digits not beginning with a
+zero as greater than a non-digit in the other string.
+---
+ src/string/strverscmp.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
+index 4daf276d..16c1da22 100644
+--- a/src/string/strverscmp.c
++++ b/src/string/strverscmp.c
+@@ -18,9 +18,9 @@ int strverscmp(const char *l0, const char *r0)
+ else if (c!='0') z=0;
+ }
+
+- if (l[dp]!='0' && r[dp]!='0') {
+- /* If we're not looking at a digit sequence that began
+- * with a zero, longest digit string is greater. */
++ if (l[dp]-'1'<9U && r[dp]-'1'<9U) {
++ /* If we're looking at non-degenerate digit sequences starting
++ * with nonzero digits, longest digit string is greater. */
+ for (j=i; isdigit(l[j]); j++)
+ if (!isdigit(r[j])) return 1;
+ if (isdigit(r[j])) return -1;
+--
+2.41.0
+
diff --git a/srcpkgs/musl/template b/srcpkgs/musl/template
index e0e05c2df0995..6c98fac0962e9 100644
--- a/srcpkgs/musl/template
+++ b/srcpkgs/musl/template
@@ -2,7 +2,7 @@
pkgname=musl
reverts="1.2.0_1"
version=1.1.24
-revision=17
+revision=18
archs="*-musl"
bootstrap=yes
build_style=gnu-configure
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Updated] musl: backport patch to fix strverscmp
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45289@inbox.vuxu.org>
2023-07-27 21:46 ` [PR PATCH] [Updated] musl: backport patch to fix strverscmp Piraty
@ 2023-08-04 0:23 ` Piraty
2023-08-30 13:11 ` Piraty
2023-08-30 13:35 ` [PR PATCH] [Merged]: " Piraty
3 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2023-08-04 0:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
There is an updated pull request by Piraty against master on the void-packages repository
https://github.com/Piraty/void-packages musl-fix-strverscmp
https://github.com/void-linux/void-packages/pull/45289
musl: backport patch to fix strverscmp
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
a test of libtasn1 revealed the broken behavior
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/45289.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-musl-fix-strverscmp-45289.patch --]
[-- Type: text/x-diff, Size: 2679 bytes --]
From 2a6dba9a2cb713752668839a4cae9585ea689bb0 Mon Sep 17 00:00:00 2001
From: Piraty <mail@piraty.dev>
Date: Thu, 27 Jul 2023 23:36:24 +0200
Subject: [PATCH] musl: backport patch to fix strverscmp
it's part of 1.2.4 upstream
---
...son-of-digit-sequence-with-non.patch.patch | 38 +++++++++++++++++++
srcpkgs/musl/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
diff --git a/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
new file mode 100644
index 0000000000000..e0f0b8bffffc9
--- /dev/null
+++ b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
@@ -0,0 +1,38 @@
+From b50eb8c36c20f967bd0ed70c0b0db38a450886ba Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Mon, 7 Nov 2022 22:17:55 -0500
+Subject: [PATCH] fix strverscmp comparison of digit sequence with non-digits
+
+the rule that longest digit sequence not beginning with a zero is
+greater only applies when both sequences being compared are
+non-degenerate. this is spelled out explicitly in the man page, which
+may be deemed authoritative for this nonstandard function: "If one or
+both of these is empty, then return what strcmp(3) would have
+returned..."
+
+we were wrongly treating any sequence of digits not beginning with a
+zero as greater than a non-digit in the other string.
+---
+ src/string/strverscmp.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
+index 4daf276d..16c1da22 100644
+--- a/src/string/strverscmp.c
++++ b/src/string/strverscmp.c
+@@ -18,9 +18,9 @@ int strverscmp(const char *l0, const char *r0)
+ else if (c!='0') z=0;
+ }
+
+- if (l[dp]!='0' && r[dp]!='0') {
+- /* If we're not looking at a digit sequence that began
+- * with a zero, longest digit string is greater. */
++ if (l[dp]-'1'<9U && r[dp]-'1'<9U) {
++ /* If we're looking at non-degenerate digit sequences starting
++ * with nonzero digits, longest digit string is greater. */
+ for (j=i; isdigit(l[j]); j++)
+ if (!isdigit(r[j])) return 1;
+ if (isdigit(r[j])) return -1;
+--
+2.41.0
+
diff --git a/srcpkgs/musl/template b/srcpkgs/musl/template
index e0e05c2df0995..6c98fac0962e9 100644
--- a/srcpkgs/musl/template
+++ b/srcpkgs/musl/template
@@ -2,7 +2,7 @@
pkgname=musl
reverts="1.2.0_1"
version=1.1.24
-revision=17
+revision=18
archs="*-musl"
bootstrap=yes
build_style=gnu-configure
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Updated] musl: backport patch to fix strverscmp
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45289@inbox.vuxu.org>
2023-07-27 21:46 ` [PR PATCH] [Updated] musl: backport patch to fix strverscmp Piraty
2023-08-04 0:23 ` Piraty
@ 2023-08-30 13:11 ` Piraty
2023-08-30 13:35 ` [PR PATCH] [Merged]: " Piraty
3 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2023-08-30 13:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
There is an updated pull request by Piraty against master on the void-packages repository
https://github.com/Piraty/void-packages musl-fix-strverscmp
https://github.com/void-linux/void-packages/pull/45289
musl: backport patch to fix strverscmp
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
a test of libtasn1 revealed the broken behavior
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/45289.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-musl-fix-strverscmp-45289.patch --]
[-- Type: text/x-diff, Size: 2679 bytes --]
From 7560ce03cca5e541b9ad37b2e3af6b1908260f49 Mon Sep 17 00:00:00 2001
From: Piraty <mail@piraty.dev>
Date: Thu, 27 Jul 2023 23:36:24 +0200
Subject: [PATCH] musl: backport patch to fix strverscmp
it's part of 1.2.4 upstream
---
...son-of-digit-sequence-with-non.patch.patch | 38 +++++++++++++++++++
srcpkgs/musl/template | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
diff --git a/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
new file mode 100644
index 0000000000000..e0f0b8bffffc9
--- /dev/null
+++ b/srcpkgs/musl/patches/fix-strverscmp-comparison-of-digit-sequence-with-non.patch.patch
@@ -0,0 +1,38 @@
+From b50eb8c36c20f967bd0ed70c0b0db38a450886ba Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Mon, 7 Nov 2022 22:17:55 -0500
+Subject: [PATCH] fix strverscmp comparison of digit sequence with non-digits
+
+the rule that longest digit sequence not beginning with a zero is
+greater only applies when both sequences being compared are
+non-degenerate. this is spelled out explicitly in the man page, which
+may be deemed authoritative for this nonstandard function: "If one or
+both of these is empty, then return what strcmp(3) would have
+returned..."
+
+we were wrongly treating any sequence of digits not beginning with a
+zero as greater than a non-digit in the other string.
+---
+ src/string/strverscmp.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
+index 4daf276d..16c1da22 100644
+--- a/src/string/strverscmp.c
++++ b/src/string/strverscmp.c
+@@ -18,9 +18,9 @@ int strverscmp(const char *l0, const char *r0)
+ else if (c!='0') z=0;
+ }
+
+- if (l[dp]!='0' && r[dp]!='0') {
+- /* If we're not looking at a digit sequence that began
+- * with a zero, longest digit string is greater. */
++ if (l[dp]-'1'<9U && r[dp]-'1'<9U) {
++ /* If we're looking at non-degenerate digit sequences starting
++ * with nonzero digits, longest digit string is greater. */
+ for (j=i; isdigit(l[j]); j++)
+ if (!isdigit(r[j])) return 1;
+ if (isdigit(r[j])) return -1;
+--
+2.41.0
+
diff --git a/srcpkgs/musl/template b/srcpkgs/musl/template
index e0e05c2df0995..6c98fac0962e9 100644
--- a/srcpkgs/musl/template
+++ b/srcpkgs/musl/template
@@ -2,7 +2,7 @@
pkgname=musl
reverts="1.2.0_1"
version=1.1.24
-revision=17
+revision=18
archs="*-musl"
bootstrap=yes
build_style=gnu-configure
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Merged]: musl: backport patch to fix strverscmp
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45289@inbox.vuxu.org>
` (2 preceding siblings ...)
2023-08-30 13:11 ` Piraty
@ 2023-08-30 13:35 ` Piraty
3 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2023-08-30 13:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]
There's a merged pull request on the void-packages repository
musl: backport patch to fix strverscmp
https://github.com/void-linux/void-packages/pull/45289
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
a test of libtasn1 revealed the broken behavior
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-30 13:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45289@inbox.vuxu.org>
2023-07-27 21:46 ` [PR PATCH] [Updated] musl: backport patch to fix strverscmp Piraty
2023-08-04 0:23 ` Piraty
2023-08-30 13:11 ` Piraty
2023-08-30 13:35 ` [PR PATCH] [Merged]: " Piraty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).