Creating Packages

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Oct 26 02:37:31 PDT 2004


On Tue, Oct 26, 2004 at 12:45:08AM -0700, Loren M. Lang wrote:
> I'm trying to figure out the best way to create a package from an
> already installed port. 

Easy.  pkg_create -b pkg-name   -- read pkg_create(1) for details.

> I looked through the makefiles to see how ports does the package
> creation.  It looks like it compiles pkg_create with a very long list of
> arguments including references to file in /var/db/pkg, but it also
> references files created in the work directory when it built the port,
> but that's already been deleted so I can't use that.

Yes -- the ports have to do some processing to generate all of the
data that's then stashed in /var/db/pkg.  However, once that's in
place, pkg_create can just use it straight away to build the pkg.
 
> Also, I would like to be able to build a package from a compiled port
> without installing it first, is that possible or easy?

This is unfortunately not really feasible.  As things are, you've got
to install the files etc. belonging to the port into their final
locations before you can generate a package from it.

The way the package building cluster deals with this problem is to
build each port in a dedicated chroot -- see
http://pointyhat.freebsd.org/errorlogs/ for a description.  That might
be something you can adapt to your situation.

	Cheers,

	Matthew
-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041026/d4dfefaa/attachment.bin


More information about the freebsd-questions mailing list