GNU bug report logs -
#30809
[PATCH] Gitolite service
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Tue, 13 Mar 2018 21:37:02 UTC
Severity: normal
Tags: moreinfo
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 30809 <at> debbugs.gnu.org (full text, mbox):
Hi Christopher!
Christopher Baines <mail <at> cbaines.net> writes:
> Previously the gitolite package worked, but there were problems using it for
> the service where you might have a minimal PATH. This commit patches the
> source and scripts where possible to use store paths, and also wraps the
> gitolite script to handle the harder dependencies.
>
> * gnu/packages/version-control.scm (gitolite)[arguments]: Add more patching to
> the patch-scripts phase, and add two new phases (patch-source and
> wrap-scripts).
> [inputs]: Add coreutils, findutils and inetutils.
> ---
> gnu/packages/version-control.scm | 53 ++++++++++++++++++++++++++++++--
> 1 file changed, 51 insertions(+), 2 deletions(-)
[...]
> (replace 'install
> (lambda* (#:key outputs #:allow-other-keys)
> (let* ((output (assoc-ref outputs "out"))
> @@ -1045,9 +1075,28 @@ also walk each side of a merge and test those changes individually.")
> (symlink (string-append sharedir "/" script)
> (string-append bindir "/" script)))
> '("gitolite" "gitolite-shell"))
> - #t))))))
> + #t)))
> + (add-after 'install 'wrap-scripts
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (wrap-program (string-append (assoc-ref outputs "out")
> + "/bin/gitolite")
> + `("PATH" ":" prefix
> + (,(string-append (assoc-ref outputs "out")
> + "/bin")
> + ,(string-append (assoc-ref inputs "coreutils")
> + "/bin")
> + ;; find is used in quite a few places
> + ,(string-append (assoc-ref inputs "findutils")
> + "/bin")
> + ,(string-append (assoc-ref inputs "git")
> + "/bin"))))
Here you can avoid some repetitions like this:
(let ((out (assoc-ref outputs "out"))
(coreutils (assoc-ref inputs "coreutils"))
(findutils (assoc-ref inputs "findutils"))
(git (assoc-ref inputs "git")))
(wrap-program (string-append out "/bin/gitolite")
`("PATH" ":" prefix
,(map (lambda (dir)
(string-append dir "/bin"))
(list out coreutils findutils git))))
#t)
> +
> + #t)))))
> (inputs
> - `(("perl" ,perl)))
> + `(("perl" ,perl)
> + ("coreutils" ,coreutils)
> + ("findutils" ,findutils)
> + ("inetutils" ,inetutils)))
> ;; git and openssh are propagated because trying to patch the source via
> ;; regexp matching is too brittle and prone to false positives.
> (propagated-inputs
Otherwise, LGTM, thank you!
This bug report was last modified 6 years and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.