Integrating with pkg

Matthew Seaman matthew at FreeBSD.org
Sat Jun 7 09:57:53 UTC 2014


On 07/06/2014 04:34, Jim Trigg wrote:
> I'm looking to port a utility from Ubuntu, and need to know what hooks
> there are in pkg. I want to port etckeeper, a tool that automates
> version control for /etc (and in our case $PREFIX/etc). Its current
> implementation uses hooks in apt to automatically check in changes when
> a package is installed/updated; I'm wondering what I can do to support
> that functionality (checking in changes when a package or the base
> system is installed/updated) in FreeBSD.

Hmmm.... well, at the moment pkg(8) has nothing to do with /etc -- as
that's part of the base system, it's outside pkg(8)'s ambit.  For now --
there are plans to package the base system, but they are as yet only as
a very early stage.

However, in the more general case, pkg(8) has a plugin capability which
sounds like it would fit the bill.  You should be able to set up some
sort of notification to etckeeper to trigger what ever action you
require on package installation / update.

The plugin system in pkg(8) has not been particularly widely used to
date, so undoubtedly there are nits to comb out.  If you raise any
problems on the freebsd-pkg at ... list or via github:

   https://github.com/freebsd/pkg/issues?state=open

(Or even better: send pull requests) then we'll be happy to help.

	Cheers,

	Matthew

-- 
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: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140607/be8d6c2d/attachment.sig>


More information about the freebsd-ports mailing list