[PATCH] Subversion: Update to 1.9.4

Alexander Marx alexander.marx at ipfire.org
Sat Sep 3 17:37:11 CEST 2016


Signed-off-by: Alexander Marx <alexander.marx at ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl at ipfire.org>
---
 .../patches/0001-subversion-1.9.0-rpath.patch      | 41 ++++++++++
 subversion/patches/0002-subversion-1.9.0-pie.patch | 89 ++++++++++++++++++++++
 .../patches/0003-subversion-1.8.5-swigplWall.patch | 16 ++++
 .../patches/001-subversion-1.7.0-rpath.patch       | 49 ------------
 subversion/patches/002-subversion-1.7.0-pie.patch  | 57 --------------
 subversion/subversion.nm                           | 15 ++--
 6 files changed, 156 insertions(+), 111 deletions(-)
 create mode 100644 subversion/patches/0001-subversion-1.9.0-rpath.patch
 create mode 100644 subversion/patches/0002-subversion-1.9.0-pie.patch
 create mode 100644 subversion/patches/0003-subversion-1.8.5-swigplWall.patch
 delete mode 100644 subversion/patches/001-subversion-1.7.0-rpath.patch
 delete mode 100644 subversion/patches/002-subversion-1.7.0-pie.patch

diff --git a/subversion/patches/0001-subversion-1.9.0-rpath.patch b/subversion/patches/0001-subversion-1.9.0-rpath.patch
new file mode 100644
index 0000000..1531006
--- /dev/null
+++ b/subversion/patches/0001-subversion-1.9.0-rpath.patch
@@ -0,0 +1,41 @@
+
+Only link libraries using -rpath, to avoid unnecessary RPATH tags in executables.
+
+--- subversion-1.9.0/build.conf.rpath
++++ subversion-1.9.0/build.conf
+@@ -561,7 +561,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)
+@@ -586,7 +586,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 -uap subversion-1.9.0/Makefile.in.rpath subversion-1.9.0/Makefile.in
+--- subversion-1.9.0/Makefile.in.rpath
++++ subversion-1.9.0/Makefile.in
+@@ -255,10 +255,10 @@ COMPILE_CXXHL_CXX = $(LT_COMPILE_CXX) $(
+ COMPILE_GMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GMOCK_INCLUDES) -o $@ -c
+ COMPILE_CXXHL_GMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GMOCK_INCLUDES) -o $@ -c
+ 
+-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_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)
diff --git a/subversion/patches/0002-subversion-1.9.0-pie.patch b/subversion/patches/0002-subversion-1.9.0-pie.patch
new file mode 100644
index 0000000..437e1b7
--- /dev/null
+++ b/subversion/patches/0002-subversion-1.9.0-pie.patch
@@ -0,0 +1,89 @@
+
+Link executables using -pie, link test executables using -no-install.
+
+diff -uap subversion-1.9.0/build.conf.pie subversion-1.9.0/build.conf
+diff -uap subversion-1.9.0/build.conf.pie subversion-1.9.0/build.conf
+diff -uap subversion-1.9.0/build.conf.pie subversion-1.9.0/build.conf
+--- subversion-1.9.0/build.conf.pie
++++ subversion-1.9.0/build.conf
+@@ -743,7 +743,7 @@ libs = libsvncxxhl libgmock libsvn_subr
+ sources = tests/*.cpp
+ install = tests
+ compile-cmd = $(COMPILE_CXXHL_GMOCK_CXX)
+-link-cmd = $(LINK_CXX)
++link-cmd = $(LINK_TEST_CXX)
+ 
+ 
+ # ----------------------------------------------------------------------------
+@@ -760,7 +760,7 @@ sources = gmock-gtest-all.cc
+ install = tests
+ msvc-static = yes
+ compile-cmd = $(COMPILE_GMOCK_CXX)
+-link-cmd = $(LINK_CXX_LIB)
++link-cmd = $(LINK_TEST_CXX_LIB)
+ 
+ # ----------------------------------------------------------------------------
+ #
+@@ -775,6 +775,7 @@ install = test
+ libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr
+ msvc-static = yes
+ undefined-lib-symbols = yes
++link-cmd = $(LINK_TEST_LIB)
+ 
+ # ----------------------------------------------------------------------------
+ # Tests for libsvn_fs_base
+diff -uap subversion-1.9.0/build/generator/gen_base.py.pie subversion-1.9.0/build/generator/gen_base.py
+--- subversion-1.9.0/build/generator/gen_base.py.pie
++++ subversion-1.9.0/build/generator/gen_base.py
+@@ -585,7 +585,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')
+@@ -644,6 +644,14 @@ class TargetExe(TargetLinked):
+ 
+     self.msvc_force_static = options.get('msvc-force-static') == 'yes'
+ 
++    if self.install in ['test', 'bdb-test', 'sub-test', ]:
++      self.link_cmd = '$(LINK_TEST)'
++    elif self.link_cmd == '$(LINK_LIB)':
++      # Over-ride the default for TargetLinked.
++      self.link_cmd = '$(LINK_EXE)'
++    elif self.link_cmd not in ['$(LINK_TEST_CXX)', ]:
++      raise GenError('ERROR: Unknown executable link type for ' + self.name + ': ' + self.link_cmd)
++    
+   def add_dependencies(self):
+     TargetLinked.add_dependencies(self)
+ 
+diff -uap subversion-1.9.0/Makefile.in.pie subversion-1.9.0/Makefile.in
+--- subversion-1.9.0/Makefile.in.pie
++++ subversion-1.9.0/Makefile.in
+@@ -259,6 +259,11 @@ LINK = $(LIBTOOL) $(LTFLAGS) --mode=link
+ 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)
++LINK_TEST = $(LINK) -no-install
++LINK_TEST_LIB = $(LINK) -avoid-version
++LINK_TEST_CXX_LIB = $(LINK_CXX) -avoid-version
++LINK_EXE = $(LINK) -pie
++LINK_CXX_EXE = $(LINK) -pie
+ 
+ # 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)
+@@ -753,10 +758,10 @@ schema-clean:
+ 	$(PYTHON) $(top_srcdir)/build/transform_sql.py $< $(top_srcdir)/$@
+ 
+ .c.o:
+-	$(COMPILE) -o $@ -c $<
++	$(COMPILE) -fPIE -o $@ -c $<
+ 
+ .cpp.o:
+-	$(COMPILE_CXX) -o $@ -c $<
++	$(COMPILE_CXX) -fPIE -o $@ -c $<
+ 
+ .c.lo:
+ 	$(LT_COMPILE) -o $@ -c $<
diff --git a/subversion/patches/0003-subversion-1.8.5-swigplWall.patch b/subversion/patches/0003-subversion-1.8.5-swigplWall.patch
new file mode 100644
index 0000000..af66806
--- /dev/null
+++ b/subversion/patches/0003-subversion-1.8.5-swigplWall.patch
@@ -0,0 +1,16 @@
+
+Don't drop -Wall in the swig Perl bindings, otherwise building with
+e.g. -Wformat-security might break.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1037341
+
+--- subversion-1.8.5/subversion/bindings/swig/perl/native/Makefile.PL.in.swigplWall
++++ subversion-1.8.5/subversion/bindings/swig/perl/native/Makefile.PL.in
+@@ -54,7 +54,6 @@ my $includes = ' -I/usr/include/apr-1
+ # SWIG is using C++ style comments in an extern "C" code.
+ $cflags =~ s/-ansi\s+//g;
+ $cflags =~ s/-std=c89\s+//g;
+-$cflags =~ s/-Wall//g;
+ $cflags =~ s/-Wunused//g;
+ $cflags =~ s/-Wshadow//g;
+ $cflags =~ s/-Wstrict-prototypes//g;
diff --git a/subversion/patches/001-subversion-1.7.0-rpath.patch b/subversion/patches/001-subversion-1.7.0-rpath.patch
deleted file mode 100644
index 2481346..0000000
--- a/subversion/patches/001-subversion-1.7.0-rpath.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -uap subversion-1.7.0/build.conf.rpath subversion-1.7.0/build.conf
---- subversion-1.7.0/build.conf.rpath	2011-08-04 21:18:50.000000000 +0100
-+++ subversion-1.7.0/build.conf	2011-10-12 09:23:43.844525530 +0100
-@@ -478,7 +478,7 @@ type = swig_lib
- lang = python
- path = subversion/bindings/swig/python/libsvn_swig_py
- libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
--link-cmd = $(LINK)
-+link-cmd = $(LINK_LIB)
- install = swig-py-lib
- # need special build rule to include -DSWIGPYTHON
- compile-cmd = $(COMPILE_SWIG_PY)
-@@ -501,7 +501,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
--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 -uap subversion-1.7.0/build/generator/gen_base.py.rpath subversion-1.7.0/build/generator/gen_base.py
---- subversion-1.7.0/build/generator/gen_base.py.rpath	2011-06-22 17:44:54.000000000 +0100
-+++ subversion-1.7.0/build/generator/gen_base.py	2011-10-12 09:23:15.368649375 +0100
-@@ -506,6 +506,10 @@ class TargetLib(TargetLinked):
-     self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
-     self.msvc_export = options.get('msvc-export', '').split()
- 
-+    ### hmm. this is Makefile-specific
-+    if self.link_cmd == '$(LINK)':
-+      self.link_cmd = '$(LINK_LIB)'
-+
- class TargetApacheMod(TargetLib):
- 
-   def __init__(self, name, options, gen_obj):
-diff -uap subversion-1.7.0/Makefile.in.rpath subversion-1.7.0/Makefile.in
---- subversion-1.7.0/Makefile.in.rpath	2011-07-16 12:50:53.000000000 +0100
-+++ subversion-1.7.0/Makefile.in	2011-10-12 09:24:36.165524732 +0100
-@@ -203,8 +203,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
- 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 = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
-+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
- LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
- LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
- 
diff --git a/subversion/patches/002-subversion-1.7.0-pie.patch b/subversion/patches/002-subversion-1.7.0-pie.patch
deleted file mode 100644
index 85e9f07..0000000
--- a/subversion/patches/002-subversion-1.7.0-pie.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -uap subversion-1.7.0/build/generator/gen_base.py.pie subversion-1.7.0/build/generator/gen_base.py
---- subversion-1.7.0/build/generator/gen_base.py.pie	2011-10-12 09:25:30.510524103 +0100
-+++ subversion-1.7.0/build/generator/gen_base.py	2011-10-12 09:25:30.515650110 +0100
-@@ -406,7 +406,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')
-@@ -462,6 +462,11 @@ class TargetExe(TargetLinked):
-     self.manpages = options.get('manpages', '')
-     self.testing = options.get('testing')
- 
-+    if self.install == 'test' or self.install == 'bdb-test':
-+      self.link_cmd = '$(LINK_TEST)'
-+    else:
-+      self.link_cmd = '$(LINK_EXE)'
-+
-   def add_dependencies(self):
-     TargetLinked.add_dependencies(self)
- 
-@@ -507,8 +512,8 @@ class TargetLib(TargetLinked):
-     self.msvc_export = options.get('msvc-export', '').split()
- 
-     ### hmm. this is Makefile-specific
--    if self.link_cmd == '$(LINK)':
--      self.link_cmd = '$(LINK_LIB)'
-+    if self.install == 'test':
-+       self.link_cmd = '$(LINK_TEST_LIB)'
- 
- class TargetApacheMod(TargetLib):
- 
-diff -uap subversion-1.7.0/Makefile.in.pie subversion-1.7.0/Makefile.in
---- subversion-1.7.0/Makefile.in.pie	2011-10-12 09:25:30.511600030 +0100
-+++ subversion-1.7.0/Makefile.in	2011-10-12 09:26:16.757524426 +0100
-@@ -205,6 +205,9 @@ COMPILE_JAVAHL_JAVAH = $(JAVAH)
- 
- LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
- LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
-+LINK_TEST = $(LINK) -no-install
-+LINK_TEST_LIB = $(LINK) -avoid-version
-+LINK_EXE = $(LINK) -pie
- LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
- LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
- 
-@@ -657,7 +660,7 @@ schema-clean:
- 	$(PYTHON) $(top_srcdir)/build/transform_sql.py $< $(top_srcdir)/$@
- 
- .c.o:
--	$(COMPILE) -o $@ -c $<
-+	$(COMPILE) -fpie -o $@ -c $<
- 
- .cpp.o:
- 	$(COMPILE_CXX) -o $@ -c $<
diff --git a/subversion/subversion.nm b/subversion/subversion.nm
index 54ab6a7..db42224 100644
--- a/subversion/subversion.nm
+++ b/subversion/subversion.nm
@@ -4,7 +4,7 @@
 ###############################################################################
 
 name       = subversion
-version    = 1.8.13
+version    = 1.9.4
 release    = 1
 
 groups     = Development/Tools
@@ -41,13 +41,14 @@ build
 	end
 
 	configure_options += \
-		--sbindir=/sbin \
+		CPPFLAGS="-P" \
 		--disable-mod-activation \
-		--disable-static \
-		--with-berkeley-db
+		--disable-static
 
 	prepare_cmds
-		./autogen.sh --release
+		# Regenerate build system.
+		sed -i "/seems to be moved/s/^/#/" build/ltmain.sh &&
+		./autogen.sh
 
 		# Fix shebang lines.
 		perl -pi -e 's|/usr/bin/env perl -w|/usr/bin/perl -w|' tools/hook-scripts/*.pl.in
@@ -77,6 +78,10 @@ packages
 			the Subversion libraries.
 		end
 
+		requires
+			perl(:MODULE_COMPAT_%{perl_version})
+		end
+
 		files
 			/usr/lib/libsvn_swig_perl-1.so.*
 			/usr/lib/perl*/
-- 
2.6.3



More information about the Development mailing list