"make package" vs "pkg create"

Matthew Seaman matthew at FreeBSD.org
Sun Feb 24 18:10:26 UTC 2013

On 24/02/2013 16:33, Joshua Isom wrote:
> I tried making a build jail, not with pourdriere or tinderbox.  I just
> went to the ports and ran `make -DBATCH package-recursive clean` to get
> packages created.  I ran `pkg add *` in the packages/All directory, but
> all failed because of MANIFEST missing.  I'm guessing this is a bug in
> the .mk files, since I do have WITH_PKGNG set.  Is this a known problem
> or is there supposed to be a different way to do it?  Am I just supposed
> to use pourdriere or the source to keep my ports up to date until all
> the packages are rebuilt on freebsd.org?

'MANIFEST' is pretty fundamental to pkgs -- probably the error you are
seeing is because there are some other sort of files that aren't pkgng
packages present.  That's going to upset pkg add.  What's the history of
this jail?  Did it start out using pkgng, or did it get converted from
pkg_tools?  If the latter, did the conversion go smoothly?  Can you use
eg. 'pkg info' in your jail to get an accurate listing of the packages
installed there?

If 'WITH_PKGNG' is set in your make.conf, then 'make package' will
certainly use pkgng to generate packages.  I do that a lot in testing,
and it works just fine.

If you can clear out the non-pkgng stuff, the recommended way to do what
you intend is to generate a repository catalogue, and then use 'pkg
install'.  'pkg add' really should only be considered for installing
single packages when there is absolutely no alternative.

You should be able to run 'pkg repo /usr/ports/packages' to build a
repository catalogue for all the pkgng packages you've built in your
jail.  Then you can either mount the jail's package tree on the machine
where you want to install packages, or make it available through a web
server.  Set PACKAGESITE appropriately in ${LOCALBASE}/etc/pkg.conf --
for instance, this is what you'ld set to use a repo made as above and
mounted in the same location:

   PACKAGESITE : file:/usr/ports/packages

You can then use 'pkg install' or 'pkg upgrade' in the usual way.

Note: you won't need to install every package in your repo -- many of
them will exist solely in order to facilitate building other packages.
 If you choose the packages you specifically want, pkgng will sort out
installing the required dependencies, and moreover will set the
autoremove flags appropriately, so you could later purge things
installed solely as dependencies of packages you no longer want.



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130224/c0273259/attachment.sig>

More information about the freebsd-questions mailing list