I’ve finally pushed some code that I’ve ended up working on in two different hemispheres!
With the putback of:
changeset: 1933:5193ac03ad9f tag: tip user: Tim Foster date: Tue Jun 08 12:17:06 2010 +1200 description: 15305 need to generate dependency information from SMF manifests 15306 need an attribute to declare the SMF services a package delivers 15722 pkgdepend doesn't always remove internal deps when variants taken into account
pkgdepend(1) will now use SMF manifests as a source for dependency information.
This means, that if you as a package author are including SMF manifests in your package, the package publishing system will look in those manifests for any service descriptions that declare other FMRIs as “require_all” dependencies for your service, and will then ensure that the packages delivering those services are marked as dependencies for the package you’re publishing.
Obviously to do this work,
pkgdepend needs to be run on a build machine that includes all SMF FMRIs that your package needs to function. That said, having your publishing system figure out dependencies for you, means there’s one less thing for you as a publisher to worry about, and certainly will make life easier for your users.
An interesting side-effect of this work, is that now you’ll be able to search the package database for SMF manifest FMRIs. For example, if you’re wondering who delivers
svc:/network/iptun:default, you can do a simple search for it –
$ svcs iptun STATE STIME FMRI online May_27 svc:/network/iptun:default $ pkg search -l ':::svc\:/network/iptun\:default' INDEX ACTION VALUE PACKAGE opensolaris.smf.fmri set svc:/network/iptun:default pkg:/SUNWcs@0.5.11-0.142
(though do remember to escape the colons in the SMF FMRI field. Wildcards also work, so for kicks, you might want to try
pkg search -l ':::svc\:* :-)