yevgenko/cookbook-php-fpm — pull request #35 by mademedia (2014-04-26 15:39:34+00:00)
Title: Support for overriding yum package and service names

Added support for changing php-fpm installation package, service name and yum repo URL, all to better facilitate use on modern Amazon Linux (2014.03).

At least in the most recent releases, this cookbook won't function with Amazon Linux for 3 reasons;

1. When opting to use more recent releases such as PHP 5.5, package names follow the moniker of php55-xxx, the existing php-fpm cookbook assumes it'll be one of two choices, restricting what packages can be installed.

2. The existing php-fpm cookbook assumes the init / service name is the same as the package name, however in at least the case of the "php5-fpm" package, the init script created differs (creating /etc/init.d/php-fpm-5.5) causing the php-fpm cookbook to fail restarting the service.

3. When using RHEL / yum for installation, the existing php-fpm cookbook attempts to use $releasever when installing a yum repo (Remi), Amazon Linux sets this to either "latest" or something along the lines of "2014.03" or "2013.09" which breaks compatibility with RHEL/CentOS based repos that expect a release number such as 6 or 7.

In all three cases, this pull request allows the user to override all the above whilst maintaining backwards-compatibility in case they choose not to. Enjoy :)