From owner-freebsd-stable@FreeBSD.ORG Thu Jun 27 05:05:40 2013 Return-Path: Delivered-To: freebsd-stable@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 5DBE2E9B for ; Thu, 27 Jun 2013 05:05:40 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0711617AC for ; Thu, 27 Jun 2013 05:05:39 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.5/8.14.5) with ESMTP id r5R55R14040661; Thu, 27 Jun 2013 01:05:27 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.5/8.14.4/Submit) id r5R55RJD040660; Thu, 27 Jun 2013 01:05:27 -0400 (EDT) (envelope-from wollman) Date: Thu, 27 Jun 2013 01:05:27 -0400 (EDT) From: Garrett Wollman Message-Id: <201306270505.r5R55RJD040660@hergotha.csail.mit.edu> To: bsd-lists@1command.com Subject: Re: portupgrade(1) | portmaster(8) -- which is more effective for large upgrade? In-Reply-To: <5e20544e3580a75759c3858f31894dc9.authenticated@ultimatedns.net> Organization: none X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (hergotha.csail.mit.edu [127.0.0.1]); Thu, 27 Jun 2013 01:05:28 -0400 (EDT) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hergotha.csail.mit.edu Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2013 05:05:40 -0000 In article <5e20544e3580a75759c3858f31894dc9.authenticated@ultimatedns.net>, bsd-lists@lcommand.com writes: > I haven't upgraded my tree(s) for awhile. My last attempt to rebuild >after an updating >src && ports, resulted in nearly installing the entire ports tree, which >is why I've >waited so long. Try as I might, I've had great difficulty finding >something that will >_only_ upgrade what I already have installed, _and_ respect the >"options" used during the >original make && make install, or those options expressed in make.conf. Having just gone through this in two different environments, I can very very strongly recommend doing the following. It's not the "easy button" of the TV commercials, but it will make things much much easier in the future. 1) Switch your system to pkgng if you haven't already. Unfortunately, this will not result in the right ports being marked as "automatic", so you'll need to do a bit of post-conversion surgery: # pkg set -A 1 -g '*' # pkg query -e '%#r==0' '%n-%v: %c' Then look through the output of "pkg query" to identify the leaf packages that are the ones you actually wanted explicitly to have installed. For each one of those: # pkg set -A 0 packagename Create a list of your desired packages: # pkg query -e '%a==0' '%o' > pkg-list Clean up the unnecessary local packages: # pkg autoremove (You can iterate the last three steps, aborting "pkg autoremove" each time but the last, until it doesn't offer to remove anything you care about keeping.) Repeat this process for each machine, and merge the resulting pkg-list files using sort -u. Make sure that pkgng is enabled for ports in /etc/make.conf. 2) Install and set up poudriere. Copy /var/db/ports, /etc/src.conf, and /etc/make.conf to /usr/local/etc (possibly with local variations as described in poudriere(8) under the heading "CUSTOMISATION"). 3) Run "poudriere options" for each jail and setname (if you created any sets following the customization section referenced above), providing the package list you constructed, to make sure that any new options are configured as you require them. 4) Run "poudriere bulk" for each jail and setname (if you created any), providing the package list as before. This will create a pkgng repository for each jail and set, which you can serve by HTTP (using your choice of Web server) or SSH (with pkgng 1.1+), and all of these packages will have been built in a clean jail and (if their dependencies were specified correctly) will have no library inconsistencies. 5) Configure your client machines to reference the appropriate repository created in step (4). 6) Run "pkg upgrade -fy" on all of your machines, and resolve any inconsistencies by "pkg remove"-ing the offending local package. That seems like a lot of work, and it is, but having done it, there's a huge benefit the next time you want to do update your systems: a) Update the ports tree (how you do this depends on how you set up poudriere -- see the man page). b) Repeat step (3). c) Repeat step (4). d) Check the ports UPDATING file for any warnings about packages you are about to install. If it tells you to do "pkg install -fR somepackage", then do those. e) Run "pkg upgrade -y" to upgrade any remaining packages. Even for just three machines it was worth going through this process -- and worth unifying all of my package sets and options. Since I now do one build instead of three, I'm no longer so ocncerned about minimizing dependencies; it's no big deal if some X libraries get installed on my server. -GAWollman