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 03:44:17PM +0200, Dieter Baron wrote:
> bulk build.  A limited bulk build will build all the packages you
> listed and all their dependencies.  You can then use these to install
> the machine proper, in much the same way as using the official binary
> packages.

Unfortunately, bulk builds are almost impossible with pkgsrc-2008Q1 on
NetBSD 4.0.  You know, the latest NetBSD release, I'm sure you've heard
of it.  (No, I'm not talking directly to you, Dieter.  The ones that are
responsible for the current state of the support of NetBSD 4.0 in pkgsrc
will recognize themselves.)

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.

So you first have to hack mk/bulk/build in order to make it consider
NetBSD as just your average platform, and prevent (in a rather hackish
way, I have to say) the deletion of the pkg_install package which you
will have install manually first.

Once that is done, bulk builds work, with one exception:  you can't
build pkg_install itself, because it will be deleted while it is built,
and then the build fails.

All of this wouldn't be too bad (and here I have to agree with Herb:
the average user won't go through all those hurdles) if not for the
fact that security/audit-packages disappeared in favour of something
that is included in pkg_install.  Which means if you want to keep the
functionality of audit-packages on your servers, you need the new
version of pkg_install installed on them.

This is where it gets nasty in my use of pkgsrc:  I build binary
packages for all my servers, and a meta-package for each and every one
of them, so I can use the binary packages easily:  in the course of an
upgrade to 4.0 (before I moved my packages to 2008Q1), I did for
instance on my machines "pkg_delete -R servername;  pkg_add servername".
When I want to update a given package, I do "pkg_delete -r package;
pkg_add servername", and so on.

If I want audit-packages installed on them, I need a meta-package that
depends on pkg_install in order to have it installed, otherwise I have
to do it by hand.  Oops, I can't do that.

I'm bitter, but not that much;  after all, I have two days left at that
work place, so in a very near future I won't really have to care about
packages and servers except on my private servers, where I only have a
handful of users and packages, so down time and such isn't a big issue.

The thing is, the bulk build stuff used to be very efficient for
managing my servers.  It's really bad that pkg_install didn't get
updated in netbsd-4 and that security/audit-packages wasn't kept as a
separate package for those of us who only wanted that feature and not
have to deal with the whole pkg_install stuff.

I'm Cc'ing my replacement (sorry mate for the spam you'll surely be
receiving once this mail is published everywhere), who doesn't have
pkgsrc background.  Try convincing him that he should keep those NetBSDs
and not replace them with Debians instead.

Quentin Garnier - -
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpNoEgjdhj77.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index