From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 12 19:30:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6B38D82F for ; Tue, 12 Mar 2013 19:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 53ADAB26 for ; Tue, 12 Mar 2013 19:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2CJU2rY062100 for ; Tue, 12 Mar 2013 19:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2CJU2ug062099; Tue, 12 Mar 2013 19:30:02 GMT (envelope-from gnats) Resent-Date: Tue, 12 Mar 2013 19:30:02 GMT Resent-Message-Id: <201303121930.r2CJU2ug062099@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vick Khera Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC121EF for ; Tue, 12 Mar 2013 19:20:10 +0000 (UTC) (envelope-from khera@kcilink.com) Received: from yertle.kcilink.com (yertle-comcast.kcilink.com [74.92.149.58]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5D08BE for ; Tue, 12 Mar 2013 19:20:10 +0000 (UTC) Received: by yertle.kcilink.com (Postfix, from userid 1002) id 648B98A010; Tue, 12 Mar 2013 15:11:04 -0400 (EDT) Message-Id: <20130312191104.648B98A010@yertle.kcilink.com> Date: Tue, 12 Mar 2013 15:11:04 -0400 (EDT) From: Vick Khera To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/176889: pkg update doesn't fetch updated repo from private copy X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Vick Khera List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2013 19:30:02 -0000 >Number: 176889 >Category: ports >Synopsis: pkg update doesn't fetch updated repo from private copy >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 12 19:30:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Vick Khera >Release: FreeBSD 9.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD yertle.int.kcilink.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243864: Tue Dec 4 12:09:48 EST 2012 khera@yertle.int.kcilink.com:/usr/obj/u/yertle1/sources/usr9/src/sys/KCI64 amd64 >Description: I use tinderbox to make a local package repository with my customizations. On another system I request pkg to update the repo index, but will only ever do it if I specify "-f" flag to force it. Otherwise it always says there is no update needed, even if there is an updated list. >How-To-Repeat: Set up package server running lighttpd-1.4.32_1. I use this configuration for the virtual host: $HTTP["host"] == "pkg.kcilink.com" { server.document-root = "/usr/local/tinderbox/packages/" } and in pkg.conf on the clients I set this: PACKAGESITE : http://pkg.kcilink.com/9.1-FreeBSD/All This is the current repo file on that server: % ls -l /usr/local/tinderbox/packages/9.1-FreeBSD/All/repo.txz -rw-r--r-- 1 root wheel 146096 Mar 12 14:02 /usr/local/tinderbox/packages/9.1-FreeBSD/All/repo.txz Now, on the client system using those packages, run update: [root@sandbox]# pkg -v 1.0.8 [root@sandbox]# ls -l /var/db/pkg/repo.sqlite -rw-r--r-- 1 root wheel 601088 Mar 12 09:03 /var/db/pkg/repo.sqlite [root@sandbox]# pkg update Updating repository catalogue Repository catalogue is up-to-date, no need to fetch fresh copy [root@sandbox]# ls -l /var/db/pkg/repo.sqlite -rw-r--r-- 1 root wheel 601088 Mar 12 09:03 /var/db/pkg/repo.sqlite [root@sandbox]# pkg update -f Updating repository catalogue repo.txz 100% 143KB 142.7KB/s 142.7KB/s 00:00 [root@sandbox]# ls -l /var/db/pkg/repo.sqlite -rw-r--r-- 1 root wheel 605184 Mar 12 14:29 /var/db/pkg/repo.sqlite The only curiosity I see is that the first "pkg update" logs this on the package server lighttpd.conf file: 192.168.7.23 pkg.kcilink.com - [12/Mar/2013:14:29:03 -0400] "GET /9.1-FreeBSD/All/repo.txz HTTP/1.1" 200 146096 "-" "pkg libfetch/2.0" and the second update with -f logs this: 192.168.7.23 pkg.kcilink.com - [12/Mar/2013:14:29:16 -0400] "GET /9.1-FreeBSD/All/repo.txz HTTP/1.1" 200 146096 "-" "pkg libfetch/2.0" Fetching via a snooping proxy, the only difference I see is that the "-f" request does not send the "If-Modified-Since" header, but in either case lighttpd sends back the same byte stream and headers in its response. >Fix: workaround is to always use pkg update -f. >Release-Note: >Audit-Trail: >Unformatted: