From owner-freebsd-ports@FreeBSD.ORG Fri Apr 22 06:44:29 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBAE016A4CE for ; Fri, 22 Apr 2005 06:44:29 +0000 (GMT) Received: from smtp816.mail.sc5.yahoo.com (smtp816.mail.sc5.yahoo.com [66.163.170.2]) by mx1.FreeBSD.org (Postfix) with SMTP id 8362C43D46 for ; Fri, 22 Apr 2005 06:44:29 +0000 (GMT) (envelope-from noackjr@alumni.rice.edu) Received: from unknown (HELO optimator.noacks.org) (noacks@swbell.net@70.240.205.64 with login) by smtp816.mail.sc5.yahoo.com with SMTP; 22 Apr 2005 06:44:29 -0000 Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 718DD6144; Fri, 22 Apr 2005 01:44:28 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12004-11; Fri, 22 Apr 2005 01:44:26 -0500 (CDT) Received: from compgeek.noacks.org (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id F402C610A; Fri, 22 Apr 2005 01:44:25 -0500 (CDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by compgeek.noacks.org (8.13.3/8.13.3) with ESMTP id j3M6iPQM062545; Fri, 22 Apr 2005 01:44:25 -0500 (CDT) (envelope-from noackjr@alumni.rice.edu) Message-ID: <42689D49.4050908@alumni.rice.edu> Date: Fri, 22 Apr 2005 01:44:25 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050406) X-Accept-Language: en-us, en MIME-Version: 1.0 To: simon@freebsd.org, ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at noacks.org Subject: portupgrade regression? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 06:44:30 -0000 Ever since the security fix for CAN-2005-0610, portupgrade and company have been behaving oddly for me. The root cause of this seems to be that the pkgdb is being updated needlessly with every operation: [root:~] $ portversion -v | grep -v "=" [Updating the pkgdb in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ portupgrade -a [Updating the pkgdb in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ portversion -v | grep -v "=" [Updating the pkgdb in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ One side effect is that it is no longer possible to run portversion as a normal user: [noackjr:~] $ portversion -v | grep -v "=" The pkgdb must be updated. Please run 'pkgdb -u' as root. [noackjr:~] $ I have deleted and rebuilt /var/db/pkg/pkgdb.db and /usr/ports/INDEX.db with no change in behavior. I reversed the patch in pkgdb.rb, changing the @db_dir for pkgdb.fixme back to @tmp_dir. After one pkgdb update, everything works again: [root:~] $ portversion -v | grep -v "=" [Updating the pkgdb in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ portversion -v | grep -v "=" [root:~] $ It's even fine for a normal user: [noackjr:~] $ portversion -v | grep -v "=" [noackjr:~] $ After reinstalling a stock portupgrade from ports, things start misbehaving again as soon as a port is changed or I rebuild the db files. I don't quite understand the CAN-2005-0610 patch. Why are we ignoring @tmp_dir? I have no problem with @tmp_dir defaulting to a secure location, but why can't I configure it so that my normal user account can use portversion? Heck, I don't even really know what the pkgdb.fixme file is used for, just that changing its path breaks portversion. I have set PKG_TMPDIR to a location where my normal user account has write access (as mentioned in the VuXML entry: http://www.vuxml.org/freebsd/22f00553-a09d-11d9-a788-0001020eed82.html), but with @tmp_dir being ignored it has no effect. Am I trying to do something that I shouldn't? What is the correct behavior here? Thanks, Jon