GNU bug report logs - #62684
[PATCH] gnu: Zstandard: Update to 1.5.5.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Wed, 5 Apr 2023 19:27:02 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62684 in the body.
You can then email your comments to 62684 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62684; Package guix-patches. (Wed, 05 Apr 2023 19:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 05 Apr 2023 19:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Zstandard: Update to 1.5.5.
Date: Wed,  5 Apr 2023 15:26:37 -0400
This fixes a corruption bug:

https://github.com/facebook/zstd/releases/tag/v1.5.5

* gnu/packages/compression.scm (zstd)[replacement]: New field.
(zstd-1.5.5): New variable.
---
 gnu/packages/compression.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e58fd65e49..8a78fee107 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1635,6 +1635,7 @@ (define-public unshield
 (define-public zstd
   (package
     (name "zstd")
+    (replacement zstd-1.5.5)
     (version "1.5.0")
     (source
      (origin
@@ -1721,6 +1722,18 @@ (define-public zstd
                    license:public-domain ; zlibWrapper/examples/fitblk*
                    license:zlib))))      ; zlibWrapper/{gz*.c,gzguts.h}
 
+(define-public zstd-1.5.5
+  (package
+    (inherit zstd)
+    (version "1.5.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/facebook/zstd/releases/download/"
+                           "v" version "/zstd-" version ".tar.gz"))
+       (sha256
+        (base32 "1r1ydmj7ib3g5372yj3k40vl3b9ax0154qg2lqcy7ylwhb69chww"))))))
+
 (define-public pzstd
   (package/inherit zstd
     (name "pzstd")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#62684; Package guix-patches. (Thu, 06 Apr 2023 15:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 62684 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 62684 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Zstandard: Update to 1.5.5.
Date: Thu, 6 Apr 2023 11:32:04 -0400
I've updated my packages based on this patch. So far, so good.




Information forwarded to guix-patches <at> gnu.org:
bug#62684; Package guix-patches. (Fri, 07 Apr 2023 10:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 62684 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Leo Famulari <leo <at> famulari.name>, 62684 <at> debbugs.gnu.org
Subject: Re: [bug#62684] [PATCH] gnu: Zstandard: Update to 1.5.5.
Date: Fri, 07 Apr 2023 12:52:40 +0200
Hi Leo,

On mer., 05 avril 2023 at 15:26, Leo Famulari <leo <at> famulari.name> wrote:

> +    (replacement zstd-1.5.5)
>      (version "1.5.0")

[...]

> +(define-public zstd-1.5.5
> +  (package
> +    (inherit zstd)
> +    (version "1.5.5")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/facebook/zstd/releases/download/"
> +                           "v" version "/zstd-" version ".tar.gz"))
> +       (sha256
> +        (base32 "1r1ydmj7ib3g5372yj3k40vl3b9ax0154qg2lqcy7ylwhb69chww"))))))

I am always confused by the implication of such change.

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix show zstd | recsel -p name,version
name: zstd
version: 1.5.5

name: zstd
version: 1.5.0

$ ./pre-inst-env guix build zstd <at> 1.5.0
/gnu/store/g8cl62bmsdsqn14yxghdl882zn0ls8n9-zstd-1.5.5-lib
/gnu/store/b980xf8i6qmx7iaih1bfnqvaihg37p3b-zstd-1.5.5
/gnu/store/6iysnbm6rb9hm61f7jsqgiry5l9v9yca-zstd-1.5.5-static

$ ./pre-inst-env guix build zstd <at> 1.5.0 --no-grafts
/gnu/store/3x3dl71d4xm6y4hjwq110hmfyfx0xc6j-zstd-1.5.0-lib
/gnu/store/bn6pk5zjjdpdfzb6yfr5psi9pji9w51n-zstd-1.5.0
/gnu/store/wa5pngf2lywgi8vd8k9b1k13wp2acvi4-zstd-1.5.0-static
--8<---------------cut here---------------end--------------->8---

Well, maybe something like:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 8a78fee107..5841ea0cf0 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1637,6 +1637,7 @@ (define-public zstd
     (name "zstd")
     (replacement zstd-1.5.5)
     (version "1.5.0")
+    (properties `((hidden? . #true)))
     (source
      (origin
        (method url-fetch)
@@ -1726,6 +1727,7 @@ (define-public zstd-1.5.5
   (package
     (inherit zstd)
     (version "1.5.5")
+    (properties '())
     (source
      (origin
        (method url-fetch)
--8<---------------cut here---------------end--------------->8---

would be less confusing.

Note this discussion [1] about similar examples.  And this patch [2] as
an attempt to address the UX issue.

1: https://yhetil.org/guix/86czvohn86.fsf <at> gmail.com/
2: https://yhetil.org/guix/86im5a6ea4.fsf <at> gmail.com

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#62684; Package guix-patches. (Sat, 08 Apr 2023 17:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 62684 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: 62684 <at> debbugs.gnu.org
Subject: Re: [bug#62684] [PATCH] gnu: Zstandard: Update to 1.5.5.
Date: Sat, 8 Apr 2023 13:07:03 -0400
On Fri, Apr 07, 2023 at 12:52:40PM +0200, Simon Tournier wrote:
> Well, maybe something like:
[...]
> +    (properties `((hidden? . #true)))

Yes, thank you. Please see version 2 of the patch.

I tried using the HIDDEN-PACKAGE procedure for zstd <at> 1.5.0. It doesn't
change the derivation, which is good, but I don't know how to un-hide
the replacement. So this is good enough, I think.




Information forwarded to guix-patches <at> gnu.org:
bug#62684; Package guix-patches. (Sat, 08 Apr 2023 17:08:02 GMT) Full text and rfc822 format available.

Message #17 received at 62684 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 62684 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Zstandard: Update to 1.5.5.
Date: Sat,  8 Apr 2023 13:07:12 -0400
This fixes a corruption bug:

https://github.com/facebook/zstd/releases/tag/v1.5.5

* gnu/packages/compression.scm (zstd)[replacement]: New field.
(zstd-1.5.5): New variable.
---
 gnu/packages/compression.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e58fd65e49..1187d12421 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1635,6 +1635,13 @@ (define-public unshield
 (define-public zstd
   (package
     (name "zstd")
+    ;; Replace to the data corruption bug fixed in Zstd 1.5.5.
+    ;; https://github.com/facebook/zstd/releases/tag/v1.5.5
+    (replacement zstd-1.5.5)
+    ;; Hide this buggy package in the Guix UI. If you add another
+    ;; property to this package, adjust the properties in the package
+    ;; replacement accordingly.
+    (properties `((hidden? . #true)))
     (version "1.5.0")
     (source
      (origin
@@ -1721,6 +1728,20 @@ (define-public zstd
                    license:public-domain ; zlibWrapper/examples/fitblk*
                    license:zlib))))      ; zlibWrapper/{gz*.c,gzguts.h}
 
+(define-public zstd-1.5.5
+  (package
+    (inherit zstd)
+    ;; Don't hide this package from the UI.
+    (properties '())
+    (version "1.5.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/facebook/zstd/releases/download/"
+                           "v" version "/zstd-" version ".tar.gz"))
+       (sha256
+        (base32 "1r1ydmj7ib3g5372yj3k40vl3b9ax0154qg2lqcy7ylwhb69chww"))))))
+
 (define-public pzstd
   (package/inherit zstd
     (name "pzstd")
-- 
2.39.2





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Wed, 12 Apr 2023 20:45:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Wed, 12 Apr 2023 20:45:03 GMT) Full text and rfc822 format available.

Message #22 received at 62684-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 62684-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Zstandard: Update to 1.5.5.
Date: Wed, 12 Apr 2023 16:44:13 -0400
On Sat, Apr 08, 2023 at 01:07:12PM -0400, Leo Famulari wrote:
> This fixes a corruption bug:
> 
> https://github.com/facebook/zstd/releases/tag/v1.5.5
> 
> * gnu/packages/compression.scm (zstd)[replacement]: New field.
> (zstd-1.5.5): New variable.

Pushed as 60c97c60a53686ec321eb541b85e01b6decc2014




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 May 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.