tech-pkg archive

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

Re: how to upgrade a whole machine ...

It probably built the dependencies, but did not build binary packages
for them. Did you perhaps fiddle with *_TARGET options somewhere?
You could maybe hack up a shell script that uses pkgtools/pkg_tarup
to generate binary packages from the installed dependencies.

What I usually do when starting from scratch is to generate a list
of packages I want built suitable for pkg_chk, for instance via

pkg_info -u -Q PKGPATH > /path/in/pkg_comp/chroot/pkgchk.conf

and then do, in the pkg_comp chroot (via "pkg_comp chroot"):

pkg_chk -saf -C /path/in/chroot/pkgchk.conf

If you have used this before, you can add a "-u" to this in order
to update outdated packages. Make sure you have UPDATE_TARGET =
= package then, because otherwise you end up without binary packages

Not sure whether this is safe or elegant, but it usually works
flawlessly for me.


Dennis den Brok

On 2008-05-07, Herb Peyerl <> wrote:
> For some reason, I feel like an idiot posting this, but I gotta say, I  
> just don't get pkgsrc... I feel like I'm having a newbie moment but  
> I'm not a newbie... I've been using NetBSD since it was founded  
> (obviously) but always been rather behind the curve on 'how to do  
> things the NetBSD-way'...
> I decided I needed to upgrade an old 3.0 machine to 4.x with a fairly  
> modern pkgsrc.. I upgraded the kernel and userland ok (after some  
> teething issues with postfix)... Then it came time to do pkgsrc...
> After much anguish, I took one of agc's pkg_comp files and some notes  
> he sent me, and tried to learn how to use pkg_comp to build all the  
> binary packages I needed in hopes I could clear-cut my /usr/pkg and  
> reinstall updated packages... Well, after letting pkg_comp churn for  
> about 15 hours, I was left with a bunch of binary pkg's.. I then used  
> pkg_chk -ab to install them into my fresh new /usr/pkg, but it turns  
> out I didn't put dependancies for my top-level packages into my  
> pkg_comp config file, so, for example, it built a binary package for  
> postgrey but didn't build any of the postgrey dependancies (p5-* and  
> db4)... I'm not sure how it managed to convince itself that it could  
> install postgrey into the chroot without building the dependancies but  
> that's an aside...
> My whole point of writing this, is that I couldn't have done any of  
> this without the help of other long-time NetBSD developers...
> I tried reading because  
> there's a lot of instructions there and surely what I want to do is in  
> there.. But it's not... The closest thing I could find in there was  
> 'doing a bulk build' but the top of that doc says "don't do this. this  
> document is old and not relevant anymore." leading one to look at the  
> docs for 'pbuild' which has a big "TODO, look at the wiki".  ... But  
> it doesn't really look like that's what I want to do anyway ...
> Now it could be that I'm just not looking in the right spot for the  
> "how to upgrade an old NetBSD machine to a new NetBSD machine with new  
> versions of all of your packages" document, or it could be that it  
> just doesn't exist ... Querying a few other NetBSD devs in icb, it  
> seems everyone has a different way of doing this...
> I work in a lab with about 20 developers working on an embedded NetBSD  
> product.. Everyone has at least one or 2 NetBSD machines on their  
> desktop as development boxes, plus their target rigs (which run  
> NetBSD)... Everyone in that lab is afraid of pkgsrc... Some of these  
> people are penguinistas who, after having been forced to use NetBSD,  
> can't wait for the project to end so they can go back to penguix..  
> Whenever someone needs to update a NetBSD machine, they burn it down  
> and rebuild it from scratch because pkgsrc is intractable...
> I'm writing this prematurely because I'm on my 3rd attempt at building  
> the binary packages I need for my mail server.  My mail server is  
> colocated somewhere.  It doesn't even have a DVD drive... I can't just  
> burn it down to the ground and rebuild it from scratch... I need to  
> upgrade it in-situ and I need to do it remotely...  Why isn't there an  
> obvious way to do this?   Why is this black magic?
> I'm frustrated, think about the less experienced NetBSD users who  
> we're trying to attract and ask how they're supposed to figure this  
> out?  Not everyone is a pkgsrc developer.

Home | Main Index | Thread Index | Old Index