unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>, 55912@debbugs.gnu.org
Subject: [bug#55912] [PATCH] home: Add OpenSSH service.
Date: Sat, 11 Jun 2022 21:51:20 +0200	[thread overview]
Message-ID: <d53fd0704720c45569e610345f275e225e37c4bd.camel@telenet.be> (raw)
In-Reply-To: <20220611164931.21953-1-ludo@gnu.org>

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

Hi,

Some comments on the code.

Ludovic Courtès schreef op za 11-06-2022 om 18:49 [+0200]:
> +  (port
> +   (maybe-integer 'disabled)
> +   "TCP port number to connect to.")

TCP only allows natural numbers up to some bound, and in practice
implementations only support non-zero natural numbers, so maybe the
predicate can be refined a bit?

> +                             (formatted-message
> +                              (G_ "~s: unsupported address family")

Maybe a hint:

  hint: AF_INET and AF_INET6 are supported.


> + (define (serialize-string field value)
> +   (string-append "  " (serialize-field-name field)
> +                  " " value "\n"))

> +  (name
> +   (string)
> +   "Name of this host declaration.")
> [...]
> +  (proxy-command
> +   (maybe-string 'disabled)

Attila Lendvai has a patch series at 54674 that changes 'disabled' ->
*unspecified* -- I think it would be better to apply that patch series
first.

Wouldn't the value need to be escaped?  Or at least a check that it
doesn't contain special characters like \n or whatever special
charaters an OpenSSH configuration has.


>+ (define* (file-join name files #:optional (delimiter " "))
>+  "Return a file in the store called @var{name} that is the
>+ concatenation
>+ of all the file-like objects listed in @var{files}, with
@var{delimited}
>+ inserted after each of them."

Does this work for files with non-ASCII characters and for file names
that contain non-ASCII characters?

>+          (service-extension home-profile-service-type
>+                             (compose
>+                              list
>+                              home-openssh-configuration-openssh))
>+          (service-extension home-activation-service-type
>+                             (const openssh-activation))))
>+   (description "Configure the OpenSSH @acronym{SSH, secure shell}
>+client and _add it to the user profile_.")

(emphasis added).  Why is it automagically added to the user profile? 
This is considered bad practice for system services.  Maybe the user
keeps all their remote communication things in a single profile, maybe
the user only uses openssh things via other tools like 'guix deploy' or
'gnome-shell-extension-gsconnect' and hence has no need for 'openssh'
in their home profile.   Maybe the user never ssh's _from_ the computer
that has the openssh home configuration and only connects _to_ the
computer and hence the 'openssh' in the profile isn't necessary.

Now there are two ways to add 'openssh' to the environment: the Guix
Home equivalent of a 'packages' field and the openssh home service,
with AFAICT no mechanism for deciding which one ‘wins’ and no mechanism
for a proper error message like ‘only add the openssh package to the
profile or use the openssh home service, not both!’, which doesn't seem
ideal to me.

reetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-06-11 19:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11 16:49 [bug#55912] [PATCH] home: Add OpenSSH service Ludovic Courtès
2022-06-11 19:51 ` Maxime Devos [this message]
2022-06-11 22:13   ` Maxime Devos
2022-06-13  9:41   ` Ludovic Courtès
2022-06-13 10:51     ` Maxime Devos
2022-06-13 12:02       ` Ludovic Courtès
2022-06-13 12:38         ` Maxime Devos
2022-06-13 21:58     ` Maxime Devos
2022-06-14  8:08       ` Ludovic Courtès
2022-06-15 20:29   ` [bug#55912] [PATCH v2] " Ludovic Courtès
2022-06-15 20:47     ` Maxime Devos
2022-06-16 10:47       ` Ludovic Courtès
2022-06-16 12:16         ` Maxime Devos
2022-06-16 12:31           ` Maxime Devos
2022-06-16 16:18           ` [bug#55912] [PATCH] " Ludovic Courtès
2022-06-16 16:45             ` Maxime Devos
2022-06-17 12:32               ` Ludovic Courtès
2022-06-17 12:42               ` Philip McGrath
2022-06-17 20:56                 ` Maxime Devos
2022-06-18 21:41     ` bug#55912: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d53fd0704720c45569e610345f275e225e37c4bd.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=55912@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).