From patchwork Mon Mar 31 22:10:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 41101 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5A07327BBEA; Mon, 31 Mar 2025 23:13:02 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D892027BBE2 for ; Mon, 31 Mar 2025 23:13:01 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNMw-0000IT-2M; Mon, 31 Mar 2025 18:12:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzNMT-0000C8-8c for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzNMR-0006yB-0V for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=whBF69Q7QbrIqpKYXqbtm4ROrPYRGUG/rswYck43c0I=; b=TlPlpWE3orULDjwhrAaQr47YmbBT2Nuwwrt40++cfBBB53bl2IWz/xkjssTobvi3cO0WUcHD8d+ZT1lzw6ZNNQCXqRiJWzL9R8+vsqr9pdgZufBUvloFTMB1MZk1v8Ovs8ZHlQZ9/YV6Hgi2+BhdoTjAfS+9lidhMdEL60Mbq0moOaVOXnPLoKfLGx39yr/LWQIOXdKHkXLOZ5ndS3vGyFCBhJtN1oghH0lnVp9zqxppsBNe4jIH3kODTQyoQsYWbzWTLUYbJNGp2cVi2xSmctaV524Xf66NvVcHNi7QMg1iuVNIkMNBpq7oLGODFwyIV2FJ9nU99pTUiOLkEQPrmQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMQ-0000ab-Qa for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 01/14] services: gitolite-rc-file-compiler: Switch to match-record. References: In-Reply-To: Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Mar 2025 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.17434590681929 (code B ref 77186); Mon, 31 Mar 2025 22:12:02 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:08 +0000 Received: from localhost ([127.0.0.1]:43348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLX-0000Ux-F0 for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:08 -0400 Received: from wolfsden.cz ([37.205.8.62]:47516) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL2-0000Pa-1I for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:39 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 805B93790C0; Mon, 31 Mar 2025 22:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459033; bh=fTVYanPx0JV3Pmcrc+mNFWmdr13hjxPtyMzTgEqUqPY=; h=From:To:Cc:Subject:Date; b=sPBxtD8TQ56EVX6pqgltgAsmCb3DknVGjySqgga6r2po5Q0QBT4/DL88mC7U6T4qi xHt6G5pVlMFnSw/rS/Q/BE08p5a0txqUmWNuHgw6PXNIQA43QYbFEl0+Xk67HbMfic wAtsvS3CU4cYWezrE120iaLXK52J3/tKH18A4vAN/PHSRUPkviA9mj1ScyA/5uPoaf 9j3GIYIB9b+8WJVK8WaaxdhVFC6oe0SQZEeAhAMbjiAZ9Hm/6E6bitkDkI/GQ5VwGz YQ47DMFnM2BahN62183m/2vkvGywxFTsh5gpd0d+XA8OTlZv9qopnPx3lRzoIcz1hl oa14RLxBPT+fDGH1EI4UKM3QUYwtJ6TJ8ddr3BqqH23pMLPrIfvDOeca8lhL4eFwhq zznt3RCRkyvtdRTT70o73Bzeh4AcpyVYcWuKA3HS3QropYuJv1JiuLupeiD5xf9CQu rHMgWqPCdGWIImj3jnnW6hKtGMa0sAURUxqQoiW9v5INP08AICebsu+HqfL+sA/SfX WwQFedEgZrTvRJZQaVDeq+QKD2ULDYxTgSvc8wmVeOQrTuadJwpZ+MRe80zC5eCPlU 7jwkdTFy5ezOdQzl+93vtWPeaywLt1jYoD5a/Dhmc6vbGU2A1vtT7RSqAAyGLLlIlH ZPE2RbSy56Ryfo/QricCftkQ= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 101F6379527; Mon, 31 Mar 2025 22:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459033; bh=fTVYanPx0JV3Pmcrc+mNFWmdr13hjxPtyMzTgEqUqPY=; h=From:To:Cc:Subject:Date; b=sPBxtD8TQ56EVX6pqgltgAsmCb3DknVGjySqgga6r2po5Q0QBT4/DL88mC7U6T4qi xHt6G5pVlMFnSw/rS/Q/BE08p5a0txqUmWNuHgw6PXNIQA43QYbFEl0+Xk67HbMfic wAtsvS3CU4cYWezrE120iaLXK52J3/tKH18A4vAN/PHSRUPkviA9mj1ScyA/5uPoaf 9j3GIYIB9b+8WJVK8WaaxdhVFC6oe0SQZEeAhAMbjiAZ9Hm/6E6bitkDkI/GQ5VwGz YQ47DMFnM2BahN62183m/2vkvGywxFTsh5gpd0d+XA8OTlZv9qopnPx3lRzoIcz1hl oa14RLxBPT+fDGH1EI4UKM3QUYwtJ6TJ8ddr3BqqH23pMLPrIfvDOeca8lhL4eFwhq zznt3RCRkyvtdRTT70o73Bzeh4AcpyVYcWuKA3HS3QropYuJv1JiuLupeiD5xf9CQu rHMgWqPCdGWIImj3jnnW6hKtGMa0sAURUxqQoiW9v5INP08AICebsu+HqfL+sA/SfX WwQFedEgZrTvRJZQaVDeq+QKD2ULDYxTgSvc8wmVeOQrTuadJwpZ+MRe80zC5eCPlU 7jwkdTFy5ezOdQzl+93vtWPeaywLt1jYoD5a/Dhmc6vbGU2A1vtT7RSqAAyGLLlIlH ZPE2RbSy56Ryfo/QricCftkQ= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:07 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (gitolite-rc-file-compiler): Use match-record instead of match with $. Change-Id: Ia2f4985e921aee5f8859d1858f7c186b707d7a36 --- gnu/services/version-control.scm | 55 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 06b6ff224d..f5558e9197 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2018 Christopher Baines ;;; Copyright © 2021 Julien Lepiller +;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -267,33 +268,33 @@ (define-record-type* (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) - (match file - (($ umask local-code unsafe-pattern git-config-keys roles enable) - (apply text-file* "gitolite.rc" - `("%RC = (\n" - " UMASK => " ,(format #f "~4,'0o" umask) ",\n" - " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" - ,(if local-code - (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) - "") - " ROLES => {\n" - ,@(map (match-lambda - ((role . value) - (simple-format #f " ~A => ~A,\n" role value))) - roles) - " },\n" - "\n" - " ENABLE => [\n" - ,@(map (lambda (value) - (simple-format #f " '~A',\n" value)) - enable) - " ],\n" - ");\n" - "\n" - ,(if unsafe-pattern - (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") - "") - "1;\n"))))) + (match-record file + (umask local-code unsafe-pattern git-config-keys roles enable) + (apply text-file* "gitolite.rc" + `("%RC = (\n" + " UMASK => " ,(format #f "~4,'0o" umask) ",\n" + " GIT_CONFIG_KEYS => '" ,git-config-keys "',\n" + ,(if local-code + (simple-format #f " LOCAL_CODE => \"~A\",\n" local-code) + "") + " ROLES => {\n" + ,@(map (match-lambda + ((role . value) + (simple-format #f " ~A => ~A,\n" role value))) + roles) + " },\n" + "\n" + " ENABLE => [\n" + ,@(map (lambda (value) + (simple-format #f " '~A',\n" value)) + enable) + " ],\n" + ");\n" + "\n" + ,(if unsafe-pattern + (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") + "") + "1;\n")))) (define-record-type* gitolite-configuration make-gitolite-configuration