Your message dated Wed, 17 Jun 2015 17:03:33 +0000 with message-id <[email protected]> and subject line Bug#782126: fixed in apt-cacher 1.7.11 has caused the Debian Bug report #782126, regarding apt-cacher: apt-cacher-import.pl calculates invalid Content-Length header 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.) -- 782126: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782126 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: apt-cacher Version: 1.7.10 I believe I have found a bug in apt-cacher-import.pl which would result in its generating header files without a Content-Length header, which would then force the relevant packages to be redownloaded rather than served from the cache. The patch probably demonstrates the problem best: diff -ur apt-cacher-1.7.10/apt-cacher-import.pl apt-cacher-hacked/apt-cacher-import.pl --- apt-cacher-1.7.10/apt-cacher-import.pl 2014-08-29 13:20:35.000000000 +0000 +++ apt-cacher-hacked/apt-cacher-import.pl 2015-04-08 08:36:03.535769331 +0000 @@ -334,7 +334,7 @@ write_header("$header_dir/$targetfile", HTTP::Response->new(200, 'OK', ['Date' => $headerdate, 'Last-Modified' => $headerdate, - 'Content-Length' => -s $packagefile])); + 'Content-Length' => -s "$package_dir/$targetfile"])); } # copy the ownership of the private directory At the time the header is written, $packagefile has already been moved by import_file to "$package_dir/$targetfile", so the original code would result in an undefined value rather than the package file's actual length being passed as an argument to HTTP::Response->new. The result is log file entries such as: Wed Apr 8 08:22:34 2015|debug [9398]: Processing a new request line Wed Apr 8 08:22:34 2015|debug [9398]: got: 'GET http://localhost:3143/ftp.debian.org/debian/pool/main/f/findutils/find utils_4.4.2-9%2bb1_amd64.deb HTTP/1.1' Wed Apr 8 08:22:34 2015|debug [9398]: Processing a new request line Wed Apr 8 08:22:34 2015|debug [9398]: got: 'Host: localhost:3143' Wed Apr 8 08:22:34 2015|debug [9398]: Processing a new request line Wed Apr 8 08:22:34 2015|debug [9398]: got: 'User-Agent: Debian APT-HTTP/1.3 (1.0.9.7)' Wed Apr 8 08:22:34 2015|debug [9398]: Processing a new request line Wed Apr 8 08:22:34 2015|debug [9398]: got: '' Wed Apr 8 08:22:34 2015|debug [9398]: Using cached result for host localhost:3143 in absolute URI Wed Apr 8 08:22:34 2015|debug [9398]: Host in Absolute URI is this server Wed Apr 8 08:22:34 2015|debug [9398]: Resolved request is http://ftp.debian.org/debian/pool/main/f/findutils/findutils _4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: Testing URI: ftp.debian.org/debian/pool/main/f/findutils/findutils_4.4.2-9+b1_am d64.deb against ^ftp\.debian\.org/ Wed Apr 8 08:22:34 2015|debug [9398]: Package file: findutils_4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: Locked header /var/cache/apt-cacher/headers/findutils_4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: Complete check Wed Apr 8 08:22:34 2015|info [9398]: Warning: failed to read cached Content-Length Wed Apr 8 08:22:34 2015|debug [9398]: Deleting /var/cache/apt-cacher/headers/findutils_4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: Deleting /var/cache/apt-cacher/packages/findutils_4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: Locked header /var/cache/apt-cacher/headers/findutils_4.4.2-9+b1_amd64.deb Wed Apr 8 08:22:34 2015|debug [9398]: file does not exist or download required Wed Apr 8 08:22:34 2015|debug [9398]: MISS (Using debug = 7. Please note that I have moved apt-cacher to port 3143; that is not the bug). Applying the patch results in the expected behavior; imported packages are properly served from the cache and no longer downloaded over the net. I hope this email arrives in a readable format; reportbug, unfortunately, failed to run for me.diff -ur apt-cacher-1.7.10/apt-cacher-import.pl apt-cacher-hacked/apt-cacher-import.pl --- apt-cacher-1.7.10/apt-cacher-import.pl 2014-08-29 13:20:35.000000000 +0000 +++ apt-cacher-hacked/apt-cacher-import.pl 2015-04-08 08:36:03.535769331 +0000 @@ -334,7 +334,7 @@ write_header("$header_dir/$targetfile", HTTP::Response->new(200, 'OK', ['Date' => $headerdate, 'Last-Modified' => $headerdate, - 'Content-Length' => -s $packagefile])); + 'Content-Length' => -s "$package_dir/$targetfile"])); } # copy the ownership of the private directory
--- End Message ---
--- Begin Message ---Source: apt-cacher Source-Version: 1.7.11 We believe that the bug you reported is fixed in the latest version of apt-cacher, which is due to be installed in the Debian FTP archive. 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. Mark Hindley <[email protected]> (supplier of updated apt-cacher 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: SHA256 Format: 1.8 Date: Tue, 09 Jun 2015 09:28:35 +0100 Source: apt-cacher Binary: apt-cacher Architecture: source all Version: 1.7.11 Distribution: unstable Urgency: low Maintainer: Mark Hindley <[email protected]> Changed-By: Mark Hindley <[email protected]> Description: apt-cacher - Caching proxy server for Debian/Ubuntu software repositories Closes: 760141 782126 785681 786661 Changes: apt-cacher (1.7.11) unstable; urgency=low . * Add Ubuntu codenames 15.04 (vivid) and 15.10 (wily). * Fix apt-cacher-import.pl in copy mode so that a valid Content-Length header is generated. Patch from Pip Cet (closes: #782126). * Correctly detect and handle EOF in ssl_proxy() (closes: #785681). * Upgrade Standards Version to 3.9.6. No changes. * Create /var/run/apt-cacher in init script for CGI/inetd mode (closes: 786661). * Verify existence (or create) /var/run/apt-cacher in apt-cacher-cleanup.pl (closes: #760141). * Automatically reap forked processes in apt-cacher-cleanup.pl. Checksums-Sha1: 6ae92d122a151df06ec7e20c95317c5e7451de0b 1446 apt-cacher_1.7.11.dsc fb1e0a2c9dcd6ee07f7cd290a09b100699906419 97644 apt-cacher_1.7.11.tar.xz 02774a505b6e8129179ebb6ab144671edef17699 101376 apt-cacher_1.7.11_all.deb Checksums-Sha256: 04b168e1fdc95bb5ebe980ab093a2a49e51d849e23209fa6afb96c345e0f5399 1446 apt-cacher_1.7.11.dsc 5141e9c9d773d12006edfbeb4219daa3ffea98109d33148ae27c6c6050eee005 97644 apt-cacher_1.7.11.tar.xz 9192584243231074cca65e4a4791bb13e438d89cff8f849601bc404140bab313 101376 apt-cacher_1.7.11_all.deb Files: ce9450a8a41d69c0ab38d2a718d0c899 1446 net optional apt-cacher_1.7.11.dsc edc7c5bfb6677671764ba5504e68da79 97644 net optional apt-cacher_1.7.11.tar.xz 81e1e3ba803a5f8ca7aa9bb08eea54b6 101376 net optional apt-cacher_1.7.11_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUBVYGjlml0DlyzX+w8AQhrHg//W4c+4sg/QozaN2EfuJ3Al4bxsTvojtzm L4mxGQ6hPNJC0e6WbeACQhCuIBwE2yNkISItTrf+lQcsJBOCjF9L5eGKJZ3K1bSg FMKOSBtIuoorvn/Vn93kmLJHvKvEnZBeirMs2l7Hu/sCwTDhzFRuVrcRlvx4JeuK UYN6lQAPCXKQs4xg+NJvZ8l3S35GSJNahI5mjUlkoIgvIYDZmR1iAggGX1UuG9Sd zWRQ0J1b5foEURXRcduiK7dxgeHT4OiqiY4wWTEw0g23vtEfbkGSy7FdaFhA70d9 dBN0R1J9XhNytGe+R4q/Iolkk5UXWpMZoVGu31boLgnjvVnBJKeLdWw5Vafr7f+Z gy4y0rVEqycJSCZQfNDh4JOplbvtx/rVHXCpbRU+/qtrGjGG65T7RWg8+kLMgX3n z4wxqzX/gdJ1ZPWzeeNcr20LOsPaVYTgL3w7iri9wmGNYKcyPioMFaSGuBr2meqG xpopmuF6SiY8M/lpFDdMOnWze768WElUUzeQ5kCyPM0CugA6EKasUmSH6WrJ/L/U ZNh8K6LkmHjOPFxbGM9RJfwb3stRRR7eRGIr21JqJ2Os3fycUlALarGJUdOrr9ns /O24P+/k6OfL2zOJoWe0Zd/2IYYjwDXmg8JVk2MpUYpI/aRk06Kedc7miY2kOWmV UMYNzSEn4no= =WcPX -----END PGP SIGNATURE-----
--- End Message ---

