From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mJ0tFZCoaGMiTAEAbAwnHQ (envelope-from ) for ; Mon, 07 Nov 2022 07:41:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qMfuFJCoaGPtMgAAauVa8A (envelope-from ) for ; Mon, 07 Nov 2022 07:41:20 +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 00D812FDCB for ; Mon, 7 Nov 2022 07:41:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orvoe-00078v-CX; Mon, 07 Nov 2022 01:41:04 -0500 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 1orvoc-00077Q-HA for guix-patches@gnu.org; Mon, 07 Nov 2022 01:41:02 -0500 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 1orvoc-0003MX-9L for guix-patches@gnu.org; Mon, 07 Nov 2022 01:41:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orvoc-0001ds-5t for guix-patches@gnu.org; Mon, 07 Nov 2022 01:41:02 -0500 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: Mon, 07 Nov 2022 06:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: Christopher Baines Cc: 58989@debbugs.gnu.org X-Debbugs-Original-Cc: 58989@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 58989-submit@debbugs.gnu.org id=B58989.16678032136210 (code B ref 58989); Mon, 07 Nov 2022 06:41:02 +0000 Received: (at 58989) by debbugs.gnu.org; 7 Nov 2022 06:40:13 +0000 Received: from localhost ([127.0.0.1]:33030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orvnp-0001c0-1z for submit@debbugs.gnu.org; Mon, 07 Nov 2022 01:40:13 -0500 Received: from mail.mmer.org ([178.22.65.174]:55024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orvnn-0001bj-Eq for 58989@debbugs.gnu.org; Mon, 07 Nov 2022 01:40:12 -0500 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id 1406822c; Mon, 7 Nov 2022 06:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=dkim; bh=XFN3Eldm0NHzlLeyBTqQC2hKr1tuUbTXl44A20 AgLfw=; b=sRhyTvZIrn4mNFtwyqlwIn4zuH9RJKooZwCDdZIK6DAmk200f7AsEU 6VqrAFuYnpOvS+9093ME7w8sQdon0gVJ0SRoivThDj5DYJeZTIcAr6rMsSg1//Nl VioXkGZKgEdgMCq38ZaQjP5elmtqFAn8Do+hl1Tk6ipj1b7nAx78E= Received: from delta.lan (j74210.upc-j.chello.nl [24.132.74.210]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id fb04ae20 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 7 Nov 2022 06:40:03 +0000 (UTC) In-Reply-To: <87a654gouw.fsf@cbaines.net> (Christopher Baines's message of "Sun, 06 Nov 2022 15:03:38 +0100") References: <20221103161525.2130-1-levenson@mmer.org> <87a654gouw.fsf@cbaines.net> Date: Mon, 07 Nov 2022 07:40:02 +0100 Message-ID: <87leon469p.fsf@delta.lan> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: , 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 Sender: 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=1667803280; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=JsHC4uN0QtTqGkMccDKX5mwFhEwBOBmIYUg1Ap+QwWg=; b=IshW3cXFuG3PTLLdIx/7hfOlqwYZwtURjV66SZayrc7x4AsSaz7DkK8YphLXb4Vk//FdwL 1Xu2nzIAUjly3xHsSTd38gIxkqxEOg7tUZpUxr6ujbvYjqJzB0wykRfPdkF071MC/9DyDD joN/B046cQ7fVZfDc1LIW28GRhdiwpPsm2h3fRd3KZZ13QCRq+wE3/vV4VwIEvZ4UDZF6m MFfxmbeYoUojgDFxd5EMOnlIJbaybc0/P9llRCs9P0f9PWokRh+jxgbUegGApkCHH1VVHf zwNAY3FX0VycY7YzcTfdohRrpSxCQxnbjqKn91hSYpZ/20k9084jjbcu+cuWmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667803280; a=rsa-sha256; cv=none; b=fSV+S0up8REllGLfNmEaiFyR42crHGsrdmI8IYs0NpOkHRkaCqAfdD3L6eOZayEZ2wpO1u PvCiZ1AODvJsSlnthjzahS7Vz6NIOWtBO1oNAx0b0wOMRvFl1zFMi9qFhw/LiZ3Vu+s/U8 L8O8M/qc0evjAnTjGNnhALGIwwSXqfLDS/JciTpr1yIx2QhgctGTrkHJj1L/nTgA+D4Y9H 1PtXq71svpNecIgmI7/24WnsgKW/zjrCac2JIvl5ByieJT4ZA+1mvM4Oq4z1Yve1Y0Jel9 iVvbQTdKToITtSi9gYeEEaePcbc3g9nsxKofT2a//xYsDBotptHuXVNuqYOi0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b=sRhyTvZI; 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: -4.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b=sRhyTvZI; 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: 00D812FDCB X-Spam-Score: -4.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3FV17gV2so2b --=-=-= Content-Type: text/plain Christopher Baines writes: > Alexey Abramov via Guix-patches via writes: > [...] > > This generally looks good, but I believe the above will break if > local-code is #f. Yeah, you are absolutely right. I have attached an updated patch. -- Alexey --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-services-gitolite-Add-local-code-configuration-optio.patch >From 0eb61654d46e171b29a3be7b75cad22f8c32f636 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Wed, 19 Oct 2022 11:34:31 +0200 Subject: [PATCH] services: gitolite: Add local-code configuration option. * 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 | 8 +++++++- 2 files changed, 16 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..b6b78e504e 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,14 @@ (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 --=-=-=--