tech-pkg archive

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

Re: how to upgrade a whole machine ...

On Wed, May 07, 2008 at 04:19:30PM +0200, Quentin Garnier wrote:
> The first problem is that the package tools in base in 4.0 are not
> recent enough for pkgsrc-2008Q1 to be happy.  mk/bulk/build will then
> fail because on NetBSD it deletes everything in ${LOCALBASE} before it
> starts the build, assuming the tools in base are good enough.

This might gives you ideas...

I used to use pkgsrc/mk/bulk to to "packages sets" for all my
servers (on "washing machines" inside pkg_comp, libkvered, sandboxes).
Then I switched to pkgsrc/pkgtools/pbulk and with the help of
pkgsrc/bootstrap it saved me from this "package tools in base not
recent enough" problem: yes I bootstrap pkgsrc even on NetBSD

So for a given packages set (that is the conjunction of NetBSD
arch, version, and packages listand settings):
(- carefuly craft "mk.conf", pkg_comp's and pbulk's config files)
- build a virgin pkg_comp sandbox with -N option (to avoid
packages tools version problem, I added this option for that :)
- inside this sandbox build a bootstrap binary kit with prefix=/pbulk
(this is only to get lastest packages tools)
- throw away the previously built pkg_comp sandbox
- build a virgin pkg_comp sandbox
- install the binary kit inside the sandbox
- install pbulk inside it
- configure pbulk to use /pbulk/sbin/pkg_* (see pbulk.conf)
- run pbulk's bulkbuild script inside the sandbox
- wait
- considerer using your fresh binary packages set for a server
upgrade (doing this on a really old live NetBSD machine 
you might want to manually install pkgsrc/pkgtools/pkg_install first)
with you favorite poison (manually, pkg_chk, a custom meta-package,
your own do-it-all-script).

I ~daily build this way 8 packages sets (NetBSD/{i386,sparc64},
various NetBSD versions and various "packages list and settings")
for all my servers. I "only" have to deal with packages breakages.
And when I feel confident enough, or sleepless, I choose a victim
box and update its packages.

Cheers, Stoned.

Home | Main Index | Thread Index | Old Index