From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kDpPNueo215MAQAA0tVLHw (envelope-from ) for ; Sat, 06 Jun 2020 14:32:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id NEkKMueo214KEAAAB5/wlQ (envelope-from ) for ; Sat, 06 Jun 2020 14:32:07 +0000 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 4D76E9404C5 for ; Sat, 6 Jun 2020 14:32:07 +0000 (UTC) Received: from localhost ([::1]:50646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhZrh-0003UC-Qd for larch@yhetil.org; Sat, 06 Jun 2020 10:32:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhZre-0003Tl-C2 for guix-patches@gnu.org; Sat, 06 Jun 2020 10:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhZre-00025a-2J for guix-patches@gnu.org; Sat, 06 Jun 2020 10:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhZrd-0007vi-VT for guix-patches@gnu.org; Sat, 06 Jun 2020 10:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Jun 2020 14:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41541 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 41541@debbugs.gnu.org Received: via spool by 41541-submit@debbugs.gnu.org id=B41541.159145390130455 (code B ref 41541); Sat, 06 Jun 2020 14:32:01 +0000 Received: (at 41541) by debbugs.gnu.org; 6 Jun 2020 14:31:41 +0000 Received: from localhost ([127.0.0.1]:52276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhZrF-0007v5-Ke for submit@debbugs.gnu.org; Sat, 06 Jun 2020 10:31:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhZrA-0007un-1K for 41541@debbugs.gnu.org; Sat, 06 Jun 2020 10:31:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:32846) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhZr3-00022l-E6; Sat, 06 Jun 2020 10:31:25 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=34952 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jhZr2-0002en-N3; Sat, 06 Jun 2020 10:31:25 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200604135914.4499-1-janneke@gnu.org> <20200604135914.4499-8-janneke@gnu.org> <87k10kv4d0.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sat, 06 Jun 2020 16:31:22 +0200 In-Reply-To: <87k10kv4d0.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 06 Jun 2020 13:08:27 +0200") Message-ID: <87y2p01d1h.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: azbWFZ/Ch7ce --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> * gnu/services/hurd.scm: New file. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. >> * doc/guix.texi (Hurd Services): Document it. > > [...] As discussed on IRC: dropped altogether, replaced with attached patch. >> +@deffn {Scheme Procedure} hurd-etc-service @var{os} >> +This service implements a minimal @code{etc-service}, adding some >> +specifics for the Hurd. >> + >> +It is part of the @code{hurd-default-essential-services}. >> +@end deffn > > The =E2=80=98hurd-default-essential-services=E2=80=99 bit is not in this = patch, though. Hmm. I think it's complicated...No, it was complicated. ETC depends on %activatation which depends on %boot, but those now work; so I can reorder! Reordered, added to hurd-default-essential-services in compliance with the documentation. >> +;;; The ETC service for the Hurd. > > s/ETC/etc/ OK. Eh... ok. ;-) >> +(define (hurd-etc-service os) [..] >> + (etc-service >> + `(("services" ,(file-append net-base "/etc/services")) >> + ("protocols" ,(file-append net-base "/etc/protocols")) >> + ("profile" ,profile) >> + ("hostname" ,(plain-file "hostname" (operating-system-host-name = os))) >> + ("login" ,(file-append hurd "/etc/login")) >> + ("motd" ,(file-append hurd "/etc/motd")))))) > > Why again does it need to be different from that on GNU/Linux? Good question! Yeah...this started out as a more formalized copy of the gnu/system/hurd.scm hack and it used to be complicated; services didn't cross build, for example. Also, it felt good to start really minimalistic, especially because of the cross build troubles. I seemed to remember that on top of that there was a Hurd build problem, but I think that must have been sudo and it's easy to disable. > Intuitively it should be the same, but it=E2=80=99s fine to keep this one, > perhaps with a FIXME, until we=E2=80=99ve figured out what to do to use t= he same > /etc service in both cases. Phew, I didn't expect so much work; but also not so much cleanup so soon. Thanks, Janneke --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-services-Support-etc-service-for-the-Hurd.patch >From 4cef6e73ce9fd137640c1c00f98958cdc41dda90 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 25 Apr 2020 11:55:56 +0200 Subject: [PATCH] services: Support etc-service for the Hurd. * gnu/system.scm (operating-system-etc-service): Cater for missing nsswitch and missing sudoers-file. For the Hurd, add "login" and "motd". (hurd-default-essential-services): Add operating-system-etc-service. --- gnu/system.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index ac64dfcff6..0df642679d 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -611,6 +611,7 @@ bookkeeping." (list (service system-service-type '()) %boot-service %activation-service + (operating-system-etc-service os) (service profile-service-type '()))) (define* (operating-system-services os) @@ -716,7 +717,7 @@ This is the GNU system. Welcome.\n") (define* (operating-system-etc-service os) "Return a that builds containing the static part of the /etc directory." - (let ((login.defs + (let* ((login.defs (plain-file "login.defs" (string-append "# Default paths for non-login shells started by su(1).\n" @@ -727,10 +728,13 @@ directory." "/run/current-system/profile/bin:" "/run/current-system/profile/sbin\n"))) - (issue (plain-file "issue" (operating-system-issue os))) - (nsswitch (plain-file "nsswitch.conf" - (name-service-switch->string - (operating-system-name-service-switch os)))) + (hurd (operating-system-hurd os)) + (issue (plain-file "issue" (operating-system-issue os))) + (nsswitch (operating-system-name-service-switch os)) + (nsswitch (and nsswitch + (plain-file "nsswitch.conf" + (name-service-switch->string nsswitch)))) + (sudoers (operating-system-sudoers-file os)) ;; Startup file for POSIX-compliant login shells, which set system-wide ;; environment variables. @@ -820,7 +824,7 @@ fi\n"))) ("rpc" ,(file-append net-base "/etc/rpc")) ("login.defs" ,#~#$login.defs) ("issue" ,#~#$issue) - ("nsswitch.conf" ,#~#$nsswitch) + ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '()) ("profile" ,#~#$profile) ("bashrc" ,#~#$bashrc) ("hosts" ,#~#$(or (operating-system-hosts-file os) @@ -836,7 +840,9 @@ fi\n"))) ("timezone" ,(plain-file "timezone" (operating-system-timezone os))) ("localtime" ,(file-append tzdata "/share/zoneinfo/" (operating-system-timezone os))) - ("sudoers" ,(operating-system-sudoers-file os)))))) + ,@(if sudoers `(("sudoers" ,sudoers)) '()) + ,@(if hurd `(("login" ,(file-append hurd "/etc/login")) + ("motd" ,(file-append hurd "/etc/motd")))))))) (define %root-account ;; Default root account. -- 2.26.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--