NetBSD-Users archive

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

Re: Dumping configuration

On Thu, 3 Apr 2008 20:02:15 -0400
"James K. Lowden" <> wrote:

> David Dudley wrote:
> > I need to setup a new host with the same package set, and it would
> > be easy if I can just say "make all of these".
> Doubtless you'd get a better answer from pkgsrc-users@, but I do
> roughly that from time to time by making a list and feeding it to
> make(1).
> To make a list of packages with their directories, perhaps
>       $ pkg_info | awk '{print $1}' \
>         | while read F; do pkg_info -Q PKGPATH $F; done

I recommend 'pkg_info -u' here -- it lists only the packages that were
actually requested, as opposed to dependencies.  Since those change
from time to time, you don't want to install them unnecessarily.
> Then to make everything, perhaps
>       $ cd /usr/pkgsrc && for P in $(cat pkglist)
>         do 
>               (cd $(dirname $P) && make $(basename $P))
>         done
> I'm sure there are easier ways, but I never seem to need quite the
> same thing twice, and the above approach lets me tailor the list and
> control the process somewhat.  

                --Steve Bellovin,

Home | Main Index | Thread Index | Old Index