librsync, rdiff: added patch for large file support (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355178)

This commit is contained in:
Simon Gloßner 2007-07-26 21:57:55 +02:00
parent 01cb0382d3
commit 8a911bd69c
6 changed files with 75 additions and 4 deletions

View File

@ -1 +1,2 @@
24cdb6b78f45e0e83766903fd4f6bc84 librsync-0.9.7.tar.gz
910a8716f449358d9689d05d51204b8c librsync.patch

View File

@ -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

31
librsync/librsync.patch Normal file
View File

@ -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;

View File

@ -1 +1,2 @@
24cdb6b78f45e0e83766903fd4f6bc84 librsync-0.9.7.tar.gz
910a8716f449358d9689d05d51204b8c librsync.patch

View File

@ -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

31
rdiff/librsync.patch Normal file
View File

@ -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;