[PATCH 0/2] Remove X libraries from bare-bones system closure.

  • Done
  • quality assurance status badge
Details
3 participants
  • Jan Nieuwenhuizen
  • Mathieu Othacehe
  • Marius Bakke
Owner
unassigned
Submitted by
Mathieu Othacehe
Severity
normal
M
M
Mathieu Othacehe wrote on 6 Jun 2020 11:14
(address . guix-patches@gnu.org)(name . Mathieu Othacehe)(address . othacehe@gnu.org)
20200606091428.32138-1-othacehe@gnu.org
Hello,

Here's a small serie to remove X libraries from bare-bones system closure.

Thanks,

Mathieu

Mathieu Othacehe (2):
gnu: Add openssh-no-x.
system: bare-bones: Remove dependency to X libraries.

gnu/packages/ssh.scm | 8 ++++++++
gnu/system/examples/bare-bones.tmpl | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)

--
2.26.2
M
M
Mathieu Othacehe wrote on 6 Jun 2020 11:15
[PATCH 1/2] gnu: Add openssh-no-x.
(address . 41735@debbugs.gnu.org)(name . Mathieu Othacehe)(address . othacehe@gnu.org)
20200606091552.32625-1-othacehe@gnu.org
* gnu/packages/ssh.scm (openssh-no-x): New variable.
---
gnu/packages/ssh.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 73841db6b5..13cf305695 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -239,6 +239,14 @@ Additionally, various channel-specific options can be negotiated.")
"See LICENSE in the distribution."))
(home-page "https://www.openssh.com/")))
+;; OpenSSH without X support. This allows to use OpenSSH without dragging X
+;; libraries to the closure.
+(define-public openssh-no-x
+ (package
+ (inherit openssh)
+ (name "openssh-no-x")
+ (inputs (alist-delete "xauth" (package-inputs openssh)))))
+
(define-public guile-ssh
(package
(name "guile-ssh")
--
2.26.2
M
M
Mathieu Othacehe wrote on 6 Jun 2020 11:15
[PATCH 2/2] system: bare-bones: Remove dependency to X libraries.
(address . 41735@debbugs.gnu.org)(name . Mathieu Othacehe)(address . othacehe@gnu.org)
20200606091552.32625-2-othacehe@gnu.org
Use "openssh-no-x" to prevent the inclusion of X libraries to the bare-bones
system closure.

* gnu/system/examples/bare-bones.tmpl (operating-system)[services]: Use
openssh-no-x instead of openssh.
---
gnu/system/examples/bare-bones.tmpl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 4f30a5b756..deed3c6c7a 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -3,7 +3,7 @@
(use-modules (gnu))
(use-service-modules networking ssh)
-(use-package-modules screen)
+(use-package-modules screen ssh)
(operating-system
(host-name "komputilo")
@@ -46,5 +46,6 @@
(services (append (list (service dhcp-client-service-type)
(service openssh-service-type
(openssh-configuration
+ (openssh openssh-no-x)
(port-number 2222))))
%base-services)))
--
2.26.2
J
J
Jan Nieuwenhuizen wrote on 6 Jun 2020 12:00
Re: [bug#41735] [PATCH 1/2] gnu: Add openssh-no-x.
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)
87o8pw4ipd.fsf@gnu.org
Mathieu Othacehe writes:

Hello!

Toggle quote (1 lines)
> * gnu/packages/ssh.scm (openssh-no-x): New variable.
[..]
Toggle quote (1 lines)
> diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
[..]
Toggle quote (8 lines)
> +;; OpenSSH without X support. This allows to use OpenSSH without dragging X
> +;; libraries to the closure.
> +(define-public openssh-no-x
> + (package
> + (inherit openssh)
> + (name "openssh-no-x")
> + (inputs (alist-delete "xauth" (package-inputs openssh)))))

I like it! Maybe use -sans-x?

Two remarks: after merging, we may want to use openssh-no-x for the Hurd
too and drop this from openssh proper:

,@(if (hurd-target?)
'()
`(("xauth" ,xauth))))) ; for 'ssh -X' and 'ssh -Y'

We have this bit because xauth does not compile for the Hurd yet,
but it's kind of a kludge.

Not to hold this up and maybe we should take this discussion
elsewhere...but I have a ~5y old, bit-rotting stack of LilyPond cross
build packages (foo-SANS-X) laying around. At the time--much to my
suprise--I found the LilyPond community less than enthousiastic to move
their binary package builds to Guix (yet); but adding these -NO-X
packages felt a bit weird. So, I wonder if we could address the X'yness
of packages in a more structured way, that would be nice...

Greetings,
Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
M
M
Marius Bakke wrote on 6 Jun 2020 14:40
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
87r1ustlip.fsf@gnu.org
Mathieu Othacehe <m.othacehe@gmail.com> writes:

Toggle quote (21 lines)
> * gnu/packages/ssh.scm (openssh-no-x): New variable.
> ---
> gnu/packages/ssh.scm | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
> index 73841db6b5..13cf305695 100644
> --- a/gnu/packages/ssh.scm
> +++ b/gnu/packages/ssh.scm
> @@ -239,6 +239,14 @@ Additionally, various channel-specific options can be negotiated.")
> "See LICENSE in the distribution."))
> (home-page "https://www.openssh.com/")))
>
> +;; OpenSSH without X support. This allows to use OpenSSH without dragging X
> +;; libraries to the closure.
> +(define-public openssh-no-x
> + (package
> + (inherit openssh)
> + (name "openssh-no-x")
> + (inputs (alist-delete "xauth" (package-inputs openssh)))))

Maybe add a synopsis so users don't have to guess what this package
does. I.e. (synopsis "OpenSSH client and server without X11 support").

I also think 'openssh-sans-x' is better, and is already a fairly common
convention. :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7bjs4ACgkQoqBt8qM6
VPrxDwf/XYrgDS2INU01UKLxm5vX9SYGvhVbxTwfRX6xsJJPtDt67AQEmHCQcFcy
LDFw7gKcKThfjfqf6mzbutsmAUBFtYTKTfdAxxmX3OP0GlMZc1x/CDIl+FJvXcN4
k7BnhFTfpoaxWvesOehKjGGqkfyZquDSHL6r4lZRXiCjl+UwdTY0vxMheba0/7W5
L29NkEsu5Lu+sh3yg6AIlCLGULSCrBRyscu5ftCCmr+DrdgnbaO3g5vpg0IG8cVa
b74/+hmk+xk2bfBc3zwjMQWZFCkTpNDpjDMgTB9HKuVFH2ADqTI7opugNVJjPXeo
EBAFhkMhvEtJPBCI5BOQb7tAccLV+A==
=Hubd
-----END PGP SIGNATURE-----

M
M
Mathieu Othacehe wrote on 8 Jun 2020 11:23
(name . Marius Bakke)(address . marius@gnu.org)(address . 41735-done@debbugs.gnu.org)
87k10hc3ma.fsf@gmail.com
Hello Marius,

Toggle quote (6 lines)
> Maybe add a synopsis so users don't have to guess what this package
> does. I.e. (synopsis "OpenSSH client and server without X11 support").
>
> I also think 'openssh-sans-x' is better, and is already a fairly common
> convention. :-)

Fixed and pushed,

Thanks,

Mathieu
Closed
M
M
Mathieu Othacehe wrote on 8 Jun 2020 11:27
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)(address . 41735@debbugs.gnu.org)
87ftb5c3h6.fsf@gmail.com
Hey Jan,

Toggle quote (10 lines)
> Two remarks: after merging, we may want to use openssh-no-x for the Hurd
> too and drop this from openssh proper:
>
> ,@(if (hurd-target?)
> '()
> `(("xauth" ,xauth))))) ; for 'ssh -X' and 'ssh -Y'
>
> We have this bit because xauth does not compile for the Hurd yet,
> but it's kind of a kludge.

I just did push the serie, so I think you could maybe adapt the openssh
package used by the Hurd and remove the snippet above, if it's ok for
you?

Toggle quote (8 lines)
> Not to hold this up and maybe we should take this discussion
> elsewhere...but I have a ~5y old, bit-rotting stack of LilyPond cross
> build packages (foo-SANS-X) laying around. At the time--much to my
> suprise--I found the LilyPond community less than enthousiastic to move
> their binary package builds to Guix (yet); but adding these -NO-X
> packages felt a bit weird. So, I wonder if we could address the X'yness
> of packages in a more structured way, that would be nice...

Yes I share your concerns on that one, sadly I don't have much better to
propose, and I think it's important to have a bare-bones template as
minimal as possible. Anyway, this is not a big hack and it will be easy
to revert it if we find a better way.

Thanks,

Mathieu
J
J
Jan Nieuwenhuizen wrote on 8 Jun 2020 15:19
(name . Mathieu Othacehe)(address . m.othacehe@gmail.com)(address . 41735@debbugs.gnu.org)
87sgf566gg.fsf@gnu.org
Mathieu Othacehe writes:

Hi Mathieu,

Toggle quote (4 lines)
> I just did push the serie, so I think you could maybe adapt the openssh
> package used by the Hurd and remove the snippet above, if it's ok for
> you?

Yes, sure; I'm right on it.

I just sent my final patch set for wip-hurd-vm, still using plain
"openssh" -- will create an and test updated patch.

Toggle quote (13 lines)
>> Not to hold this up and maybe we should take this discussion
>> elsewhere...but I have a ~5y old, bit-rotting stack of LilyPond cross
>> build packages (foo-SANS-X) laying around. At the time--much to my
>> suprise--I found the LilyPond community less than enthousiastic to move
>> their binary package builds to Guix (yet); but adding these -NO-X
>> packages felt a bit weird. So, I wonder if we could address the X'yness
>> of packages in a more structured way, that would be nice...
>
> Yes I share your concerns on that one, sadly I don't have much better to
> propose, and I think it's important to have a bare-bones template as
> minimal as possible. Anyway, this is not a big hack and it will be easy
> to revert it if we find a better way.

Okay...I'm sure this will come around another time.

Janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
?