pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to upgrade?

* On 2008-07-29 at 10:39 BST, Havard Eidnes wrote:

> > There are several approaches.
> One method you overlooked to mention [...]

For the record, my personal favourite:

 - create pkgchk.conf listing the packages you want to have installed

 - use the bulk build infrastructure to build these in a chroot and result
   in binary packages, with a bit of extra stuff in mk.conf

   PKGCHK_CONF=    /path/to/pkgchk.conf

   .if defined(SPECIFIC_PKGS)
   .  if exists(/usr/xpg4/bin/awk)
   PKGLIST!=       /usr/xpg4/bin/awk '$$1 !~ /^(\#|$$)/ {print $$1}' 
   .  else
   PKGLIST!=       awk '$$1 !~ /^(\#|$$)/ { print $$1 }' ${PKGCHK_CONF}
   .  endif
   .  for _pkg_ in ${PKGLIST}
   HOST_SPECIFIC_PKGS+=    ${_pkg_}
   .  endfor

   (you can of course get rid of the /usr/xpg4/bin/awk part if you don't
   plan on using Solaris).

 - set up build.conf and run mk/bulk/build -s to build just the specific
   packages you listed in pkgchk.conf

 - run pkg_chk -aurb to update using the binary packages.

If you're feeling cautious, you can run pkg_chk -aurbn to show what would
happen, then upgrade step by step.  I happen to use this method on my colo
as I don't want changes in newer configs for dovecot etc to break the
running service, and prefer to diff against the new example to see what I

I've used this for about 3 years now, works very well.  Takes a little bit
longer to set up than others, but once done you don't need to maintain it
much - I have a script which does pretty much everything in one go.

Jonathan Perkin                                     The NetBSD Project             

Home | Main Index | Thread Index | Old Index