packages: gitolite/gitolite.spec, gitolite/gitolite-BIG_INFO_CAP.patch (NEW...

draenog draenog at pld-linux.org
Thu Dec 8 18:22:10 CET 2011


Author: draenog                      Date: Thu Dec  8 17:22:10 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- allow for not truncated list of available repositories
- fix broken links in hooks directories
- speed up gl-setup
- option to disable creation of wildcard repositories
- set version string in the same way as upstream

---- Files affected:
packages/gitolite:
   gitolite.spec (1.28 -> 1.29) , gitolite-BIG_INFO_CAP.patch (NONE -> 1.1)  (NEW), gitolite-broken_links.patch (NONE -> 1.1)  (NEW), gitolite-gl_setup.patch (NONE -> 1.1)  (NEW), gitolite-wildcard_repos.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gitolite/gitolite.spec
diff -u packages/gitolite/gitolite.spec:1.28 packages/gitolite/gitolite.spec:1.29
--- packages/gitolite/gitolite.spec:1.28	Sat Nov 19 21:46:40 2011
+++ packages/gitolite/gitolite.spec	Thu Dec  8 18:22:04 2011
@@ -7,13 +7,17 @@
 Summary(pl.UTF-8):	Narzędzie do hostowania repozytoriów git
 Name:		gitolite
 Version:	2.2
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Development/Tools
 Source0:	http://github.com/sitaramc/gitolite/tarball/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	9b8db827914cdaf74023bd13ed431563
 Patch0:		%{name}-mkdir.patch
 Patch1:		%{name}-env.patch
+Patch2:		%{name}-BIG_INFO_CAP.patch
+Patch3:		%{name}-broken_links.patch
+Patch4:		%{name}-gl_setup.patch
+Patch5:		%{name}-wildcard_repos.patch
 URL:		http://github.com/sitaramc/gitolite
 BuildRequires:	perl-Text-Markdown
 BuildRequires:	rpm-perlprov
@@ -63,10 +67,14 @@
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 rm src/gl-system-install
 
-echo %{version} > conf/VERSION
+echo v%{version} > conf/VERSION
 sed -i 's,^# $GL_PACKAGE_CONF =.*,$GL_PACKAGE_CONF = "%{_sysconfdir}/gitolite";,g' conf/example.gitolite.rc
 sed -i 's,^# $GL_PACKAGE_HOOKS =.*,$GL_PACKAGE_HOOKS = "%{_datadir}/gitolite/hooks";,g' conf/example.gitolite.rc
 
@@ -123,6 +131,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.29  2011/12/08 17:22:04  draenog
+- allow for not truncated list of available repositories
+- fix broken links in hooks directories
+- speed up gl-setup
+- option to disable creation of wildcard repositories
+- set version string in the same way as upstream
+
 Revision 1.28  2011/11/19 20:46:40  wiget
 - up to 2.2
 

================================================================
Index: packages/gitolite/gitolite-BIG_INFO_CAP.patch
diff -u /dev/null packages/gitolite/gitolite-BIG_INFO_CAP.patch:1.1
--- /dev/null	Thu Dec  8 18:22:10 2011
+++ packages/gitolite/gitolite-BIG_INFO_CAP.patch	Thu Dec  8 18:22:04 2011
@@ -0,0 +1,50 @@
+From 886b2294df8c5f3b47f24f9fe9761c45bbd8428b Mon Sep 17 00:00:00 2001
+From: Kacper Kornet <draenog at pld-linux.org>
+Date: Thu, 23 Jun 2011 16:27:59 +0100
+Subject: [PATCH 1/6] Allow for unlimited output with $BIG_INFO_CAP=0
+
+---
+ src/gitolite.pm |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/gitolite.pm b/src/gitolite.pm
+index fcbda13..a6edf7e 100644
+--- a/src/gitolite.pm
++++ b/src/gitolite.pm
+@@ -599,7 +599,7 @@ sub report_basic
+     for my $r (sort keys %repos) {
+         next unless $r =~ /$repo/i;
+         # if $GL_BIG_CONFIG is on, limit the number of output lines
+-        next if $GL_BIG_CONFIG and $count++ >= $BIG_INFO_CAP;
++        next if $GL_BIG_CONFIG and  $BIG_INFO_CAP and $count++ >= $BIG_INFO_CAP;
+         if ($r =~ $REPONAME_PATT and $r !~ /\bCREAT[EO]R\b/) {
+             parse_acl($r, "NOBODY");
+         } else {
+@@ -617,7 +617,7 @@ sub report_basic
+         $perm .= perm_code( $repos{$r}{W}{'@all'} || $repos{'@all'}{W}{'@all'}, $repos{'@all'}{W}{$user}, $repos{$r}{W}{$user}, 'W');
+         print "$perm\t$r\r\n" if $perm =~ /\S/ and not check_deny_repo($r);
+     }
+-    print "only $BIG_INFO_CAP out of $count candidate repos examined\r\nplease use a partial reponame or regex pattern to limit output\r\n" if $GL_BIG_CONFIG and $count > $BIG_INFO_CAP;
++    print "only $BIG_INFO_CAP out of $count candidate repos examined\r\nplease use a partial reponame or regex pattern to limit output\r\n" if $GL_BIG_CONFIG and $BIG_INFO_CAP and $count > $BIG_INFO_CAP;
+     print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
+ }
+ 
+@@ -646,13 +646,13 @@ sub expand_wild
+         $actual_repo =~ s/\.git$//;
+         # actual_repo has to match the pattern being expanded
+         next unless $actual_repo =~ /$repo/i;
+-        next if $GL_BIG_CONFIG and $count++ >= $BIG_INFO_CAP;
++        next if $GL_BIG_CONFIG and $BIG_INFO_CAP and $count++ >= $BIG_INFO_CAP;
+ 
+         my($perm, $creator, $wild) = repo_rights($actual_repo);
+         next unless $perm =~ /\S/;
+         print "$perm\t$creator\t$actual_repo\n";
+     }
+-    print "only $BIG_INFO_CAP out of $count candidate repos examined\nplease use a partial reponame or regex pattern to limit output\n" if $GL_BIG_CONFIG and $count > $BIG_INFO_CAP;
++    print "only $BIG_INFO_CAP out of $count candidate repos examined\nplease use a partial reponame or regex pattern to limit output\n" if $GL_BIG_CONFIG and $BIG_INFO_CAP and $count > $BIG_INFO_CAP;
+     print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
+ }
+ 
+-- 
+1.7.8
+

================================================================
Index: packages/gitolite/gitolite-broken_links.patch
diff -u /dev/null packages/gitolite/gitolite-broken_links.patch:1.1
--- /dev/null	Thu Dec  8 18:22:10 2011
+++ packages/gitolite/gitolite-broken_links.patch	Thu Dec  8 18:22:04 2011
@@ -0,0 +1,26 @@
+From 192ff2030173bc3b433b0ece9d1fe9e25d43b2c1 Mon Sep 17 00:00:00 2001
+From: Kacper Kornet <draenog at pld-linux.org>
+Date: Tue, 21 Jun 2011 14:34:52 +0200
+Subject: [PATCH 2/6] Remove broken links
+
+When some hook files were removed it resulted in broken links to them.
+This commit fixes it.
+---
+ src/gl-install |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/gl-install b/src/gl-install
+index de7aefd..2f73869 100755
+--- a/src/gl-install
++++ b/src/gl-install
+@@ -97,6 +97,7 @@ for my $repo (`find . -type d -name "*.git" -prune`) {
+     # in case of package install, GL_ADMINDIR is no longer the top cop;
+     # override with the package hooks
+     ln_sf("$GL_PACKAGE_HOOKS/common", "*", "$repo/hooks") if $GL_PACKAGE_HOOKS;
++    foreach(glob "$repo/hooks/*") { -l && ! -e && unlink};
+     chmod 0755, "$repo/hooks/update";
+ }
+ 
+-- 
+1.7.8
+

================================================================
Index: packages/gitolite/gitolite-gl_setup.patch
diff -u /dev/null packages/gitolite/gitolite-gl_setup.patch:1.1
--- /dev/null	Thu Dec  8 18:22:10 2011
+++ packages/gitolite/gitolite-gl_setup.patch	Thu Dec  8 18:22:04 2011
@@ -0,0 +1,36 @@
+From c3224124b55ac74e6817a54dc52adc1c77757d6c Mon Sep 17 00:00:00 2001
+From: Kacper Kornet <draenog at pld-linux.org>
+Date: Fri, 10 Jun 2011 16:31:36 +0200
+Subject: [PATCH 3/6] Run gl-install in gl-setup only when admin repo was
+ created
+
+With large number of repos gl-install is expensive to run. So it should
+be run for the second time in gl-setupe only when necessary.
+---
+ src/gl-setup |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/gl-setup b/src/gl-setup
+index 3a6c04b..f451bcc 100755
+--- a/src/gl-setup
++++ b/src/gl-setup
+@@ -117,6 +117,7 @@ gl-install -q
+         repo    testing
+                 RW+     =   @all
+ EOF
++   RERUN_GL_INSTALL=1
+ }
+ [ -n "$pubkey_file" ] && cp $pubkey_file $GL_ADMINDIR/keydir
+ 
+@@ -135,7 +136,7 @@ gl-compile-conf -q
+ 
+ # now that the admin repo is created, you have to set the hooks properly; best
+ # do it by running install again
+-gl-install -q
++[ "$RERUN_GL_INSTALL" = 1 ] && gl-install -q
+ 
+ # ----
+ 
+-- 
+1.7.8
+

================================================================
Index: packages/gitolite/gitolite-wildcard_repos.patch
diff -u /dev/null packages/gitolite/gitolite-wildcard_repos.patch:1.1
--- /dev/null	Thu Dec  8 18:22:10 2011
+++ packages/gitolite/gitolite-wildcard_repos.patch	Thu Dec  8 18:22:04 2011
@@ -0,0 +1,39 @@
+From b6bdf6ddb4faf2356e0e4642ea0180e27675c9fc Mon Sep 17 00:00:00 2001
+From: Kacper Kornet <draenog at pld-linux.org>
+Date: Mon, 16 May 2011 20:21:52 +0100
+Subject: [PATCH 6/6] Option to disable creation of wildcard repos
+
+---
+ src/gitolite_rc.pm  |    2 +-
+ src/gl-auth-command |    3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/gitolite_rc.pm b/src/gitolite_rc.pm
+index 9f65a7d..cf74b65 100644
+--- a/src/gitolite_rc.pm
++++ b/src/gitolite_rc.pm
+@@ -18,7 +18,7 @@ use Exporter 'import';
+     $GL_ADC_PATH $GL_ADMINDIR $GL_ALL_INCLUDES_SPECIAL $GL_ALL_READ_ALL
+     $GL_BIG_CONFIG $GL_CONF $GL_CONF_COMPILED $GL_GET_MEMBERSHIPS_PGM
+     $GL_GITCONFIG_KEYS $GL_KEYDIR $GL_LOGT $GL_NICE_VALUE
+-    $GL_NO_CREATE_REPOS $GL_NO_DAEMON_NO_GITWEB $GL_NO_SETUP_AUTHKEYS
++    $GL_NO_CREATE_REPOS $GL_NO_CREATE_WILDCARD_REPOS $GL_NO_DAEMON_NO_GITWEB $GL_NO_SETUP_AUTHKEYS
+     $GL_PACKAGE_CONF $GL_PACKAGE_HOOKS $GL_PERFLOGT $GL_SITE_INFO
+     $GL_SLAVE_MODE $GL_WILDREPOS $GL_WILDREPOS_DEFPERMS
+     $GL_WILDREPOS_PERM_CATS $HTPASSWD_FILE $PROJECTS_LIST $WEB_INTERFACE
+diff --git a/src/gl-auth-command b/src/gl-auth-command
+index 851f614..71596a4 100755
+--- a/src/gl-auth-command
++++ b/src/gl-auth-command
+@@ -160,7 +160,7 @@ if ( $GL_ALL_READ_ALL and $verb =~ $R_COMMANDS and -d "$REPO_BASE/$repo.git") {
+     ($perm, $creator, $wild) = repo_rights($repo);
+ }
+ # it was missing, and you have create perms, so create it
+-new_wild_repo($repo, $user) if ($perm =~ /C/);
++new_wild_repo($repo, $user) if ($perm =~ /C/ && !$GL_NO_CREATE_WILDCARD_REPOS);
+ 
+ die "$aa access for $repo DENIED to $user
+ (Or there may be no repository at the given path. Did you spell it correctly?)\n" unless $perm =~ /$aa/;
+-- 
+1.7.8
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gitolite/gitolite.spec?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list