From owner-freebsd-stable@FreeBSD.ORG Thu Jun 27 06:26:15 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 20FBCF19 for ; Thu, 27 Jun 2013 06:26:15 +0000 (UTC) (envelope-from bsd-lists@1command.com) Received: from udns.ultimateDNS.NET (ultimatedns.net [209.180.214.225]) by mx1.freebsd.org (Postfix) with ESMTP id D288E1C28 for ; Thu, 27 Jun 2013 06:26:14 +0000 (UTC) Received: from udns.ultimateDNS.NET (localhost [127.0.0.1]) by udns.ultimateDNS.NET (8.14.5/8.14.5) with ESMTP id r5R6RKkQ088503; Wed, 26 Jun 2013 23:27:26 -0700 (PDT) (envelope-from bsd-lists@1command.com) Received: (from www@localhost) by udns.ultimateDNS.NET (8.14.5/8.14.5/Submit) id r5R6RFDH088497; Wed, 26 Jun 2013 23:27:15 -0700 (PDT) (envelope-from bsd-lists@1command.com) Received: from udns.ultimatedns.net ([209.180.214.225]) (UDNSMS authenticated user chrish) by ultimatedns.net with HTTP; Wed, 26 Jun 2013 23:27:15 -0700 (PDT) Message-ID: <5cc1b9cc0c9681d655d063c7737c73d9.authenticated@ultimatedns.net> In-Reply-To: <201306270505.r5R55RJD040660@hergotha.csail.mit.edu> References: <201306270505.r5R55RJD040660@hergotha.csail.mit.edu> Date: Wed, 26 Jun 2013 23:27:15 -0700 (PDT) Subject: Re: portupgrade(1) | portmaster(8) -- which is more effective for large upgrade? From: "Chris H" To: "Garrett Wollman" User-Agent: UDNSMS/2.0.3 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal 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 06:26:15 -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 Greetings, WOW! Thank you for the _very_ informative reply, Garrett. _Greatly_ appreciated. --Chris > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >