# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344602040 -7200 # Node ID 138803117c57717e1b5d6212dde996dcf1939f99 # Parent fcb5600be81f991c7eb6a000cca67f4b778e80dc Import package vendor original specs for necessary manipulations. diff -r fcb5600be81f -r 138803117c57 subversion/fsl.subversion --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/fsl.subversion Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,16 @@ +## +## fsl.subversion -- OSSP fsl configuration +## + +ident .*(svnserve)/.+ q{ + prefix( + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " + ) + -> { + debug: file( + path="@l_prefix@/var/subversion/subversion.log", + perm=0664 + ) + } +}; + diff -r fcb5600be81f -r 138803117c57 subversion/rc.subversion --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/rc.subversion Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,80 @@ +#!@l_prefix@/bin/openpkg rc +## +## rc.subversion -- Run-Commands +## + +%config + subversion_enable="$openpkg_rc_def" + subversion_env="no" + subversion_daemon="no" + subversion_daemon_user="@l_rusr@" + subversion_daemon_host="127.0.0.1" + subversion_daemon_port="3690" + subversion_daemon_root="@l_prefix@/var/subversion/default" + subversion_daemon_pidfile="@l_prefix@/var/subversion/subversion.pid" + subversion_daemon_logfile="@l_prefix@/var/subversion/subversion.log" + subversion_daemon_log_prolog="true" + subversion_daemon_log_epilog="true" + subversion_daemon_log_numfiles="10" + subversion_daemon_log_minsize="1M" + subversion_daemon_log_complevel="9" + +%common + subversion_signal () { + [ -f $subversion_daemon_pidfile ] \ + && kill -$1 `cat $subversion_daemon_pidfile` + } + +%status -u @l_susr@ -o + subversion_usable="unknown" + subversion_active="no" + rcService subversion enable yes && \ + subversion_signal 0 && subversion_active="yes" + echo "subversion_enable=\"$subversion_enable\"" + echo "subversion_usable=\"$subversion_usable\"" + echo "subversion_active=\"$subversion_active\"" + +%start -u @l_susr@ + rcService subversion enable yes || exit 0 + rcService subversion active yes && exit 0 + if rcVarIsYes subversion_daemon; then + su - $subversion_daemon_user -c \ + "@l_prefix@/bin/svnserve --daemon \ + --listen-host $subversion_daemon_host \ + --listen-port $subversion_daemon_port \ + --root $subversion_daemon_root \ + --pid-file $subversion_daemon_pidfile" + fi + +%stop -u @l_susr@ + rcService subversion enable yes || exit 0 + rcService subversion active no && exit 0 + if rcVarIsYes subversion_daemon; then + subversion_signal TERM + sleep 2 + rm -f $subversion_daemon_pidfile 2>/dev/null || true + fi + +%restart -u @l_susr@ + rcService subversion enable yes || exit 0 + rcService subversion active no && exit 0 + rc subversion stop start + +%daily -u @l_susr@ + rcService subversion enable yes || exit 0 + shtool rotate -f \ + -n $subversion_daemon_log_numfiles -s $subversion_daemon_log_minsize -d \ + -z $subversion_daemon_log_complevel -m 664 -o @l_susr@ -g @l_sgrp@ \ + -P "$subversion_daemon_log_prolog" \ + -E "$subversion_daemon_log_epilog; rc subversion restart" \ + $subversion_daemon_logfile + +%env + rcService subversion enable yes || exit 0 + if rcVarIsYes subversion_env; then + if [ ".$BASH" != . ]; then + shopt -s extglob progcomp + . @l_prefix@/etc/subversion/bashrc + fi + fi + diff -r fcb5600be81f -r 138803117c57 subversion/subversion.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/subversion.config Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,39 @@ +## +## config -- Subversion global configuration file +## + +# [auth] +# store-passwords = no +# store-auth-creds = no + +# [helpers] +# editor-cmd = @l_prefix@/bin/vim +# diff-cmd = @l_prefix@/bin/diff0 +# diff3-cmd = @l_prefix@/bin/diff3 +# diff3-has-program-arg = true + +# [tunnels] +# ssh = $SVN_SSH ssh +# rsh = $SVN_RSH rsh + +# [miscellany] +# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store +# log-encoding = latin1 +# use-commit-times = yes +# enable-auto-props = yes + +# [auto-props] +# *.c = svn:eol-style=native +# *.cpp = svn:eol-style=native +# *.h = svn:eol-style=native +# *.dsp = svn:eol-style=CRLF +# *.dsw = svn:eol-style=CRLF +# *.sh = svn:eol-style=native;svn:executable +# *.txt = svn:eol-style=native +# *.png = svn:mime-type=image/png +# *.jpg = svn:mime-type=image/jpeg +# *.gif = svn:mime-type=image/gif +# *.xml = svn:eol-style=native +# *.tex = svn:eol-style=native +# Makefile = svn:eol-style=native + diff -r fcb5600be81f -r 138803117c57 subversion/subversion.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/subversion.patch Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,69 @@ +Index: configure +--- configure.orig 2012-02-10 16:45:29.000000000 +0100 ++++ configure 2012-02-15 10:31:57.000000000 +0100 +@@ -5956,6 +5956,11 @@ + ac_sub_cache_file="$ac_dots$cache_file" ;; + esac + ++ args="$args --prefix=$prefix/libexec/subversion/neon" ++ if [ ".$with_ssl" = .yes ]; then ++ args="$args --with-ssl" ++ fi ++ + # The eval makes quoting arguments work. + if eval $SHELL $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir --with-apr=$apr_config --with-apr-util=$apu_config + then : +Index: subversion/mod_dav_svn/repos.c +--- subversion/mod_dav_svn/repos.c.orig 2012-02-02 17:13:30.000000000 +0100 ++++ subversion/mod_dav_svn/repos.c 2012-02-15 10:31:57.000000000 +0100 +@@ -3507,6 +3507,7 @@ + */ + ap_fputs(output, bb, + " \n
Powered by " ++ "OpenPKG " + "" + "Apache Subversion" + " version " SVN_VERSION "." +Index: subversion/svnserve/cyrus_auth.c +--- subversion/svnserve/cyrus_auth.c.orig 2011-06-23 18:43:25.000000000 +0200 ++++ subversion/svnserve/cyrus_auth.c 2012-02-15 10:31:57.000000000 +0100 +@@ -110,7 +110,7 @@ + status = svn_ra_svn__sasl_common_init(pool); + if (status) + return svn_error_wrap_apr(status, +- _("Could not initialize the SASL library")); ++ _("Could not initialize the SASL library (svnserve: APR failure)")); + + /* The second parameter tells SASL to look for a configuration file + named subversion.conf. */ +@@ -120,7 +120,7 @@ + svn_error_t *err = svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL, + sasl_errstring(result, NULL, NULL)); + return svn_error_quick_wrap(err, +- _("Could not initialize the SASL library")); ++ _("Could not initialize the SASL library (svnserve)")); + } + return SVN_NO_ERROR; + } +Index: subversion/svnserve/main.c +--- subversion/svnserve/main.c.orig 2011-06-21 20:00:13.000000000 +0200 ++++ subversion/svnserve/main.c 2012-02-15 10:31:57.000000000 +0100 +@@ -59,6 +59,10 @@ + + #include "server.h" + ++#ifdef SVN_HAVE_SASL ++#include ++#endif ++ + /* The strategy for handling incoming connections. Some of these may be + unavailable due to platform limitations. */ + enum connection_handling_mode { +@@ -446,6 +450,7 @@ + + #ifdef SVN_HAVE_SASL + SVN_INT_ERR(cyrus_init(pool)); ++ openlog("svnserve", LOG_NDELAY|LOG_PID, LOG_DAEMON); + #endif + + /* Check library versions */ diff -r fcb5600be81f -r 138803117c57 subversion/subversion.servers --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/subversion.servers Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,29 @@ +## +## servers -- Subversion global servers configuration file +## + +# [groups] +# group1 = *.example.com +# group2 = *.example.net + +# [group1] +# http-proxy-host = proxy1.some-domain-name.com +# http-proxy-port = 80 +# http-proxy-username = blah +# http-proxy-password = doubleblah +# http-timeout = 60 +# neon-debug-mask = 130 + +# [group2] +# http-proxy-host = proxy2.some-domain-name.com +# http-proxy-port = 9000 + +# [global] +# http-proxy-exceptions = *.exception.com, www.internal-site.org +# http-proxy-host = defaultproxy.whatever.com +# http-proxy-port = 7000 +# http-proxy-username = defaultusername +# http-proxy-password = defaultpassword +# http-compression = no +# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem + diff -r fcb5600be81f -r 138803117c57 subversion/subversion.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/subversion/subversion.spec Fri Aug 10 14:34:00 2012 +0200 @@ -0,0 +1,238 @@ +## +## subversion.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_dist 1.7.5 +%define V_opkg 1.7.5 +%define V_book_html 20120518 +%define V_book_pdf 20120518 + +# package information +Name: subversion +Summary: Subversion Source Revision Control System +URL: http://subversion.apache.org/ +Vendor: Apache Software Foundation +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: SCM +License: Apache/BSD +Version: %{V_opkg} +Release: 20120714 + +# package options +%option with_fsl yes +%option with_db no +%option with_sasl no + +# list of sources +Source0: http://www.apache.org/dist/subversion/subversion-%{V_dist}.tar.bz2 +Source1: http://download.openpkg.org/components/versioned/subversion/svn-book-%{V_book_html}.html +Source2: http://download.openpkg.org/components/versioned/subversion/svn-book-%{V_book_pdf}.pdf +Source3: subversion.config +Source4: subversion.servers +Source5: rc.subversion +Source6: fsl.subversion +Patch0: subversion.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, make, libtool, sed, pkgconfig +PreReq: OpenPKG, openpkg >= 20100101 +BuildPreReq: diffutils, openssl, zlib, libiconv, expat, serf, neon, apr, sqlite +PreReq: diffutils, openssl, zlib, libiconv, expat, serf, neon, apr, sqlite +%if "%{with_fsl}" == "yes" +BuildPreReq: fsl +PreReq: fsl +%endif +%if "%{with_db}" == "yes" +BuildPreReq: db +PreReq: db +%endif +%if "%{with_sasl}" == "yes" +BuildPreReq: sasl +PreReq: sasl +%endif + +%description + Subversion is a modern Version Control System (VCS) providing most + current CVS features, versioned directories/renames/meta-data, + atomic commits, cheap branching and tagging, native client/server + architecture, and the choice of database or plain-file repository + implementations. + +%track + prog subversion = { + version = %{V_dist} + url = http://subversion.apache.org/download/ + regex = subversion-(\d+\.\d+.\d+)\.tar\.bz2 + } + +%prep + %setup -q + %patch -p0 + + # patch: correctly pass --disable-shared to sub-directories + %{l_shtool} subst \ + -e 's;\($ac_abs_srcdir/configure $ac_configure_args\);\1 --disable-shared;' \ + configure + + # patch: adjust path to configuration directory + %{l_shtool} subst \ + -e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \ + subversion/libsvn_subr/config_impl.h \ + subversion/libsvn_subr/config_file.c + +%build + # configure package + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags libxml2 .} -DSQLITE_THREADSAFE=1" \ +%if "%{with_sasl}" == "yes" && "%{with_db}" == "yes" + LDFLAGS="%{l_ldflags} `pkg-config db sasl --libs-only-L` %{l_fsl_ldflags}" \ + LIBS="`pkg-config db sasl --libs-only-l` -lz %{l_fsl_libs}" \ +%else +%if "%{with_sasl}" == "yes" + LDFLAGS="%{l_ldflags} `pkg-config sasl --libs-only-L` %{l_fsl_ldflags}" \ + LIBS="`pkg-config sasl --libs-only-l` `pkg-config apr-util-1 --libs-only-l` -lz %{l_fsl_libs}" \ +%else + LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ + LIBS="`pkg-config apr-util-1 --libs-only-l` -lz %{l_fsl_libs}" \ +%endif +%endif + CONFIG_SHELL="%{l_bash}" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ +%if "%{with_db}" == "yes" + --with-berkeley-db="db.h:%{l_prefix}/include:%{l_prefix}/lib:db" \ +%else + --without-berkeley-db \ +%endif + --with-sqlite=%{l_prefix} \ + --with-ssl=openssl \ + --with-zlib=%{l_prefix} \ + --with-apr=%{l_prefix} \ + --with-apr-util=%{l_prefix} \ + --with-neon=%{l_prefix} \ + --with-serf=%{l_prefix} \ +%if "%{with_sasl}" == "yes" + --with-sasl \ +%else + --without-sasl \ +%endif + --without-gssapi \ + --without-apxs \ + --disable-nls \ + --disable-shared \ + --enable-static + + # build package + %{l_make} %{l_mflags} + +%install + # install package + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + + # strip down installation + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.exp + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1/svn-revision.txt + rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1/mod_dav_svn.h + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc + rm -rf $RPM_BUILD_ROOT%{l_prefix}/build-1 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + + # install Subversion default global configuration files + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/subversion + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE subversion.config} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/config + %{l_shtool} install -c -m 644 \ + %{SOURCE subversion.servers} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/servers + + # install Subversion Bash command completion + %{l_shtool} install -c -m 644 \ + tools/client-side/bash_completion \ + $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/bashrc + + # install Subversion book + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/subversion + %{l_shtool} install -c -m 644 \ + %{SOURCE svn-book-%{V_book_pdf}.pdf} \ + $RPM_BUILD_ROOT%{l_prefix}/share/subversion/svn-book.pdf + %{l_shtool} install -c -m 644 \ + %{SOURCE svn-book-%{V_book_html}.html} \ + $RPM_BUILD_ROOT%{l_prefix}/share/subversion/svn-book.html + + # install run-command script + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE rc.subversion} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + + # install OSSP fsl configuration + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE fsl.subversion} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ + + # create directory for default repository and svnserve pidfile + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/subversion + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/subversion/*' \ + '%config %{l_prefix}/etc/fsl/fsl.subversion' \ + '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/subversion' \ + '%doc %{l_prefix}/share/subversion/svn-book.*' + +%files -f files + +%clean + +%post + # create default repository + if [ ! -d $RPM_INSTALL_PREFIX/var/subversion/default ]; then + su - %{l_rusr} -c \ + "$RPM_INSTALL_PREFIX/bin/svnadmin create \ + $RPM_INSTALL_PREFIX/var/subversion/default" + fi + + # after upgrade, restart service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} subversion status 2>/dev/null` + [ ".$subversion_active" = .yes ] && %{l_rc} subversion restart + exit 0 + +%preun + # before erase, stop service + [ $1 -eq 0 ] || exit 0 + %{l_rc} subversion stop 2>/dev/null + exit 0 +