From b2a2d538ed7eab8be88c3041d24a4b5d92906d40 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mar 26 2010 12:48:43 +0000 Subject: New upstream. --- diff --git a/.cvsignore b/.cvsignore index b78f000..5c94024 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gitolite-ed2bf5.tar.gz +sitaramc-gitolite-367e8f8.tar.gz diff --git a/gitolite-1.3-conf.patch b/gitolite-1.3-conf.patch new file mode 100644 index 0000000..705e857 --- /dev/null +++ b/gitolite-1.3-conf.patch @@ -0,0 +1,10 @@ +--- sitaramc-gitolite-367e8f8/conf/example.conf~ 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/conf/example.conf 2010-03-25 07:02:31.432976228 -0500 +@@ -59,6 +59,7 @@ + @interns = han + # "@interns" now has 3 names in it, but note that this does + # not change @staff ++@others = janusz mariusz + + # WILDCARD REPOSITORIES ("wildrepos" BRANCH ONLY) + # ----------------------------------------- diff --git a/gitolite-1.3-rpm.patch b/gitolite-1.3-rpm.patch new file mode 100644 index 0000000..c20c881 --- /dev/null +++ b/gitolite-1.3-rpm.patch @@ -0,0 +1,332 @@ +diff -U3 -r sitaramc-gitolite-367e8f8.orig/hooks/gitolite-admin/post-update sitaramc-gitolite-367e8f8/hooks/gitolite-admin/post-update +--- sitaramc-gitolite-367e8f8.orig/hooks/gitolite-admin/post-update 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/hooks/gitolite-admin/post-update 2010-03-25 06:36:29.510974819 -0500 +@@ -5,4 +5,4 @@ + GIT_WORK_TREE=$GL_ADMINDIR git checkout -f master + + cd $GL_ADMINDIR +-$GL_BINDIR/gl-compile-conf ++gl-compile-conf +diff -U3 -r sitaramc-gitolite-367e8f8.orig/src/gitolite.pm sitaramc-gitolite-367e8f8/src/gitolite.pm +--- sitaramc-gitolite-367e8f8.orig/src/gitolite.pm 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/src/gitolite.pm 2010-03-25 06:38:50.062978438 -0500 +@@ -285,7 +285,7 @@ + + # send back some useful info if no command was given + print "hello $user, the gitolite version here is "; +- system("cat", ($GL_PACKAGE_CONF || "$GL_ADMINDIR/conf") . "/VERSION"); ++ system("rpm", "-q", "--qf", '%{version}-%{release}', 'gitolite'); + print "\ryou have the following permissions:\r\n"; + for my $r (sort keys %repos) { + my $perm .= ( $repos{$r}{C}{'@all'} ? ' @' : ( $repos{$r}{C}{$user} ? ' C' : ' ' ) ); +diff -U3 -r sitaramc-gitolite-367e8f8.orig/src/gl-auth-command sitaramc-gitolite-367e8f8/src/gl-auth-command +--- sitaramc-gitolite-367e8f8.orig/src/gl-auth-command 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/src/gl-auth-command 2010-03-25 06:41:17.307979546 -0500 +@@ -33,7 +33,7 @@ + my $bindir = $0; + $bindir =~ s/\/[^\/]+$//; + $bindir = "$ENV{PWD}/$bindir" unless $bindir =~ /^\//; +-require "$bindir/gitolite.pm"; ++require gitolite; + + # ask where the rc file is, get it, and "do" it + &where_is_rc(); +@@ -178,7 +178,7 @@ + # auto-vivify new repo if you have C access (and wildrepos is on) + if ( $GL_WILDREPOS and $repos{$repo}{C}{$user} || $repos{$repo}{C}{'@all'} ) { + wrap_chdir("$repo_base_abs"); +- new_repo($repo, "$GL_ADMINDIR/hooks/common", $user); ++ new_repo($repo, "/usr/share/gitolite/hooks/common", $user); + wrap_chdir($ENV{HOME}); + } + } +diff -U3 -r sitaramc-gitolite-367e8f8.orig/src/gl-compile-conf sitaramc-gitolite-367e8f8/src/gl-compile-conf +--- sitaramc-gitolite-367e8f8.orig/src/gl-compile-conf 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/src/gl-compile-conf 2010-03-25 06:42:56.026974982 -0500 +@@ -69,7 +69,7 @@ + my $bindir = $0; + $bindir =~ s/\/[^\/]+$//; + $bindir = "$ENV{PWD}/$bindir" unless $bindir =~ /^\//; +-require "$bindir/gitolite.pm"; ++require gitolite; + + # ask where the rc file is, get it, and "do" it + &where_is_rc(); +@@ -83,7 +83,7 @@ + # ---------------------------------------------------------------------------- + + # command and options for authorized_keys +-$AUTH_COMMAND="$bindir/gl-auth-command"; ++$AUTH_COMMAND="/usr/bin/gl-auth-command"; + $AUTH_OPTIONS="no-port-forwarding,no-X11-forwarding,no-agent-forwarding"; + # note, for most users there's also a "no-pty" added to this, see later + +@@ -396,7 +396,7 @@ + next if $repo =~ m(^EXTCMD/); # these are not real repos + unless (-d "$repo.git") { + print STDERR "creating $repo...\n"; +- new_repo($repo, "$GL_ADMINDIR/hooks/common"); ++ new_repo($repo, "/usr/share/gitolite/hooks/common"); + # new_repo would have chdir'd us away; come back + wrap_chdir("$repo_base_abs"); + } +diff -U3 -r sitaramc-gitolite-367e8f8.orig/src/gl-easy-install sitaramc-gitolite-367e8f8/src/gl-easy-install +--- sitaramc-gitolite-367e8f8.orig/src/gl-easy-install 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/src/gl-easy-install 2010-03-25 06:52:07.613975915 -0500 +@@ -48,7 +48,7 @@ + [[ $upgrade == 0 ]] && initial_conf_key + + # MANUAL: cd to $GL_ADMINDIR and run "src/gl-compile-conf" +- ssh -p $port $user@$host "cd $GL_ADMINDIR; \$PWD/src/gl-compile-conf $quiet" ++ ssh -p $port $user@$host "cd $GL_ADMINDIR; gl-compile-conf $quiet" + + setup_pta + +@@ -60,13 +60,12 @@ + # ---------------------------------------------------------------------- + + setup_tempdir() { +- export tmpgli=tmp-gl-install + trap cleanup 0 +- mkdir -p $tmpgli ++ export tmpgli=$(mktemp -d) + } + + cleanup() { +- rm -rf $tmpgli ++ [ -d $tmpgli ] && rm -rf $tmpgli + } + + # ---------------------------------------------------------------------- +@@ -169,15 +168,15 @@ + # MANUAL: make sure you're in the gitolite directory, at the top level. + # The following files should all be visible: + +- ls hooks/gitolite-admin/post-update \ +- hooks/common/update \ +- src/gitolite.pm \ +- src/gl-install \ +- src/gl-auth-command \ +- src/gl-compile-conf \ +- conf/example.conf \ +- conf/example.gitolite.rc >/dev/null || +- die "cant find at least some files in gitolite sources/config; aborting" ++# ls hooks/gitolite-admin/post-update \ ++# hooks/common/update \ ++# src/gitolite.pm \ ++# src/gl-install \ ++# src/gl-auth-command \ ++# src/gl-compile-conf \ ++# conf/example.conf \ ++# conf/example.gitolite.rc >/dev/null || ++# die "cant find at least some files in gitolite sources/config; aborting" + + # MANUAL: make sure you have password-less (pubkey) auth on the server. + # That is, running "ssh git@server" should log in straight away, without +@@ -195,13 +194,16 @@ + + # MANUAL: if needed, make a note of the version you are upgrading from, and to + +- # record which version is being sent across; we assume it's HEAD +- git describe --tags --long HEAD 2>/dev/null > conf/VERSION || echo '(unknown)' > conf/VERSION ++ LOCAL=$(rpm -qf --qf '%{version}-%{release}' $0 2>/dev/null | ++ awk 'BEGIN {n="(unknown)"} {n=$0} END {print n}') ++ REMOTE=$(rpm -q --qf '%{version}-%{release}' gitolite) || FAIL=1 ++ ++ [ "$FAIL" ] && die "Could not determine version of gitolite installed on remote: $REMOTE" ++ + + # what was the old version there? + export upgrade_details="you are upgrading \ +- $(ssh -p $port $user@$host cat gitolite-install/conf/VERSION 2>/dev/null || echo '(or installing first-time)' ) \ +- to $(cat conf/VERSION)" ++ $REMOTE to $LOCAL" + + prompt "$upgrade_details" "$v_upgrade_details" + } +@@ -281,8 +283,8 @@ + # server, to a directory called (for example) "gitolite-install". You may + # have to create the directory first. + +- ssh -p $port $user@$host mkdir -p gitolite-install +- scp $quiet -P $port -r src conf doc hooks $user@$host:gitolite-install/ ++ #ssh -p $port $user@$host mkdir -p gitolite-install ++ #scp $quiet -P $port -r src conf doc hooks $user@$host:gitolite-install/ + + # MANUAL: now log on to the server (ssh git@server) and get a command + # line. This step is for your convenience; the script does it all from +@@ -296,13 +298,14 @@ + prompt "finding/creating gitolite rc..." "$v_edit_glrc" + + # lets try and get the file from there first ++ scp -P $port $user@$host:/usr/share/gitolite/conf/example.gitolite.rc $tmpgli &>/dev/null + if scp -P $port $user@$host:.gitolite.rc $tmpgli &>/dev/null + then + prompt " ...trying to reuse existing rc" \ + "Oh hey... you already had a '.gitolite.rc' file on the server. + Let's see if we can use that instead of the default one..." + < $tmpgli/.gitolite.rc perl -ne 'print "$1\n" if /^\s*(\$\w+) *=/' | sort > $tmpgli/glrc.old +- < conf/example.gitolite.rc perl -ne 'print "$1\n" if /^\s*(\$\w+) *=/' | sort > $tmpgli/glrc.new ++ < $tmpgli/example.gitolite.rc perl -ne 'print "$1\n" if /^\s*(\$\w+) *=/' | sort > $tmpgli/glrc.new + # msysgit doesn't have "comm". diff is not ideal for our purposes + # because we only care about differences in one direction, but we'll + # have to make do... +@@ -321,10 +324,10 @@ + # customisations as well as any new variables that the new version of + # gitolite has introduced + prompt "" "$v_upgrade_glrc" +- ${VISUAL:-${EDITOR:-vi}} conf/example.gitolite.rc $tmpgli/.gitolite.rc ++ ${VISUAL:-${EDITOR:-vi}} $tmpgli/example.gitolite.rc $tmpgli/.gitolite.rc + fi + else +- cp conf/example.gitolite.rc $tmpgli/.gitolite.rc ++ cp $tmpgli/example.gitolite.rc $tmpgli/.gitolite.rc + [[ $quiet == -q ]] || ${VISUAL:-${EDITOR:-vi}} $tmpgli/.gitolite.rc + fi + +@@ -358,7 +361,7 @@ + # MANUAL: still in the "gitolite-install" directory? Good. Run + # "src/gl-install" + +- ssh -p $port $user@$host "cd gitolite-install; src/gl-install $quiet" ++ ssh -p $port $user@$host "gl-install $quiet" + + # MANUAL: if you're upgrading, run "src/gl-compile-conf" and you're done! + # -- ignore the rest of this file for the purposes of an upgrade +@@ -419,7 +422,7 @@ + # properly. The install program does this. So cd back to the + # "gitolite-install" directory and run "src/gl-install" + +- ssh -p $port $user@$host "cd gitolite-install; src/gl-install $quiet" ++ ssh -p $port $user@$host "gl-install $quiet" + + # MANUAL: you're done! Log out of the server, come back to your + # workstation, and clone the admin repo using "git clone +@@ -454,11 +457,12 @@ + v_upgrade_details=" + \$upgrade_details + +-Note: getting '(unknown)' for the 'from' version should only happen once. +-Getting '(unknown)' for the 'to' version means you are probably installing +-from a tar file dump, not a real clone. This is not an error but it's nice to +-have those version numbers in case you need support. Try and install from a +-clone ++Note: You should have same versions of gitolite RPM packages installed both ++on server and locally. ++ ++Please report problems with RPM packaged version of gitolite to Bugzilla: ++https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=gitolite ++ + " + + v_setting_up_keypair=" +diff -U3 -r sitaramc-gitolite-367e8f8.orig/src/gl-install sitaramc-gitolite-367e8f8/src/gl-install +--- sitaramc-gitolite-367e8f8.orig/src/gl-install 2010-03-11 23:38:51.000000000 -0600 ++++ sitaramc-gitolite-367e8f8/src/gl-install 2010-03-25 06:57:43.610978182 -0500 +@@ -24,18 +24,14 @@ + # the common setup module is in the same directory as this running program is + my $bindir = $0; + $bindir =~ s/\/[^\/]+$//; +-require "$bindir/gitolite.pm"; ++require gitolite; + + # ask where the rc file is, get it, and "do" it + &where_is_rc(); + unless ($ENV{GL_RC}) { + # doesn't exist. Copy it across, tell user to edit it and come back + my $glrc = $ENV{HOME} . "/.gitolite.rc"; +- if ($GL_PACKAGE_CONF) { +- system("cp $GL_PACKAGE_CONF/example.gitolite.rc $glrc"); +- } else { +- system("cp $bindir/../conf/example.gitolite.rc $glrc"); +- } ++ system("cp /usr/share/gitolite/conf/example.gitolite.rc $glrc"); + print "created $glrc\n"; + print "please edit it, change the paths if you wish to, and RERUN THIS SCRIPT\n"; + exit; +@@ -52,18 +48,18 @@ + wrap_mkdir($repo_base_abs); + wrap_mkdir($GL_ADMINDIR); + # mkdir $GL_ADMINDIR's subdirs +-for my $dir qw(conf doc keydir logs src hooks hooks/common hooks/gitolite-admin) { ++for my $dir qw(conf keydir logs hooks hooks/common hooks/gitolite-admin) { + # some of them will stay empty; too lazy to fix right now ;-) + wrap_mkdir("$GL_ADMINDIR/$dir"); + } + + # "src" and "doc" will be overwritten on each install, but not conf +-if ($GL_PACKAGE_HOOKS) { +- system("cp -R $GL_PACKAGE_HOOKS $GL_ADMINDIR"); +-} else { +- system("cp -R $bindir/../src $bindir/../doc $bindir/../hooks $GL_ADMINDIR"); +- system("cp $bindir/../conf/VERSION $GL_ADMINDIR/conf"); +-} ++#if ($GL_PACKAGE_HOOKS) { ++# system("cp -R $GL_PACKAGE_HOOKS $GL_ADMINDIR"); ++#} else { ++# system("cp -R $bindir/../src $bindir/../doc $bindir/../hooks $GL_ADMINDIR"); ++# system("cp $bindir/../conf/VERSION $GL_ADMINDIR/conf"); ++#} + + unless (-f $GL_CONF or $GL_PACKAGE_CONF) { + print <gitolite-ed2bf5.tar.gz -Source0: gitolite-ed2bf5.tar.gz +#Source0: gitolite-ed2bf5.tar.gz +Source0: sitaramc-gitolite-367e8f8.tar.gz Source1: README # Far from being upstreamable -Patch0: gitolite-0.95-rpm.patch -Patch1: gitolite-0.95-conf.patch +Patch0: gitolite-1.3-rpm.patch +Patch1: gitolite-1.3-conf.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch @@ -50,7 +51,7 @@ elsewhere in the doc/ directory. %prep -%setup -q -c +%setup -qn sitaramc-gitolite-367e8f8 # Don't create backups; would mess with %%install %patch0 -p1 %patch1 -p1 @@ -79,7 +80,7 @@ install -d $RPM_BUILD_ROOT%{_datadir}/%{name} # Code install -p src/gl-* $RPM_BUILD_ROOT%{_bindir} install -p -m644 src/*.pm $RPM_BUILD_ROOT%{perl_vendorlib} -cp -a conf src/hooks src/ga-* $RPM_BUILD_ROOT%{_datadir}/%{name} +cp -a conf hooks $RPM_BUILD_ROOT%{_datadir}/%{name} # empty authorized_keys file touch $RPM_BUILD_ROOT%{gitolite_homedir}/.ssh/authorized_keys @@ -111,6 +112,10 @@ exit 0 %changelog +* Tue Mar 23 2010 Jon Ciesla - 1.3-1 +- Update to 1.3, BZ 576233. +- Updated rpm and conf patches accordingly. + * Tue Feb 09 2010 Till Maas - 0.95-4.20091216git - RHEL defines %%{_sharedstatedir} to be %%{_prefix}/com, so use a %%global redirection to set the homedir to a proper value (/var/lib). diff --git a/sources b/sources index 07b809a..9e49564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e59e060c2a2b0953fe927046bef40d2 gitolite-ed2bf5.tar.gz +a1ce89f161082447a0bdfbd90378d740 sitaramc-gitolite-367e8f8.tar.gz