GNU bug report logs -
#62008
[PATCH 0/2] Update Disarchive to 0.5.0
Previous Next
To reply to this bug, email your comments to 62008 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
samplet <at> ngyro.com, mail <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, rekado <at> elephly.net, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Mon, 06 Mar 2023 19:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Simon Tournier <zimon.toutoune <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
samplet <at> ngyro.com, mail <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, rekado <at> elephly.net, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
.
(Mon, 06 Mar 2023 19:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
The first patch removes an annoyance. Now,
guix shell disarchive -- disarchive disassemble foo
works without the need to propagate Guile-LZMA or Guile-Gcrypt; which need
Guile itself to trigger the related search paths.
The second patch is a trivial update but since core Guix depends on
Disarchive, please double check. :-)
For instance, guix-minimal fails but it also fails before this patch series.
Cheers,
simon
Simon Tournier (2):
gnu: disarchive: Wrap program instead of using propagated inputs..
gnu: disarchive: Update to 0.5.0.
gnu/packages/backup.scm | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
base-commit: fe9bcf9db24e6f7849ad870e0853c251517fd6f0
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Mon, 06 Mar 2023 19:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 62008 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/backup.scm (disarchive)[arguments]: Add phase after install
to wrap program.
[inputs]: Add guile-gcrypt and guile-lzma.
[propagated-inputs]: Remove it.
---
gnu/packages/backup.scm | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 7be0c813bb..7fe2e80d39 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2022 Feng Shu <tumashu <at> 163.com>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune <at> gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1230,6 +1231,35 @@ (define-public disarchive
(base32
"1pql8cspsxyx8cpw3xyhirnisv6rb4vj5mxr1d7w9la72q740n8s"))))
(build-system gnu-build-system)
+ (arguments
+ (list
+ #:modules `((ice-9 popen)
+ ,@%gnu-build-system-modules)
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((effective
+ (read (open-pipe* OPEN_READ
+ (string-append #$guile-3.0 "/bin/guile")
+ "-c" "(write (effective-version))")))
+ (scm-dir (string-append "/share/guile/site/" effective))
+ (go-dir (string-append "/lib/guile/" effective
+ "/site-ccache/"))
+ (modules (list #$output
+ #$guile-bytestructures
+ #$guile-gcrypt
+ #$guile-lzma))
+ (scm-path
+ (map (lambda (module) (string-append module scm-dir))
+ modules))
+ (go-path
+ (map (lambda (module) (string-append module scm-dir))
+ modules)))
+ (wrap-program (string-append #$output "/bin/disarchive")
+ `("PATH" ":" prefix (,(string-append #$output "/bin")))
+ `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+ `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))))))))
(native-inputs
(list autoconf
automake
@@ -1239,9 +1269,7 @@ (define-public disarchive
guile-lzma
guile-quickcheck))
(inputs
- (list guile-3.0 zlib))
- (propagated-inputs
- (list guile-gcrypt guile-lzma))
+ (list guile-3.0 guile-gcrypt guile-lzma zlib))
(home-page "https://ngyro.com/software/disarchive.html")
(synopsis "Software archive disassembler")
(description "Disarchive can disassemble software archives into data
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Mon, 06 Mar 2023 19:21:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 62008 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/backup.scm (disarchive): Update to 0.5.0.
---
gnu/packages/backup.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 7fe2e80d39..362da0a219 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1222,14 +1222,14 @@ (define-public burp
(define-public disarchive
(package
(name "disarchive")
- (version "0.4.0")
+ (version "0.5.0")
(source (origin
(method url-fetch)
(uri (string-append "https://files.ngyro.com/disarchive/"
"disarchive-" version ".tar.gz"))
(sha256
(base32
- "1pql8cspsxyx8cpw3xyhirnisv6rb4vj5mxr1d7w9la72q740n8s"))))
+ "16sjplkn9nr7zhfrqll7l1m2b2j4hg8k29p6bqjap9fkj6zpn2q2"))))
(build-system gnu-build-system)
(arguments
(list
--
2.38.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Tue, 07 Mar 2023 09:50:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Hi Simon,
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> * gnu/packages/backup.scm (disarchive)[arguments]: Add phase after install
> to wrap program.
> [inputs]: Add guile-gcrypt and guile-lzma.
> [propagated-inputs]: Remove it.
For this package, I have a slight preference for keeping propagated
inputs so that one can use Disarchive as a library.
WDYT?
Some comments while at it…
[...]
> + (let* ((effective
> + (read (open-pipe* OPEN_READ
> + (string-append #$guile-3.0 "/bin/guile")
> + "-c" "(write (effective-version))")))
(guix build guile-build-system) exports ‘target-guile-effective-version’
to do that; it’s more convenient.
> + (modules (list #$output
> + #$guile-bytestructures
> + #$guile-gcrypt
> + #$guile-lzma))
This should use (this-package-input "guile-bytestructures“) and similar,
for consistency.
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Tue, 07 Mar 2023 09:53:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> * gnu/packages/backup.scm (disarchive): Update to 0.5.0.
Applied, thanks! :-)
Ludo'.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Tue, 07 Mar 2023 10:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
On mar., 07 mars 2023 at 10:49, Ludovic Courtès <ludo <at> gnu.org> wrote:
> For this package, I have a slight preference for keeping propagated
> inputs so that one can use Disarchive as a library.
Well, maybe I am missing a point but currently for Disarchive standalone,
--8<---------------cut here---------------start------------->8---
$ guix shell -C disarchive -- disarchive disassemble hello-2.12.1
Backtrace:
In ice-9/boot-9.scm:
[...]
ice-9/boot-9.scm:3329:6: In procedure resolve-interface:
no code for module (gcrypt hash)
--8<---------------cut here---------------end--------------->8---
And I need to add Guile for triggering the search patch. And I find
that annoying,
$ guix shell -C disarchive guile -- disarchive disassemble hello-2.12.1
It does not appear to me straightforward to know that.
> WDYT?
Since we have two usages of Disarchive, the standalone CLI and the
library, maybe we should have two packages: disarchive and
guile-disarchive.
WDYT?
> Some comments while at it…
Thanks. That’s interesting because I took inspiration from the packages
Cuirass and Dezyne. :-)
>> + (let* ((effective
>> + (read (open-pipe* OPEN_READ
>> + (string-append #$guile-3.0 "/bin/guile")
>> + "-c" "(write (effective-version))")))
>
> (guix build guile-build-system) exports ‘target-guile-effective-version’
> to do that; it’s more convenient.
I did not know. Well, I will adapt Cuirass and Dezyne too, IIUC. :-)
>> + (modules (list #$output
>> + #$guile-bytestructures
>> + #$guile-gcrypt
>> + #$guile-lzma))
>
> This should use (this-package-input "guile-bytestructures“) and similar,
> for consistency.
Ok. Just for my understanding about the "consistency”, is the procedure
’make-gitolite’ from (gnu packages version-conrol) consistent?
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Fri, 10 Mar 2023 08:19:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Hi Simon!
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> On mar., 07 mars 2023 at 10:49, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> For this package, I have a slight preference for keeping propagated
>> inputs so that one can use Disarchive as a library.
>
> Well, maybe I am missing a point but currently for Disarchive standalone,
>
> $ guix shell -C disarchive -- disarchive disassemble hello-2.12.1
> Backtrace:
Hmm good point. So maybe we need to wrap after all, and also keep
propagated inputs (as an example, (guix build download) uses the
Disarchive modules directly, not the command.)
I realize that I worked around it in ‘etc/disarchive-manifest.scm’.
>>> + (let* ((effective
>>> + (read (open-pipe* OPEN_READ
>>> + (string-append #$guile-3.0 "/bin/guile")
>>> + "-c" "(write (effective-version))")))
>>
>> (guix build guile-build-system) exports ‘target-guile-effective-version’
>> to do that; it’s more convenient.
>
> I did not know. Well, I will adapt Cuirass and Dezyne too, IIUC. :-)
Awesome.
>
>>> + (modules (list #$output
>>> + #$guile-bytestructures
>>> + #$guile-gcrypt
>>> + #$guile-lzma))
>>
>> This should use (this-package-input "guile-bytestructures“) and similar,
>> for consistency.
>
> Ok. Just for my understanding about the "consistency”, is the procedure
> ’make-gitolite’ from (gnu packages version-conrol) consistent?
It should use ‘this-package-input’ as well, to keep input fields and
inheritance meaningful.
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Fri, 10 Mar 2023 12:10:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
On ven., 10 mars 2023 at 09:17, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hmm good point. So maybe we need to wrap after all, and also keep
> propagated inputs (as an example, (guix build download) uses the
> Disarchive modules directly, not the command.)
I am proposing to have ’package/inherit’,
1. ’disarchive’: the standalone CLI with wrap
2. ’guile-disarchive’: the library with propagated-inputs
WDYT?
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Fri, 10 Mar 2023 16:45:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> On ven., 10 mars 2023 at 09:17, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> Hmm good point. So maybe we need to wrap after all, and also keep
>> propagated inputs (as an example, (guix build download) uses the
>> Disarchive modules directly, not the command.)
>
> I am proposing to have ’package/inherit’,
>
> 1. ’disarchive’: the standalone CLI with wrap
> 2. ’guile-disarchive’: the library with propagated-inputs
I think having a single package is more convenient: it would both
propagate inputs and wrap the binaries as you proposed.
Ludo’.
bug closed, send any further explanations to
62008 <at> debbugs.gnu.org and Simon Tournier <zimon.toutoune <at> gmail.com>
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 08 Aug 2023 15:28:02 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 16 Aug 2023 17:12:09 GMT)
Full text and
rfc822 format available.
Removed tag(s) patch.
Request was from
Simon Tournier <zimon.toutoune <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 16 Aug 2023 17:12:09 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Wed, 16 Aug 2023 17:29:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 62008 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Ludo,
You closed this but the issue is still there, no? :-)
On Fri, 10 Mar 2023 at 17:44, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
>
>> On ven., 10 mars 2023 at 09:17, Ludovic Courtès <ludo <at> gnu.org> wrote:
>>
>>> Hmm good point. So maybe we need to wrap after all, and also keep
>>> propagated inputs (as an example, (guix build download) uses the
>>> Disarchive modules directly, not the command.)
>>
>> I am proposing to have ’package/inherit’,
>>
>> 1. ’disarchive’: the standalone CLI with wrap
>> 2. ’guile-disarchive’: the library with propagated-inputs
>
> I think having a single package is more convenient: it would both
> propagate inputs and wrap the binaries as you proposed.
Because of this error:
--8<---------------cut here---------------start------------->8---
$ guix shell -C disarchive -- disarchive disassemble hello-2.12.1
Backtrace:
In ice-9/boot-9.scm:
[...]
ice-9/boot-9.scm:3329:6: In procedure resolve-interface:
no code for module (gcrypt hash)
--8<---------------cut here---------------end--------------->8---
solved by adding the package guile,
$ guix shell -C disarchive guile -- disarchive disassemble hello-2.12.1
then, I think the contrary: having two packages is more convenient.
Well, from my point of view, two packages would be consistent with other
Guix packages as pandoc and ghc-pandoc for instance. Plain name for the
CLI and <language>-name for the library in <language>, somehow. The
<language> compiler/interpreter propagated/wrapped only with the CLI.
Somehow, I am proposing this attached patch.
[p.patch (text/x-diff, inline)]
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index d484c34826..e60570b037 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1256,9 +1256,9 @@ (define-public burp
backup.")
(license license:agpl3)))
-(define-public disarchive
+(define-public guile-disarchive
(package
- (name "disarchive")
+ (name "guile-disarchive")
(version "0.5.0")
(source (origin
(method url-fetch)
@@ -1290,6 +1290,42 @@ (define-public disarchive
compression parameters used by Gzip.")
(license license:gpl3+)))
+(define-public disarchive
+ (package/inherit guile-disarchive
+ (name "disarchive")
+ (arguments
+ (list
+ #:modules `((ice-9 popen)
+ ,@%gnu-build-system-modules)
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((effective
+ (read (open-pipe* OPEN_READ
+ (string-append #$guile-3.0 "/bin/guile")
+ "-c" "(write (effective-version))")))
+ (scm-dir (string-append "/share/guile/site/" effective))
+ (go-dir (string-append "/lib/guile/" effective
+ "/site-ccache/"))
+ (modules (list #$output
+ #$guile-bytestructures
+ #$guile-gcrypt
+ #$guile-lzma))
+ (scm-path
+ (map (lambda (module) (string-append module scm-dir))
+ modules))
+ (go-path
+ (map (lambda (module) (string-append module scm-dir))
+ modules)))
+ (wrap-program (string-append #$output "/bin/disarchive")
+ `("PATH" ":" prefix (,(string-append #$output "/bin")))
+ `("GUILE_LOAD_PATH" ":" prefix ,scm-path)
+ `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path))))))))
+ (inputs
+ (list guile-3.0 guile-gcrypt guile-lzma zlib))
+ (propagated-inputs (list))))
+
(define-public borgmatic
(package
(name "borgmatic")
[Message part 3 (text/plain, inline)]
Then tweaking around.
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Fri, 18 Aug 2023 13:57:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> solved by adding the package guile,
>
> $ guix shell -C disarchive guile -- disarchive disassemble hello-2.12.1
>
> then, I think the contrary: having two packages is more convenient.
Hi! Yes, I think you mentioned it before. To me, there’s a precedent
in favor of the status quo (a single package): quite a few other
packages (guix, cuirass, mumi, guile-smc, etc.) are also both a Guile
library and a set of commands, and they’re provided as a single package.
I think we shouldn’t lose our hair over it anyway. :-)
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Fri, 18 Aug 2023 15:04:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
On Fri, 18 Aug 2023 at 15:56, Ludovic Courtès <ludo <at> gnu.org> wrote:
> > solved by adding the package guile,
> >
> > $ guix shell -C disarchive guile -- disarchive disassemble hello-2.12.1
> >
> > then, I think the contrary: having two packages is more convenient.
>
> Hi! Yes, I think you mentioned it before. To me, there’s a precedent
> in favor of the status quo (a single package): quite a few other
> packages (guix, cuirass, mumi, guile-smc, etc.) are also both a Guile
> library and a set of commands, and they’re provided as a single package.
Hum, thus the status quo is in favor of my initial patch [1]. ;-)
--8<---------------cut here---------------start------------->8---
$ for tool in guix cuirass mumi; do
guix shell -C $tool -- $tool --version
done
guix shell -C guile-smc -- smc --version
> > guix (GNU Guix) 1.4.0-7.44bbfc2
Copyright (C) 2023 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
cuirass (Cuirass) 1.1.0-16.b825967
Copyright (C) 2021 the Cuirass authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
`mumi search QUERY':
search mumi for issues.
[...]
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /gnu/store/8jmrygas3krkdrqalj0g0cp273whm84s-guile-smc-0.6.0/bin/.smc-real
;;; compiled /home/simon/.cache/guile/ccache/3.0-LE-8-4.6/gnu/store/8jmrygas3krkdrqalj0g0cp273whm84s-guile-smc-0.6.0/bin/.smc-real.go
smc 0.6.0
Copyright (C) 2021-2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Artyom V. Poptsov.
--8<---------------cut here---------------end--------------->8---
Please note that cuirass, mumi and guile-smc does not propagate any
inputs. Hum, I do not know where cuirass and mumi are used as library,
but that’s another story. :-)
Well, I can live with one single package – although I think it’s
confusing :-) – however I cannot live without “guix shell -C disarchive
-- disarchive”. Therefore, could you send a patch that fixes this and
suits your needs?
Cheers,
simon
1: https://issues.guix.gnu.org/62008#1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62008
; Package
guix-patches
.
(Sat, 19 Aug 2023 14:58:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 62008 <at> debbugs.gnu.org (full text, mbox):
Re,
On Fri, 18 Aug 2023 at 15:56, Ludovic Courtès <ludo <at> gnu.org> wrote:
> I think we shouldn’t lose our hair over it anyway. :-)
For sure. Just to point that the two packages way is somehow
shared. ;-) At least in Python context, for example see:
Re: poetry: python-poetry?
by Hilton Chain <hako <at> ultrarare.space>
Mon, 31 Jul 2023 10:05:54 +0800
https://yhetil.org/guix/87leew25tp.wl-hako <at> ultrarare.space
Re: poetry: python-poetry?
by Lars-Dominik Braun <lars <at> 6xq.net>
Thu, 27 Jul 2023 09:03:34 +0200
https://yhetil.org/guix/ZMIWxvt4jyx9mv--@noor.fritz.box
And I do not see why Guile and disarchive would be an exception.
That’s said, it’s time to go to the hairdresser for brushing my hair
before loosing them. ;-)
Cheers,
simon
This bug report was last modified 1 year and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.