From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH] gnu: Add gitolite. Date: Thu, 16 Apr 2015 07:36:26 -0400 Message-ID: <87r3rkb8zp.fsf@fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yii5x-0000us-FF for guix-devel@gnu.org; Thu, 16 Apr 2015 07:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yii5v-0004Xy-RM for guix-devel@gnu.org; Thu, 16 Apr 2015 07:36:33 -0400 Received: from mail.fsf.org ([208.118.235.13]:56961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yii5v-0004Xu-Mw for guix-devel@gnu.org; Thu, 16 Apr 2015 07:36:31 -0400 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:42310 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Yii5s-0003pQ-P7 for guix-devel@gnu.org; Thu, 16 Apr 2015 07:36:31 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Gitolite is a lightweight tool for managing access control to Git repositories. We use it at the FSF and it works pretty well. AFAICT, I've managed to avoid propogating Perl, but I have to propagate OpenSSH and Git for now. They are referenced in too many scripts in too many ways for a regexp substitution to do a good job. Fixing this requires working with the upstream maintainers, I think. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-gitolite.patch >From 12a8ab427800a004059c847742fa40bf35de1bb2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 16 Apr 2015 03:23:52 -0400 Subject: [PATCH] gnu: Add gitolite. * gnu/packages/version-control.scm (gitolite): New variable. * gnu/packages/patches/gitolite-openssh-6.8-compat.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + .../patches/gitolite-openssh-6.8-compat.patch | 25 ++++++++++ gnu/packages/version-control.scm | 58 ++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 gnu/packages/patches/gitolite-openssh-6.8-compat.patch diff --git a/gnu-system.am b/gnu-system.am index c581d79..967033b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -414,6 +414,7 @@ dist_patch_DATA = \ gnu/packages/patches/flex-bison-tests.patch \ gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ + gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ gnu/packages/patches/glib-tests-desktop.patch \ gnu/packages/patches/glib-tests-homedir.patch \ gnu/packages/patches/glib-tests-prlimit.patch \ diff --git a/gnu/packages/patches/gitolite-openssh-6.8-compat.patch b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch new file mode 100644 index 0000000..d9dbc87 --- /dev/null +++ b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch @@ -0,0 +1,25 @@ +From ed807a40c6683960e357bc995b3acf721ec088b4 Mon Sep 17 00:00:00 2001 +From: Sitaram Chamarty +Date: Thu, 19 Mar 2015 05:17:59 +0530 +Subject: [PATCH] openssh 6.8 compat + +--- + src/triggers/post-compile/ssh-authkeys | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/triggers/post-compile/ssh-authkeys b/src/triggers/post-compile/ssh-authkeys +index 84dda73..d5f5d8b 100755 +--- a/src/triggers/post-compile/ssh-authkeys ++++ b/src/triggers/post-compile/ssh-authkeys +@@ -115,7 +115,7 @@ sub fp_file { + my $f = shift; + my $fp = `ssh-keygen -l -f '$f'`; + chomp($fp); +- _die "fingerprinting failed for '$f'" unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/; ++ _die "fingerprinting failed for '$f'" unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/ or $fp =~ m(SHA256:([A-ZA-z0-9+/]+)); + $fp = $1; + return $fp; + } +-- +2.2.1 + diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 48e16a1..c22950b 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages nano) #:use-module (gnu packages ncurses) #:use-module (gnu packages openssl) + #:use-module (gnu packages ssh) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -401,6 +402,63 @@ linear. It will test every change between two points in the DAG. It will also walk each side of a merge and test those changes individually.") (license (x11-style "file://LICENSE"))))) +(define-public gitolite + (package + (name "gitolite") + (version "3.6.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/sitaramc/gitolite/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + ;; Commit ed807a4 upstream + (patches (list (search-patch "gitolite-openssh-6.8-compat.patch"))) + (sha256 + (base32 + "1gsgzi9ayb4rablki3mqr11b0h8db4xg43df660marfpacmkfb01")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (delete configure) + (delete build) + (add-before install patch-scripts + (lambda* (#:key inputs #:allow-other-keys) + (let ((perl (string-append (assoc-ref inputs "perl") + "/bin/perl"))) + ;; This seems to take care of every shell script that + ;; calls Perl. + (substitute* (find-files "." ".*") + ((" perl -") + (string-append " " perl " -")))))) + (replace install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((output (assoc-ref outputs "out")) + (sharedir (string-append output "/share/gitolite")) + (bindir (string-append output "/bin"))) + (mkdir-p sharedir) + (mkdir-p bindir) + (system* "./install" "-to" sharedir) + (for-each (lambda (script) + (symlink (string-append sharedir "/" script) + (string-append bindir "/" script))) + '("gitolite" "gitolite-shell")) + #t)))))) + (inputs + `(("perl" ,perl))) + ;; Propagated because trying to patch the source via regexp matching is + ;; too brittle and prone to false positives. Upstream work required. + (propagated-inputs + `(("git" ,git) + ("openssh" ,openssh))) + (home-page "http://gitolite.com") + (synopsis "Git access control layer") + (description + "Gitolite is an access control layer on top of Git, providing fine access +control to Git repositories.") + (license gpl2))) + (define-public mercurial (package (name "mercurial") -- 2.2.1 --=-=-= Content-Type: text/plain -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate --=-=-=--