From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +Jc3GuLpY2NKggAAbAwnHQ (envelope-from ) for ; Thu, 03 Nov 2022 17:18:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CCQ8GuLpY2OxYwEA9RJhRA (envelope-from ) for ; Thu, 03 Nov 2022 17:18:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0AC231F222 for ; Thu, 3 Nov 2022 17:18:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqcuq-0000vL-ED; Thu, 03 Nov 2022 12:18:06 -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 1oqctr-0000Wm-9q for guix-patches@gnu.org; Thu, 03 Nov 2022 12:17:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqctq-00082q-Ka for guix-patches@gnu.org; Thu, 03 Nov 2022 12:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqctq-000348-Dw for guix-patches@gnu.org; Thu, 03 Nov 2022 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58989] [PATCH] services: gitolite: Add local-code configuration option. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Nov 2022 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58989@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166749217411714 (code B ref -1); Thu, 03 Nov 2022 16:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Nov 2022 16:16:14 +0000 Received: from localhost ([127.0.0.1]:50122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqct4-00032s-9X for submit@debbugs.gnu.org; Thu, 03 Nov 2022 12:16:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:50354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqcsz-00032e-Ha for submit@debbugs.gnu.org; Thu, 03 Nov 2022 12:16:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqcsr-0008F7-SL for guix-patches@gnu.org; Thu, 03 Nov 2022 12:16:03 -0400 Received: from mail.mmer.org ([178.22.65.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqcsq-0007rq-2D for guix-patches@gnu.org; Thu, 03 Nov 2022 12:16:01 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id d9232543 for ; Thu, 3 Nov 2022 16:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=V2QJMRn02h61z9Q/a0kQ+qw1OgLlZlf3/zyEwALVEz0=; b=BTeE iN41NVaehBiYjT8bOkYk6WpQo/mljg01N1GLW6N8es63vfBx30sHB7Q6rM8wb8Sx tEx824YNKr5okwL8t1apWo73CPXTQ/Jf6EdjxBjo4f9Hv2OTBSOgANw872jNmRVN eYZmVXR1GuMK3yrqC9Za7eF8dQHQostZU6exOrw= Received: from delta (j74210.upc-j.chello.nl [24.132.74.210]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 14f2a8ec (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Thu, 3 Nov 2022 16:15:54 +0000 (UTC) Date: Thu, 3 Nov 2022 17:15:25 +0100 Message-Id: <20221103161525.2130-1-levenson@mmer.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.22.65.174; envelope-from=levenson@mmer.org; helo=mail.mmer.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Sender: "Guix-patches" Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches From: Alexey Abramov via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667492322; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=+dAB4Ov99aYpyMb547XC+ogN475vnDc0xM3AXIpWxXE=; b=pPUq1FSP/xL9D55LX+Ccut2NZ+acIdS+G5Q2W9bAeeKu6twISeAKwrTwYEXJrP9FRBV3VD voxtImoHbXt8uqBqjpjij4Di+dvqM40sWpsztOVNblDhKX27lTyH5RR21FSY5Au7nF7ocE LVEJ44RDj2FG9SMFupHbOVZp2+hPDy5NoCEcigWHE2A9bSyn9T+uwvkM5tzqUEGsEYTQSQ kneevhRDMbHiflF8OWdsGXd0GxoB4y+7DmjYPjLU//HLCWQAdWQkYYOZOoeAv0d4QBzSff cpzbyB5PAuQfoCRC6c3MoJzQDLgiUTvhHarHmc2/TcWWL4rCZ0T72jdwbbZhSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667492322; a=rsa-sha256; cv=none; b=r9ivbBsayAfI5SZ4ATBdMt3qH8tlofPYaLbJ3vGKa0Z1wbmOUOyg6G0fTcf4kpNldyt/SM 2qe72i3lWvxcK5KypPpzafH3shQ4hITIplVYX0ukFFwyom6y36AoKuVexnrE1E9Q6vVwMX ib60mfI+2hNNMcR6nzyhhF0wnZ827bNRwlKi230AkLpf0amxVzWW7ik3zkwSJEtJXfNMmY MiXMJf8BX6QUEzPtuMW0/M2C7qr3HPVDgOl/S/+LeQlrxV4EyKqQLVjUHalbzhJMJ/iata ZgCUB7tSau0s5uDvoJefGCSAGEVPs+N2TQlInj8EkFHKiOmOVITazPkiINCabQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="BTeE iN4"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="BTeE iN4"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0AC231F222 X-Spam-Score: -1.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: xiWpAXQXKfNs * gnu/services/version-control.scm (gitolite-rc-file): Add local-code field. (gitolite-rc-file-compiler): Serialize the field. * doc/guix.texi: Document it. --- doc/guix.texi | 9 +++++++++ gnu/services/version-control.scm | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 80fb3bc47f..c05c7961e5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35704,6 +35704,15 @@ A value like @code{#o0027} will give read access to the group used by Gitolite (by default: @code{git}). This is necessary when using Gitolite with software like cgit or gitweb. +@item @code{local-code} (default: @code{"$rc@{GL_ADMIN_BASE@}/local"}) +Allows you to add your own non-core programs, or even override the +shipped ones with your own. + +Please supply the FULL path to this variable. By default, directory +called "local" in your gitolite clone is used, providing the benefits of +versioning them as well as making changes to them without having to log +on to the server. + @item @code{unsafe-pattern} (default: @code{#f}) An optional Perl regular expression for catching unsafe configurations in the configuration file. See diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index cd8763f5ea..8c9701afe0 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -54,6 +54,7 @@ (define-module (gnu services version-control) gitolite-rc-file + gitolite-rc-file-local-code gitolite-rc-file-umask gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys @@ -242,6 +243,8 @@ (define-record-type* gitolite-rc-file? (umask gitolite-rc-file-umask (default #o0077)) + (local-code gitolite-rc-file-local-code + (default "$rc{GL_ADMIN_BASE}/local")) (unsafe-pattern gitolite-rc-file-unsafe-pattern (default #f)) (git-config-keys gitolite-rc-file-git-config-keys @@ -263,11 +266,13 @@ (define-record-type* (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match file - (($ umask unsafe-pattern git-config-keys roles enable) + (($ 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) -- 2.36.1