[FreeBSD-Ports-Announce] Time to bid farewell to the old pkg_ tools

olli hauer ohauer at gmx.de
Thu Feb 6 18:36:35 UTC 2014

On 2014-02-06 13:45, Matthias Apitz wrote:
> El día Thursday, February 06, 2014 a las 01:27:50PM +0100, Julian H. Stacey escribió:
>> Michel Talon wrote:
>>> The old package system was total =
>>> crap,
>> local.sqlite is also crap, breaks decades of accessibility by find & grep
>> & other text pipe / search tools.
> Since many years I have always compiled "my" (i.e. the ports I need)
> from CVS or now SVN ports tree on some fast baquery maschine. After
> compiling I just did something like:
> # mkdir PKG
> # cd PKG 
> # pkg_create -Rnb `cd /var/db/pkg ; ls -C1`
> and moved the resulting ~1500 packages to my laptops or smaller
> netbooks. Until today I'm still using the old pkg_info/_add/_create
> tools and skipped pkgng until today.
> Will the above procedure work fine too in the future?
> Why not keep the old methods unchanged in place as today?

Yes this is even possible.

$ mkdir $space/packages/All
$ pkg create -a -o $space/packages/All
$ pkg repo $space/packages/

Populate $space/packages via http(s), nfs or ftp

on your client:
$ mkdir -p $LOCALBASE/etc/pkg/repos

$ cat << _EOL > $LOCALBASE/etc/pkg/repos/mapitz.conf
mapitz: {
 url: "$proto://$baquery_maschine/$space/packages" ,
 enabled : true ,
 mirror_type : none

On your client run '$ pkg upgrade' and you are done.

However I suspect this method changes the checksum of the packages
every time you run '$ pkg create -a -o ...', but even then only
packages that really changed PORTREVISION ... will be updated
on your client.

The better way with a fast box is to run ports-mgmt/poudriere and
also have clean packages for your fast box.

A good starting point is to create a poudriere build and sync your
/var/db/ports to $LOCALBASE/etc/poudriere.d/($build)options/ and
copy your /etc/make.conf to $LOCALBASE/etc/poudriere.d/

Then use a list of ports (pkg_info -qoa| pkg info -qoa) and fire up
a build. The next time only changed ports are rebuild.

In the past I used tinderbox with the command
$ ./tc addBuildPortsQueueEntry -b ${BUILD}
to get consistent packages and had to wait a long time (*everything*
was located in a big 20GB RAM disk and/or on SSD), with poudriere most
everything is done on zfs in a part of the time and I guess with most
in a RAM disk even faster.

A good way to play with the new tools:
Setup a jail, install parts of your packages, convert them to pkg
packages and on a second jail install this ports.


More information about the freebsd-ports mailing list