diff --git a/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch b/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch new file mode 100644 index 0000000..4afb054 --- /dev/null +++ b/subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch @@ -0,0 +1,48 @@ +From: Andreas Stieger +Date: 2013-05-21 17:43:00 +0100 +Subject: [PATCH] do not clear LD_LIBRARY_PATH in davautocheck.sh +Upstream: merged +References: http://svn.apache.org/viewvc?view=revision&revision=1197065 + +During "make check", auth-test loads DSOs at runtime and cannot find them +unless LD_LIBRARY_PATH inlucdes subversion/libsvn_auth_kwallet/.libs and +/subversion/libsvn_auth_gnome_keyring/.libs. + +Adjust davautocheck.sh so that LD_LIBRARY_PATH is prepended to rather +than overwritten so that the spec file can set the required paths for +the auth-tests to pass. + +Actually then found to have been fixed in the trunk in r1197065. Required +for unit tests with 1.7.x but not 1.8.x + +--- + subversion/tests/cmdline/dav-mirror-autocheck.sh | 2 +- + subversion/tests/cmdline/davautocheck.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: subversion-1.7.9/subversion/tests/cmdline/dav-mirror-autocheck.sh +=================================================================== +--- subversion-1.7.9.orig/subversion/tests/cmdline/dav-mirror-autocheck.sh 2011-04-21 12:42:32.000000000 +0100 ++++ subversion-1.7.9/subversion/tests/cmdline/dav-mirror-autocheck.sh 2013-05-21 20:32:40.000000000 +0100 +@@ -323,7 +323,7 @@ fi + [ -r "$MOD_AUTHZ_SVN" ] \ + || fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script" + +-export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs" ++export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs:$LD_LIBRARY_PATH" + + MASTER_REPOS="${MASTER_REPOS:-"$HTTPD_ROOT/master_repos"}" + SLAVE_REPOS="${SLAVE_REPOS:-"$HTTPD_ROOT/slave_repos"}" +Index: subversion-1.7.9/subversion/tests/cmdline/davautocheck.sh +=================================================================== +--- subversion-1.7.9.orig/subversion/tests/cmdline/davautocheck.sh 2012-05-13 05:03:03.000000000 +0100 ++++ subversion-1.7.9/subversion/tests/cmdline/davautocheck.sh 2013-05-21 20:32:40.000000000 +0100 +@@ -198,7 +198,7 @@ fi + [ -r "$MOD_AUTHZ_SVN" ] \ + || fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script" + +-export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs" ++export LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs:$LD_LIBRARY_PATH" + + case "`uname`" in + Darwin*) LDD='otool -L' diff --git a/subversion-tests-httpd-users b/subversion-tests-httpd-users deleted file mode 100644 index 040f91f..0000000 --- a/subversion-tests-httpd-users +++ /dev/null @@ -1,2 +0,0 @@ -jrandom:xCGl35kV9oWCY -jconstant:xCGl35kV9oWCY diff --git a/subversion-tests-httpd.conf.tmpl b/subversion-tests-httpd.conf.tmpl deleted file mode 100644 index 804baaf..0000000 --- a/subversion-tests-httpd.conf.tmpl +++ /dev/null @@ -1,33 +0,0 @@ -Listen 127.0.0.1:REPLACE_PORT -ServerName tests.example.com -ErrorLog ./error_log -PidFile ./httpd.pid -LoadModule auth_basic_module REPLACE_APACHE_LIBEXECDIR/mod_auth_basic.so -LoadModule authn_file_module REPLACE_APACHE_LIBEXECDIR/mod_authn_file.so -LoadModule alias_module REPLACE_APACHE_LIBEXECDIR/mod_alias.so -LoadModule dav_module REPLACE_APACHE_LIBEXECDIR/mod_dav.so -LoadModule dav_svn_module REPLACE_BUILDROOTREPLACE_APACHE_LIBEXECDIR/mod_dav_svn.so -LoadModule authz_svn_module REPLACE_BUILDROOTREPLACE_APACHE_LIBEXECDIR/mod_authz_svn.so - - - DAV svn - SVNParentPath REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories - AuthzSVNAccessFile REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz - AuthType Basic - AuthName "Subversion Repository" - AuthUserFile REPLACE_BUILDDIR/users - Require valid-user - - - - DAV svn - SVNPath REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp/repos - AuthzSVNAccessFile REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz - AuthType Basic - AuthName "Subversion Repository" - AuthUserFile REPLACE_BUILDDIR/users - Require valid-user - - -RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ /svn-test-work/repositories/$1 -RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ /svn-test-work/repositories/$1 diff --git a/subversion.changes b/subversion.changes index 3da3cef..28eb602 100644 --- a/subversion.changes +++ b/subversion.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue May 21 19:41:36 UTC 2013 - andreas.stieger@gmx.de + +- use svnserveautocheck.sh and davautocheck.sh for unit tests, + greatly reducing complexity of spec file and adding support + for running unit tests with httpd 2.4 in factory +- add subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch to + not overwrite LD_LIBRARY_PATH in davautocheck.sh to make + auth-test pass + ------------------------------------------------------------------- Mon May 20 19:30:52 UTC 2013 - andreas.stieger@gmx.de diff --git a/subversion.spec b/subversion.spec index fb249f0..08c1a66 100644 --- a/subversion.spec +++ b/subversion.spec @@ -119,8 +119,9 @@ BuildRequires: openldap2-devel %endif # suse_version > 1030 %endif # with neon %if %{with regression_tests} -# for check section, to find a free port: -BuildRequires: iproute2 +# svnserveautocheck.sh davautocheck.sh requirements +BuildRequires: net-tools +BuildRequires: wget %endif # with regression_tests # %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services @@ -173,8 +174,6 @@ BuildRequires: sqlite3-devel >= %{sqlite_version} %requires_ge libsqlite3-0 %endif # with_intree_sqlite Source92: %{name}.rpmlintrc -Source93: subversion-tests-httpd.conf.tmpl -Source94: subversion-tests-httpd-users # Patch11: subversion.libtool-verbose.patch # build fixes @@ -186,6 +185,7 @@ Patch37: subversion-no-build-date.patch Patch38: subversion-neon-systemproxy.patch Patch39: subversion-1.7.4-ruby-1.9-RbConfig.patch Patch40: subversion-1.7.8-TestHarness_run_py_test_exit_code.patch +Patch41: subversion-1.7.9-davautocheck-LD_LIBRARY_PATH.patch # %if %with_ruby %if %{!?rb_arch:1}0 @@ -361,6 +361,7 @@ popd #./sqlite-amalgamation %patch38 %patch39 -p1 %patch40 -p1 +%patch41 -p1 SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\") #" @@ -659,91 +660,21 @@ ulimit -a # During "make check", auth-test loads DSOs at runtime and can't find # them if we don't set up LD_LIBRARY_PATH as below. export LD_LIBRARY_PATH="$PWD/subversion/libsvn_auth_kwallet/.libs:$PWD/subversion/libsvn_auth_gnome_keyring/.libs:$LD_LIBRARY_PATH" -CHECK_FS_TYPE=fsfs # run tests over ra_local (file://) -%__make check CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" - -SVNSERVE_PIDFILE="$PWD/svnserve.pid" -HTTPD_PIDFILE="$PWD/httpd.pid" -# hook up cleanup routine -function on_exit { - if [ -e "$SVNSERVE_PIDFILE" ]; then - pid=`cat "$SVNSERVE_PIDFILE" 2>/dev/null || :` - test -n "$pid" && kill -9 "$pid" || : - fi - if [ -e "$HTTPD_PIDFILE" ]; then - pid=`cat "$HTTPD_PIDFILE" 2>/dev/null || :` - test -n "$pid" && kill -9 "$pid" || : - fi -} -trap on_exit EXIT - -# find next free port -function find_next_free_port { - if [ -z "$free_port" ]; then # on first invocation - local start_port=1025 # start with user port range - else # on subsequent invocations - local start_port=$free_port; # look for ports above the last - let start_port++; # as the daemon might still use it - fi - free_port="" - # in the OBS build VMs, the call to ss actually fails, resulting in all port to be returned as unused, - # subsequent calls to the function will use a sequence from 1025, which are always available in VM. - # For local builds this takes into account locally used ports. Either way works to get a usable port. - for p in `/usr/sbin/ss -nat|tail +2|awk '{ split($4, a, ":"); if (a[2] > 1024) { print a[2]; }}'`; do used_port[$p]="$p"; done - for p in `seq $start_port 65535`; do - if [ -z "${used_port[$p]}" ]; then - free_port="$p" - break - fi - done - if [ -z "$free_port" ]; then - echo "ERROR: failed to find a free port" >&2 - echo "Used TCP ports: ${used_port[*]}" >&2 - exit 1 - fi -} -find_next_free_port +%__make check CLEANUP=true FS_TYPE=fsfs # run tests over ra_svn (svn://) -"$PWD/subversion/svnserve/svnserve" --listen-host 127.0.0.1 --listen-port "$free_port" --pid-file "$SVNSERVE_PIDFILE" -d -r "$PWD/subversion/tests/cmdline" -%__make check CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" BASE_URL="svn://127.0.0.1:$free_port" -kill -9 `cat "$SVNSERVE_PIDFILE" 2>/dev/null` -%__rm "$SVNSERVE_PIDFILE" +%__make svnserveautocheck CLEANUP=true FS_TYPE=fsfs # run tests over ra_neon (http://) %if %{with neon} -find_next_free_port -# create apache configuration -%__cp "%{SOURCE94}" users -APACHE_LIBEXECDIR="%{apache_libexecdir}" -< "%{SOURCE93}" \ - sed "s/REPLACE_PORT/$free_port/g" | \ - sed "s/REPLACE_BUILDROOT/${RPM_BUILD_ROOT//\//\\/}/g" | \ - sed "s/REPLACE_BUILDDIR/${PWD//\//\\/}/g" | \ - sed "s/REPLACE_APACHE_LIBEXECDIR/${APACHE_LIBEXECDIR//\//\\/}/g" > httpd.conf -LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" /usr/sbin/httpd2 -d "$PWD" -f httpd.conf -%__make check CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" BASE_URL=http://127.0.0.1:$free_port HTTP_LIBRARY=neon -kill -9 `cat "$HTTPD_PIDFILE" 2>/dev/null` -%__rm "$HTTPD_PIDFILE" +%__make davautocheck CLEANUP=true FS_TYPE=fsfs HTTP_LIBRARY=neon %endif # neon # run tests over ra_serf (http://) %if %{with serf} -find_next_free_port -# create apache configuration -%__cp "%{SOURCE94}" users -APACHE_LIBEXECDIR="%{apache_libexecdir}" -< "%{SOURCE93}" \ - sed "s/REPLACE_PORT/$free_port/g" | \ - sed "s/REPLACE_BUILDROOT/${RPM_BUILD_ROOT//\//\\/}/g" | \ - sed "s/REPLACE_BUILDDIR/${PWD//\//\\/}/g" | \ - sed "s/REPLACE_APACHE_LIBEXECDIR/${APACHE_LIBEXECDIR//\//\\/}/g" > httpd.conf -LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" /usr/sbin/httpd2 -d "$PWD" -f httpd.conf -%__make check CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" BASE_URL=http://127.0.0.1:$free_port HTTP_LIBRARY=serf -kill -9 `cat "$HTTPD_PIDFILE" 2>/dev/null` -%__rm "$HTTPD_PIDFILE" +%__make davautocheck CLEANUP=true FS_TYPE=fsfs HTTP_LIBRARY=serf %endif # serf %if %with_java