diff options
author | James McCoy <jamessan@debian.org> | 2021-02-17 21:11:59 -0500 |
---|---|---|
committer | James McCoy <jamessan@debian.org> | 2021-02-17 21:11:59 -0500 |
commit | 769468552a783e05fa49bca64afb09283c8e3752 (patch) | |
tree | d9bd4830a6e43da709b8d99b6df96ef69a76735c | |
parent | 49a92f2d22a1aef35ce6250ab873ed9909de0ca5 (diff) |
Commit patch queue (exported by git-debrebase)
[git-debrebase make-patches: export and commit patches]
-rw-r--r-- | debian/patches/Temporarily-disable-testCrash_RequestChannel_nativeRead_A.patch | 23 | ||||
-rw-r--r-- | debian/patches/apr-abi | 30 | ||||
-rw-r--r-- | debian/patches/build-fixes | 77 | ||||
-rw-r--r-- | debian/patches/examples-compile-instructions | 115 | ||||
-rw-r--r-- | debian/patches/last-changed-date-charset | 32 | ||||
-rw-r--r-- | debian/patches/python-builds | 132 | ||||
-rw-r--r-- | debian/patches/repos-templates | 96 | ||||
-rw-r--r-- | debian/patches/rpath | 57 | ||||
-rw-r--r-- | debian/patches/ruby-no-strict-aliasing | 24 | ||||
-rw-r--r-- | debian/patches/ruby-test-svnserve-race | 66 | ||||
-rw-r--r-- | debian/patches/series | 13 | ||||
-rw-r--r-- | debian/patches/ssh-no-controlmaster | 51 | ||||
-rw-r--r-- | debian/patches/use-python3-as-the-interpreter-now-for-tests-not-python.patch | 23 | ||||
-rw-r--r-- | debian/patches/workaround_EINVAL_on_kfreebsd | 21 |
14 files changed, 760 insertions, 0 deletions
diff --git a/debian/patches/Temporarily-disable-testCrash_RequestChannel_nativeRead_A.patch b/debian/patches/Temporarily-disable-testCrash_RequestChannel_nativeRead_A.patch new file mode 100644 index 0000000..798e4d1 --- /dev/null +++ b/debian/patches/Temporarily-disable-testCrash_RequestChannel_nativeRead_A.patch @@ -0,0 +1,23 @@ +From: James McCoy <jamessan@debian.org> +Date: Tue, 16 Feb 2021 21:47:17 -0500 +Subject: Temporarily disable + testCrash_RequestChannel_nativeRead_AfterException + +Signed-off-by: James McCoy <jamessan@debian.org> +--- + .../bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java b/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java +index 6f4218b..b361854 100644 +--- a/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java ++++ b/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java +@@ -4645,7 +4645,7 @@ public class BasicTests extends SVNTests + * In this scenario, tunnel was not properly closed after exception in + * 'TunnelAgent.openTunnel()'. + */ +- public void testCrash_RequestChannel_nativeRead_AfterException() ++ public void tstCrash_RequestChannel_nativeRead_AfterException() + { + // Previously, exception caused TunnelChannel's native side to be + // destroyed with the following abbreviated stack: diff --git a/debian/patches/apr-abi b/debian/patches/apr-abi new file mode 100644 index 0000000..0a59f02 --- /dev/null +++ b/debian/patches/apr-abi @@ -0,0 +1,30 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: apr-abi + +Bug #266170: Use SOVERSION 1 for apr 1.x, because the apr 0.9.x -> 1.x +Bug #266170: Use SOVERSION 1 for apr 1.x, because the apr 0.9.x -> 1.x +ABI change leaks through the libsvn ABIs (because we use apr_off_t, +which is now 64 bits on all platforms). + +Upstream refused this (http://svn.haxx.se/dev/archive-2006-03/0522.shtml +for thread), but fortunately when it came time to support apr 2.x in svn +1.7, they skipped SOVERSION 1 in consideration of Debian/Ubuntu, so we'll +be ABI-compatible again if and when we move to apr-2.x. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 42a9f14..bfd7fa1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -106,7 +106,7 @@ if test `expr $apr_version : 2` -ne 0; then + AC_SUBST(SVN_APRUTIL_LIBS) + SVN_APR_MAJOR_VERSION=2 + else +- svn_lib_ver=0 ++ svn_lib_ver=1 + APU_VER_REGEXES=["1\.[3-9]\."] + SVN_LIB_APRUTIL($APU_VER_REGEXES) + SVN_APR_MAJOR_VERSION=1 diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes new file mode 100644 index 0000000..e8ce9af --- /dev/null +++ b/debian/patches/build-fixes @@ -0,0 +1,77 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:35 -0400 +Subject: build-fixes + +Fix some build problems: +Fix some build problems: + +- Add aprutil as a direct dependency for libsvn_client and libsvn_ra. +--- + Makefile.in | 8 +++----- + build.conf | 6 +++--- + 2 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 48a14bf..1390a69 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -918,8 +918,7 @@ clean-swig-pl: + fi + for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \ + do \ +- cd $$d; \ +- rm -rf *.lo *.la *.o .libs; \ ++ (cd $$d && rm -rf *.lo *.la *.o .libs); \ + done + if [ -f "$(SWIG_PL_DIR)/native/Makefile" ]; then \ + cd $(SWIG_PL_DIR)/native; $(MAKE) clean; \ +@@ -955,7 +954,7 @@ clean-swig-py: + fi + for d in $(SWIG_PY_DIR) $(SWIG_PY_DIR)/libsvn_swig_py; \ + do \ +- cd $$d && rm -rf *.lo *.la *.o *.pyc .libs; \ ++ (cd $$d && rm -rf *.lo *.la *.o *.pyc .libs); \ + done + find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';' + +@@ -988,8 +987,7 @@ clean-swig-rb: + fi + for d in $(SWIG_RB_DIR) $(SWIG_RB_DIR)/libsvn_swig_ruby; \ + do \ +- cd $$d; \ +- rm -rf *.lo *.la *.o .libs; \ ++ (cd $$d && rm -rf *.lo *.la *.o .libs); \ + done + + extraclean-swig-rb: clean-swig-rb +diff --git a/build.conf b/build.conf +index 95875a7..c0a3ee2 100644 +--- a/build.conf ++++ b/build.conf +@@ -190,7 +190,7 @@ path = subversion/svnserve + install = bin + manpages = subversion/svnserve/svnserve.8 subversion/svnserve/svnserve.conf.5 + libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libsvn_ra_svn +- apriconv apr sasl ++ aprutil apriconv apr sasl + msvc-libs = advapi32.lib ws2_32.lib + + [svnsync] +@@ -247,7 +247,7 @@ link-cmd = $(LINK_CXX_LIB) + description = Subversion Client Library + type = lib + path = subversion/libsvn_client +-libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr ++libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr aprutil apriconv apr + install = lib + msvc-export = svn_client.h private/svn_client_mtcc.h private/svn_client_private.h private/svn_client_shelf.h private/svn_client_shelf2.h + +@@ -324,7 +324,7 @@ msvc-export = private/svn_fs_util.h + description = Subversion General Repository Access Library + type = lib + path = subversion/libsvn_ra +-libs = libsvn_delta libsvn_subr ra-libs apriconv apr ++libs = libsvn_delta libsvn_subr ra-libs aprutil apriconv apr + # conditionally add more dependencies + add-deps = $(SVN_RA_LIB_DEPS) + add-install-deps = $(SVN_RA_LIB_INSTALL_DEPS) diff --git a/debian/patches/examples-compile-instructions b/debian/patches/examples-compile-instructions new file mode 100644 index 0000000..90725db --- /dev/null +++ b/debian/patches/examples-compile-instructions @@ -0,0 +1,115 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: examples-compile-instructions + +Fix build instructions for libsvn-doc/examples/*.c. +--- + tools/examples/getlocks_test.c | 8 +++----- + tools/examples/headrev.c | 8 +++----- + tools/examples/minimal_client.c | 6 ++---- + tools/examples/svnput.c | 7 ++----- + tools/examples/testwrite.c | 8 +++----- + 5 files changed, 13 insertions(+), 24 deletions(-) + +diff --git a/tools/examples/getlocks_test.c b/tools/examples/getlocks_test.c +index 1051063..2e9725c 100644 +--- a/tools/examples/getlocks_test.c ++++ b/tools/examples/getlocks_test.c +@@ -20,13 +20,11 @@ + * under the License. + * ==================================================================== + * +- * To compile on unix against Subversion and APR libraries, try +- * something like: ++ * To compile on Debian: + * + * cc getlocks_test.c -o getlocks_test \ +- * -I/usr/local/include/subversion-1 -I/usr/local/apache2/include \ +- * -L/usr/local/apache2/lib -L/usr/local/lib \ +- * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 -lapr-0 -laprutil-0 ++ * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) \ ++ * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 + * + */ + +diff --git a/tools/examples/headrev.c b/tools/examples/headrev.c +index 1f71d76..0513814 100644 +--- a/tools/examples/headrev.c ++++ b/tools/examples/headrev.c +@@ -20,13 +20,11 @@ + * under the License. + * ==================================================================== + * +- * To compile on unix against Subversion and APR libraries, try +- * something like: ++ * To compile on Debian: + * + * cc headrev.c -o headrev \ +- * -I/usr/local/include/subversion-1 -I/usr/local/apache2/include \ +- * -L/usr/local/apache2/lib -L/usr/local/lib \ +- * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 -lapr-0 -laprutil-0 ++ * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) \ ++ * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 + * + */ + +diff --git a/tools/examples/minimal_client.c b/tools/examples/minimal_client.c +index 967ce5b..3475bab 100644 +--- a/tools/examples/minimal_client.c ++++ b/tools/examples/minimal_client.c +@@ -30,12 +30,10 @@ + * For a much more complex example, the svn cmdline client might be + * considered the 'reference implementation'. + * +- * From a Linux system, a typical commandline compile might look like: ++ * To compile on Debian: + * + * cc minimal_client.c -o minimal_client \ +- * -I/usr/local/include/subversion-1 -I/usr/local/apache2/include \ +- * -L/usr/local/apache2/lib -L/usr/local/lib \ +- * -lsvn_client-1 -lapr-0 -laprutil-0 ++ * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) -lsvn_client-1 + * + */ + +diff --git a/tools/examples/svnput.c b/tools/examples/svnput.c +index 6414fef..7a144ff 100644 +--- a/tools/examples/svnput.c ++++ b/tools/examples/svnput.c +@@ -33,13 +33,10 @@ + * under the License. + * ==================================================================== + * +- * To compile on unix against Subversion and APR libraries, try +- * something like: ++ * To compile on Debian: + * + * cc svnput.c -o svnput \ +- * -I/usr/local/include/subversion-1 -I/usr/local/apache2/include \ +- * -L/usr/local/apache2/lib -L/usr/local/lib \ +- * -lsvn_client-1 -lapr-0 -laprutil-0 ++ * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) -lsvn_client-1 + * + */ + +diff --git a/tools/examples/testwrite.c b/tools/examples/testwrite.c +index beb2fba..b424b32 100644 +--- a/tools/examples/testwrite.c ++++ b/tools/examples/testwrite.c +@@ -20,13 +20,11 @@ + * under the License. + * ==================================================================== + * +- * To compile on unix against Subversion and APR libraries, try +- * something like: ++ * To compile on Debian: + * + * cc testwrite.c -o testwrite \ +- * -I/usr/local/include/subversion-1 -I/usr/local/apache2/include \ +- * -L/usr/local/apache2/lib -L/usr/local/lib \ +- * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 -lsvn-fs-1 -lapr-0 -laprutil-0 ++ * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) \ ++ * -lsvn_client-1 -lsvn_ra-1 -lsvn_subr-1 -lsvn_fs-1 + * + */ + diff --git a/debian/patches/last-changed-date-charset b/debian/patches/last-changed-date-charset new file mode 100644 index 0000000..9f759f9 --- /dev/null +++ b/debian/patches/last-changed-date-charset @@ -0,0 +1,32 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:35 -0400 +Subject: last-changed-date-charset + +Bug #290774: Convert $LastChangedDate$ keyword to the local character +Bug #290774: Convert $LastChangedDate$ keyword to the local character +set, since it is already rendered in the local language. + +Not accepted upstream: http://svn.haxx.se/dev/archive-2006-04/0730.shtml +--- + subversion/libsvn_subr/subst.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/subversion/libsvn_subr/subst.c b/subversion/libsvn_subr/subst.c +index c8c3018..a1213cb 100644 +--- a/subversion/libsvn_subr/subst.c ++++ b/subversion/libsvn_subr/subst.c +@@ -210,8 +210,12 @@ keyword_printf(const char *fmt, + break; + case 'D': /* long format of date of this revision */ + if (date) +- svn_stringbuf_appendcstr(value, +- svn_time_to_human_cstring(date, pool)); ++ { ++ char *date_keyword; ++ char *date_utf8 = svn_time_to_human_cstring(date, pool); ++ SVN_ERR(svn_utf_cstring_from_utf8(&date_keyword, date_utf8, pool)); ++ svn_stringbuf_appendcstr(value, date_keyword); ++ } + break; + case 'P': /* relative path of this file */ + if (repos_root_url && *repos_root_url != '\0' && url && *url != '\0') diff --git a/debian/patches/python-builds b/debian/patches/python-builds new file mode 100644 index 0000000..3eedf6f --- /dev/null +++ b/debian/patches/python-builds @@ -0,0 +1,132 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: python-builds + +Build for multiple python versions. Patch from Matthias Klose +<doko@debian.org> via Ubuntu. Mostly, rename libsvn_swig_py to +libsvn_swig_py2.x. + +Submitted upstream: http://svn.haxx.se/dev/archive-2008-05/0361.shtml +--- + Makefile.in | 1 + + build.conf | 18 +++++++++--------- + build/ac-macros/swig.m4 | 4 +++- + 3 files changed, 13 insertions(+), 10 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index cee3c00..5eb6f45 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -148,6 +148,7 @@ BOOST_TEST_CPPFLAGS = @BOOST_CPPFLAGS@ -DBOOST_TEST_DYN_LINK -DBOOST_TEST_NO_MAI + BOOST_TEST_LDFLAGS = @BOOST_LDFLAGS@ @BOOST_UNIT_TEST_FRAMEWORK_LIB@ + + SWIG = @SWIG@ ++PYTHON_INCLUDES = @PYTHON_INCLUDES@ + SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ @SVN_PY3C_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py + SWIG_PY_COMPILE = @SWIG_PY_COMPILE@ + SWIG_PY_LINK = @SWIG_PY_LINK@ +diff --git a/build.conf b/build.conf +index d025225..f326305 100644 +--- a/build.conf ++++ b/build.conf +@@ -499,7 +499,7 @@ external-project = svn_locale + type = swig + path = subversion/bindings/swig + sources = core.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_diff libsvn_subr apr + description = Subversion core library bindings + +@@ -507,7 +507,7 @@ description = Subversion core library bindings + type = swig + path = subversion/bindings/swig + sources = svn_client.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_client libsvn_subr apr + nonlibs = swig_core + description = Subversion client library bindings +@@ -516,7 +516,7 @@ description = Subversion client library bindings + type = swig + path = subversion/bindings/swig + sources = svn_delta.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_delta libsvn_subr apr + nonlibs = swig_core + description = Subversion delta library bindings +@@ -525,7 +525,7 @@ description = Subversion delta library bindings + type = swig + path = subversion/bindings/swig + sources = svn_diff.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_diff libsvn_subr apr + nonlibs = swig_core + description = Subversion diff library bindings +@@ -534,7 +534,7 @@ description = Subversion diff library bindings + type = swig + path = subversion/bindings/swig + sources = svn_fs.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_fs libsvn_subr apr + nonlibs = swig_core + description = Subversion FS library bindings +@@ -543,7 +543,7 @@ description = Subversion FS library bindings + type = swig + path = subversion/bindings/swig + sources = svn_ra.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_ra libsvn_subr apr + nonlibs = swig_core + description = Subversion RA library bindings +@@ -552,7 +552,7 @@ description = Subversion RA library bindings + type = swig + path = subversion/bindings/swig + sources = svn_repos.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_repos libsvn_subr apr + nonlibs = swig_core + description = Subversion repository library bindings +@@ -561,13 +561,13 @@ description = Subversion repository library bindings + type = swig + path = subversion/bindings/swig + sources = svn_wc.i +-libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby ++libs = libsvn_swig_py$(PYVER) libsvn_swig_perl libsvn_swig_ruby + libsvn_wc libsvn_subr apr + nonlibs = swig_core + description = Subversion WC library bindings + + # SWIG utility library for Python modules +-[libsvn_swig_py] ++[libsvn_swig_py$(PYVER)] + type = swig_lib + lang = python + path = subversion/bindings/swig/python/libsvn_swig_py +diff --git a/build/ac-macros/swig.m4 b/build/ac-macros/swig.m4 +index 91c6821..5a7c664 100644 +--- a/build/ac-macros/swig.m4 ++++ b/build/ac-macros/swig.m4 +@@ -110,7 +110,8 @@ AC_DEFUN(SVN_FIND_SWIG, + AC_CACHE_CHECK([for Python includes], [ac_cv_python_includes],[ + ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" + ]) +- SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" ++ PYTHON_INCLUDES="$ac_cv_python_includes" ++ SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) \$(PYTHON_INCLUDES)" + + if test "$ac_cv_python_includes" = "none"; then + SWIG_PY_ERRMSG="no distutils found" +@@ -338,6 +339,7 @@ int main() + SWIG_RB_ERRMSG="" + fi + AC_SUBST(SWIG) ++ AC_SUBST(PYTHON_INCLUDES) + AC_SUBST(SWIG_PY_INCLUDES) + AC_SUBST(SWIG_PY_COMPILE) + AC_SUBST(SWIG_PY_LINK) diff --git a/debian/patches/repos-templates b/debian/patches/repos-templates new file mode 100644 index 0000000..e3fd6e5 --- /dev/null +++ b/debian/patches/repos-templates @@ -0,0 +1,96 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: repos-templates + +Bug #210901: Add fully qualified paths to commands in example hook +Bug #210901: Add fully qualified paths to commands in example hook +scripts that get installed as .tmpl files in new repositories. Use +$REPOS/hooks/ as the path, to encourage repository admins to copy the +hooks, not just use them in place. +--- + subversion/libsvn_repos/repos.c | 28 ++++++++++++++++++---------- + 1 file changed, 18 insertions(+), 10 deletions(-) + +diff --git a/subversion/libsvn_repos/repos.c b/subversion/libsvn_repos/repos.c +index 2189de8..df87652 100644 +--- a/subversion/libsvn_repos/repos.c ++++ b/subversion/libsvn_repos/repos.c +@@ -276,7 +276,7 @@ create_locks(svn_repos_t *repos, apr_pool_t *pool) + + #define PREWRITTEN_HOOKS_TEXT \ + "# For more examples and pre-written hooks, see those in" NL \ +- "# the Subversion repository at" NL \ ++ "# /usr/share/subversion/hook-scripts, and in the repository at" NL \ + "# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and" NL \ + "# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/" NL + +@@ -409,8 +409,11 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "REPOS=\"$1\"" NL + "USER=\"$2\"" NL + "" NL +-"commit-allower.pl --repository \"$REPOS\" --user \"$USER\" || exit 1" NL +-"special-auth-check.py --user \"$USER\" --auth-level 3 || exit 1" NL ++"# Exit on all errors." NL ++"set -e" NL ++"" NL ++"\"$REPOS\"/hooks/commit-allower.pl --repository \"$REPOS\" --user \"$USER\"" NL ++"\"$REPOS\"/hooks/special-auth-check.py --user \"$USER\" --auth-level 3" NL + "" NL + "# All checks passed, so allow the commit." NL + "exit 0" NL; +@@ -470,10 +473,13 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "$SVNLOOK log -t \"$TXN\" \"$REPOS\" | \\" NL + " grep \"[a-zA-Z0-9]\" > /dev/null || exit 1" NL + "" NL ++"# Exit on all errors." NL ++"set -e" NL ++"" NL + "# Check that the author of this commit has the rights to perform" NL + "# the commit on the files and directories being modified." NL +-"commit-access-control.pl \"$REPOS\" \"$TXN\" commit-access-control.cfg || exit 1" +- NL ++"\"$REPOS\"/hooks/commit-access-control.pl \"$REPOS\" $TXN \\" NL ++" \"$REPOS\"/hooks/commit-access-control.cfg" NL + "" NL + "# All checks passed, so allow the commit." NL + "exit 0" NL; +@@ -684,7 +690,7 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "REV=\"$2\"" NL + "TXN_NAME=\"$3\"" NL + NL +-"mailer.py commit \"$REPOS\" \"$REV\" /path/to/mailer.conf" NL; ++"\"$REPOS\"/hooks/mailer.py commit \"$REPOS\" $REV \"$REPOS\"/mailer.conf" NL; + + SVN_ERR_W(write_hook_template_file(repos, SCRIPT_NAME, + description, script, pool), +@@ -719,7 +725,8 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "USER=\"$2\"" NL + "" NL + "# Send email to interested parties, let them know a lock was created:" NL +-"mailer.py lock \"$REPOS\" \"$USER\" /path/to/mailer.conf" NL; ++"\"$REPOS\"/hooks/mailer.py lock \\" NL ++" \"$REPOS\" \"$USER\" \"$REPOS\"/hooks/mailer.conf" NL; + + SVN_ERR_W(write_hook_template_file(repos, SCRIPT_NAME, + description, script, pool), +@@ -751,7 +758,8 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "USER=\"$2\"" NL + "" NL + "# Send email to interested parties, let them know a lock was removed:" NL +-"mailer.py unlock \"$REPOS\" \"$USER\" /path/to/mailer.conf" NL; ++"\"$REPOS\"/hooks/mailer.py unlock \\" NL ++" \"$REPOS\" \"$USER\" \"$REPOS\"/hooks/mailer.conf" NL; + + SVN_ERR_W(write_hook_template_file(repos, SCRIPT_NAME, + description, script, pool), +@@ -791,8 +799,8 @@ create_hooks(svn_repos_t *repos, apr_pool_t *pool) + "PROPNAME=\"$4\"" NL + "ACTION=\"$5\"" NL + "" NL +-"mailer.py propchange2 \"$REPOS\" \"$REV\" \"$USER\" \"$PROPNAME\" " +-"\"$ACTION\" /path/to/mailer.conf" NL; ++"\"$REPOS\"/hooks/mailer.py propchange2 \"$REPOS\" $REV \\" NL ++" \"$USER\" \"$PROPNAME\" \"$ACTION\" \"$REPOS\"/hooks/mailer.conf" NL; + + SVN_ERR_W(write_hook_template_file(repos, SCRIPT_NAME, + description, script, pool), diff --git a/debian/patches/rpath b/debian/patches/rpath new file mode 100644 index 0000000..9a68945 --- /dev/null +++ b/debian/patches/rpath @@ -0,0 +1,57 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: rpath + +Prevent the linker from adding an rpath to shared libraries. Original +patch by David Kimdon <dwhedon@debian.org>. The basic theory is: + +- Use libtool instead of apxs to install the apache modules. + libtool relinks without rpath in this case, apxs obviously doesn't. +--- + build.conf | 4 ++-- + build/generator/gen_base.py | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/build.conf b/build.conf +index c0a3ee2..d025225 100644 +--- a/build.conf ++++ b/build.conf +@@ -573,7 +573,7 @@ lang = python + path = subversion/bindings/swig/python/libsvn_swig_py + libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr + apriconv apr python swig +-link-cmd = $(LINK) ++link-cmd = $(LINK_LIB) + install = swig-py-lib + # need special build rule to include -DSWIGPYTHON + compile-cmd = $(COMPILE_SWIG_PY) +@@ -599,7 +599,7 @@ type = swig_lib + lang = ruby + path = subversion/bindings/swig/ruby/libsvn_swig_ruby + libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig +-link-cmd = $(LINK) $(SWIG_RB_LIBS) ++link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS) + install = swig-rb-lib + # need special build rule to include + compile-cmd = $(COMPILE_SWIG_RB) +diff --git a/build/generator/gen_base.py b/build/generator/gen_base.py +index f3041f9..4d0e7f9 100644 +--- a/build/generator/gen_base.py ++++ b/build/generator/gen_base.py +@@ -599,7 +599,7 @@ class TargetLinked(Target): + self.install = options.get('install') + self.compile_cmd = options.get('compile-cmd') + self.sources = options.get('sources', '*.c *.cpp') +- self.link_cmd = options.get('link-cmd', '$(LINK)') ++ self.link_cmd = options.get('link-cmd', '$(LINK_LIB)') + + self.external_lib = options.get('external-lib') + self.external_project = options.get('external-project') +@@ -653,6 +653,7 @@ class TargetExe(TargetLinked): + extmap = self.gen_obj._extension_map + self.objext = extmap['exe', 'object'] + self.filename = build_path_join(self.path, name + extmap['exe', 'target']) ++ self.link_cmd = '$(LINK)' + + self.manpages = options.get('manpages', '') + self.testing = options.get('testing') diff --git a/debian/patches/ruby-no-strict-aliasing b/debian/patches/ruby-no-strict-aliasing new file mode 100644 index 0000000..7e2d228 --- /dev/null +++ b/debian/patches/ruby-no-strict-aliasing @@ -0,0 +1,24 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: ruby-no-strict-aliasing + +It seems swig is generating _really_ bad code here, or something. +Whatever it is, this line suppresses 1323 warnings, any of which might +be real bugs with real consequences. +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 1390a69..cee3c00 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -156,7 +156,7 @@ SWIG_PY_ERRMSG = @SWIG_PY_ERRMSG@ + SWIG_PL_INCLUDES = @SWIG_PL_INCLUDES@ + SWIG_PL_ERRMSG = @SWIG_PL_ERRMSG@ + SWIG_RB_INCLUDES = @SWIG_RB_INCLUDES@ -I$(SWIG_SRC_DIR)/ruby/libsvn_swig_ruby +-SWIG_RB_COMPILE = @SWIG_RB_COMPILE@ ++SWIG_RB_COMPILE = @SWIG_RB_COMPILE@ -fno-strict-aliasing + SWIG_RB_LINK = @SWIG_RB_LINK@ + SWIG_RB_LIBS = @SWIG_RB_LIBS@ + SWIG_RB_SITE_LIB_DIR = @SWIG_RB_SITE_LIB_DIR@ diff --git a/debian/patches/ruby-test-svnserve-race b/debian/patches/ruby-test-svnserve-race new file mode 100644 index 0000000..af70c37 --- /dev/null +++ b/debian/patches/ruby-test-svnserve-race @@ -0,0 +1,66 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: ruby-test-svnserve-race + +Bug #378837: Ruby testsuite: wait for svnserve to start before +Bug #378837: Ruby testsuite: wait for svnserve to start before +connecting to it. This mainly affects very slow machines - observed +on various arm and m68k builds. + +Thanks to Roman Zippel, Kobayashi Noritada, Wouter Verhelst and Martin +Michlmayr. +--- + subversion/bindings/swig/ruby/test/util.rb | 28 +++++++++++++++++++++++----- + 1 file changed, 23 insertions(+), 5 deletions(-) + +diff --git a/subversion/bindings/swig/ruby/test/util.rb b/subversion/bindings/swig/ruby/test/util.rb +index 06ae7ba..4f54992 100644 +--- a/subversion/bindings/swig/ruby/test/util.rb ++++ b/subversion/bindings/swig/ruby/test/util.rb +@@ -19,6 +19,7 @@ + + require "fileutils" + require "pathname" ++require "socket" + + # Tale of a hack... + # +@@ -289,11 +290,7 @@ realm = #{@realm} + "-d", "--foreground") + } + pid, status = Process.waitpid2(@svnserve_pid, Process::WNOHANG) +- if status and status.exited? +- if $DEBUG +- STDERR.puts "port #{port} couldn't be used for svnserve" +- end +- else ++ if wait_until_svnserve_gets_available_at(port) + # svnserve started successfully. Note port number and cease + # startup attempts. + @svnserve_port = port +@@ -359,4 +356,25 @@ exit 1 + include Svnserve + extend SetupEnvironment + end ++ ++ # Waits until svnserve gets available at port +port+, avoiding the race ++ # condition between starting up a svnserve process and trying to connect ++ # to it (Bug#378837 in Debian's BTS). ++ def wait_until_svnserve_gets_available_at(port) ++ 1000.times do |n| ++ begin ++ pid, status = Process.waitpid2(@svnserve_pid, Process::WNOHANG) ++ if status and status.exited? ++ STDERR.puts "port #{port} couldn't be used for svnserve" ++ return false ++ end ++ TCPSocket.new(@svnserve_host, port).close ++ rescue Errno::ECONNREFUSED ++ sleep(n < 10 ? 0.2 : 0.5) ++ else ++ return true ++ end ++ end ++ raise "svnserve couldn't get available at port #{port}" ++ end + end diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ad2f1cd --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,13 @@ +build-fixes +last-changed-date-charset +repos-templates +rpath +ruby-no-strict-aliasing +ruby-test-svnserve-race +ssh-no-controlmaster +apr-abi +python-builds +examples-compile-instructions +workaround_EINVAL_on_kfreebsd +use-python3-as-the-interpreter-now-for-tests-not-python.patch +Temporarily-disable-testCrash_RequestChannel_nativeRead_A.patch diff --git a/debian/patches/ssh-no-controlmaster b/debian/patches/ssh-no-controlmaster new file mode 100644 index 0000000..04ab32b --- /dev/null +++ b/debian/patches/ssh-no-controlmaster @@ -0,0 +1,51 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: ssh-no-controlmaster + +Bug #413102: Avoid accidentally becoming an ssh ControlMaster. +Bug #413102: Avoid accidentally becoming an ssh ControlMaster. + +If you set ControlMaster via your ssh config: +.ssh/config: +Host * + ControlMaster auto + Controlpath ~/.ssh/master-%r@%h:%p + +you can get 'svn: Can't write to connection: Broken pipe' with certain +ssh commands, because svn can open multiple ssh sessions and kill them +at unpredictable times. + +I don't really think the problem is either svn's or openssh's fault, +but this is the obvious way to avoid it. We will still use ssh +connection sharing, but only if a ControlMaster is already present. +--- + subversion/libsvn_ra_svn/client.c | 2 +- + subversion/libsvn_subr/config_file.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/subversion/libsvn_ra_svn/client.c b/subversion/libsvn_ra_svn/client.c +index f484519..c6e3d77 100644 +--- a/subversion/libsvn_ra_svn/client.c ++++ b/subversion/libsvn_ra_svn/client.c +@@ -399,7 +399,7 @@ static svn_error_t *find_tunnel_agent(const char *tunnel, + * versions have it too. If the user is using some other ssh + * implementation that doesn't accept it, they can override it + * in the [tunnels] section of the config. */ +- val = "$SVN_SSH ssh -q --"; ++ val = "$SVN_SSH ssh -q -o ControlMaster=no --"; + } + + if (!val || !*val) +diff --git a/subversion/libsvn_subr/config_file.c b/subversion/libsvn_subr/config_file.c +index 9c0a83a..ffb9524 100644 +--- a/subversion/libsvn_subr/config_file.c ++++ b/subversion/libsvn_subr/config_file.c +@@ -1447,7 +1447,7 @@ svn_config_ensure(const char *config_dir, apr_pool_t *pool) + "### passed to the tunnel agent as <user>@<hostname>.) If the" NL + "### built-in ssh scheme were not predefined, it could be defined" NL + "### as:" NL +- "# ssh = $SVN_SSH ssh -q --" NL ++ "# ssh = $SVN_SSH ssh -q -o ControlMaster=no --" NL + "### If you wanted to define a new 'rsh' scheme, to be used with" NL + "### 'svn+rsh:' URLs, you could do so as follows:" NL + "# rsh = rsh --" NL diff --git a/debian/patches/use-python3-as-the-interpreter-now-for-tests-not-python.patch b/debian/patches/use-python3-as-the-interpreter-now-for-tests-not-python.patch new file mode 100644 index 0000000..505f52b --- /dev/null +++ b/debian/patches/use-python3-as-the-interpreter-now-for-tests-not-python.patch @@ -0,0 +1,23 @@ +From: Steve Langasek <steve.langasek@canonical.com> +Date: Sun, 12 Jan 2020 23:25:01 -0800 +Subject: use python3 as the interpreter now for tests, not python + +/usr/bin/python is no longer guaranteed to exist, per PEP 394. Use +python3 instead for compatibility. + +Closes: #948770 +Signed-off-by: James McCoy <jamessan@debian.org> +--- + subversion/tests/cmdline/svneditor.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/subversion/tests/cmdline/svneditor.py b/subversion/tests/cmdline/svneditor.py +index 7f59987..4699dc1 100755 +--- a/subversion/tests/cmdline/svneditor.py ++++ b/subversion/tests/cmdline/svneditor.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # svneditor.py: a mock $SVN_EDITOR for the Subversion test suite + # diff --git a/debian/patches/workaround_EINVAL_on_kfreebsd b/debian/patches/workaround_EINVAL_on_kfreebsd new file mode 100644 index 0000000..7b63368 --- /dev/null +++ b/debian/patches/workaround_EINVAL_on_kfreebsd @@ -0,0 +1,21 @@ +From: James McCoy <jamessan@debian.org> +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: workaround_EINVAL_on_kfreebsd + +--- + subversion/bindings/swig/ruby/test/util.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/subversion/bindings/swig/ruby/test/util.rb b/subversion/bindings/swig/ruby/test/util.rb +index 4f54992..d61b715 100644 +--- a/subversion/bindings/swig/ruby/test/util.rb ++++ b/subversion/bindings/swig/ruby/test/util.rb +@@ -371,6 +371,8 @@ exit 1 + TCPSocket.new(@svnserve_host, port).close + rescue Errno::ECONNREFUSED + sleep(n < 10 ? 0.2 : 0.5) ++ rescue Errno::EINVAL ++ sleep(n < 10 ? 0.2 : 0.5) + else + return true + end |