Skip to content

Commit

Permalink
adjust params and mpm to recent FreeBSD packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Feb 18, 2015
1 parent 7571bd8 commit 70db610
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions manifests/mpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
$_path = "${lib_path}/${_lib}"
$_id = "mpm_${mpm}_module"

if versioncmp($apache_version, '2.4') >= 0 and
(($::osfamily != 'FreeBSD') or
($::osfamily == 'FreeBSD' and $mpm == 'itk')) {

if versioncmp($apache_version, '2.4') >= 0 {
file { "${mod_dir}/${mpm}.load":
ensure => file,
path => "${mod_dir}/${mpm}.load",
Expand Down
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@
$ssl_certs_dir = '/usr/local/etc/apache24'
$passenger_conf_file = 'passenger.conf'
$passenger_conf_package_file = undef
$passenger_root = '/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.10'
$passenger_ruby = '/usr/bin/ruby'
$passenger_root = '/usr/local/lib/ruby/gems/2.0/gems/passenger-4.0.58'
$passenger_ruby = '/usr/local/bin/ruby'
$passenger_default_ruby = undef
$suphp_addhandler = 'php5-script'
$suphp_engine = 'off'
Expand Down

6 comments on commit 70db610

@sethlyons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit broke this module on freebsd. i'm curious why you changed the logic in mpm.pp. the "${mod_dir}/${mpm}.load" file resource should only be instantiated in two cases:

  1. apache_version >= 2.4 AND OS is not freebsd, or
  2. apache_version >= 2.4 AND (OS is freebsd AND mpm is itk)

since this change, that file resource is instantiated on all OSes when apache_version >= 2.4, and that isn't what the behavior should be on freebsd.

@mmoll
Copy link
Contributor Author

@mmoll mmoll commented on 70db610 Mar 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the exact version of your apache package? The MPM behaviour was changed with freebsd/freebsd-ports@85ee94e8

@sethlyons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I updated from 2.4.10_1 to 2.4.12 and everything was fine. If that's the case though, this change should really be updated either to support 2.4 both at and below .12 (since it's currently broken for anyone on 2.4 prior to .12) or it should change to fail in freebsd if the package version is less than 2.4.12. which of those is preferred is probably best answered by @igalic, @mhaskel, or another puppetlabs-apache commiter.

@mmoll
Copy link
Contributor Author

@mmoll mmoll commented on 70db610 Mar 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that's not really possible. Theretically this would require to define a fact with the exact version and then implement all the logic for the differences. On Linux it's easy as the base system is lockstepped with the rest of the packages and stable over a (major) release. As FreeBSD ports are completely rolling and disconnected from the base system version it's not possible to handle it like that.

@sethlyons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps at the very least the readme should be updated to say that freebsd requires at least 2.4.12? otherwise we've forced the module to fail for people and given them no indication as to why or how to fix it.

@underscorgan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sethlyons yeah, unfortunately documentation updates are probably the best bet here. Do you have the bandwidth to submit a PR for that, since you're probably better versed in the issue and how to resolve it. Thanks!

Please sign in to comment.