Hi,

Peter Samuelson wrote:
> [Jonathan Nieder]

>>  $ svn co svn://svn.debian.org/pkg-subversion/src/1.7.x

I noticed you uploaded serf 1.0.0, so I decided to try it out.  Here
are some quick patches to get the diffs in src/1.7.x/debian/patches to
apply to today's trunk (though not to actually build successfully).

| $ debian/rules build
| [...]
| # Run svn once, to make sure it populates BUILD/dummy_home/.subversion/*
| BUILD/subversion/svn/svn --version > /dev/null
| svn: E200019: Version mismatch in 'svn_gnome_keyring': found 1.6.17, expected 
1.8.0-dev
| make: *** [debian/stamp-build-arch] Error 1

Maybe svn needs a Build-Conflicts against libsvn1.  After removing
that package, the build gets further:

| $ debian/rules build
| [...]
| make[1]: Entering directory `/home/jrn/src/subversion-package/BUILD'
| /bin/bash /home/jrn/src/subversion-package/BUILD/libtool --tag=CC --silent 
--mode=compile gcc -pthread -fPIC -g -O2   -pthread  
-Werror=implicit-function-declaration  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
-DQT_SHARED  -I/home/jrn/src/subversion-package/BUILD/subversion 
-I/home/jrn/src/subversion-package/subversion/include 
-I/home/jrn/src/subversion-package/subversion/bindings/swig 
-I/home/jrn/src/subversion-package/subversion/bindings/swig/include 
-I/home/jrn/src/subversion-package/subversion/bindings/swig/proxy 
-I/home/jrn/src/subversion-package/BUILD/subversion/bindings/swig/proxy 
-I/usr/include/apr-1.0  -I/usr/include/apr-1.0  -I/usr/include/python2.6 
-I/home/jrn/src/subversion-package/subversion/bindings/swig/python/libsvn_swig_py
 -prefer-pic -c -o subversion/bindings/swig/python/svn_client.lo 
subversion/bindings/swig/python/svn_client.c
| gcc: error: subversion/bindings/swig/python/svn_client.c: No such file or 
directory
| gcc: fatal error: no input files
| compilation terminated.
| make[1]: *** [subversion/bindings/swig/python/svn_client.lo] Error 1
| make[1]: Leaving directory `/home/jrn/src/subversion-package/BUILD'
| make: *** [debian/stamp-build-arch] Error 2

It looks like build-fixes or python-builds will need more work.

Patches attached since the BTS seems to cope best that way.  These are
not intended for application (for the obvious reason that they don't
work :)); they're just meant for discussion and to perhaps save some
time for others who want to try to get further.

Jonathan Nieder (10):
  Add explanation for each patch
  Remove unused patch ruby-test-info
  build-fixes: Remove hunk applied upstream
  build-fixes: Take upstream r1097258 into account
  build-fixes: Refresh line numbers
  build-fixes: Handle perl like python and ruby
  no-extra-libs-2: Rebase against latest upstream
  rpath: Rebase against latest upstream
  apr-abi: Rebase against latest upstream
  loosen-sqlite-version-check: rediff

 debian/patches/apr-abi                       |  129 +++++++++++++-------------
 debian/patches/build-fixes                   |   56 ++++++-----
 debian/patches/entropy                       |   17 ++--
 debian/patches/examples-compile-instructions |    8 +-
 debian/patches/fix-bdb-version-detection     |   28 ++++--
 debian/patches/java-build                    |   15 +++
 debian/patches/last-changed-date-charset     |   19 ++--
 debian/patches/loosen-sqlite-version-check   |   17 ++-
 debian/patches/no-extra-libs                 |   32 ++++--
 debian/patches/no-extra-libs-2               |   34 ++++---
 debian/patches/python-builds                 |   28 ++++--
 debian/patches/repos-templates               |   22 ++++-
 debian/patches/rpath                         |   94 +++++++++++++++++--
 debian/patches/ruby-no-strict-aliasing       |   18 ++--
 debian/patches/ruby-test-info                |   29 ------
 debian/patches/ruby-test-svnserve-race       |   41 ++++++---
 debian/patches/ruby-typemap-digest           |   32 +++++--
 debian/patches/ssh-no-controlmaster          |   28 +++++-
 debian/patches/svnshell                      |   17 ++-
 19 files changed, 417 insertions(+), 247 deletions(-)
 delete mode 100644 debian/patches/ruby-test-info
From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 06:00:49 -0500
Subject: [PATCH 01/10] Add explanation for each patch

While at it, format patches like an email, with an author, date,
and subject attached to each.

In some cases, there have been interesting upstream developments
since the patches last changed; but for simplicity, this patch only
summarizes the information already available in the patch headers, SVN
log, Debian changelog, BTS, and old mailing list discussions pointed
to by the above.
---
 debian/patches/apr-abi                       |   48 +++++++++++++---
 debian/patches/build-fixes                   |   13 ++++
 debian/patches/entropy                       |   17 +++---
 debian/patches/examples-compile-instructions |    8 +--
 debian/patches/fix-bdb-version-detection     |   28 ++++++---
 debian/patches/java-build                    |   15 +++++
 debian/patches/last-changed-date-charset     |   19 ++++---
 debian/patches/loosen-sqlite-version-check   |    7 ++-
 debian/patches/no-extra-libs                 |   32 +++++++----
 debian/patches/no-extra-libs-2               |   24 +++++---
 debian/patches/python-builds                 |   28 ++++++---
 debian/patches/repos-templates               |   22 ++++++-
 debian/patches/rpath                         |   77 ++++++++++++++++++++++++-
 debian/patches/ruby-no-strict-aliasing       |   18 +++---
 debian/patches/ruby-test-svnserve-race       |   41 +++++++++----
 debian/patches/ruby-typemap-digest           |   32 +++++++---
 debian/patches/ssh-no-controlmaster          |   28 ++++++++-
 debian/patches/svnshell                      |   17 ++++--
 18 files changed, 353 insertions(+), 121 deletions(-)

diff --git a/debian/patches/apr-abi b/debian/patches/apr-abi
index af40ad4b..2de23e03 100644
--- a/debian/patches/apr-abi
+++ b/debian/patches/apr-abi
@@ -1,12 +1,42 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## apr-abi.dpatch by <pe...@p12n.org>
-##
-## DP: Use libtool -version-info to express library SONAMEs, and make it
-## DP: sensitive to libapr ABI w/r/t 64-bit file offsets.
-## DP: 
-## DP: Patch has been submitted upstream.
-
-@DPATCH@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Sat, 11 Mar 2006 23:42:32 -0600
+Subject: Make SONAME handling explicit and sensitive to apr version
+
+libapr1 enabled large file support.  That means that on 32-bit
+platforms the widths of fundamental types like apr_off_t changed, so
+adopting it breaks the libsvn ABI. (Bug#266170)
+
+Therefore we must bump soname.  The upstream consensus seems to be
+that where this ABI bump shows up as a problem, users can link to
+libapr0 or rebuild all reverse-dependencies --- ok, this can be a
+Debian-specific patch.
+
+[ps, 2006-01-08: On 64-bit platforms, APR_HAS_LARGE_FILES is not set.
+ From an upstream perspective, I wanted to set the subversion ABI number
+ based on this characteristic.  However, from a Debian perspective it
+ was incorrect as we want to use SOVERSION 1 unconditionally with libapr1
+ for simplicity.  Closes: #391744]
+
+[ps, 2008-06-19: The soname should only be passed into library link
+ lines, not binary link lines.  Fixing that gets rid of an annoying
+ warning.]
+
+[ps, 2009-03-27: libsvn-fs and libsvn-ra must look for the correct
+ library filenames to dynamically load.  This never mattered until now
+ because we weren't building svn_ra and svn_fs modules in a
+ runtime-loadable fashion, but nowadays we build the gnome-keyring
+ library that way.
+
+ I'd prefer to move all these non-public libraries, including the
+ swig stubs, to /usr/lib/svn.  They don't need to be in /usr/lib.]
+
+[ps, 2009-10-22: Fix the LINK_CXX target, too, now that we're
+ finally using it.  Technically there is a distinction between linking a
+ C++ library and a C++ binary, but we don't have any C++ binaries, so
+ LINK_CXX means the library.]
+
+Submitted at http://svn.haxx.se/dev/archive-2006-03/0522.shtml
+
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -115,6 +115,7 @@
diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
index 81ab4bf8..b4126f3d 100644
--- a/debian/patches/build-fixes
+++ b/debian/patches/build-fixes
@@ -1,3 +1,16 @@
+From: Peter Samuelson <pe...@p12n.org>
+Subject: Out-of-tree SWIG build and other build fixes
+Date: Fri, 20 Mar 2009 01:54:53 -0500
+
+Try and fix some build problems, mostly related to building SWIG stuff
+out of tree.
+
+[ps, 2009-03-21: Disable auth-test.c, which tries to test
+ gnome-keyring.  This is unlikely to work on a build daemon.]
+
+[ps, 2010-11-08: Add aprutil as a direct dependency of a couple of
+ libraries that use it.]
+
 --- a/build/generator/swig/checkout_swig_header.py
 +++ b/build/generator/swig/checkout_swig_header.py
 @@ -40,15 +40,14 @@
diff --git a/debian/patches/entropy b/debian/patches/entropy
index 85658831..dfb5df52 100644
--- a/debian/patches/entropy
+++ b/debian/patches/entropy
@@ -1,13 +1,12 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## entropy by <tr...@debian.org>
-##
-## DP: Changing the default behavior to not use apr_generate_random_bytes(), 
Debian use
-## DP: the system APR which is configured to use /dev/random. In cases where 
the
-## DP: entropy pool is drained svn commands can block waiting. Moving to the 
fallback
-## DP: of using time. (Closes: #285708, #298822) 
+From: Troy Heber <tr...@debian.org>
+Date: Tue, 08 Nov 2005 15:09:57 -0600
+Subject: Avoid draining entropy pool
+
+Changing the default behavior to not use apr_generate_random_bytes(), Debian 
use
+the system APR which is configured to use /dev/random. In cases where the
+entropy pool is drained svn commands can block waiting. Moving to the fallback
+of using time. (Closes: #285708, #298822)
 
-@DPATCH@
 --- a/subversion/libsvn_ra_svn/cram.c
 +++ b/subversion/libsvn_ra_svn/cram.c
 @@ -123,12 +123,8 @@
diff --git a/debian/patches/examples-compile-instructions 
b/debian/patches/examples-compile-instructions
index 7e96ed8f..ae804956 100644
--- a/debian/patches/examples-compile-instructions
+++ b/debian/patches/examples-compile-instructions
@@ -1,9 +1,7 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## examples_compile_instructions by <pe...@p12n.org>
-##
-## DP: Fix build instructions for /usr/share/doc/libsvn-doc/examples/*.c.
+From: Peter Samuelson <pe...@p12n.org>
+Date: Sun, 29 Oct 2006 09:18:00 -0600
+Subject: Fix build instructions for libsvn-doc/examples/*.c
 
-@DPATCH@
 --- a/tools/examples/getlocks_test.c
 +++ b/tools/examples/getlocks_test.c
 @@ -20,13 +20,11 @@
diff --git a/debian/patches/fix-bdb-version-detection 
b/debian/patches/fix-bdb-version-detection
index ca572603..a7dea89d 100644
--- a/debian/patches/fix-bdb-version-detection
+++ b/debian/patches/fix-bdb-version-detection
@@ -1,13 +1,21 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## fix-bdb-version-detection.dpatch by <pe...@p12n.org>
-##
-## DP: Do not rely on apu-config to print "-ldb4.3" or whatever - see #378105.
-## DP: Instead, include -laprutil-1 in the compile line.
-## DP:
-## DP: I don't think this can be sent upstream, as it won't work when
-## DP: compiling aprutil in-tree.  But I'm not certain.
-
-@DPATCH@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Thu, 13 Jul 2006 09:40:45 -0500
+Subject: berkeley-db.m4: Avoid bdb version detection; just link to libaprutil 
instead
+
+In #378105 I reported that 'apu-config --libs' prints a list of
+dependent libraries, where it should print nothing at all, since you
+should not explicitly link to dependent libraries in Debian.  Tollef
+said he'd fix it.
+
+However, BDB version detection relies on this behavior, as it runs
+'apu-config --libs', pulls out the -ldb* word, and compiles a test
+program with this.  By adding 'apu-config --link-ld', which will be
+-laprutil-1, that will pull in libdb4.x regardless of whether
+'apu-config --libs' prints it explicitly.
+
+I don't think this can be sent upstream, as it won't work when
+compiling aprutil in-tree.  But I'm not certain.
+
 --- a/build/ac-macros/berkeley-db.m4
 +++ b/build/ac-macros/berkeley-db.m4
 @@ -183,7 +183,7 @@
diff --git a/debian/patches/java-build b/debian/patches/java-build
index 9b02d8f7..23a5bbf4 100644
--- a/debian/patches/java-build
+++ b/debian/patches/java-build
@@ -1,6 +1,21 @@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Mon, 30 Jun 2008 00:25:34 -0500
+Subject: Work around differences between Sun javah and gcj javah
+
+Fix the java build, at long last.
+
 A hack to get around differences between Sun javah and gcj javah - in Sun
 javah, symbols in a nested class use _ as a separator instead of _00024.
 
+[ps, 2010-01-21: Update for gcj 4.4.
+ Patch is from Nobuhiro Iwamatsu in bug #561516, simplified.]
+
+[ps, 2010-01-27: Improve the sed expression to avoid one little false
+ positive (some changelist constant is 200024L).]
+
+[ps, 2010-11-08: Refresh to apply to trunk r1032687 (new makefile
+ generation system).]
+
 --- a/build/generator/templates/makefile.ezt
 +++ b/build/generator/templates/makefile.ezt
 @@ -90,7 +90,8 @@
diff --git a/debian/patches/last-changed-date-charset 
b/debian/patches/last-changed-date-charset
index 5cd6701a..e74fc705 100644
--- a/debian/patches/last-changed-date-charset
+++ b/debian/patches/last-changed-date-charset
@@ -1,11 +1,14 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## last-changed-date-charset by <pe...@p12n.org>
-##
-## DP: Convert $LastChangedDate$ keyword to the local character set.
-## DP: See #290774.
-
-@DPATCH@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Fri, 21 Apr 2006 09:47:18 -0500
+Subject: Use the correct encoding when expanding the $LastChangedDate$ keyword 
(#290774)
+
+Convert $LastChangedDate$ keyword to the local character set.
+
+Upstream discussion came to no conclusion:
+http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=723613
+
+Fixes http://bugs.debian.org/290774
+
 --- a/subversion/libsvn_subr/subst.c
 +++ b/subversion/libsvn_subr/subst.c
 @@ -199,8 +199,12 @@
diff --git a/debian/patches/loosen-sqlite-version-check 
b/debian/patches/loosen-sqlite-version-check
index 5bc2b358..429c6a28 100644
--- a/debian/patches/loosen-sqlite-version-check
+++ b/debian/patches/loosen-sqlite-version-check
@@ -1,9 +1,14 @@
-The actual ABI compatibility of sqlite3 doesn't seem to depend on the
+From: Peter Samuelson <pe...@p12n.org>
+Date: Wed, 05 Jan 2011 11:01:38 -0600
+Subject: Relax the SQLite version check to match Debian sqlite3 packaging
+
+The actual ABI compatibility of sqlite3 doesn't depend on the
 patchlevel (the x in 3.7.x), so omit that in our sanity check here.
 
 This matters in Debian because the sqlite3 library package exports a
 slightly more liberal shlibs file than the library version itself.
 
+Fixes: http://bugs.debian.org/608925
 
 --- a/subversion/libsvn_subr/sqlite.c
 +++ b/subversion/libsvn_subr/sqlite.c
diff --git a/debian/patches/no-extra-libs b/debian/patches/no-extra-libs
index 4b9b293f..d70cd1a5 100644
--- a/debian/patches/no-extra-libs
+++ b/debian/patches/no-extra-libs
@@ -1,14 +1,24 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## no-extra-libs by <pe...@p12n.org>
-##
-## DP: Work around "libtool disease" in '{apr,aprutil,neon}-config --libs',
-## DP: where they think our runtime linker is too stupid to handle recursive
-## DP: library dependencies.
-## DP:
-## DP: See Debian bug #338302.
-
-@DPATCH@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Wed, 09 Nov 2005 06:03:45 -0600
+Subject: Work around "libtool disease" in '{apr,aprutil,neon}-config --libs'
+
+... where they think our runtime linker is too stupid to handle recursive
+library dependencies.  See Debian bug #338302.
+
+With this patch, subversion will no longer depend on: libssl0.9.8,
+libldap2, libexpat2, libxml2, zlib1g.  I'm hoping this fixes #336373
+because of the libssl confusion - waiting to hear back from the
+submitter.
+
+[gpast...@debian.org, 2005-12-26: update for svn 1.3.x]
+
+[ps, 2006-09-08: Use {apr,apu}-config --link-ld and "pkg-config --libs
+ neon" instead of straight library names.]
+
+[ps, 2008-06-07: Use pkg-config rather than apr-config and apu-config,
+ just on general principle.  Note this hard-codes apr/apr-util 1.x,
+ not 0.9.]
+
 --- a/build/ac-macros/apr.m4
 +++ b/build/ac-macros/apr.m4
 @@ -99,9 +99,9 @@
diff --git a/debian/patches/no-extra-libs-2 b/debian/patches/no-extra-libs-2
index e5a65028..272aa554 100644
--- a/debian/patches/no-extra-libs-2
+++ b/debian/patches/no-extra-libs-2
@@ -1,11 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## no-extra-libs-2 by <pe...@p12n.org>
-##
-## DP: Eliminate several unneeded inter-library linkages.
-## DP: This saves us one package dependency (subversion -> libneon).
-
-@DPATCH@
+From: Peter Samuelson <pe...@p12n.org>
+Date: Thu, 05 Jan 2006 10:30:35 -0600
+Subject: Eliminate several unneeded inter-library linkages
+
+More link pruning, which eliminates one package dependency (subversion
+-> libneon).  I'll probably submit at least the build.conf portion of
+this upstream.
+
+[ps, 2006-09-09: Remove a couple more instances of neon (nobody but
+ libsvn_ra_dav should link neon directly).  Also hack the apriconv
+ library declaration not to pull in aprutil.  (It might be correct on
+ Windows, I don't know, but we don't need apriconv _at all_, so we
+ don't want it to pull in aprutil for us.)]
+
+[ps, 2010-11-08: refresh]
+
 --- a/build.conf
 +++ b/build.conf
 @@ -110,7 +110,7 @@
diff --git a/debian/patches/python-builds b/debian/patches/python-builds
index 54637ea4..36b2111d 100644
--- a/debian/patches/python-builds
+++ b/debian/patches/python-builds
@@ -1,12 +1,22 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## python-builds by <d...@debian.org>
-##
-## DP: Prepare upstream build system for building multiple python versions.
-## DP: Mostly, rename libsvn_swig_py to libsvn_swig_py2.x.
-## DP: Submitted upstream: http://svn.haxx.se/dev/archive-2008-05/0361.shtml
-
-@DPATCH@
+From: Matthias Klose <d...@debian.org>
+Date: Mon, 14 Apr 2008 12:18:04 -0500 (actually earlier)
+Subject: Allow bindings built for multiple versions of Python to coexist
+
+> The major motivation for this is that the built bindings are specific
+> to the used minor version of Python.
+
+Speaking of which, libsvn_swig_py is specific to the minor version, and
+at least in Debian/Ubuntu, we install that to the system lib dir. Thus
+Matthias Klose wrote the following patch. It adds the variables PYVER
+and PYTHON_INCLUDES to the Makefile so they can be specified from the
+command line without rerunning configure.
+
+Mostly, rename libsvn_swig_py to libsvn_swig_py2.x.
+
+[pe...@p12n.org, 2008-05-29: port to svn 1.5.x]
+
+Submitted upstream: http://svn.haxx.se/dev/archive-2008-05/0361.shtml
+
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -131,6 +131,7 @@
diff --git a/debian/patches/repos-templates b/debian/patches/repos-templates
index 59f7a500..6bd4508d 100644
--- a/debian/patches/repos-templates
+++ b/debian/patches/repos-templates
@@ -1,8 +1,22 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## repos-templates by <dwhe...@debian.org>
+From: David Kimdon <dwhe...@debian.org>
+Date: Tue, 10 Feb 2004 15:58:12 -0600
+Subject: Make default hook templates convenient to use
+
+Newly created repositories have a post-commit.tmpl that calls
+commit-email.pl and then log-commit.py. It does not first set a path,
+so unless someone edits the hook, commit-email.pl cannot be found at
+all.  Likewise for other scripts the hook calls.
+
+[pe...@p12n.org, 2005-12-03: Now hooks live in /usr/share/subversion,
+ not /usr/lib/subversion.]
+
+[pe...@p12n.org, 2009-03-20: Change /usr/share/subversion/hook-scripts/
+ to $REPOS/hooks/ everywhere in the hook script .tmpl example files.  I
+ want to encourage repository administrators to copy the hooks, not just
+ use them in place.  Makes it easier to upgrade without breaking stuff.]
+
+Fixes: http://bugs.debian.org/210901
 
-@DPATCH@
 --- a/subversion/libsvn_repos/repos.c
 +++ b/subversion/libsvn_repos/repos.c
 @@ -287,7 +287,7 @@
diff --git a/debian/patches/rpath b/debian/patches/rpath
index 21ef4e0a..4dd47ea8 100644
--- a/debian/patches/rpath
+++ b/debian/patches/rpath
@@ -1,8 +1,77 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## rpath by <dwhe...@debian.org>
+From: David Kimdon <dwhe...@debian.org>
+Date: Mon, 26 Apr 2004 13:13:06 -0500
+Subject: Remove rpath from shared libraries
+
+Prevent the linker from adding an rpath to shared libraries.
+
+* Makefile.in (LINK): Remove -rpath.
+  (LINK_LIB): New variable.  This is what we use to link libraries.
+  'libtool' keys off the '-rpath' argument to know that it should create a
+  shared library.  Removing the rpath parameter from the library link will
+  cause libtool to produce a convenience library (a static archive) and no
+  shared libs, that is not what we want.  For libraries in /usr/lib,
+  libtool knows not to actually put the rpath into the binary.
+* build/generator/gen_base.py (TargetLinked): Use the '$(LINK_LIB)'
+  command by default.
+  ($(SWIG_PL_DIR)/native/Makefile): After creating the perl makefiles
+  remove runtime linker path.
+  (TargetExe): Executables should be linked with '$(LINK)' command so
+  no rpath is put into the binary.
+* build.conf (libsvn_swig_py): This should be linked with LINK_LIB.
+* build/generator/gen_make.py (Generator): Fix the swig and apache
+  module link rule to explicitly link to the necessary subversion
+  shared libraries.
+
+OK, so, this isn't really done but I finally concluded that this part
+of rpath.patch works.  It doesn't suppress the rpath for the two apache
+modules, but it does for everything else.  As far as I can tell it
+didn't actually break anything.
+
+I'll try to port the python code for the apache modules but even if I
+don't get it done, we've got fewer lintian warnings than 1.2.0-1 did.
+
+(And really, lintian shouldn't care if an apache module has an rpath
+embedded in it.  It's not a shared library, it's just a module that
+uses shared library *format*.  Same as it shouldn't care about the
+SONAME in the module.)
+
+[dk, 2004-05-02: Pass the desired libraries and search paths
+ explicitly to the linker when linking apache modules.]
+
+[dk, 2004-12-10: Fix apache module link.  This way, we don't have
+ rpath in apache modules either.]
+
+[dk, 2004-12-10: Remove rpath from the swig libraries, too.]
+
+[dk, 2004-12-11: Remove rpath from perl binding libraries.]
+
+[pe...@p12n.org, 2005-12-03: Simplify by using "sed -i".]
+
+[pe...@p12n.org, 2006-01-03: Invoke Makefile.PL with
+ "INSTALLDIRS=vendor".  By doing this we no longer have to invoke
+ Makefile.PL directly in debian/rules, which allows a bit of other
+ cleanup.]
+
+[pe...@p12n.org, 2006-03-28: Finally strip out rpaths from apache2
+ modules.  The trick is just to let libtool install the modules,
+ rather than having apxs2 do it (as upstream has) or copying via
+ debhelper (as we were doing).  libtool strips out the rpath by first
+ relinking the module.]
+
+[pe...@p12n.org, 2006-05-06: Simplify the sed expression that comments
+ out LD_RUN_PATH settings.]
+
+[pe...@p12n.org, 2008-06-20: Fix install-swig-rb target.  libtool
+ troubles, y'know.]
+
+[pe...@p12n.org, 2009-10-22: Fix the LINK_CXX target, now that we're
+ finally using it.  Technically there is a distinction between linking
+ a C++ library and a C++ binary, but we don't have any C++ binaries,
+ so LINK_CXX means the library.]
+
+[pe...@p12n.org, 2010-11-08: Adjust to upstream's new template-based
+ Makefile generator.]
 
-@DPATCH@
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -201,8 +201,9 @@
diff --git a/debian/patches/ruby-no-strict-aliasing 
b/debian/patches/ruby-no-strict-aliasing
index 01bd1641..f0e638a3 100644
--- a/debian/patches/ruby-no-strict-aliasing
+++ b/debian/patches/ruby-no-strict-aliasing
@@ -1,14 +1,12 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## ruby-no-strict-aliasing by <pe...@p12n.org>
-##
-## DP: Compile ruby bindings with -fno-strict-aliasing.
-## DP: It seems swig is generating _really_ bad code here, or something.
-## DP:
-## DP: Whatever it is, this line suppresses 1323 warnings, any of which might
-## DP: be real bugs with real consequences.
+From: Peter Samuelson <pe...@p12n.org>
+Date: Thu, 05 Jan 2006 08:13:55 -0600
+Subject: Compile ruby bindings with -fno-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.
 
-@DPATCH@
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -136,7 +136,7 @@
diff --git a/debian/patches/ruby-test-svnserve-race 
b/debian/patches/ruby-test-svnserve-race
index 6e5b6c7f..7be702e1 100644
--- a/debian/patches/ruby-test-svnserve-race
+++ b/debian/patches/ruby-test-svnserve-race
@@ -1,16 +1,31 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## ruby-test-svnserve-race by <pe...@p12n.org>
-##
-## DP: Hack to try to avoid the race in the ruby testsuite harness between
-## DP: starting up a svnserve process and trying to connect to it.  If the
-## DP: client tries to connect too soon, before svnserve has initialised
-## DP: itself, the test in progress gets a 'connection refused' and fails.
-## DP:
-## DP: This race causes random test failures on slow platforms - observed on
-## DP: an arm with 32 MB of RAM, and m68k buildds of unknown specs.
-
-@DPATCH@
+From: Roman Zippel <zip...@linux-m68k.org>
+Date: Mon, 28 Aug 2006 02:32:59 +0200
+Subject: ruby tests: Avoid race between starting svnserve and connecting to it
+
+The tbm NSLU2 patch.  If the client tries to connect too soon, before
+svnserve has initialised itself, the test in progress gets a
+'connection refused' and fails.
+
+This one's only needed on really slow machines.  It prevents random
+ruby testsuite failures - observed on an arm with 32 MB of RAM and
+m68k buildds of unknown specs.
+
+[A predecessor to this patch just used "sleep 1".  rooneg upstream
+ didn't like it because it was a kludge and it added 60 seconds to the
+ build time.  But oh well, it was easy to write and easy to maintain.
+
+ Later the patch was adjusted to use sleep 3 instead of sleep 1, as a
+ quick fix for build failures on the even-slower m68k autobuilders.
+
+ Roman's implementation of the ruby-test-svnserve-race patch (based
+ on an earlier patch from nori) is actually reliable.  In this
+ version, instead of just sleeping, we contact the running svnserve
+ process in a loop to see if it has started listening.
+
+ Thanks to Kobayashi Noritada, Wouter Verhelst and Roman Zippel.]
+
+Fixes: http://bugs.debian.org/378837
+
 --- a/subversion/bindings/swig/ruby/test/util.rb
 +++ b/subversion/bindings/swig/ruby/test/util.rb
 @@ -19,6 +19,7 @@
diff --git a/debian/patches/ruby-typemap-digest 
b/debian/patches/ruby-typemap-digest
index d2278d87..2aad99d8 100644
--- a/debian/patches/ruby-typemap-digest
+++ b/debian/patches/ruby-typemap-digest
@@ -1,13 +1,25 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## ruby-typemap-digest by <zip...@linux-m68k.org>
-##
-## DP: Change the ruby 'digest' typemaps to tolerate NULL pointers.
-## DP: This may be the bug which has sporadically plagued us for
-## DP: several months, most recently on m68k.  Patch by Roman Zippel.
-## DP:
-## DP: Sent upstream: http://svn.haxx.se/dev/archive-2006-09/0536.shtml
-
-@DPATCH@
+From: Roman Zippel <zip...@linux-m68k.org>
+Date: Mon, 18 Sep 2006 01:05:02 +0200
+Subject: Change the ruby 'digest' typemaps to tolerate NULL pointers.
+
+I looked at the failing self tests [on m68k]. The first one is a bug
+in the created wrapper. The basic problem is that in
+svn_delta.c:_wrap_svn_txdelta_apply_wrapper() the value of temp3 is not
+modified by svn_txdelta_apply_wrapper(), so the return is basically
+random. In this case the stack is clear and svn_md5_digest_to_cstring()
+returns a NULL, which rb_str_new2() doesn't like.
+
+The easiest fix is to change the typemap in svn_types.swg so it can deal
+with the NULL pointer. (BTW I tried returning Qnil here, but that
+doesn't work well output_helper.)
+
+This looks like it probably would have fixed our former ruby woes in
+powerpc and alpha, but I have no desire to actually verify this.  In
+any case, many thanks to Roman!
+
+Fixes http://bugs.debian.org/387996
+Sent upstream: http://svn.haxx.se/dev/archive-2006-09/0536.shtml
+
 --- a/subversion/bindings/swig/include/svn_types.swg
 +++ b/subversion/bindings/swig/include/svn_types.swg
 @@ -1066,7 +1066,7 @@
diff --git a/debian/patches/ssh-no-controlmaster 
b/debian/patches/ssh-no-controlmaster
index c146ad21..c5d5be1c 100644
--- a/debian/patches/ssh-no-controlmaster
+++ b/debian/patches/ssh-no-controlmaster
@@ -1,11 +1,31 @@
-Fix / work around the bug where 'ssh -o ControlMaster=auto'
-interacts badly with the svn+ssh tunnel scheme.  As I note in
-the bug log for #413102, I don't really think the problem is
-either svn's or openssh's fault, but the obvious way to avoid
+From: Peter Samuelson <pe...@p12n.org>
+Date: Sat, 03 May 2008 01:18:09 -0500
+Subject: 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 will get 'svn: Can't write to connection: Broken pipe'
+when doing svn log but svn up and other subversion commands will work fine.
+This only happens with svn+ssh.
+
+As I note in the bug log for #413102, I don't really think the problem
+is either svn's or openssh's fault, but the obvious way to avoid
 it is to avoid accidentally becoming a ControlMaster.  In this
 mode we will still use ssh connection sharing, but only if a
 ControlMaster is already present.
 
+[ps, 2009-08-20: Replace previous patch with the much simpler approach
+ upstream demonstrates with 'ssh -q'.
+
+ I was pretty embarrassed to see this on the dev list, given what I had
+ done instead.]
+
+Fixes: http://bugs.debian.org/413102
+
 --- a/subversion/libsvn_subr/config_file.c
 +++ b/subversion/libsvn_subr/config_file.c
 @@ -1027,7 +1027,7 @@
diff --git a/debian/patches/svnshell b/debian/patches/svnshell
index 730b745c..21fecf3a 100644
--- a/debian/patches/svnshell
+++ b/debian/patches/svnshell
@@ -1,10 +1,15 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-##
-## svnshell by <dwhe...@debian.org>
-##
-## DP: Contains r20992 from upstream trunk, which may be in 1.4.1.
+From: Roland Illig <roland.il...@gmx.de>
+Date: Sat, 31 Jan 2004 18:31:08 +0100
+Subject: svnshell: Make the error messages for unknown commands less confusing
+
+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. :)
+
+Fixes: http://bugs.debian.org/234462
 
-@DPATCH@
 --- a/tools/examples/svnshell.py
 +++ b/tools/examples/svnshell.py
 @@ -56,14 +56,8 @@
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 18 Jul 2011 22:55:54 -0500
Subject: [PATCH 02/10] Remove unused patch ruby-test-info

It's been a year and nothing seems to have happened.  If it happens
again, we can come up with information to acquire again or dig into
history to remember the old story.
---
 debian/patches/ruby-test-info |   29 -----------------------------
 1 files changed, 0 insertions(+), 29 deletions(-)
 delete mode 100644 debian/patches/ruby-test-info

diff --git a/debian/patches/ruby-test-info b/debian/patches/ruby-test-info
deleted file mode 100644
index bbddc2a4..00000000
--- a/debian/patches/ruby-test-info
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/subversion/bindings/swig/ruby/test/test_info.rb
-+++ b/subversion/bindings/swig/ruby/test/test_info.rb
-@@ -26,9 +26,12 @@
- 
-     info = make_info(commit_info.revision)
-     assert_equal(@author, info.author)
--    assert_equal(commit_info.date, info.date)
--    assert_equal(commit_info.revision, info.revision)
--    assert_equal(log, info.log)
-+    # FIXME: Strange debian buildd error #1
-+    # 
https://buildd.debian.org/fetch.cgi?pkg=subversion;ver=1.6.5dfsg-1;arch=powerpc;stamp=1250968748
-+    # 
https://buildd.debian.org/fetch.cgi?pkg=subversion;ver=1.6.11dfsg-1;arch=powerpc;stamp=1271760487
-+    # assert_equal(commit_info.date, info.date)
-+    # assert_equal(commit_info.revision, info.revision)
-+    # assert_equal(log, info.log)
-   end
- 
-   def test_dirs_changed
-@@ -47,7 +50,9 @@
- 
-     info = make_info(commit_info.revision)
-     assert_equal(["/", "#{dir}/"], info.changed_dirs)
--    assert_equal(commit_info.revision, info.revision)
-+    # FIXME: Strange Debian buildd error #2
-+    # 
https://buildd.debian.org/fetch.cgi?pkg=subversion;ver=1.6.5dfsg-1;arch=powerpc;stamp=1250968748
-+    # assert_equal(commit_info.revision, info.revision)
-     assert_equal(log, info.log)
-   end
- 
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 18 Jul 2011 23:01:50 -0500
Subject: [PATCH 03/10] build-fixes: Remove hunk applied upstream

Upstream uses readlink instead of cd && pwd, but the idea is the
same:

 r1036534 | stsp | 2010-11-18 11:08:50 -0600 (Thu, 18 Nov 2010) | 10 lines

 * Makefile.in
   (swig-pl): Allow the perl swig bindings to compile within a working copy
    that contains a symlink in its path.
    r857892 overlooked the fact that abs_builddir and abs_srcdir may be
    different paths but point to the same directory due to symlinks.
    If this was the case, the ln -sf command in the swig-pl target mistakenly
    symlinked the .c files in $(SWIG_PL_DIR)/native to themselves, overwriting
    already generated .c files, and causing the build to abort with an error
    such as "make: don't know to make core.c".
---
 debian/patches/build-fixes |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
index b4126f3d..65b5f39d 100644
--- a/debian/patches/build-fixes
+++ b/debian/patches/build-fixes
@@ -55,15 +55,6 @@ out of tree.
  
  ### Automate JAR creation using Makefile generator's javahl-java.jar
  ### property.  Enhance generator to support JAR installation.
-@@ -731,7 +731,7 @@
- swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
-   $(SWIG_PL_DIR)/native/Makefile
- swig-pl: $(swig-pl_DEPS)
--      if test "$(SWIG_PL_DIR)" != "$(SWIG_PL_SRC_DIR)"; then \
-+      if test "$$(cd $(SWIG_PL_DIR);pwd)" != "$(SWIG_PL_SRC_DIR)"; then \
-         ln -sf $(SWIG_PL_SRC_DIR)/native/*.c $(SWIG_PL_DIR)/native; \
-       fi
-       cd $(SWIG_PL_DIR)/native; $(MAKE) OPTIMIZE="" 
OTHERLDFLAGS="$(SWIG_LDFLAGS)"
 @@ -754,8 +754,7 @@
        fi
        for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 06:17:19 -0500
Subject: [PATCH 04/10] build-fixes: Take upstream r1097258 into account

That revision introduces a .swig_checked file that catches attempts to
make swig targets with swig configured out.  This is just a lexical
conflict; semantically, the two patches are independent.
---
 debian/patches/build-fixes |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
index 65b5f39d..c815217c 100644
--- a/debian/patches/build-fixes
+++ b/debian/patches/build-fixes
@@ -109,10 +109,14 @@ out of tree.
      for fname in self.includes:
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1245,6 +1245,11 @@
+@@ -1245,9 +1245,15 @@
  AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
  
+ # Ensure that SWIG is checked after reconfiguration.
+ rm -f .swig_checked
+ 
  AC_OUTPUT
++
 +if test "$abs_srcdir" != "$abs_builddir"
 +then
 +  AC_MSG_NOTICE([Creating build directories])
@@ -169,10 +173,10 @@ out of tree.
  # Section 4: Rules to build SWIG .c files from .i files
  ########################################
  [for swig_c]
--[swig_c.c_file]:[for swig_c.deps] [swig_c.deps][end]
+-[swig_c.c_file]: .swig_checked [for swig_c.deps] [swig_c.deps][end]
 -      $(SWIG) $(SWIG_INCLUDES) [swig_c.opts] -o $@ 
$(top_srcdir)/[swig_c.source][end]
-+$(top_srcdir)/[swig_c.c_file]: [swig_c.source] [for swig_c.deps] 
[swig_c.deps][end]
++$(top_srcdir)/[swig_c.c_file]: [swig_c.source] .swig_checked [for 
swig_c.deps] [swig_c.deps][end]
 +      $(SWIG) $(SWIG_INCLUDES) [swig_c.opts] -o $@ $<[end]
  
- 
- ########################################
+ # This needs to be here, rather than in Makefile.in, else
+ # './autogen.sh --release' doesn't find it.
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 06:31:33 -0500
Subject: [PATCH 05/10] build-fixes: Refresh line numbers

---
 debian/patches/build-fixes |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
index c815217c..e6e59d38 100644
--- a/debian/patches/build-fixes
+++ b/debian/patches/build-fixes
@@ -35,7 +35,7 @@ out of tree.
                     % " ".join(checkout_locations))
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -286,14 +286,14 @@
+@@ -279,14 +279,14 @@
  
  # The path to generated and complementary source files for the SWIG
  # bindings.
@@ -55,7 +55,7 @@ out of tree.
  
  ### Automate JAR creation using Makefile generator's javahl-java.jar
  ### property.  Enhance generator to support JAR installation.
-@@ -754,8 +754,7 @@
+@@ -759,8 +759,7 @@
        fi
        for d in $(SWIG_PL_DIR)/libsvn_swig_perl; \
        do \
@@ -65,7 +65,7 @@ out of tree.
        done
        if [ -f "$(SWIG_PL_DIR)/native/Makefile" ]; then \
          cd $(SWIG_PL_DIR)/native; $(MAKE) clean; \
-@@ -788,7 +787,7 @@
+@@ -793,7 +792,7 @@
        fi
        for d in $(SWIG_PY_DIR) $(SWIG_PY_DIR)/libsvn_swig_py; \
        do \
@@ -74,7 +74,7 @@ out of tree.
        done
        find $(SWIG_PY_SRC_DIR) $(SWIG_PY_DIR) -name "*.pyc" -exec rm {} ';'
  
-@@ -812,8 +811,7 @@
+@@ -817,8 +816,7 @@
        fi
        for d in $(SWIG_RB_DIR) $(SWIG_RB_DIR)/libsvn_swig_ruby; \
        do \
@@ -86,7 +86,7 @@ out of tree.
  extraclean-swig-rb: clean-swig-rb
 --- a/build/generator/gen_base.py
 +++ b/build/generator/gen_base.py
-@@ -313,7 +313,8 @@
+@@ -333,7 +333,8 @@
  
  class SWIGSource(SourceFile):
    def __init__(self, filename):
@@ -109,25 +109,22 @@ out of tree.
      for fname in self.includes:
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1245,9 +1245,15 @@
- AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
- 
- # Ensure that SWIG is checked after reconfiguration.
- rm -f .swig_checked
+@@ -1355,6 +1355,12 @@
  
  AC_OUTPUT
-+
+ 
 +if test "$abs_srcdir" != "$abs_builddir"
 +then
 +  AC_MSG_NOTICE([Creating build directories])
 +  (cd "$abs_srcdir"; find subversion tools contrib -type d) | xargs $MKDIR
 +fi
- 
++
  # ==== Print final messages to user ==========================================
  
+ dnl Configure is long - users tend to miss warnings printed during it.
 --- a/build.conf
 +++ b/build.conf
-@@ -197,7 +197,7 @@
+@@ -196,7 +196,7 @@
  description = Subversion Client Library
  type = lib
  path = subversion/libsvn_client
@@ -136,7 +133,7 @@ out of tree.
  install = lib
  msvc-export = svn_client.h private/svn_client_private.h
  
-@@ -260,7 +260,7 @@
+@@ -259,7 +259,7 @@
  description = Subversion Repository Access Library
  type = lib
  path = subversion/libsvn_ra
@@ -145,7 +142,7 @@ out of tree.
  # conditionally add more dependencies
  add-deps = $(SVN_RA_LIB_DEPS)
  add-install-deps = $(SVN_RA_LIB_INSTALL_DEPS)
-@@ -701,13 +701,14 @@
+@@ -694,13 +694,14 @@
  # ----------------------------------------------------------------------------
  # Tests for libsvn_subr
  
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 04:43:08 -0500
Subject: [PATCH 06/10] build-fixes: Handle perl like python and ruby

No good reason; it just seems like the right thing to do.
---
 debian/patches/build-fixes |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/debian/patches/build-fixes b/debian/patches/build-fixes
index e6e59d38..f47b95fa 100644
--- a/debian/patches/build-fixes
+++ b/debian/patches/build-fixes
@@ -47,9 +47,10 @@ out of tree.
 +SWIG_RB_DIR = $(top_builddir)/subversion/bindings/swig/ruby
  
  # The path to the source files for the SWIG bindings
- SWIG_PL_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/perl
+-SWIG_PL_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/perl
 -SWIG_PY_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/python
 -SWIG_RB_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig/ruby
++SWIG_PL_SRC_DIR = $(top_srcdir)/subversion/bindings/swig/perl
 +SWIG_PY_SRC_DIR = $(top_srcdir)/subversion/bindings/swig/python
 +SWIG_RB_SRC_DIR = $(top_srcdir)/subversion/bindings/swig/ruby
  
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 18 Jul 2011 23:35:23 -0500
Subject: [PATCH 07/10] no-extra-libs-2: Rebase against latest upstream

No actual conflicting changes.
---
 debian/patches/no-extra-libs-2 |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/debian/patches/no-extra-libs-2 b/debian/patches/no-extra-libs-2
index 272aa554..7ae95fc8 100644
--- a/debian/patches/no-extra-libs-2
+++ b/debian/patches/no-extra-libs-2
@@ -41,7 +41,7 @@ this upstream.
 -       libsvn_subr libsvn_fs aprutil apriconv apr neon
 +       libsvn_subr libsvn_fs apriconv apr
  sources = *.cpp *.c
- add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) 
$(javahl_callback_javah_DEPS)
+ add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) 
$(javahl_callback_javah_DEPS) $(javahl_types_javah_DEPS)
  install = javahl-lib
 @@ -1023,7 +1023,7 @@
  
@@ -64,9 +64,9 @@ this upstream.
 --- a/subversion/bindings/swig/perl/native/Makefile.PL.in
 +++ b/subversion/bindings/swig/perl/native/Makefile.PL.in
 @@ -46,7 +46,12 @@
-                                                                       fs_base
-                                                                       fs_util
-                                                                       
fs_fs/));
+                    @modules, qw/diff subr ra_local ra_svn ra_neon
+                                 ra_serf fs_base fs_util fs_fs/);
+ 
 -my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
 +sub libs_line {
 +   return join(' ', $apr_ldflags,
@@ -82,7 +82,7 @@ this upstream.
                   " -I$swig_srcdir -g"),
      OBJECT => q/$(O_FILES)/,
 -    LIBS => [join(' ', $apr_ldflags,
--                  (map {$_ = abs_path($_); "-L$_"} @ldpaths),
+-                  (map {"-L$_"} @ldpaths),
 -                  @ldmodules, '-lsvn_swig_perl-1',
 -                  `$swig -perl -ldflags`)],
      test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 06:35:16 -0500
Subject: [PATCH 08/10] rpath: Rebase against latest upstream

The only obviously relevant change was introducing a LINK_CXX_LIB
that does what LINK_CXX used to do (probably part of the soname
handling changes for apr2).
---
 debian/patches/rpath |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/debian/patches/rpath b/debian/patches/rpath
index 4dd47ea8..d8c1c03d 100644
--- a/debian/patches/rpath
+++ b/debian/patches/rpath
@@ -72,16 +72,23 @@ SONAME in the module.)
 [pe...@p12n.org, 2010-11-08: Adjust to upstream's new template-based
  Makefile generator.]
 
+[jrnie...@gmail.com, 2011-07-18: Upstream introduced a separate
+ LINK_CXX_LIB, so use it.]
+
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -201,8 +201,9 @@
+@@ -201,10 +201,10 @@
  COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
  COMPILE_JAVAHL_JAVAH = $(JAVAH)
  
 -LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) 
$(LDFLAGS) -rpath $(libdir)
+-LINK_LIB = $(LINK) $(LT_SO_VERSION)
+-LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) 
$(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
+-LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
 +LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) 
$(LDFLAGS)
- LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) 
$(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
-+LINK_LIB = $(LINK) -rpath $(libdir)
++LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
++LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) 
$(CXXFLAGS) $(LDFLAGS)
++LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) -rpath $(libdir)
  
  # special link rule for mod_dav_svn
  LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) 
$(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module 
$(APACHE_LDFLAGS)
@@ -94,8 +101,8 @@ SONAME in the module.)
 +              $(PERL) Makefile.PL INSTALLDIRS=vendor; \
 +              sed -i -e '/^LD_RUN_PATH/s/^/#/' Makefile Makefile.[a-z]*
  
- swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
-   $(SWIG_PL_DIR)/native/Makefile
+ # There is a "readlink -f" command on some systems for the same purpose,
+ # but it's not as portable (e.g. Mac OS X doesn't have it).  These should
 --- a/build.conf
 +++ b/build.conf
 @@ -489,7 +489,7 @@
-- 
1.7.6

From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 01:22:01 -0500
Subject: [PATCH 09/10] apr-abi: Rebase against latest upstream

---
 debian/patches/apr-abi |   80 +++++++++++++---------------------------------
 1 files changed, 22 insertions(+), 58 deletions(-)

diff --git a/debian/patches/apr-abi b/debian/patches/apr-abi
index 2de23e03..bd8c473a 100644
--- a/debian/patches/apr-abi
+++ b/debian/patches/apr-abi
@@ -35,66 +35,30 @@ Debian-specific patch.
  C++ library and a C++ binary, but we don't have any C++ binaries, so
  LINK_CXX means the library.]
 
+[jrnie...@gmail.com, 2011-07-19: Simplify and move the logic to
+ configure.ac to match the upstream handling of apr2.]
+
 Submitted at http://svn.haxx.se/dev/archive-2006-03/0522.shtml
 
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -115,6 +115,7 @@
- LTCXXFLAGS = --tag=CXX --silent
- LT_CFLAGS = @LT_CFLAGS@
- LT_LDFLAGS = @LT_LDFLAGS@
-+LT_SOVERSION = @SVN_LT_SOVERSION@
- LT_NO_UNDEFINED = @LT_NO_UNDEFINED@
- LT_CXX_LIBADD = @LT_CXX_LIBADD@
- 
-@@ -202,8 +203,8 @@
- COMPILE_JAVAHL_JAVAH = $(JAVAH)
- 
- LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) 
$(LDFLAGS)
--LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) 
$(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
--LINK_LIB = $(LINK) -rpath $(libdir)
-+LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) 
$(CXXFLAGS) $(LDFLAGS) -rpath $(libdir) $(LT_SOVERSION)
-+LINK_LIB = $(LINK) -rpath $(libdir) $(LT_SOVERSION)
- 
- # special link rule for mod_dav_svn
- LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) 
$(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module 
$(APACHE_LDFLAGS)
---- a/build/ac-macros/apr.m4
-+++ b/build/ac-macros/apr.m4
-@@ -111,11 +111,31 @@
-     AC_MSG_ERROR([apr-config --shlib-path-var failed])
-   fi
- 
-+  dnl Determine whether or not we will be using the 64-bit apr_off_t ABI.
-+  dnl This necessarily changes the SONAME of libsvn_*.
-+if test `expr $apr_version : 0` -ne 0; then
-+  SVN_LT_SOVERSION="-version-info 0"
-+else
-+  SVN_LT_SOVERSION="-version-info 1"
-+fi
-+  dnl   oldcppflags=$CPPFLAGS
-+  dnl   CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
-+  dnl   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+  dnl #include <apr.h>
-+  dnl #if APR_HAS_LARGE_FILES
-+  dnl # error Large file ABI required
-+  dnl #endif
-+  dnl     ]])], [apr_lfs_abi=0], [apr_lfs_abi=1])
-+  dnl   CPPFLAGS=$oldcppflags
-+  dnl
-+  dnl SVN_LT_SOVERSION="-version-info $apr_lfs_abi"
-+
-   AC_SUBST(SVN_APR_PREFIX)
-   AC_SUBST(SVN_APR_CONFIG, ["$apr_config"])
-   AC_SUBST(SVN_APR_INCLUDES)
-   AC_SUBST(SVN_APR_LIBS)
-   AC_SUBST(SVN_APR_SHLIB_PATH_VAR)
-+  AC_SUBST(SVN_LT_SOVERSION)
- ])
- 
- dnl SVN_DOWNLOAD_APR()
+--- a/configure.ac
++++ b/configure.ac
+@@ -106,7 +106,12 @@ if test `expr $apr_version : 2` -ne 0; then
+   AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
+   AC_SUBST(SVN_APRUTIL_LIBS)
+ else
+-  SVN_LT_SOVERSION="-version-info 0"
++  dnl We are Debian.
++  if test `expr $apr_version : 1` -ne 0; then
++    SVN_LT_SOVERSION="-version-info 1"
++  else
++    SVN_LT_SOVERSION="-version-info 0"
++  fi
+   APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
+   SVN_LIB_APRUTIL($APU_VER_REGEXES)
+ fi
 --- a/subversion/libsvn_fs/fs-loader.c
 +++ b/subversion/libsvn_fs/fs-loader.c
-@@ -98,7 +98,7 @@
+@@ -99,7 +99,7 @@ load_module(fs_init_func_t *initfunc, const char *name, 
apr_pool_t *pool)
      const char *funcname;
      apr_status_t status;
  
@@ -105,7 +69,7 @@ Submitted at 
http://svn.haxx.se/dev/archive-2006-03/0522.shtml
  
 --- a/subversion/libsvn_ra/ra_loader.c
 +++ b/subversion/libsvn_ra/ra_loader.c
-@@ -159,7 +159,7 @@
+@@ -159,7 +159,7 @@ load_ra_module(svn_ra__init_func_t *func,
      const char *compat_funcname;
      apr_status_t status;
  
@@ -116,7 +80,7 @@ Submitted at 
http://svn.haxx.se/dev/archive-2006-03/0522.shtml
      compat_funcname = apr_psprintf(pool, "svn_ra_%s_init", ra_name);
 --- a/subversion/libsvn_subr/auth.c
 +++ b/subversion/libsvn_subr/auth.c
-@@ -398,7 +398,7 @@
+@@ -399,7 +399,7 @@ svn_auth_get_platform_specific_provider
        const char *library_label, *library_name;
        const char *provider_function_name, *version_function_name;
        library_name = apr_psprintf(pool,
From: Jonathan Nieder <jrnie...@gmail.com>
Date: Tue, 19 Jul 2011 01:27:05 -0500
Subject: [PATCH 10/10] loosen-sqlite-version-check: rediff

Upstream made a small style fix.
---
 debian/patches/loosen-sqlite-version-check |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/debian/patches/loosen-sqlite-version-check 
b/debian/patches/loosen-sqlite-version-check
index 429c6a28..5901e5ce 100644
--- a/debian/patches/loosen-sqlite-version-check
+++ b/debian/patches/loosen-sqlite-version-check
@@ -16,8 +16,8 @@ Fixes: http://bugs.debian.org/608925
  static svn_error_t *
  init_sqlite(void *baton, apr_pool_t *pool)
  {
--  if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER) {
-+  if (sqlite3_libversion_number()/1000 < SQLITE_VERSION_NUMBER/1000) {
-     return svn_error_createf(SVN_ERR_SQLITE_ERROR, NULL,
-                              _("SQLite compiled for %s, but running with %s"),
-                              SQLITE_VERSION, sqlite3_libversion());
+-  if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER)
++  if (sqlite3_libversion_number()/1000 < SQLITE_VERSION_NUMBER/1000)
+     {
+       return svn_error_createf(
+                     SVN_ERR_SQLITE_ERROR, NULL,
-- 
1.7.6

Reply via email to