Package: zip
Version: 2.31-2
Severity: wishlist

i found out that zip does not support files (and archives) greater than
2GB in size:

$ ls -la xaa2GB.img
-rw-r--r--  1 root root 2193829888 May  9 17:20  xaa2GB.img

$ /usr/bin/zip test.zip xaa2GB.img
    zip warning: name not matched: xaa2GB.img

    zip error: Nothing to do! (test.zip)

strace confirms my assumption, as it shows no O_LARGEFILE calls:


$ strace /usr/bin/zip t.zip xaa2GB.img 2>&1 |grep LARGE
 [empty]

(whereas "file" for example does use O_LARGEFILE:
 $ strace file xaa2GB.img 2>&1 | grep LARGE | tail -n1
  open("xaa2GB.img", O_RDONLY|O_LARGEFILE) = 3 )
  
appended patch fixes the issue (basically it just 
adds -D_FILE_OFFSET_BITS=64 to CFLAGS)

diff -Nru zip-2.31.orig/unix/Makefile zip-2.31/unix/Makefile
--- zip-2.31.orig/unix/Makefile 2005-02-28 08:33:50.000000000 +0100
+++ zip-2.31/unix/Makefile      2005-05-09 18:05:19.041322893 +0200
@@ -45,7 +45,7 @@
 #   CFLAGS    flags for C compile
 #   LFLAGS1   flags after output file spec, before obj file list
 #   LFLAGS2   flags after obj file list (libraries, etc)
-CFLAGS = -O2 -I. -DUNIX $(LOCAL_ZIP)
+CFLAGS = -O2 -I. -DUNIX -D_FILE_OFFSET_BITS=64 $(LOCAL_ZIP)
 LFLAGS1 =
 LFLAGS2 = -s

result: zip works with files > 2GB now ;-)

$ strace ./zip t.zip xaa2GB.img 2>&1 |grep LARGE
open("t.zip", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("t.zip", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
open("zilv7sVY", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
open("xaa2GB.img", O_RDONLY|O_LARGEFILE) = 4

please consider applying this patch.

thank you,
Christian.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages zip depends on:
ii  libc6                       2.3.2.ds1-21 GNU C Library: Shared libraries an

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to