From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AGh3DIfypGITXQEAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 21:52:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aAN+DIfypGIeRAAA9RJhRA (envelope-from ) for ; Sat, 11 Jun 2022 21:52:39 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BE8E73A7AA for ; Sat, 11 Jun 2022 21:52:38 +0200 (CEST) Received: from localhost ([::1]:42294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o079x-000537-T8 for larch@yhetil.org; Sat, 11 Jun 2022 15:52:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o079O-0004fy-C2 for guix-patches@gnu.org; Sat, 11 Jun 2022 15:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o079O-0003s3-3r for guix-patches@gnu.org; Sat, 11 Jun 2022 15:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o079O-0005tx-2O for guix-patches@gnu.org; Sat, 11 Jun 2022 15:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55912] [PATCH] home: Add OpenSSH service. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Jun 2022 19:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55912 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 55912@debbugs.gnu.org Received: via spool by 55912-submit@debbugs.gnu.org id=B55912.165497709422628 (code B ref 55912); Sat, 11 Jun 2022 19:52:02 +0000 Received: (at 55912) by debbugs.gnu.org; 11 Jun 2022 19:51:34 +0000 Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o078w-0005su-7V for submit@debbugs.gnu.org; Sat, 11 Jun 2022 15:51:34 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:41936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o078q-0005sg-96 for 55912@debbugs.gnu.org; Sat, 11 Jun 2022 15:51:32 -0400 Received: from [172.20.10.5] ([188.188.151.25]) by albert.telenet-ops.be with bizsmtp id hvrQ2700T0Z7qkC06vrRkW; Sat, 11 Jun 2022 21:51:25 +0200 Message-ID: From: Maxime Devos Date: Sat, 11 Jun 2022 21:51:20 +0200 In-Reply-To: <20220611164931.21953-1-ludo@gnu.org> References: <20220611164931.21953-1-ludo@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+vqKPRdFOb9aDF4sHSQB" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654977085; bh=TbFmInsq4oHXhhJmzZpS8vuluF72tCmwytHTTYpTpNc=; h=Subject:From:To:Date:In-Reply-To:References; b=jDajlgD47cq4R5w66EjyBJ+mv6hwI/DRHn02MN1pGMDLF70LfxgwMbW144evLwRYB wsyhHqLkn+JWyN8EWfrUFKuNqudU6XAZJ4djavKsj3r5T/6nuKJv2VqVKU/MJ60ZO2 GSh8d6yHNGL3Ya47j/RXmxOq/J/rH3ZuRD65O5nzH9MWiQlM82he+4/47vxx+8HlAU OTrNZycsJ8zzJZc+KYzC400J2SNJRDd6UZr7wj6oAM81BfPYaAthQpYL5EmfydcFv/ qBdrqjyZMQv21UI9Wp6wrP+/s9kvC+TPYlIbom6RZwPD/BQ1HoqfyzrL+cZdZRR771 P3lwn0qRtE/pw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654977158; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=TbFmInsq4oHXhhJmzZpS8vuluF72tCmwytHTTYpTpNc=; b=mKjCBMQpiVeXlpHpU01uRFPuMu+oNn/rUItsXpw2TXbyr/ZvzMnbIv9jbRew+AC/v/fxeD Mn2gVYDaF0VlqvkozcA3sM7W280sLEI5jepMG/qYy2Gqi2Qg9R/rd3DfuFpF3K29BcNOpv puV6nlj9/IAsM+YYbBn3JkIlMqloC6/BiRvqAdVCWvbbY/Rqb5HUp9VxO15s9ID0G2CeS1 /NZNg1rHtdrD8OgY4IN88vK7ita+s9EJa4qt1Nf03qjAR6K/JkOXK6QAzKaGcLV24Qxnyw ijHEPCzks/+YYvxy5nhw77/9i5RQLR9iiz6PuizVi6jRrofyYepG1nSztBzkmw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654977158; a=rsa-sha256; cv=none; b=Vd/de1tw2lyom8E7L2bK6oqA9esvfnBZwGkgf+i0H6wGw3mVQJx/WptP5ysHPu315MlrpV N9UfoSTBxljRH6DUtw8dJV96RYkPstzPkMFfMf4nk5uL0GDRAwDWpKAzPeY7KBM7CNHtK2 d/PmGfelbv0Tx9U7vNDsGjmusHJdfs4VxG4lTZaK8klZhs0TN1cxitK+fvBQ7AOvjhdS/b PdtMwE4afZOUmQeqF4JAtWTEMlEIpLlzdWGDzeMqVkIXSOt5KkJhPSjrT4t+mmgG1BXeAx VuMUv80EAi9Z6pm/pi6TpGG7Oolf6DZfDX9e8OCEpWzVKj/FvRXSjRUFVmNG3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=jDajlgD4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=jDajlgD4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BE8E73A7AA X-Spam-Score: 5.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4FVh5PXmqbzB --=-+vqKPRdFOb9aDF4sHSQB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Some comments on the code. Ludovic Court=C3=A8s schreef op za 11-06-2022 om 18:49 [+0200]: > +=C2=A0 (port > +=C2=A0=C2=A0 (maybe-integer 'disabled) > +=C2=A0=C2=A0 "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?=20 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 =E2=80=98wins=E2=80=99 and = no mechanism for a proper error message like =E2=80=98only add the openssh package to th= e profile or use the openssh home service, not both!=E2=80=99, which doesn't = seem ideal to me. reetings, Maxime. --=-+vqKPRdFOb9aDF4sHSQB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqTyOBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hQXAP9llupRGBBOT9Q9QMHXp1Rwhtkj cK7pPfQ+utHxRIZcTgD8ChzYWBGY5kpllAoKkfHcznomkGO+R9YLH0w4M7J0cgw= =LcND -----END PGP SIGNATURE----- --=-+vqKPRdFOb9aDF4sHSQB--