unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Cleaning up the /bin for guix.
@ 2018-04-24  9:34 Roel Janssen
  2018-04-24 10:54 ` Roel Janssen
  2018-04-26 12:39 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Roel Janssen @ 2018-04-24  9:34 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cleaning up the /bin for guix.
  2018-04-24  9:34 Cleaning up the /bin for guix Roel Janssen
@ 2018-04-24 10:54 ` Roel Janssen
  2018-04-24 15:12   ` Ricardo Wurmus
  2018-04-25 12:32   ` Ludovic Courtès
  2018-04-26 12:39 ` Ludovic Courtès
  1 sibling, 2 replies; 6+ messages in thread
From: Roel Janssen @ 2018-04-24 10:54 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]


Roel Janssen <roel@gnu.org> writes:

> 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’?

I attached a patch that moves the ‘guile-ssh’ bin-items to its examples
directory.  Is that OK to push?

Kind regards,
Roel Janssen


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-guile-ssh-Move-files-from-bin-to-examples-direct.patch --]
[-- Type: text/x-patch, Size: 1720 bytes --]

From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
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.
---
 gnu/packages/ssh.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index afd41cd8e..e5702b9b7 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -259,8 +259,18 @@ Additionally, various channel-specific options can be negotiated.")
                              (substitute* (find-files "." "\\.scm$")
                                (("\"libguile-ssh\"")
                                 (string-append "\"" libdir "/libguile-ssh\"")))
-                             #t)))))
-
+                             #t))))
+                  (add-after 'install 'remove-bin-directory
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (examples (string-append
+                                        out "/share/guile-ssh/examples")))
+                        (mkdir-p examples)
+                        (invoke "mv" (string-append bin "/ssshd.scm") examples)
+                        (invoke "mv" (string-append bin "/sssh.scm") examples)
+                        (delete-file-recursively bin)
+                        #t))))
        ;; Tests are not parallel-safe.
        #:parallel-tests? #f))
     (native-inputs `(("autoconf" ,autoconf)
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Cleaning up the /bin for guix.
  2018-04-24 10:54 ` Roel Janssen
@ 2018-04-24 15:12   ` Ricardo Wurmus
  2018-04-25 12:32   ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2018-04-24 15:12 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cleaning up the /bin for guix.
  2018-04-24 10:54 ` Roel Janssen
  2018-04-24 15:12   ` Ricardo Wurmus
@ 2018-04-25 12:32   ` Ludovic Courtès
  2018-04-25 13:00     ` Roel Janssen
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-04-25 12:32 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Roel Janssen <roel@gnu.org> skribis:

> From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> 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’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cleaning up the /bin for guix.
  2018-04-25 12:32   ` Ludovic Courtès
@ 2018-04-25 13:00     ` Roel Janssen
  0 siblings, 0 replies; 6+ messages in thread
From: Roel Janssen @ 2018-04-25 13:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Roel Janssen <roel@gnu.org> skribis:
>
>> From 9455c7b94e0010ff4038132affc7a5c796313894 Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <roel@gnu.org>
>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cleaning up the /bin for guix.
  2018-04-24  9:34 Cleaning up the /bin for guix Roel Janssen
  2018-04-24 10:54 ` Roel Janssen
@ 2018-04-26 12:39 ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-04-26 12:39 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

Hi again,

Roel Janssen <roel@gnu.org> skribis:

> 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

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’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-26 15:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24  9:34 Cleaning up the /bin for guix Roel Janssen
2018-04-24 10:54 ` Roel Janssen
2018-04-24 15:12   ` Ricardo Wurmus
2018-04-25 12:32   ` Ludovic Courtès
2018-04-25 13:00     ` Roel Janssen
2018-04-26 12:39 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).