[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#591839: squid: Typo in squid.conf causes squid to fail often as an APT cache

Package:  squid
Version:  2.7.STABLE3-4
Severity: important
Tags:     patch
User:     debian-edu@lists.debian.org
UserTags: debian-edu

Today, I believe I finally found the reason why squid would often fail
as a APT proxy, causing apt to claim that the Packages.gz file had the
wrong MD5 sum.  The problem go away after a while, but make squid
painful to use as an APT proxy.

The reason seem to be that the Release file and the Packages.gz files
have different caching settings, causing the Release file to be
updated more often than the Packages.gz files.  The cause seem to be a
simple typo in debian/patches/01-cf.data.debian.dpatch, specifying the
refresh_pattern for (Release|Package(.gz)*)$ which do not match
Packages.gz (notice the s).

I also see this bug in version 2.7.STABLE3-4.1lenny1 and

Modifying squid.conf like this seem to solve the problem:

--- /etc/squid/squid.conf.orig    (revision 75)
+++ /etc/squid/squid.conf    (local)
@@ -2738,7 +2738,7 @@
 refresh_pattern ^ftp:          1440    20%     10080
 refresh_pattern ^gopher:       1440    0%      1440
 refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
-refresh_pattern (Release|Package(.gz)*)$       0       20%     2880
+refresh_pattern (Release|Packages(.gz)*)$      0       20%      2880
 refresh_pattern .              0       20%     4320

 #  TAG: quick_abort_min        (KB)

I notice the squid3 configuration is lacking this setting.  This make
me suspect squid3 might be problematic to use as an APT cache, but I
have not tested it.

Happy hacking,
Petter Reinholdtsen

Reply to: