Discussion:
Cleaning up the /bin for guix.
Roel Janssen
2018-04-24 09:34:07 UTC
Permalink
Dear Guix,

When installing ‘guix’ in a profile, the ‘bin’ directory of that profile
contains:

asn1Coding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Coding
asn1Decoding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Decoding
asn1Parser -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Parser
certtool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/certtool
gnutls-cli -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli
gnutls-cli-debug -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli-debug
gnutls-serv -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-serv
guix -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix
guix-daemon -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix-daemon
idn2 -> /gnu/store/ksyja5lbwy0mpskvn4rfi5klc00c092d-libidn2-2.0.4/bin/idn2
nettle-hash -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-hash
nettle-lfib-stream -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-lfib-stream
nettle-pbkdf2 -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-pbkdf2
ocsptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/ocsptool
pkcs1-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/pkcs1-conv
psktool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/psktool
sexp-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/sexp-conv
srptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/srptool
ssshd.scm -> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/ssshd.scm
sssh.scm -> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/sssh.scm

I suspect that the Scheme files don't belong in ‘bin’. What about the
others? Can we do better here than propagate ‘gnutls’ and ‘nettle’?

Kind regards,
Roel Janssen
Roel Janssen
2018-04-24 10:54:59 UTC
Permalink
Post by Roel Janssen
Dear Guix,
When installing ‘guix’ in a profile, the ‘bin’ directory of that profile
asn1Coding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Coding
asn1Decoding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Decoding
asn1Parser -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Parser
certtool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/certtool
gnutls-cli -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli
gnutls-cli-debug -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli-debug
gnutls-serv -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-serv
guix -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix
guix-daemon -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix-daemon
idn2 -> /gnu/store/ksyja5lbwy0mpskvn4rfi5klc00c092d-libidn2-2.0.4/bin/idn2
nettle-hash -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-hash
nettle-lfib-stream -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-lfib-stream
nettle-pbkdf2 -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-pbkdf2
ocsptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/ocsptool
pkcs1-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/pkcs1-conv
psktool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/psktool
sexp-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/sexp-conv
srptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/srptool
ssshd.scm -> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/ssshd.scm
sssh.scm -> /gnu/store/g2k7v2wv9w2ybs1glwh42w55jq25zd4h-guile-ssh-0.11.2/bin/sssh.scm
I suspect that the Scheme files don't belong in ‘bin’. What about the
others? Can we do better here than propagate ‘gnutls’ and ‘nettle’?
I attached a patch that moves the ‘guile-ssh’ bin-items to its examples
directory. Is that OK to push?

Kind regards,
Roel Janssen
Ludovic Courtès
2018-04-25 12:32:32 UTC
Permalink
From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
Date: Tue, 24 Apr 2018 12:48:32 +0200
Subject: [PATCH] gnu: guile-ssh: Move files from bin to examples directory.
* gnu/packages/ssh.scm (guile-ssh): Move files from bin to the examples
directory.
[...]
+ (invoke "mv" (string-append bin "/ssshd.scm") examples)
+ (invoke "mv" (string-append bin "/sssh.scm") examples)
Please use ‘rename-file’ instead of invoking “mv”. :-)

Otherwise LGTM!

Bonus points if you report the issue to Artyom upstream!

Thanks,
Ludo’.
Roel Janssen
2018-04-25 13:00:39 UTC
Permalink
Post by Ludovic Courtès
From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
Date: Tue, 24 Apr 2018 12:48:32 +0200
Subject: [PATCH] gnu: guile-ssh: Move files from bin to examples directory.
* gnu/packages/ssh.scm (guile-ssh): Move files from bin to the examples
directory.
[...]
+ (invoke "mv" (string-append bin "/ssshd.scm") examples)
+ (invoke "mv" (string-append bin "/sssh.scm") examples)
Please use ‘rename-file’ instead of invoking “mv”. :-)
Done, and pushed in d00026429.

Thanks!

Kind regards,
Roel Janssen
Ricardo Wurmus
2018-04-24 15:12:26 UTC
Permalink
Hi Roel,
(invoke "mv" (string-append bin "/ssshd.scm") examples)
Please don’t invoke “mv”; you can use “install-file” instead. For
simple things like creating links, removing files, moving them about,
renaming them, etc, it’s better to use the procedures that Guile
provides instead of spawning coreutils.

But the question here is: why does guile-ssh install these files to bin?
Should this be changed in the build system instead of patching this
downstream?

--
Ricardo

Ludovic Courtès
2018-04-26 12:39:00 UTC
Permalink
Hi again,
Post by Roel Janssen
When installing ‘guix’ in a profile, the ‘bin’ directory of that profile
asn1Coding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Coding
asn1Decoding -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Decoding
asn1Parser -> /gnu/store/2fg01r58vv9w41kw6drl1wnvqg7rkv9d-libtasn1-4.12/bin/asn1Parser
certtool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/certtool
gnutls-cli -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli
gnutls-cli-debug -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-cli-debug
gnutls-serv -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/gnutls-serv
guix -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix
guix-daemon -> /gnu/store/qmc24l49za832zpz4xqx9xsvw3w4hd41-guix-0.14.0-10.486de73/bin/guix-daemon
idn2 -> /gnu/store/ksyja5lbwy0mpskvn4rfi5klc00c092d-libidn2-2.0.4/bin/idn2
nettle-hash -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-hash
nettle-lfib-stream -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-lfib-stream
nettle-pbkdf2 -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/nettle-pbkdf2
ocsptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/ocsptool
pkcs1-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/pkcs1-conv
psktool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/psktool
sexp-conv -> /gnu/store/x0jf9ckd30k3nhs6bbhkrxsjmqz8phqd-nettle-3.4/bin/sexp-conv
srptool -> /gnu/store/5kih0kxmipzjw10c53hhckfzkcs7c8mm-gnutls-3.5.13/bin/srptool
Looking at this list, the next steps may be to add a “bin” output to
libtasn1 and perhaps libidn2, on the grounds that the main use of these
packages are their library, not their programs (the same cannot be said
of GnuTLS and Nettle.)

What do people think?

It would have to wait until the next core-updates but we can already
give it a spin anyway.

Thanks,
Ludo’.
Loading...