Date: Fri, 22 Apr 2005 01:44:25 -0500 From: Jon Noack <noackjr@alumni.rice.edu> To: simon@freebsd.org, ports@freebsd.org Subject: portupgrade regression? Message-ID: <42689D49.4050908@alumni.rice.edu>
next in thread | raw e-mail | index | archive | help
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 <format:bdb1_btree> in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ portupgrade -a [Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... - 208 packages found (-0 +0) done] [root:~] $ portversion -v | grep -v "=" [Updating the pkgdb <format:bdb1_btree> 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 <format:bdb1_btree> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42689D49.4050908>