From patchwork Sat Mar 22 17:09:02 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: 40637 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 6BE8227BBEA; Sat, 22 Mar 2025 17:11:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E035D27BBE2 for ; Sat, 22 Mar 2025 17:11:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NT-0000hf-AP; Sat, 22 Mar 2025 13:11:19 -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 1tw2NC-0000VE-Qr for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NC-0007k5-Hb for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=+lX2blk00fNvP6jZSuC8jMvLIlpjI1N6HCmUlaBlex8=; b=gr3LOFQXiLJk0F9Qp6cNASkvxtmO4sdEttRNqgRshkugwiFRhn5WVsDVIngugqAWBlvh9nlEJPSpftAppRQY8P4dc4QCR1mzFHujDBMdpn5Gl8UIsIXmA1a1PsBwIXswKg/JYbRMnnm8DKnYAJt2ap85eHGW9i4fkMhbDTuKhk+k0qyIRaN4wPy/V/kdMXLg7tXEeshPD1bEaB/KdYf5JE2BLQ7RfMgC9BRX8Zwa+EGx93oQX/4CygY6c+hg52NlKHW6Qo0BnOLMlbEzfBuKgWsrjjw48RlXFTW6/K+cbMeU7pL59ElX3l+CEu4w+5ip22bkJABIy2qn3nXwGWOh1g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NC-0007Hp-DD for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 01/13] 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: Sat, 22 Mar 2025 17:11: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.174266340727337 (code B ref 77186); Sat, 22 Mar 2025 17:11:02 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:07 +0000 Received: from localhost ([127.0.0.1]:45215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2MG-00075t-BX for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:06 -0400 Received: from wolfsden.cz ([37.205.8.62]:57536) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MC-00074b-0o for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:01 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 0D4A937F2F9; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=JOqwnKhey/JQlOXRCay3KOdq9ZA4mBH+YYW/7tZ2dck=; h=From:To:Cc:Subject:Date; b=cMVU+HRWOxEomkx6K0k7JWECGpLjJCjaP46/GDQ8stL0jCOH547ZQqwBMvvKDgX9c wH6JzrFFIu5h/Zb/p6Gt8pd92WnTmvuW/6wwpfPVsPXIIfKvWNc88qv7Ms/VZut8JF JOxwrklSA2P5963WntQBcxKAdRJIpJ2j5L/LDWJcr4n9RMNHwJrECNYBpMEyzGx3ug oAUN6nJpz/8IeiatJ62apq3QxT1EqNTxJam1IIIhn5Dk6J0g751YwEgIymKAtyXpRw Qm7U3aBFhhNer2BFZQ2G6KwC0n3gDm4oWWRzE5d7HTsYBuOy4rce1pyUSg5dQESI9L 7pEoNJNpZKNTwRiCc54zcVWmgMBk1P3lBh1fTTcALw2HAHKoxWNY/z4e/WoQOEQajx KpcBdfPspxHtEsVT3ANmwtKW0ma/UMIezrtTxE2LvVRyZmnzI1Lw7tnMKw8M5wkjFj 4YmTfh7g3yykfRYkUjRxUe5lFKgG/+LmzMCnYyZArqyYg2OplrgL55xF9uI3qcl7CE fS9iQVzB2o2CZfObfa0yROb79GB195VfBhO8eO2BdpfiHZvLgItd/hC49gbllTFxs+ ZtYEgpXScuDcL8+OwDLfPM1K1dLkg+qtDTvpFnpancsUe1FCwBLQh95TSldfPQ41cb xR2/G6IO9Lbp8/iuxfJuR8G8= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8793337F175; Sat, 22 Mar 2025 17:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663397; bh=JOqwnKhey/JQlOXRCay3KOdq9ZA4mBH+YYW/7tZ2dck=; h=From:To:Cc:Subject:Date; b=XSVddLlmvjoZjn188Ow/99QSdtMr6iS18swmDF3yH4f7gILsXLGGU0693fJv7PKz0 hsaa9o08hXachnCVy9vzkEUtjHrLCZdp202TIHm3/av9CwklNi7P7XvmnEBWOZl2AB nw79HJAATZx/j4gw/x0yOThTb6l8wKeqHZHnAmRQeQVc4sDqbzfL4lWTCWbaR02deH XDbFHUtFeDBV+0Wdzcq0nNShBHKoob5QswwqC3cfv2T1GIwItmq+hlGjAKK4VlPrak vFX6lfBSIRbHcfC9BcEVTuR2N5hPCtc8lFLvZSK3sICp2tiPaWWx9qFkEcPfmX9ift zsR4ScFqEj66yWrDN/+OcgG3yDmpTKr2POtLyhl0YbEKRpw3oxvrJ2tnhHuj4BlWU7 fOGvn8ArmNV+Cm0dh6x5Jziga94S25ItwfJyb8UrLcSgB+DuND1dqT0yPCbZrEogih FgTdS/2XXCBtiVPvIOU2857//wJ0R9R/GeK4hY7Jhb3/HUvpFTII+ar4nUTw726doF 4Gc0AZtCuBahQ9m8LmJY5irRQZQ8gWCXwhr1VlPsyYVgGqPCh9EzQRfZfO2jZF4YHw WKi/jlmHdG4YIxwLTJ+1wJ9kBhBgL61tWNiINWc3dBWcKc0bOnZ1Z+R4V8atiAHbxT 9h2O/DgVoAwzNFps/BbPCikI= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:02 +0100 Message-ID: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 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 --- v2: Add copyright. gnu/services/version-control.scm | 55 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 27 deletions(-) -- 2.48.1 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 Sat Mar 22 17:09:03 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: 40638 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 D446527BBE9; Sat, 22 Mar 2025 17:11:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 21A8C27BBE2 for ; Sat, 22 Mar 2025 17:11:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NO-0000Zh-5s; Sat, 22 Mar 2025 13:11:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0000Vu-5F for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NC-0007kA-Va; Sat, 22 Mar 2025 13: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=YEIEeVHDHgIyyqdRQ721HkiXl/EKHAoa+RMJ8P0Ry9M=; b=pKI/t7E2eg6zSYdqEVQIr+wt9aH8PxWzTROyHTLabdTe1Dc4HreNvVVtnbbbCshxLhToUypSViG5bH06AT/TGpmjVe9AwvFBAFGsKu34w4WCqlCabigxbFNrHscmNFFsA5E1UXrgLCeVkKeuXeeNylqUG9JXA7dMgdfopC8PBSKYV7I/KYEOjPwGyF4kPYcOo0ot1d3DyshDnyWaE42xr0+4lETGy39gzWYR44d3o/I/yAy+fRPO4d4MRDeQoH26MfCfLZpYgRf7mZC68LBR8ZBXNe1IfcpNttIB0t+fCPKlhcSlSepXssrxYScU2zjRpG44o3KkIwdknf1223gfjg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NC-0007Hy-R6; Sat, 22 Mar 2025 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 02/13] services: gitolite-rc-file: Add log-extra field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266341027438 (code B ref 77186); Sat, 22 Mar 2025 17:11:02 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:10 +0000 Received: from localhost ([127.0.0.1]:45226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2MJ-00076r-0q for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:09 -0400 Received: from wolfsden.cz ([37.205.8.62]:57522) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MB-00074Z-PL for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:01 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 73F5737FB4C; Sat, 22 Mar 2025 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663398; bh=uvHBnszqcHNWSmGWaoUPTxI6k0AAWdw+AsQhP6tWlao=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UfSQqFzRHHGxBfSLDioFQmuYX0FJqS0gEzg98vHedn5CajjE6roCzVWNh4V7LviWg WFPd/KjdkX4U7E49qJy6WqEOjRXlqrFALgjtrRenKF5LD6wknpW0sdsWf0ZVyFUoHA MfGf3p+apTlT7V8j+LmOJ0fCc++9h6dprhopwceDrxAiTnxbzTn8IQo1QAHlJ5HAaW bsRgA5+ytE0nd0Guq2+x5tA34ZkTw1yGPcoWyGMBms2sYwXbxJSmxZd0s4EKdmIP6G KOx8K3uLe7x5GXvFC5b9oc/kr+l4o8iOF//J6W4z1WLDhm9GsTkvFLecVKjleUZXOo 74t/GbrFAjxAsGol/XM/g1tyrUdvnVhKdOoYaUhmT6sniAdzSKe0b75hTiNlpWPYVY vooweWBHhzqet0DNGJKJ9iyLLE5ObFjdfG0dFqhyqLE4cl9Ezx3EOfmng92odIbMmz RcfVJrESGRQwGRKwtzydhi+ow98ddmzdtIPv+2Tb3b5bkEc4Ol9qmPTLrl/teKQhMo AjJ5VIzbpOiGsGfGIs9n2bzMexnXOs5y5r6GzEMl1kFl1iDghwtclLmzHdqYX34vlk QDgsCS5ov32aCtBITLV07NTxb00UhSche1wDjLX4tI1oFTzl3syUwxYYgx2Mrbr09s 4weV/T2QndOF7Eccfh5z1RFU= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1049937EDE3; Sat, 22 Mar 2025 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663398; bh=uvHBnszqcHNWSmGWaoUPTxI6k0AAWdw+AsQhP6tWlao=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UfSQqFzRHHGxBfSLDioFQmuYX0FJqS0gEzg98vHedn5CajjE6roCzVWNh4V7LviWg WFPd/KjdkX4U7E49qJy6WqEOjRXlqrFALgjtrRenKF5LD6wknpW0sdsWf0ZVyFUoHA MfGf3p+apTlT7V8j+LmOJ0fCc++9h6dprhopwceDrxAiTnxbzTn8IQo1QAHlJ5HAaW bsRgA5+ytE0nd0Guq2+x5tA34ZkTw1yGPcoWyGMBms2sYwXbxJSmxZd0s4EKdmIP6G KOx8K3uLe7x5GXvFC5b9oc/kr+l4o8iOF//J6W4z1WLDhm9GsTkvFLecVKjleUZXOo 74t/GbrFAjxAsGol/XM/g1tyrUdvnVhKdOoYaUhmT6sniAdzSKe0b75hTiNlpWPYVY vooweWBHhzqet0DNGJKJ9iyLLE5ObFjdfG0dFqhyqLE4cl9Ezx3EOfmng92odIbMmz RcfVJrESGRQwGRKwtzydhi+ow98ddmzdtIPv+2Tb3b5bkEc4Ol9qmPTLrl/teKQhMo AjJ5VIzbpOiGsGfGIs9n2bzMexnXOs5y5r6GzEMl1kFl1iDghwtclLmzHdqYX34vlk QDgsCS5ov32aCtBITLV07NTxb00UhSche1wDjLX4tI1oFTzl3syUwxYYgx2Mrbr09s 4weV/T2QndOF7Eccfh5z1RFU= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:03 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add log-extra field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Ice65dbdf4f42549e3c83914da7229db9d2cf856b --- doc/guix.texi | 7 +++++++ gnu/services/version-control.scm | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index bcb1f9d9cf..3179d33cb3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41147,6 +41147,13 @@ Version Control Services Gitolite allows you to set git config values using the @samp{config} keyword. This setting allows control over the config keys to accept. +@item @code{log-extra} (default: @code{#f}) +Whether gitolite should log extra details. + +For historical reasons, this field defaults to @code{#f}. The default +value from gitolite however is @code{1} (written as @code{#t} in this +configuration). + @item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))}) Set the role names allowed to be used by users running the perms command. diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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 Sat Mar 22 17:09:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 40643 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 239A527BBEA; Sat, 22 Mar 2025 17:12:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9DEE527BBE9 for ; Sat, 22 Mar 2025 17:12:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NQ-0000cK-7Y; Sat, 22 Mar 2025 13:11:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0000WN-Kq for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2ND-0007kF-TD; Sat, 22 Mar 2025 13:11:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=5FcxRJgZwLD2nQax9uVxckikdCK73GUQQaef7QrhWh0=; b=Kj96Uy9NaXbOA5GKz1Bmbsu5Cu7j6UjK/HCLohmK8LrsBVAGP8MwkofBt4oBmbusq6pyt4smTGSiAmgwKEJluD4Y8sm9py+hZ7t3QsxjyMXjETqznoZ1FUv2fkRpq2blkKmfI+qZCagrQQnc1thEcwAIFKx0fVOmhT6D+W33kOisQMmbnlQ3OowSViHhWrxc4+0td9J38aH4PkXy6daehEKxLLVJ2gi/tWUPKC5CspliTk3GfgXMLT+qCbPe/bQcG7B9xbvSDycsrLMN+JOXly2tKEBn8IACmBjA6zKkl6K+r1AUCStdTp06rOohqzeOjjhP9A9YbxtSBO31p9uEnw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2ND-0007ID-Mq; Sat, 22 Mar 2025 13:11:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 03/13] services: gitolite-rc-file: Add host-name field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266342927746 (code B ref 77186); Sat, 22 Mar 2025 17:11:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:29 +0000 Received: from localhost ([127.0.0.1]:45243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Me-0007DR-DZ for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:28 -0400 Received: from wolfsden.cz ([37.205.8.62]:57538) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MC-00074c-5I for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:03 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 21CF0380A26; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=tEowydEfTXi/uoqWTYnr+SbPnCkFfTGGzISNrbVHb40=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oyfdTIiJAgSs3QQJ9PPGLBJWkkcXKlL4ELUXXk/zezlfOEdEUm5qIeaR1zNiG5t0l SA/G9pauSSil4cLNfJO/ukEeheroXJ4t7cqajbD+eiI7H/rdl9XWyHHUfTgzin39i/ UaBy1A3VgrKGQG8ksAH+0QIWQb0mx1fVZg9aE+Mq864cX6bjNsk3ssB4MfubCl+p0g z2U3mro9McmAOeBGY0wloww8otlaKo/MSDF2MJo/bcOkk1GKq9c6HP97dZ/3h2g9fZ aqnBNfyedxtPv6Dt8CimRtTrrI7cA96gFihcj5N+N0B2Z7N16rYXPYsn22kflKue6x LYqk/OwPe/MSeJKln0N3BQI8PqzSxErNkDd8BblKTxRvQZVGVtY8POIneNL3jXNM65 WTYirWYi0Jq6GkiiIJgMig3/VLisF852W0KrsbJ3vi8rgZdjkzDJ9FnB9GIGWjqpxl h5BXlHr5EcmltaXH8iLD+8rnojnGq4+VSuakLuH8kfuFf+Vn+I9QrSGE2Tc98Nszrq uOKWI5j1MLo1LgXk0N9yFSK54GE1gK7B6GFr50cE7pkhYgEZ/zO+A3eAScDvNmXrRD W7zR0boV4JL/Jl6NJ6hk0FCDQ6hVJEXa/rwx86aCDJS9BUhfQ9q1RT3WQZl2j1xHS9 YoMTTFSQ9KJSTU0jvrtyEcLc= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 8E3C737FE3E; Sat, 22 Mar 2025 17:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663398; bh=tEowydEfTXi/uoqWTYnr+SbPnCkFfTGGzISNrbVHb40=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wv6RFb1Jlh4gJLsboQ/N6cdRP2+IyT0kEmGZ4G83Nag7U60E49tqRZTDCBg+YhJFs Eax7NJJCgtAIkKqh41KQd5kEGn4rE0bebGNxO2fON1auIKTugQV8UDSo8RLHa3VMhG HijjpahQryQxIsToYTvPPUKAFEih0TxNujS6eKxW3/OTmA5d41GlJNmm+4BFyApXZz O6r1O/TEQM9oJwo/HUZ1m5Vs05aEQrHan86H7aeTz6hojhjR47thG6/VN7wEMiTp9E AD5OzEaOkZclVXVfoiRjPsA8AHFHmucFLrz6spspFR4AH5RW9ij8a+tAXGy4eAbI7a VV23BbEAVAUT7n9aRboLr+Fi0qlzLEGxt0xbsx3v5o4gxMWFZ/O2kW2URMTajbYxSs AOeHj7lw5DQGylcXhROL0AyzRTwaZjsLcA1EZhcg2g/3lMsv5GWqg8iSx+hMsqPRxh 9VG9lz91wSO4ks+iHnTtCSw198Sz8ndiHEe8U8sSKXWE0+flEUe3esGfPj2FM1ueVL gCJoZdX0zyWVnRUyu0CS46PPreoRPaT9gm6fyel7oR3tRG1l0mpnBd0TsEWetJIBwS ySuCAIrZIPEe2Bpmymb49lAHajYibbQsXC9d2hl30REe7y1CcpK42kF+oPJrMXhGdp ogEoujg7Pg4WeARsiRE4vOwU= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:04 +0100 Message-ID: <14ccb558fb3b3a17abbe4a549156174e16a69977.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add host-name field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: I1231ed47a294ff48b35a301f76ae8e9cbfcd9b95 --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3179d33cb3..2c7ddb2f55 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41154,6 +41154,10 @@ Version Control Services value from gitolite however is @code{1} (written as @code{#t} in this configuration). +@item @code{host-name} (default: @code{#f}) +The host name of this gitolite instance. It is used by the mirroring +feature. + @item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))}) Set the role names allowed to be used by users running the perms command. diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 344538a73e..2b99e8db86 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -61,6 +61,7 @@ (define-module (gnu services version-control) gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys gitolite-rc-file-log-extra + gitolite-rc-file-host-name gitolite-rc-file-roles gitolite-rc-file-enable @@ -255,6 +256,8 @@ (define-record-type* (default "")) (log-extra gitolite-rc-file-log-extra (default #f)) + (host-name gitolite-rc-file-host-name + (default #f)) (roles gitolite-rc-file-roles (default '(("READERS" . 1) ("WRITERS" . 1)))) @@ -273,7 +276,7 @@ (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match-record file ( umask local-code unsafe-pattern git-config-keys log-extra - roles enable) + host-name roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -284,6 +287,9 @@ (define-gexp-compiler (gitolite-rc-file-compiler ,(if log-extra " LOG_EXTRA => 1,\n" "") + ,(if host-name + (simple-format #f " HOSTNAME => \"~A\",\n" host-name) + "") " ROLES => {\n" ,@(map (match-lambda ((role . value) From patchwork Sat Mar 22 17:09:05 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: 40640 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 B8AE627BBEA; Sat, 22 Mar 2025 17:11:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 40B7127BBE2 for ; Sat, 22 Mar 2025 17:11:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000cJ-Uy; Sat, 22 Mar 2025 13:11:15 -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 1tw2NK-0000Zf-Cr for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:13 -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 1tw2NJ-0007lc-Dj; Sat, 22 Mar 2025 13:11:10 -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=4E72H7LQGf5wdlF7d/o1tqHOJNCtrARd0PSpXzwo5AI=; b=RqzphsfIRdij29WuVbDfgDEwEHT3k9OE5I8rZulrHzMgwzzIa2r1IoB9Q2rmaf7CR84d8gtaAb9Ml/bm0FwhZ357g/4aNAK/Yz8P+f8y/g40eTuw9rkY9K7pqKpTmhbfI6QDFh6leDM+58rqgRuTV/dCn/df1VB/RgTiGdY9L6ZbbuDPwXreTuRdk7dJkY9mXV4KsPv6BUebaR9UU371zjvmXCYt04qnFId9zY+NbuMHgeuKq5eQRPMJ3fcGKQAkkoKE4pieckzyiIqRVti3WJPGRtaJTTOCv1k0xyYDZaLHTB5wkuqaQMZpqXh5nyFXV9sgKM4pid8wJePSg3L9Pw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NJ-0007Ji-7z; Sat, 22 Mar 2025 13:11:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 04/13] services: gitolite-rc-file: Add extra-content field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11: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.174266344227901 (code B ref 77186); Sat, 22 Mar 2025 17:11:09 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:42 +0000 Received: from localhost ([127.0.0.1]:45261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mn-0007Ez-W0 for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:40 -0400 Received: from wolfsden.cz ([37.205.8.62]:57544) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MC-00074d-Gg for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:02 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 7D53837F93E; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=oIRywjcbaVxrHIDAWDnpoerUNSaoYkMpJPOKISN8Hs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FSymUdnqWjRoQZEV912+zgx1wADOeuzVfj0VR2WtJa6a2xhLtlno4LWxrqvR1+f++ 0SnSBuAe5NLNT+OQMYOLEeLg1d/KRiU8n9TqL0AT6uRYPSx5G0KBN6HFti3PHGXIsZ wdEGJdAV8c8rcYiwsyZGUBmC6pBeTBb3KXFClIO11B3Y2SK+1E4FcwDtmg72ml5ssN aHOGuaV5WMPsEmjN2nB6+rBQlIIq6JUKcMMODjsYUxCJy1SuwxrFtjNuiNWAJBtWZw zrpBi+799MiXi0bo0SSJBfUPFLXxIeH+mX6eUvgYiqAyJIwMnrmI28AiakLwgv7UDi VN2o/CVh+uCLLCqqfN9Ds7wxMktgMHqERV8bLnrWLUfAGe+530YWsbkul+pxe9o7nL Q1/ooIvXDt9ZsoDp+UPuxa4bX5/4pDU4G+NMEbWZg5aXgH0rkRh0m2BdMiW0e7+h41 g3Pxs8yTi1d3zXvQs9zDj3lJfEdtlCk4G4lnHTOedvabjoqh6GN6D3kmBXmlXvwKz1 k1LY6K7ioebpSfl5z2NlaiFxkRb3vRzxIQ47o5heRcIJoE3mARbyZd/X5JoBA/jd45 7dK0O2aYAoVnWDC5YdKM5fh195H+rVohYfGz30RCvOND/QmnfYPvyeRRYTI6u/vIIH ZMUOn+daMrRpbqomnKIv8TfM= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1B69A38080D; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=oIRywjcbaVxrHIDAWDnpoerUNSaoYkMpJPOKISN8Hs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FSymUdnqWjRoQZEV912+zgx1wADOeuzVfj0VR2WtJa6a2xhLtlno4LWxrqvR1+f++ 0SnSBuAe5NLNT+OQMYOLEeLg1d/KRiU8n9TqL0AT6uRYPSx5G0KBN6HFti3PHGXIsZ wdEGJdAV8c8rcYiwsyZGUBmC6pBeTBb3KXFClIO11B3Y2SK+1E4FcwDtmg72ml5ssN aHOGuaV5WMPsEmjN2nB6+rBQlIIq6JUKcMMODjsYUxCJy1SuwxrFtjNuiNWAJBtWZw zrpBi+799MiXi0bo0SSJBfUPFLXxIeH+mX6eUvgYiqAyJIwMnrmI28AiakLwgv7UDi VN2o/CVh+uCLLCqqfN9Ds7wxMktgMHqERV8bLnrWLUfAGe+530YWsbkul+pxe9o7nL Q1/ooIvXDt9ZsoDp+UPuxa4bX5/4pDU4G+NMEbWZg5aXgH0rkRh0m2BdMiW0e7+h41 g3Pxs8yTi1d3zXvQs9zDj3lJfEdtlCk4G4lnHTOedvabjoqh6GN6D3kmBXmlXvwKz1 k1LY6K7ioebpSfl5z2NlaiFxkRb3vRzxIQ47o5heRcIJoE3mARbyZd/X5JoBA/jd45 7dK0O2aYAoVnWDC5YdKM5fh195H+rVohYfGz30RCvOND/QmnfYPvyeRRYTI6u/vIIH ZMUOn+daMrRpbqomnKIv8TfM= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:05 +0100 Message-ID: <3ae90a9c51dc9508f324eee1d32002a081d93c33.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add extra-content field. (gitolite-rc-file-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: I5082e1d7a27cc746641ba9ec8ae07c703da5f279 --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2c7ddb2f55..e60fef9673 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41164,6 +41164,9 @@ Version Control Services @item @code{enable} (default: @code{'("help" "desc" "info" "perms" "writable" "ssh-authkeys" "git-config" "daemon" "gitweb")}) This setting controls the commands and features to enable within Gitolite. +@item @code{extra-content} (default: @code{""}) +Extra content to add verbatim into the @code{%RC} hash. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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 Sat Mar 22 17:09:06 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: 40646 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 2459D27BBE2; Sat, 22 Mar 2025 17:12:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AC0B127BBEA for ; Sat, 22 Mar 2025 17:12:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000bw-BJ; Sat, 22 Mar 2025 13:11:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0000WJ-KL for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2ND-0007kE-Dn for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=TOUfOZPQcbB1wL/6wYZ78BSlSX+bcQ3zXVFXZo0wtf4=; b=ainADwNkJynw9mQLSQWPWPMSOAW0W3GWqM4188qrJK490u7WgFmqyaVMGZbDAAwar9pjfGTQBMBVA4l2jpbYwb1FQuzaoRGyC0na36LeLmMZu9UQPYboS1zI8x9Jtzth8E9GDINyqKuBPii+xepizoZ7LEihvSDHH7qUsMhCuB3v3Ey/+blztB+Qrl8Ul/KCctVRFShxo2OUu0c2E7rH/EZ6SHc54MV3FZgJFKHGfp1UAOAvBHCcAW5qtiSiWHv1IJ2TOZWQMgovh0Dhrn59KQSwTzyXfgSgMmxhe1S03afaepU4rnv7cKn0m9hEFcGeg2TYc+HBzqVLA3d6QIunAA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2ND-0007I6-8f for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 05/13] services: gitolite-rc-file-compiler: Set mode of the generated file. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17: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.174266341127487 (code B ref 77186); Sat, 22 Mar 2025 17:11:03 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:11 +0000 Received: from localhost ([127.0.0.1]:45231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2ML-00078T-DB for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:10 -0400 Received: from wolfsden.cz ([37.205.8.62]:57556) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MC-00074g-VF for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:02 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id E346637F178; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=UEBwJuOZurZifmXpN0q9UI+ZS7JQCNxgo7kg5deLIos=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=on6rf1M3PB3eN0vuAKzk/Mw9u0Xt3n1wKzEPgJeLLG7xdd7T8SWgpZ3yTSbjyKO8b MMKL5gxYl0In3pMMBu7RHPTb+rPBAgYFyK7csa2h3n+hX/9qjCvkQ2oruSJt8A575Z g7bpe9UndhEJaIHFhAHDXKzSS+173xTsEOkHxjpZWwBuNY61/X8xLDfgm1Lti5SQMy PvCPYI2vS9B1UQqT8gb6+xXW3ZpieRuE+f3TwtiHUfuvONtCpNYIb6ug1UB5n09qNv 2/ki1HiYj0B7z52zlWF5LfyU3QZKLOmg7HiDBjME8ll3bGG7rKHcqn8SrHcaL4hD8H p2HwbJ2HQ89RUY1wk+1tLqbvhPh+A7WfwvU4i6zNl3Pzw9zZyR3XO8Grjpm3Qs9m+5 mmQiB+nW6CJqQqCdD9oO7UAAhM140TL3JICDcmZ9KQEeZX4qO/cQOJVKF4RoOuTob0 oZJGq6KDKmHmfOj6YrsWUUXqwHsxASW8wX9OOCKHuEKBMji/Y4czp2Ew4W4KIcIftr h1+WPXMdOXpGhCiolgoI/vuwjREy3aR4yVF6km3bvSXx4lDi41ChUuFGg3xw4Ybo/A wo3y2lD48kC8jx0jjIErjiMf5/aKer3mW+VvA5vMV+5D92CgA+X1jMiSM/EYDqgMg3 8hN73eIal55+Hgl1dZGNH3KE= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 9491E37E8EC; Sat, 22 Mar 2025 17:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663399; bh=UEBwJuOZurZifmXpN0q9UI+ZS7JQCNxgo7kg5deLIos=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=on6rf1M3PB3eN0vuAKzk/Mw9u0Xt3n1wKzEPgJeLLG7xdd7T8SWgpZ3yTSbjyKO8b MMKL5gxYl0In3pMMBu7RHPTb+rPBAgYFyK7csa2h3n+hX/9qjCvkQ2oruSJt8A575Z g7bpe9UndhEJaIHFhAHDXKzSS+173xTsEOkHxjpZWwBuNY61/X8xLDfgm1Lti5SQMy PvCPYI2vS9B1UQqT8gb6+xXW3ZpieRuE+f3TwtiHUfuvONtCpNYIb6ug1UB5n09qNv 2/ki1HiYj0B7z52zlWF5LfyU3QZKLOmg7HiDBjME8ll3bGG7rKHcqn8SrHcaL4hD8H p2HwbJ2HQ89RUY1wk+1tLqbvhPh+A7WfwvU4i6zNl3Pzw9zZyR3XO8Grjpm3Qs9m+5 mmQiB+nW6CJqQqCdD9oO7UAAhM140TL3JICDcmZ9KQEeZX4qO/cQOJVKF4RoOuTob0 oZJGq6KDKmHmfOj6YrsWUUXqwHsxASW8wX9OOCKHuEKBMji/Y4czp2Ew4W4KIcIftr h1+WPXMdOXpGhCiolgoI/vuwjREy3aR4yVF6km3bvSXx4lDi41ChUuFGg3xw4Ybo/A wo3y2lD48kC8jx0jjIErjiMf5/aKer3mW+VvA5vMV+5D92CgA+X1jMiSM/EYDqgMg3 8hN73eIal55+Hgl1dZGNH3KE= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:06 +0100 Message-ID: <348dd145213047baef23ef6866924de32a7078ee.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 Sat Mar 22 17:09:07 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: 40636 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 23BA227BBE2; Sat, 22 Mar 2025 17:11:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F9FC27BBE9 for ; Sat, 22 Mar 2025 17:11:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NO-0000bF-Hr; Sat, 22 Mar 2025 13:11:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0000WW-Lc for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0007kI-BD for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=VX9zwRG9AbWSFigf+2nDAKhrzYQHLUjoxxAw1SmgTE0=; b=oPJ9BOmW8yo5YO2iu5UFP3pxEdeY7ExTrnMY1Y7bnWp4u/RiamlH/844IbXt474a216ILqyM1UtN3wF07Fx8yhdR5JQz0Kwph/l5MDgZ0idfCGxJSPnbVSQwBxqrXCtP0cteT914sbC0ugcgduRUzwdz5pThjSXlnRd5WS0eVgbmAPnjPjd4nIkrJ1mb6Z/jo0Wq+nv9Y+dRd5l6GM7BP3J3M2dMA75KYs53UlZmBtN4alxFRdZmdnp8KtkBxpsJdn4gKaiKttjhSf8FD2rv5CcwKzskFnXHZFC+jGPEtA90lYySoIokm5A1GFw4/L4knNfyKboUTCoqtCvfaJ0alA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NE-0007IM-5V for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 06/13] services: gitolite-rc-file: Export default value for enable. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11: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.174266342927754 (code B ref 77186); Sat, 22 Mar 2025 17:11:04 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:29 +0000 Received: from localhost ([127.0.0.1]:45245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Me-0007DT-RI for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:29 -0400 Received: from wolfsden.cz ([37.205.8.62]:57566) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2ME-000751-Eo for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:04 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id A67E5380A27; Sat, 22 Mar 2025 17:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663400; bh=jVldggccuakR+igEz1cVhftiIPlxjkfGybvZybbnbC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qHUOPyIFtOqR+WGmpoC73PUklJCflbS3UqVo47rqDIaK5ZJoZUL9y+Zbfcehw6nmd NP49uxb0cOy5CwRpshAFp+eQUlab5HnxTA96h1LZ2wos+YoYevu+dbj+Mhc4N5ij91 j9IYS7NZQy2zv4h0z1aO6WgGXlY2/LaGwS9dY+cuGZQ+5xuuNfrZpFgHHtgbX23tgq x6FaTRVadGWFr56T4thU4fgH83JztsPkJ2KjqUhrFp8fi5/mh2cX7THv5JqiIeWwzC 1hiUFUnYvbGPWBgQxMHI2ycuZV3YxzzD8JHSVWbZZsSYGSL61l/pWPuXVz6HwOiXPA ZSfF8cnWfRE/Tbl95T18M4UQ/rCfBAEgoem+bkw9Mh3C6sy4Bt9Wz/1X/SIyM5YRlW ADaioagNeHhl02yX8IqswCubDqxiKXHEzUGd+eu4OBodxho0zOvKxc8ZPWriWPR6Yz u742WWByZJSmJSMS+Jwo/ZQPtg6WuLrT7xc+UXrTTd/ksgf2MlmOetJhnqkyRfHvVP OQdu1oMzyvhPgdMx7dARUo+99JxslP3uQddi0sRWW3MEd2gV+3DHMG0nQbnF1uxRg6 E3davMX8kT3erfrtiQiXdlzktAZSDkf4nve3PJitQ9SyIHlDR2ttRE/2aT2Yq2RCfe dZ2+g4s//2Pfzq31edvaoChA= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C31B37EA6C; Sat, 22 Mar 2025 17:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663400; bh=jVldggccuakR+igEz1cVhftiIPlxjkfGybvZybbnbC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qHUOPyIFtOqR+WGmpoC73PUklJCflbS3UqVo47rqDIaK5ZJoZUL9y+Zbfcehw6nmd NP49uxb0cOy5CwRpshAFp+eQUlab5HnxTA96h1LZ2wos+YoYevu+dbj+Mhc4N5ij91 j9IYS7NZQy2zv4h0z1aO6WgGXlY2/LaGwS9dY+cuGZQ+5xuuNfrZpFgHHtgbX23tgq x6FaTRVadGWFr56T4thU4fgH83JztsPkJ2KjqUhrFp8fi5/mh2cX7THv5JqiIeWwzC 1hiUFUnYvbGPWBgQxMHI2ycuZV3YxzzD8JHSVWbZZsSYGSL61l/pWPuXVz6HwOiXPA ZSfF8cnWfRE/Tbl95T18M4UQ/rCfBAEgoem+bkw9Mh3C6sy4Bt9Wz/1X/SIyM5YRlW ADaioagNeHhl02yX8IqswCubDqxiKXHEzUGd+eu4OBodxho0zOvKxc8ZPWriWPR6Yz u742WWByZJSmJSMS+Jwo/ZQPtg6WuLrT7xc+UXrTTd/ksgf2MlmOetJhnqkyRfHvVP OQdu1oMzyvhPgdMx7dARUo+99JxslP3uQddi0sRWW3MEd2gV+3DHMG0nQbnF1uxRg6 E3davMX8kT3erfrtiQiXdlzktAZSDkf4nve3PJitQ9SyIHlDR2ttRE/2aT2Yq2RCfe dZ2+g4s//2Pfzq31edvaoChA= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:07 +0100 Message-ID: <07f9cc3ac1ea9ea1eefea82da3c107d9f0792a8e.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 Sat Mar 22 17:09:08 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: 40641 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 ADF0227BBEA; Sat, 22 Mar 2025 17:11:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 30D9627BBE2 for ; Sat, 22 Mar 2025 17:11:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NS-0000fx-0s; Sat, 22 Mar 2025 13:11:18 -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 1tw2NG-0000X4-4i for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NF-0007ke-KR for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11: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=2OlJOpXbzCdo092btpiQRoyzzeuwcGYFggRu3k7cf6o=; b=F2aPkrnd0Emz59ae1VS1EGdIjK4TecL7O7hiI36H/GlpoJUMTPz7qB3MSeZt7G0myBe/7ZsWNm3QDUIhumVd10hu7edvGebBhwvG2wYiJQfT98Gnx1rZr1IKM4bQQRCFpGv3JW5WLL3geX6AD2P1yxYcGRT45Xr34TDiz4A+eYqrrPHh3NNtkCFI8TOOxsg5w/K1wc2PclWxoCPuFQyPwX1+nNASHIDpNG8leC+W2kewgd/XI//KkBHwBNj5cpGEzRMdMLLiPH6Uc/GXrHJdV5FF8m087sDQR+knSE9OtlCM1MJivZaj4vK6gx1n19F07KVb9i4arJu0cKYlCVfiyA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NF-0007Ii-Ep for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 07/13] services: gitolite-service-type: Do not install gitolite package. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266343027769 (code B ref 77186); Sat, 22 Mar 2025 17:11:05 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:30 +0000 Received: from localhost ([127.0.0.1]:45249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mf-0007Di-IR for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:30 -0400 Received: from wolfsden.cz ([37.205.8.62]:57572) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2ME-000752-Eh for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:05 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 10543380464; Sat, 22 Mar 2025 17:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663401; bh=E241oCd5BDBjw8ZaGsQGbGBpjoZqjisRErfytr9pfgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RKFp+oOpsnObGRUxbQXjwJIeZbj0o3QTVGZuti74JDx9eX8FkNLe1uBVlNNA4Rstc A1v6ZhuwdPXQDwqYk2mEoLw1nUTSRzWmt5QypQbW5GrZ8ScC+0kG1jakBtytsOOOcB vbz4Ti5Zs5uEVDTbbd1x2dcmpBTWMt8/X0YM+oUQRQ9BoyieC442Q8yCkrg11teLsA lpBtrleL9471bRqjVRCo7dwygVCdl3kns13MGogflYPMA44hKIcvzXDxeBRrwc8gLd +Snq1xneiyoPCbu81R/yAVcxDG10FdguhV0b8WJEN+54TKPXzNwDMk4vtwksBBR5JT vvg2+iGcnZ2Wy6wNiWzKeKfB+aAcD2Obs7q0p+dD5jCKPxh4ayTS76Aylls5c1QplX aiDqh2tlLXCWV4ACIclBRAgMverka9NC1OZl1ged/Ne/4wE2ryx4JDmgYXRuez/J5h ZBuk7rS4+5f0uC54khhLejCyJmeriaoVwdj8r7YroTFCbpkJVIYrsDxxA0FXQyfHwO Hv6UM6cbetkEg89CX0sj+Tij8szFZYC8At7QDCq0ldgQ0eWtCTHzAX4l5HoeBUwjnl h2PKPyhBFw27l7Fa46VVPinivi6mIEJFryi48E40HAeSbxG0H+VK25KGB8KY1lYXlF 3f48NxMO7vFD9DZmR2RGfjwg= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 98B58380635; Sat, 22 Mar 2025 17:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663400; bh=E241oCd5BDBjw8ZaGsQGbGBpjoZqjisRErfytr9pfgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nsOd6+IsBaAhmYguBsXldLoHM89iJA5SahmixLK6P7OckDHsaFZCsGBB5FXV0EOF8 Wr6Xm6t4MNOWAWgzh8wt6h7ylw6IM484ZtxNlxDcIElHHBm5SRDbN9XLB+c+9167rq Q3is08SgCjIXXQ/Pe6FSaCjB+FF6YTNrVR+Dk/dAhnkoI9OOR2KUbee3ErL0Bj6Vh6 WJAmKKJwtw7GIq+2ChHmb197eQyNxTrGEPZrIzIw7TjdtUsOqSsPECRafvSZJenF87 cKsUBM6+KoPYDS0Y3L8xg318GJMWLNa6wGLrhktaWAPrs7fLTh0m/1sQLjnOoeMZAQ un78wtzN7wppUL7+Jsp0Fij1thRjja025mPA3+GuDvzHuiDiPI/0O4H6zt58NZi1dH eoSiPCyyT9m/nRUNHJU4hFJLfPqtJklTkAQDyruwJlVrIET7DjrlqqDYT87CenDTcG 4NpOoCLNXcUp+VOZypZMvQsuEgqJx15d7+s5JGGzwZoibsEUza6LvVd1foYjpbkaL3 y6uU17KmJTrp5Aj5gJCjFs2XygfMJ7bBDxkc/zxMNi4s2ylDLA1lqFcO5Mb2paGyaB AlwQm15k3Szglmda5vaeauD00hyDYiiQuKhjaSiPWiBEv5gDtGtjd5dGbq6XcdqThR 1R5qsh8aRrfeRoiCPafA5yqk= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:08 +0100 Message-ID: <1e8a46dfc6861ebc9552ee2ca5ee17c6f48ccf34.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 --- v2: Add copyright. gnu/packages/version-control.scm | 6 +++--- gnu/services/version-control.scm | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) -- 2.48.1 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 Sat Mar 22 17:09: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: 40645 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 A973727BBE9; Sat, 22 Mar 2025 17:12:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A562727BBEB for ; Sat, 22 Mar 2025 17:12:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NR-0000fm-W8; Sat, 22 Mar 2025 13:11:18 -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 1tw2NF-0000Wz-AK for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NE-0007kX-W7 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11: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=mZlYjybBisJ++r6BrtVRnzJO1+H7C54rFBXpUBpi3r8=; b=Ntxtn6YYaJKCKdDsyahhId8t0pk+qED8t1c6bGed9T9Jn2lf5YW0EjilYdzNMvatwhyl9CRN4k0y7wBAF2ARIes7ixYexVwOfRY1XbPWG8JMKsp+3D7MjMGyTZbsYGS0ijaXvjkJymQZZbztwOrW9hKoe6ahBJwlEBkvAqeGcUULkHeQL5zhliFjtpuklLige+ggiwF449RVFZ69FDz/8Ia8iwjkKt8KMaDuWzT2jDXVvxlbKrQqOXvrPx5Nmq97WuOWTQa4aquFzPr2PZqCJewX6RBfk/+kHquWtXAWeR+Qphcxm/MmtYiUfAY+75anta6oj2RK4nuvJfpj2anVOQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NE-0007IY-S0 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 08/13] services: gitolite-accounts: Convert to match-record. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11: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.174266342927761 (code B ref 77186); Sat, 22 Mar 2025 17:11:04 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:29 +0000 Received: from localhost ([127.0.0.1]:45247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mf-0007Db-6j for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:29 -0400 Received: from wolfsden.cz ([37.205.8.62]:57586) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2ME-000756-G7 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:04 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 7BDF437F2FA; Sat, 22 Mar 2025 17:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663401; bh=YZ3b4hzMtNlTHn5Xam8xsAWEx4PUkmpgYkfQkYwLMrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Cm5PcCUInifA8BnK12gI21YdtZKi6rSBayGoFmwDMV19H42VjCSL3JedTxCdQFrxH qp8nlfWwPljs0l3xOWT9rfjR/VV9Km1QuuxGFm453r8oY40shU2lxyeAsps9cItGSq JhHuafeHcOBZyToyq0ioIH0QGU4V9W1HkVbkv2QjfBtJA4UVsbphrHFbuN1o3uwKnz UgFsn0KJzufgoyI/80BJq+agKNio3/8+B4Sj4Vuvl3YwHrHZGit5nLz7i+0StJfM4/ wI+JLqAjVGtnOoDGstJaDtbYYbLb0ETaxWgqiaBdZdiCQP4b3HvXv2nrQOGFf7i77Q OCoJhHtGsOUUheqe1rMantIUckquLlM/xkly65qnIu8uamRpz1JkU1zSFFVug+WRKx h8mSYfxrNV/0GKGFoj/Q1dbLNdh+K1+IE8IDKa78NhJzYwLFYIVXOqS7NThsJsxh+G wjgD81Ch7LxPcyj16IfsUZBZxj79ttOf44WiMm1ccb8wfh8W9ABdOrtbxHR8IRkwNE m/MhOU2xUjHfTRvJyz8bTfOwOAsxakFTS2zhvsFzpC/BLIA4SFx2gXkmwOaSXIT3bD 6cMLfCrix5Z6VWjII2grogiNmlv56+Cn9OLTZ2tE8BI1XjmAQhliQyoZ/W5mclc/RX MSAB8yvjid6iyHbJAxsi2v6g= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C1B6380465; Sat, 22 Mar 2025 17:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663401; bh=YZ3b4hzMtNlTHn5Xam8xsAWEx4PUkmpgYkfQkYwLMrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Cm5PcCUInifA8BnK12gI21YdtZKi6rSBayGoFmwDMV19H42VjCSL3JedTxCdQFrxH qp8nlfWwPljs0l3xOWT9rfjR/VV9Km1QuuxGFm453r8oY40shU2lxyeAsps9cItGSq JhHuafeHcOBZyToyq0ioIH0QGU4V9W1HkVbkv2QjfBtJA4UVsbphrHFbuN1o3uwKnz UgFsn0KJzufgoyI/80BJq+agKNio3/8+B4Sj4Vuvl3YwHrHZGit5nLz7i+0StJfM4/ wI+JLqAjVGtnOoDGstJaDtbYYbLb0ETaxWgqiaBdZdiCQP4b3HvXv2nrQOGFf7i77Q OCoJhHtGsOUUheqe1rMantIUckquLlM/xkly65qnIu8uamRpz1JkU1zSFFVug+WRKx h8mSYfxrNV/0GKGFoj/Q1dbLNdh+K1+IE8IDKa78NhJzYwLFYIVXOqS7NThsJsxh+G wjgD81Ch7LxPcyj16IfsUZBZxj79ttOf44WiMm1ccb8wfh8W9ABdOrtbxHR8IRkwNE m/MhOU2xUjHfTRvJyz8bTfOwOAsxakFTS2zhvsFzpC/BLIA4SFx2gXkmwOaSXIT3bD 6cMLfCrix5Z6VWjII2grogiNmlv56+Cn9OLTZ2tE8BI1XjmAQhliQyoZ/W5mclc/RX MSAB8yvjid6iyHbJAxsi2v6g= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:09 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 Sat Mar 22 17:09: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: 40644 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 CB0C727BBEC; Sat, 22 Mar 2025 17:12:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3546727BBE2 for ; Sat, 22 Mar 2025 17:12:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000cH-RQ; Sat, 22 Mar 2025 13:11:15 -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 1tw2NG-0000YA-H8 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2NG-0007kj-7G for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11: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=2cAW6lmMr2U7hBhfTPOQc8OBpf2Fx4cc1lWoJLd63Sc=; b=Kmwqspl1BMgRH24N6b058Qt1/iTjJ8jx4JUiTCAYsv6iO/mdMsegNs8coJbwfv2EF+/V9IZorGufGXkEA4RnIHGkh7Ip33tLKX4CrcXA9zdsTJRJmXOtoCE6QJnuU/Apsn51YcNzfV6XwTCFkpUI54p5jqsHYtWfu9vBl/e2IOAtucFBREYEjMijDOmWtN9nbMVzmbXvnR6mZFjPwnsmYomTis+9OjtVAT6V7gsjY6aB7F2xIIWQfnBwMr1tXuv2D1sQ2mNEuC7JeeLLXfR6tSvY1E1HKCpOFsFmNSmIx0nALGIM1AP71ziPKYeCqoUAraChpGjYLPpYiR9uYnGr2A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NG-0007Ir-0b for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 09/13] services: gitolite-activation: Convert to match-record. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266343027775 (code B ref 77186); Sat, 22 Mar 2025 17:11:05 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:30 +0000 Received: from localhost ([127.0.0.1]:45251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mg-0007Dq-2c for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:30 -0400 Received: from wolfsden.cz ([37.205.8.62]:57590) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MF-00075F-Hc for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:05 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 67BC037EB7C; Sat, 22 Mar 2025 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663402; bh=v8Pnm4vHhClSIvEbarfZCgL9aVhiD0u05YjXi6ctQZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oYYv0GSSxzBJYBgUP/63p1qyo9n4TIxkMTUGgFpLcj+6M7ruQYvacWXc9HjqVBfJj CDmoER9rzTdc2/y/XM7dSUn5kKeymS9xVdMsD29Fe35PVRj5UXHHE1/TVLLR/jmcAa wMCWeKvwTOLR14aj/aEkMJtLe0gxnkqNhUJF87kDlEL+qKb7/jk78MTErbGZOFOc3N qbDpMUVqWEzCD6ryX7aR9WZl+l1N/z0zMZFutxL+0WPa6GkTFexBkpz02uF9a3Uyh8 dz4+rYIp/NEmTIOllMPQMbgOG6VCDscvu8dw3/knGFM0t5gg0x316T6Cfvsa2WZDeY ectdqegTdZ9TQSQoofUztdde/w8zvTiOOblyZZfa/yFGgLnLnP6FxEFtZpgBi3P7Nc Wn/TuzTTWtpQMkCCODPx8hPxMqRApP2qvYC7UUzwleOzMOMPqa8Voeh0efpOMsihrz xSkX2q7S/L5sOOKioM2wlJg8aZNAzI0hCZtRTxY0pmv7AMGMftFfk6kxnGid0o+6/D SmAnIqM4v+Dfp7Z6gMhiWApnPMXIDHcntTj1Ker9cmT6cOqHuTfQ6bt6bhvuaRXusk q2moS6kocaU9vCAb0InwGPmWzBbxr4xmcDbzJkHnJhwtuTkdffDLBX8xy2GVV/3WUU 0tpfKHgxAMbfOMDD+M2xPT3s= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 989C03803D5; Sat, 22 Mar 2025 17:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663401; bh=v8Pnm4vHhClSIvEbarfZCgL9aVhiD0u05YjXi6ctQZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yf4/0UyozEI4+N0MDN2Wknq/MxEI1wY4uAhWnKs4QUxQjh9w59fN/zkN+VCZaGtka Y2IZYZrSJvRrm221zzf4u4Z05nGNZ7pHrwV0U8NuGwJn/yYgdXLib+LDJnpMxCgr8z D/gba9ME4VOb1jEwBQWu3J0smmmuw2arTZTJt1e0fZaVWMwwhrhxSQ7XhrtOGBf5A0 G98FAzKlVr8+AwlkCntFLBUvHe3ELFRGRbM0C9/CYjZEREXg9/rPYor6i7ANP9ps0h +0UuXaTS2D8WySeIgZyizgtQH78py6kMD3BbU/a15EOqJGqNcq3I/Y/lO11bhcaj95 7gtMFzCve3hHhcAdpebVgMF6ZqIAsi47XpEDYQ2ll6XwfVr6VP4iH5MTHnWlo5VV8i q8tDCuRlSf0IRp1sbrZdrLTjGo78wDISiCuXOenIwvO38ld7oGyBk7zi2fMxDbTLmB Qyb/Zo8A6SkmUp9i4KFZMFyQs/Qjhc08XSKgW0ZQOO8znkDRbVHmpKSE0IkifKq1gB 5trxguyFWtwTpGnYp6txVul5tUzmvffiV1FmhRoHro/gAe9UpuMgq3+0k19UgibqWU LzlsBUNLfl7s6w+OBQMJ36L3CDiD6to1H+xo60PAwkmYxj0Ml/c0K0RsrLNHtZAGW2 w53POeZRepXjdxB3HekpNsOs= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:10 +0100 Message-ID: <708f8aad56c7277beb422cfd1d4cc45a0de233ce.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (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 Sat Mar 22 17:09: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: 40642 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 1DC6927BBEA; Sat, 22 Mar 2025 17:12:02 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7F40627BBE2 for ; Sat, 22 Mar 2025 17:12:01 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NS-0000gZ-AC; Sat, 22 Mar 2025 13:11:18 -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 1tw2NG-0000Yc-UX for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:10 -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 1tw2NG-0007kq-JX; Sat, 22 Mar 2025 13:11: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=n7zA+XkQ2dCtTf5YWAF1NS7H2OwbIwBn6U5+qDp8GHU=; b=JabdLhwQpDZKdwwuFBl9kTwJWuqTCge9Jo9U4ix1tqYBDBV1m7dWxe+5cFOH5Q43Rssrp6zEEO6IfDekMbdOxAoz5F0eplldMKMl/6dee7W4eDfdpDJSHDfOaRcrsMBoxfhV/ZSLk4qFXoF8MGjD4/hmXLxMQv6nKTk2yk6Pf5nF/GcTWP7mFob/qsu+TLzx8m7tDNN801jSm28SU1OSHnt4yGm7jk9z0izychKLNkWjNF8nO/PiS1lhwmVIjmcQuUw2prSJMP2Aw76V1L1R1b+jp+1Bja/HNzGkrQhg7PV2PUcDZuJcrkZdl+hrl/GY9juNcWsA/TOtekstBxoW8w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NG-0007Iy-F7; Sat, 22 Mar 2025 13:11:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 10/13] services: Add gitolite-git-configuration. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11: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.174266343527789 (code B ref 77186); Sat, 22 Mar 2025 17:11:06 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:35 +0000 Received: from localhost ([127.0.0.1]:45253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mk-0007E7-NO for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:35 -0400 Received: from wolfsden.cz ([37.205.8.62]:57594) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MG-00075g-92 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:06 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 2FDE837EA72; Sat, 22 Mar 2025 17:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663403; bh=rpAQNu5ecFY2+lEhgADPCwpqeCDjPDVaiFRFeSO5oCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bLqgid8bGsgmwziTEqft5oAH8fdKdXHpAg08DZ5x7eMxwuVkHNX8H/f9G6r0Yy1Vc wHkdSCeAvkNbNCkZtZ+iQfRpGvDyAmAxs2eJN0QVuafX0IthdMLBQF3JxnuW4MMQ9N JizakS4s/57i0rGy7mxH1P3hMQ+fi42Or20oIQMUpE4fs1czyGUeVN2bIBNxH3Rybs sCVrVBBMy9lg9ppBop2MTmWHcdQuw2JEB7LMSMSS2N96CB3s5xUv8WliTUlYstAby/ uoVk+ThjOHLrFzSEJjjfZ59JgLQVA6X6wQ6O7ck2lI/7aD5tefsz3DGPQL9BVPREkt i+BL9I5DqhwIcOlHO0rwXdnu8sZ7fQbnxdTlKnZraPoqQuCX0X7xQL0VKNOEEUxIKz LDGQnEB1GNj/RLbNqYzntJr+kYJZ8ikfxNBY4FDD0dH6fZ1GxiAdAHm8aQVAqaSSR9 kJLosrwVjz3CimUVIY3K/UDmDhvaOCpK10eio4vwqLmFZO8T1fT+g420UayTkveWyW WIkH8zIZTOHZ0MJ/Q6Byw907F6mSCWaMjrKdFsmb9jSXTMdWSo7cBwT6Zz2DpoLXF8 tGEBmCBJnsOJDqCDFib+moInE7GIGYGwD+DTcOY8hGLplC+zk8b6M487BDb1fXWdG0 /HJCvJJRzMO+TO17gUHT/ULA= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 2BE8E37F5CD; Sat, 22 Mar 2025 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663402; bh=rpAQNu5ecFY2+lEhgADPCwpqeCDjPDVaiFRFeSO5oCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BJPHpAkR2cbbQLiVutK0OybuPjX3GSmd3o43JOC7q/eTUOh21DwG37nfcjxQM9Uma ayhBpOgzl9kbT4Wsod0/DeoqV9h+bpctKF0JqGaTj+nV4NKQNwyqJ+AwVjW8nJhvBQ gwpJuWpdqVl/UuR87HRQVxMpakWhI+VO/+8cgSIbyZPz1Pp15EldTubw/787J8SiVE S50rG8h+6GACjSEUhbHEynS0Lce7yRHbK76ACKLg0foy/g4lApnX4p3BVozseN+7rv XIvQpmHvvDSLyxKIklw7Jj1S/iSOmODktOwh8DyjeoX12WCWj9yIME6RB2rC7aEBO/ 0z2Db+KEbITsbk4gBMxp6SSQ+UNkH3GPyP7DqQlnKqvvmeH+FQ+d2KZ2sqdz010seE 3pN3fLCaja8NpEPgBW6w3p3km0dfhzbMK1cD79Ktnua1kzvoQeTiXM+IzBppneRSs2 Z+42uvpDiNtdIHIsA9udkdOqOzW3WEvdYPh7zBnPrSkT7tmL2UnGZO4MRi+PKYWEJP wkd+W7aI7kIcfFoQpnyHmc9FC1G1fQG1iWP7f58azmkDRsLcj6kKbvEKE//jziNZS3 riGDhR3B72M86vuP4UOBpJnTxnVYY75y1Q/JB7whT9V/aYbMvfg67mISiehtiU0j6U RTsZbuv/mZiws+k2VZknJg4k= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:11 +0100 Message-ID: <7e43f73deff0dc29060e6f0dfe1c042e3d956a3f.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches In preparation for further customizability of the git configuration, extract the current setup into a separate record type. * gnu/services/version-control.scm (): New record type. (gitolite-git-configuration-compiler): And gexp compiler for it. (): Add git-config field. (gitolite-activation): Use it. * doc/guix.texi (Version Control Services): Document both. Change-Id: I7658698a93f938f62f41a4fa45b72de1eeb14414 --- doc/guix.texi | 17 +++++++++++++++ gnu/services/version-control.scm | 37 ++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e60fef9673..e584b072e1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41095,6 +41095,10 @@ Version Control Services A ``file-like'' object (@pxref{G-Expressions, file-like objects}), representing the configuration for Gitolite. +@item @code{git-config} (default: @code{(gitolite-git-configuration)}) +A ``file-like'' object (@pxref{G-Expressions, file-like objects}), +representing the git configuration for Gitolite. + @item @code{admin-pubkey} (default: @code{#f}) A ``file-like'' object (@pxref{G-Expressions, file-like objects}) used to setup Gitolite. This will be inserted in to the @file{keydir} directory @@ -41170,6 +41174,19 @@ Version Control Services @end table @end deftp +@deftp {Data Type} gitolite-git-configuration +Data type representing the git configuration file for gitolite. + +@table @asis +@item @code{name} (default: @code{"GNU GNU"}) +User name used for commits (e.g. during setting up the admin +repository). + +@item @code{email} (default: @code{"guix@@localhost"}) +Email used for commits (e.g. during setting up the admin repository). + +@end table +@end deftp @subsubheading Gitile Service diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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 Sat Mar 22 17:09: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: 40648 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 4F7CB27BBE9; Sat, 22 Mar 2025 17:12:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E42D627BBE2 for ; Sat, 22 Mar 2025 17:12:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000cF-M7; Sat, 22 Mar 2025 13:11:15 -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 1tw2NI-0000ZM-TV for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:10 -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 1tw2NI-0007lU-It; Sat, 22 Mar 2025 13:11: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=kZHECjMn7n4qcLn/i+FC553o9xdX0OBpeUsjMQtJ7Dg=; b=kpuvy8nscYEl0gzhp2QbomMVhHR83JLi2ZK7fI64qIIJHU8ny0bGlkCByHrdbRQ32+UUwFg4hKuSijQfNf6GXFb31HVrqVolqSIg3ykGtvw1bStsq1/2D6nUTEZOTDOa131crA8Swx4+7gfXbN0aX6TIQ0rTQ85LJoIxCto1cUhNVZRB4sKrAXG+6CKbI/AD4LhYnqm30G09fsw28rMb5ctwMfpvw2ill0ZW9CDL3ZUnzAAyREGtNFAyQkI2CeMhKCHMxq0ONBq54jsrXBXiKGwp4DAC2fBQm/utBV0s2fSjj5MwNJiGe8/SsE3EJDWtpQAZOanonaxxKmrE2OHwIA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NI-0007JU-DW; Sat, 22 Mar 2025 13:11:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 11/13] services: gitolite-git-configuration: Add default-branch field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11: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.174266343827840 (code B ref 77186); Sat, 22 Mar 2025 17:11:08 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:38 +0000 Received: from localhost ([127.0.0.1]:45259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mm-0007EP-3e for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:37 -0400 Received: from wolfsden.cz ([37.205.8.62]:57596) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MJ-00075n-E6 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:09 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 6283837EA76; Sat, 22 Mar 2025 17:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663403; bh=BV+BrEyDw5lVblAZ/zMBfsNslphXhyB22RcUeRl+E2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WeEE8dzvEupOwJYXIPd/rLkg2qL9nP0BujRH/dUK2UIqOU7WK3IIgsbo/rlaWhpgr 2uCc0uRMxmEmK2/8F8LwJ63Pb0YBr0V9Pe+t+7kDruLEw2oPU9IeROd2JfQ8DS6dcH 4VGstfmCQYStcUP0h5th6H4Vd9n5xU5+npAJygRwsdEhg/PB5kAr9wjLr/53/7njWX DQrxfzXuh70/OvoO5A7cwoa3/jBgRIGyujOluuqMXzT8WqLSVgsYVRyjXL5dRNeoQR JyXlE9CCiGPAdsCXgXePFmYBWcxxo4vj/yEhqPFTgn2Ydlm355mGC31ZbKa0srKMDu g+DLrq3JAD18DB+7Ixu8crv2kLwgd/HJa2sHsL1X0fOD0ay46PzcQ0gvnXAJdFpfn7 mg4p3gtIrh9d51qTU7t6iPtw3mfuy45k+BGn4cd7g3MEAk4lrZKTllNMQ2DXN5WDqZ 9zrWwfwPqrhX7vQuiD5iYjisr0wdS8Rm4nGlZAJPuTmErazB5BKgEyiRSbbs5U6+3X UN/AgCBA/CkLe7g1MDDz46j6f50zZuVWP9pCWlyOZZBQjnXxoCErAPjwKMqeqnu5ey POy7MRC91G9UK4l/1Nt4iXcdSvqAESr3TmYn85d99y3dBr7pdRHETJZKdXz/BL8ukX cy1w7BvdiSPtjoXcZ19ROuaM= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id B253738078F; Sat, 22 Mar 2025 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663402; bh=BV+BrEyDw5lVblAZ/zMBfsNslphXhyB22RcUeRl+E2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=W/BT9v6MOdIQETx9zvhtGu4sLGMv9g6UrRsgODh72Y/bEvgW76SwLwpkIk7S/Y+/x twh/EE48zqvxJOgOILrVxqlJOi0dyrvs7FQEyI0oEcLFDdtD7p5jwOm2Bj3gsDVwub /57dzDcQRHm0SRZRWAkHqDa0y6MENN5lE/+tIin4xxCHTxy0/S/Ep/nRQSgJ4P9EA7 kz0NCtYbIZWLXr1jPTdWgdhdX09WucJaezMInE4trf85hth2FHxmD7BoJZSLs3EiIK DIO7xg0PyHKiuSQrggB4rkAnU8dtctLaiHJSYaFAtB7jFDFlTmquWFduNCCeOCwfuL rFccdwBON3C0Peu1PaTrBr6CMxL8KHd/qfIhHca0b7Qxm2+weDlZlP8izEGL/etqpU pn7sEp12ZR9ZDRlpOCOJmdUZAIeoo2Chf8txrffERFZ3/Gzmvjt8wwk6H1k4uNb2fv GBVoBdee4EEsJ+B3GyK4nffaTGNanYYFS20egdc0roeVl+wFNOEYUxAUMznL1hWKuc /mBL2akH6BI+9TwKzEkWyfy/kAZKrB9GeLt92r/iyGd8GlTAf2tkerknVY4yYpja+U cz+UXuNpUWnKjIEnubqgODSTNXDYLG9BZwjpGcfu8jsBcKDhA+dL6wA6qbpikVIMKh K/aay2UygcVwfhxW1zjsxyxI= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:12 +0100 Message-ID: <871ecd2df2e7632bf18134424874038074cb8065.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add default-branch field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e584b072e1..3332813a02 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41185,6 +41185,10 @@ Version Control Services @item @code{email} (default: @code{"guix@@localhost"}) Email used for commits (e.g. during setting up the admin repository). +@item @code{default-branch} (default: @code{#f}) +If true, set the @code{init.defaultBranch} option to that value. Common +values are @code{"master"} and @code{"main"}. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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 Sat Mar 22 17:09:13 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: 40647 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 F15C027BBEA; Sat, 22 Mar 2025 17:12:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 895EC27BBE2 for ; Sat, 22 Mar 2025 17:12:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000cD-Hh; Sat, 22 Mar 2025 13:11:15 -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 1tw2NI-0000ZK-9q for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:10 -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 1tw2NH-0007lA-UF; Sat, 22 Mar 2025 13:11: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=6z2XZc894DzciQGQM3SCRcUY3lwBDdt9BXQxnGfDSog=; b=hM4p+8Arvj9aBihSF1edxYaSeoqZ4+pWWuZpWLoN6sabB29MFXz+4nxXyUIRi/TPPybSSRRfKWyz07MdcuLYlMiaRM80UKxz8FwZpQ7bcldIC62jZri1SoU7iZnOCnif5sj6xTKlPGnqAM4mTo4MqgqzoAOimQL7LWC0XQ+wZDZ0/d70Qow6eLDeKEtWlaZpt1juRhXAYQSOVTrFmFnHDAmkEqzqj8zPipd90YNOzoXCR9tu1s1BAexkaXA2EUVsUjpjFNrsAKbxSvvL6i7TpuFuBZZKB/jZNo1dBEWS/mVa0nMOg7yJYqI/Aie5H7cAR+oALVDD68Vy55jDCLSkyA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NH-0007JJ-Or; Sat, 22 Mar 2025 13:11:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 12/13] services: gitolite-git-configuration: Add receive-fsck-objects field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266343627804 (code B ref 77186); Sat, 22 Mar 2025 17:11:07 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:36 +0000 Received: from localhost ([127.0.0.1]:45257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Ml-0007EJ-Ly for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:36 -0400 Received: from wolfsden.cz ([37.205.8.62]:54884) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MH-000767-Mb for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:07 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9879A380AAA; Sat, 22 Mar 2025 17:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663404; bh=Q+5XCEUSdpYhaLd7jogHtdqM+S8oyZoJsYDXaa0tjKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=w7tr5p55rVZANDujGjy5QGoDAkkEbD/WARwnbT6+ggZSSl01DIOzoI0WWFA6GwQKl H0lNWMwoE35xUIzxTXIkfhROENfTLWMVTMhnB/Tp4TKxz8SUzzo+HtrdtWw52B4bQP VR7PbsaW2dcNEbCaHve7pEF2ihrserxG6iVtZh4mldeRJzv5bXIOnRYluEkeYvRnkV aHJMK8DcisfgcKE4toLW90pGQ0AQpCEnkTuXikZq2B4zh5+J/DSSq0XS0blIoyp4PJ zzT8dYWEp+QQ8ji6M0dTREHYHF0/xQyJjHGF8yEngpw4BpsI7Cq5vF38m/7UBc4Vx7 XU1iWc6WdU7yflUgr1OlZ1B8ztKlmxQbOG8fXD+4g7KI2F95Xi3khuaWQe2fGHaC+7 uYZCMv3L70EpVoypxKv8CNtRMDj1MW/yTaK6wowitjU3HqQWJj7R1GFNP2IexQo4zb AKk8aWCkt+wZzsb9ZlhBQWkyCDt1g59WBDlPeWc/uQ57DmtHk5bdyOW3sJf8rNa9Ov eNyCgPCqeMiBjj4aFiDVlZlcGvkZnbLTyNn/R2ybAliErkDNahPlgoQUFGXwmxQuvR RlIOHKWA+arPN555XDlccYN2wBsD+y3wTR/wx652SjTwTN5FBnBmWx9cVwj5n2BObo TJcEhCFIlL1HcQXC4eCl7FRU= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 5439037EA74; Sat, 22 Mar 2025 17:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663403; bh=Q+5XCEUSdpYhaLd7jogHtdqM+S8oyZoJsYDXaa0tjKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OB8SplhRray3mm8ArsffIqdX+WwFblZWpl9WCVfUIEoCJVxTiriIkHHRJN5nj4yBI kXuqc2cC2oFbYNjAt7Wci+eQ55EQe0D22blgfoiol9Xml68gJl+aYLw0SbRDkfNQWM UHYnBN+Gx0ommQQXDebxVy6sKex8PaDDBvdlstU4RAfp6V5rBJwu9iGAkdP4pDUbZN IjXNk/T2jlrYiMrEFhxIxPcVk86WABYYxDLczFVcyupAcdTLZUSC706/DgzUuFEACd BmoRWXTgOLe5c1YalgDfrULG073rRyeDLSUFCRqpsFg3rJkhhwTnoH6g4rHJArUPlV EJS+BQqeyJ60+dyrJvv5FvmCNIKqXjwusXLOBs9lcQV71QAFr7R/cD416r4JkLVd0K rr6IGLLt2uLkaMkos2hotOQ47s/Ez3ahVRwB12zS19RT5nMETcGz2UrOQUh4qB5AP7 JcHbk2h7kZsRxwlmqmWl0KE9AMJUAT0RnuNNcUe0i00whSTAru7KDnYfZer01Ywp6i rbgDPxr6zYddgxG86y/T2iNqoxsUi0jS+DIeEf0gDKhUA6FQk6C0qvX9YNS47XTqER uL+01nU+/qsSfmYCd+BZ4dK0FfWINB/x9fe4wWDZsGrS3NMhgf9YsRPt6u0wANZKUc r9X8B3f84OOTZeOkhBvqCqRc= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:13 +0100 Message-ID: <052ce86b6068112d360d5869adc1455b92ca4157.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add receive-fsck-objects field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3332813a02..f8fa1ab3bd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41189,6 +41189,9 @@ Version Control Services If true, set the @code{init.defaultBranch} option to that value. Common values are @code{"master"} and @code{"main"}. +@item @code{receive-fsck-objects} (default: @code{#f}) +If it is set to true, git-receive-pack will check all received objects. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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 Sat Mar 22 17:09: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: 40639 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 A9E4527BBEA; Sat, 22 Mar 2025 17:11:51 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 34B5827BBE2 for ; Sat, 22 Mar 2025 17:11:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NT-0000iO-MP; Sat, 22 Mar 2025 13:11:19 -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 1tw2NH-0000ZJ-OU for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:10 -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 1tw2NH-0007l2-8b; Sat, 22 Mar 2025 13:11: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=a/L4ZGZvd6ccsgJSXOcZ/NacmhLAC3aFqNfRq7tGTLw=; b=NYJcjMKOx0hb8WMYNAOytUptvAp+dbMYW47kRQe023JxziQ4ofp+HfQ00syDxlY5Ctjah+pHXmeJXJgF6OJ5LWPAkxsf9CCkF9/ul6WL/jXJ/InmxLC8TtTFF9i68CyfbeK2ExhzXFnGj+rusadXklN0VyvAXiEyPNe5tWiZVn1bzM5pFseUE8KSavCPzY0OEUA9N2lUTz26mxlLz6UZ4y7K51yFxJ4HV5ks533fXQQ4UQhGROFoqMjnbbs/nTdhHCCHfitXrFND5BRpDIdgxxrAyATzMm+Keg7GLmBpyWl9BodQexEXx9ftg4wATtpt+VV1+54hF+2pSWFYkJUscA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NH-0007J9-3M; Sat, 22 Mar 2025 13:11:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 13/13] services: gitolite-git-configuration: Add extra-content field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266343527797 (code B ref 77186); Sat, 22 Mar 2025 17:11:07 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:35 +0000 Received: from localhost ([127.0.0.1]:45255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Ml-0007EB-8V for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:35 -0400 Received: from wolfsden.cz ([37.205.8.62]:54878) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MH-000762-BT for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:07 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 504B637F47F; Sat, 22 Mar 2025 17:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663404; bh=aAAGsqvP4Bcb/PVdVVns/gkcyTE8Zf9QSWJ+7Bo5Enw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tHv4oLA0lWCYR9g8AykBQt8si+HlI6GZ0rggooIl3A0IkGSBSRIV1HeCdmuOYhlAY YwoRkmVhBkYlKaHmrMnqQ04fj+RzzVDUkadLGBsO5vNGjx1gcUOYARMH5lj+cJlXxO NFY4v9OYe4dl12bvG1GdRY+Uzc4FMO27o1gH/v1OesN/31JtBBijFKdHndDQV6D3NH +r9ICGqtFt3bilqk/h5WR9X9WkBKprj74Wth8WSDZlxquJKlG0nUAsQaEkPYXMopWi CyJi6kzQcGRwhnIgL7/qS71Imi0hr4a+j9G3AmAlNhQ5nxQDzNFEqwv3oSr6Fuy0qW sqa6lve6GT7gn9rcKutk0idSVvihJEK9+NLA7s9DjFrzol8RsPceekreu9PmjcQtCn zB4ddMnwThMe8x96bLNw3PLMOyBc//wN55Tj745H1BGqoLZHeJmgcKLDAuQPwKR19t LQr6COO9boNbfJs7Eyy2NLdeWlW143mby/kZSqZ4qJIGL69BFW5/egbxuEWUEXt2jC hFxRGHATxMpbW+HcT6+Rg+00sdbmwJVR7hhrXwBRnS+5I/cTFux0b3F7UwdQtZHoxu C+mxVVLlHHmY6fZirSmXSapD374Jrb620cWOOOSozJkxErUX7wMy3qhPD6pQuL3QHp kgiByLa0bXqRSffPmjWyCIfw= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id DA39F380E85; Sat, 22 Mar 2025 17:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663403; bh=aAAGsqvP4Bcb/PVdVVns/gkcyTE8Zf9QSWJ+7Bo5Enw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WYAhCwKy2aiojXoaLds6uuHyddHeXfmb9RGpAiOEj3ZmCXhFWmJroBeis1zKWF6Hc lLPG7Xom3rjIyhmQj8egql9t2BbQ6T/SLfzFBJmtva583RA0vnOo3oxQgeLnjJLpbf ftf3L+beUkqED/ZBGRP34cIkTK/LuDIHODr7tcWnwQZKU6TipwpnpAPmBMe97SBEjQ yF2Cf2K0k6PKkkVnoED//Dmz8rsxhGuhgld36aMQJknimsJa922TBEOFZwLQbD+Uso liVGc0hicDTvyNg0vqvPs5UCGfuJcrAb04ATQ4h6t0qKFeoHP6C+NriHiapmPxXKmI NatjkW8pqky8U5g0YwXSGyCffP+SdlCMpZGCgNFvMU2bD29xzvuqAaQBgv19PH8qLC 8jhF+7Ei5vS94U2wt5sdJzD883665PwMh92GxVl8URbYsjf8S60pcytySaElY0lloi mNfRWyygSSOzwxTqp8lzTLQhRMAxiFR8E/3Q1P8bDMw14RrWDL/xgG95lQgMsvROtg J2glVKWbOvctEdG7ZV8KpDIobf5FqP/Eh9m1cbT/Wt9dJ5aY9q6QVdOvMzcQ7zDJj4 vL376uDF0qoS8qm46Delak0/u2cvGBNRUertSAGw+N9q6EMA7M3I9VuGOSDgIkmCon t3Aj38VPPg7iV/XVT599U5HQ= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:14 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add extra-content field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 3 +++ gnu/services/version-control.scm | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f8fa1ab3bd..311564c1d2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41192,6 +41192,9 @@ Version Control Services @item @code{receive-fsck-objects} (default: @code{#f}) If it is set to true, git-receive-pack will check all received objects. +@item @code{extra-content} (default: @code{""}) +Extra content to add verbatim into the git configuration file. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 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