From patchwork Sat Mar 22 17:00:21 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: 40621 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 32F8F27BBEA; Sat, 22 Mar 2025 17:02:01 +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 A65F427BBE2 for ; Sat, 22 Mar 2025 17:02:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Ds-00061B-03; Sat, 22 Mar 2025 13:01:24 -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 1tw2DX-0005ya-RC for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01:07 -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 1tw2DX-00058x-HY for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01:03 -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=Y16FMgJnONzDsaGemVYFNW11utUtDpHP7Xewvp/P4oY=; b=oV4dIusAY7Y+Wb2Yqg52po0rN94t9dBQKvC4wxu8mp/Mo07gV4N5GnqIToDOGAGjBeq7FVupDsAa11bRDl3MjAZxJteHlof/8/BLAPYSGwgdioBqSjiaLb/qNWUQK92WbPAM+MkSO+VsoeAMktHZZMrw60mMxRJNbwhBVjuuiZuRDZp0KWUYJD0Ks96fKx9p50T4kvJePOEt2IR3I/CrVbrOZu7shvGwE1fv8LicAZKFyqUmcXaJ+K4IbbEOzHLbCG82EClpm+mo918n7vkNzN37B4WBqhaG3IjjAsjkGpw0qA1y43b0pagtmyenzMgGkPKvxamGBQotyzeLOBOhWw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2DX-0006dY-E0 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 01/13] services: gitolite-rc-file-compiler: Switch to match-record. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:01: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266284925458 (code B ref 77186); Sat, 22 Mar 2025 17:01:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:00:49 +0000 Received: from localhost ([127.0.0.1]:45084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2DH-0006cJ-VR for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:48 -0400 Received: from wolfsden.cz ([37.205.8.62]:44860) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DB-0006ab-G3 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:43 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 59722380494; Sat, 22 Mar 2025 17:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662839; bh=A3YQSqoXt2ioJxHjsd1Re/ReemXnAVGjJ1UiKrT74q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LYU7rqsYJRLe92E7pBy0aEhxh5/NT4/2AKwzIw8MqtXp34z/CtJ+HPanyLwUs9jOE pPjyzFLBe1lS2t4YRIqrsPSIiTPPaXHb+FxPachqn1P6YSkQ7Mg1AIs5qBuOMXG03q zzCxMDcgMSlmlQyjiPU03RzN/zPGp0svaEvLeKORkKmMb9PnX+snRIs6SthFPZ5SB6 ydaNtmeQrZaAOJ+ap6b5eKGecUSiC8fY3FdRvbVPwT3pNWUxNRQ4F7J8H4wlwfUI8+ +/QKKjPf+ZsBB0DMI1BVaLMCdBNTgnGnBA4H1jUErO/x/XrL3JnaUsYd56RmU1TlfN OO4ETYdR3ZC9ds1eDdnHktlnQlKFxgTrLghTjkSGIp9mklih5L6Li9sQbXLgW2hee4 uJXR5zWpz03XD1BMPs7+qMmVd9ZDP0X5/uvfpOmvtGC5lwtvtKiwChTcxVTeLNcXQA Z+XKQpL1IP24ZKfn7cL1fG/AehUHhC+A+hLgJ38ft08r5YftdQwccrsicrZGtc/BKL mRmyY8K6qk/c4CBbKGw/u8GG7ZpMAVE1dbqT3XKesyO7FzRh5rkS1oZRnBRVCo9jar 2YYVWMobwYiUzpj7i9ZZb3WcGDMgsRSPh7B/AlVUixB84eLhW/eTtQTw/Q436ZYT8K tpHimfawHGWLWCgSiXBnmYSE= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id ED8F438070B; Sat, 22 Mar 2025 17:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662839; bh=A3YQSqoXt2ioJxHjsd1Re/ReemXnAVGjJ1UiKrT74q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LYU7rqsYJRLe92E7pBy0aEhxh5/NT4/2AKwzIw8MqtXp34z/CtJ+HPanyLwUs9jOE pPjyzFLBe1lS2t4YRIqrsPSIiTPPaXHb+FxPachqn1P6YSkQ7Mg1AIs5qBuOMXG03q zzCxMDcgMSlmlQyjiPU03RzN/zPGp0svaEvLeKORkKmMb9PnX+snRIs6SthFPZ5SB6 ydaNtmeQrZaAOJ+ap6b5eKGecUSiC8fY3FdRvbVPwT3pNWUxNRQ4F7J8H4wlwfUI8+ +/QKKjPf+ZsBB0DMI1BVaLMCdBNTgnGnBA4H1jUErO/x/XrL3JnaUsYd56RmU1TlfN OO4ETYdR3ZC9ds1eDdnHktlnQlKFxgTrLghTjkSGIp9mklih5L6Li9sQbXLgW2hee4 uJXR5zWpz03XD1BMPs7+qMmVd9ZDP0X5/uvfpOmvtGC5lwtvtKiwChTcxVTeLNcXQA Z+XKQpL1IP24ZKfn7cL1fG/AehUHhC+A+hLgJ38ft08r5YftdQwccrsicrZGtc/BKL mRmyY8K6qk/c4CBbKGw/u8GG7ZpMAVE1dbqT3XKesyO7FzRh5rkS1oZRnBRVCo9jar 2YYVWMobwYiUzpj7i9ZZb3WcGDMgsRSPh7B/AlVUixB84eLhW/eTtQTw/Q436ZYT8K tpHimfawHGWLWCgSiXBnmYSE= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:21 +0100 Message-ID: <9c1e4968f7f9e7faaa80212e3b08dd0e924b71df.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 (gitolite-rc-file-compiler): Use match-record instead of match with $. Change-Id: Ia2f4985e921aee5f8859d1858f7c186b707d7a36 --- gnu/services/version-control.scm | 54 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 06b6ff224d..e73833713e 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -267,33 +267,33 @@ (define-record-type* (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) - (match file - (($ umask local-code unsafe-pattern git-config-keys roles enable) - (apply text-file* "gitolite.rc" - `("%RC = (\n" - " UMASK => " ,(format #f "~4,'0o" umask) ",\n" - " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" - ,(if local-code - (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) - "") - " ROLES => {\n" - ,@(map (match-lambda - ((role . value) - (simple-format #f " ~A => ~A,\n" role value))) - roles) - " },\n" - "\n" - " ENABLE => [\n" - ,@(map (lambda (value) - (simple-format #f " '~A',\n" value)) - enable) - " ],\n" - ");\n" - "\n" - ,(if unsafe-pattern - (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") - "") - "1;\n"))))) + (match-record file + (umask local-code unsafe-pattern git-config-keys roles enable) + (apply text-file* "gitolite.rc" + `("%RC = (\n" + " UMASK => " ,(format #f "~4,'0o" umask) ",\n" + " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" + ,(if local-code + (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) + "") + " ROLES => {\n" + ,@(map (match-lambda + ((role . value) + (simple-format #f " ~A => ~A,\n" role value))) + roles) + " },\n" + "\n" + " ENABLE => [\n" + ,@(map (lambda (value) + (simple-format #f " '~A',\n" value)) + enable) + " ],\n" + ");\n" + "\n" + ,(if unsafe-pattern + (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") + "") + "1;\n")))) (define-record-type* gitolite-configuration make-gitolite-configuration From patchwork Sat Mar 22 17:00:22 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: 40622 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 CB29027BBEA; Sat, 22 Mar 2025 17:02:05 +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 5CC8627BBE2 for ; Sat, 22 Mar 2025 17:02:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Dr-00060e-8C; Sat, 22 Mar 2025 13:01:23 -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 1tw2DX-0005yX-5o for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01: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 1tw2DW-00058j-Rp; Sat, 22 Mar 2025 13:01:02 -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=cHiSw2BO86o82AvdJqg4kV4fDvrzC4bL/wqPARxvVWE=; b=hd+AUi3BfCJQlFAflgXO49lc9FxIW18b0TYp62+LJ6TkQDckXoo9hIIeyfB8ZThgxCA8wvEzRf3b4mBaUT7NCo8EzjtK91aoEojcRfrO5A8hgKgaSt6irDhGwPWerpw5XEsl/DARj+T3YduIqvqhBRMZ+t6xOUrYBlwfpG6iqMVXg0r2JUwAdIMNbgTV6oO0ZMf88Zdd01fRQQLyITmm980lsV0s6fWdaEGmrRjXXGEyPwp9w3y7AAgYUTsy2sv9h1fKuLfKXHwl247KZwCZaX9s0cw+N6rPDtSFW94qQtmTv9zDAoBjQfUorovOQUwJfBDDKmB5t9i3Gt6wc+25lw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2DW-0006dH-HT; Sat, 22 Mar 2025 13:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 02/13] services: gitolite-rc-file: Add log-extra 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:01:02 +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.174266284625422 (code B ref 77186); Sat, 22 Mar 2025 17:01:02 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:00:46 +0000 Received: from localhost ([127.0.0.1]:45071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2DF-0006bo-KA for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:46 -0400 Received: from wolfsden.cz ([37.205.8.62]:44868) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DB-0006ad-Gb for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:42 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id E693E37F2F1; Sat, 22 Mar 2025 17:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662839; bh=Doi5KlkP0mRtaG1+kohkb7GbOsx9PaqVgsoSKXddhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=afIveXTpg9+M2A9tp0ogVUQ5rXoF2DzSpleAhmxjm9PzyaDSG4ZFpdhXLtUKVR1dz YBl+5bE4d4Tz2s3JKVEYtOIGEMeZsan7RpTFtdM7GfopPFiKn4fGepAEnHTfOU8xt6 wc1ekHXEp97IzyWc7qP3d/Iec6RJh8I+kvQSolfYnhXKYGF3pr3zcflUxxHjpMSoDA +cdx259DaZiRWRd4tH1UFMya+VaGBaRCf8g3gP5A8SSQrpm9F1KH7aL0Z0+1LVlq4r DDZxWYyCIrD0UJXN+hjl9GudzGr2U5bKXHR44yqBiMmhkllRrW2/SiYROOMiWiKOJy 5IIWXgeOTSYuPjJcDpo3OfTJfS/2Nfa/hNtx+tVehJFbsJAHtnXhASrOkLLCfBLuhj 1QRCbPsmnTjOfEUVltmTwYUUbw3xaQq6qHNZLWM4RjZMJhM5TwbSTHaRAKutSNe7ve /bkqXIalghvfMkckpWBgoDM0kI7cHCn3EbMXdagdRAaycR4O7eLoFYcdj/XN9pJJax N8oaty+DOLab4z4YeR305YhJPBSLmOk5PteIjSC4UiDvG8iULCbVrNI8lL5f0UpWAU PGvWZb7G/2UW6/LShdvjQP/QR1z7Vbw3xEli1/BpZE9Wlw8jhiu2mj7lNI+afIN+hZ 1PQNch4RCJdz930VXTpxRH/w= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 7CD5F380495; Sat, 22 Mar 2025 17:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662839; bh=Doi5KlkP0mRtaG1+kohkb7GbOsx9PaqVgsoSKXddhHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=afIveXTpg9+M2A9tp0ogVUQ5rXoF2DzSpleAhmxjm9PzyaDSG4ZFpdhXLtUKVR1dz YBl+5bE4d4Tz2s3JKVEYtOIGEMeZsan7RpTFtdM7GfopPFiKn4fGepAEnHTfOU8xt6 wc1ekHXEp97IzyWc7qP3d/Iec6RJh8I+kvQSolfYnhXKYGF3pr3zcflUxxHjpMSoDA +cdx259DaZiRWRd4tH1UFMya+VaGBaRCf8g3gP5A8SSQrpm9F1KH7aL0Z0+1LVlq4r DDZxWYyCIrD0UJXN+hjl9GudzGr2U5bKXHR44yqBiMmhkllRrW2/SiYROOMiWiKOJy 5IIWXgeOTSYuPjJcDpo3OfTJfS/2Nfa/hNtx+tVehJFbsJAHtnXhASrOkLLCfBLuhj 1QRCbPsmnTjOfEUVltmTwYUUbw3xaQq6qHNZLWM4RjZMJhM5TwbSTHaRAKutSNe7ve /bkqXIalghvfMkckpWBgoDM0kI7cHCn3EbMXdagdRAaycR4O7eLoFYcdj/XN9pJJax N8oaty+DOLab4z4YeR305YhJPBSLmOk5PteIjSC4UiDvG8iULCbVrNI8lL5f0UpWAU PGvWZb7G/2UW6/LShdvjQP/QR1z7Vbw3xEli1/BpZE9Wlw8jhiu2mj7lNI+afIN+hZ 1PQNch4RCJdz930VXTpxRH/w= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:22 +0100 Message-ID: <2760c726fe70f6622ad770ba3e2b755489e8f66a.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 log-extra field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Ice65dbdf4f42549e3c83914da7229db9d2cf856b --- doc/guix.texi | 7 +++++++ gnu/services/version-control.scm | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index bcb1f9d9cf..3179d33cb3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41147,6 +41147,13 @@ Version Control Services Gitolite allows you to set git config values using the @samp{config} keyword. This setting allows control over the config keys to accept. +@item @code{log-extra} (default: @code{#f}) +Whether gitolite should log extra details. + +For historical reasons, this field defaults to @code{#f}. The default +value from gitolite however is @code{1} (written as @code{#t} in this +configuration). + @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 e73833713e..2e7448c33b 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -59,6 +59,7 @@ (define-module (gnu services version-control) gitolite-rc-file-umask gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys + gitolite-rc-file-log-extra gitolite-rc-file-roles gitolite-rc-file-enable @@ -251,6 +252,8 @@ (define-record-type* (default #f)) (git-config-keys gitolite-rc-file-git-config-keys (default "")) + (log-extra gitolite-rc-file-log-extra + (default #f)) (roles gitolite-rc-file-roles (default '(("READERS" . 1) ("WRITERS" . 1)))) @@ -268,7 +271,8 @@ (define-record-type* (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match-record file - (umask local-code unsafe-pattern git-config-keys roles enable) + ( umask local-code unsafe-pattern git-config-keys log-extra + roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -276,6 +280,9 @@ (define-gexp-compiler (gitolite-rc-file-compiler ,(if local-code (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) "") + ,(if log-extra + " LOG_EXTRA => 1,\n" + "") " ROLES => {\n" ,@(map (match-lambda ((role . value) From patchwork Sat Mar 22 17:00:23 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: 40619 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 4824E27BBEA; Sat, 22 Mar 2025 17:01:38 +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 B265027BBE2 for ; Sat, 22 Mar 2025 17:01:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Dt-00061U-QY; Sat, 22 Mar 2025 13:01:25 -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 1tw2DY-0005yf-Ch for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01:07 -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 1tw2DY-000594-2A; Sat, 22 Mar 2025 13:01: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=VjEtMhEFdWvzH8lDW+Sm/6KBNTr9YuB6r7TpB71aVUY=; b=UFbq4bk6SCj2ZH6Zsar+tZyFNawP3DBsNtfTlXMnZRElzve9FOEOq/x1zfPqCXm5MkP966f53k/X+uS9ADQs3DSnaVBUiKctYCMTRVk2qnafo2ni0TZ6WPejuaZVlxaKMPIZ6uHfi1FNNktzKF/VcQeVoRoH6A//F5wNR9EKX9UaOVuYG1CFxn5RU1EHnSgOD56D8M6ta0uR1oPy/yXsIwxZjO6y1gk95igOIYRwHkiJ43NktEVtSjnO8za7jK3DvQttQbKYcZkI1apgzVLwpSo1z8IRxCV4xVRNEVOHiOHamTGYATYaw//JyK7cTQHUWghI6+aB5zb34yedALGwMA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2DX-0006df-Rl; Sat, 22 Mar 2025 13:01:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 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:01: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.174266284925469 (code B ref 77186); Sat, 22 Mar 2025 17:01:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:00:49 +0000 Received: from localhost ([127.0.0.1]:45089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2DJ-0006cZ-09 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:49 -0400 Received: from wolfsden.cz ([37.205.8.62]:44884) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DB-0006ag-HP for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:43 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8E01D380221; Sat, 22 Mar 2025 17:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662840; bh=0Y4kILm6o1VyeuGxCgVPCSVV49Qx+/X/3s9muv4uqc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wQM3efejnnZ2jWlWUbcTsdClqdagjfkt51XFTaTC3EZ8MINPjGJvXIFZIQ4dkFd18 ztN34gVEmaA4B+40hptbUSDhDH4lq/WDhrlA2+skBZhk1AX6zO14VO2vXhrtVo0wMO D66VyufHQ4jwWqB3ULSts1Fq9F1mff416vzH5mmFer/ttvIhEvB9nMifrSMjDDpt9M 3PAnWDqxmo0lscAzkQ9v+IY0XE83XJ19zy83aIYw7c7TIigX58s26icgZLU5Wcyavw wOtq1u8gqQI+qI5V+SiX3ssSC+bQN6RXmRfCeLkzM2GKvhYmdJGa3fG13XGQh+92iq Bmjni1mxXZNOKDHMFwD6NoLuUMeeXyKFRDlrVQpIrt+O7qqGRmsfv2MRSKC+hov87m EWAFcc+r95O2dTyENbGKd/xNLsN7h5iqtOomInLkZMad9vxom10eoNmrOWLLmtq5eZ 6Zo/1SDiZEybRctVCGq/GLqg5PdF8SI9vQfxdRlSWAWDglClsrYIl8o5OggE7Z/8Sw +496Mq6xbnYAgmZeQmoaQV/uWarJcGvcVmLbmARhkaOyqG1p8apKMqnN6e1elCytuz d7lePOjiTqkwosJCvB+gJ1pmrvLkzq21w6Vzfr31TKs7rQVQLFXuA7+KIeKHp6PWEh tuFQavEFm09HqrOAHWrZgyrw= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 07B3038058F; Sat, 22 Mar 2025 17:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662840; bh=0Y4kILm6o1VyeuGxCgVPCSVV49Qx+/X/3s9muv4uqc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wQM3efejnnZ2jWlWUbcTsdClqdagjfkt51XFTaTC3EZ8MINPjGJvXIFZIQ4dkFd18 ztN34gVEmaA4B+40hptbUSDhDH4lq/WDhrlA2+skBZhk1AX6zO14VO2vXhrtVo0wMO D66VyufHQ4jwWqB3ULSts1Fq9F1mff416vzH5mmFer/ttvIhEvB9nMifrSMjDDpt9M 3PAnWDqxmo0lscAzkQ9v+IY0XE83XJ19zy83aIYw7c7TIigX58s26icgZLU5Wcyavw wOtq1u8gqQI+qI5V+SiX3ssSC+bQN6RXmRfCeLkzM2GKvhYmdJGa3fG13XGQh+92iq Bmjni1mxXZNOKDHMFwD6NoLuUMeeXyKFRDlrVQpIrt+O7qqGRmsfv2MRSKC+hov87m EWAFcc+r95O2dTyENbGKd/xNLsN7h5iqtOomInLkZMad9vxom10eoNmrOWLLmtq5eZ 6Zo/1SDiZEybRctVCGq/GLqg5PdF8SI9vQfxdRlSWAWDglClsrYIl8o5OggE7Z/8Sw +496Mq6xbnYAgmZeQmoaQV/uWarJcGvcVmLbmARhkaOyqG1p8apKMqnN6e1elCytuz d7lePOjiTqkwosJCvB+gJ1pmrvLkzq21w6Vzfr31TKs7rQVQLFXuA7+KIeKHp6PWEh tuFQavEFm09HqrOAHWrZgyrw= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:23 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 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 2e7448c33b..52f260f708 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -60,6 +60,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 @@ -254,6 +255,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)))) @@ -272,7 +275,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" @@ -283,6 +286,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) From patchwork Sat Mar 22 17:00:24 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: 40620 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 7B58A27BBE9; Sat, 22 Mar 2025 17:02:00 +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=unavailable 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 1B68C27BBE2 for ; Sat, 22 Mar 2025 17:01:59 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Dq-000602-BV; Sat, 22 Mar 2025 13:01:22 -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 1tw2DX-0005yY-Jc for guix-patches@gnu.org; Sat, 22 Mar 2025 13:01:07 -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 1tw2DX-00058s-4T; Sat, 22 Mar 2025 13:01:03 -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=IK9VUKxDF5u2foGVl4Mf0D1vvA5CoLWabgXsm9DJmX4=; b=OnDEeToP/VSzkYvttvBZPQCn5h4GMPSfxEcOG3QsW7thQAS74eb388tHQt86u/dRIXBcLuj0/zggPO29A1AfVHJ8/voI5Y3EsgmfXZqoyXKjtoSQ2eFF7417AluOcoNM2eVivYaqk2JOFb0ndkd1GqlJiITl77zvdRf5Mkm3y1Wk8646l69D1vaUH0+q7Muy5rdMuQqdpq2v6juoivWwm95XiRpV1SNP9xdsCaTl9iKlYAjx+1GHpguPzgqyV+5SalALIe1XTUCo/E94xrcGFfUBNL25WrPzpmNTEPo5dJ0PWF3BMsC5M9o+4I6BDiTuKXp527pEyxBouvyT191vCQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2DW-0006dP-Vb; Sat, 22 Mar 2025 13:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 04/13] services: gitolite-rc-file: Add extra-content 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:01:02 +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.174266284825442 (code B ref 77186); Sat, 22 Mar 2025 17:01:02 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:00:48 +0000 Received: from localhost ([127.0.0.1]:45079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2DG-0006by-Ge for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:47 -0400 Received: from wolfsden.cz ([37.205.8.62]:44900) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DB-0006ai-W1 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:43 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 08469380D80; Sat, 22 Mar 2025 17:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662841; bh=mEL3dNgOsoqOjKopquC6/Gsjkapz6KdiLYejp7Ezjsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F53E7g3I2Wi+l8EAsZG98ZxvaOEFw8oBNPJZ3gn879inecN7VWBCsDUCHwUqoe54h lNKU6r1aRzYSdSqDeXWFRbTAAxg7cx5bjo+Y1GrFntIOulbTnDeXpUHdmMEz5CKzYh pJaRZMjKQ2HFjcU6p/Hyv78QVKkuZdBrIKhK2mZmpKVhi9bvQLHE8SJI0rnAlVzf3/ K9s13+y+Lb1zy49z4Qs4l6TwBogia8l6NtvqnpYVgWRx8Zhd6GghxPt1qef5LsYrjB UycEsfp7dzGbFpCepzaixZ1VDlNK2blTEZPrEMYHQbtFma2TsbdgH89NmEKiL9Wat1 rVwEvMJ3abRqyj7yF400JE3xi2DRGFOQtR8w31e7feA8Awajs06WzXScLqXksTqa8V te6OLebepQUw6JXHkGxrvIiXl6I1dxlS3FqVE74b3IQFdOrUNF27NAMCmimJutFmoG f1OwjaBnOH/A/7zkP59zfFGc7byQbA92iqko4U6SHIUMbD7r9z8aagLT8Rh13JNuXY 3QkOXeTlOHG4JS0TCOJPXmcy5hNoJI8oqM2D/8F4SPLDGylAiNpCRPpmRjtV8VXJeN vg+AcF+h9xHFdyTDhVXeQO4hlVJ/Znekr160irfBh0ErQxGRW2Qu3OzTppHX1viNal yucU+xKD8JE3C5bvJAQzaAZ4= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 875EC37F0DE; Sat, 22 Mar 2025 17:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662840; bh=mEL3dNgOsoqOjKopquC6/Gsjkapz6KdiLYejp7Ezjsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZO838jp6VqVR5aVLMM+V3CwHpUyiVnfklayF+BJX23uNaKGe6Q6ty84NGTAwYDQWc hM5WLngRk/vOKzWLSiU/lRMU2pmG47Nq55nIS00N2K8rj9JaRoDWOkitLawYHU4WBh Q6pg2CB6qzHnTIES1IjHD72Z7W1sXBz5jhFVthH7kuDlB/pJgQ9iiynam8LK8r8rlh WroeuSIfEjn7ftkLESLNi3mZACV4F4KB906/PF8q8lj23ziawch6xXbL0GzFEiRWD8 GoVZt/moP4XX9I7spg2ueevpCExSEGIwY9nMKFl6ohEOYaKpyMIcQndcoI/oF2l44P uoay/XZ98p79SFqF4ob1AChLzK73YugeEXC8EqedpxOT1eSQUrD6cblMHV1loIMK4V ftA2x8jtmJPEK/n2jMwSAuDjaWQnW9j9V96HXFq3lXO9xZWKsPmFq6R94C+ettrwB8 qS4n9cmsedA2iWY/Jajmw7NIM46Uowe4EHwhiEkVA9kW/xny/aWS/cAb0jSrM1zTBq wOknSJ+D2WZ3Q8NXz/SGareYERXQ0A3QaCfB11KKFdY+xl+/nQSXr6ozfCRMuNUXao wAlbHvEdxZuPN5qn2CpRZ73cjmJQLUG6sorBIxnC2c2ogBD7JrHvN8HB1/EF42nVsJ krkg6L4cQ83LfJNUfgRnN7yY= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:24 +0100 Message-ID: <7d4597f2c662e28522c238071c4ce59bccb14db2.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 extra-content field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: I5082e1d7a27cc746641ba9ec8ae07c703da5f279 --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2c7ddb2f55..e60fef9673 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41164,6 +41164,9 @@ Version Control Services @item @code{enable} (default: @code{'("help" "desc" "info" "perms" "writable" "ssh-authkeys" "git-config" "daemon" "gitweb")}) This setting controls the commands and features to enable within Gitolite. +@item @code{extra-content} (default: @code{""}) +Extra content to add verbatim into the @code{%RC} hash. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 52f260f708..36513e0343 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -63,6 +63,7 @@ (define-module (gnu services version-control) gitolite-rc-file-host-name gitolite-rc-file-roles gitolite-rc-file-enable + gitolite-rc-file-extra-content gitolite-service-type @@ -269,13 +270,15 @@ (define-record-type* "ssh-authkeys" "git-config" "daemon" - "gitweb")))) + "gitweb"))) + (extra-content gitolite-rc-extra-content + (default ""))) (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match-record file ( umask local-code unsafe-pattern git-config-keys log-extra - host-name roles enable) + host-name roles enable extra-content) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -301,6 +304,7 @@ (define-gexp-compiler (gitolite-rc-file-compiler (simple-format #f " '~A',\n" value)) enable) " ],\n" + ,extra-content "\n" ");\n" "\n" ,(if unsafe-pattern From patchwork Sat Mar 22 17:00:25 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: 40628 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 40E3E27BBEA; Sat, 22 Mar 2025 17:03:04 +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 F22EC27BBE2 for ; Sat, 22 Mar 2025 17:03:03 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2FM-0006bY-SG; Sat, 22 Mar 2025 13:02:57 -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 1tw2EW-0006IC-Qv for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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 1tw2EW-0005DH-9s for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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=87lgWvovxsqvOgSpe04DUxZZXyGTzbhM5qmq6LqxGt8=; b=ecWK1VgFO2lucisn9PVoI4PBd9z5KiNzxjfmd3LzlkxAtJuxWQNn8xVcVWodGPkcfaavbt9AaoFydF13k8vYgh1pfuE2cf7UEdZKVdEtRn4EKuGuwaJUc9iZJmwvpgcitdrP21iFonzQfhZ6kpRp9o1LTQk3eTsYToUtc3MWGK4JLpwxTCZhbk67jJw6x1cx4ThbyJYMxgn2C/iPxAPx02NGKiEe20L9/POnq56JuUn74rmtecT8VKTRtW0iduQV5wlL0xKrdawTOHy9GUf+G4FPOM7ERwjg3Q/Jw7s5lDgzVZjQbNKe7reFjIfGtRP4SxdVlvnZPUmub4qa2tGeRQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EW-0006hG-5F for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 05/13] services: gitolite-rc-file-compiler: Set mode of the generated file. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:02:04 +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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266286925571 (code B ref 77186); Sat, 22 Mar 2025 17:02:04 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:09 +0000 Received: from localhost ([127.0.0.1]:45102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dc-0006eI-TP for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:09 -0400 Received: from wolfsden.cz ([37.205.8.62]:44908) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DD-0006b0-WF for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9432B37FD22; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662842; bh=/k4g1FIdWimnz9Eu3KTjznY3yf2Yq1N8rMHWqHosTQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uBXlVTiCEARyo0yePPtDapBdzXxdmk0yhB1sPqyVA+HDslSlo6qojnkixgx35uuin K4JgRjt26Kv1rrl8O9JielXqdkRf6+ILI9/TAP49YxiL1M+o35QB0vMrtXg/kf/9qP qkEdwqGHdq04MCMfZRWKGPV/WTtfTfEPkEclVG9VR/Vbn+kCCa33foeQfsr2VO3Ri0 Ew49w7rHiYU68hUJuZptUWHab/FV+P78vavo0mt6MKgRXCLwC3spshQeU496laipLY rSKiYyxcsn6443BaggSAizZ3IVDc1fmbLfAxM3eCRIU3mZjL2y+/uR4XSdYfxyEgmo xoWOTak+dJRSZqlWoJZ8PRYjQi1NOaLvGy9e8p1KbLRH1ueGkXJTR6yZn7JQgobUJG /kiT6XsX1gVCPROyPZTaWS6AswxNnRudXv06t+j89afQjOO4U+x1EUOKDbSW1uEmzJ X3MZE+yXribT7aCMHYT53Nr2cTSXa2LEyNr3luwymE6jO+1f1W6FmP7I/5PoV0byRo 6htsMXey7liczzoAdtv3cbWVF21qgQ+IwdSyWzETdNkRXrS8oT5tNS8wA5OYkpCGKO qh1nVjG7sS7sh4+ycI/hZXY0Obn+YKV592pNW/WP0iqbQX0u94Hm0a68cFpsfDMemd c19s/nMDQvqEb9kozWr1TeIo= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 0DAAE3802FC; Sat, 22 Mar 2025 17:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662841; bh=/k4g1FIdWimnz9Eu3KTjznY3yf2Yq1N8rMHWqHosTQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=por+Z4SbE6wIqZTaejsAP6jiBjlEZhvHch1QFAkcMZb0r/iqmIOFfjp0f3CJyjmrB 0SmJ75FduYvtN/dRB9FDTMDcNVa/7LRZyrqTiJ984P7Nl28j0NYMib39TA7rOPK224 Tsz4RlCg/2ajjNyLv+Hp0qu1wDoAwkENkiW+fp8y4Ac/X/W867cW9LHb01T+HHsLsP dD1ktn8mh3IEuVE75NvuCEwPGH6voIMMLfMPpTZ6YDZNT1zrrUTpaJWBzkvw3ZtNCz nUFDe4wbURJX9MQFXRK6lDjnSbXjN7D5R+6ziFmRhEknwtIgRse2sBFQ9dOHAU3tTb tfYe8dM/0FdoiUTxFMRGilbxCUVsBuP5MARK5NEblKX7o4dnt3jEM593/0E4swCc7Z UXSPl6eRU20XLuMTjcXIMDV20v23c1wZcKbdKnsMBIHpmXBvZl2isVemIJ6bPI9mvA Lj/nDrF0ZLVlh7mm7ubtyfNUoH9DUEufiqyDxxg59/an2MUhTH/1AfwjcUKrZ3ZHKA uL0DriNeFxoZ2cuhOpUKutsMjvllzEWoYICAjFrFc4WlQB0eJqYrAZQRiMLoSnPAuA a8MuW+XMm5loehoMmQRaJPX7N8ia3RtScyp4AnI8W5ZsZCF8Wuu2LJciJwc6x6LWfE 1TwzDXRiPbVCH2fFTJnJATRg= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:25 +0100 Message-ID: <4e4cc8f73b944f9e0acb23cf7f3a2362ae0e4108.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 Copied over from the official configuration file, this sets a correct major mode when you visit the generated file. * gnu/services/version-control.scm (gitolite-rc-file-compiler): Add local variables. Change-Id: I8a9d794a1e3c7049ae606165cf939d81b5dbdf6e --- gnu/services/version-control.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 36513e0343..6ee81eefe4 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -310,7 +310,11 @@ (define-gexp-compiler (gitolite-rc-file-compiler ,(if unsafe-pattern (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") "") - "1;\n")))) + "1;\n" + "# Local variables:\n" + "# mode: perl\n" + "# End:\n" + "# vim: set syn=perl:\n")))) (define-record-type* gitolite-configuration make-gitolite-configuration From patchwork Sat Mar 22 17:00:26 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: 40626 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 CCCEE27BBEA; Sat, 22 Mar 2025 17:02:29 +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 8C5E127BBE2 for ; Sat, 22 Mar 2025 17:02:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Ee-0006NM-8A; Sat, 22 Mar 2025 13:02:12 -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 1tw2EX-0006Im-3c for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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 1tw2EW-0005DM-Q7 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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=dcSTh81GJGRNkBQs7l17HN3VOGxoTM4E3EXaUWwGPCo=; b=GLDzqqtZntIn4v9g7gGYrERKz8uKxmS0AdtwMr9qcVXSLW+uRZfmHczorZwguMB/B1BXXsu/+tvbyJ/bxH8YTuKDc4ZAs1+xXnZmI8ZX+6KOvmKTQqBFJPCiYht//6fJZZgnEA+zSsLHY7cM6AzIokBs9IouHpVUrV7Uhmccuu88JCI+ueFYhbMe54g/mfOEmnw4ToSEOv+oixi7Tmjq+oFssT9KoN1ifKTleyAUXBcaj4kgE2fa7ZF8NkBXBsulmAx5rm+YMrP6AwnKj/qFo7MguhVAhqzLsBaDVQDWu9nPsz7xamJ2Jg4/G/5Au4Ih7f3vrc5Un7UZyZUeirge5g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EW-0006hO-Le for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 06/13] services: gitolite-rc-file: Export default value for enable. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:02:04 +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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266288325603 (code B ref 77186); Sat, 22 Mar 2025 17:02:04 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:23 +0000 Received: from localhost ([127.0.0.1]:45104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dr-0006es-C5 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:23 -0400 Received: from wolfsden.cz ([37.205.8.62]:44926) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DE-0006b8-8E for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:45 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 068CA37F768; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662843; bh=R/4F/wHtxfPkv6MWhaljJS3RA5NEW/fbEX4QiDc4jLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fs8jQ96FOBqxQ84SnQD10yc+qJAOPY3TfQartiDBUjjfJHTEqmUIRoOqRcU5xuvzn FQmx7AGk9nEXPalUi09RVkZX52bnPPdhpKNKHM/WI+e2NW6LqWphKoGfVBzxJCDAwy UYVpeV5iZM0sYM/uprJuvtZEZlgj912N2IVXUAc2wDNSlsLMAhMY56U1kVj/qAJhwm v/rpnJbZgilJCh34Efe+yGsiYQc/87f0SzyukpEd1HSCyYqrt2d2w7keMbUoKO6OyU rquGDdi2aHdUeIVpJJ2lRr54kgOJTGrvhE82EgbTHOupdlGOshRRX7GhuadA7A6bQx 8FnxYT4Hu3ogKnO10Zk2SxKBe9IMKEHgAJc4SVZm+7aEEf3gW5voWnEtxE26BepFjq Z9li2324qRaDpeL3Q6g2b7smt6ckABwPX5tCtrzD7cuGFpnomU6oFCqqaG8gzZoSHj DzbLEzPEZNiMgASt1C+6mfCEv/uU5vMAvQ4MEukvnqEfAt4d/u6n9g/pYhC5anCVe5 nvVbnj5/QZaApE2TBJ87k63nlgTy/t0FM0cA7GFemtOl4kpPPvSw421GT6ZbIrJ+XA kYZzXhzzVTnB8TBmZxeuMv3eUf6ZYgUQGRU8RAGCRonuYij7LtsvF6qcvZWQlMHsew wK2lDb8CJ0v94kzAbGCktZhs= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 85E5E380460; Sat, 22 Mar 2025 17:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662841; bh=R/4F/wHtxfPkv6MWhaljJS3RA5NEW/fbEX4QiDc4jLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=C3IFumRwLgYSDbD5Zu6qIBKXp8Hg77d6OR4UOnpDUtzbtotJhTYihS/ErfZwr39GC gAu5hNa/eAujf1RrqrNISGlTW0bRbpuep7zynQgUKVhNBy9uhtMA63vH+aujh4f7fR J9pKUZApfsNjBP/Hf/5vxZBK1IUsHSD8RM3h1MKows+F7GpO1+sE3Sw3cNVcCf8Z8h V2DCtWBg/NLaY6zFzKhFdU7xwOmrBAyqJ5Sv561RCjxNx5eR0fZx3M31uUQ1PJebWg otitIrZFcRU0xAIuR1QPjMgvMgbsgvLN95n79CkIZd6bi0Zwl2s1V5oKZft0pMBx7C 4FAUnr6V3D6YhwA+7D/Ej6BCQO3XiOoTTolTXAmmq6TfyyOuagAHM/bzREml1EuRBy zqR3F3IAIDluO+k8R8QwBPUea7NLF6YoI059KN32IzZ7ilnjWP3uJUz98g2W2SrR4L 2EBwFmX+yr4SRwMIf9u8Wg5dvS8NN7L34TspNuUiV4v0zLRvxYr1ip6xdfkXGYWalh 5r8CUAnzTTatIiuQtJCF5qSKWBxemmmh05M2RZfT2OMqCNVhmgo7ytWT/l86evaa8A aOV0mhYh757XyQvJHsvjGVsepz1B0o//UStJ3/7uBtnT3GrpZzbOJyfl20iiOskMBv h/JeDLCu7lQJ9DXVk87D9Q7M= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:26 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 (gitolite-rc-file-default-enable): New exported variable. (gitolite-rc-file-compiler)[enable]: Use it. Change-Id: Ie6326ff69f3d454d96db6629dd5387757567d68f --- gnu/services/version-control.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 6ee81eefe4..b3196199e3 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -64,6 +64,7 @@ (define-module (gnu services version-control) gitolite-rc-file-roles gitolite-rc-file-enable gitolite-rc-file-extra-content + gitolite-rc-file-default-enable gitolite-service-type @@ -243,6 +244,17 @@ (define* (git-http-nginx-location-configuration #:optional ;;; Gitolite ;;; +(define gitolite-rc-file-default-enable + '("help" + "desc" + "info" + "perms" + "writable" + "ssh-authkeys" + "git-config" + "daemon" + "gitweb")) + (define-record-type* gitolite-rc-file make-gitolite-rc-file gitolite-rc-file? @@ -262,15 +274,7 @@ (define-record-type* (default '(("READERS" . 1) ("WRITERS" . 1)))) (enable gitolite-rc-file-enable - (default '("help" - "desc" - "info" - "perms" - "writable" - "ssh-authkeys" - "git-config" - "daemon" - "gitweb"))) + (default gitolite-rc-file-default-enable)) (extra-content gitolite-rc-extra-content (default ""))) From patchwork Sat Mar 22 17:00:27 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: 40624 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 60BD927BBEA; Sat, 22 Mar 2025 17:02:13 +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 09AC927BBE2 for ; Sat, 22 Mar 2025 17:02:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Ea-0006MM-2V; Sat, 22 Mar 2025 13:02:08 -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 1tw2EV-0006Gw-Iy for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:03 -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 1tw2EV-0005Cy-8x for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:03 -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=avjgiUvRNi9nUVE2F1LT9A4k750Tq9K5MOlD2RPVblM=; b=f7//upLwGNWpLhpl896pQ98nD63r4Paxib6wh2Qn4FGgzOKOgpSZrK+RyhR3SiPRoRIe46c1f4x+E7gQCImQa9AiLnOWUg0uvj8VUzhFAXavSpe/J8J7HKw/97MBCs1FT8jqVlAK7TCUl1dnkF31yLUtooJKRy3HLw5/jJkjAK/YgblV+8apcRNo9Cg7ODDGN3k3xkn6jtRu8C5GdCg8z3+IWCrFgIpqlvtZK0lhNV74oOfSPd6Nozkv87ZkeNaRXA4gg8F5A4xOuMWU/2ZEOGW+DtqZ7zKh4UnVti3k/nn8DSL4rqXjRi5gvPbtbbDkrPcvvyMjaRWLgJjD4MggMw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EV-0006gw-47 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 07/13] services: gitolite-service-type: Do not install gitolite package. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:02: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266286825556 (code B ref 77186); Sat, 22 Mar 2025 17:02:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:08 +0000 Received: from localhost ([127.0.0.1]:45098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Db-0006e8-Rt for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:44904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DD-0006ap-Ej for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 7AA4A3800B1; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662842; bh=3eUo/1HUVaiIZp+QDwp2QAb7kYZ6Us72bagdz3/zBSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BPlxoBj0rBZMmbkIagcvTO6PLxQ2BeMCjl9SbVmgrfN3jYJto7V73XeAZqDg/z2pf 9h4Oj9ENW202qkh9QfYn1yYn2IyalcjJccI+ANE/ZEC29QnsoiUxsl8fhOHohJzANg PvdwP0/4yjyGjGabv9V5HYcmTy8DiIxub2z+JId1bf37IpOERpL75sVQ4YWrOsoJGh BY6RehxwUPbMmaaafgDz9zZx+UNdlPH8O+PWEIGpui/UaP0Do5ia89NkwsK6JdNHRi dQ3reg9KD6N9z9tr+2YZpFb1z+mT7hN/1U43Kw3n3fhnRhxMs8W6pKvjeKG+IMAw/C /bHkpeiSID56S6vkF0cxiDuhc30n2zjs5PjyukgZ49JKRbxOHFvN+gwYw9oktHeaQH pJ8V7lVYeZFLNPTv9DcwzCvDT2B5H6f+xiR8J0ZnjTNRTqjbVy5vdjCn1LMCGHi/Vg gZywpxvJ38URyGC8cRNtSuxo1gcDgvhd3AF61HAKyifACbCfbIhKPp1Lq392oLqvOr AkdlQTt+JM7Qy5Rptw4KIdWn0cCs9d+T8rPH0IxpCNcoGyM7lUuGa3/tJMbSt3WpCY wYT7M60h0hJmDa41Lw9pqynLLD1Lmq11+UA+nmmf+yfAC6jHF09lPIH9Zy6Q+/owFT OtkEFIePthsNPqyThFEuUjmg= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 0D4D4380137; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662842; bh=3eUo/1HUVaiIZp+QDwp2QAb7kYZ6Us72bagdz3/zBSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BPlxoBj0rBZMmbkIagcvTO6PLxQ2BeMCjl9SbVmgrfN3jYJto7V73XeAZqDg/z2pf 9h4Oj9ENW202qkh9QfYn1yYn2IyalcjJccI+ANE/ZEC29QnsoiUxsl8fhOHohJzANg PvdwP0/4yjyGjGabv9V5HYcmTy8DiIxub2z+JId1bf37IpOERpL75sVQ4YWrOsoJGh BY6RehxwUPbMmaaafgDz9zZx+UNdlPH8O+PWEIGpui/UaP0Do5ia89NkwsK6JdNHRi dQ3reg9KD6N9z9tr+2YZpFb1z+mT7hN/1U43Kw3n3fhnRhxMs8W6pKvjeKG+IMAw/C /bHkpeiSID56S6vkF0cxiDuhc30n2zjs5PjyukgZ49JKRbxOHFvN+gwYw9oktHeaQH pJ8V7lVYeZFLNPTv9DcwzCvDT2B5H6f+xiR8J0ZnjTNRTqjbVy5vdjCn1LMCGHi/Vg gZywpxvJ38URyGC8cRNtSuxo1gcDgvhd3AF61HAKyifACbCfbIhKPp1Lq392oLqvOr AkdlQTt+JM7Qy5Rptw4KIdWn0cCs9d+T8rPH0IxpCNcoGyM7lUuGa3/tJMbSt3WpCY wYT7M60h0hJmDa41Lw9pqynLLD1Lmq11+UA+nmmf+yfAC6jHF09lPIH9Zy6Q+/owFT OtkEFIePthsNPqyThFEuUjmg= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:27 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 It is not ideal to pollute the path with the binaries from the gitolite package, so adjust the package to support that and the service to no longer install it. * gnu/packages/version-control.scm (make-gitolite)[arguments]<#:phases> {'patch-scripts}: Use store file name of gitolite-shell. * gnu/services/version-control.scm (gitolite-service-type): Drop the extension of profile-service-type. Change-Id: I25459ccd80bda892b6d188b2b6fa99baee339cba --- gnu/packages/version-control.scm | 5 ++--- gnu/services/version-control.scm | 10 +--------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index c8f244e0fa..e06ac79506 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -2365,11 +2365,10 @@ (define* (make-gitolite #:optional (extra-inputs '())) (string-append " " (search-input-file inputs "bin/grep") " "))) - ;; Avoid references to the store in authorized_keys. - ;; This works because gitolite-shell is in the PATH. (substitute* "src/triggers/post-compile/ssh-authkeys" (("\\$glshell \\$user") - "gitolite-shell $user")))) + (string-append + #$output "/bin/gitolite-shell $user"))))) (add-before 'install 'patch-source (lambda* (#:key inputs #:allow-other-keys) ;; Gitolite uses cat to test the readability of the diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index b3196199e3..5e217ed170 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -428,15 +428,7 @@ (define gitolite-service-type (list (service-extension activation-service-type gitolite-activation) (service-extension account-service-type - gitolite-accounts) - (service-extension profile-service-type - ;; The Gitolite package in Guix uses - ;; gitolite-shell in the authorized_keys file, so - ;; gitolite-shell needs to be on the PATH for - ;; gitolite to work. - (lambda (config) - (list - (gitolite-configuration-package config)))))) + gitolite-accounts))) (description "Set up @command{gitolite}, a Git hosting tool providing access over SSH. By default, the @code{git} user is used, but this is configurable. From patchwork Sat Mar 22 17:00:28 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: 40625 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 C818727BBE9; Sat, 22 Mar 2025 17:02:19 +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=unavailable 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 ABD1F27BBE2 for ; Sat, 22 Mar 2025 17:02:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Ee-0006NK-6Z; Sat, 22 Mar 2025 13:02:12 -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 1tw2EW-0006Hu-3h for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:04 -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 1tw2EV-0005D9-PN for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:03 -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=K8Dda70cM0L3A7B+Fa8HfB6CySOl0dZLyysr7ivqMqQ=; b=oKNH97+DErmYxqGvOF1MLe8rN+Y/qWdFBckIqZPBff+za/uTmq7dS4WyBbJ9ax6Zi3qjXSyvcTYeujmRsWmC34yD+rmNhl6fUDFUSmtQBNfXZaVPuf69lZZLTx99J1TD+HT6BVNnvYgsxpfD25zw37jiWHFXVRsANNvtCLMa0MBqF6Dt5sa2SWAxVMgj5UXi9cWBM+Xf94UtcLO2vmjsdeKtIz+GLdhklMGX6vM0AtBm7SvtowXAhoLZdeanpQaebMj0IpgHeQP/HTYtCwERYHIaaVimlNLhi5yFq1/jj0zruzQkHzD2bPmKv8BwK2jWgFO8RtLcAp0sy2XKayjYhA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EV-0006h7-JO for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 08/13] services: gitolite-accounts: Convert to match-record. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:02: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266286925565 (code B ref 77186); Sat, 22 Mar 2025 17:02:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:09 +0000 Received: from localhost ([127.0.0.1]:45100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dc-0006eE-HA for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:44916) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DE-0006b1-08 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id DE0403800B2; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662842; bh=bXUlsUc261gd1efYjrPk2rAyfHuaOVVV5Y5LGkGQByc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UU62AX7lawsqefGjKBUiqpLBMWR7n8qu2CF/JvuZvL8VXxgxw+XWnEVhRyaWAgq2Q FWm+ObikGdQvR3hA3N6c7iZQvYtVaMEA6NUa+lmxInq3SPStPTr9DwvW9MGKVu6QB9 mY9eBjfwUXFIvtjI8AxfMTxqMhQCIpqRfa/YuEw4m71D2Dfspky2OWY7NQ43Jbo+nI GuhgEoubT9gHgkIvTvBLjZ1xpXX7buHYZSx0HKvTmjpBNAS/i5Vt4owY0NDbUAqgOj xQ70F1XlYqSbJtdrXqPcAb782OKZsFrQYYUolOILCfBWAN8GVnzPcyUBRETEI+jCjy qqSf1yKbVDmzgdzy2i03u2w5mN2uYeBcxBIPrUcBREoIyFqYQYXMGLlrAGtnOKQQw8 x9vGFNJc4Rs6hJWkCEHuPck2v7daqCBFTHqf/Buwu64nuJIWtwf7D1IJS8w4SiFWH6 SLvVfg2FqL5yg1feh50Fa10ZGC3CnVq3Y7YFJlonIz/fRU9wxrPgAGAd/IRzaZo652 bpOpuF/8TP7dGju6X2QngeOlvUrqfLnKASNBM2w5s1dC2zyrmFZhIZ21ZjAghFtpPt TuWlHXabEr6Wz0fzj37UKx/CmYUjjRf2i1l1Iai0L4qyTRwHrmE2EWSdk71UWAj+Xe UDy47SBMRO2+XckrJWZZqero= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 869E338062D; Sat, 22 Mar 2025 17:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662842; bh=bXUlsUc261gd1efYjrPk2rAyfHuaOVVV5Y5LGkGQByc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UU62AX7lawsqefGjKBUiqpLBMWR7n8qu2CF/JvuZvL8VXxgxw+XWnEVhRyaWAgq2Q FWm+ObikGdQvR3hA3N6c7iZQvYtVaMEA6NUa+lmxInq3SPStPTr9DwvW9MGKVu6QB9 mY9eBjfwUXFIvtjI8AxfMTxqMhQCIpqRfa/YuEw4m71D2Dfspky2OWY7NQ43Jbo+nI GuhgEoubT9gHgkIvTvBLjZ1xpXX7buHYZSx0HKvTmjpBNAS/i5Vt4owY0NDbUAqgOj xQ70F1XlYqSbJtdrXqPcAb782OKZsFrQYYUolOILCfBWAN8GVnzPcyUBRETEI+jCjy qqSf1yKbVDmzgdzy2i03u2w5mN2uYeBcxBIPrUcBREoIyFqYQYXMGLlrAGtnOKQQw8 x9vGFNJc4Rs6hJWkCEHuPck2v7daqCBFTHqf/Buwu64nuJIWtwf7D1IJS8w4SiFWH6 SLvVfg2FqL5yg1feh50Fa10ZGC3CnVq3Y7YFJlonIz/fRU9wxrPgAGAd/IRzaZo652 bpOpuF/8TP7dGju6X2QngeOlvUrqfLnKASNBM2w5s1dC2zyrmFZhIZ21ZjAghFtpPt TuWlHXabEr6Wz0fzj37UKx/CmYUjjRf2i1l1Iai0L4qyTRwHrmE2EWSdk71UWAj+Xe UDy47SBMRO2+XckrJWZZqero= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:28 +0100 Message-ID: <354d02073ce991dcbfc794798e892840eeba7888.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 (gitolite-accounts): Use match-record instead of match-lambda with $. Change-Id: I37e3018513a8f20eeed8614dff46a63b8d7c2883 --- gnu/services/version-control.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 5e217ed170..83391c15d1 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -335,18 +335,19 @@ (define-record-type* (default (gitolite-rc-file))) (admin-pubkey gitolite-configuration-admin-pubkey)) -(define gitolite-accounts - (match-lambda - (($ package user group home-directory - rc-file admin-pubkey) - ;; User group and account to run Gitolite. - (list (user-group (name group) (system? #t)) - (user-account - (name user) - (group group) - (system? #t) - (comment "Gitolite user") - (home-directory home-directory)))))) +(define (gitolite-accounts config) + (match-record config + (user group home-directory) + ;; User group and account to run Gitolite. + (list (user-group + (name group) + (system? #t)) + (user-account + (name user) + (group group) + (system? #t) + (comment "Gitolite user") + (home-directory home-directory))))) (define gitolite-activation (match-lambda From patchwork Sat Mar 22 17:00:29 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: 40632 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 4108327BBE9; Sat, 22 Mar 2025 17:04:00 +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=unavailable 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 2AD7027BBE2 for ; Sat, 22 Mar 2025 17:03:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2GB-0006ye-TH; Sat, 22 Mar 2025 13:03:48 -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 1tw2EX-0006JK-LF for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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 1tw2EX-0005Df-Ap for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:05 -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=rEGuXF+pNYshFXQOfEm6/ychqZFrY/VYvXMLMtAj9j0=; b=JWnrXh7xaIXQcDXrwVBFPmmxq1+g+Ukh0rVf6YDUW8S52DMET5elWyb2TyDU9M3UEmScAC91JpUR5RKLVvqDPZP3jl6FVe2Re7MLWnLh7pTk3XRpvZQbQ+GkncIzYlOjL4BBqEcPARX4TmhtE5AJ22FcG8u/nha83pkRyyc/GXye56Qur6Yoy+hhtqR7YOcYp8Bh0UlHLkwyCtp7VK0qty4NiDbnyfFyy3z9Zrm7Hlgo84+jAxjYPS/3s3SC5447Y5y8HtovS2skZ3nr0zmxGPP+zsU+cUgZNXo+WLA1DfSHkf3lRKJMiXSJUjvxm7LiikGs+Z/D+BzYJ5oinzBxAA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EX-0006hV-5J for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 09/13] services: gitolite-activation: Convert to match-record. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:02:05 +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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266288425611 (code B ref 77186); Sat, 22 Mar 2025 17:02:05 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:24 +0000 Received: from localhost ([127.0.0.1]:45106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dr-0006ev-QE for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:24 -0400 Received: from wolfsden.cz ([37.205.8.62]:44932) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DE-0006bD-K1 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:46 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9E86338005F; Sat, 22 Mar 2025 17:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662843; bh=mPyf1LBG92FYjvZw1afG21KmDbe8dK9T9gMmEEt7GGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ci22sESLP+S9pwAC+S+dBHluaa6o3Hl0b1Pz0PwViLq6AQS6pRF4WkABDphwzP1jU 346RwLJiCrMcWXRmicp50AWe16kRhun+7L02Ttc4dLcL6m+Sve2sV64icJayfkX4bS SNPk9xYjPp1YlaK0rREIyR1cD0PuhRxWZtxC7huZCh8od3+ttxwzrFmqEe0qdHkeRV kRssMU5e/Q0TMbt7LGoq66pOzC2HGt3iFYR3Q7ppz3Lg3j99q+bEcIjqe0IgmVJwjs 8/lCtqWD/bgoU5T/Z5WQ3YBHDUIS3784X0qdKRNryQFUqSNZeRWO/4x1RnHCmkFUN7 y5dAJuwOXXspNyrUlaE1l1rrGhWdcKu/kqL3ftYOh6+5tF52jQhqtivuDRuuHB7Gkn Z72VMmFSPzrgF7qTmyLr5Ic0gZe6tjCK4MdeESoNs3djS5Agognoqd6EhDPAeOO4EX Q7+i6BdAzNNXqZ9dg5MBd0+PzXJPo9HRbngC5GAAq78fEEzG4b+zv14FjsZbNypvEj +JtQ9C/s6TFoT6rR4/ksGi6ygtbgqcEYdhH9MPA1bH2QDWGZDf7dO7aQefTmwIR02c SzkZLiPHsJ4V0UkWueubE6olGDEQ5MbquYzxjKF6zDWfPV7+/ta4U8c4QbPqQCfgzJ hVwsas1cpLnE2XRecKD2Gb1Q= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 0D61C380C10; Sat, 22 Mar 2025 17:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662843; bh=mPyf1LBG92FYjvZw1afG21KmDbe8dK9T9gMmEEt7GGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ci22sESLP+S9pwAC+S+dBHluaa6o3Hl0b1Pz0PwViLq6AQS6pRF4WkABDphwzP1jU 346RwLJiCrMcWXRmicp50AWe16kRhun+7L02Ttc4dLcL6m+Sve2sV64icJayfkX4bS SNPk9xYjPp1YlaK0rREIyR1cD0PuhRxWZtxC7huZCh8od3+ttxwzrFmqEe0qdHkeRV kRssMU5e/Q0TMbt7LGoq66pOzC2HGt3iFYR3Q7ppz3Lg3j99q+bEcIjqe0IgmVJwjs 8/lCtqWD/bgoU5T/Z5WQ3YBHDUIS3784X0qdKRNryQFUqSNZeRWO/4x1RnHCmkFUN7 y5dAJuwOXXspNyrUlaE1l1rrGhWdcKu/kqL3ftYOh6+5tF52jQhqtivuDRuuHB7Gkn Z72VMmFSPzrgF7qTmyLr5Ic0gZe6tjCK4MdeESoNs3djS5Agognoqd6EhDPAeOO4EX Q7+i6BdAzNNXqZ9dg5MBd0+PzXJPo9HRbngC5GAAq78fEEzG4b+zv14FjsZbNypvEj +JtQ9C/s6TFoT6rR4/ksGi6ygtbgqcEYdhH9MPA1bH2QDWGZDf7dO7aQefTmwIR02c SzkZLiPHsJ4V0UkWueubE6olGDEQ5MbquYzxjKF6zDWfPV7+/ta4U8c4QbPqQCfgzJ hVwsas1cpLnE2XRecKD2Gb1Q= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:29 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 (gitolite-activation): Use match-record instead of match-lambda with $. Change-Id: I37e3018513a8f20eeed8614dff46a63b8d7c2883 --- gnu/services/version-control.scm | 123 +++++++++++++++---------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 83391c15d1..67009620b4 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -349,78 +349,77 @@ (define (gitolite-accounts config) (comment "Gitolite user") (home-directory home-directory))))) -(define gitolite-activation - (match-lambda - (($ package user group home - rc-file admin-pubkey) - #~(begin - (use-modules (ice-9 match) - (guix build utils)) +(define (gitolite-activation config) + (match-record config + (package user group home-directory rc-file admin-pubkey) + #~(begin + (use-modules (ice-9 match) + (guix build utils)) - (let* ((user-info (getpwnam #$user)) - (admin-pubkey #$admin-pubkey) - (pubkey-file (string-append - #$home "/" - (basename - (strip-store-file-name admin-pubkey)))) - (rc-file #$(string-append home "/.gitolite.rc"))) + (let* ((user-info (getpwnam #$user)) + (admin-pubkey #$admin-pubkey) + (pubkey-file (string-append + #$home-directory "/" + (basename + (strip-store-file-name admin-pubkey)))) + (rc-file #$(string-append home-directory "/.gitolite.rc"))) - ;; activate-users+groups in (gnu build activation) sets the - ;; permission flags of home directories to #o700 and mentions that - ;; services needing looser permissions should chmod it during - ;; service activation. We also want the git group to be able to - ;; read from the gitolite home directory, so a chmod'ing we will - ;; go! - (chmod #$home #o750) + ;; activate-users+groups in (gnu build activation) sets the + ;; permission flags of home directories to #o700 and mentions that + ;; services needing looser permissions should chmod it during + ;; service activation. We also want the git group to be able to + ;; read from the gitolite home directory, so a chmod'ing we will + ;; go! + (chmod #$home-directory #o750) - (simple-format #t "guix: gitolite: installing ~A\n" #$rc-file) - (copy-file #$rc-file rc-file) - ;; ensure gitolite's user can read the configuration - (chown rc-file - (passwd:uid user-info) - (passwd:gid user-info)) + (simple-format #t "guix: gitolite: installing ~A\n" #$rc-file) + (copy-file #$rc-file rc-file) + ;; ensure gitolite's user can read the configuration + (chown rc-file + (passwd:uid user-info) + (passwd:gid user-info)) - ;; The key must be writable, so copy it from the store - (copy-file admin-pubkey pubkey-file) + ;; The key must be writable, so copy it from the store + (copy-file admin-pubkey pubkey-file) - (chmod pubkey-file #o500) - (chown pubkey-file - (passwd:uid user-info) - (passwd:gid user-info)) + (chmod pubkey-file #o500) + (chown pubkey-file + (passwd:uid user-info) + (passwd:gid user-info)) - ;; Set the git configuration, to avoid gitolite trying to use - ;; the hostname command, as the network might not be up yet - (with-output-to-file #$(string-append home "/.gitconfig") - (lambda () - (display "[user] + ;; Set the git configuration, to avoid gitolite trying to use + ;; the hostname command, as the network might not be up yet + (with-output-to-file #$(string-append home-directory "/.gitconfig") + (lambda () + (display "[user] name = GNU Guix email = guix@localhost "))) - ;; Run Gitolite setup, as this updates the hooks and include the - ;; admin pubkey if specified. The admin pubkey is required for - ;; initial setup, and will replace the previous key if run after - ;; initial setup - (match (primitive-fork) - (0 - ;; Exit with a non-zero status code if an exception is thrown. - (dynamic-wind - (const #t) - (lambda () - (setenv "HOME" (passwd:dir user-info)) - (setenv "USER" #$user) - (setgid (passwd:gid user-info)) - (setuid (passwd:uid user-info)) - (primitive-exit - (system* #$(file-append package "/bin/gitolite") - "setup" - "-m" "gitolite setup by GNU Guix" - "-pk" pubkey-file))) - (lambda () - (primitive-exit 1)))) - (pid (waitpid pid))) + ;; Run Gitolite setup, as this updates the hooks and include the + ;; admin pubkey if specified. The admin pubkey is required for + ;; initial setup, and will replace the previous key if run after + ;; initial setup + (match (primitive-fork) + (0 + ;; Exit with a non-zero status code if an exception is thrown. + (dynamic-wind + (const #t) + (lambda () + (setenv "HOME" (passwd:dir user-info)) + (setenv "USER" #$user) + (setgid (passwd:gid user-info)) + (setuid (passwd:uid user-info)) + (primitive-exit + (system* #$(file-append package "/bin/gitolite") + "setup" + "-m" "gitolite setup by GNU Guix" + "-pk" pubkey-file))) + (lambda () + (primitive-exit 1)))) + (pid (waitpid pid))) - (when (file-exists? pubkey-file) - (delete-file pubkey-file))))))) + (when (file-exists? pubkey-file) + (delete-file pubkey-file)))))) (define gitolite-service-type (service-type From patchwork Sat Mar 22 17:00:30 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: 40627 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 553A427BBE9; Sat, 22 Mar 2025 17:02:51 +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=unavailable 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 AC2EC27BBE2 for ; Sat, 22 Mar 2025 17:02:49 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Ez-0006PF-V0; Sat, 22 Mar 2025 13:02:43 -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 1tw2EY-0006Js-5j for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02: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 1tw2EX-0005Dx-RN; Sat, 22 Mar 2025 13:02:05 -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=eUQ+xTz/JCxeWQx7sF1shbL1y0G0bsPcjMeEPkCMlT4=; b=rY5V89cMhOxmxHOJjoMTeWb/60snCT48+Y/rrsWiZ5KJYQTx1tluPVn7TQiW2tKqUm6zJGJjXIGFbd7O8AVHfla7U5VbHd1WYBP9w7H2xTr8EcetTcDC+HSd8jTpkCWzSl1hgvo2cpcf3sjRQHMYSqM3w8gFmC2/TrqZ7Ypnnonk03GXvAJPWFOWHtwu6giKhOQnoaAhN985KAns2N5X/P+dU7Pr+rJfo1xtmhlkWxbMPmx3gwHFFOQSBHaH+Xlhz76jcxquKLXrbABQMsx1o8w4uzIpujEFWN/rgs/+aZNL2PGF3A5J8pMtsIaS9gaQY/C568pIbovVXEE6fv4vng==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EX-0006hd-LQ; Sat, 22 Mar 2025 13:02:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 10/13] services: Add gitolite-git-configuration. 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:02:05 +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.174266288525618 (code B ref 77186); Sat, 22 Mar 2025 17:02:05 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:25 +0000 Received: from localhost ([127.0.0.1]:45108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Ds-0006f1-AR for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:24 -0400 Received: from wolfsden.cz ([37.205.8.62]:58364) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DF-0006bS-HZ for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:46 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8C57C380499; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=e8TxQKZER5tX3gME0OMxfIEAzgMPZDphzZNxbGiXfTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CXR60rNCT+IzFnv9sYVYWYzbyGTbj0qN8lCK+J8pn+wBznhb5T3Wi9R5R5JNOTtm8 2KxZRROBB0UEdEvjSIBqi0GjvRTYDdts7aTz6mHteztiXEKDRZGMvf7caGdrO1GtI5 gnNGxIycn/rOylFJANHAZB7HePCdaj78jg+Fv4mKHzsjcFzb0OKz75cVHn3xP2Qygd 4XLzenQ6nUjh9y6V9Ft6eO+nFzTFFLpojFWy0jbzCtJ+hvJoK6ZIch7fglLbDstaf9 +LPQ/QbZq1eLlIBQota7Hr+lyuK1yTadft981HFoXcajb3JR+tO5C1HuAiFCggnj5j 8r3Nk/Wc5sWGn4AnFFoyvRs4+yd9JJQICH3MYRM8AehihKKFE2eC1soxu03tRySaZC C4vPA88+zltSb0UK2dYv7Nidq87W7pOQx+HTjg/9g49kBPAT1WzlcKks/hN9X9ysjK 0tPNxVna/M2sV8kG2ij07XrFDpbAyMIQV4z51ipL1Qy5ZiOtmczZ0QUrNzyjju+rIr 7VqrsE5NfMJcVryEYn32+OQUBIUw27GgntmbmelsDFx6R6kuBg6KVvVd4rJDw9krl6 4tLsjasozkphZRKheV4I+lTosk2CW7Ti/NTV76bGMD5UNo4qgrJjUB0YHPXEaA76vR GyFrmYz8HeD6oE2P+5z5kRgI= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8F2D5380C82; Sat, 22 Mar 2025 17:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662843; bh=e8TxQKZER5tX3gME0OMxfIEAzgMPZDphzZNxbGiXfTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HJBERhQJTnn78RomuUTZqL+m2NUC3qEc8dpuBNfxN38Lgibdge4vXuHNtgWa0y21S DCCqMZV5w4vfe0L4UqhVrooJspagKo9SvoGxf0OxqRju+RLYLSKLkQrZOmfXz+Sznp zrh0TgxEoaZYiJWqOCFdJdIWOwlpgoDj6devbCzMHUwJ/zuavTdriOuYC38YkYVjY0 T9fo6t+h8zp/qrPcgtbleVfZPI1ZkmmKTiqTUE/rZFnaa+npDTrMGCpN4M9TdzxFDu n5KkvhVSzYWSZYn3Meb5Spn3Q4TfAxMR1TEGCzmf4Yfo5mzwJ20ro7lAQP35oRPkmB w3nzRkHl9mWT//5V4kCaC8NZKTnvXUIDisHkQ7KKtt4122Gf+IEcfXT7d02RvmkwDd /OwzRnjgBmiymzze5VO4sq1a6WoW3EbK+6N+ainSjIdYqVyjxO7QVwM14lWsCtdQ7P rIFMU2eHlyhRxpwH6tSoeKhXOI4I4Fh8lL/RMZ69ZI/GP9U0lWF251B2knDCKFPXEs 3VbGiIWQS7Jz5V+mAvGmgzUqZ5dmpahU17gVdnPM58NKIvugybRhR2p5PjfoG4sTsE HraVTaPV/TgeCXJOyWWMbDZ11bScJ3yTek5LVcgyi9GvKwObsPNG//4wpy2ap3D/OW Sb749lCSnwmBP0gJ/9ZDvBzQ= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:30 +0100 Message-ID: <2de343c2499bf0297cf03c58226670b02710d9ad.1742661305.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 In preparation for further customizability of the git configuration, extract the current setup into a separate record type. * gnu/services/version-control.scm (): New record type. (gitolite-git-configuration-compiler): And gexp compiler for it. (): Add git-config field. (gitolite-activation): Use it. * doc/guix.texi (Version Control Services): Document both. Change-Id: I7658698a93f938f62f41a4fa45b72de1eeb14414 --- doc/guix.texi | 17 +++++++++++++++ gnu/services/version-control.scm | 37 ++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e60fef9673..e584b072e1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41095,6 +41095,10 @@ Version Control Services A ``file-like'' object (@pxref{G-Expressions, file-like objects}), representing the configuration for Gitolite. +@item @code{git-config} (default: @code{(gitolite-git-configuration)}) +A ``file-like'' object (@pxref{G-Expressions, file-like objects}), +representing the git configuration for Gitolite. + @item @code{admin-pubkey} (default: @code{#f}) A ``file-like'' object (@pxref{G-Expressions, file-like objects}) used to setup Gitolite. This will be inserted in to the @file{keydir} directory @@ -41170,6 +41174,19 @@ Version Control Services @end table @end deftp +@deftp {Data Type} gitolite-git-configuration +Data type representing the git configuration file for gitolite. + +@table @asis +@item @code{name} (default: @code{"GNU GNU"}) +User name used for commits (e.g. during setting up the admin +repository). + +@item @code{email} (default: @code{"guix@@localhost"}) +Email used for commits (e.g. during setting up the admin repository). + +@end table +@end deftp @subsubheading Gitile Service diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 67009620b4..68297dee19 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -66,6 +66,12 @@ (define-module (gnu services version-control) gitolite-rc-file-extra-content gitolite-rc-file-default-enable + + gitolite-git-configuration + gitolite-git-configuration? + gitolite-git-configuration-name + gitolite-git-configuration-email + gitolite-service-type gitile-configuration @@ -320,6 +326,23 @@ (define-gexp-compiler (gitolite-rc-file-compiler "# End:\n" "# vim: set syn=perl:\n")))) +(define-record-type* + gitolite-git-configuration make-gitolite-git-configuration + gitolite-git-configuration? + (name gitolite-git-configuration-name + (default "GNU Guix")) + (email gitolite-git-configuration-email + (default "guix@localhost"))) + +(define-gexp-compiler (gitolite-git-configuration-compiler + (config ) system target) + (match-record config + (name email) + (apply text-file* "gitconfig" + `("[user]\n" + "name = " ,name "\n" + "email = " ,email "\n")))) + (define-record-type* gitolite-configuration make-gitolite-configuration gitolite-configuration? @@ -333,6 +356,8 @@ (define-record-type* (default "/var/lib/gitolite")) (rc-file gitolite-configuration-rc-file (default (gitolite-rc-file))) + (git-config gitolite-configuration-git-config + (default (gitolite-git-configuration))) (admin-pubkey gitolite-configuration-admin-pubkey)) (define (gitolite-accounts config) @@ -351,7 +376,8 @@ (define (gitolite-accounts config) (define (gitolite-activation config) (match-record config - (package user group home-directory rc-file admin-pubkey) + ( package user group home-directory rc-file admin-pubkey + git-config) #~(begin (use-modules (ice-9 match) (guix build utils)) @@ -389,12 +415,9 @@ (define (gitolite-activation config) ;; Set the git configuration, to avoid gitolite trying to use ;; the hostname command, as the network might not be up yet - (with-output-to-file #$(string-append home-directory "/.gitconfig") - (lambda () - (display "[user] - name = GNU Guix - email = guix@localhost -"))) + (copy-file #$git-config + #$(string-append home-directory "/.gitconfig")) + ;; Run Gitolite setup, as this updates the hooks and include the ;; admin pubkey if specified. The admin pubkey is required for ;; initial setup, and will replace the previous key if run after From patchwork Sat Mar 22 17:00:31 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: 40630 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 17D1F27BBE9; Sat, 22 Mar 2025 17:03:45 +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=unavailable 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 2E5C727BBE2 for ; Sat, 22 Mar 2025 17:03:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Fr-0006p6-Tb; Sat, 22 Mar 2025 13:03:29 -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 1tw2EY-0006Ke-P6 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:07 -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 1tw2EY-0005E8-Eo; Sat, 22 Mar 2025 13:02:06 -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=TiiMVVt6WB26Ky77PkS2Sy8GN8Shvzr39Rep1EuGDug=; b=rjsQ7LewXTyo6H3aCu886YBvXsgjN15nV9H6dlQ9ID0Iob6EQxYjGdfwuVK+5G2gQVm3m0qkDJkBxKC2lp5SHECcBeuHMdYedYdG3p3VN1sh8Uu7ONfCQTZcxGUiezfqrHb5mt5d1OU20hn4v/3HdS4ABnH3zUCg70weipNEpqxTbD3WRQrYEwIlv1jyT2oTXNoHijytjv07CzVT/x5PeTIxrAE48rN2cMcF8Q+EtmLZYhyXjMhnbVgV96E1ivKwJDUqxSKBVWWFAQL5N6nssWpbvNKJy78omLXBECUQmlHglHydWk6eGL1KLkREC1WBVx5DIHaIpvoNi7QQG041IQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EY-0006hl-7f; Sat, 22 Mar 2025 13:02:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 11/13] services: gitolite-git-configuration: Add default-branch 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:02:06 +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.174266288525625 (code B ref 77186); Sat, 22 Mar 2025 17:02:06 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:25 +0000 Received: from localhost ([127.0.0.1]:45110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Ds-0006fA-Rd for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:25 -0400 Received: from wolfsden.cz ([37.205.8.62]:58366) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DF-0006bX-LJ for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:47 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9B7F3380461; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=Jyz1bp39PgWoe4PDajzmP6HO2GwDyT4yEThG3v8q/Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ig3iis1j3kHYOH54apdVSL1CfRDDk65UHWtsNFH0qFje30M0OIjMSV9fKsCA0C90V BDNhBAbrB0QX3KsnLSky9TErsHM09X9/1/1gpLaOpOA3vcc3isTXJe5hmtmYHD6yBN xwgVijnktY70AhO9DCnbxSK8Y9rZutPO8+Eyi5VgN1wB/x6zYoW5szc2PgfoHobSb/ UmksjGSnB0OrMVHWAtki+Dz7f8Bwvh9EGs3og32dn29idd/QjOVtVxHHj82bj1oh/A oZO9w7WJsnhyHbW5UQcA4eNcbqRPGF2G65jZr+67CkxT8x3cat+amnJpveDB2e6hfu ltYQ8OJdXPlSkfR2aENfNic6Q/69aDdxXaVIGlSt9Z42dvXFCQKxvU+Z0UKMNoHPfb TW79I4N32SPtJmHqTXcqHXKldAnBgb0s0AVojYOJC0iGaCdr9kbD1IYIdi7URDT+vc erL8tLmG7AhFElxjaZdBCwh1jAHDf97gjs98sn3MOQiSH2zNMRlfQmc/eGUOhCyKSv ZVxbTidNDgRRDwNWtpAVIGJs2la7OSs66kC2CcSg/U30CXlHeL1i9P9lLsmh1SjqDt ASW9UNRBcnE67xIcmFmvcgVcVJPL8BozibeMOjTrfK0PXdBiBs7rMND5Y22DkQHZXb 5rfgWGTHXge5oVAZw3T7Rd60= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C32D380C83; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=Jyz1bp39PgWoe4PDajzmP6HO2GwDyT4yEThG3v8q/Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ig3iis1j3kHYOH54apdVSL1CfRDDk65UHWtsNFH0qFje30M0OIjMSV9fKsCA0C90V BDNhBAbrB0QX3KsnLSky9TErsHM09X9/1/1gpLaOpOA3vcc3isTXJe5hmtmYHD6yBN xwgVijnktY70AhO9DCnbxSK8Y9rZutPO8+Eyi5VgN1wB/x6zYoW5szc2PgfoHobSb/ UmksjGSnB0OrMVHWAtki+Dz7f8Bwvh9EGs3og32dn29idd/QjOVtVxHHj82bj1oh/A oZO9w7WJsnhyHbW5UQcA4eNcbqRPGF2G65jZr+67CkxT8x3cat+amnJpveDB2e6hfu ltYQ8OJdXPlSkfR2aENfNic6Q/69aDdxXaVIGlSt9Z42dvXFCQKxvU+Z0UKMNoHPfb TW79I4N32SPtJmHqTXcqHXKldAnBgb0s0AVojYOJC0iGaCdr9kbD1IYIdi7URDT+vc erL8tLmG7AhFElxjaZdBCwh1jAHDf97gjs98sn3MOQiSH2zNMRlfQmc/eGUOhCyKSv ZVxbTidNDgRRDwNWtpAVIGJs2la7OSs66kC2CcSg/U30CXlHeL1i9P9lLsmh1SjqDt ASW9UNRBcnE67xIcmFmvcgVcVJPL8BozibeMOjTrfK0PXdBiBs7rMND5Y22DkQHZXb 5rfgWGTHXge5oVAZw3T7Rd60= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:31 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 default-branch field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e584b072e1..3332813a02 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41185,6 +41185,10 @@ Version Control Services @item @code{email} (default: @code{"guix@@localhost"}) Email used for commits (e.g. during setting up the admin repository). +@item @code{default-branch} (default: @code{#f}) +If true, set the @code{init.defaultBranch} option to that value. Common +values are @code{"master"} and @code{"main"}. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 68297dee19..712f0b1756 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -71,6 +71,7 @@ (define-module (gnu services version-control) gitolite-git-configuration? gitolite-git-configuration-name gitolite-git-configuration-email + gitolite-git-configuration-default-branch gitolite-service-type @@ -329,19 +330,25 @@ (define-gexp-compiler (gitolite-rc-file-compiler (define-record-type* gitolite-git-configuration make-gitolite-git-configuration gitolite-git-configuration? - (name gitolite-git-configuration-name - (default "GNU Guix")) - (email gitolite-git-configuration-email - (default "guix@localhost"))) + (name gitolite-git-configuration-name + (default "GNU Guix")) + (email gitolite-git-configuration-email + (default "guix@localhost")) + (default-branch gitolite-git-configuration-default-branch + (default #f))) (define-gexp-compiler (gitolite-git-configuration-compiler (config ) system target) (match-record config - (name email) + (name email default-branch) (apply text-file* "gitconfig" `("[user]\n" "name = " ,name "\n" - "email = " ,email "\n")))) + "email = " ,email "\n" + ,@(if default-branch + `("[init]\n" + "defaultBranch = " ,default-branch "\n") + '()))))) (define-record-type* gitolite-configuration make-gitolite-configuration From patchwork Sat Mar 22 17:00:32 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: 40631 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 A5B4D27BBE9; Sat, 22 Mar 2025 17:03:57 +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=unavailable 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 DFB0327BBE2 for ; Sat, 22 Mar 2025 17:03:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2GC-00071I-NQ; Sat, 22 Mar 2025 13:03:48 -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 1tw2EZ-0006LB-B5 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:07 -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 1tw2EZ-0005EG-10; Sat, 22 Mar 2025 13:02:07 -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=RWREVBeK2cTeHO/LeIk+A2Jo57gLuMlsEe5Pa+tc8rU=; b=HuE6PDK5I5ATIBstowB8XG/q4ul+FQQAq7OjkR+/dexipIyYFRCNtJUlMyLG265OBEQpi7kzWITSRcRtfbfA129NZ/3B4kVR8Y0f7KM0ojW6qZTosNhVwhs84dkG52pAqsavM7VIThL67MYslV840C5yxVkGa/vfdBtDL58bUK/9hqscaeWKj6oG9cRTK/Y3EMd7LEI7xlMe1Ylqtl5ZWtiMMlGKz6E0Wsdl1D4YAhdoX/QC36EGaHt2S+CTx3nuk1ANzTbzkBZLzbM5n+MSQk3Kz0cME3nAaogAxsPF6grxVfpefx+C8wTs3lDmeul+G0gMn/Te3sgfcF8ouViHOA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EY-0006hy-R0; Sat, 22 Mar 2025 13:02:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 12/13] services: gitolite-git-configuration: Add receive-fsck-objects 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:02:06 +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.174266288525633 (code B ref 77186); Sat, 22 Mar 2025 17:02:06 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:25 +0000 Received: from localhost ([127.0.0.1]:45112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dt-0006fG-8J for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:25 -0400 Received: from wolfsden.cz ([37.205.8.62]:58368) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DH-0006bd-3L for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:48 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 16C6F37F478; Sat, 22 Mar 2025 17:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662845; bh=aFOBzXfJBbSOcnBzy5LkChYMe/Py+BaFgFMIU3X01uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hu/L4aiDrYmWKHjxGoVWSRolXeOze4X4GVEUe0REZ2WTiMyXJfd4wqd4SsRG099bl 8CRKZSVsg0eoPo2a/6MfLRKoz8q7bANkiHWsRyxdfZrJaB91NXA5ZZ7dVnORRPW2ib NX7/iXAxOEMjkqc6fn6bIlxy3Qk0jJtN4ny4gwj3zK4Tm+qBSAiNAcdeFtgJ43NwQt TDQq6+qiGK68plSEUeB0lxopXsmotXJTt6mjr5USnVlPLfVCfeHiW+2H0jo2aiTS1G dZbagkidKXXVLUuzNpA5TFj8pVkV0EhqnF+NIy/i0KWLRFrO6AJezNUKvdEhDIB/Jm nE7yAx/nkzz6+iuXVfyCgtWRD50tSof+brkmM3trwuRzQ0MDh9eYxYZR214wdI+4al dXYDoBKMEZoKyELWSncc0BtzfTnsMVYAfjVTiNY8jt9i4PreBWzF98U8w/0Wkmf3aq eaTlXnrXiZRXVz516DRjmbG766QiiEijm5Xd8KaeFFLFV1Egb2wMTjMgzKJV6CVze+ 9GE6Y8Gi4bSKH07el/l32xyriUz6w8v8UAP3tZms2MuvKfALLJKgYdl0G9D+iP+ry+ M7NFWJS86Oqq5Df4YN2p9BwPs9mnqGS6EZCr+kVqVWJ8BgZdlb+ZPNSwojddEzE8xY ccadAFdjgB+P7Tkb1fZ+Vkbg= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 9EE6737F9DA; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=aFOBzXfJBbSOcnBzy5LkChYMe/Py+BaFgFMIU3X01uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vaOzAVAGL5ai4idOWAwZtGuRJPzoJSy/FEc+dsohbQ6ELsEBBS5XUxRJ3kDuKU+6r U9qqg5NlXVHwsVjHpk1nL8g86fxmLMmUP+AkMddGtY18yO6fdKr5Vxb3ccB4dE0RGH iAvzX1IbdzHBS2pSg2g2qpUcsTf6W7H5UxcwVGuz4dgYgX6qjtS3BxMdMCQe9rwSDL R3ZLbISL44BoPQpsQYwbavik3iojSpFJHkFRVE2Vj4oWcSDBKfXbtfiJSokHY4e/I1 2WGD6KAdZjQ1DuVEl3nu+tt0CUj2jqnJxxnBRPSrhoyLIU2jnAvT6zq+7irCro2jhe bxqGV6McNt5ykyqrfnCFxnBmaSejv/991VwxxEoIekoy/h/ne5oJchyAsfT2UeKs2t 1sXNQ7znF2K0EztrmqqIAw4LPc2nFnTmeGc//BQJZLBwknotHHyC75/6vFGIkSXPQW WPDv4JW7FMAOf0X0tnlsmDNP/AOGUMXYSgJ4rI6SiJXNoiMKpGUfTkroo+l+iZHS3w PexHEuk9B+zo+LYIM6CRcm3kkW5QGSYSHH5g1BFbm1KY611ajteYqQKk/abjEwi2Ij V9mQrt8sqEiiuGqCNRRCx2rzfefzGhvsjTogdcPQ4OK4UOXXES7heD1fxq+3S8mF+0 g3ttK2Yby0w/VUiTf0WThsQo= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:32 +0100 Message-ID: <1d370fb258e2a07c98ce83cf3df57a0d29cd997a.1742661306.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 receive-fsck-objects field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3332813a02..f8fa1ab3bd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41189,6 +41189,9 @@ Version Control Services If true, set the @code{init.defaultBranch} option to that value. Common values are @code{"master"} and @code{"main"}. +@item @code{receive-fsck-objects} (default: @code{#f}) +If it is set to true, git-receive-pack will check all received objects. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 712f0b1756..4f36495740 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -72,6 +72,7 @@ (define-module (gnu services version-control) gitolite-git-configuration-name gitolite-git-configuration-email gitolite-git-configuration-default-branch + gitolite-git-configuration-receive-fsck-objects gitolite-service-type @@ -330,17 +331,19 @@ (define-gexp-compiler (gitolite-rc-file-compiler (define-record-type* gitolite-git-configuration make-gitolite-git-configuration gitolite-git-configuration? - (name gitolite-git-configuration-name - (default "GNU Guix")) - (email gitolite-git-configuration-email - (default "guix@localhost")) - (default-branch gitolite-git-configuration-default-branch - (default #f))) + (name gitolite-git-configuration-name + (default "GNU Guix")) + (email gitolite-git-configuration-email + (default "guix@localhost")) + (default-branch gitolite-git-configuration-default-branch + (default #f)) + (receive-fsck-objects gitolite-git-configuration-receive-fsck-objects + (default #f))) (define-gexp-compiler (gitolite-git-configuration-compiler (config ) system target) (match-record config - (name email default-branch) + (name email default-branch receive-fsck-objects) (apply text-file* "gitconfig" `("[user]\n" "name = " ,name "\n" @@ -348,6 +351,10 @@ (define-gexp-compiler (gitolite-git-configuration-compiler ,@(if default-branch `("[init]\n" "defaultBranch = " ,default-branch "\n") + '()) + ,@(if receive-fsck-objects + `("[receive]\n" + "fsckObjects = true\n") '()))))) (define-record-type* From patchwork Sat Mar 22 17:00:33 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: 40629 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 1817D27BBEA; Sat, 22 Mar 2025 17:03:19 +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 A9C0927BBE2 for ; Sat, 22 Mar 2025 17:03:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2FY-0006g4-Nt; Sat, 22 Mar 2025 13:03:11 -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 1tw2EZ-0006M7-Qb for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:07 -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 1tw2EZ-0005EM-G0; Sat, 22 Mar 2025 13:02:07 -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=vMw7HL590zybnMm4P7PMR9I5RDOg6MZZJYUtYFos+t4=; b=noMwBBsgMnHYNnVMPmj0UeASCwkZ2PKHq1469OYsPczHX8v2cCqB7hX3zGGwwTUTyUgKug1ItYIOZ7moiFN8RV68vW3Jjq83PnJZc8B1mkNJI+w7lL10RHi4vHzkkaiLrdL/mDlY4u+fO4Qdh8tZJX+kznAj5T5DrVvYFyS40592qC24r/Buf34wcr94F6bgGeQU8LFtTT2Ic+ydPJfEwSY0Sdyw6JA5YKcekcEA0I1VTiWxcKBDnAd1OweB5S4XTA//d3J1BMOC2B9zM/lgyEDAKx3N71BdKuRU6fwrnbzhfHh0BDZABB3Q115apY8IsEOfqaNyfGj4rVUL401bHg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EZ-0006i6-B8; Sat, 22 Mar 2025 13:02:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 13/13] services: gitolite-git-configuration: Add extra-content 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:02:07 +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.174266288625639 (code B ref 77186); Sat, 22 Mar 2025 17:02:07 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:26 +0000 Received: from localhost ([127.0.0.1]:45114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Dt-0006fO-M3 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:26 -0400 Received: from wolfsden.cz ([37.205.8.62]:58380) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DI-0006bv-5a for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:49 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 3174A3802FD; Sat, 22 Mar 2025 17:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662846; bh=RZ9wAiwBT82wj7XoQa/Zy/16wJkPaFotZ358UBIdToY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AalJbCNFyjkA4qvGr8tDsgWOUusQilv/C/vThketooVoCSZ+tJLZ23JJXI+Ntl9L1 ypnnf6ixRuIbIzS1WasS1U5K10RygXP6AebqDsq2P0AQv2w6cC6fVV1ap+lrhQNVtG ntzoJneZf4hFNNwG1GZXpCrmyi8CIX6be6ZEJHow0V9PKfwiJCbkKuSrAZT8qGsZvj IhKryK0aHt2h3b5pTrd9HYGogYAq3rWj5kqIe9NVW+jQzBByk5Pu1tpiw2UBIP3oQi DZbB9RkEx2d/oBgO1zHICVAKmTJ7ajUmFRxjuZMi7qU/M8dBa0r+cUqJnvMXr7DyB+ 9Vr/gzT/yA8PHuVNUuhZTYXFJ3/G/97YDrIYuHT6g9PtKDEKRKbpAE2djKYYSziZhM T+9/HDGbhtRiJ3JJbfLVDoDEuq2M1G02lG/TltPZrwfaAPzaoDUa0aUvyPJKI35ata uyKlFj8np3J05aGe3TRL4PbcnjPsrUMSwDpOQ8YbFtOIFYE82X99ZyVTUbSdD2g3Qp XBbEbV306E+dXSJaDew9spf8kkC2QvkSqA2Zjshv96uv9JZnM/1tvgCplGzvTj4Nn1 Q2dRf3YD7C7TD6GWfui3IglxAn6mYI3J2th2sxKMcyaXysWC1mTZZDvdXumwJXoUyO fb2yiTzig8Gkc3hw/+LhhJNc= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 2CBE037FEE0; Sat, 22 Mar 2025 17:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662845; bh=RZ9wAiwBT82wj7XoQa/Zy/16wJkPaFotZ358UBIdToY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NLc50yVKjb/RggKlCeKaRwwhAD0y4SMOrBHPKl7Ol8N/lSX19Ji2iuMMJl20LonGq UoR8FXX2asycRfYpvbeKhuLxSqc9mfq/iUCLVWESa83cfTdjb65CcDN6x9zE7tIQ1b pvMu1H/qUMEIdgUOLOaeUCFY2JcP+gEHeak7KnZVZpFQwj9OZ/2YVVbNOkelodtnXj XgbQ2sEw4nHcVLoXn0WuaENdxEgxU36IlMw8TD3R4vdeEuYWko33tMPQLLHi5SFlvc 7VNQ6SHWi9J/8IJJ8dEgwXlDP+tc91brpVVkj8a1ob2ckY5ZtOozCSOJZSJBdQgSPK aZzr+3r+UqBqlCjedltL89gD3VjPxmGmas55djnl68GGbkVGRXWDPj37Xs+KnONHpt 11Wx41MkFAQQzFPXmaRvUYPeq9jrwPMEIf/C1W3tIdMOfut+mswlpetKrDqd2AndUs ru/X6+k76BkmTnDfTQPSvH2r48VkftMEk6uGpba/ZOb/8NyKu/kQVebptojUlGObf0 4uFvQ2/5hIVRnPt50KC7fdVevrXFUUNooa6BxfiOuVh79WiFbFTR2sfDj0/UMbWDvm hYdxoml7r6IVPu6UMYQFV9utyTsY9AuL5Q4hud4X50pguEigm2YvW1kS33OVcMqi2Q wOzIerJTzETanjlccI/77cDI= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:33 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 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 extra-content field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f8fa1ab3bd..311564c1d2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41192,6 +41192,9 @@ Version Control Services @item @code{receive-fsck-objects} (default: @code{#f}) If it is set to true, git-receive-pack will check all received objects. +@item @code{extra-content} (default: @code{""}) +Extra content to add verbatim into the git configuration file. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 4f36495740..05a3530fa1 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -73,6 +73,7 @@ (define-module (gnu services version-control) gitolite-git-configuration-email gitolite-git-configuration-default-branch gitolite-git-configuration-receive-fsck-objects + gitolite-git-configuration-extra-content gitolite-service-type @@ -338,12 +339,14 @@ (define-record-type* (default-branch gitolite-git-configuration-default-branch (default #f)) (receive-fsck-objects gitolite-git-configuration-receive-fsck-objects - (default #f))) + (default #f)) + (extra-content gitolite-git-configuration-extra-content + (default ""))) (define-gexp-compiler (gitolite-git-configuration-compiler (config ) system target) (match-record config - (name email default-branch receive-fsck-objects) + (name email default-branch receive-fsck-objects extra-content) (apply text-file* "gitconfig" `("[user]\n" "name = " ,name "\n" @@ -355,7 +358,8 @@ (define-gexp-compiler (gitolite-git-configuration-compiler ,@(if receive-fsck-objects `("[receive]\n" "fsckObjects = true\n") - '()))))) + '()) + ,extra-content "\n")))) (define-record-type* gitolite-configuration make-gitolite-configuration