From: Sebastian Harl Date: Tue, 23 Jan 2007 22:02:14 +0000 (+0100) Subject: Added ne_lfs.dpatch. X-Git-Tag: fusedav-0.2-1~6 X-Git-Url: https://git.tokkee.org/?p=pkg-fusedav.git;a=commitdiff_plain;h=58522baac752059dab8d4b2bab906b46b79d7023 Added ne_lfs.dpatch. Fix the use of neon's built-in large file support on 64bit architectures. --- diff --git a/debian/changelog b/debian/changelog index 4b16930..f6d04a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ fusedav (0.2-1) unstable; urgency=low * Initial release (Closes: #379147). * Added manpage (fusedav.1). + * Added ne_lfs.dpatch: Fix the use of neon's built-in large file support on + 64bit architectures. - -- Sebastian Harl Wed, 23 Aug 2006 21:45:44 +0200 + -- Sebastian Harl Tue, 23 Jan 2007 15:47:24 +0100 diff --git a/debian/control b/debian/control index a0035d8..30cc15f 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: fusedav Section: web Priority: optional Maintainer: Sebastian Harl -Build-Depends: debhelper (>= 5), autotools-dev, libneon26-gnutls-dev, libfuse-dev (>= 2.5), libattr1-dev, lynx +Build-Depends: debhelper (>= 5), autotools-dev, libneon26-gnutls-dev, libfuse-dev (>= 2.5), libattr1-dev, lynx, dpatch Standards-Version: 3.7.2 Package: fusedav diff --git a/debian/patches/00list b/debian/patches/00list new file mode 100644 index 0000000..0ba2678 --- /dev/null +++ b/debian/patches/00list @@ -0,0 +1,2 @@ +ne_lfs.dpatch + diff --git a/debian/patches/ne_lfs.dpatch b/debian/patches/ne_lfs.dpatch new file mode 100755 index 0000000..d4596a1 --- /dev/null +++ b/debian/patches/ne_lfs.dpatch @@ -0,0 +1,469 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## ne_lfs.dpatch by Sebastian Harl +## +## DP: Fix the use of neon's built-in large file support on 64bit +## DP: architectures. + +@DPATCH@ + +diff -uNr a/configure b/configure +--- a/configure 2007-01-23 14:57:16.000000000 +0100 ++++ b/configure 2007-01-23 15:02:39.000000000 +0100 +@@ -4867,6 +4867,413 @@ + + + ++echo "$as_me:$LINENO: checking for off_t" >&5 ++echo $ECHO_N "checking for off_t... $ECHO_C" >&6 ++if test "${ac_cv_type_off_t+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if ((off_t *) 0) ++ return 0; ++if (sizeof (off_t)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_type_off_t=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_type_off_t=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 ++echo "${ECHO_T}$ac_cv_type_off_t" >&6 ++ ++echo "$as_me:$LINENO: checking size of off_t" >&5 ++echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 ++if test "${ac_cv_sizeof_off_t+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test "$ac_cv_type_off_t" = yes; then ++ # The cast to unsigned long works around a bug in the HP C Compiler ++ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects ++ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. ++ # This bug is HP SR number 8606223364. ++ if test "$cross_compiling" = yes; then ++ # Depending upon the size, compute the lo and hi bounds. ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_lo=0 ac_mid=0 ++ while :; do ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_hi=$ac_mid; break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_lo=`expr $ac_mid + 1` ++ if test $ac_lo -le $ac_mid; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid + 1` ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ done ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++static int test_array [1 - 2 * !(((long) (sizeof (off_t))) < 0)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_hi=-1 ac_mid=-1 ++ while :; do ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_lo=$ac_mid; break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_hi=`expr '(' $ac_mid ')' - 1` ++ if test $ac_mid -le $ac_hi; then ++ ac_lo= ac_hi= ++ break ++ fi ++ ac_mid=`expr 2 '*' $ac_mid` ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ done ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_lo= ac_hi= ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++# Binary search between lo and hi bounds. ++while test "x$ac_lo" != "x$ac_hi"; do ++ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_hi=$ac_mid ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_lo=`expr '(' $ac_mid ')' + 1` ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++done ++case $ac_lo in ++?*) ac_cv_sizeof_off_t=$ac_lo;; ++'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 ++See \`config.log' for more details." >&5 ++echo "$as_me: error: cannot compute sizeof (off_t), 77 ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ;; ++esac ++else ++ if test "$cross_compiling" = yes; then ++ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 ++echo "$as_me: error: internal error: not reached in cross-compile" >&2;} ++ { (exit 1); exit 1; }; } ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++long longval () { return (long) (sizeof (off_t)); } ++unsigned long ulongval () { return (long) (sizeof (off_t)); } ++#include ++#include ++int ++main () ++{ ++ ++ FILE *f = fopen ("conftest.val", "w"); ++ if (! f) ++ exit (1); ++ if (((long) (sizeof (off_t))) < 0) ++ { ++ long i = longval (); ++ if (i != ((long) (sizeof (off_t)))) ++ exit (1); ++ fprintf (f, "%ld\n", i); ++ } ++ else ++ { ++ unsigned long i = ulongval (); ++ if (i != ((long) (sizeof (off_t)))) ++ exit (1); ++ fprintf (f, "%lu\n", i); ++ } ++ exit (ferror (f) || fclose (f) != 0); ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_sizeof_off_t=`cat conftest.val` ++else ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++( exit $ac_status ) ++{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 ++See \`config.log' for more details." >&5 ++echo "$as_me: error: cannot compute sizeof (off_t), 77 ++See \`config.log' for more details." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++fi ++rm -f conftest.val ++else ++ ac_cv_sizeof_off_t=0 ++fi ++fi ++echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 ++echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6 ++cat >>confdefs.h <<_ACEOF ++#define SIZEOF_OFF_T $ac_cv_sizeof_off_t ++_ACEOF ++ ++ ++ + # Checks for library functions. + + for ac_header in stdlib.h +diff -uNr a/configure.ac b/configure.ac +--- a/configure.ac 2007-01-23 14:57:16.000000000 +0100 ++++ b/configure.ac 2007-01-23 15:02:30.000000000 +0100 +@@ -103,6 +103,8 @@ + AC_TYPE_SIZE_T + AC_STRUCT_ST_BLOCKS + ++AC_CHECK_SIZEOF(off_t) ++ + # Checks for library functions. + AC_FUNC_MALLOC + AC_CHECK_FUNCS([ftruncate memset strdup strerror strrchr memchr strchr strcspn]) +diff -uNr a/src/filecache.c b/src/filecache.c +--- a/src/filecache.c 2007-01-23 14:57:16.000000000 +0100 ++++ b/src/filecache.c 2007-01-23 15:22:53.000000000 +0100 +@@ -47,6 +47,11 @@ + #include "fusedav.h" + #include "session.h" + ++#if (SIZEOF_OFF_T >= 8) ++# define ne_content_range64 ne_content_range ++# define ne_get_range64 ne_get_range ++#endif ++ + struct file_info { + char *filename; + int fd; +diff -uNr a/src/fusedav.c b/src/fusedav.c +--- a/src/fusedav.c 2007-01-23 14:57:16.000000000 +0100 ++++ b/src/fusedav.c 2007-01-23 15:20:32.000000000 +0100 +@@ -1386,8 +1386,11 @@ + } + + if (!ne_has_support(NE_FEATURE_SSL) || +- !ne_has_support(NE_FEATURE_TS_SSL) || +- !ne_has_support(NE_FEATURE_LFS)) { ++ !ne_has_support(NE_FEATURE_TS_SSL) ++#if (SIZEOF_OFF_T < 8) ++ || !ne_has_support(NE_FEATURE_LFS) ++#endif ++ ) { + fprintf(stderr, "fusedav requires libneon built with SSL, SSL thread safety and LFS enabled.\n"); + goto finish; + } diff --git a/debian/rules b/debian/rules index 274855d..01227dc 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,8 @@ else CFLAGS += -O2 endif +include /usr/share/dpatch/dpatch.make + $(BUILDDIR)/config.status: configure dh_testdir [ -e $(BUILDDIR) ] || mkdir $(BUILDDIR) @@ -31,14 +33,14 @@ $(BUILDDIR)/config.status: configure build: build-stamp -build-stamp: $(BUILDDIR)/config.status +build-stamp: $(BUILDDIR)/config.status patch dh_testdir $(MAKE) -C $(BUILDDIR) touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp