From patchwork Mon Mar 31 22:10:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 41104 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 79C7A27BBEA; Mon, 31 Mar 2025 23:13:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E2ED427BBE2 for ; Mon, 31 Mar 2025 23:13:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMz-0000MJ-32; Mon, 31 Mar 2025 18:12:37 -0400 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 1tzNMT-0000CD-ET for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMS-0006yE-1C; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=iEGWYtU7Vz2t/HSKuaWOxxEzuFEtZv5ChFD0LziHIt0=; b=IizWp2LMA/UIud2zvdBI/7F2jqSab1ZhD86F7FBDkirn01wT6Lm7ZfDF2wnrwBjAO6vS1sbfuUw4uVXkVRnYQa/zV34vhI+eXEdZ0ifQ8Y/478DeK415sg00dvw29LGAeWP7wZrJFHAVgL/bMN9GVNgXO3nfv2Im2x4yKozVN1lt2pWJd6U/CX1jsMF6NBi93KmZWcrtm1/TvernSEqkuA+yMvPigODaVG7s4tYDn7L93C0Ge+G/UoVS57JLKlSghrx/Nt4E5cUdsXHA+bp76+nV+8iJEYEB4Znjn3T0EspBsYvA80HPxdKFFPQyycaPc2lhRz/Gwyn/f6+mke57wQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMR-0000as-S5; Mon, 31 Mar 2025 18:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 03/14] services: gitolite-rc-file: Add host-name field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590691944 (code B ref 77186); Mon, 31 Mar 2025 22:12:03 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:09 +0000 Received: from localhost ([127.0.0.1]:43352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLY-0000VG-UM for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:09 -0400 Received: from wolfsden.cz ([37.205.8.62]:40966) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL1-0000Pb-V9 for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:40 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8C7BD37A300; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=1OYRyBIMiaChjSf8obNH/+pN3f7ws+Md4nKVC7nSwRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nnt4SogLJ3I0FqkfSB2ybtvwQcbmKijJiuox2zZUOR7MQ57ewJn+9YvPzpe5tJHot 7eGBdP0FzYc1Tqs3+x2iUkvwIBueyyY79O8Lr1nfpCaFRKKrMtCI4qx5UILHY5omHd jkV46b1De8XsyR+3EQuhXlBlPmoo9rwksmKo+gpd9UDsSaS8f5xbJzrkjPYHhLfb0Y b2ZG5R0L73j5bVIvNLhtja65tQZkpCH7U/ig4VyeB6pTsOwaMYJF89zZJEPlcgfGX0 kwCvQfMtpw0/BSQYwZY+t39mE54LLbPSE+ctROguwUlwLJtTdjmKctRzOFdUZc1gG0 M5cc/XAWp+BSBfEgPyNfCyZufML6Mt93LV8/h6K3FAzq/pvOnApXs4VrANhgcIUcTe 5yl18XvWRHUJ+YKTHdlfLljTiWwbHgB/1Q77az9Ckls+NtbdJHgst89NReXuMBBv76 bMXfJ2dl5ZLHSes2tlWoJh0zZmE+aMtHPZjk0uikjYjHxBcvF30N7uKvTJg8v3uyD9 mwjoxFU2rIzGrjCoQUOVjIX59G/iGoI2ThXQUdM25akRFp/BdaQlAh7CiYviBKDNQU oLHGyEMDsCVuSw4MLcDZeqLDl/RCDNzyHBHV0M4J2w+h2/JozgMbu5u9tItLiCZ/xc mxR7f3QobDmTCyiCiM5o/Qd0= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C223379C98; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=1OYRyBIMiaChjSf8obNH/+pN3f7ws+Md4nKVC7nSwRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nnt4SogLJ3I0FqkfSB2ybtvwQcbmKijJiuox2zZUOR7MQ57ewJn+9YvPzpe5tJHot 7eGBdP0FzYc1Tqs3+x2iUkvwIBueyyY79O8Lr1nfpCaFRKKrMtCI4qx5UILHY5omHd jkV46b1De8XsyR+3EQuhXlBlPmoo9rwksmKo+gpd9UDsSaS8f5xbJzrkjPYHhLfb0Y b2ZG5R0L73j5bVIvNLhtja65tQZkpCH7U/ig4VyeB6pTsOwaMYJF89zZJEPlcgfGX0 kwCvQfMtpw0/BSQYwZY+t39mE54LLbPSE+ctROguwUlwLJtTdjmKctRzOFdUZc1gG0 M5cc/XAWp+BSBfEgPyNfCyZufML6Mt93LV8/h6K3FAzq/pvOnApXs4VrANhgcIUcTe 5yl18XvWRHUJ+YKTHdlfLljTiWwbHgB/1Q77az9Ckls+NtbdJHgst89NReXuMBBv76 bMXfJ2dl5ZLHSes2tlWoJh0zZmE+aMtHPZjk0uikjYjHxBcvF30N7uKvTJg8v3uyD9 mwjoxFU2rIzGrjCoQUOVjIX59G/iGoI2ThXQUdM25akRFp/BdaQlAh7CiYviBKDNQU oLHGyEMDsCVuSw4MLcDZeqLDl/RCDNzyHBHV0M4J2w+h2/JozgMbu5u9tItLiCZ/xc mxR7f3QobDmTCyiCiM5o/Qd0= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:09 +0200 Message-ID: <8448afc0beb49af7e4ba750a000d82d7c8dd5af7.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add host-name field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: I1231ed47a294ff48b35a301f76ae8e9cbfcd9b95 --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index bc8e7206d5..4daeab924b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41068,6 +41068,10 @@ Version Control Services value from gitolite however is @code{1} (written as @code{#t} in this configuration). +@item @code{host-name} (default: @code{#f}) +The host name of this gitolite instance. It is used by the mirroring +feature. + @item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))}) Set the role names allowed to be used by users running the perms command. diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 344538a73e..2b99e8db86 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -61,6 +61,7 @@ (define-module (gnu services version-control) gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys gitolite-rc-file-log-extra + gitolite-rc-file-host-name gitolite-rc-file-roles gitolite-rc-file-enable @@ -255,6 +256,8 @@ (define-record-type* (default "")) (log-extra gitolite-rc-file-log-extra (default #f)) + (host-name gitolite-rc-file-host-name + (default #f)) (roles gitolite-rc-file-roles (default '(("READERS" . 1) ("WRITERS" . 1)))) @@ -273,7 +276,7 @@ (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match-record file ( umask local-code unsafe-pattern git-config-keys log-extra - roles enable) + host-name roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -284,6 +287,9 @@ (define-gexp-compiler (gitolite-rc-file-compiler ,(if log-extra " LOG_EXTRA => 1,\n" "") + ,(if host-name + (simple-format #f " HOSTNAME => \"~A\",\n" host-name) + "") " ROLES => {\n" ,@(map (match-lambda ((role . value)