From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 aFG5AIYGp2JpnAAAbAwnHQ (envelope-from ) for ; Mon, 13 Jun 2022 11:42:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EIpDO4UGp2JjAwAAG6o9tA (envelope-from ) for ; Mon, 13 Jun 2022 11:42:29 +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 796FF3B6A2 for ; Mon, 13 Jun 2022 11:42:29 +0200 (CEST) Received: from localhost ([::1]:39608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0gaa-00024H-DK for larch@yhetil.org; Mon, 13 Jun 2022 05:42:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0gaA-000245-CI for guix-patches@gnu.org; Mon, 13 Jun 2022 05:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0gaA-0000kK-4N for guix-patches@gnu.org; Mon, 13 Jun 2022 05:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0ga9-00068b-UO for guix-patches@gnu.org; Mon, 13 Jun 2022 05:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55912] [PATCH] home: Add OpenSSH service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 09:42:01 +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: Maxime Devos Cc: 55912@debbugs.gnu.org Received: via spool by 55912-submit@debbugs.gnu.org id=B55912.165511330823572 (code B ref 55912); Mon, 13 Jun 2022 09:42:01 +0000 Received: (at 55912) by debbugs.gnu.org; 13 Jun 2022 09:41:48 +0000 Received: from localhost ([127.0.0.1]:57279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0gZv-000688-V0 for submit@debbugs.gnu.org; Mon, 13 Jun 2022 05:41:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0gZt-00067v-UX for 55912@debbugs.gnu.org; Mon, 13 Jun 2022 05:41:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0gZo-0000in-EZ; Mon, 13 Jun 2022 05:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=mlJu09COZrpGtpj47SJyGPf8bglHcu0FDKlfaQdTFGI=; b=HV4AmskazR6Ts+csr0kg VoJlpULjvVf2js2IjUc6p5IzVOn562C+RQn/orGZHHUqk6ny8o/yYCNW2tFwvO1iyTc3UpoaR0Zo7 3y5b+Xtc+N53rtjrFe3cyLbNsamQxAJ0Yg9Az8PLKjjbY7B2YuEhbGuoTGOOanaT8WNBhhEbr6dkr nSaLwlApo8OPyPTa4chw1TFhlY3WPGQujxRPkTgGYxrHV3b99XW6+3KwxQqHLtrJMpk4hsdfX5c8L UcDw9C9TaTyHf8u5lux4biScg5g2m+HV81o3RRBE5cJEmSzZsIkv8g0usk+nB+8JjWji1UdhmgD5X 1DRepEEoJvz3aQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=55302 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0gZj-0006qP-K2; Mon, 13 Jun 2022 05:41:39 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220611164931.21953-1-ludo@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 25 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Tanche X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 13 Jun 2022 11:41:33 +0200 In-Reply-To: (Maxime Devos's message of "Sat, 11 Jun 2022 21:51:20 +0200") Message-ID: <87czfcuche.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1655113349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=mlJu09COZrpGtpj47SJyGPf8bglHcu0FDKlfaQdTFGI=; b=Q/3QA4oWZjnwDbiATZ/LrLM2UiHFuY/nYQjegJXXpMORwUI3kVr2jLz1Z+SepgyEo6RXZZ V4oyrED8+so2cJFH1/yFPzS4OsX3JhdQ5IyiXEeoYav3hEJg5j8gijm8vBFP/rgOzpNERe YFH/7jSh5i+WrsEsLC8Ek5lRvgvteQ/FxJ6fbCzcow9Cz6Rkzq2vUf2MB1b2GiXS5WRsjL 2Yjzw9HnykAwGmlWMhKYF9snkHWm+J8PzgfEYgzZIH4mLjCarxsTcpg/hHk/8bDHG7Z4G7 /Oxenst5VLpFO5xiy55cgF+50bwywwaENRex3l3gIhnO3w+SxXcJNQRUyIgQbQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655113349; a=rsa-sha256; cv=none; b=DqQkL5Vx3wiishB2PgDdIBZo1gus9IkK64JDR7deynfN0o/Q67ZdLpJWhSinRe0AVzYlxd vdqua3X0n6501nNX13cGyLz1Y9LLYL6l3Rlmzxue4Lq8cLmgP4nZ0zER4PEao2s+u3kIG7 2Nr33LkJVXvRUSrQWzMguOl00R8xz9Y3/V/VqbK9fkgxrrRHYf9IFiR4GLK6d4RvryUHBC JAaAkKW+nWm7k9EQvgEjZEesvFtKdZJRVlEZke1wLWg2N8lgPEmsexf1YvC6HrMYeYOQAH XPFi3ItlUNqCSdpO9AtHloHgSNUYLAJytxWPq/dM3ek1859/2SxBS0TK9PO7Gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HV4Amska; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HV4Amska; dmarc=pass (policy=none) header.from=gnu.org; 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: 796FF3B6A2 X-Spam-Score: -3.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: JL7cYVDTsjNx Hi, Maxime Devos skribis: > 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? We could do that, though that=E2=80=99s more code for little in return=E2= =80=A6 >> + (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=E2=80=99ll 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=E2=80=99ll do that. I think =E2=80=98object->string=E2=80=99 will be a good-enough escaping mechanism, = and it=E2=80=99ll take care of newlines. (Doing things The Right Way would require detailed knowledge about the grammar that OpenSSH=E2=80=99s 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? =E2=80=98files=E2=80=99 is a list of =E2=80=9Cfile-like objects=E2=80=9D, w= hich, by definition, have names acceptable for the stores (so ASCII names). That=E2=80=99s not a user-visible limitation since store file names are hin= ts more than anything else. You could have a local file, say =E2=80=9Ccourt=C3=A8s.pub=E2=80=9D, and you=E2=80=99d do: (local-file "court=C3=A8s.pub" "that-guy.pub") This service doesn=E2=80=99t 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?=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 an= d no mechanism > for a proper error message like =E2=80=98only add the openssh package to = the > profile or use the openssh home service, not both!=E2=80=99, which doesn'= t seem > ideal to me. All good points! I=E2=80=99m usually against magically extending the profi= le with new packages. In this case, my reasoning was: if you=E2=80=99re going= to set up OpenSSH config files, that=E2=80=99s probably because you=E2=80=99re= going to need OpenSSH, so why not bring it while we=E2=80=99re at it? (This rationa= le usually doesn=E2=80=99t hold for system services: just because I run ntpd doesn=E2=80=99t mean I need to have it in the system profile.) But you=E2=80=99re right here, so I guess I=E2=80=99ll just remove it. v2 coming soon! Thanks, Ludo=E2=80=99.