diff --git a/.cvsignore b/.cvsignore
index e8e0fe7..c6a071e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-git-1.5.0.6.tar.gz
+git-1.5.3.6.tar.gz
diff --git a/git-1.5-gitweb-home-link.patch b/git-1.5-gitweb-home-link.patch
new file mode 100644
index 0000000..cd36563
--- /dev/null
+++ b/git-1.5-gitweb-home-link.patch
@@ -0,0 +1,11 @@
+--- git-1.5.0.6/gitweb/gitweb.perl~ 2007-03-30 01:37:05.000000000 +0100
++++ git-1.5.0.6/gitweb/gitweb.perl 2007-05-07 08:31:37.000000000 +0100
+@@ -39,7 +39,7 @@ our $projectroot = "++GITWEB_PROJECTROOT
+ our $home_link = $my_uri || "/";
+
+ # string of the home link on top of all pages
+-our $home_link_str = "++GITWEB_HOME_LINK_STR++";
++our $home_link_str = $ENV{'SERVER_NAME'} ? "git://" . $ENV{'SERVER_NAME'} : "projects";
+
+ # name of your site or organization to appear in page titles
+ # replace this with something more descriptive for clearer bookmarks
diff --git a/git.conf.httpd b/git.conf.httpd
new file mode 100644
index 0000000..3611943
--- /dev/null
+++ b/git.conf.httpd
@@ -0,0 +1,6 @@
+Alias /git /var/www/git
+
+
+ Options +ExecCGI
+ AddHandler cgi-script .cgi
+
diff --git a/git.spec b/git.spec
index c4ecbbf..8ac16f8 100644
--- a/git.spec
+++ b/git.spec
@@ -1,12 +1,15 @@
# Pass --without docs to rpmbuild if you don't want the documentation
Name: git
-Version: 1.5.3.3
+Version: 1.5.3.6
Release: 1%{?dist}
Summary: Git core and tools
License: GPL
Group: Development/Tools
URL: http://kernel.org/pub/software/scm/git/
Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
+Source1: git.xinetd
+Source2: git.conf.httpd
+Patch0: git-1.5-gitweb-home-link.patch
BuildRequires: perl, zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: git-core, git-svn, git-cvs, git-email, gitk, git-gui, perl-Git
@@ -29,6 +32,20 @@ and full access to internals.
These are the core tools with minimal dependencies.
+%package daemon
+Summary: Git protocol daemon
+Group: Development/Tools
+Requires: git-core = %{version}-%{release}
+%description daemon
+The git dæmon for supporting git:// access to git repositories
+
+%package -n gitweb
+Summary: Simple web interface to git repositories
+Group: Development/Tools
+Requires: git-core = %{version}-%{release}
+%description -n gitweb
+Simple web interface to track changes in git repositories
+
%package svn
Summary: Git tools for importing Subversion repositories
Group: Development/Tools
@@ -75,6 +92,7 @@ Perl interface to Git
%prep
%setup -q
+%patch0 -p1
%build
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
@@ -87,6 +105,15 @@ make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
prefix=%{_prefix} mandir=%{_mandir} \
ETC_GITCONFIG=/etc/gitconfig \
INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
+
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d
+install -m 644 %SOURCE1 $RPM_BUILD_ROOT/%{_sysconfdir}/xinetd.d/git
+mkdir -p $RPM_BUILD_ROOT/var/www/git
+install -m 644 -t $RPM_BUILD_ROOT/var/www/git gitweb/*.png gitweb/*.css
+install -m 755 -t $RPM_BUILD_ROOT/var/www/git gitweb/gitweb.cgi
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d
+install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/git.conf
+
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
@@ -100,6 +127,7 @@ find $RPM_BUILD_ROOT -type f -name 'git-archimport*' -exec rm -f {} ';'
%else
rm -rf $RPM_BUILD_ROOT%{_mandir}
%endif
+mkdir -p $RPM_BUILD_ROOT/srv/git
%clean
rm -rf $RPM_BUILD_ROOT
@@ -152,10 +180,26 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%{_datadir}/git-core/
%doc README COPYING Documentation/*.txt
+
+%files daemon
+%defattr(-,root,root)
+%{_bindir}/git-daemon
+%config(noreplace)%{_sysconfdir}/xinetd.d/git
+/srv/git
+
+%files -n gitweb
+%defattr(-,root,root)
+/var/www/git/
+%{_sysconfdir}/httpd/conf.d/git.conf
%{!?_without_docs: %doc Documentation/*.html Documentation/howto}
%{!?_without_docs: %doc Documentation/technical}
+
%changelog
+* Wed Dec 05 2007 Josh Boyer 1.5.3.6-1
+- git-1.5.3.6
+- Add git-deamon and git-web subpackages
+
* Fri Oct 12 2007 James Bowes 1.5.3.3-1
- git-1.5.3.3
diff --git a/git.xinetd b/git.xinetd
new file mode 100644
index 0000000..dcfae91
--- /dev/null
+++ b/git.xinetd
@@ -0,0 +1,16 @@
+# default: off
+# description: The git dæmon allows git repositories to be exported using
+# the git:// protocol.
+
+service git
+{
+ disable = yes
+ socket_type = stream
+ wait = no
+ user = nobody
+ server = /usr/bin/git-daemon
+ server_args = --base-path=/srv/git --export-all --user-path=public_git --syslog --inetd --verbose
+ log_on_failure += USERID
+# xinetd doesn't do this by default. bug #195265
+ flags = IPv6
+}
diff --git a/sources b/sources
index 557dc24..31bf148 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-978bda72a636d805dd3058efec5e6f2e git-1.5.3.3.tar.gz
+37126a4eb247b491b29e768fd25bfee8 git-1.5.3.6.tar.gz