From patchwork Sat Mar 22 17:09:04 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: 40643 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 239A527BBEA; Sat, 22 Mar 2025 17:12:06 +0000 (GMT) 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 9DEE527BBE9 for ; Sat, 22 Mar 2025 17:12:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NQ-0000cK-7Y; Sat, 22 Mar 2025 13:11:16 -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 1tw2NE-0000WN-Kq for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -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 1tw2ND-0007kF-TD; Sat, 22 Mar 2025 13:11: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=5FcxRJgZwLD2nQax9uVxckikdCK73GUQQaef7QrhWh0=; b=Kj96Uy9NaXbOA5GKz1Bmbsu5Cu7j6UjK/HCLohmK8LrsBVAGP8MwkofBt4oBmbusq6pyt4smTGSiAmgwKEJluD4Y8sm9py+hZ7t3QsxjyMXjETqznoZ1FUv2fkRpq2blkKmfI+qZCagrQQnc1thEcwAIFKx0fVOmhT6D+W33kOisQMmbnlQ3OowSViHhWrxc4+0td9J38aH4PkXy6daehEKxLLVJ2gi/tWUPKC5CspliTk3GfgXMLT+qCbPe/bQcG7B9xbvSDycsrLMN+JOXly2tKEBn8IACmBjA6zKkl6K+r1AUCStdTp06rOohqzeOjjhP9A9YbxtSBO31p9uEnw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2ND-0007ID-Mq; Sat, 22 Mar 2025 13:11:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 03/13] 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: Sat, 22 Mar 2025 17:11: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.174266342927746 (code B ref 77186); Sat, 22 Mar 2025 17:11:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:29 +0000 Received: from localhost ([127.0.0.1]:45243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Me-0007DR-DZ for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:28 -0400 Received: from wolfsden.cz ([37.205.8.62]:57538) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MC-00074c-5I for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:03 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 21CF0380A26; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=tEowydEfTXi/uoqWTYnr+SbPnCkFfTGGzISNrbVHb40=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oyfdTIiJAgSs3QQJ9PPGLBJWkkcXKlL4ELUXXk/zezlfOEdEUm5qIeaR1zNiG5t0l SA/G9pauSSil4cLNfJO/ukEeheroXJ4t7cqajbD+eiI7H/rdl9XWyHHUfTgzin39i/ UaBy1A3VgrKGQG8ksAH+0QIWQb0mx1fVZg9aE+Mq864cX6bjNsk3ssB4MfubCl+p0g z2U3mro9McmAOeBGY0wloww8otlaKo/MSDF2MJo/bcOkk1GKq9c6HP97dZ/3h2g9fZ aqnBNfyedxtPv6Dt8CimRtTrrI7cA96gFihcj5N+N0B2Z7N16rYXPYsn22kflKue6x LYqk/OwPe/MSeJKln0N3BQI8PqzSxErNkDd8BblKTxRvQZVGVtY8POIneNL3jXNM65 WTYirWYi0Jq6GkiiIJgMig3/VLisF852W0KrsbJ3vi8rgZdjkzDJ9FnB9GIGWjqpxl h5BXlHr5EcmltaXH8iLD+8rnojnGq4+VSuakLuH8kfuFf+Vn+I9QrSGE2Tc98Nszrq uOKWI5j1MLo1LgXk0N9yFSK54GE1gK7B6GFr50cE7pkhYgEZ/zO+A3eAScDvNmXrRD W7zR0boV4JL/Jl6NJ6hk0FCDQ6hVJEXa/rwx86aCDJS9BUhfQ9q1RT3WQZl2j1xHS9 YoMTTFSQ9KJSTU0jvrtyEcLc= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8E3C737FE3E; Sat, 22 Mar 2025 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663398; bh=tEowydEfTXi/uoqWTYnr+SbPnCkFfTGGzISNrbVHb40=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wv6RFb1Jlh4gJLsboQ/N6cdRP2+IyT0kEmGZ4G83Nag7U60E49tqRZTDCBg+YhJFs Eax7NJJCgtAIkKqh41KQd5kEGn4rE0bebGNxO2fON1auIKTugQV8UDSo8RLHa3VMhG HijjpahQryQxIsToYTvPPUKAFEih0TxNujS6eKxW3/OTmA5d41GlJNmm+4BFyApXZz O6r1O/TEQM9oJwo/HUZ1m5Vs05aEQrHan86H7aeTz6hojhjR47thG6/VN7wEMiTp9E AD5OzEaOkZclVXVfoiRjPsA8AHFHmucFLrz6spspFR4AH5RW9ij8a+tAXGy4eAbI7a VV23BbEAVAUT7n9aRboLr+Fi0qlzLEGxt0xbsx3v5o4gxMWFZ/O2kW2URMTajbYxSs AOeHj7lw5DQGylcXhROL0AyzRTwaZjsLcA1EZhcg2g/3lMsv5GWqg8iSx+hMsqPRxh 9VG9lz91wSO4ks+iHnTtCSw198Sz8ndiHEe8U8sSKXWE0+flEUe3esGfPj2FM1ueVL gCJoZdX0zyWVnRUyu0CS46PPreoRPaT9gm6fyel7oR3tRG1l0mpnBd0TsEWetJIBwS ySuCAIrZIPEe2Bpmymb49lAHajYibbQsXC9d2hl30REe7y1CcpK42kF+oPJrMXhGdp ogEoujg7Pg4WeARsiRE4vOwU= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:04 +0100 Message-ID: <14ccb558fb3b3a17abbe4a549156174e16a69977.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> 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 3179d33cb3..2c7ddb2f55 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41154,6 +41154,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)