[csync2] Add missing patch file csync2-1.34-librsync-1.0.0.patch

Robert Scheck robert at fedoraproject.org
Mon Mar 2 00:14:23 UTC 2015


commit c14244432c63411d38fd6aba59b97831556b0e50
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Mon Mar 2 01:13:47 2015 +0100

    Add missing patch file csync2-1.34-librsync-1.0.0.patch

 csync2-1.34-librsync-1.0.0.patch | 35 +++++++++++++++++++++++++++++++++++
 csync2.spec                      |  2 ++
 2 files changed, 37 insertions(+)
---
diff --git a/csync2-1.34-librsync-1.0.0.patch b/csync2-1.34-librsync-1.0.0.patch
new file mode 100644
index 0000000..d46653d
--- /dev/null
+++ b/csync2-1.34-librsync-1.0.0.patch
@@ -0,0 +1,35 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for csync2 <= 1.34 based on the
+patch by Roman Tereshonkov and Kari Hautio to avoid a build failure with librsync
+>= 1.0.0 (which is a security bugfix release). The discussion and solution finding
+can be found at https://bugs.launchpad.net/duplicity/+bug/1416344 (for duplicity).
+
+--- csync2-1.34/rsync.c				2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/rsync.c.librsync-1.0.0		2015-03-02 00:18:43.000000000 +0100
+@@ -134,8 +134,13 @@
+ 
+ 	if ( isreg ) {
+ 		csync_debug(3, "Running rs_sig_file() from librsync....\n");
++#ifdef RS_DEFAULT_STRONG_LEN
+ 		result = rs_sig_file(basis_file, sig_file,
+ 				RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, &stats);
++#else /* librsync >= 1.0.0 */
++		result = rs_sig_file(basis_file, sig_file,
++				RS_DEFAULT_BLOCK_LEN, 8, RS_MD4_SIG_MAGIC, &stats);
++#endif
+ 		if (result != RS_DONE) {
+ 			csync_debug(0, "Internal error from rsync library!\n");
+ 			goto error;
+@@ -216,8 +221,13 @@
+ 	if ( !basis_file ) basis_file = fopen("/dev/null", "rb");
+ 
+ 	csync_debug(3, "Running rs_sig_file() from librsync..\n");
++#ifdef RS_DEFAULT_STRONG_LEN
+ 	result = rs_sig_file(basis_file, sig_file,
+ 			RS_DEFAULT_BLOCK_LEN, RS_DEFAULT_STRONG_LEN, &stats);
++#else /* librsync >= 1.0.0 */
++	result = rs_sig_file(basis_file, sig_file,
++			RS_DEFAULT_BLOCK_LEN, 8, RS_MD4_SIG_MAGIC, &stats);
++#endif
+ 	if (result != RS_DONE)
+ 		csync_fatal("Got an error from librsync, too bad!\n");
+ 
diff --git a/csync2.spec b/csync2.spec
index 713cfec..d2d1e25 100644
--- a/csync2.spec
+++ b/csync2.spec
@@ -14,6 +14,7 @@ Patch2:         0001-use-native-gnutls-drop-openssl-wrappers.patch
 Patch3:         0001-don-t-hardcode-autofoo-version.patch
 Patch4:         0001-Fix-gnutls-configure.ac-section.patch
 Patch5:         0001-Fix-gnutls-Makefile.am-section.patch
+Patch6:         csync2-1.34-librsync-1.0.0.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 
@@ -47,6 +48,7 @@ It is expedient for HA-clusters, HPC-clusters, COWs and server farms.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1 -b .librsync-1.0.0
 install -p -m 0644 %{SOURCE1} README.quickstart
 
 


More information about the scm-commits mailing list