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

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

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

We could do that, though that’s more code for little in return…

>> +                             (formatted-message
>> +                              (G_ "~s: unsupported address family")
>
> Maybe a hint:
>
>   hint: AF_INET and AF_INET6 are supported.

Sure, that makes sense.

>> +  (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.

I’ll take a look.

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

Oh right, it needs to be somewhat escaped; I’ll do that.  I think
‘object->string’ will be a good-enough escaping mechanism, and it’ll
take care of newlines.  (Doing things The Right Way would require
detailed knowledge about the grammar that OpenSSH’s parser expects.)

>
>>+ (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?

‘files’ is a list of “file-like objects”, which, by definition, have
names acceptable for the stores (so ASCII names).

That’s not a user-visible limitation since store file names are hints
more than anything else.  You could have a local file, say
“courtès.pub”, and you’d do:

  (local-file "courtès.pub" "that-guy.pub")

This service doesn’t change that.

>>+   (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.

All good points!  I’m usually against magically extending the profile
with new packages.  In this case, my reasoning was: if you’re going to
set up OpenSSH config files, that’s probably because you’re going to
need OpenSSH, so why not bring it while we’re at it?  (This rationale
usually doesn’t hold for system services: just because I run ntpd
doesn’t mean I need to have it in the system profile.)

But you’re right here, so I guess I’ll just remove it.

v2 coming soon!

Thanks,
Ludo’.




  parent reply	other threads:[~2022-06-13  9:42 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
2022-06-11 22:13   ` Maxime Devos
2022-06-13  9:41   ` Ludovic Courtès [this message]
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=87czfcuche.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=55912@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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).