unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Efraim Flashner <efraim@flashner.co.il>, 25957@debbugs.gnu.org
Subject: bug#25957: gitolite broken: created repositories keep references to /usr/bin for hooks
Date: Thu, 6 Oct 2022 09:26:38 -0400	[thread overview]
Message-ID: <CAJ=Rwfbp7TD43ywJe4rge1m5Bd42=Y8BzmPtQfkrQRWmA7UewQ@mail.gmail.com> (raw)
In-Reply-To: <871qsqtewp.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]

Hello again Simon and Efraim,

On Mon, Sep 5, 2022 at 5:33 AM zimoun <zimon.toutoune@gmail.com> wrote:
>
> Hi,
>
> On dim., 04 sept. 2022 at 09:26, "Thompson, David" <dthompson2@worcester.edu> wrote:
>
> > Thanks! I made one minor tweak to sort the inputs list alphabetically
> > and pushed as commit 1aa46a7e29c5bd892219fe20fefb883d2103e29e.
>
> Cool!
>
> > I also pushed a follow-up commit
> > e4ccfcb22ad96e71ca4dfad95af5aa6229ed9869 that swaps out 'git' for
> > 'git-minimal', saving about 75MiB in the package closure.
>
> Neat!
>
> > I think, technically speaking, this bug has been resolved.  There are
> > no longer /usr/bin, /usr/sbin, etc. references in our gitolite
> > package, so extensions should work as long as the user adds the
> > relevant packages to their user or system profile.  I will keep this
> > bug open for the moment, though, since I haven't gotten to the final
> > patch I said I would submit which will make those optional
> > dependencies easy to add via the gitolite service.  Stay tuned!
>
> Ok, thanks for almost closing this old bugs. :-)

Some news: I have updated the gitolite package to use G-expressions.
The package builds and the gitolite system test passes so I pushed
that change to master a little while ago.  That patch has made the
(hopefully) final step in this saga easier. The attached patch
introduces a 'make-gitolite' procedure that can be used to add
arbitrary packages to the wrappers for the gitolite and gitolite-shell
programs.  The return value of this procedure can be used in the
gitolite service configuration to enable the desired optional features
like Redis or git-annex.  The base package inputs are unchanged and
the gitolite system test still passes.

What do you think?

- Dave

[-- Attachment #2: 0001-gnu-version-control-Add-make-gitolite-procedure.patch --]
[-- Type: text/x-patch, Size: 3552 bytes --]

From 3f3e2d002cb8c740081d58e83b6e89236d11f15f Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Thu, 6 Oct 2022 08:45:48 -0400
Subject: [PATCH] gnu: version-control: Add make-gitolite procedure.

* gnu/packages/version-control.scm (make-gitolite): New procedure.
(gitolite): Use make-gitolite.
* doc/guix.texi (Gitolite service): Document how to use make-gitolite.
---
 doc/guix.texi                    | 15 ++++++++++++++-
 gnu/packages/version-control.scm | 15 +++++++++++----
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 523711bdf6..533b12d738 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35285,7 +35285,20 @@ Data type representing the configuration for @code{gitolite-service-type}.
 
 @table @asis
 @item @code{package} (default: @var{gitolite})
-Gitolite package to use.
+Gitolite package to use.  There are optional Gitolite dependencies that
+are not included in the default package, such as Redis and git-annex.
+These features can be made available by using the @code{make-gitolite}
+procedure in the @code{(gnu packages version-control}) module to produce
+a variant of Gitolite with the desired additional dependencies.
+
+The following code returns a package in which the Redis and git-annex
+programs can be invoked by Gitolite's scripts:
+
+@example
+(use-modules (gnu packages databases)
+             (gnu packages haskell-apps))
+(make-gitolite (list redis git-annex))
+@end example
 
 @item @code{user} (default: @var{git})
 User to use for Gitolite.  This will be user that you use when accessing
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index bd0ad70ce8..68358cc1d1 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -137,7 +137,8 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages)
   #:use-module (ice-9 match)
-  #:use-module (srfi srfi-1))
+  #:use-module (srfi srfi-1)
+  #:export (make-gitolite))
 
 (define-public breezy
   (package
@@ -1482,7 +1483,9 @@ (define-public git-test-sequence
 also walk each side of a merge and test those changes individually.")
       (license (license:x11-style "file://LICENSE")))))
 
-(define-public gitolite
+(define* (make-gitolite #:optional (extra-inputs '()))
+  "Make a gitolite package object with EXTRA-INPUTS added to the binary
+wrappers, to be used for optional gitolite extensions."
   (package
     (name "gitolite")
     (version "3.6.12")
@@ -1574,10 +1577,12 @@ (define-public gitolite
                                          (list #$output
                                                #$coreutils
                                                #$findutils
-                                               #$git)))))
+                                               #$git
+                                               #$@extra-inputs)))))
                              '("/bin/gitolite" "/bin/gitolite-shell")))))))
     (inputs
-     (list bash-minimal coreutils findutils git inetutils openssh perl))
+     (append (list bash-minimal coreutils findutils git inetutils openssh perl)
+             extra-inputs))
     (home-page "https://gitolite.com")
     (synopsis "Git access control layer")
     (description
@@ -1585,6 +1590,8 @@ (define-public gitolite
 control to Git repositories.")
     (license license:gpl2)))
 
+(define-public gitolite (make-gitolite))
+
 (define-public gitile
   (package
     (name "gitile")
-- 
2.37.2


  parent reply	other threads:[~2022-10-06 13:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 21:58 bug#25957: gitolite broken: created repositories keep references to /usr/bin for hooks ng0
     [not found] ` <handler.25957.B.14885741929377.ack@debbugs.gnu.org>
2017-03-03 22:27   ` bug#25957: Acknowledgement (gitolite broken: created repositories keep references to /usr/bin for hooks) ng0
2017-03-04 13:32     ` ng0
2017-03-04 15:43       ` Danny Milosavljevic
2017-03-04 17:33         ` ng0
2022-01-05  0:07       ` bug#25957: gitolite broken: created repositories keep references to /usr/bin for hooks zimoun
2022-01-12 18:07         ` Efraim Flashner
2022-02-03  2:49           ` zimoun
2022-03-23 10:45             ` zimoun
2022-03-23 12:44               ` Maxime Devos
2022-03-28  6:49                 ` Efraim Flashner
2022-09-01 13:59                   ` bug#25957: [EXT] " Thompson, David
2022-09-01 14:20                     ` Efraim Flashner
2022-09-01 14:41                       ` bug#25957: [EXT] " Thompson, David
2022-09-01 17:00                         ` zimoun
2022-09-02  6:56                         ` Efraim Flashner
2022-09-02 11:11                           ` Thompson, David
2022-09-02 12:41                             ` Efraim Flashner
2022-09-02 12:50                               ` bug#25957: [EXT] " Thompson, David
2022-09-02 19:58                                 ` Thompson, David
2022-09-04  7:26                                   ` Efraim Flashner
2022-09-04 13:26                                     ` Thompson, David
2022-09-05  8:16                                       ` zimoun
2022-09-06 13:50                                         ` Thompson, David
2022-10-06 13:26                                         ` Thompson, David [this message]
2022-10-06 13:42                                           ` Thompson, David
2022-10-08 14:56                                           ` zimoun
2022-10-09  1:40                                             ` Thompson, David
2022-10-24 21:21                                               ` Thompson, David
2022-10-25  9:58                                                 ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=Rwfbp7TD43ywJe4rge1m5Bd42=Y8BzmPtQfkrQRWmA7UewQ@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=25957@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).