Creating a pkg

Andrew Wood andrewjameswood at
Fri Aug 5 19:19:21 UTC 2016

On 29/07/16 18:33, Andrew Wood via freebsd-questions wrote:

> On 28/07/16 22:14, Matthew Seaman wrote:
>> Note that
>> pkg(8) will automatically calculate the file checksums so you can 
>> leave those bits out of
>> your manifest
> What is the syntax for doing this, what would I put in the files {} 
> section where the hash would normally go?

OK after trial and error not helped by the fact that different docs 
seems to have different syntax, Ive managed to put together a pkg which 
will install all the files at the desired location and remove them again 
when the pkg is uninstalled. I can also set the file permissions but not 
the owner or group owner, which Im doing like this:

files: {
  /path/to/file: {uname: 'username', gname: 'groupname',perm: 644};

I suspect theres nothing wrong with that, the problem is simply that it 
isnt creating the user or group in the first place.

Am I right in assuming that is the purpose of
users: ["username"];
groups: ["groupname", "groupname2"];

If so why is it not making the necessary entries in the /etc/passwd or 
/etc/group files?


More information about the freebsd-questions mailing list