From 10f79967625e3f1817ddce98d3f7cc06b1391c47 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 31 Jul 2019 07:03:00 -0400 Subject: Commit patch queue (exported by git-debrebase) [git-debrebase make-patches: export and commit patches] --- debian/patches/apr-abi | 30 +++++ debian/patches/build-fixes | 77 +++++++++++++ debian/patches/examples-compile-instructions | 115 +++++++++++++++++++ debian/patches/java10-compatibility | 161 +++++++++++++++++++++++++++ debian/patches/last-changed-date-charset | 32 ++++++ debian/patches/python-builds | 132 ++++++++++++++++++++++ debian/patches/repos-templates | 96 ++++++++++++++++ debian/patches/rpath | 57 ++++++++++ debian/patches/ruby-no-strict-aliasing | 24 ++++ debian/patches/ruby-test-svnserve-race | 66 +++++++++++ debian/patches/series | 13 +++ debian/patches/ssh-no-controlmaster | 51 +++++++++ debian/patches/svnshell | 34 ++++++ debian/patches/workaround_EINVAL_on_kfreebsd | 21 ++++ 14 files changed, 909 insertions(+) create mode 100644 debian/patches/apr-abi create mode 100644 debian/patches/build-fixes create mode 100644 debian/patches/examples-compile-instructions create mode 100644 debian/patches/java10-compatibility create mode 100644 debian/patches/last-changed-date-charset create mode 100644 debian/patches/python-builds create mode 100644 debian/patches/repos-templates create mode 100644 debian/patches/rpath create mode 100644 debian/patches/ruby-no-strict-aliasing create mode 100644 debian/patches/ruby-test-svnserve-race create mode 100644 debian/patches/series create mode 100644 debian/patches/ssh-no-controlmaster create mode 100644 debian/patches/svnshell create mode 100644 debian/patches/workaround_EINVAL_on_kfreebsd diff --git a/debian/patches/apr-abi b/debian/patches/apr-abi new file mode 100644 index 0000000..726e68f --- /dev/null +++ b/debian/patches/apr-abi @@ -0,0 +1,30 @@ +From: James McCoy +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 8792adf..fff6e68 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..d1c7810 --- /dev/null +++ b/debian/patches/build-fixes @@ -0,0 +1,77 @@ +From: James McCoy +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 f4c6e61..cbed2cc 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -900,8 +900,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; \ +@@ -935,7 +934,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 {} ';' + +@@ -967,8 +966,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 8f01622..22bfebb 100644 +--- a/build.conf ++++ b/build.conf +@@ -186,7 +186,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] +@@ -243,7 +243,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 + +@@ -320,7 +320,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 +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/java10-compatibility b/debian/patches/java10-compatibility new file mode 100644 index 0000000..c2d7a1a --- /dev/null +++ b/debian/patches/java10-compatibility @@ -0,0 +1,161 @@ +From: James McCoy +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: java10-compatibility + +--- + build/ac-macros/java.m4 | 2 +- + build/generator/templates/build-outputs.mk.ezt | 12 ++++-------- + .../org/apache/subversion/javahl/CommitItemStateFlags.java | 9 +++++++++ + .../subversion/javahl/callback/UserPasswordCallback.java | 5 +++++ + .../src/org/apache/subversion/javahl/types/Revision.java | 2 ++ + 5 files changed, 21 insertions(+), 9 deletions(-) + +diff --git a/build/ac-macros/java.m4 b/build/ac-macros/java.m4 +index d8a7a36..9bd14d8 100644 +--- a/build/ac-macros/java.m4 ++++ b/build/ac-macros/java.m4 +@@ -166,7 +166,7 @@ AC_DEFUN(SVN_FIND_JDK, + # The release for "-source" could actually be greater than that + # of "-target", if we want to cross-compile for lesser JVMs. + if test -z "$JAVAC_FLAGS"; then +- JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.6" ++ JAVAC_FLAGS="--release 8" + if test "$enable_debugging" = "yes"; then + JAVAC_FLAGS="-g -Xlint -Xlint:unchecked -Xlint:serial -Xlint:path $JAVAC_FLAGS" + if test -z "$JAVAC_COMPAT_FLAGS"; then +diff --git a/build/generator/templates/build-outputs.mk.ezt b/build/generator/templates/build-outputs.mk.ezt +index 3677a6d..2b03b46 100644 +--- a/build/generator/templates/build-outputs.mk.ezt ++++ b/build/generator/templates/build-outputs.mk.ezt +@@ -98,17 +98,13 @@ autogen-swig: autogen-swig-[swig_langs.short] + [for target] + [target.varname]_PATH = [target.path][if-any target.install] + install-[target.install]: [target.install_deps][end] +-[is target.type "java"][target.varname]_HEADERS = [for target.headers][if-index target.headers first][else] [end][target.headers][end] ++[is target.type "java"] + [target.varname]_OBJECTS = [for target.objects][if-index target.objects first][else] [end][target.objects][end] +-[target.varname]_DEPS = $([target.varname]_HEADERS) $([target.varname]_OBJECTS)[for target.add_deps] [target.add_deps][end][for target.deps][if-index target.deps first][else] [end][target.deps][end] ++[target.varname]_DEPS = $([target.varname]_OBJECTS)[for target.add_deps] [target.add_deps][end][for target.deps][if-index target.deps first][else] [end][target.deps][end] + [target.name]: $([target.varname]_DEPS) +-[if-any target.headers][target.varname]_CLASS_FILENAMES =[for target.header_class_filenames] [target.header_class_filenames][end] +-[target.varname]_CLASSES =[for target.header_classes] [target.header_classes][end] +-$([target.varname]_HEADERS): $([target.varname]_CLASS_FILENAMES) +- [target.link_cmd] -d [target.output_dir] -classpath [target.classes]:$([target.varname]_CLASSPATH) $([target.varname]_CLASSES) +-[end][if-any target.sources][target.varname]_SRC =[for target.sources] [target.sources][end] ++[if-any target.sources][target.varname]_SRC =[for target.sources] [target.sources][end] + $([target.varname]_OBJECTS): $([target.varname]_SRC) +- [target.link_cmd] -d [target.output_dir] -classpath [target.classes]:$([target.varname]_CLASSPATH) $([target.varname]_SRC) ++ [target.link_cmd] -h [target.output_dir]/../include/ -d [target.output_dir] -classpath [target.classes]:$([target.varname]_CLASSPATH) $([target.varname]_SRC) + [if-any target.jar] + $(JAR) cf [target.jar_path] -C [target.classes][for target.packages] [target.packages][end][end][end] + [else][is target.type "i18n"][target.varname]_DEPS =[for target.add_deps] [target.add_deps][end][for target.objects] [target.objects][end][for target.deps] [target.deps][end] +diff --git a/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java b/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java +index 6e8f593..d07452c 100644 +--- a/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java ++++ b/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java +@@ -23,6 +23,8 @@ + + package org.apache.subversion.javahl; + ++import java.lang.annotation.*; ++ + /** + * The constants in this interface describe the changes to an item to + * be committed. +@@ -32,36 +34,43 @@ public interface CommitItemStateFlags + /** + * the item has been added + */ ++ @Native + public static final int Add=1; + + /** + * the item has been deleted + */ ++ @Native + public static final int Delete=2; + + /** + * the item has text modifications + */ ++ @Native + public static final int TextMods=4; + + /** + * the item has property modifications + */ ++ @Native + public static final int PropMods=8; + + /** + * the item has been copied + */ ++ @Native + public static final int IsCopy=16; + + /** + * the item has a lock token + */ ++ @Native + public static final int LockToken = 32; + + /** + * the item was moved to this location + * @since 1.8 + */ ++ @Native + public static int MovedHere = 64; + } +diff --git a/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java b/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java +index a89f219..215c041 100644 +--- a/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java ++++ b/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java +@@ -23,6 +23,8 @@ + + package org.apache.subversion.javahl.callback; + ++import java.lang.annotation.*; ++ + /** + *

The interface for requesting authentication credentials from the + * user. Should the javahl bindings need the matching information, +@@ -40,16 +42,19 @@ public interface UserPasswordCallback + /** + * Reject the connection to the server. + */ ++ @Native + public static final int Reject = 0; + + /** + * Accept the connection to the server once. + */ ++ @Native + public static final int AcceptTemporary = 1; + + /** + * Accept the connection to the server forever. + */ ++ @Native + public static final int AcceptPermanently = 2; + + /** +diff --git a/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java b/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java +index 675737d..9a80778 100644 +--- a/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java ++++ b/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java +@@ -23,6 +23,7 @@ + + package org.apache.subversion.javahl.types; + ++import java.lang.annotation.*; + import java.text.SimpleDateFormat; + import java.util.Date; + import java.util.Locale; +@@ -179,6 +180,7 @@ public class Revision implements java.io.Serializable + /** + * Marker revision number for no real revision + */ ++ @Native + public static final int SVN_INVALID_REVNUM = -1; + + /** diff --git a/debian/patches/last-changed-date-charset b/debian/patches/last-changed-date-charset new file mode 100644 index 0000000..fd156c8 --- /dev/null +++ b/debian/patches/last-changed-date-charset @@ -0,0 +1,32 @@ +From: James McCoy +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..b69f90a 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_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..543089f --- /dev/null +++ b/debian/patches/python-builds @@ -0,0 +1,132 @@ +From: James McCoy +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: python-builds + +Build for multiple python versions. Patch from Matthias Klose + 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 f874f7d..d4a83ea 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -144,6 +144,7 @@ GOOGLEMOCK_INCLUDES = -I@GOOGLEMOCK_SRCDIR@/googlemock/include -I@GOOGLEMOCK_SRC + GOOGLEMOCK_LIB_INCLUDES = -I@GOOGLEMOCK_SRCDIR@/googlemock -I@GOOGLEMOCK_SRCDIR@/googletest $(GOOGLEMOCK_INCLUDES) + + SWIG = @SWIG@ ++PYTHON_INCLUDES = @PYTHON_INCLUDES@ + SWIG_PY_INCLUDES = @SWIG_PY_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 31b8060..2434c4c 100644 +--- a/build.conf ++++ b/build.conf +@@ -494,7 +494,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 + +@@ -502,7 +502,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 +@@ -511,7 +511,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 +@@ -520,7 +520,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 +@@ -529,7 +529,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 +@@ -538,7 +538,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 +@@ -547,7 +547,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 +@@ -556,13 +556,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 d63e87c..371708a 100644 +--- a/build/ac-macros/swig.m4 ++++ b/build/ac-macros/swig.m4 +@@ -108,7 +108,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 + AC_MSG_WARN([python bindings cannot be built without distutils module]) +@@ -261,6 +262,7 @@ int main() + AC_MSG_RESULT([$SWIG_RB_TEST_VERBOSE]) + 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..237c106 --- /dev/null +++ b/debian/patches/repos-templates @@ -0,0 +1,96 @@ +From: James McCoy +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 2333f56..0cc760c 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..caae11f --- /dev/null +++ b/debian/patches/rpath @@ -0,0 +1,57 @@ +From: James McCoy +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 . 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 22bfebb..31b8060 100644 +--- a/build.conf ++++ b/build.conf +@@ -568,7 +568,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) +@@ -594,7 +594,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 f7a75da..59cd6e3 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..f2c8a69 --- /dev/null +++ b/debian/patches/ruby-no-strict-aliasing @@ -0,0 +1,24 @@ +From: James McCoy +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 cbed2cc..f874f7d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -150,7 +150,7 @@ SWIG_PY_LINK = @SWIG_PY_LINK@ + SWIG_PY_LIBS = @SWIG_PY_LIBS@ + SWIG_PL_INCLUDES = @SWIG_PL_INCLUDES@ + 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 +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..36c8e29 --- /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 +svnshell +apr-abi +python-builds +examples-compile-instructions +workaround_EINVAL_on_kfreebsd +java10-compatibility diff --git a/debian/patches/ssh-no-controlmaster b/debian/patches/ssh-no-controlmaster new file mode 100644 index 0000000..0c169d9 --- /dev/null +++ b/debian/patches/ssh-no-controlmaster @@ -0,0 +1,51 @@ +From: James McCoy +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 dd60dbe..afdd12a 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 bd2ec82..5014de6 100644 +--- a/subversion/libsvn_subr/config_file.c ++++ b/subversion/libsvn_subr/config_file.c +@@ -1449,7 +1449,7 @@ svn_config_ensure(const char *config_dir, apr_pool_t *pool) + "### passed to the tunnel agent as @.) 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/svnshell b/debian/patches/svnshell new file mode 100644 index 0000000..dc204f6 --- /dev/null +++ b/debian/patches/svnshell @@ -0,0 +1,34 @@ +From: James McCoy +Date: Wed, 1 Aug 2018 20:44:36 -0400 +Subject: svnshell + +Bug #234462: The error messages that svnshell spits out for unknown +Bug #234462: The error messages that svnshell spits out for unknown +commands are confusing. They should be replaced by a "Unknown command." +error message. Upstream says we have no sense of humor. (: + +Patch from Roland Illig . +--- + tools/examples/svnshell.py | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/tools/examples/svnshell.py b/tools/examples/svnshell.py +index 9c67af4..b05e7ef 100755 +--- a/tools/examples/svnshell.py ++++ b/tools/examples/svnshell.py +@@ -56,14 +56,8 @@ class SVNShell(Cmd): + def postcmd(self, stop, line): + self._setup_prompt() + +- _errors = ["Huh?", +- "Whatchoo talkin' 'bout, Willis?", +- "Say what?", +- "Nope. Not gonna do it.", +- "Ehh...I don't think so, chief."] +- + def default(self, line): +- print(self._errors[randint(0, len(self._errors) - 1)]) ++ print "Unknown command." + + def do_cat(self, arg): + """dump the contents of a file""" 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 +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 -- cgit v1.2.3