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