From 8a911bd69c1280b50bb7fe2c3aadb2fde988d8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Glo=C3=9Fner?= Date: Thu, 26 Jul 2007 21:57:55 +0200 Subject: [PATCH] librsync, rdiff: added patch for large file support (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355178) --- librsync/.md5sum | 1 + librsync/Pkgfile | 7 +++++-- librsync/librsync.patch | 31 +++++++++++++++++++++++++++++++ rdiff/.md5sum | 1 + rdiff/Pkgfile | 8 ++++++-- rdiff/librsync.patch | 31 +++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 librsync/librsync.patch create mode 100644 rdiff/librsync.patch diff --git a/librsync/.md5sum b/librsync/.md5sum index b495f625e..fa9aca1e7 100644 --- a/librsync/.md5sum +++ b/librsync/.md5sum @@ -1 +1,2 @@ 24cdb6b78f45e0e83766903fd4f6bc84 librsync-0.9.7.tar.gz +910a8716f449358d9689d05d51204b8c librsync.patch diff --git a/librsync/Pkgfile b/librsync/Pkgfile index 7c20267b7..60f14a5f6 100644 --- a/librsync/Pkgfile +++ b/librsync/Pkgfile @@ -5,12 +5,15 @@ name=librsync version=0.9.7 -release=1 -source=(http://dl.sourceforge.net/${name}/${name}-${version}.tar.gz) +release=2 +source=(http://dl.sourceforge.net/${name}/${name}-${version}.tar.gz + librsync.patch) build() { cd $name-$version + patch -p1 < $SRC/librsync.patch + ./configure \ --prefix=/usr \ --enable-shared diff --git a/librsync/librsync.patch b/librsync/librsync.patch new file mode 100644 index 000000000..16ea49e82 --- /dev/null +++ b/librsync/librsync.patch @@ -0,0 +1,31 @@ +diff -Nru librsync-0.9.7/mdfour.h librsync-0.9.7-new/mdfour.h +--- librsync-0.9.7/mdfour.h 2004-02-08 00:17:57.000000000 +0100 ++++ librsync-0.9.7-new/mdfour.h 2007-07-26 21:50:26.000000000 +0200 +@@ -24,7 +24,7 @@ + #include "types.h" + + struct rs_mdfour { +- int A, B, C, D; ++ unsigned int A, B, C, D; + #if HAVE_UINT64 + uint64_t totalN; + #else +diff -Nru librsync-0.9.7/patch.c librsync-0.9.7-new/patch.c +--- librsync-0.9.7/patch.c 2004-09-17 23:35:50.000000000 +0200 ++++ librsync-0.9.7-new/patch.c 2007-07-26 21:50:06.000000000 +0200 +@@ -214,12 +214,12 @@ + void *buf, *ptr; + rs_buffers_t *buffs = job->stream; + +- len = job->basis_len; +- + /* copy only as much as will fit in the output buffer, so that we + * don't have to block or store the input. */ +- if (len > buffs->avail_out) ++ if (job->basis_len > buffs->avail_out) + len = buffs->avail_out; ++ else ++ len = job->basis_len; + + if (!len) + return RS_BLOCKED; diff --git a/rdiff/.md5sum b/rdiff/.md5sum index b495f625e..fa9aca1e7 100644 --- a/rdiff/.md5sum +++ b/rdiff/.md5sum @@ -1 +1,2 @@ 24cdb6b78f45e0e83766903fd4f6bc84 librsync-0.9.7.tar.gz +910a8716f449358d9689d05d51204b8c librsync.patch diff --git a/rdiff/Pkgfile b/rdiff/Pkgfile index f2908de6e..ee447d855 100644 --- a/rdiff/Pkgfile +++ b/rdiff/Pkgfile @@ -2,15 +2,19 @@ # URL: http://librsync.sourceforge.net/ # Maintainer: Simon Gloßner, viper at hometux dot de # Packager: Jukka Heino, jukka dot heino at gmail dot com +# Depends on: librsync name=rdiff version=0.9.7 -release=1 -source=(http://dl.sourceforge.net/librsync/librsync-${version}.tar.gz) +release=2 +source=(http://dl.sourceforge.net/librsync/librsync-${version}.tar.gz + librsync.patch) build() { cd librsync-$version + patch -p1 < $SRC/librsync.patch + ./configure --prefix=/usr make diff --git a/rdiff/librsync.patch b/rdiff/librsync.patch new file mode 100644 index 000000000..16ea49e82 --- /dev/null +++ b/rdiff/librsync.patch @@ -0,0 +1,31 @@ +diff -Nru librsync-0.9.7/mdfour.h librsync-0.9.7-new/mdfour.h +--- librsync-0.9.7/mdfour.h 2004-02-08 00:17:57.000000000 +0100 ++++ librsync-0.9.7-new/mdfour.h 2007-07-26 21:50:26.000000000 +0200 +@@ -24,7 +24,7 @@ + #include "types.h" + + struct rs_mdfour { +- int A, B, C, D; ++ unsigned int A, B, C, D; + #if HAVE_UINT64 + uint64_t totalN; + #else +diff -Nru librsync-0.9.7/patch.c librsync-0.9.7-new/patch.c +--- librsync-0.9.7/patch.c 2004-09-17 23:35:50.000000000 +0200 ++++ librsync-0.9.7-new/patch.c 2007-07-26 21:50:06.000000000 +0200 +@@ -214,12 +214,12 @@ + void *buf, *ptr; + rs_buffers_t *buffs = job->stream; + +- len = job->basis_len; +- + /* copy only as much as will fit in the output buffer, so that we + * don't have to block or store the input. */ +- if (len > buffs->avail_out) ++ if (job->basis_len > buffs->avail_out) + len = buffs->avail_out; ++ else ++ len = job->basis_len; + + if (!len) + return RS_BLOCKED;