Fri, 10 Aug 2012 14:40:03 +0200
Import package vendor original specs for necessary manipulations.
git/git-notify | file | annotate | diff | comparison | revisions | |
git/git.patch | file | annotate | diff | comparison | revisions | |
git/git.spec | file | annotate | diff | comparison | revisions | |
git/rc.git | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/git/git-notify Fri Aug 10 14:40:03 2012 +0200 1.3 @@ -0,0 +1,431 @@ 1.4 +#!/usr/bin/perl -w 1.5 +# 1.6 +# Tool to send git commit notifications 1.7 +# 1.8 +# Copyright 2005 Alexandre Julliard 1.9 +# 1.10 +# This program is free software; you can redistribute it and/or 1.11 +# modify it under the terms of the GNU General Public License as 1.12 +# published by the Free Software Foundation; either version 2 of 1.13 +# the License, or (at your option) any later version. 1.14 +# 1.15 +# 1.16 +# This script is meant to be called from .git/hooks/post-receive. 1.17 +# 1.18 +# Usage: git-notify [options] [--] old-sha1 new-sha1 refname 1.19 +# 1.20 +# -c name Send CIA notifications under specified project name 1.21 +# -m addr Send mail notifications to specified address 1.22 +# -n max Set max number of individual mails to send 1.23 +# -r name Set the git repository name 1.24 +# -s bytes Set the maximum diff size in bytes (-1 for no limit) 1.25 +# -u url Set the URL to the gitweb browser 1.26 +# -i branch If at least one -i is given, report only for specified branches 1.27 +# -x branch Exclude changes to the specified branch from reports 1.28 +# -X Exclude merge commits 1.29 +# 1.30 + 1.31 +use strict; 1.32 +use open ':utf8'; 1.33 +use Encode 'encode'; 1.34 +use Cwd 'realpath'; 1.35 + 1.36 +binmode STDIN, ':utf8'; 1.37 +binmode STDOUT, ':utf8'; 1.38 + 1.39 +sub git_config($); 1.40 +sub get_repos_name(); 1.41 + 1.42 +# some parameters you may want to change 1.43 + 1.44 +# CIA notification address 1.45 +my $cia_address = "cia\@cia.navi.cx"; 1.46 + 1.47 +# debug mode 1.48 +my $debug = 0; 1.49 + 1.50 +# configuration parameters 1.51 + 1.52 +# base URL of the gitweb repository browser (can be set with the -u option) 1.53 +my $gitweb_url = git_config( "notify.baseurl" ); 1.54 + 1.55 +# default repository name (can be changed with the -r option) 1.56 +my $repos_name = git_config( "notify.repository" ) || get_repos_name(); 1.57 + 1.58 +# max size of diffs in bytes (can be changed with the -s option) 1.59 +my $max_diff_size = git_config( "notify.maxdiff" ) || 10000; 1.60 + 1.61 +# address for mail notices (can be set with -m option) 1.62 +my $commitlist_address = git_config( "notify.mail" ); 1.63 + 1.64 +# project name for CIA notices (can be set with -c option) 1.65 +my $cia_project_name = git_config( "notify.cia" ); 1.66 + 1.67 +# max number of individual notices before falling back to a single global notice (can be set with -n option) 1.68 +my $max_individual_notices = git_config( "notify.maxnotices" ) || 100; 1.69 + 1.70 +# branches to include 1.71 +my @include_list = split /\s+/, git_config( "notify.include" ) || ""; 1.72 + 1.73 +# branches to exclude 1.74 +my @exclude_list = split /\s+/, git_config( "notify.exclude" ) || ""; 1.75 + 1.76 +# set this to something that takes "-s" 1.77 +my $mailer = git_config( "notify.mailer" ) || "/usr/bin/mail"; 1.78 + 1.79 +# Extra options to git rev-list 1.80 +my @revlist_options; 1.81 + 1.82 +sub usage() 1.83 +{ 1.84 + print "Usage: $0 [options] [--] old-sha1 new-sha1 refname\n"; 1.85 + print " -c name Send CIA notifications under specified project name\n"; 1.86 + print " -m addr Send mail notifications to specified address\n"; 1.87 + print " -n max Set max number of individual mails to send\n"; 1.88 + print " -r name Set the git repository name\n"; 1.89 + print " -s bytes Set the maximum diff size in bytes (-1 for no limit)\n"; 1.90 + print " -u url Set the URL to the gitweb browser\n"; 1.91 + print " -i branch If at least one -i is given, report only for specified branches\n"; 1.92 + print " -x branch Exclude changes to the specified branch from reports\n"; 1.93 + print " -X Exclude merge commits\n"; 1.94 + exit 1; 1.95 +} 1.96 + 1.97 +sub xml_escape($) 1.98 +{ 1.99 + my $str = shift; 1.100 + $str =~ s/&/&/g; 1.101 + $str =~ s/</</g; 1.102 + $str =~ s/>/>/g; 1.103 + my @chars = unpack "U*", $str; 1.104 + $str = join "", map { ($_ > 127) ? sprintf "&#%u;", $_ : chr($_); } @chars; 1.105 + return $str; 1.106 +} 1.107 + 1.108 +# format an integer date + timezone as string 1.109 +# algorithm taken from git's date.c 1.110 +sub format_date($$) 1.111 +{ 1.112 + my ($time,$tz) = @_; 1.113 + 1.114 + if ($tz < 0) 1.115 + { 1.116 + my $minutes = (-$tz / 100) * 60 + (-$tz % 100); 1.117 + $time -= $minutes * 60; 1.118 + } 1.119 + else 1.120 + { 1.121 + my $minutes = ($tz / 100) * 60 + ($tz % 100); 1.122 + $time += $minutes * 60; 1.123 + } 1.124 + return gmtime($time) . sprintf " %+05d", $tz; 1.125 +} 1.126 + 1.127 +# fetch a parameter from the git config file 1.128 +sub git_config($) 1.129 +{ 1.130 + my ($param) = @_; 1.131 + 1.132 + open CONFIG, "-|" or exec "git", "config", $param; 1.133 + my $ret = <CONFIG>; 1.134 + chomp $ret if $ret; 1.135 + close CONFIG or $ret = undef; 1.136 + return $ret; 1.137 +} 1.138 + 1.139 +# parse command line options 1.140 +sub parse_options() 1.141 +{ 1.142 + while (@ARGV && $ARGV[0] =~ /^-/) 1.143 + { 1.144 + my $arg = shift @ARGV; 1.145 + 1.146 + if ($arg eq '--') { last; } 1.147 + elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; } 1.148 + elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; } 1.149 + elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; } 1.150 + elsif ($arg eq '-r') { $repos_name = shift @ARGV; } 1.151 + elsif ($arg eq '-s') { $max_diff_size = shift @ARGV; } 1.152 + elsif ($arg eq '-u') { $gitweb_url = shift @ARGV; } 1.153 + elsif ($arg eq '-i') { push @include_list, shift @ARGV; } 1.154 + elsif ($arg eq '-x') { push @exclude_list, shift @ARGV; } 1.155 + elsif ($arg eq '-X') { push @revlist_options, "--no-merges"; } 1.156 + elsif ($arg eq '-d') { $debug++; } 1.157 + else { usage(); } 1.158 + } 1.159 + if (@ARGV && $#ARGV != 2) { usage(); } 1.160 + @exclude_list = map { "^$_"; } @exclude_list; 1.161 +} 1.162 + 1.163 +# send an email notification 1.164 +sub mail_notification($$$@) 1.165 +{ 1.166 + my ($name, $subject, $content_type, @text) = @_; 1.167 + $subject = encode("MIME-Q",$subject); 1.168 + if ($debug) 1.169 + { 1.170 + print "---------------------\n"; 1.171 + print "To: $name\n"; 1.172 + print "Subject: $subject\n"; 1.173 + print "Content-Type: $content_type\n"; 1.174 + print "\n", join("\n", @text), "\n"; 1.175 + } 1.176 + else 1.177 + { 1.178 + my $pid = open MAIL, "|-"; 1.179 + return unless defined $pid; 1.180 + if (!$pid) 1.181 + { 1.182 + exec $mailer, "-s", $subject, "-a", "Content-Type: $content_type", $name or die "Cannot exec $mailer"; 1.183 + } 1.184 + print MAIL join("\n", @text), "\n"; 1.185 + close MAIL; 1.186 + } 1.187 +} 1.188 + 1.189 +# get the default repository name 1.190 +sub get_repos_name() 1.191 +{ 1.192 + my $dir = `git rev-parse --git-dir`; 1.193 + chomp $dir; 1.194 + my $repos = realpath($dir); 1.195 + $repos =~ s/(.*?)((\.git\/)?\.git)$/$1/; 1.196 + $repos =~ s/(.*)\/([^\/]+)\/?$/$2/; 1.197 + return $repos; 1.198 +} 1.199 + 1.200 +# extract the information from a commit or tag object and return a hash containing the various fields 1.201 +sub get_object_info($) 1.202 +{ 1.203 + my $obj = shift; 1.204 + my %info = (); 1.205 + my @log = (); 1.206 + my $do_log = 0; 1.207 + 1.208 + open TYPE, "-|" or exec "git", "cat-file", "-t", $obj or die "cannot run git-cat-file"; 1.209 + my $type = <TYPE>; 1.210 + chomp $type; 1.211 + close TYPE; 1.212 + 1.213 + open OBJ, "-|" or exec "git", "cat-file", $type, $obj or die "cannot run git-cat-file"; 1.214 + while (<OBJ>) 1.215 + { 1.216 + chomp; 1.217 + if ($do_log) 1.218 + { 1.219 + last if /^-----BEGIN PGP SIGNATURE-----/; 1.220 + push @log, $_; 1.221 + } 1.222 + elsif (/^(author|committer|tagger) ((.*)(<.*>)) (\d+) ([+-]\d+)$/) 1.223 + { 1.224 + $info{$1} = $2; 1.225 + $info{$1 . "_name"} = $3; 1.226 + $info{$1 . "_email"} = $4; 1.227 + $info{$1 . "_date"} = $5; 1.228 + $info{$1 . "_tz"} = $6; 1.229 + } 1.230 + elsif (/^tag (.*)$/) 1.231 + { 1.232 + $info{"tag"} = $1; 1.233 + } 1.234 + elsif (/^$/) { $do_log = 1; } 1.235 + } 1.236 + close OBJ; 1.237 + 1.238 + $info{"type"} = $type; 1.239 + $info{"log"} = \@log; 1.240 + return %info; 1.241 +} 1.242 + 1.243 +# send a commit notice to a mailing list 1.244 +sub send_commit_notice($$) 1.245 +{ 1.246 + my ($ref,$obj) = @_; 1.247 + my %info = get_object_info($obj); 1.248 + my @notice = (); 1.249 + my $subject; 1.250 + 1.251 + if ($info{"type"} eq "tag") 1.252 + { 1.253 + push @notice, 1.254 + "Module: $repos_name", 1.255 + "Branch: $ref", 1.256 + "Tag: $obj", 1.257 + $gitweb_url ? "URL: $gitweb_url/?a=tag;h=$obj\n" : "", 1.258 + "Tagger: " . $info{"tagger"}, 1.259 + "Date: " . format_date($info{"tagger_date"},$info{"tagger_tz"}), 1.260 + "", 1.261 + join "\n", @{$info{"log"}}; 1.262 + $subject = "Tag " . $info{"tag"} . " : " . $info{"tagger_name"} . ": " . ${$info{"log"}}[0]; 1.263 + } 1.264 + else 1.265 + { 1.266 + push @notice, 1.267 + "Module: $repos_name", 1.268 + "Branch: $ref", 1.269 + "Commit: $obj", 1.270 + $gitweb_url ? "URL: $gitweb_url/?a=commit;h=$obj\n" : "", 1.271 + "Author: " . $info{"author"}, 1.272 + "Date: " . format_date($info{"author_date"},$info{"author_tz"}), 1.273 + "", 1.274 + join "\n", @{$info{"log"}}, 1.275 + "", 1.276 + "---", 1.277 + ""; 1.278 + 1.279 + open STAT, "-|" or exec "git", "diff-tree", "--stat", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree"; 1.280 + push @notice, join("", <STAT>); 1.281 + close STAT; 1.282 + 1.283 + open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree"; 1.284 + my $diff = join( "", <DIFF> ); 1.285 + close DIFF; 1.286 + 1.287 + if (($max_diff_size == -1) || (length($diff) < $max_diff_size)) 1.288 + { 1.289 + push @notice, $diff; 1.290 + } 1.291 + else 1.292 + { 1.293 + push @notice, "Diff: $gitweb_url/?a=commitdiff;h=$obj" if $gitweb_url; 1.294 + } 1.295 + 1.296 + $subject = $info{"author_name"} . ": " . ${$info{"log"}}[0]; 1.297 + } 1.298 + 1.299 + mail_notification($commitlist_address, $subject, "text/plain; charset=UTF-8", @notice); 1.300 +} 1.301 + 1.302 +# send a commit notice to the CIA server 1.303 +sub send_cia_notice($$) 1.304 +{ 1.305 + my ($ref,$commit) = @_; 1.306 + my %info = get_object_info($commit); 1.307 + my @cia_text = (); 1.308 + 1.309 + return if $info{"type"} ne "commit"; 1.310 + 1.311 + push @cia_text, 1.312 + "<message>", 1.313 + " <generator>", 1.314 + " <name>git-notify script for CIA</name>", 1.315 + " </generator>", 1.316 + " <source>", 1.317 + " <project>" . xml_escape($cia_project_name) . "</project>", 1.318 + " <module>" . xml_escape($repos_name) . "</module>", 1.319 + " <branch>" . xml_escape($ref). "</branch>", 1.320 + " </source>", 1.321 + " <body>", 1.322 + " <commit>", 1.323 + " <revision>" . substr($commit,0,10) . "</revision>", 1.324 + " <author>" . xml_escape($info{"author"}) . "</author>", 1.325 + " <log>" . xml_escape(join "\n", @{$info{"log"}}) . "</log>", 1.326 + " <files>"; 1.327 + 1.328 + open COMMIT, "-|" or exec "git", "diff-tree", "--name-status", "-r", "-M", $commit or die "cannot run git-diff-tree"; 1.329 + while (<COMMIT>) 1.330 + { 1.331 + chomp; 1.332 + if (/^([AMD])\t(.*)$/) 1.333 + { 1.334 + my ($action, $file) = ($1, $2); 1.335 + my %actions = ( "A" => "add", "M" => "modify", "D" => "remove" ); 1.336 + next unless defined $actions{$action}; 1.337 + push @cia_text, " <file action=\"$actions{$action}\">" . xml_escape($file) . "</file>"; 1.338 + } 1.339 + elsif (/^R\d+\t(.*)\t(.*)$/) 1.340 + { 1.341 + my ($old, $new) = ($1, $2); 1.342 + push @cia_text, " <file action=\"rename\" to=\"" . xml_escape($new) . "\">" . xml_escape($old) . "</file>"; 1.343 + } 1.344 + } 1.345 + close COMMIT; 1.346 + 1.347 + push @cia_text, 1.348 + " </files>", 1.349 + $gitweb_url ? " <url>" . xml_escape("$gitweb_url/?a=commit;h=$commit") . "</url>" : "", 1.350 + " </commit>", 1.351 + " </body>", 1.352 + " <timestamp>" . $info{"author_date"} . "</timestamp>", 1.353 + "</message>"; 1.354 + 1.355 + mail_notification($cia_address, "DeliverXML", "text/xml", @cia_text); 1.356 +} 1.357 + 1.358 +# send a global commit notice when there are too many commits for individual mails 1.359 +sub send_global_notice($$$) 1.360 +{ 1.361 + my ($ref, $old_sha1, $new_sha1) = @_; 1.362 + my @notice = (); 1.363 + 1.364 + push @revlist_options, "--pretty"; 1.365 + open LIST, "-|" or exec "git", "rev-list", @revlist_options, "^$old_sha1", "$new_sha1", @exclude_list or die "cannot exec git-rev-list"; 1.366 + while (<LIST>) 1.367 + { 1.368 + chomp; 1.369 + s/^commit /URL: $gitweb_url\/?a=commit;h=/ if $gitweb_url; 1.370 + push @notice, $_; 1.371 + } 1.372 + close LIST; 1.373 + 1.374 + mail_notification($commitlist_address, "New commits on branch $ref", "text/plain; charset=UTF-8", @notice); 1.375 +} 1.376 + 1.377 +# send all the notices 1.378 +sub send_all_notices($$$) 1.379 +{ 1.380 + my ($old_sha1, $new_sha1, $ref) = @_; 1.381 + 1.382 + $ref =~ s/^refs\/heads\///; 1.383 + 1.384 + return if (@include_list && !grep {$_ eq $ref} @include_list); 1.385 + 1.386 + if ($old_sha1 eq '0' x 40) # new ref 1.387 + { 1.388 + send_commit_notice( $ref, $new_sha1 ) if $commitlist_address; 1.389 + return; 1.390 + } 1.391 + 1.392 + my @commits = (); 1.393 + 1.394 + open LIST, "-|" or exec "git", "rev-list", @revlist_options, "^$old_sha1", "$new_sha1", @exclude_list or die "cannot exec git-rev-list"; 1.395 + while (<LIST>) 1.396 + { 1.397 + chomp; 1.398 + die "invalid commit $_" unless /^[0-9a-f]{40}$/; 1.399 + unshift @commits, $_; 1.400 + } 1.401 + close LIST; 1.402 + 1.403 + if (@commits > $max_individual_notices) 1.404 + { 1.405 + send_global_notice( $ref, $old_sha1, $new_sha1 ) if $commitlist_address; 1.406 + return; 1.407 + } 1.408 + 1.409 + foreach my $commit (@commits) 1.410 + { 1.411 + send_commit_notice( $ref, $commit ) if $commitlist_address; 1.412 + send_cia_notice( $ref, $commit ) if $cia_project_name; 1.413 + } 1.414 +} 1.415 + 1.416 +parse_options(); 1.417 + 1.418 +# append repository path to URL 1.419 +$gitweb_url .= "/$repos_name.git" if $gitweb_url; 1.420 + 1.421 +if (@ARGV) 1.422 +{ 1.423 + send_all_notices( $ARGV[0], $ARGV[1], $ARGV[2] ); 1.424 +} 1.425 +else # read them from stdin 1.426 +{ 1.427 + while (<>) 1.428 + { 1.429 + chomp; 1.430 + if (/^([0-9a-f]{40}) ([0-9a-f]{40}) (.*)$/) { send_all_notices( $1, $2, $3 ); } 1.431 + } 1.432 +} 1.433 + 1.434 +exit 0;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/git/git.patch Fri Aug 10 14:40:03 2012 +0200 2.3 @@ -0,0 +1,186 @@ 2.4 +Index: cogito-0.18.2/Makefile 2.5 +--- cogito-0.18.2/Makefile.orig 2006-11-17 01:37:24.000000000 +0100 2.6 ++++ cogito-0.18.2/Makefile 2012-06-18 16:02:16.000000000 +0200 2.7 +@@ -2,8 +2,8 @@ 2.8 + prefix="$(HOME)" 2.9 + 2.10 + bindir=$(prefix)/bin 2.11 +-libdir=$(prefix)/lib/cogito 2.12 +-sharedir=$(prefix)/share/cogito 2.13 ++libdir=$(prefix)/lib/git/cogito 2.14 ++sharedir=$(prefix)/share/git/cogito 2.15 + 2.16 + INSTALL?=install 2.17 + 2.18 +Index: gc-utils/doc/Makefile 2.19 +--- gc-utils/doc/Makefile.orig 2008-08-01 17:39:15.000000000 +0200 2.20 ++++ gc-utils/doc/Makefile 2012-06-18 16:02:16.000000000 +0200 2.21 +@@ -29,17 +29,17 @@ 2.22 + 2.23 + .PHONY: gen install clean uninstall 2.24 + 2.25 +-gen:: $(manpagesgz) 2.26 ++gen:: $(manpages) 2.27 + 2.28 + $(manpagesgz): 2.29 + $(QUIET_GEN) cat $(@:../build/%.1.gz=%.1) | sed -e 's,\$$VERSION\$$,$(VERSION_SQ),' | gzip -9 > $@ 2.30 + 2.31 +-install: $(manpagesgz) 2.32 ++install: $(manpages) 2.33 + @$(MKINSTALLDIRS) $(DESTDIR)$(man1dir) 2.34 + ifndef V 2.35 +- @$(foreach f, $(manpagesgz), $(QUIET_INSTALL) $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;) 2.36 ++ @$(foreach f, $(manpages), $(QUIET_INSTALL) $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;) 2.37 + else 2.38 +- $(foreach f, $(manpagesgz), $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;) 2.39 ++ $(foreach f, $(manpages), $(INSTALL) -m644 $f "$(DESTDIR)$(man1dir)/$(f:../build/%=%)" ;) 2.40 + endif 2.41 + 2.42 + uninstall: 2.43 +Index: git-1.7.11.4/Documentation/Makefile 2.44 +--- git-1.7.11.4/Documentation/Makefile.orig 2012-06-18 00:01:30.000000000 +0200 2.45 ++++ git-1.7.11.4/Documentation/Makefile 2012-06-18 16:02:16.000000000 +0200 2.46 +@@ -56,10 +56,10 @@ 2.47 + infodir?=$(prefix)/share/info 2.48 + MAKEINFO=makeinfo 2.49 + INSTALL_INFO=install-info 2.50 +-DOCBOOK2X_TEXI=docbook2x-texi 2.51 ++DOCBOOK2X_TEXI=docbook2texi 2.52 + DBLATEX=dblatex 2.53 + ifndef PERL_PATH 2.54 +- PERL_PATH = /usr/bin/perl 2.55 ++ PERL_PATH = perl 2.56 + endif 2.57 + 2.58 + -include ../config.mak.autogen 2.59 +Index: git-1.7.11.4/Makefile 2.60 +--- git-1.7.11.4/Makefile.orig 2012-06-18 00:01:30.000000000 +0200 2.61 ++++ git-1.7.11.4/Makefile 2012-06-18 16:02:16.000000000 +0200 2.62 +@@ -339,12 +339,12 @@ 2.63 + bindir = $(prefix)/$(bindir_relative) 2.64 + mandir = share/man 2.65 + infodir = share/info 2.66 +-gitexecdir = libexec/git-core 2.67 ++gitexecdir = libexec/git 2.68 + mergetoolsdir = $(gitexecdir)/mergetools 2.69 + sharedir = $(prefix)/share 2.70 + gitwebdir = $(sharedir)/gitweb 2.71 + localedir = $(sharedir)/locale 2.72 +-template_dir = share/git-core/templates 2.73 ++template_dir = share/git/templates 2.74 + htmldir = share/doc/git-doc 2.75 + ETC_GITCONFIG = $(sysconfdir)/gitconfig 2.76 + ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes 2.77 +@@ -1455,10 +1455,10 @@ 2.78 + else 2.79 + ifdef CURLDIR 2.80 + # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. 2.81 +- BASIC_CFLAGS += -I$(CURLDIR)/include 2.82 +- CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl 2.83 ++ BASIC_CFLAGS += `$(CURLDIR)/bin/curl-config --cflags` 2.84 ++ CURL_LIBCURL = `$(CURLDIR)/bin/curl-config --libs` 2.85 + else 2.86 +- CURL_LIBCURL = -lcurl 2.87 ++ CURL_LIBCURL = -lcurl -lssl -lcrypto 2.88 + endif 2.89 + ifdef NEEDS_SSL_WITH_CURL 2.90 + CURL_LIBCURL += -lssl 2.91 +@@ -2553,6 +2553,12 @@ 2.92 + $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' 2.93 + $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' 2.94 + $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' 2.95 ++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(prefix)/lib' 2.96 ++ $(INSTALL) -m 644 $(LIB_FILE) '$(DESTDIR_SQ)$(prefix)/lib/libgit.a' 2.97 ++ $(INSTALL) -m 644 $(XDIFF_LIB) '$(DESTDIR_SQ)$(prefix)/lib/libgit-xdiff.a' 2.98 ++ $(INSTALL) -m 644 $(VCSSVN_LIB) '$(DESTDIR_SQ)$(prefix)/lib/libgit-vcssvn.a' 2.99 ++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(prefix)/include/git' 2.100 ++ for h in $(LIB_H); do b=`echo $$h | sed -e 's;/*[^/][^/]*$$;;'`; $(INSTALL) -d -m 755 $(DESTDIR_SQ)$(prefix)/include/git/$$b; $(INSTALL) -m 644 $$h $(DESTDIR_SQ)$(prefix)/include/git/$$h; done 2.101 + $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install 2.102 + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' 2.103 + $(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' 2.104 +Index: git-1.7.11.4/config.mak.in 2.105 +--- git-1.7.11.4/config.mak.in.orig 2012-06-18 00:01:30.000000000 +0200 2.106 ++++ git-1.7.11.4/config.mak.in 2012-06-18 16:02:16.000000000 +0200 2.107 +@@ -15,9 +15,9 @@ 2.108 + prefix = @prefix@ 2.109 + exec_prefix = @exec_prefix@ 2.110 + bindir = @bindir@ 2.111 +-gitexecdir = @libexecdir@/git-core 2.112 ++gitexecdir = @libexecdir@/git 2.113 + datarootdir = @datarootdir@ 2.114 +-template_dir = @datadir@/git-core/templates 2.115 ++template_dir = @datadir@/git/templates 2.116 + sysconfdir = @sysconfdir@ 2.117 + 2.118 + mandir=@mandir@ 2.119 +Index: git-1.7.11.4/perl/Makefile.PL 2.120 +--- git-1.7.11.4/perl/Makefile.PL.orig 2012-06-18 00:01:30.000000000 +0200 2.121 ++++ git-1.7.11.4/perl/Makefile.PL 2012-06-18 16:02:16.000000000 +0200 2.122 +@@ -55,5 +55,6 @@ 2.123 + PM => \%pm, 2.124 + PM_FILTER => qq[\$(PERL) -pe "s<\\Q++LOCALEDIR++\\E><$localedir>"], 2.125 + MAKEFILE => 'perl.mak', 2.126 +- INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3' 2.127 ++ INSTALLDIRS => 'vendor', 2.128 ++ INSTALLSITEMAN3DIR => '$(SITEPREFIX)/man/man3' 2.129 + ); 2.130 +Index: git-1.7.11.4/sha1_file.c 2.131 +--- git-1.7.11.4/sha1_file.c.orig 2012-06-18 00:01:30.000000000 +0200 2.132 ++++ git-1.7.11.4/sha1_file.c 2012-06-18 16:32:16.000000000 +0200 2.133 +@@ -20,6 +20,7 @@ 2.134 + #include "sha1-lookup.h" 2.135 + #include "bulk-checkin.h" 2.136 + #include "streaming.h" 2.137 ++#include <sys/resource.h> 2.138 + 2.139 + #ifndef O_NOATIME 2.140 + #if defined(__linux__) && (defined(__i386__) || defined(__PPC__)) 2.141 +Index: git-1.7.11.4/templates/Makefile 2.142 +--- git-1.7.11.4/templates/Makefile.orig 2012-06-18 00:01:30.000000000 +0200 2.143 ++++ git-1.7.11.4/templates/Makefile 2012-06-18 16:02:16.000000000 +0200 2.144 +@@ -8,7 +8,7 @@ 2.145 + TAR ?= tar 2.146 + RM ?= rm -f 2.147 + prefix ?= $(HOME) 2.148 +-template_instdir ?= $(prefix)/share/git-core/templates 2.149 ++template_instdir ?= $(prefix)/share/git/templates 2.150 + # DESTDIR= 2.151 + 2.152 + ifndef SHELL_PATH 2.153 +Index: stgit-0.14.3/setup.py 2.154 +--- stgit-0.14.3/setup.py.orig 2008-06-09 00:26:03.000000000 +0200 2.155 ++++ stgit-0.14.3/setup.py 2012-06-18 16:02:16.000000000 +0200 2.156 +@@ -61,10 +61,10 @@ 2.157 + long_description = 'Push/pop utility on top of GIT', 2.158 + scripts = ['stg'], 2.159 + packages = ['stgit', 'stgit.commands'], 2.160 +- data_files = [('share/stgit/templates', glob.glob('templates/*.tmpl')), 2.161 +- ('share/stgit/examples', glob.glob('examples/*.tmpl')), 2.162 +- ('share/stgit/examples', ['examples/gitconfig']), 2.163 +- ('share/stgit/contrib', ['contrib/diffcol.sh', 2.164 ++ data_files = [('share/git/stgit/templates', glob.glob('templates/*.tmpl')), 2.165 ++ ('share/git/stgit/examples', glob.glob('examples/*.tmpl')), 2.166 ++ ('share/git/stgit/examples', ['examples/gitconfig']), 2.167 ++ ('share/git/stgit/contrib', ['contrib/diffcol.sh', 2.168 + 'contrib/stgbashprompt.sh', 2.169 + 'contrib/stgit-completion.bash']), 2.170 + ('share/doc/stgit', glob.glob('doc/*.txt'))] 2.171 +Index: stgit-0.14.3/stg 2.172 +--- stgit-0.14.3/stg.orig 2006-04-07 23:38:54.000000000 +0200 2.173 ++++ stgit-0.14.3/stg 2012-06-18 16:02:16.000000000 +0200 2.174 +@@ -26,12 +26,13 @@ 2.175 + # It is assumed that the user installed StGIT using the --prefix= option 2.176 + prefix, bin = os.path.split(sys.path[0]) 2.177 + 2.178 +-if bin == 'bin' and prefix != sys.prefix: 2.179 ++if bin == 'bin': 2.180 + sys.prefix = prefix 2.181 + sys.exec_prefix = prefix 2.182 + 2.183 + major, minor = sys.version_info[0:2] 2.184 +- local_path = [os.path.join(prefix, 'lib', 'python'), 2.185 ++ local_path = [os.path.join(prefix, 'lib', 'git'), 2.186 ++ os.path.join(prefix, 'lib', 'python'), 2.187 + os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor)), 2.188 + os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor), 2.189 + 'site-packages')]
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/git/git.spec Fri Aug 10 14:40:03 2012 +0200 3.3 @@ -0,0 +1,359 @@ 3.4 +## 3.5 +## git.spec -- OpenPKG RPM Package Specification 3.6 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 3.7 +## 3.8 +## Permission to use, copy, modify, and distribute this software for 3.9 +## any purpose with or without fee is hereby granted, provided that 3.10 +## the above copyright notice and this permission notice appear in all 3.11 +## copies. 3.12 +## 3.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 3.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 3.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 3.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 3.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 3.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 3.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 3.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 3.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3.24 +## SUCH DAMAGE. 3.25 +## 3.26 + 3.27 +# package version 3.28 +%define V_git 1.7.11.4 3.29 +%define V_cogito 0.18.2 3.30 +%define V_stgit 0.14.3 3.31 +%define V_guilt 0.35 3.32 +%define V_tig 1.0 3.33 +%define V_gcutils 0.2.3 3.34 + 3.35 +# package information 3.36 +Name: git 3.37 +Summary: Distributed Version Control System 3.38 +URL: http://git-scm.com/ 3.39 +Vendor: Linus Torvalds, Junio C Hamano 3.40 +Packager: OpenPKG Foundation e.V. 3.41 +Distribution: OpenPKG Community 3.42 +Class: EVAL 3.43 +Group: SCM 3.44 +License: GPL 3.45 +Version: %{V_git} 3.46 +Release: 20120731 3.47 + 3.48 +# package options 3.49 +%option with_doc no 3.50 +%option with_cogito no 3.51 +%option with_stgit no 3.52 +%option with_guilt no 3.53 +%option with_tig no 3.54 +%option with_gcutils no 3.55 +%option with_svn no 3.56 + 3.57 +# list of sources 3.58 +Source0: http://git-core.googlecode.com/files/git-%{V_git}.tar.gz 3.59 +Source1: http://www.kernel.org/pub/software/scm/cogito/cogito-%{V_cogito}.tar.gz 3.60 +Source2: http://homepage.ntlworld.com/cmarinas/stgit/stgit-%{V_stgit}.tar.gz 3.61 +Source3: http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-%{V_guilt}.tar.gz 3.62 +Source4: http://jonas.nitro.dk/tig/releases/tig-%{V_tig}.tar.gz 3.63 +Source5: http://switch.dl.sourceforge.net/gcutils/gcutils-v%{V_gcutils}.tar.gz 3.64 +Source6: rc.git 3.65 +Source7: git-notify 3.66 +Patch0: git.patch 3.67 + 3.68 +# build information 3.69 +BuildPreReq: OpenPKG, openpkg >= 20100101 3.70 +PreReq: OpenPKG, openpkg >= 20100101 3.71 +BuildPreReq: gcc, make, perl-openpkg 3.72 +%if "%{with_doc}" == "yes" 3.73 +BuildPreReq: asciidoc, xmlto 3.74 +%endif 3.75 +BuildPreReq: bash, perl, diffutils 3.76 +PreReq: bash, perl, diffutils 3.77 +BuildPreReq: zlib, openssl, curl, expat, libiconv, pcre 3.78 +PreReq: zlib, openssl, curl, expat, libiconv, pcre 3.79 +BuildPreReq: python 3.80 +PreReq: python 3.81 +%if "%{with_tig}" == "yes" 3.82 +BuildPreReq: ncurses 3.83 +PreReq: ncurses 3.84 +%endif 3.85 +%if "%{with_gcutils}" == "yes" 3.86 +BuildPreReq: gzip 3.87 +%endif 3.88 +%if "%{with_svn}" == "yes" 3.89 +PreReq: subversion-perl 3.90 +%endif 3.91 + 3.92 +%description 3.93 + GIT is a "directory content manager" designed to handle absolutely 3.94 + massive projects with speed and efficiency. GIT falls in the 3.95 + category of distributed source code management tools. Every GIT 3.96 + working directory is a full-fledged repository with full revision 3.97 + tracking capabilities, not dependent on network access to a central 3.98 + server. 3.99 + 3.100 + This package contains both the low-level GIT core components and 3.101 + optionally the high-level GIT frontends Cogito, StGIT and Guilt. 3.102 + 3.103 +%track 3.104 + prog git:git = { 3.105 + version = %{V_git} 3.106 + url = http://code.google.com/p/git-core/downloads/list 3.107 + regex = git-(\d+(\.\d+)+)\.tar\.gz 3.108 + } 3.109 + prog git:cogito = { 3.110 + version = %{V_cogito} 3.111 + url = http://www.kernel.org/pub/software/scm/cogito/ 3.112 + regex = cogito-(__VER__)\.tar\.gz 3.113 + } 3.114 + prog git:stgit = { 3.115 + version = %{V_stgit} 3.116 + url = http://homepage.ntlworld.com/cmarinas/stgit/ 3.117 + regex = stgit-(__VER__)\.tar\.gz 3.118 + } 3.119 + prog git:guilt = { 3.120 + version = %{V_guilt} 3.121 + url = http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/ 3.122 + regex = guilt-(__VER__)\.tar\.gz 3.123 + } 3.124 + prog git:tig = { 3.125 + version = %{V_tig} 3.126 + url = http://jonas.nitro.dk/tig/releases/ 3.127 + regex = tig-(__VER__)\.tar\.gz 3.128 + } 3.129 + prog git:gcutils = { 3.130 + version = %{V_gcutils} 3.131 + url = http://sourceforge.net/projects/gcutils/files/ 3.132 + regex = gcutils-v(__VER__)\.tar\.gz 3.133 + } 3.134 + 3.135 +%prep 3.136 + %setup -q -c 3.137 + %setup -q -T -D -a 1 3.138 + %setup -q -T -D -a 2 3.139 + %setup -q -T -D -a 3 3.140 + %setup -q -T -D -a 4 3.141 + %setup -q -T -D -a 5 3.142 + %patch -p0 3.143 + 3.144 +%build 3.145 + # build GIT core 3.146 + ( cd git-%{V_git} 3.147 + find . -name "*.[ch]" -print |\ 3.148 + xargs %{l_shtool} subst \ 3.149 + -e 's;struct option;struct git_option;g' 3.150 + ( echo "GITWEB_CONFIG = %{l_prefix}/etc/git/gitweb.config.pl" 3.151 + echo "GITWEB_BASE_URL = /openpkg-cgi/gitweb.d" 3.152 + echo "GITWEB_CSS = /openpkg-cgi/gitweb.d/static/gitweb.css" 3.153 + echo "GITWEB_JS = /openpkg-cgi/gitweb.d/static/gitweb.js" 3.154 + echo "GITWEB_LOGO = /openpkg-cgi/gitweb.d/static/git-logo.png" 3.155 + echo "GITWEB_FAVICON = /openpkg-cgi/gitweb.d/static/git-favicon.png" 3.156 + echo "GITWEB_PROJECTROOT = %{l_prefix}/var/git" 3.157 + echo "PYTHON_PATH = %{l_prefix}/bin/python" 3.158 + echo "NEEDS_CRYPTO_WITH_SSL = YesPlease" 3.159 + ) >config.mak 3.160 + ( echo "ac_cv_header_libintl_h=no" 3.161 + ) >config.cache 3.162 + CC="%{l_cc}" \ 3.163 + CFLAGS="%{l_cflags -O}" \ 3.164 + CPPFLAGS="%{l_cppflags}" \ 3.165 + LDFLAGS="%{l_ldflags}" \ 3.166 + LIBS="-lssl -lcrypto -lz" \ 3.167 + ./configure \ 3.168 + --cache-file=./config.cache \ 3.169 + --prefix=%{l_prefix} \ 3.170 + --mandir=%{l_prefix}/man \ 3.171 + --with-gitconfig=%{l_prefix}/etc/git/gitconfig \ 3.172 + --with-gitattributes=%{l_prefix}/etc/git/gitattributes \ 3.173 + --with-openssl=%{l_prefix} \ 3.174 + --with-libpcre=%{l_prefix} \ 3.175 + --with-curl=%{l_prefix} \ 3.176 + --with-expat=%{l_prefix} \ 3.177 + --with-iconv=%{l_prefix} \ 3.178 + --with-zlib=%{l_prefix} \ 3.179 + --with-shell=%{l_prefix}/bin/bash \ 3.180 + --with-perl=%{l_prefix}/bin/perl \ 3.181 + --without-python \ 3.182 + --without-tcltk \ 3.183 + --disable-pthreads 3.184 + %{l_make} %{l_mflags} 3.185 +%if "%{with_doc}" == "yes" 3.186 + ( cd Documentation 3.187 + %{l_make} %{l_mflags} man 3.188 + ) || exit $? 3.189 +%endif 3.190 + ) || exit $? 3.191 + 3.192 + # build Cogito frontend 3.193 +%if "%{with_cogito}" == "yes" 3.194 + ( cd cogito-%{V_cogito} 3.195 + %{l_make} %{l_mflags} \ 3.196 + prefix=%{l_prefix} 3.197 + ) || exit $? 3.198 +%endif 3.199 + 3.200 + # build Guilt add-on 3.201 +%if "%{with_guilt}" == "yes" 3.202 + ( cd guilt-%{V_guilt} 3.203 + %{l_shtool} subst \ 3.204 + -e 's;/bin/sh;%{l_prefix}/bin/bash;g' \ 3.205 + guilt* 3.206 + ) || exit $? 3.207 +%endif 3.208 + 3.209 + # build Tig add-on 3.210 +%if "%{with_tig}" == "yes" 3.211 + ( cd tig-%{V_tig} 3.212 + CC="%{l_cc}" \ 3.213 + CFLAGS="%{l_cflags -O}" \ 3.214 + CPPFLAGS="%{l_cppflags ncurses .}" \ 3.215 + LDFLAGS="%{l_ldflags}" \ 3.216 + ./configure \ 3.217 + --prefix=%{l_prefix} \ 3.218 + --mandir=%{l_prefix}/man \ 3.219 + --with-libiconv=%{l_prefix} 3.220 + %{l_make} %{l_mflags} 3.221 + ) || exit $? 3.222 +%endif 3.223 + 3.224 + # build GC-Utils add-on 3.225 +%if "%{with_gcutils}" == "yes" 3.226 + ( cd gc-utils 3.227 + %{l_make} %{l_mflags} \ 3.228 + prefix=%{l_prefix} \ 3.229 + mandir=%{l_prefix}/man 3.230 + ) || exit $? 3.231 +%endif 3.232 + 3.233 +%install 3.234 + # install GIT core 3.235 + ( cd git-%{V_git} 3.236 + %{l_make} %{l_mflags} install \ 3.237 + DESTDIR=$RPM_BUILD_ROOT 3.238 +%if "%{with_doc}" == "yes" 3.239 + ( cd Documentation 3.240 + %{l_shtool} mkdir -f -p -m 755 \ 3.241 + $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ 3.242 + $RPM_BUILD_ROOT%{l_prefix}/man/man5 \ 3.243 + $RPM_BUILD_ROOT%{l_prefix}/man/man7 3.244 + %{l_shtool} install -c -m 644 \ 3.245 + *.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ 3.246 + %{l_shtool} install -c -m 644 \ 3.247 + *.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ 3.248 + %{l_shtool} install -c -m 644 \ 3.249 + *.7 $RPM_BUILD_ROOT%{l_prefix}/man/man7/ 3.250 + ) || exit $? 3.251 +%endif 3.252 +%if "%{with_svn}" != "yes" 3.253 + rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/git/git-svn 3.254 +%endif 3.255 + ) || exit $? 3.256 + 3.257 + # install git-notify(1) addon utility 3.258 + %{l_shtool} install -c -m 755 \ 3.259 + -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \ 3.260 + %{SOURCE git-notify} \ 3.261 + $RPM_BUILD_ROOT%{l_prefix}/bin/ 3.262 + 3.263 + # install GIT web interface 3.264 + %{l_shtool} mkdir -f -p -m 755 \ 3.265 + $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d/static \ 3.266 + $RPM_BUILD_ROOT%{l_prefix}/etc/git 3.267 + %{l_shtool} install -c -m 755 \ 3.268 + git-%{V_git}/gitweb/gitweb.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/ 3.269 + %{l_shtool} install -c -m 644 \ 3.270 + git-%{V_git}/gitweb/static/* \ 3.271 + $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d/static/ 3.272 + ( echo "##" 3.273 + echo "## gitweb.config.pl -- gitweb Perl configuration " 3.274 + echo "##" 3.275 + echo "" 3.276 + echo "1;" 3.277 + ) >gitweb.config.pl 3.278 + %{l_shtool} install -c -m 755 \ 3.279 + gitweb.config.pl $RPM_BUILD_ROOT%{l_prefix}/etc/git/ 3.280 + 3.281 + # provide HTTP backend CGI under canonical path for Apache 3.282 + ln $RPM_BUILD_ROOT%{l_prefix}/libexec/git/git-http-backend \ 3.283 + $RPM_BUILD_ROOT%{l_prefix}/cgi/git-http-backend 3.284 + 3.285 + # install GIT bash programmable completion 3.286 + %{l_shtool} install -c -m 644 \ 3.287 + git-%{V_git}/contrib/completion/git-completion.bash \ 3.288 + $RPM_BUILD_ROOT%{l_prefix}/etc/git/git.bashrc 3.289 + 3.290 + # install Cogito frontend 3.291 +%if "%{with_cogito}" == "yes" 3.292 + ( cd cogito-%{V_cogito} 3.293 + %{l_make} %{l_mflags} install \ 3.294 + INSTALL="%{l_shtool} install" \ 3.295 + DESTDIR=$RPM_BUILD_ROOT \ 3.296 + prefix=%{l_prefix} 3.297 + ) || exit $? 3.298 +%endif 3.299 + 3.300 + # install StGIT add-on 3.301 +%if "%{with_stgit}" == "yes" 3.302 + ( cd stgit-%{V_stgit} 3.303 + PATH="`pwd`/../git-%{V_git}:$PATH" 3.304 + %{l_prefix}/bin/python setup.py install \ 3.305 + --root=$RPM_BUILD_ROOT \ 3.306 + --prefix=%{l_prefix} \ 3.307 + --install-lib=%{l_prefix}/lib/git 3.308 + ) || exit $? 3.309 +%endif 3.310 + 3.311 + # install Guilt add-on 3.312 +%if "%{with_guilt}" == "yes" 3.313 + ( cd guilt-%{V_guilt} 3.314 + %{l_make} %{l_mflags} install \ 3.315 + PREFIX=$RPM_BUILD_ROOT%{l_prefix} 3.316 + ) || exit $? 3.317 +%endif 3.318 + 3.319 + # install Tig add-on 3.320 +%if "%{with_tig}" == "yes" 3.321 + ( cd tig-%{V_tig} 3.322 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 3.323 + ) || exit $? 3.324 +%endif 3.325 + 3.326 + # install GC-Utils add-on 3.327 +%if "%{with_gcutils}" == "yes" 3.328 + ( cd gc-utils 3.329 + %{l_make} %{l_mflags} \ 3.330 + prefix=$RPM_BUILD_ROOT%{l_prefix} \ 3.331 + mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ 3.332 + install 3.333 + ) || exit $? 3.334 +%endif 3.335 + 3.336 + # install run-command script 3.337 + %{l_shtool} mkdir -f -p -m 755 \ 3.338 + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 3.339 + %{l_shtool} install -c -m 755 %{l_value -s -a} \ 3.340 + %{SOURCE rc.git} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 3.341 + 3.342 + # strip down installation 3.343 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 3.344 + strip $RPM_BUILD_ROOT%{l_prefix}/libexec/git-core/* >/dev/null 2>&1 || true 3.345 + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc 3.346 + 3.347 + # create additional directories 3.348 + %{l_shtool} mkdir -f -p -m 755 \ 3.349 + $RPM_BUILD_ROOT%{l_prefix}/var/git/run \ 3.350 + $RPM_BUILD_ROOT%{l_prefix}/var/git/db 3.351 + 3.352 + # determine installation files 3.353 + %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup 3.354 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 3.355 + %{l_files_std} `cat perl-openpkg-files` \ 3.356 + '%config %{l_prefix}/etc/git/*' \ 3.357 + '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/git/*' 3.358 + 3.359 +%files -f files 3.360 + 3.361 +%clean 3.362 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/git/rc.git Fri Aug 10 14:40:03 2012 +0200 4.3 @@ -0,0 +1,78 @@ 4.4 +#!@l_prefix@/bin/openpkg rc 4.5 +## 4.6 +## rc.git -- Run-Commands 4.7 +## 4.8 + 4.9 +%config 4.10 + git_enable="$openpkg_rc_def" 4.11 + git_daemon="no" 4.12 + git_daemon_flags="" 4.13 + git_daemon_host="127.0.0.1" 4.14 + git_daemon_port="9418" 4.15 + git_daemon_user="@l_rusr@" 4.16 + git_daemon_group="@l_rgrp@" 4.17 + git_daemon_basedir="@l_prefix@/var/git/db" 4.18 + git_log_prolog="true" 4.19 + git_log_epilog="true" 4.20 + git_log_numfiles="10" 4.21 + git_log_minsize="1M" 4.22 + git_log_complevel="9" 4.23 + 4.24 +%common 4.25 + git_daemon_pidfile="@l_prefix@/var/git/run/git-daemon.pid" 4.26 + git_daemon_logfile="@l_prefix@/var/git/run/git-daemon.log" 4.27 + git_daemon_signal () { 4.28 + [ -f $git_daemon_pidfile ] && kill -$1 `cat $git_daemon_pidfile` 4.29 + } 4.30 + 4.31 +%status -u @l_susr@ -o 4.32 + git_usable="unknown" 4.33 + git_active="no" 4.34 + rcService git enable yes && \ 4.35 + rcVarIsYes git_daemon && \ 4.36 + git_daemon_signal 0 && \ 4.37 + git_active="yes" 4.38 + echo "git_enable=\"$git_enable\"" 4.39 + echo "git_usable=\"$git_usable\"" 4.40 + echo "git_active=\"$git_active\"" 4.41 + 4.42 +%start -u @l_susr@ 4.43 + rcService git enable yes || exit 0 4.44 + rcService git active yes && exit 0 4.45 + if rcVarIsYes git_daemon; then 4.46 + ( nohup @l_prefix@/bin/git daemon \ 4.47 + --reuseaddr \ 4.48 + --listen="$git_daemon_host" \ 4.49 + --port="$git_daemon_port" \ 4.50 + --user="$git_daemon_user" \ 4.51 + --group="$git_daemon_group" \ 4.52 + --base-path="$git_daemon_basedir" \ 4.53 + $git_daemon_flags \ 4.54 + </dev/null >>$git_daemon_logfile 2>&1 & 4.55 + echo $! >$git_daemon_pidfile 4.56 + ) </dev/null >/dev/null 2>&1 4.57 + fi 4.58 + 4.59 +%stop -u @l_susr@ 4.60 + rcService git enable yes || exit 0 4.61 + rcService git active no && exit 0 4.62 + if rcVarIsYes git_daemon; then 4.63 + git_daemon_signal TERM 4.64 + sleep 1 4.65 + rm -f $git_daemon_pidfile 2>/dev/null || true 4.66 + fi 4.67 + 4.68 +%restart -u @l_susr@ 4.69 + rcService git enable yes || exit 0 4.70 + rcService git active no && exit 0 4.71 + rc git stop start 4.72 + 4.73 +%daily -u @l_susr@ 4.74 + rcService git enable yes || exit 0 4.75 + shtool rotate -f \ 4.76 + -n ${git_log_numfiles} -s ${git_log_minsize} -d \ 4.77 + -z ${git_log_complevel} -m 644 -o @l_rusr@ -g @l_rusr@ \ 4.78 + -P "${git_log_prolog}" \ 4.79 + -E "${git_log_epilog}" \ 4.80 + $git_daemon_logfile 4.81 +