diff --git a/subversion-1.6.11-pie.patch b/subversion-1.6.11-pie.patch index 1747122..36b8e0a 100644 --- a/subversion-1.6.11-pie.patch +++ b/subversion-1.6.11-pie.patch @@ -1,5 +1,6 @@ ---- subversion-1.6.11/build/generator/gen_base.py.pie -+++ subversion-1.6.11/build/generator/gen_base.py +diff -up subversion-1.6.12/build/generator/gen_base.py.pie subversion-1.6.12/build/generator/gen_base.py +--- subversion-1.6.12/build/generator/gen_base.py.pie 2010-09-07 14:05:29.307274005 +0100 ++++ subversion-1.6.12/build/generator/gen_base.py 2010-09-07 14:05:29.313274265 +0100 @@ -357,7 +357,7 @@ class TargetLinked(Target): self.install = options.get('install') self.compile_cmd = options.get('compile-cmd') @@ -32,8 +33,9 @@ class TargetApacheMod(TargetLib): ---- subversion-1.6.11/Makefile.in.pie -+++ subversion-1.6.11/Makefile.in +diff -up subversion-1.6.12/Makefile.in.pie subversion-1.6.12/Makefile.in +--- subversion-1.6.12/Makefile.in.pie 2010-09-07 14:05:29.308274305 +0100 ++++ subversion-1.6.12/Makefile.in 2010-09-07 14:14:28.795274233 +0100 @@ -184,8 +184,11 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS) COMPILE_JAVAHL_JAVAH = $(JAVAH) @@ -47,3 +49,12 @@ LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir) # special link rule for mod_dav_svn +@@ -600,7 +603,7 @@ schema-clean: + $(top_srcdir)/build/transform_sql.sh $< < $< > $(top_srcdir)/$@ + + .c.o: +- $(COMPILE) -o $@ -c $< ++ $(COMPILE) -fpie -o $@ -c $< + + .cpp.o: + $(COMPILE_CXX) -o $@ -c $< diff --git a/subversion.spec b/subversion.spec index 69d0939..9d2ab09 100644 --- a/subversion.spec +++ b/subversion.spec @@ -17,7 +17,7 @@ Summary: A Modern Concurrent Version Control System Name: subversion Version: 1.6.12 -Release: 4%{?dist} +Release: 5%{?dist} License: ASL 1.1 Group: Development/Tools URL: http://subversion.apache.org/ @@ -26,6 +26,7 @@ Source1: subversion.conf Source3: filter-requires.sh Source4: http://www.xsteve.at/prg/emacs/psvn.el Source5: psvn-init.el +Source6: svnserve.init # http://bugs.debian.org/546990 Patch0: subversion-1.6.5-newlines.patch Patch2: subversion-1.6.0-deplibs.patch @@ -42,7 +43,8 @@ BuildRequires: sqlite-devel >= 3.4.0 BuildRequires: gnome-keyring-devel, dbus-devel, kdelibs-devel >= 4.0.0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: svn = %{version}-%{release} -Requires: apr >= 1.3.0 +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig, /sbin/service %define __perl_requires %{SOURCE3} @@ -57,15 +59,25 @@ changes. Subversion only stores the differences between versions, instead of every complete file. Subversion is intended to be a compelling replacement for CVS. +%package libs +Group: Development/Tools +Summary: Libraries for Subversion Version Control system +Requires: subversion = %{version}-%{release} +# APR 1.3.x interfaces are required +Requires: apr >= 1.3.0 + +%description libs +The subversion-libs package includes the essential shared libraries +used by the Subversion version control tools. + %package devel Group: Development/Tools Summary: Development package for the Subversion libraries Requires: subversion = %{version}-%{release}, apr-devel, apr-util-devel %description devel -The subversion-devel package includes the static libraries and -include files for developers interacting with the subversion -package. +The subversion-devel package includes the libraries and include files +for developers interacting with the subversion package. %package gnome Group: Development/Tools @@ -207,7 +219,7 @@ make swig-pl swig-pl-lib swig-rb swig-rb-lib %if %{with_java} # javahl-javah does not parallel-make with javahl make javahl-java javahl-javah -make javahl +make %{?_smp_mflags} javahl %endif %install @@ -226,6 +238,11 @@ install -m 755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/subversion install -m 755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d install -m 644 $RPM_SOURCE_DIR/subversion.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d +# Install SysV init script +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -p -m 755 $RPM_SOURCE_DIR/svnserve.init \ + $RPM_BUILD_ROOT/etc/rc.d/init.d/svnserve + # Remove unpackaged files rm -rf ${RPM_BUILD_ROOT}%{_includedir}/subversion-*/*.txt \ ${RPM_BUILD_ROOT}%{python_sitearch}/*/*.{a,la} @@ -301,9 +318,19 @@ make check check-swig-pl check-swig-py CLEANUP=yes %clean rm -rf ${RPM_BUILD_ROOT} -%post -p /sbin/ldconfig +%post +# Register the snvserve service +/sbin/chkconfig --add svnserve -%postun -p /sbin/ldconfig +%preun +if [ $1 = 0 ]; then + /sbin/service svnserve stop > /dev/null 2>&1 + /sbin/chkconfig --del svnserve +fi + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig %post perl -p /sbin/ldconfig @@ -328,20 +355,25 @@ rm -rf ${RPM_BUILD_ROOT} %doc contrib/client-side/wcgrep %{_bindir}/* %exclude %{_bindir}/svn2cl -%{_libdir}/libsvn_*.so.* %{_mandir}/man*/* %exclude %{_mandir}/man1/svn2cl.1* +%{_sysconfdir}/rc.d/init.d/svnserve %{python_sitearch}/svn %{python_sitearch}/libsvn %{_datadir}/emacs/site-lisp/*.el %{_datadir}/xemacs/site-packages/lisp/*.el %{_sysconfdir}/bash_completion.d %dir %{_sysconfdir}/subversion +%exclude %{_mandir}/man*/*::* + +%files libs +%defattr(-,root,root) +%doc subversion/LICENSE +%{_libdir}/libsvn_*.so.* %exclude %{_libdir}/libsvn_swig_perl* %exclude %{_libdir}/libsvn_swig_ruby* %exclude %{_libdir}/libsvn_auth_kwallet* %exclude %{_libdir}/libsvn_auth_gnome* -%exclude %{_mandir}/man*/*::* %files gnome %defattr(-,root,root) @@ -396,6 +428,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man1/svn2cl.1* %changelog +* Tue Sep 7 2010 Joe Orton - 1.6.12-5 +- add svnserve init script +- split out -libs subpackage + * Fri Sep 3 2010 Joe Orton - 1.6.12-4 - restore PIE support diff --git a/svnserve.init b/svnserve.init new file mode 100644 index 0000000..0d955da --- /dev/null +++ b/svnserve.init @@ -0,0 +1,109 @@ +#!/bin/bash +# +# svnserve Startup script for the Subversion svnserve daemon +# +# chkconfig: - 85 15 +# description: The svnserve daemon allows access to Subversion repositories \ +# using the svn network protocol. +# processname: svnserve +# config: /etc/sysconfig/svnserve +# pidfile: /var/run/svnserve.pid +# +### BEGIN INIT INFO +# Provides: svnserve +# Required-Start: $local_fs $remote_fs $network +# Required-Stop: $local_fs $remote_fs $network +# Short-Description: start and stop the svnserve daemon +# Description: The svnserve daemon allows access to Subversion +# repositories using the svn network protocol. +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -f /etc/sysconfig/svnserve ]; then + . /etc/sysconfig/svnserve +fi + +exec=/usr/bin/svnserve +prog=svnserve +pidfile=${PIDFILE-/var/run/svnserve.pid} +lockfile=${LOCKFILE-/var/lock/subsys/svnserve} +args="--daemon --pid-file=${pidfile} $OPTIONS" +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --pidfile=${pidfile} $exec $args + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p ${pidfile} $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + # run checks to determine if the service is running or use generic status + status -p ${pidfile} $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $?