gnu: guile-pfds bugfix

  • Done
  • quality assurance status badge
Details
5 participants
  • amirouche
  • Jack Hill
  • Ludovic Courtès
  • Maxim Cournoyer
  • Ricardo Wurmus
Owner
unassigned
Submitted by
amirouche
Severity
normal
A
A
amirouche wrote on 1 May 2019 02:52
(name . guix-patches gnu)(address . guix-patches@gnu.org)
141212fdb5356cbf7ad955a70bc26379@hyper.dev
I am not sure how to handle this case.
From 9f3ed8f52957c61bd05da50b02e3a43a976facc3 Mon Sep 17 00:00:00 2001
From: Amirouche <amirouche+dev@hyper.dev>
Date: Wed, 1 May 2019 02:47:10 +0200
Subject: [PATCH] gnu: guile-pfds bugfix

* gnu/packages/guile-xyz.scm (guile-pfds)[source]: Add patch.
* gnu/packages/patches/guile-pfds-typofix.patch: Add it.
---
gnu/packages/guile-xyz.scm | 6 +++--
gnu/packages/patches/guile-pfds-typofix.patch | 25 +++++++++++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/guile-pfds-typofix.patch

Toggle diff (57 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index d7866719b4..efdcd0fc11 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -626,7 +626,7 @@ using Guile's foreign function interface.")
(define-public guile-pfds
(package
(name "guile-pfds")
- (version "0.3")
+ (version "0.3.1")
(home-page "https://github.com/ijp/pfds")
(source (origin
(method git-fetch)
@@ -636,7 +636,9 @@ using Guile's foreign function interface.")
(sha256
(base32
"19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
- (file-name (string-append name "-" version "-checkout"))))
+ (file-name (string-append name "-" version "-checkout"))
+ (patches
+ (search-patches "guile-pfds-typofix.patch"))))
(build-system guile-build-system)
(arguments
'(#:source-directory "src"
diff --git a/gnu/packages/patches/guile-pfds-typofix.patch b/gnu/packages/patches/guile-pfds-typofix.patch
new file mode 100644
index 0000000000..05fdc46e2b
--- /dev/null
+++ b/gnu/packages/patches/guile-pfds-typofix.patch
@@ -0,0 +1,25 @@
+From 0825c9daa90e1f0517bfe98e465fb5d54ab394ac Mon Sep 17 00:00:00 2001
+From: Amirouche <amirouche+dev@hyper.dev>
+Date: Wed, 1 May 2019 01:11:51 +0200
+Subject: [PATCH] hamts: typofix s/vector/trie/
+
+---
+ hamts.sls | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hamts.sls b/hamts.sls
+index 8746141..a5310d2 100644
+--- a/hamts.sls
++++ b/hamts.sls
+@@ -307,7 +307,7 @@
+
+ (define (fold combine initial vector)
+ (define (handle-subtrie trie accum)
+- (vector-fold dispatch accum (subtrie-vector vector)))
++ (vector-fold dispatch accum (subtrie-vector trie)))
+
+ (define (handle-leaf leaf accum)
+ (combine (leaf-key leaf) (leaf-value leaf) accum))
+--
+2.19.1
+
--
2.19.1
A
A
amirouche wrote on 1 May 2019 05:42
(no subject)
(address . 35518@debbugs.gnu.org)
efe8b23d1011887a36f65620fd24e514@hyper.dev
Forgo the first, this patch is not perfect because It doesn't force an
update.
Attachment: 0001-gnu-guile-pfds-bugfix.patch (11.14 MiB)
R
R
Ricardo Wurmus wrote on 1 May 2019 08:20
Re: [bug#35518] gnu: guile-pfds bugfix
(address . amirouche@hyper.dev)(address . 35518@debbugs.gnu.org)
87imuuvgpd.fsf@elephly.net
Hi amirouche,

Toggle quote (2 lines)
> I am not sure how to handle this case.

Is this fix available upstream? Has this been reported upstream? In
either case there should be a note about the upstream status of this
change.

I’d prefer not to add a patch file here but to add a build phase after
unpack that uses substitute* to patch the file.

--
Ricardo
A
A
amirouche wrote on 1 May 2019 12:58
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 35518@debbugs.gnu.org)
3e5e53e5a9abd81fb7f58a63d890b065@hyper.dev
On 2019-05-01 08:20, Ricardo Wurmus wrote:
Toggle quote (6 lines)
> Hi amirouche,
>
>> I am not sure how to handle this case.
>
> Is this fix available upstream?

It is not available upstream. The maintainer is unresponsive for several
months (years?).

Toggle quote (2 lines)
> Has this been reported upstream?

Toggle quote (3 lines)
> In either case there should be a note about the upstream status of this
> change.

I think pfds would need a new maintainer.

Toggle quote (3 lines)
> I’d prefer not to add a patch file here but to add a build phase after
> unpack that uses substitute* to patch the file.

Ok I will do that.
A
A
amirouche wrote on 1 May 2019 13:46
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 35518@debbugs.gnu.org)
3279cee19940b90be0bbe34b6619fe89@hyper.dev
On 2019-05-01 08:20, Ricardo Wurmus wrote:
Toggle quote (5 lines)
>
> I’d prefer not to add a patch file here but to add a build phase after
> unpack that uses substitute* to patch the file.
>

new patch
From de22b734f37c2701121b990fe1fda5ead67ece31 Mon Sep 17 00:00:00 2001
From: Amirouche <amirouche+dev@hyper.dev>
Date: Wed, 1 May 2019 13:41:59 +0200
Subject: [PATCH] gnu: guile-pfds bugfix

- gnu/packages/guile-xyz.scm(guile-pfds)[version]: upgrade to 0.3-0
- gnu/packages/guile-xyz.scm(guile-pfds)[commit]: hardcode v0.3
- gnu/packages/guile-xyz.scm(guile-pfds)[arguments]: New phase 'patch'
---
gnu/packages/guile-xyz.scm | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 03fd63837e..c2f1e2c2f3 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
-;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
+;;; Copyright © 2016, 2019 Amirouche <amirouche@hypermove.net>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2017 David Thompson <davet@gnu.org>
@@ -626,13 +626,13 @@ using Guile's foreign function interface.")
(define-public guile-pfds
(package
(name "guile-pfds")
- (version "0.3")
+ (version "0.3-0")
(home-page "https://github.com/ijp/pfds")
(source (origin
(method git-fetch)
(uri (git-reference
(url home-page)
- (commit (string-append "v" version))))
+ (commit "v0.3")))
(sha256
(base32
"19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
@@ -641,7 +641,13 @@ using Guile's foreign function interface.")
(arguments
'(#:source-directory "src"
#:phases (modify-phases %standard-phases
- (add-after 'unpack 'move-files-around
+ (add-after 'unpack 'patch
+ (lambda _
+ (substitute* "hamts.sls"
+ (("subtrie-vector vector")
+ "subtrie-vector trie"))
+ #t))
+ (add-after 'patch 'move-files-around
(lambda _
;; Move files under a pfds/ directory to reflect the
;; module hierarchy.
--
2.19.1
L
L
Ludovic Courtès wrote on 6 May 2019 10:05
(address . amirouche@hyper.dev)
87bm0gnh2t.fsf@gnu.org
Hi Amirouche,

amirouche@hyper.dev skribis:

Toggle quote (17 lines)
> On 2019-05-01 08:20, Ricardo Wurmus wrote:
>>
>> I’d prefer not to add a patch file here but to add a build phase after
>> unpack that uses substitute* to patch the file.
>>
>
> new patch
>
> From de22b734f37c2701121b990fe1fda5ead67ece31 Mon Sep 17 00:00:00 2001
> From: Amirouche <amirouche+dev@hyper.dev>
> Date: Wed, 1 May 2019 13:41:59 +0200
> Subject: [PATCH] gnu: guile-pfds bugfix
>
> - gnu/packages/guile-xyz.scm(guile-pfds)[version]: upgrade to 0.3-0
> - gnu/packages/guile-xyz.scm(guile-pfds)[commit]: hardcode v0.3
> - gnu/packages/guile-xyz.scm(guile-pfds)[arguments]: New phase 'patch'

[...]

Toggle quote (7 lines)
> + (add-after 'unpack 'patch
> + (lambda _
> + (substitute* "hamts.sls"
> + (("subtrie-vector vector")
> + "subtrie-vector trie"))
> + #t))

Like Ricardo wrote: “there should be a note about the upstream status of
this change.” Someone reading this cannot understand what this change
is about nor what upstream thinks about it.

Could you address this issue?

Bonus points if you change it to follow our conventions for the commit
log and for the Git checkouts. :-)


Thanks in advance,
Ludo’.
L
L
Ludovic Courtès wrote on 6 May 2019 10:05
(address . amirouche@hyper.dev)
87a7g0nh27.fsf@gnu.org
Hi Amirouche,

amirouche@hyper.dev skribis:

Toggle quote (17 lines)
> On 2019-05-01 08:20, Ricardo Wurmus wrote:
>>
>> I’d prefer not to add a patch file here but to add a build phase after
>> unpack that uses substitute* to patch the file.
>>
>
> new patch
>
> From de22b734f37c2701121b990fe1fda5ead67ece31 Mon Sep 17 00:00:00 2001
> From: Amirouche <amirouche+dev@hyper.dev>
> Date: Wed, 1 May 2019 13:41:59 +0200
> Subject: [PATCH] gnu: guile-pfds bugfix
>
> - gnu/packages/guile-xyz.scm(guile-pfds)[version]: upgrade to 0.3-0
> - gnu/packages/guile-xyz.scm(guile-pfds)[commit]: hardcode v0.3
> - gnu/packages/guile-xyz.scm(guile-pfds)[arguments]: New phase 'patch'

[...]

Toggle quote (7 lines)
> + (add-after 'unpack 'patch
> + (lambda _
> + (substitute* "hamts.sls"
> + (("subtrie-vector vector")
> + "subtrie-vector trie"))
> + #t))

Like Ricardo wrote: “there should be a note about the upstream status of
this change.” Someone reading this cannot understand what this change
is about nor what upstream thinks about it.

Could you address this issue?

Bonus points if you change it to follow our conventions for the commit
log and for the Git checkouts. :-)


Thanks in advance,
Ludo’.
R
R
Ricardo Wurmus wrote on 6 May 2019 13:09
Re: [bug#35518] (no subject)
(address . amirouche@hyper.dev)(address . 35518@debbugs.gnu.org)
871s1brg93.fsf@elephly.net
amirouche@hyper.dev writes:

Toggle quote (3 lines)
> Forgo the first, this patch is not perfect because It doesn't force an
> update.

The attached patch is more than 15MB in size. I haven’t looked at it
but I guess that’s not correct.

--
Ricardo
A
A
amirouche wrote on 6 May 2019 14:42
Re: [bug#35518] [PATCH] fix guile-pfds bug
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 35518@debbugs.gnu.org)
053f858c51866da5ffe2ed2b85f58d9d@hyper.dev
On 2019-05-06 13:09, Ricardo Wurmus wrote:
Toggle quote (8 lines)
> amirouche@hyper.dev writes:
>
>> Forgo the first, this patch is not perfect because It doesn't force an
>> update.
>
> The attached patch is more than 15MB in size. I haven’t looked at it
> but I guess that’s not correct.

I am not sure which patch you are referring to.

Here is another patch. I followed the "Submitting Patches" section
from the manual.
Attachment: 0001-gnu-guile-pfds-bugfix.patch (.01 MiB)
R
R
Ricardo Wurmus wrote on 6 May 2019 15:10
(address . amirouche@hyper.dev)(address . 35518@debbugs.gnu.org)
87woj3pw3t.fsf@elephly.net
amirouche@hyper.dev writes:

Toggle quote (11 lines)
> On 2019-05-06 13:09, Ricardo Wurmus wrote:
>> amirouche@hyper.dev writes:
>>
>>> Forgo the first, this patch is not perfect because It doesn't force an
>>> update.
>>
>> The attached patch is more than 15MB in size. I haven’t looked at it
>> but I guess that’s not correct.
>
> I am not sure which patch you are referring to.

The one you attached in the message with Message-Id
<efe8b23d1011887a36f65620fd24e514@hyper.dev>

--
Ricardo
A
A
Amirouche wrote on 26 Jun 2019 03:47
upstream unresponsive
(address . 35518@debbugs.gnu.org)
266b424565f631ad730ba558feaac4de@hyper.dev
I had no response from Ian J. Price the original maintainer of pfds.

Can some else try to reach him?
J
J
Jack Hill wrote on 6 Jun 2020 05:33
guile-pfds hamts fix
(name . Amirouche)(address . amirouche+dev@hyper.dev)(address . 35518@debbugs.gnu.org)
alpine.DEB.2.20.2006052319220.5735@marsh.hcoop.net
I came across this bug today. It seems like upstream activity on
guile-pfds is dorment, unfortunately, so it would be good to get this fix
in Guix. Perhaps all the needs to be done is directing readers to the
proposed fix at the upstream repository.

Best,
Jack
M
M
Maxim Cournoyer wrote on 14 Jul 2021 04:43
Re: bug#35518: gnu: guile-pfds bugfix
(address . amirouche@hyper.dev)
878s29r4wv.fsf_-_@gmail.com
amirouche@hyper.dev writes:

Toggle quote (14 lines)
> On 2019-05-06 13:09, Ricardo Wurmus wrote:
>> amirouche@hyper.dev writes:
>>
>>> Forgo the first, this patch is not perfect because It doesn't force an
>>> update.
>> The attached patch is more than 15MB in size. I haven’t looked at
>> it
>> but I guess that’s not correct.
>
> I am not sure which patch you are referring to.
>
> Here is another patch. I followed the "Submitting Patches" section
> from the manual.

Applied as 51194ca1e845d5f3954cb9dd1fef79e930dc3777, adding only the
patching phase with an explanatory comment.

Thanks!

Closing.

Maxim
Closed
?