From patchwork Mon Mar 31 22:10:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 41101 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 5A07327BBEA; Mon, 31 Mar 2025 23:13:02 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D892027BBE2 for ; Mon, 31 Mar 2025 23:13:01 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMw-0000IT-2M; Mon, 31 Mar 2025 18:12:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzNMT-0000C8-8c for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMR-0006yB-0V for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=whBF69Q7QbrIqpKYXqbtm4ROrPYRGUG/rswYck43c0I=; b=TlPlpWE3orULDjwhrAaQr47YmbBT2Nuwwrt40++cfBBB53bl2IWz/xkjssTobvi3cO0WUcHD8d+ZT1lzw6ZNNQCXqRiJWzL9R8+vsqr9pdgZufBUvloFTMB1MZk1v8Ovs8ZHlQZ9/YV6Hgi2+BhdoTjAfS+9lidhMdEL60Mbq0moOaVOXnPLoKfLGx39yr/LWQIOXdKHkXLOZ5ndS3vGyFCBhJtN1oghH0lnVp9zqxppsBNe4jIH3kODTQyoQsYWbzWTLUYbJNGp2cVi2xSmctaV524Xf66NvVcHNi7QMg1iuVNIkMNBpq7oLGODFwyIV2FJ9nU99pTUiOLkEQPrmQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMQ-0000ab-Qa for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 01/14] services: gitolite-rc-file-compiler: Switch to match-record. References: In-Reply-To: Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:12: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590681929 (code B ref 77186); Mon, 31 Mar 2025 22:12:02 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:08 +0000 Received: from localhost ([127.0.0.1]:43348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLX-0000Ux-F0 for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:47516) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL2-0000Pa-1I for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:39 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 805B93790C0; Mon, 31 Mar 2025 22:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459033; bh=fTVYanPx0JV3Pmcrc+mNFWmdr13hjxPtyMzTgEqUqPY=; h=From:To:Cc:Subject:Date; b=sPBxtD8TQ56EVX6pqgltgAsmCb3DknVGjySqgga6r2po5Q0QBT4/DL88mC7U6T4qi xHt6G5pVlMFnSw/rS/Q/BE08p5a0txqUmWNuHgw6PXNIQA43QYbFEl0+Xk67HbMfic wAtsvS3CU4cYWezrE120iaLXK52J3/tKH18A4vAN/PHSRUPkviA9mj1ScyA/5uPoaf 9j3GIYIB9b+8WJVK8WaaxdhVFC6oe0SQZEeAhAMbjiAZ9Hm/6E6bitkDkI/GQ5VwGz YQ47DMFnM2BahN62183m/2vkvGywxFTsh5gpd0d+XA8OTlZv9qopnPx3lRzoIcz1hl oa14RLxBPT+fDGH1EI4UKM3QUYwtJ6TJ8ddr3BqqH23pMLPrIfvDOeca8lhL4eFwhq zznt3RCRkyvtdRTT70o73Bzeh4AcpyVYcWuKA3HS3QropYuJv1JiuLupeiD5xf9CQu rHMgWqPCdGWIImj3jnnW6hKtGMa0sAURUxqQoiW9v5INP08AICebsu+HqfL+sA/SfX WwQFedEgZrTvRJZQaVDeq+QKD2ULDYxTgSvc8wmVeOQrTuadJwpZ+MRe80zC5eCPlU 7jwkdTFy5ezOdQzl+93vtWPeaywLt1jYoD5a/Dhmc6vbGU2A1vtT7RSqAAyGLLlIlH ZPE2RbSy56Ryfo/QricCftkQ= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 101F6379527; Mon, 31 Mar 2025 22:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459033; bh=fTVYanPx0JV3Pmcrc+mNFWmdr13hjxPtyMzTgEqUqPY=; h=From:To:Cc:Subject:Date; b=sPBxtD8TQ56EVX6pqgltgAsmCb3DknVGjySqgga6r2po5Q0QBT4/DL88mC7U6T4qi xHt6G5pVlMFnSw/rS/Q/BE08p5a0txqUmWNuHgw6PXNIQA43QYbFEl0+Xk67HbMfic wAtsvS3CU4cYWezrE120iaLXK52J3/tKH18A4vAN/PHSRUPkviA9mj1ScyA/5uPoaf 9j3GIYIB9b+8WJVK8WaaxdhVFC6oe0SQZEeAhAMbjiAZ9Hm/6E6bitkDkI/GQ5VwGz YQ47DMFnM2BahN62183m/2vkvGywxFTsh5gpd0d+XA8OTlZv9qopnPx3lRzoIcz1hl oa14RLxBPT+fDGH1EI4UKM3QUYwtJ6TJ8ddr3BqqH23pMLPrIfvDOeca8lhL4eFwhq zznt3RCRkyvtdRTT70o73Bzeh4AcpyVYcWuKA3HS3QropYuJv1JiuLupeiD5xf9CQu rHMgWqPCdGWIImj3jnnW6hKtGMa0sAURUxqQoiW9v5INP08AICebsu+HqfL+sA/SfX WwQFedEgZrTvRJZQaVDeq+QKD2ULDYxTgSvc8wmVeOQrTuadJwpZ+MRe80zC5eCPlU 7jwkdTFy5ezOdQzl+93vtWPeaywLt1jYoD5a/Dhmc6vbGU2A1vtT7RSqAAyGLLlIlH ZPE2RbSy56Ryfo/QricCftkQ= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:07 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 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 | 55 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 06b6ff224d..f5558e9197 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2018 Christopher Baines ;;; Copyright © 2021 Julien Lepiller +;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -267,33 +268,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 Mon Mar 31 22:10:08 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: 41096 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 254E627BBE2; Mon, 31 Mar 2025 23:11:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 DF63727BBE9 for ; Mon, 31 Mar 2025 23:11:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNLX-0008TV-Og; Mon, 31 Mar 2025 18:11:07 -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 1tzNLV-0008Sb-7m for guix-patches@gnu.org; Mon, 31 Mar 2025 18:11: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 1tzNLU-0006v1-3A; Mon, 31 Mar 2025 18:11:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=JvDk2meoNP34QgiOlt5YUfRidy7KnNc1cP4o+k5JzsY=; b=QFVMOsCef4EPvE8ZOCk8Xe+OcEh+sC7kjJHVYv8qKnMfNz75kQLmz1YCZDv+d7ZL3MV3jJBVg+FQfKzUZ2zKL1EUtJ7Y1+Q/06l4TAzIwKonDV5x0etYwQNHh2VqKYPsZfP+xcga+Tyf4TLzB5L91UGusIKygKbtWToMFlEx+nhcneRKw8b5vDZ2Znkji/+BbVeczwqDXu+B7uDedmh3RpF3kqSCWWHPlNECR/tqQ6hCnEUQ1Wnh2Lk4+BbpOekHbNX1Z3LksJ+eEmdQRPRKrjUaBR+d9uZsmchRdjV182ZgObHVVaHtVBCfJIpXIrlt+CMoGG0n4VZxJnWkMyNqZQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNLT-0000UN-Lt; Mon, 31 Mar 2025 18:11:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 02/14] 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: Mon, 31 Mar 2025 22:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590441711 (code B ref 77186); Mon, 31 Mar 2025 22:11:03 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:10:44 +0000 Received: from localhost ([127.0.0.1]:43337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNL8-0000R4-4t for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:44 -0400 Received: from wolfsden.cz ([37.205.8.62]:40958) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL1-0000PR-VO for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:37 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 03DF13796A5; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=aowMKOdBUUwpFwq/mEDez3/EpLiFLdir4q7Sif7WCIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iuEqmQ1DCuNzM63R3DzpFs/ZQBNowOGiHrHvzreu1DC0uedRW2MIUZANI/TnerX80 RL0CPEc3XZMKyelbzWOgDfQLl2ri8wwJlKY/sbanuS4VDRQcXj2moauFUEUqY4QImD oWGidbIdMyD3XpMC2tvlxjuGaEpgVBPy7XbeoUSBte6ggXQT/qSsxSfwamjkfZWLew f2M5fLrI7BMR/8q3NVUnMVDKqTu393odVImVPzZsTdxrzLNPkJbvdM0+0vG3fMGLUV neoQn5p2m3D00KniLvc+aKvUedN492x3wKx7hsD1w71PaylV0j+5AJZpMj4UYk+Yqt UVW+iCcHJp+AZ4Y0r49Tg18f/j6NpAaGZ5FhrJAKjljDMmGpDF8bZf9Y31ABNVhIL/ IRZ5RXoVvVcqja+7eZLiC/OA2XIsQFkzxkB5dRua6HfRFlbE3fwQT+R2AEoI2i+myA fSdyOxbYJGUenb5nUUhGg+w/op2t41wJIY4oVsJe05XWYcY3r3gDL8I0yphL/PQgPL 7U2bB7Kz0bplUvS3ntBmOKGvNj29T/SqpmbxroN41jHpDxh4xe4189SbRqo9WdBT3D 2G/jK94KD77YefB8vSt3yqrBvFhj7NBh7lvguJzSQeDKmG+jx2velH/noqceyXjWrP Aq8hjShzc5U5pIBGMHjZqFfs= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 927E4378741; Mon, 31 Mar 2025 22:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459033; bh=aowMKOdBUUwpFwq/mEDez3/EpLiFLdir4q7Sif7WCIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wolU27wQEDaJA1Fq0z0nM2jZXHSj9aGU1UMb/zPl9fkPXic5ZLr4dth1dtfLeN3Um 0fvi72KUxm0duuEDP3rVceSGeTy6kBFHxREuT830aPv7Tn6EZl/oYG0wApCq0JwqCx wXb+rlwcFCQS/gqWt/7NszLCZabxEjQYqcgyIRxgzG0O6UvtQ+qaXvaMBF0fTLCraO XUoMpkQPjUQkf7BP6q8KW1/YIWMetW6i3AK7NSAkaO03AqZ7DwZC1PaKPkYtAetYHz XxoAVgz09gyOP9dU9wbTb4A+kw1eSWYlWO3Z93Ly6YGdabaVGFVPAV5u3HoiLnV+QZ 6jvVNsQ0WFtbR31gvqOKYzFTn6JeWdOkcTaC1vH4MXXAcaJwjd3jlSa10rMP/sYw9b Py4HGQtqlPnTy7h0r8en9dFR79qpVwo/t9XkcpH98ddB7ZpNOwofCx7bgA9ay4kgUY trw5AF/WuSlelhqRjF04A2WC3+tA4AhPkMAfQwZU3tOASBy9JoRk28eIg/I+t7Ddxl SH1a7KtmqPtmJ61QW6awMeOKDmUbh2NIKtYCRh9ESWZnaemx0tnHH727xSpZikU0B4 jfW27yA5NDyF/iN5RBVizySkRpbiV69NnARMMzhMtkwVJ+9DpLMWUNslItL+cGkyPT IN2umXPBl3NVCPiVhcMlTwws= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:08 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add 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 f6d774fd13..bc8e7206d5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41061,6 +41061,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 f5558e9197..344538a73e 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-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 @@ -252,6 +253,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)))) @@ -269,7 +272,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" @@ -277,6 +281,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 Mon Mar 31 22:10:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 41104 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 79C7A27BBEA; Mon, 31 Mar 2025 23:13:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E2ED427BBE2 for ; Mon, 31 Mar 2025 23:13:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMz-0000MJ-32; Mon, 31 Mar 2025 18:12:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzNMT-0000CD-ET for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMS-0006yE-1C; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=iEGWYtU7Vz2t/HSKuaWOxxEzuFEtZv5ChFD0LziHIt0=; b=IizWp2LMA/UIud2zvdBI/7F2jqSab1ZhD86F7FBDkirn01wT6Lm7ZfDF2wnrwBjAO6vS1sbfuUw4uVXkVRnYQa/zV34vhI+eXEdZ0ifQ8Y/478DeK415sg00dvw29LGAeWP7wZrJFHAVgL/bMN9GVNgXO3nfv2Im2x4yKozVN1lt2pWJd6U/CX1jsMF6NBi93KmZWcrtm1/TvernSEqkuA+yMvPigODaVG7s4tYDn7L93C0Ge+G/UoVS57JLKlSghrx/Nt4E5cUdsXHA+bp76+nV+8iJEYEB4Znjn3T0EspBsYvA80HPxdKFFPQyycaPc2lhRz/Gwyn/f6+mke57wQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMR-0000as-S5; Mon, 31 Mar 2025 18:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 03/14] services: gitolite-rc-file: Add host-name field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590691944 (code B ref 77186); Mon, 31 Mar 2025 22:12:03 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:09 +0000 Received: from localhost ([127.0.0.1]:43352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLY-0000VG-UM for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:09 -0400 Received: from wolfsden.cz ([37.205.8.62]:40966) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL1-0000Pb-V9 for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:40 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 8C7BD37A300; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=1OYRyBIMiaChjSf8obNH/+pN3f7ws+Md4nKVC7nSwRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nnt4SogLJ3I0FqkfSB2ybtvwQcbmKijJiuox2zZUOR7MQ57ewJn+9YvPzpe5tJHot 7eGBdP0FzYc1Tqs3+x2iUkvwIBueyyY79O8Lr1nfpCaFRKKrMtCI4qx5UILHY5omHd jkV46b1De8XsyR+3EQuhXlBlPmoo9rwksmKo+gpd9UDsSaS8f5xbJzrkjPYHhLfb0Y b2ZG5R0L73j5bVIvNLhtja65tQZkpCH7U/ig4VyeB6pTsOwaMYJF89zZJEPlcgfGX0 kwCvQfMtpw0/BSQYwZY+t39mE54LLbPSE+ctROguwUlwLJtTdjmKctRzOFdUZc1gG0 M5cc/XAWp+BSBfEgPyNfCyZufML6Mt93LV8/h6K3FAzq/pvOnApXs4VrANhgcIUcTe 5yl18XvWRHUJ+YKTHdlfLljTiWwbHgB/1Q77az9Ckls+NtbdJHgst89NReXuMBBv76 bMXfJ2dl5ZLHSes2tlWoJh0zZmE+aMtHPZjk0uikjYjHxBcvF30N7uKvTJg8v3uyD9 mwjoxFU2rIzGrjCoQUOVjIX59G/iGoI2ThXQUdM25akRFp/BdaQlAh7CiYviBKDNQU oLHGyEMDsCVuSw4MLcDZeqLDl/RCDNzyHBHV0M4J2w+h2/JozgMbu5u9tItLiCZ/xc mxR7f3QobDmTCyiCiM5o/Qd0= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C223379C98; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=1OYRyBIMiaChjSf8obNH/+pN3f7ws+Md4nKVC7nSwRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Nnt4SogLJ3I0FqkfSB2ybtvwQcbmKijJiuox2zZUOR7MQ57ewJn+9YvPzpe5tJHot 7eGBdP0FzYc1Tqs3+x2iUkvwIBueyyY79O8Lr1nfpCaFRKKrMtCI4qx5UILHY5omHd jkV46b1De8XsyR+3EQuhXlBlPmoo9rwksmKo+gpd9UDsSaS8f5xbJzrkjPYHhLfb0Y b2ZG5R0L73j5bVIvNLhtja65tQZkpCH7U/ig4VyeB6pTsOwaMYJF89zZJEPlcgfGX0 kwCvQfMtpw0/BSQYwZY+t39mE54LLbPSE+ctROguwUlwLJtTdjmKctRzOFdUZc1gG0 M5cc/XAWp+BSBfEgPyNfCyZufML6Mt93LV8/h6K3FAzq/pvOnApXs4VrANhgcIUcTe 5yl18XvWRHUJ+YKTHdlfLljTiWwbHgB/1Q77az9Ckls+NtbdJHgst89NReXuMBBv76 bMXfJ2dl5ZLHSes2tlWoJh0zZmE+aMtHPZjk0uikjYjHxBcvF30N7uKvTJg8v3uyD9 mwjoxFU2rIzGrjCoQUOVjIX59G/iGoI2ThXQUdM25akRFp/BdaQlAh7CiYviBKDNQU oLHGyEMDsCVuSw4MLcDZeqLDl/RCDNzyHBHV0M4J2w+h2/JozgMbu5u9tItLiCZ/xc mxR7f3QobDmTCyiCiM5o/Qd0= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:09 +0200 Message-ID: <8448afc0beb49af7e4ba750a000d82d7c8dd5af7.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add host-name field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: I1231ed47a294ff48b35a301f76ae8e9cbfcd9b95 --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index bc8e7206d5..4daeab924b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41068,6 +41068,10 @@ Version Control Services value from gitolite however is @code{1} (written as @code{#t} in this configuration). +@item @code{host-name} (default: @code{#f}) +The host name of this gitolite instance. It is used by the mirroring +feature. + @item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))}) Set the role names allowed to be used by users running the perms command. diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 344538a73e..2b99e8db86 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -61,6 +61,7 @@ (define-module (gnu services version-control) gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys gitolite-rc-file-log-extra + gitolite-rc-file-host-name gitolite-rc-file-roles gitolite-rc-file-enable @@ -255,6 +256,8 @@ (define-record-type* (default "")) (log-extra gitolite-rc-file-log-extra (default #f)) + (host-name gitolite-rc-file-host-name + (default #f)) (roles gitolite-rc-file-roles (default '(("READERS" . 1) ("WRITERS" . 1)))) @@ -273,7 +276,7 @@ (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match-record file ( umask local-code unsafe-pattern git-config-keys log-extra - roles enable) + host-name roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -284,6 +287,9 @@ (define-gexp-compiler (gitolite-rc-file-compiler ,(if log-extra " LOG_EXTRA => 1,\n" "") + ,(if host-name + (simple-format #f " HOSTNAME => \"~A\",\n" host-name) + "") " ROLES => {\n" ,@(map (match-lambda ((role . value) From patchwork Mon Mar 31 22:10:10 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: 41107 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 7ABDF27BBE9; Mon, 31 Mar 2025 23:13:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F369327BBE2 for ; Mon, 31 Mar 2025 23:13:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN5-0000Nk-0M; Mon, 31 Mar 2025 18:12: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 1tzNMT-0000Ce-MT for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12: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 1tzNMT-0006ye-Bp; Mon, 31 Mar 2025 18:12: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=/k8bVXux2UCtZrJETAVcy58RFtcWcG0eWteBjKN18No=; b=Jo8VV7NWMGIFsbW5f8cdCq2tQQVsRWtpv9+pNHdHUf22KUp2W1u/A96FuTsjE0wwCr76eB9Vl9CeAzf8T/hYpyE9LN0nKcUpUfe1CnNyOGpVXn816e8s/bBZUuHytOjN2eWBUZWz+5f0oq2b+6r3nsW5Rba2ZVIaZOae1XRTHcC5I+4A8coh5TDIU1jeG4GL/xL6KaXAXRWofriN8ZP0bizsWxEEAgMPZvloCKsFfzYluXQZ8BcfCAoPJ597tZMvi6GNb6lz2UNWEm26nGFsWdoo4NjQQvRzhkEyer5FDg0aG9Ht7m0HkDNz7r+3vZAF6xhmep+4Ej+H8J4VT1VEqg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMT-0000bF-6Y; Mon, 31 Mar 2025 18:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 04/14] 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: Mon, 31 Mar 2025 22:12: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.17434590701957 (code B ref 77186); Mon, 31 Mar 2025 22:12:05 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:10 +0000 Received: from localhost ([127.0.0.1]:43356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLZ-0000VU-TB for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:10 -0400 Received: from wolfsden.cz ([37.205.8.62]:40984) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL4-0000Q4-FV for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:40 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 0854831FF7F; Mon, 31 Mar 2025 22:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459036; bh=+R/bDbSMzcL2pzteMyDKtQpeobhbcdruJDdMCMCfUWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BuW349EEb11ObOf5RyROt7Xk9+eyuZg+11hyFWR5lDX+afskawzYZ3WsrDE0In0Xm unXIu1zXqTqys9J40k5Z6ezRScVHDznHlBqBGNBtP5FDD9RDeLinDHAhhL8gZX2ClX p+ou4KgiOF+2KL0nKla0PxdtJo4U+tqqPHF4AjvqQPIWayH/9iPl+aOudl7jBAu/di mhoH/ZR64OnPLO18Ki5ppXVlL2p0GE3JOvHl6MI+lkC4vK74VMLvOznjF8eCRJATr+ s/M1FgtrG8I8zHqjnLXG+ZpvOVbaT39iCBhgyK+EMJ6HBRn/8QeEsrQt6IiC+GPCFD tWybRMMZ6BS8eSg/VbyuVAu9mjNJEW1Lae54XyRbcAdkyV13aP+yUm5GNU3NWa54UW gzFQElej1LCfbmD3C2VOEJ6ujAI2qB27p0HdX7Ut9eUAKKNo7K48+A6bgSe+c4lsSv i+5bRw+UswAvWjufE0L/vHCW9qjdhxbYhzF9CXed3Qe1xxZeevh/1RrD7b9iTfpltU 3yJdyS0q36rY7x3nmCrjssGAoR6lHOt1HuO0lYEnxE4tAm1eq2Zy7+ykaMT6k9ppNo Qu6iAhTo2PW0Yj4I57Gbb745/UfT1zRq67r3DdgXmAXJUqAJlk2/Qy63Uc9jy9dPmm +/63nI2KWoyy5gUa9PpOf+BQ= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 9971B378DC6; Mon, 31 Mar 2025 22:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459034; bh=+R/bDbSMzcL2pzteMyDKtQpeobhbcdruJDdMCMCfUWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KtqHfTaKPv13KY38RssLJozjBtvl1QnXnOzZ7ZkK4XCz8QR/N2futlmA1wyuHxDm3 UPsCTR/hyy7QHTGayHue8F/Z+voWT2+6qriUvE2W5m+9XdBizuH0rpw3dz3ZWQZgPJ 1Dv58AX3mjbnN6lDURQL9KVKpouxjt09pI7CrWVoDYkC/CmDTJFL0Xw0uq+N3pZnK7 fb/NC0l8mQ+61vbSsLnvCE4Kb6gGOA1rltrOYOeUsig6mLIv0c/nT8ZtMUP/fvnJM2 neU6MSRVqWyApZSmyf2iis5ayokORlsiJLzQQzXeZUGTLL/mBNQU/4KUYwQTgl3CRD NcSOYfMFcfl0bxlxTb+OAiwJObZkI4yI26bjA+X26542is1gYkP/GX4wpz05hodCbW f7wRUgnPYqRXcQge+fw2/OeoZ3jRbC6jFJfSXoB8pzCLkMupVDK19zQvTW5JOELEKx F3kmmF/QJ/xKRx35bIUZI+mnWEo9PuK8kgZPnP2rhJIE6TW/ifqg0ZogcFwNDDLtb3 Q+4WEynIe275hklC0plAUtEgpePWeS4VjlJKGJMjnUO2Q4wIdQ+jqk4GPLHbBqCzek G+XJvMd9hGRMCtMrU/XgRdUKIW43LUX0T7c8t73jDrhMPYPkYqhtJcOzLvTOAD3dIW 4BWGiv4CMiTyJhysg2tsWeoQ= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:10 +0200 Message-ID: <5a3d0685d485ab209edcffe2ffb3f779eece4869.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add 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 4daeab924b..299f84bb49 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41078,6 +41078,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 2b99e8db86..9bd17334fe 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-host-name gitolite-rc-file-roles gitolite-rc-file-enable + gitolite-rc-file-extra-content gitolite-service-type @@ -270,13 +271,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" @@ -302,6 +305,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 Mon Mar 31 22:10:11 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: 41097 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 D9F6A27BBEA; Mon, 31 Mar 2025 23:11:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9F4F627BBE2 for ; Mon, 31 Mar 2025 23:11:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNLX-0008Su-2w; Mon, 31 Mar 2025 18:11:07 -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 1tzNLU-0008SX-5e for guix-patches@gnu.org; Mon, 31 Mar 2025 18:11: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 1tzNLT-0006uw-Qy for guix-patches@gnu.org; Mon, 31 Mar 2025 18:11: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=ejMzucmpMzP+Fx0me6D3lCgXXqu35HbQb8Eaglv7Qeg=; b=upgl2f3eekDLr6ap9BoRiKOXGT02/GifINVoWf+1+Zv01CpBbNXGgyMf60HSt3etfyMojAE1ySqhwHuPtteq2wXCSZV973u/u1xhoT/3Phc/jnmFC9AufwGYxUX/1VDd7JEWamSKoM3q5A2z+FitWqH0woQpofs35025u5hTOiAewkIG6RbVgt3SSDElwhPntaEyjeIflErK0VfmHcIdOgE1B+k4NEP04VYGvCmozeiV4uT5/NVewiV7nGRGDRtGxGkHycYdc0owD6aaD7stcnBbR5sKnxGGkVOVvztHBVyHUbBFjj5LaVEEFEarldHNqbzZgLPmooDlgycPWMtKEQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNLT-0000UF-6S for guix-patches@gnu.org; Mon, 31 Mar 2025 18:11:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 05/14] 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: Mon, 31 Mar 2025 22:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590421681 (code B ref 77186); Mon, 31 Mar 2025 22:11:03 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:10:42 +0000 Received: from localhost ([127.0.0.1]:43326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNL5-0000QR-K2 for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:41 -0400 Received: from wolfsden.cz ([37.205.8.62]:40972) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL2-0000Pc-CS for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:37 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 615FD379D96; Mon, 31 Mar 2025 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459035; bh=iYP/tg5Wo3JM/MIR/iUMpzzyvBPWlYgEU+9C+NCI4wY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sw7LH5RYYlwpcc0DPVPBAM6xFb5gFDuAjBszo8ut321tseXcCQ/l+Kr9GaA7ci6Du 0prLbKMAbpgobUQlgG5neyZABpPuwuyTtTpXaDHCNKXC9lK0jl+Ag1I8eJGSsrxCYb w8U5STNkhl3CF56kpcJ0EPR4VgYtoinroXLJIueFisfP7MWdYByPGd7VSVlswmxWzF euFvrYihM01EfuAM1JUwqoIUT3Z4NRbcuv2HR8br8+YUloV7+n2cZg0HBEdmshiIGZ 3Py6HyR7Faoz/pvj5LgtCDqgP6nWJO3sWauR5nOWr81OsvAlyexC9CMG2vQ6ZR5Q4F LnPe9K4X+wGHs2Co0MqUxrDGcF0L6IDc3huysxn0LpxnrZoHWE/szcdH91GDamePYz PdlPc7qGC8E2eOfG4cQ908BWlxT9Aqy/hhWUS/RnMNhiw/hJBcvL1rBKgTnKM/LIDZ YqAGTJK9B9GCOxjv7seQrSSDrbhJKNdJQ5Aarm5M5ZxWt5BC4PUXWQHaSwnCQGeJCE TAEIddFrnGIwyCOEnbJL+FiDzYuGjNLhvyy8HN5Kalkq5kI+RBfIXTE/ypdWMfP4aJ xcj3qopi3eCdYrimuR0VqL/P213DxKKAwz+TY1Wv/Gm6ZYwiH2iXkjlwDTr4e6gcjb cKJMPw26CcXZMZ6dkv0/L6Ps= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1A426378276; Mon, 31 Mar 2025 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459035; bh=iYP/tg5Wo3JM/MIR/iUMpzzyvBPWlYgEU+9C+NCI4wY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sw7LH5RYYlwpcc0DPVPBAM6xFb5gFDuAjBszo8ut321tseXcCQ/l+Kr9GaA7ci6Du 0prLbKMAbpgobUQlgG5neyZABpPuwuyTtTpXaDHCNKXC9lK0jl+Ag1I8eJGSsrxCYb w8U5STNkhl3CF56kpcJ0EPR4VgYtoinroXLJIueFisfP7MWdYByPGd7VSVlswmxWzF euFvrYihM01EfuAM1JUwqoIUT3Z4NRbcuv2HR8br8+YUloV7+n2cZg0HBEdmshiIGZ 3Py6HyR7Faoz/pvj5LgtCDqgP6nWJO3sWauR5nOWr81OsvAlyexC9CMG2vQ6ZR5Q4F LnPe9K4X+wGHs2Co0MqUxrDGcF0L6IDc3huysxn0LpxnrZoHWE/szcdH91GDamePYz PdlPc7qGC8E2eOfG4cQ908BWlxT9Aqy/hhWUS/RnMNhiw/hJBcvL1rBKgTnKM/LIDZ YqAGTJK9B9GCOxjv7seQrSSDrbhJKNdJQ5Aarm5M5ZxWt5BC4PUXWQHaSwnCQGeJCE TAEIddFrnGIwyCOEnbJL+FiDzYuGjNLhvyy8HN5Kalkq5kI+RBfIXTE/ypdWMfP4aJ xcj3qopi3eCdYrimuR0VqL/P213DxKKAwz+TY1Wv/Gm6ZYwiH2iXkjlwDTr4e6gcjb cKJMPw26CcXZMZ6dkv0/L6Ps= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:11 +0200 Message-ID: <94a18d62c14f5b6bc8f6c06d4af598a5feafd4fd.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 9bd17334fe..b93cb9f590 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -311,7 +311,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 Mon Mar 31 22:10:12 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: 41098 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 BCA8D27BBEA; Mon, 31 Mar 2025 23:12:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7BDDC27BBE2 for ; Mon, 31 Mar 2025 23:12:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMZ-0000DC-O0; Mon, 31 Mar 2025 18:12: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 1tzNMT-0000C6-8n for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMR-0006yC-HT for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=bXyGDdaU7HB+Q7ctyjzaxI8vbloI/RfA8p1WHDh1QY4=; b=LDMo5uVAae+2NbxIUXIX12uAqOXDLyLmoPe2ot4ITeSg6U4Sx+E6E/+pHe6qq+TgJUB0gwk8caLCZUYUJiDqe/eppPb13U5fXaMxguXRvAKaslh0bCC5FdLIg89FAdstFIbHeTk8TSuIDpG37WU5nMAsJ+GaFbam6VBV2U1N/AKaejqzzidMJVMgrAyg8c7tC82UukGpUyqFQjzVBHiEyas7Mj16CRffBThMFiB6524WDyFvJyrdbVWrgmJFHeDNWqiGuRXkYirh+FmPn1r9oAGyIyVMtrrPJUhydKemXILNt3R3FaLIW+c06GpJkl2ZPDAAKFDUlKBEIEQffIrNaw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMR-0000ak-CT for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 06/14] 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: Mon, 31 Mar 2025 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590681935 (code B ref 77186); Mon, 31 Mar 2025 22:12:03 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:08 +0000 Received: from localhost ([127.0.0.1]:43350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLY-0000V4-8t for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:40976) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL2-0000Pj-Uc for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:39 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id EBDB1378CE3; Mon, 31 Mar 2025 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459035; bh=Cal+nuQshd8REsd6ki2mc86Aw/Yl+BGNDRvB/mfBH30=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rqgSJ+PRswU1wUNEg7MH+VoKsZ3mTqeIbBWFs2gyLgUj0wE3dZ+BEEfi3LKzBoU/M SdDATCg7TI2Hw3jzvSuNPQrOzww9pZpy0yAapZjm7k5DX/Sp7WNPphKCbLbtt2J4mK x0Sgq7w54NX2lb4sRVUikuy6GLTcxkp9FDQsWV73/BPtGay/mXbeJWNmgyagQ1W3K5 7nvYvkzv2/zt78bURNcaIGwugeT+Yjl0JH3QMZMx3tqn5UK4BUFvaPVTVzoRpKsEad GYiJTD2VweJxvVVte0wItnHrlpfFnG+XYBVxlgcryJTwgDasddGKKAUJFaouHHPxSp 7RT233bpqv+SUUNHMbMe+7F9h3za0GbEsEVWpnm6jnmHsfpP6wSSUz6+pnZFiuucRV XHu+Ns75G3WTnTaKm4xom99y4hGqn9t4xDy7mVQ9v1/FM4yIS63pUVex/9CqYkVJQT kU/YK1seektZUZ/HWGz3HpoVIJBnw5JCZpICdeWDV35dPXc8FcXDDDyBSqghoCcUep BluKTBTO9Haz8Y6qYbNoKUB0pj21hB+XPtZ3blhmB9cvHXjCQ5U/MpGZc0lh38rPF6 aQno+b6O1pvIfQLg5z2XsLLjouwDMgSTs8LTS82iSvJ8Q7FtE9aMcbZkDvVAkMJPl4 4fsIYR7Ux2vSowRRFiiw68aQ= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 90E26378277; Mon, 31 Mar 2025 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459035; bh=Cal+nuQshd8REsd6ki2mc86Aw/Yl+BGNDRvB/mfBH30=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rqgSJ+PRswU1wUNEg7MH+VoKsZ3mTqeIbBWFs2gyLgUj0wE3dZ+BEEfi3LKzBoU/M SdDATCg7TI2Hw3jzvSuNPQrOzww9pZpy0yAapZjm7k5DX/Sp7WNPphKCbLbtt2J4mK x0Sgq7w54NX2lb4sRVUikuy6GLTcxkp9FDQsWV73/BPtGay/mXbeJWNmgyagQ1W3K5 7nvYvkzv2/zt78bURNcaIGwugeT+Yjl0JH3QMZMx3tqn5UK4BUFvaPVTVzoRpKsEad GYiJTD2VweJxvVVte0wItnHrlpfFnG+XYBVxlgcryJTwgDasddGKKAUJFaouHHPxSp 7RT233bpqv+SUUNHMbMe+7F9h3za0GbEsEVWpnm6jnmHsfpP6wSSUz6+pnZFiuucRV XHu+Ns75G3WTnTaKm4xom99y4hGqn9t4xDy7mVQ9v1/FM4yIS63pUVex/9CqYkVJQT kU/YK1seektZUZ/HWGz3HpoVIJBnw5JCZpICdeWDV35dPXc8FcXDDDyBSqghoCcUep BluKTBTO9Haz8Y6qYbNoKUB0pj21hB+XPtZ3blhmB9cvHXjCQ5U/MpGZc0lh38rPF6 aQno+b6O1pvIfQLg5z2XsLLjouwDMgSTs8LTS82iSvJ8Q7FtE9aMcbZkDvVAkMJPl4 4fsIYR7Ux2vSowRRFiiw68aQ= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:12 +0200 Message-ID: <03525ec2ac1e2602638091a0bf8cd26b283cffed.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 b93cb9f590..87f134cb23 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -65,6 +65,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 @@ -244,6 +245,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? @@ -263,15 +275,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 Mon Mar 31 22:10:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 41108 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 0635527BBE9; Mon, 31 Mar 2025 23:13:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 DAEAD27BBE2 for ; Mon, 31 Mar 2025 23:13:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN4-0000On-BQ; Mon, 31 Mar 2025 18:12:42 -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 1tzNMV-0000D5-IY for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:09 -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 1tzNMV-0006zD-2y for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12: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=mjSQ5iqM8VOCLAc6ZqdkzrR7reMJRKzgOx7d7lDMtnc=; b=KVsFBmlXSBOewVd+se1txA9xXeuE15wm+s32yseDIQZvE8FPk3jZ4lpUOsKBPF1UALM2/HywhuN80K8HnlKL6GY11BLyYQ70aWNKMHaWg5xRUnnDjA8tbQZy29I/Mr73lup3bRiqn/AQvs2LL/KoS1hLAtL8v/CeDb+2vJBrmWMOA0g5XJ22mHP1cyO0wbXPslSSmHeqCzxXtHKauGHbxNjEr3i30zr1fSCHVCk5YLdRE6HxHItFSLgNyuEHrofm6AUGvcSL+tdTs9TtF8gcWTcVbNZPGY9zg8w1DekTXM4RT0MsaOfegIZIjBVthQp6DmSLUQQmu/gHoRgr+FeD7g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMU-0000bi-Uh for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 07/14] 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: Mon, 31 Mar 2025 22:12: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590721991 (code B ref 77186); Mon, 31 Mar 2025 22:12:06 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:12 +0000 Received: from localhost ([127.0.0.1]:43362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLb-0000Vs-Ez for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:12 -0400 Received: from wolfsden.cz ([37.205.8.62]:40996) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL4-0000QD-KP for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:42 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 6030A379998; Mon, 31 Mar 2025 22:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459037; bh=3XtKA9Zrv2uss1fHbAHSt5eNszKPTc1NgYkzhICxV9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ki/odJ6vslLev3nIGv/XklweMFb5LE/T6p0cyX/a2onhRQ0M08bKClMGB61LrSAxd cRFVZEvSoxzSQpVqdcEeUvxZ5rLXvSwSTLfrPwDCUadGRL5d6MQooSP9//FUbinmJo //NUYklV59T6d8j431bmpwyTlASgMfjXYFORLAk0QEY8Qm8RiuFV5tMB9ASsDXuN/m LsMmZjpdRjNOUI72JXprSCDbaNbQFxwll/p+isG6PMVLv3nd7ECZHBD+6nfoctFA3R l4IJKwa2eVEkHAtOn4BJ4v9yvXPTp7Fwb8i8KNFyqSoIOPFKzeakaA89PEgEMwS/FW fZUuBB6aHlZguU7nf32K2lUtMijvXpyswAeorG4j0Jd9Hw0ilkkuNH2M6zNyvdZzKG ZTS5tIa85qn6Kn9uNg0m9QeSTVgXch1MARD0VuA4Nrf+J9CjCfQAYrvGTB0FeSWqoK WBrQCOFKhr4YIPTQV/nhHbFIPAHUzEwnrUMbe3TTf0sMxn+Nr8/gQMYtrvesduEE+f 3xw15Gx+bCqPL7QY2oBj5bmkiPToZsb8y1nyLjLBpF1NgLE+jNDGPjuknYmHo2WMX6 kGHmKw4yV/FjqJfFj3EJEtnrYeqZdKMQN/kxbe9bjt3aqbR7fteI5d+G+kG6nFRn8F eeqkjl411MP0vCGxUorCnU/4= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 15046378FC4; Mon, 31 Mar 2025 22:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459036; bh=3XtKA9Zrv2uss1fHbAHSt5eNszKPTc1NgYkzhICxV9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KFLct0FUbCvMprac/COpMZpUoe3onm1XbTa3EkxEQO0COLF0NWgtuqwIeKmDhwsot 48FgDxUW5PEhSX+B1bUi5XjCFfW2FC3UfTFmZR5a/j0C1bY+Zep/HbYwKsrYXeviI1 n9ikD/3SaFiWENM987ELosMq4XscWkKdWqw4hcSfIJgr66DPf6vyeoyrmXGmD3lPl6 XU0W0Rxa5OIgP3wGnHXfIxFMp0MEOjJ/DW9h8igX+pdWzlXAElsvFYu5vFpr/nyYeC 3loxoYQdbfQElwyF0WwWb3VjnmYQBnGNoFbpEodKKg/BQoY7mnltnmQ748gHuebon2 SBHucR+U+X93/Pedji3IDkQsxWj/c26ujy+OzO4G/McknJyMKoeTBJgmxG++KC1uT4 6W/8VLISEC9Ah3e83CsEMvucHVWZb8w8ovsr/rScvmPHh6BSKiQnakPItkRcgsAvmM GbJ3TV3O26P4+N5cozBifITw1m3m03TeGxZ6CV/y1ESH0SixzGD4nbab7W1WLQUvZg ZsPG3MDzmhdjUVrB481iq87712id3LaxLyumRb6HBpiXfO+ZNlxcLtlV0O09hRcLCy irNLlOQgPdAFZWKVBd1wmMKEMYeC5O4vpQYF959InJefphSajq0s90WtdJpS2JJUUq zl+mizGmrjTcgj4H/8fPFi8M= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:13 +0200 Message-ID: <8031b4bf4c723a6811f87e3ffc0df14651fa557d.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 | 6 +++--- gnu/services/version-control.scm | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index c8f244e0fa..cd624d3d57 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -64,6 +64,7 @@ ;;; Copyright © 2024 Sharlatan Hellseher ;;; Copyright © 2025 Artyom V. Poptsov ;;; Copyright © 2025 Dariqq +;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2365,11 +2366,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 87f134cb23..e39bb509c2 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -429,15 +429,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 Mon Mar 31 22:10:14 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: 41099 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 2938827BBEA; Mon, 31 Mar 2025 23:12:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DEF1327BBE2 for ; Mon, 31 Mar 2025 23:12:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMZ-0000DA-Nf; Mon, 31 Mar 2025 18:12: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 1tzNMT-0000C7-99 for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMS-0006yG-M1 for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=s3CuHYPwXegNz1BTWX0bLCg7DLWGxrCmCYcQ+RI1Fmk=; b=s9V8zbh6Aql62zzVW08F+S0awWCKEBXf9fOWeHko+9xaEjwHiybUrmmn5UVn0bhDmCeMF9KF2K/QY7bwYrwSeoKHO1s6Mxn2GtVhqbd8WtrjXAYRz4jiy30nVPStxFbQezzK8lY94/tmh+jTfUAiFom6o66tDQk+G53EdXXfApllNgLRDh8I6kA9Iwbl+rzM6Ei5+AbV/cMQquSmi67KZu0ybjZThctWCzXFSt1K75QHiKR+iNrSSyo72nE+VYDjhLtECTwmhPRnMRKcattWUSE4JEFNKhCsdmJebx+56Pje1xGJBA/NGPxl41fxFRzyjVE5rqFE3+p9oKhkiKFL7g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMS-0000b3-Dk for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 08/14] 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: Mon, 31 Mar 2025 22:12: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.17434590691950 (code B ref 77186); Mon, 31 Mar 2025 22:12:04 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:09 +0000 Received: from localhost ([127.0.0.1]:43354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLZ-0000VJ-HB for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:09 -0400 Received: from wolfsden.cz ([37.205.8.62]:40992) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL4-0000Q6-FW for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:39 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id DAD68378E71; Mon, 31 Mar 2025 22:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459036; bh=7g3NNXuAA8e/geoTZ1904GyvrdcsoGc1vUC8NzYtPp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wkKiTyDn5J+8FlF8Qh3nW8WTdRSyL0eReIlOFPRib7MYEdkvVt+j3t50CcBymDUCG n8NPlbA+EWGhyHIABo6zk6t/Ns8i0vOKfOf1ZKNH99LgnAiPcPCLE2wmdlHyAvntGC YXXhZphZcib9l4NWoumZy6c+XYhhfpHO8JVC3SLMyp450IdXqV3nyoGyuRptx3+nL6 4cRpTz5eV2mpt0x0D+52AbGlDmUFFPUvKOzUBcegUnEQL5h1blOP0OAM4Y+QNDjZXi XIjxEFw2Xc0U5kSNMb1z/quIjh/iOoi1w61V3birzhYOcYd/DzP4/CrI8LuXB7qqbu x3hFawJgBAHxNk2Q1c2kWaQlObzfGawqSWVuOCLEMBe6QjmSYY6fX5k5kb+/OIpt2Q Y3dPh/T706c2xuH8hiC9VBz9D+ng8zZyGfDxHpXxeULJgCDxpgmxP8ba2rd8u6xTb2 D1WUq+MiRuEkhnJhe8nir30bM2W7Mwujo4pRGEwezi+LYF/2Qijw3X4rZZlUETOl8o SSK24+VjWrL29wwBBki7yTTi4JDtwAfaVQcrj4F/8w4dNFfV2AeCYgAnrXXMsXxL4b X+BD8uTmhWVA9NbHgJPMalxee0LHl7iKKFiPaPFgsjsP9wG5/xiowp+1pa989ViSCI KH09E5YdNzScxqF1dcXF09CI= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8CBFD31D177; Mon, 31 Mar 2025 22:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459036; bh=7g3NNXuAA8e/geoTZ1904GyvrdcsoGc1vUC8NzYtPp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wkKiTyDn5J+8FlF8Qh3nW8WTdRSyL0eReIlOFPRib7MYEdkvVt+j3t50CcBymDUCG n8NPlbA+EWGhyHIABo6zk6t/Ns8i0vOKfOf1ZKNH99LgnAiPcPCLE2wmdlHyAvntGC YXXhZphZcib9l4NWoumZy6c+XYhhfpHO8JVC3SLMyp450IdXqV3nyoGyuRptx3+nL6 4cRpTz5eV2mpt0x0D+52AbGlDmUFFPUvKOzUBcegUnEQL5h1blOP0OAM4Y+QNDjZXi XIjxEFw2Xc0U5kSNMb1z/quIjh/iOoi1w61V3birzhYOcYd/DzP4/CrI8LuXB7qqbu x3hFawJgBAHxNk2Q1c2kWaQlObzfGawqSWVuOCLEMBe6QjmSYY6fX5k5kb+/OIpt2Q Y3dPh/T706c2xuH8hiC9VBz9D+ng8zZyGfDxHpXxeULJgCDxpgmxP8ba2rd8u6xTb2 D1WUq+MiRuEkhnJhe8nir30bM2W7Mwujo4pRGEwezi+LYF/2Qijw3X4rZZlUETOl8o SSK24+VjWrL29wwBBki7yTTi4JDtwAfaVQcrj4F/8w4dNFfV2AeCYgAnrXXMsXxL4b X+BD8uTmhWVA9NbHgJPMalxee0LHl7iKKFiPaPFgsjsP9wG5/xiowp+1pa989ViSCI KH09E5YdNzScxqF1dcXF09CI= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:14 +0200 Message-ID: <70c55db7895094248d5200d85a7c8bd38d255588.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 e39bb509c2..07984d309e 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -336,18 +336,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 Mon Mar 31 22:10:15 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: 41106 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 ECB4827BBE9; Mon, 31 Mar 2025 23:13:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 E6AF527BBE2 for ; Mon, 31 Mar 2025 23:13:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMz-0000MU-QJ; Mon, 31 Mar 2025 18:12:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzNMV-0000DB-Tz for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:09 -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 1tzNMV-0006zJ-Kz for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12: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=7GXBSJK+0XZYZvsRClPAXFPA5+XIxfd7SyHkK3NqvuQ=; b=n+gcEvSLlVuskYUVjpWa7vczcKG/3/kt624ymT1Fs6TAG+vCYV0LWsbvPIfrN2qmEYL8II2Cp5EbUqexlMa/cam1gdVRg2RDOi2upw8JO9iNeLD+E0Dlpsc9/UQDbe1b8BtI1vkTS44usdAHmPjd06zPvc4wu4AgJJ8oim2fDNSKArDsPGFAS/v3FV3LYTze3LTxsSAwtZnn2ktBTFNOAnxXU/hYt3Ha1PfinO3NYX0qdh4afJJk8aiXnFezOJdJIPtNYThduUR6JgLBRFAoGa1ctXScmhxZxAoNYgffoO8hCzblZJ35lQuJUkFWYhYZ1taAA/1m6QfMdPVjaElijg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMV-0000bq-GL for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 09/14] 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: Mon, 31 Mar 2025 22:12: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> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590732003 (code B ref 77186); Mon, 31 Mar 2025 22:12:07 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:13 +0000 Received: from localhost ([127.0.0.1]:43364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLc-0000W4-DO for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:13 -0400 Received: from wolfsden.cz ([37.205.8.62]:41012) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL4-0000QG-MY for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:43 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9DD173790C5; Mon, 31 Mar 2025 22:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459037; bh=x0X4pCp/3Eg6dRiy6Qj1MFkTqm9nVFRUjKlK1sO8Rj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wkD51yuURdoVjAoNT4DFHgVMoOM5GpK5yJNXG2ZWc+eQ6QhtEBouTxHF8VeEnrOk8 qhc3183mUni1Q0Q7wop5qQ+uqAsauCZXjW4LX+72f6aINlGddreSkSRlZj5+jODJG+ EviNXyKb0BzAhaiH8W89Ga1o7wnZs5mSPpxGmQPk33/R1DcwII6XNgvqMvDGmdRVFj hOkpkEDGcRWYy4RsHiatnYQQLYGW5dlnp5tXD4C2TV4pjvrPUCdsyEiGrRzu9jvFup tBP0adRakHsXMM6pqqDrmuFPLXAbUIKFD4y+SO9H5PVTnMXM4qvUU5k8FoY5VAsjNl IfGs4fRX8TIkCPUeayUtMFaq0Ya9ouCrpdpJNVGVtCPS6u2FmbUoK+aUylMbfL/wO3 pWY/RXSytBvFZhW8bclLiiITJswXbm0uIBL95swRjflUtm0zJXKoeG0D347Hti6efE lEWSpjxJBI97VCSihUcnVWEiJ7F9ZJ6YR7fuGTL9MgsQwyNfhS4p1LDmaaTiSNtNo9 5BPZEQzwp7JRzsjHWPDUMDHIhr7wR3TKrqn/pp3UznKxLcvC3W/jp9dmjI+62oF4Wt fa2bWWBYq9noF89uH1JTcI4zVHPtD6xWlj5xmDWonXrMeLR2k3RKiMkpUdjNr5/c2x Boh2PyouUZ/q2LGmZgv97Nrc= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 0E7143788CD; Mon, 31 Mar 2025 22:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459037; bh=x0X4pCp/3Eg6dRiy6Qj1MFkTqm9nVFRUjKlK1sO8Rj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wkD51yuURdoVjAoNT4DFHgVMoOM5GpK5yJNXG2ZWc+eQ6QhtEBouTxHF8VeEnrOk8 qhc3183mUni1Q0Q7wop5qQ+uqAsauCZXjW4LX+72f6aINlGddreSkSRlZj5+jODJG+ EviNXyKb0BzAhaiH8W89Ga1o7wnZs5mSPpxGmQPk33/R1DcwII6XNgvqMvDGmdRVFj hOkpkEDGcRWYy4RsHiatnYQQLYGW5dlnp5tXD4C2TV4pjvrPUCdsyEiGrRzu9jvFup tBP0adRakHsXMM6pqqDrmuFPLXAbUIKFD4y+SO9H5PVTnMXM4qvUU5k8FoY5VAsjNl IfGs4fRX8TIkCPUeayUtMFaq0Ya9ouCrpdpJNVGVtCPS6u2FmbUoK+aUylMbfL/wO3 pWY/RXSytBvFZhW8bclLiiITJswXbm0uIBL95swRjflUtm0zJXKoeG0D347Hti6efE lEWSpjxJBI97VCSihUcnVWEiJ7F9ZJ6YR7fuGTL9MgsQwyNfhS4p1LDmaaTiSNtNo9 5BPZEQzwp7JRzsjHWPDUMDHIhr7wR3TKrqn/pp3UznKxLcvC3W/jp9dmjI+62oF4Wt fa2bWWBYq9noF89uH1JTcI4zVHPtD6xWlj5xmDWonXrMeLR2k3RKiMkpUdjNr5/c2x Boh2PyouUZ/q2LGmZgv97Nrc= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:15 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 07984d309e..268b0a47ee 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -350,78 +350,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 Mon Mar 31 22:10:16 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: 41105 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 8483727BBE2; Mon, 31 Mar 2025 23:13:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 789BA27BBEA for ; Mon, 31 Mar 2025 23:13:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN4-0000Nh-0B; Mon, 31 Mar 2025 18:12:42 -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 1tzNMV-0000Ct-2n for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:09 -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 1tzNMU-0006ys-EW; Mon, 31 Mar 2025 18:12: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=urPvmybsRhyUmGjQa0mMDnsBohYXM5PZx8Iqj6F+jvk=; b=Ex631SYAXDma2haGAECRhlc0No4fWOrzL37/pEssKvDSOdb48cMX4KxL2ea4cdcYj+8No+aa2RYDyWCPsvF9aXDazokcSPi+CNEekBPlng1bO84aUQwdAp1c4sVlSeXG+tnyUL55nz16k5nb7rGhXhZbBr7s5Hr5pBV5qRJZdgQ8DKhypXva2Xy1ya2cne/ZkvRegJc9I7XjPZc9ymkiSA3yEDWAjfsXoi2t4Rz3C9tOqtcJSx19lpfYddpOGJrhSblsAINA9qA/Nep88D2b2fESbr1Ozaiy9sq3keuKxTZF36qS1d0HegfPHYE794du5XgznbJYgzeVlAQKA148fg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMU-0000bY-AE; Mon, 31 Mar 2025 18:12:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 10/14] 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: Mon, 31 Mar 2025 22:12: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.17434590711980 (code B ref 77186); Mon, 31 Mar 2025 22:12:06 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:11 +0000 Received: from localhost ([127.0.0.1]:43360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLa-0000Vk-Oz for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:11 -0400 Received: from wolfsden.cz ([37.205.8.62]:41026) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL6-0000Qg-SJ for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:42 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 2ABB63797AE; Mon, 31 Mar 2025 22:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459039; bh=C1ECZHbntLpyLkeSMm9EOukAKZn52GuxAZ9fkT3KszQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=chcq5wOJNH4IrtQKEDGxsVtWxpjbO7ONIGALISPLLMiQrK6zXxEd4FLp8M1CKCduu 0C1jmpAAMXYEE4HoOUdT+7UBgha4EepTcelK52pvTayxYGhvpzRMJXMCuX7FANwpDQ 6lUjTszOGZdZ4tQr4RnPAIR2b3Ey9EUBae+jaQeUmwPNGkqVmAIDrqNzJlBcedqpe/ 4Yf0gHblI52ikButp2bJM1MuEDc+8yERjg9hGFbHfZ7vl+G+Iv4+iF088g46l5B0bj 77U0+alEbaSFIljSamFGS1xTLZzogtHB9vgwym2ZMZ09TH/+XMaYqGPCUDIuv9AdmD py97yBPwx16Vc8gVGckS8mHVRBel+pGZUjFD9s2jGJPThnCvM3J/5JTxvkju502eCI 0zzi+/elpltn6vntO1JQPi6jsNQaW9OluVwFm9AO5vJak+VfvbEOMW9Bo6rtsFt9Jy 4TK3Zvqc5qLOQ66CsZ47ZNL0FspTXb1dQTzohcgfQSAG8x4DWCbJ8URq4BAoVisz3y K8ZI06QmGJrfv9hK1T3eEj3UPFp2Pkt5+6468qKxy2Kiov2Yfi0WeLv0S63F7nsI+K 7n8098V1fzrkHFu62jb9+eaXLlT7L2yWhBtoU6btzxoPjHBJM0HNviTG8YgNfIZ/nU Yc6RbCvCwm3TDA6J7SCyiCzY= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8B492379999; Mon, 31 Mar 2025 22:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459037; bh=C1ECZHbntLpyLkeSMm9EOukAKZn52GuxAZ9fkT3KszQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Flrul6WwYLC1YiMXOHlySNSWX4XQTtQikW2eHSxOOMSeVIn2R3pR8HARfJN6AcW8s Z2KhWZlKUz7kn1Fn+0YlcUboSSMsPz26+Z0k9Xekm7sC2Q55QRT4GZ0UQCcvejrlcf 1o5yL3iu3jvEltYVowPBAkPRvmLO2QNtIzC02wQrMmA8t2THqPTH3yvObENG0Hjxir 2wP7lKPGf+ltno3SAU5NyObx54Nhp9o/kyTsH88uJDcgINZeDLoma1tg3CsQLNq4qE lI6wlmSoB/YKt7RyjviD5qSeVBydaK2TAD4gYQjHxOzA41rU3blaOmT1EYGNBPs28D 8Cbuz/1Rhcn8XTM8kJC39L0NnR3dme7hRlU+GaBNISS7R5voJohuNEWxGlNW0eRpia XNoufrMLa28jIJHUCYNk7SaArqGtiFPrwJFO7dc397V9d3BabzxLr1ienCO53Tz3d/ aQ66y+EutPhSbMS98c3z7osqHzKG6xnmHgSptugj2qLAwkf/lDrPoS140cB42mkLu+ ItmUVmbA2zLHjqgYZqxSmEbzwdDllYDhlSu7DloAFOXEwgIaXshTNDg3pNtSneWnJU WUHejcYfzrMsQ05jz1UbbQSLNJugUMJ2yrqyPwSOkngmHo8JHAWaMdwQ/64b58kdCX 4I1e+W84Hs/vbfpOIwlDudlg= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:16 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 299f84bb49..f2f9827cc0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41009,6 +41009,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 @@ -41084,6 +41088,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 268b0a47ee..dcdddf8078 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -67,6 +67,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 @@ -321,6 +327,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? @@ -334,6 +357,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) @@ -352,7 +377,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)) @@ -390,12 +416,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 Mon Mar 31 22:10:17 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: 41102 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 2A18827BBE9; Mon, 31 Mar 2025 23:13:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 2721A27BBE2 for ; Mon, 31 Mar 2025 23:13:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN6-0000QH-53; Mon, 31 Mar 2025 18:12:44 -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 1tzNMW-0000DF-Ot for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:11 -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 1tzNMW-0006zY-Eu; Mon, 31 Mar 2025 18:12:08 -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=v6QSKnKzN4Vf5giyg0jQRMAZdjIyhW33GwUChKWva18=; b=fleFZFhE6YdvRSrWfEr+HITdZxyILX6uuIJ5Wkg7InahNU+lfn737QE/wOv16MrXrcppOgqRkCZoAmVoDtQrb8nu0v4rWrCT5OiIttlrGGDzdMbIVByXj7HNODKE/lNUEiOz+kvBJfV+arVn/crjbbaQef1UwCGnymkS6rhpndSvJay311uYnmauQIA4IDhTkmWtODNtC2QEvSJmd4rK5t2h7UqyoGkeEPiETzQSPuWTV94WjSUsUHrvAL1Ew97UwOKfHbBh7G6X+00815C7IRjLixLSzCooFyklkbOQvCJ74rhlS9SGZ9fdIHJKQDXTR4zjZp8PlZxB6+TzJG//1A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMW-0000c0-7E; Mon, 31 Mar 2025 18:12:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 11/14] 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: Mon, 31 Mar 2025 22:12:08 +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.17434590742011 (code B ref 77186); Mon, 31 Mar 2025 22:12:08 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:14 +0000 Received: from localhost ([127.0.0.1]:43366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLd-0000WF-Ew for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:14 -0400 Received: from wolfsden.cz ([37.205.8.62]:41030) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL7-0000Qu-CG for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 5D976378EE1; Mon, 31 Mar 2025 22:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459040; bh=ajEwY7oFBemxxkb0brWc/OUaSmBJWi9P6i8uUiJ14lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bylAzNYj+cEiIZjowz0uWbpQSi6xnP3aTYlDn1JS4vuuFGtjPG8E35RyyTngo0yiE L8kkGHAit+1iMGzk8wqw+dHJRmc712y+ecmo8igF3dYJZy3unDXXVuYyGNSvig1rhL OxdRDJuHoRafij8nJsOulvoeAATTU3MvN3VckDZtSfdaUIn0Q5RU+sayIteKCztrkp C3EDCiJKjRF7Cfqh2bztWOLX/GQDm7eyWt1TQTHXJpfE5s86hvJfCM8uTM8Nu8Ylzm J0u0f5wcNNMJIzRrMqg3JK2tnbPdzINygiJE8A6APDHEDE34vokmQhH0UI8s3DoQWR QpVJ2F9aGLlCk3z7XWPMhh2UKGjLNCNX4bRsfAF8bqE5MBjuIE8s+TRVt1I/PeeWwY S02lgGdJG3D9o/0fkbvB5ubTtcZrJK+jsHGXXsKFce8pQUvdMKL8l2GEHZ92sRt6OE 1rkQmO04945AiAkIcT+MO4xVb4R7L3dHrGljD0qoHAyU+74HKTpCmn/UkmNxFT/61L a64cA6HC6jLo6fhXo8WMyRs1CwisZw8zUBlDCb8IUTV6BJ/VhDvvDUnZ/61pJl420E kI61q5ZW1rAObJ4WNrm6rNVBhdpbn+EDU9MiP3mfbGCDezCIdQFjgMQYyd44fSB13T Yb68BsQJ5q/+vxh5H0ahLJVE= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1445B3789FB; Mon, 31 Mar 2025 22:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459038; bh=ajEwY7oFBemxxkb0brWc/OUaSmBJWi9P6i8uUiJ14lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ugg+YPwQiyr/72eiW+h2m7J8dGLgZc7svMeSv56XgsIWmJSYJfv9GfxNXbIfnTKmP WhZ6yR6yOzsCCpQ046RpAi7H8m3tMs8lOiQcTJhVdVQaUCuU+FhbYlyALDwfZADlwW HLGT/pKwSLZam2R+DsdVIY+W853OEXfRTvNbKSSWhtHM1oLtq4rkQJ80U9Jrc1TusA 6MKvNN3NAJmA2E5q+4c/hQBkd1Z0ps8SO4jbK7aodEOtA63OeGCgBvckGLeVofkNzN BH7jFUlDOMoSZIOkxvlJ342uwaHK5QfyZLJfV7rk4QV7r33pbqqsFSrE8mKDsuurLc 3pDs3VqgPBLtkr1Anji5xIeEg1pO0w9Z3b41v76en6dhTrzXSXYS1xc28eaGtCV/47 v3u5GTfyCl09yhawm/31sEBORKmkb4J0e0IhN/2e+S4Qwxee3hMEk5JbNtSa4LUTKc AVdDRCWvI8Wcl7o4FLc2bojXLavqXsT6otU/UWzz0Wr6D0Q6q5gsmdoIcI6WABMKWD wW/BlhXA+WQqEOxHb/WDfWGZczz49+s3Re+TZFPCx6zW34Sy6YxWgT7B6+PJxrk3aT wrLaydWwY+IRY4OEzymfZL6hBg1y0qgFe5+KIOdBdmCgq87dz1RbXTAdNUyfyA0iJL mJ++zRAsMA4RsGgsJLe/ReFE= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:17 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add 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 f2f9827cc0..08a9c44e5b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41099,6 +41099,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 dcdddf8078..12653b3cea 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? gitolite-git-configuration-name gitolite-git-configuration-email + gitolite-git-configuration-default-branch gitolite-service-type @@ -330,19 +331,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 Mon Mar 31 22:10:18 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: 41103 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 925B727BBE2; Mon, 31 Mar 2025 23:13:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 0ABCA27BBE9 for ; Mon, 31 Mar 2025 23:13:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN5-0000Po-B8; Mon, 31 Mar 2025 18:12: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 1tzNMV-0000Cs-2M for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12: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 1tzNMU-0006yr-0L; Mon, 31 Mar 2025 18:12: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=aFv2OAtZxtzfPovzGpiyp853CxSPjEdNYIS9okn7nfM=; b=IxEfwZ9gqaKrMCUWB179qLVgdJ3chUsdQKqgT7NvVDtBOEUgG/RSC2M1noNbK944ppUXLuWmNGpK4TM1nGWuXx/fTyskr1J82XyJItb4AAcN2KVVjy56RsxfQnHAGpZ8IvSMBo0qT8vmkDYUxHZQC2OYR1Mp58I9sLhGUncLmue+cI0y1M5HGyrguxyyUGy9i5myBPTpBsNSbbSsavLrcpTs3SKTrsICrrVouXvFb0oB3w5t2D6XWgmdL5uktSpj6R3YBub2YAhvMYmlXkjdGn+8GmzsS40tqjQQUdVWfYqV07nFeIl0aEltW0DXJBIluLgObsO5DD/MjViftqB7HA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMT-0000bP-RS; Mon, 31 Mar 2025 18:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 12/14] 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: Mon, 31 Mar 2025 22:12: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.17434590701966 (code B ref 77186); Mon, 31 Mar 2025 22:12:05 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:10 +0000 Received: from localhost ([127.0.0.1]:43358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLa-0000Vb-AG for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:10 -0400 Received: from wolfsden.cz ([37.205.8.62]:41016) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL6-0000Qc-S3 for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:42 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 1804E31D178; Mon, 31 Mar 2025 22:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459039; bh=F+HqRt7oaZcJSFSsRYlekahZxKXt8LaLsv57/D8uaPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=J8HmQDkP844aG2tMtRhxfP9Ei+3Bg0kZrB9jN0znkt4vnxlmsEeO8MWRpq0DDuVD9 mNSKyW2OAL9sPU8fJqj8BDr5FxRmc7AtXv0YmlWUnzzMhU+/vAVKRA2a1m+3ttJZMO Bvs41+59asjqFjTqmZOtkZ4sQL8lPXkuLiqASFXb60QZWk+a2zdiKDiJkO4lM2anGT L+uDBxKOm0AzssKZ4o6Lyiw19wm1PaCcD/BRZzWiFC6PaUeg9uZMppxduCVZU5PWD2 rK2108LZgZOfI+nKorGIpNee98amXvb5BC7go8yK0eZ/lGTtL2/lsO/P9rzYFw8Wdg ehURHkWsMNtJTk6ad9T8JYxyHcpewfNrFyzaoFoTC/F6in64tTEMkbGRD3FzWemvA4 JiazRaIoRFi37nU6E9U5uTOwRRvkYjbb5/97D5voNjY7mgCH/rbCnbJOcCxOakZiMV 42Gr7R2Xzoo/FNLigUMoQnA5Ks779bIp51bVEMCNH5quEi2CA6BkNTl5kUGBKU1bLf 5Tb6VTKQhtkEcAueWNwUkdsaVuYNfmfIhier7gzmoakVwKc0+Z+sBKjngQItBjPYTT 0UcNReGHtbHikE/UkZB2z5RuVaLve3RTAjHYrvejq57Xxu8DUysIqRg/74oDsVqoH6 31WZLEqL+K+5WyCdfU1kkP9w= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 919ED378FC5; Mon, 31 Mar 2025 22:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459038; bh=F+HqRt7oaZcJSFSsRYlekahZxKXt8LaLsv57/D8uaPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dojzs1fKFCdDBvxwYoBLHLlFhswadvsHyj5tfF5o59wf9HvMJuNcvsxkS2y64vXRE nxWga+9lNRDAGIcWR4VJNfrLgkeCjjMESt2/6meMWZrCFu6rp735f50jLJRTKtJv4z S4NeYZXnSANpMJWM3VEcrRCSGrBbFK3Wu5VH86g7rkT0z4Vdmi+VVteWY3uYW+Ywmv oTtVkvH7ICNy+HSxA59Idjf+q9cpnNPU++QosmAe7fxg0+FHbFsUiSd9NH78os1kH1 48zegDbS1Mcbb6DShVRcgT13fUvlE5ScERYv4uIxhVxgC2mHKghJtZ2uiB3ufl85Kq DcGFWWLIFMctRCCz7tP3ZK7mSoTW3v934wZPvNhwltOGEUMRexlw14Dv/XmkqyhKKZ id8tzF8Onqc/qkIVtI3JaVV2JMOukHNy/K8Mrb7l9UGC1osuzD2Nr8cEVdRu8BTyKi 6+az2Yt3uTK+ZFUkrV8A8bEghBNx8jAYqmBJA7UI6D40d8Qh8+IMCji4mDRsFZGD2f zYJ8H63teDqCIe9zaFwlfOI5FW7aB8bm/BvbIFzcCxM8/C/Nup7KKDzWOFXqkzt9VG N1s1HZ9q7pjp0OEZSzVSjCs5Dw5FwPqcPZTTnpb/UzbLou/Gfali8g99ewvJ8G2aXq Y1kDY70F0vRtUWBqOuV6vVes= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:18 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add 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 08a9c44e5b..fec6457c08 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41103,6 +41103,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 12653b3cea..1e21174ea9 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-name gitolite-git-configuration-email gitolite-git-configuration-default-branch + gitolite-git-configuration-receive-fsck-objects gitolite-service-type @@ -331,17 +332,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" @@ -349,6 +352,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 Mon Mar 31 22:10:19 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: 41109 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 E2F0127BBEA; Mon, 31 Mar 2025 23:14:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 596A027BBE2 for ; Mon, 31 Mar 2025 23:14:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN4-0000Ni-0J; Mon, 31 Mar 2025 18:12: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 1tzNMY-0000DR-5M for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:11 -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 1tzNMX-0006zw-SP; Mon, 31 Mar 2025 18:12:09 -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=fTcrcosS1XXi2s4/h4RaIXEnTwxnm0PujO9CPz7KXfE=; b=Okq8N3QgxTYaJG5p+T0c43kII39DLXDxL/+rjqFpT04VMKSXDmCXTAcNAwGo7jI5JUa4fXIQmsrLx3cF5AaerPdtaau/iCAetXAAtlogarcJ8Yzhrqe+aELd6JXFGPHmGLY4iW1bT7IRoAZSylsVjC5WkCaEBLP3YHZb382Xl63dwF3tC91FsaMPZj3USmJzkmUnvSuf4cAmcGYvGFKwcE9cEndt8CYk74ouxKq/btQ7n01CEs7U8QvFwNgUOMZDIEe0fv1MJHx7gOpO9TOnYO45I6OmTcZASf1K7s+O4YXEpFv8WyamEFl+4p5BguIh6tQBgZ9/g0SZ+byvlfHrsg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMX-0000cO-MA; Mon, 31 Mar 2025 18:12:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 13/14] 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: Mon, 31 Mar 2025 22:12:09 +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.17434590752033 (code B ref 77186); Mon, 31 Mar 2025 22:12:09 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:15 +0000 Received: from localhost ([127.0.0.1]:43370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLe-0000Wb-UM for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:15 -0400 Received: from wolfsden.cz ([37.205.8.62]:41028) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL9-0000Qi-SX for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 86E963792AE; Mon, 31 Mar 2025 22:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459039; bh=xwelrJMlNep8GA3BZRuJ9A4bM5DICLkvr87FUKA5kWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eEJc/AJCI1+KY9zAaXRhEXMtn3OwkSQKaJEmBivd4ALfOx/S4jUDB9bwtzLmuzGqI DCdIR6ES4/lAtTAvg3DI9cP0tCwfXrxr3fmeA4CtetxgGgw2vWexawvIkpEAZ0ifdX 1adC4kTzuilLM77MWTzd+uH9dXOt0edsAoJWG+GyaLtI0NUl0/ayTnNxG2WgUR7nGD LjgCdGGtcp7xDQPgMWMIxZlDV3u18hBcdio6JRIL0waxKeU8wTIHLPboxAIIBpFdXf 6LA0xef5pZhVvDTJxAZLR5vbfKNi9IK/sElVaXAevUZ7lgc707ZJ+CoOoHI8TvEvoP A5u6v01ZK7CrQm7B3MUaeB7PwVmDPfXBdTiWmYvAFALLp/qqJxxSsn4Svs4DVgP7+/ bHtTlD7BWUTnq53jwD/qqLQBEu26KTT9d7cBQcWaU2NqaLi3/jEa00+5qPnlt2QYzK UVo7ACgH6vH8rGEgumSnKvzvHiiVwAItGuklnC0XsNN+s2jT/WYU1/mAdC3pbNG89T G6H28z/Yf+TmcsvSMDLUmv26FCbYRIm47p+B2Z0Us8iVaV7RFzZfxIGZGOKzDrBQL4 vhfyIS6f5epYnIcg35U8tLXcrni/1igcR12Mq2sbAbp7ivr09501/koSpD6pcv0mis NTZ47novT1MCh5Mk1diCI72Q= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 242013796A8; Mon, 31 Mar 2025 22:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459039; bh=xwelrJMlNep8GA3BZRuJ9A4bM5DICLkvr87FUKA5kWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eEJc/AJCI1+KY9zAaXRhEXMtn3OwkSQKaJEmBivd4ALfOx/S4jUDB9bwtzLmuzGqI DCdIR6ES4/lAtTAvg3DI9cP0tCwfXrxr3fmeA4CtetxgGgw2vWexawvIkpEAZ0ifdX 1adC4kTzuilLM77MWTzd+uH9dXOt0edsAoJWG+GyaLtI0NUl0/ayTnNxG2WgUR7nGD LjgCdGGtcp7xDQPgMWMIxZlDV3u18hBcdio6JRIL0waxKeU8wTIHLPboxAIIBpFdXf 6LA0xef5pZhVvDTJxAZLR5vbfKNi9IK/sElVaXAevUZ7lgc707ZJ+CoOoHI8TvEvoP A5u6v01ZK7CrQm7B3MUaeB7PwVmDPfXBdTiWmYvAFALLp/qqJxxSsn4Svs4DVgP7+/ bHtTlD7BWUTnq53jwD/qqLQBEu26KTT9d7cBQcWaU2NqaLi3/jEa00+5qPnlt2QYzK UVo7ACgH6vH8rGEgumSnKvzvHiiVwAItGuklnC0XsNN+s2jT/WYU1/mAdC3pbNG89T G6H28z/Yf+TmcsvSMDLUmv26FCbYRIm47p+B2Z0Us8iVaV7RFzZfxIGZGOKzDrBQL4 vhfyIS6f5epYnIcg35U8tLXcrni/1igcR12Mq2sbAbp7ivr09501/koSpD6pcv0mis NTZ47novT1MCh5Mk1diCI72Q= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:19 +0200 Message-ID: <358fa9172eda0124f7da41af8810f710f9a85eef.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add 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 fec6457c08..ad4a623916 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41106,6 +41106,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 1e21174ea9..e73e77e0b2 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -74,6 +74,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 @@ -339,12 +340,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" @@ -356,7 +359,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 From patchwork Mon Mar 31 22:10:20 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: 41100 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 0CC9027BBEA; Mon, 31 Mar 2025 23:12:47 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 63C7727BBE2 for ; Mon, 31 Mar 2025 23:12:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMy-0000LU-1U; Mon, 31 Mar 2025 18:12:36 -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 1tzNMX-0000DG-E0 for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:11 -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 1tzNMX-0006zm-4D; Mon, 31 Mar 2025 18:12:09 -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=MS7ePYOWm1bXznEoAeWQtMXrvawIlD2Fw46GLdwBagk=; b=WAJj9CHXimEIiSp5k2cKljsg8XGL8xvvApj2zfew/Gp131fnIkDCNBbL+JA4EPsNw1alr2LBWYeD6vAWw3JFOZVKfKxszFW3yTgYCg+A4rsnfK+a3My2vg8dykwxhh6rwQuBV8i98yF+1i1/zPsPWHYV2+p02RF9ZQYOa4BK0nt8wKvUfBcIS5QTvy39dUMwfx8D7dlMPg+RekiiT4dfLtm+qd4Q4lHxrkXc0gD92nRPBmUSDTeqKTH41kIqwbd9z177ldUGjPBXGfACCYLB5xQqv891q3pDDWxTym3Nk8RT7XvpNMveTuYCmwpEJ6LO9jVkx7uEGBdWAMdtH+GBQA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMW-0000cC-V8; Mon, 31 Mar 2025 18:12:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 14/14] services: gitolite-service-type: Allow setting the admin name. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:12:08 +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.17434590752024 (code B ref 77186); Mon, 31 Mar 2025 22:12:08 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:15 +0000 Received: from localhost ([127.0.0.1]:43368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLe-0000WQ-40 for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:14 -0400 Received: from wolfsden.cz ([37.205.8.62]:41044) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL8-0000R3-Tc for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id D8C9C37983B; Mon, 31 Mar 2025 22:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459041; bh=VWxynkrVb+7ZmSr2fvYfxZuI5nys7anYqcUuVgVojdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HbEXpZzJNxy5unyleNo6lslQCD9IqAtf+Bi7gRlcOkaGwtcfvX7t5FQqw8+cLrkrB Dy6+jB8TPsqC8RPRuSQau6NXvtNkvQCMmZnjZuoOW4tGb7NpyT2T4+WYjM254zxzD/ 2wNKn1yvTi/ZHdksmk3XTjYFgvkC1Za/2yhEuEusQB7RwQE572JtIBFm8orLesaBeA qC2wtQUWG/5rxnGXtEWv7JbYy+pblsj+lYAtcIfY0g+4GelxJcZ+X6Gy+hnMJ6v4UX LCBG8JZIUCDpu8WPbCeIb8KWOiNKFC39o7bObt3XiMlLvljB4e6WoVDWNi2E8OyXam w2YqzQ5yaJ03j7d26NQK3kFOl7PHIySnze75OP4lITJ4ccEUMvyUCcVOJUBp90tTAD sXzu2HrNZ0oL/hwXmPVdZbAFbRwd4y06HeOMESnl/l2KyoHO/6xyh7a28ElQU9TZZZ Y7/CYWmayw4rLPg6x/BzcaHhh3Mk3IV2Sf9fT/CJIHu51gUbs93M701a5OAtcxOiiL E3rldmSusYi4fRrAgplU87U03BsjgdkJr62JXNXwTvDcm4n7vnXsUzI9KMTl7ValIp R5BVhcdwKjMumyohczBTLPnEfk+PrNJOdIajCtrV5N6i2ajEwzmQGzsTexpxJOwujQ +4Ue2Zqcc6YnD5cKLhXNBrwk= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id A1E1137973A; Mon, 31 Mar 2025 22:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459039; bh=VWxynkrVb+7ZmSr2fvYfxZuI5nys7anYqcUuVgVojdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=d3cJihNX/sr68o/u56avFwMGK2QtmYrnwn5uxcfM3DfhVUJpCSLrMV0YSszQgDBR0 u2cT0WTIEc9ktGPauw20WDHMRDXbdZf/5GdiHV8iN6btcBBUsUvBnyB1BFNIhC/kR/ gvRUr1JFXh98EpcVLQWl1nzwUe6OCygfjEOWKEdKAibR+BHM1cDU3ZXURAiPxgFZJb x5dr6mLHl+1ZN3mni6GBgsEIXdVkoGBhg3455rcj27GOYp8zv7PMIJ60VBtIM6VMBl ws9I0l61T+fSQXZ3hUaoEnJtg65c+EejFT2/zlAceTfurO4nsLt/tgdTPmqhaxD+6V JY4iribtSxQofqdisUMBmRszKpO71UfhF5jYvoOccMK82gDRbCj6QvHwYWet5lI2hW uJFPUn6gla3ZpdtVXTc+DWhJmcP6P627folALhg7gf2XjsqdDMD55fc0+U53qW3PXn 4133xYE62bwshCE4sKqyPn9PlMc/5VZQo5W+T43dYGZzYCy2Yg0HkEHBKpr+4cuv2Z UnfGczzQpukrXYP4usnYJ4V09k2D5IP5RKB/bPXM/09QKKiFcdnSuJh4ADlYLQSDf6 x6stlv/pbe+2dW5InzYZFLF12+US3HX1wRKt4lFGo9Pk4iTtJU+hTi8jMQTqsaHaYm TWOYQNVFSp6/EpMiWz3M0MqE= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:20 +0200 Message-ID: <10ec1b1b255fb295438974862d806a2a19ed9754.1743459020.git.~@wolfsden.cz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add admin-name field. (gitolite-activation): Use it. * doc/guix.texi (Version Control Services): Document it. Remove the wrong default value of admin-pubkey. State the need for .pub extension. Change-Id: Idadf4b2697cee6d1da10e6ba03bdc2e1d729c417 --- doc/guix.texi | 9 ++++++++- gnu/services/version-control.scm | 17 +++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ad4a623916..5db6f28f7d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41013,7 +41013,7 @@ Version Control Services A ``file-like'' object (@pxref{G-Expressions, file-like objects}), representing the git configuration for Gitolite. -@item @code{admin-pubkey} (default: @code{#f}) +@item @code{admin-pubkey} A ``file-like'' object (@pxref{G-Expressions, file-like objects}) used to setup Gitolite. This will be inserted in to the @file{keydir} directory within the gitolite-admin repository. @@ -41024,6 +41024,13 @@ Version Control Services (plain-file "yourname.pub" "ssh-rsa AAAA... guix@@example.com") @end lisp +The file has to have @file{.pub} extension. + +@item @code{admin-name} (default: @code{#f}) +Usually the key name is derived by taking a base name of the +@code{admin-pubkey}. The resulting file name is the name of the +gitolite user. You can use this field to override the automatic name. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index e73e77e0b2..51da1c59cb 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -53,6 +53,7 @@ (define-module (gnu services version-control) gitolite-configuration-user gitolite-configuration-rc-file gitolite-configuration-admin-pubkey + gitolite-configuration-admin-name gitolite-rc-file @@ -377,7 +378,9 @@ (define-record-type* (default (gitolite-rc-file))) (git-config gitolite-configuration-git-config (default (gitolite-git-configuration))) - (admin-pubkey gitolite-configuration-admin-pubkey)) + (admin-pubkey gitolite-configuration-admin-pubkey) + (admin-name gitolite-configuration-admin-name + (default #f))) (define (gitolite-accounts config) (match-record config @@ -396,17 +399,19 @@ (define (gitolite-accounts config) (define (gitolite-activation config) (match-record config ( package user group home-directory rc-file admin-pubkey - git-config) + admin-name git-config) #~(begin (use-modules (ice-9 match) (guix build utils)) (let* ((user-info (getpwnam #$user)) (admin-pubkey #$admin-pubkey) - (pubkey-file (string-append - #$home-directory "/" - (basename - (strip-store-file-name admin-pubkey)))) + (pubkey-file (if #$admin-name + (string-append #$admin-name ".pub") + (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