Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456738 - dev-lang/php[fpm] - init script improvements
Summary: dev-lang/php[fpm] - init script improvements
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 07:46 UTC by Jaco Kroon
Modified: 2013-03-27 13:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2013-02-11 07:46:21 UTC
Hi,

It would be awesome if one is able to specify a custom php-fpm.conf file location, as well as explicit slot.  For example, in my case I really do NOT want to use the default php-fpm.conf file and would prefer to use a custom location to prevent accidental etc-updates from clobering this, also, after an upgrade of php a changing location for php-fpm.conf is not desirable.

To achieve this I suggest that /etc/init.d/php-fpm is updated to use PHP_FPM_CONF as set in /etc/conf.d/php-fpm if it's set, if not set - use the default location as per current.

The change in /etc/init.d/php-fpm can be as simple as changing the line setting PHP_FPM_CONF to:

PHP_FPM_CONF="${PHP_FPM_CONF-/etc/php/fpm-${PHPSLOT}/php-fpm.conf}"

This works at least with busybox and bash, not sure about zsh, dash and ksh (since /bin/sh is used as far as I know to run scripts in /etc/init.d/).

Reproducible: Always
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2013-02-11 15:16:28 UTC
Sure. Should be doable
Comment 2 Ole Markus With (RETIRED) gentoo-dev 2013-03-23 19:55:22 UTC
One issue I have with this is that it would make php-fpm.conf live somewhere else than its respective php.ini file. I think both of them should be in the same dir. You also have the same issue with php.ini itself, since after a slot upgrade you need to migrate php.ini as well.

So after thinking this a bit more through, I think keeping php-fpm.conf where it is currently located is more correct.
Comment 3 Jaco Kroon 2013-03-24 13:11:02 UTC
Hi,

I note your concerns.  For the most part people do NOT touch the init and conf.d scripts, however, I specifically do NOT edit the installed files because of the slot migration thing.  In the fpm config file I also point php itself to a different php.ini file, most specifically to not have to redo my config files every time after a slot update (which sounds simple enough if you have one or two machines but is a very different beast when you have clusters that each cluster consist of 10+ machines).

I highly recommend keeping the existing setup the default.  That's correct, and completely sane.  But please give those of us that have different requirements the option to do something which for our environments is more sane.
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2013-03-24 18:07:48 UTC
Slot upgrades do not occur that often. Of you have a large number of homogeneous machines you should anyway have use some form of configuration management system