In testing, I found that the php5 package from ports (and pkg_add -r php5) does not have the apache module built by default.

Right. Not sure how it passed my testing, sorry about that.

As far as I recall, the freebsd package provider uses ports and not pkg_add -r, so we may be able to drop off the /var/db/ports/php5/options file, yes?

It defaults to packages (pkg_add -r), but there it an option to build from the port (source=ports).

Using /var/db/ports/php5/options would work, but I'd rather not do that as a one-off hack: I would rather write an LWRP (in a new "freebsd" cookbook) to manage ports options. I will look into it, it's long overdue

Joshua Timberman [Chef]
added a comment - 16/Feb/12 12:47 AM - edited
This is not yet merged into opscode/master.
In testing, I found that the php5 package from ports (and pkg_add -r php5) does not have the apache module built by default.
Right. Not sure how it passed my testing, sorry about that.
As far as I recall, the freebsd package provider uses ports and not pkg_add -r, so we may be able to drop off the /var/db/ports/php5/options file, yes?
It defaults to packages (pkg_add -r), but there it an option to build from the port (source=ports).
Using /var/db/ports/php5/options would work, but I'd rather not do that as a one-off hack: I would rather write an LWRP (in a new "freebsd" cookbook) to manage ports options. I will look into it, it's long overdue

Joshua Timberman [Chef]
added a comment - 01/Mar/12 8:20 AM It appears that this requires some change to ensure that it works around the php5 package not having the apache support. Please resolve and indicate the branch/commit if this is fixed and I missed it.
Thanks!

The only thing I am hesitant about is that the apache2 cookbook does not currently have any other dependencies and this would introduce one, possibly surprising to folks. I think it is reasonable to expect people to have the freebsd cookbook in the node's expanded run list somewhere so it gets downloaded by the client. The README in the apache2 cookbook should be updated to state this requirement, probably in the Platforms section.

It may also be reasonable to do a check in the mod_php5 recipe for the freebsd recipe being in the expanded run list. Thoughts on that?

Joshua Timberman [Chef]
added a comment - 07/Mar/12 11:00 PM Marking this triaged so it gets picked up for merge.
The only thing I am hesitant about is that the apache2 cookbook does not currently have any other dependencies and this would introduce one, possibly surprising to folks. I think it is reasonable to expect people to have the freebsd cookbook in the node's expanded run list somewhere so it gets downloaded by the client. The README in the apache2 cookbook should be updated to state this requirement, probably in the Platforms section.
It may also be reasonable to do a check in the mod_php5 recipe for the freebsd recipe being in the expanded run list. Thoughts on that?

Adding a strict dependency is too much, especially given the relatively small number of FreeBSD users.
I think the "burden" of having to find out the obviously-named freebsd cookbook and adding it to the run list is quite reasonable.
Adding it to the README sounds good; I can come up with something.

Not sure how much value an extra check can make.
What would it do, raise straight away? log a warning and hope for the best?
Either way, it's not much better than letting it fail anyway.
The only real advantage I can see is that we could raise a message that provides a pointer to the README.

Andrea Campi
added a comment - 07/Mar/12 11:12 PM More or less in line with your comments.
Adding a strict dependency is too much, especially given the relatively small number of FreeBSD users.
I think the "burden" of having to find out the obviously-named freebsd cookbook and adding it to the run list is quite reasonable.
Adding it to the README sounds good; I can come up with something.
Not sure how much value an extra check can make.
What would it do, raise straight away? log a warning and hope for the best?
Either way, it's not much better than letting it fail anyway.
The only real advantage I can see is that we could raise a message that provides a pointer to the README.

I am reopening this ticket per email conversation indicating additional work may be required, and pending move to a fork of the opscode-cookbooks/apache2 repo. Resolve this ticket (leave untriaged) when complete so we can review. Thanks!

Joshua Timberman [Chef]
added a comment - 22/Mar/12 4:17 PM I am reopening this ticket per email conversation indicating additional work may be required, and pending move to a fork of the opscode-cookbooks/apache2 repo. Resolve this ticket (leave untriaged) when complete so we can review. Thanks!

Andrea Campi
added a comment - 24/Mar/12 10:35 PM Pull request on the new repo: https://github.com/opscode-cookbooks/apache2/pull/1
I am not sure whether you want me to make more changes.
Looking back at your previous comment, I did add text to the README to point at dependencies.
Please let me know if you think more work is needed.