Creating a pkg

Matthew Seaman matthew at
Thu Jul 28 16:48:09 UTC 2016

On 07/28/16 16:44, Andrew Wood via freebsd-questions wrote:
> I'm experimenting with creating a pkg package for a program Ive created
> on my system which is a set of Python & shell scripts.
> I have a few of questions:
> 1. Despite following the example +MANIFEST file given on the wiki I am
> getting the error pkg: Bad format in manifest for key: version

You can see the manifest for any package on your system by:

   pkg info -R pkgname

If you copy the format there, you shouldn't go far wrong.  Note that
pkg(8) will automatically calculate the file checksums and work out any
shared library dependencies for you, so you can leave those bits out of
your manifest

It's written in UCL ( -- that's very
similar to JSON in this case.  (UCL can also look like the nginx config
file format, but that's not really relevant here.)

> I am invoking the command like this: pkg create -M ./+MANIFEST
> with the current working directory being the one containing the manifest
> and all the program scripts.
> the line in the manifest is as follows:
> version: 0.3
> Any idea why it doesnt like this?


version: "0.3";

> 2. As my program is Python & shell scripts and is therefore platform
> independent can I use arch: all ?

That would be:

abi = "FreeBSD:10:*";
arch = "freebsd:10:*";

(assuming you're running FreeBSD 10.x)  You will need both abi and arch
settings, although for a pure Python package they don't really add much
value to the package.

> 3. When specifying a dependency package and its version, is the version
> taken as that version only or will it also be satisfied by a later
> version? According to the docs there is no way to specify one or the other.

No, this is recognised as one of the biggest limitations in pkg(8) at
the moment.  Strict dependencies are baked into packages, and the
version matching is exact.  This makes a difference at install time --
although it does seem to be possible to update a dependency at a later
date without too much trouble.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list