Your message dated Thu, 06 Nov 2008 15:47:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#504434: fixed in reprepro 3.6.2-1
has caused the Debian Bug report #504434,
regarding reprepro: can't insert large binary package with 'Contents' directive 
enabled
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
504434: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504434
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: reprepro
Version: 3.5.2-4
Severity: important
Tags: patch

If reprepro has Contents file creation enabled (i.e., conf has "Contents: ." 
directive),
then inserting a large binary package (larger than about 1GB, or more 
precisely, 
one whose data.tar.gz component is larger than 999,999,999 bytes) leads to the 
following error:

etch:~# reprepro includedeb hardy bigpackage_1.0-1_amd64.deb
Exporting indices...
Error calculating length field in ar file 
/var/www/reprepro/pool/localrepo/b/bigpackage/bigpackage_1.0-1_amd64.deb
Could not find a data.tar.gz file within 
'/var/www/reprepro/pool/localrepo/b/bigpackage/bigpackage_1.0-1_amd64.deb'! 

See patch below. The code in ar.c parses the header structs of an AR format 
file.
The ASCII decimal size field of that header is 10 bytes long, right-padded with
spaces if the byte size is 999,999,999 or less. To call strtoul(), the code in 
ar.c tries to force a 0-byte ('\0') after that header field, but is off by one 
byte.
This isn't usually a problem, because strtoul() stops parsing when it hits
the space-padding. But once the file size exceeds 999,999,999 bytes,
the space-padding is no longer present, and the 0-byte is in the wrong place.
In this case *p would equal to '`' instead of '\0'.

Here is a patch that fixes this problem:

diff -ruN orig.reprepro-3.5.2/ar.c reprepro-3.5.2/ar.c
--- orig.reprepro-3.5.2/ar.c    2008-03-06 07:34:39.000000000 -0700
+++ reprepro-3.5.2/ar.c    2008-11-03 11:51:34.000000000 -0700
@@ -190,7 +190,7 @@

     /* calculate the length and mark possible fillers being needed */

-    ar->currentheader.ah_size[11] = '\0'; // ugly, but it works
+    ar->currentheader.ah_size[10] = '\0'; // ugly, but it works

     ar->bytes_left = strtoul(ar->currentheader.ah_size,&p,10);
     if( *p != '\0' && *p != ' ' ) {

Thanks,

Aramian

Credits: The author would like to thank Alexander Perlis for his help in 
putting together this bug report.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages reprepro depends on:
ii  libarchive1            2.4.17-2          Single library to read/write tar, 
ii  libbz2-1.0             1.0.5-1           high-quality block-sorting file co
ii  libc6                  2.7-15            GNU C Library: Shared libraries
ii  libdb4.6               4.6.21-11         Berkeley v4.6 Database Libraries [
ii  libgpg-error0          1.4-2             library for common error values an
ii  libgpgme11             1.1.6-2           GPGME - GnuPG Made Easy
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages reprepro recommends:
ii  apt                         0.6.46.4-0.1 Advanced front-end for dpkg

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: reprepro
Source-Version: 3.6.2-1

We believe that the bug you reported is fixed in the latest version of
reprepro, which is due to be installed in the Debian FTP archive:

reprepro_3.6.2-1.diff.gz
  to pool/main/r/reprepro/reprepro_3.6.2-1.diff.gz
reprepro_3.6.2-1.dsc
  to pool/main/r/reprepro/reprepro_3.6.2-1.dsc
reprepro_3.6.2-1_sparc.deb
  to pool/main/r/reprepro/reprepro_3.6.2-1_sparc.deb
reprepro_3.6.2.orig.tar.gz
  to pool/main/r/reprepro/reprepro_3.6.2.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bernhard R. Link <[EMAIL PROTECTED]> (supplier of updated reprepro package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu,  6 Nov 2008 16:28:09 CET
Source: reprepro
Binary: reprepro
Architecture: source sparc
Version: 3.6.2-1
Distribution: experimental
Urgency: low
Maintainer: Bernhard R. Link <[EMAIL PROTECTED]>
Changed-By: Bernhard R. Link <[EMAIL PROTECTED]>
Description: 
 reprepro   - Debian package repository producer
Closes: 496347 500105 502531 504434
Changes: 
 reprepro (3.6.2-1) experimental; urgency=low
 .
   * new bugfix release
   - fix parsing contents of very large .deb files (Closes: 504434)
   - improve documentation of remove and removefilter (Closes: 500105)
   - improve documentation of copysrc and -C (Closes: 496347)
   - fix many spelling and other errors in the manpage (Closes: 502531)
Checksums-Sha256: 
 687dd88cab2b2830fb5bf1caed32da35caf0e830660296a9ae2d2c217fb6ec34 1343 
reprepro_3.6.2-1.dsc
 90d8de466f4c7bf443661419a080636411bd6bf9bf026494dc113a4971cd3b49 461261 
reprepro_3.6.2.orig.tar.gz
 664e2a02f94aca5b6aac2ef9ccd9df60d17833c6d7ae6f34192c629a6d040b4c 9343 
reprepro_3.6.2-1.diff.gz
 97cb1385e5bff1e7e7bd436af1faa4104f1b46c2c80e9cda32dcc5cd48e98302 334956 
reprepro_3.6.2-1_sparc.deb
Checksums-Sha1: 
 e89a51e624f0c6871fa0d202f20d5b950c44052c 1343 reprepro_3.6.2-1.dsc
 c9c13a5265972486d6071a096408da4a67b0e6f7 461261 reprepro_3.6.2.orig.tar.gz
 f3fb9455f68cf239cff100a2c7624c1fc5ac0b7e 9343 reprepro_3.6.2-1.diff.gz
 e8572c0deec93abca066b043c9253fdad77a729c 334956 reprepro_3.6.2-1_sparc.deb
Files: 
 6fd1703da20ac4a95a6240919fb6402c 1343 utils extra reprepro_3.6.2-1.dsc
 53bcb503887962e08900b92311f7b38c 461261 utils extra reprepro_3.6.2.orig.tar.gz
 99e1cdf3569383688873506b27cbc9f7 9343 utils extra reprepro_3.6.2-1.diff.gz
 04c45dfc1da121bfe3d65d95c4d04e02 334956 utils extra reprepro_3.6.2-1_sparc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQCVAwUBSRMND1syKVgPHZLaAQIenwP/TsHvVJfyiz1/BbY2ixE26t8V5YItCSA5
XQh76qHcPvgWd7LxvEvYyLjySCmBca3iVqZvUWEtbxF/1KFqe4uJIcUWpqDhdCel
eaklXbGFK398bwXJMk24uIeCz9NrjTcjcZfPJ1z47OkSFfiG690nDsuaVb4PICN5
qQAV9Mq7ckk=
=HA5q
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to