From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 0H46NYx6A2RtOQEAbAwnHQ (envelope-from ) for ; Sat, 04 Mar 2023 18:06:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KO1BNYx6A2R2uQAAauVa8A (envelope-from ) for ; Sat, 04 Mar 2023 18:06:20 +0100 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 A91F93A53D for ; Sat, 4 Mar 2023 18:06:20 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JfaRc5HU; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677949580; 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=otSCVKBhO6E9Vz/6ZjtTC27IfQTV2uAOs4+3U2auixQ=; b=JENE0aqo3KJGbPWtZbTY1S3LA0rkDtJaXXuhG/aJn9Z4kh8wzGLOi4L1+mJHM9UBtabXdZ Uhp1m3Myk+K6fKgHR3ozKYOYjoQkN16PTpNd+LezVRkxeLLzu1trg3mCBIfSIdu6zVcxrS 1UZ6Rx0GAdwJYzTTDX+ynkKXqsXpRwRkqGipzp6X4aTsYm5+k69FlrmsWTuC9Uc6/A/p31 pv46wDJqn9EqJi+Xrb+aVAMhbGINBLNWM66YMkbLoS0CAiDfJ5j8jfInFU2cXkqbvOjpEM Mb6RI2ct28b5aVUdL0qqhmoqj3okKkAc7erPART5cYbVOiUOxXf6h6LclWFjcA== 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=JfaRc5HU; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677949580; a=rsa-sha256; cv=none; b=cfB1CJO8pI3USltDboo4Ak37INamXcZwcts76aDfVDzucAQu4IhE1HdbKTnyBSIDQkMUpG fuQw9dYubMyBRbpuwbthp2d8V5wrmj54zlZuOGgSh7xmNTfaHnD2LApAoA4gfUNyM0VkPz sqB6TJsgAxCZYzpDh4Jgqva+OcKzdQmdFhGNLxA6UguFiZIy9iTACzouVXrX8LAwJqKd/8 RxLy1fIjqPf4ovybljPsZ1fQ9tfbg9cr34U/EXll7BNKZ3hDnJq0jJkKm6Foy46YiApIFh D7vxOidMGtrvH53gEIP+x/3zHEku182yhCXzeGA05irNZjTkVUw7mu4HgOZ+Hg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYVKd-0005lT-Fi; Sat, 04 Mar 2023 12:06:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVKc-0005lF-F1 for guix-patches@gnu.org; Sat, 04 Mar 2023 12:06:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYVKc-0007vL-79 for guix-patches@gnu.org; Sat, 04 Mar 2023 12:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYVKc-0006Jd-0L for guix-patches@gnu.org; Sat, 04 Mar 2023 12:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61483] [PATCH 0/5] Some basic Home Shepherd Services Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Mar 2023 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61483 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Jan (janneke) Nieuwenhuizen" Cc: 61483@debbugs.gnu.org Received: via spool by 61483-submit@debbugs.gnu.org id=B61483.167794951424218 (code B ref 61483); Sat, 04 Mar 2023 17:06:01 +0000 Received: (at 61483) by debbugs.gnu.org; 4 Mar 2023 17:05:14 +0000 Received: from localhost ([127.0.0.1]:37583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVJp-0006IY-Kb for submit@debbugs.gnu.org; Sat, 04 Mar 2023 12:05:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYVJo-0006IJ-6e for 61483@debbugs.gnu.org; Sat, 04 Mar 2023 12:05:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVJi-0007jG-7f; Sat, 04 Mar 2023 12:05:06 -0500 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=otSCVKBhO6E9Vz/6ZjtTC27IfQTV2uAOs4+3U2auixQ=; b=JfaRc5HUVgJCm4PhxK9G LhGEMrwerd97ans/6lbedZXh3QNeHaqHxZ99SMTIlK5SQhtjdbAKECaLZL/LzKyJ7WVsHvR1zUecV Sql3XMZ2K1iZFM0C/WAXv+LFwDM1gk5ehOxVNGrmGlgHf31yQck33dBbKGuAHlJ5wDDzobhXKnhMb m/DlpX0nGXWZxsQSa/AXSimE+pfLB8Jhq5LdbpzlQbDJZUPZjtrcNWl+Qka+72b7bfvaLXFVeoWWp 3kaKOdgDJoUP2XWp5XN8JfSkRFo0vQmBvcvHcYKZD5Vl5Ovi/Y3dRJMGplQOFHnzjq7rtTKtaoloU 4d3iUO3mBrR/mA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYVJh-0003GR-2g; Sat, 04 Mar 2023 12:05:05 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230213164642.24419-1-janneke@gnu.org> <20230216155355.11106-1-janneke@gnu.org> Date: Sat, 04 Mar 2023 18:05:02 +0100 In-Reply-To: <20230216155355.11106-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Thu, 16 Feb 2023 16:53:51 +0100") Message-ID: <87v8jgqwg1.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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: X-Migadu-Spam-Score: -4.70 X-Spam-Score: -4.70 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: A91F93A53D List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: fS4+wV3nB/zS "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/home/services/shepherd-xyz.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. I=E2=80=99d make it version-control.scm instead. > +(define-record-type* > + home-git-daemon-configuration make-home-git-daemon-configuration > + home-git-daemon-configuration? > + (git home-git-daemon-git ;file-like > + (default git)) > + (root home-git-daemon-root ;string > + (default (string-append %user-data-home > + "/git-daemon"))) > + (export-all? home-git-daemon-export-all? ;boolean > + (default #f)) > + (listen home-git-daemon-configuration-listen ;list of string > + (default '())) > + (port home-git-daemon-configuration-port ;number | #f > + (default #f)) > + (whitelist home-git-daemon-configuration-whitelist ;list of string > + (default '())) > + (extra-options home-git-daemon-extra-options ;list of string > + (default '()))) > + > +(define (home-git-daemon-services config) > + "Return a for a git daemon with CONFIG." > + (match config > + (($ > + git root export-all? listen port whitelist extra-options) > + (let* ((git (file-append git "/bin/git")) > + (command `(,git > + "daemon" > + ,(string-append "--base-path=3D" root) > + ,@(if export-all? > + '("--export-all") > + '()) > + ,@(map (cute string-append "--listen=3D" <>) list= en) > + ,@(if port > + `(,(string-append > + "--port=3D" (number->string port))) > + '()) > + ,@extra-options > + ,@whitelist)) > + (log-file (string-append %user-log-dir "/git-daemon.log"))) > + (list (shepherd-service > + (documentation "Run the git daemon.") > + (provision '(git-daemon)) > + (start #~(make-forkexec-constructor '#$command > + #:log-file #$log-file)) > + (stop #~(make-kill-destructor)))))))) I have a prototype here to =E2=80=9Ctransform=E2=80=9D a System service int= o a Home service. Would it be of any use here, to share code with =E2=80=98git-daemon-service-type=E2=80=99? Looks like the only issue would be #:user "git-daemon", which is not going to work, and I don=E2=80=99t have a good solution to that. :-/ Ludo=E2=80=99.