Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2012 02:26:47 GMT
From:      Adam McDougall <mcdouga9@egr.msu.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/173317: pkg doesn't work well with a proxy cache + frequent repo updates
Message-ID:  <201211030226.qA32Qlmj067592@red.freebsd.org>
Resent-Message-ID: <201211030230.qA32U1tG004407@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         173317
>Category:       bin
>Synopsis:       pkg doesn't work well with a proxy cache + frequent repo updates
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 03 02:30:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Adam McDougall
>Release:        9-STABLE amd64
>Organization:
MSU
>Environment:
FreeBSD test 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Fri Oct  5 10:17:48 EDT 2012     root@build9:/usr/obj/proto/src9/src/sys/AMD64-9  amd64
>Description:
This may be more of a feature request than a bug report, but if possible, it would be helpful if pkg update worked better with a HTTP cache proxy which tends to deliver a cached repo.txz (at the least).  In my case I am using squid with a fairly basic configuration.  Is there a way for pkg to make HTTP requests so that the cache server will either not cache the files, or cache them shorter, or always verify with the real server if the file has changed instead of assuming it has not?  Eventually (for example the next day) the cache will assume the file is expired and fetch it for real, but I run into trouble when I make frequent repo updates and pkg update cannot see them because of the cache proxy.  I believe this applies to the package files too since their filenames don't change when rebuilt without a version bump.  If I recompile a package with new options, the old cached package will not match the checksum on a newly fetched repo.txz or vice versa.
>How-To-Repeat:
setenv HTTP_PROXY=http://my.favorite.proxy:3128
pkg update
(put new repo and/or packages on the pkg server you are using)
pkg update
'Repository catalogue is up-to-date, no need to fetch fresh copy'
>Fix:
Workaround: don't use a caching proxy (unsetenv HTTP_PROXY), or find a way to fiddle with the proxy or client configuration so that it does not use the proxy for your pkg server, or doesn't cache files from your pkg server if it does proxy it.  Maybe pkg can send hints in its http requests to make a cache behave better.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211030226.qA32Qlmj067592>