Issue #23084 has been reported by Paweł Tomulik.

----------------------------------------
Feature #23084: Package options property for package
https://projects.puppetlabs.com/issues/23084

* Author: Paweł Tomulik
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: package options ports freebsd package_options feature
* Branch: 
----------------------------------------
Hi,

Last few months I was trying to adapt the puppetlabs-apache module to work on 
FreeBSD (with some success). The rule is that puppetlabs-apache installs apache 
package internally as well as all the necessary packages that provide apache 
modules and additional features. The puppetlabs-apache decides what packages to 
install depending on configuration parameters defined in manifests (selection 
of MPM, additional modules and so on). On most platforms apache modules are 
available as small installable packages, so the extra modules are installed as 
separate packages - easy to do with puppet. This is not the case for FreeBSD. 
With FreeBSD ports we need to enable/disable certain "port options" on bigger 
packages (apache22, for example) in order to have given modules installed. 
Normally it's done at port configuration step (make config - ncurses GUI), 
after which the package is being compiled and installed. In a situation such as 
with puppetlabs-apache however, this should be done entirely by puppet class 
without additional user intervention.

What I would propose here is to add `package_options` property to `package` 
type in order to handle port options on FreeBSD. What may be put into this 
property should be provider-specific, so all the stuff such as validation, 
munging, syncing, etc. would be delegated to particular provider. The 
package_options could also be used by other providers, that have concepts 
similar to port options (build options).

In short, my proposition is to:

* define `package_options` feature (for obvious purpose),
* define `package_options` property
  - user may define set of package options for a package,
  - these alter contents of the installed package and so on (provider and 
package specific),
  - once the package is installed, puppet should be able to retrieve its 
package_options (what options it was installed with),
  - if package_options are not in sync (requested options vs. options of the 
installed package) appropriate actions are taken (package gets reinstalled with 
new options in most cases)
* implement `package_options` feature for FreeBSD ports provider.

I already have some code, and I'm going to leave few PRs on github (I'm going 
to split this into few PRs, as the whole stuff is quite big). Please let me 
know what is your opinion - does this make sense?


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to