PHP includes a systemd service definition, so Gentoo should use that instead of creating and maintaining its down. So I believe that these 2 files should be deleted: https://github.com/gentoo/gentoo/blob/4826d99cdd0ec59d041dd7ce888238a3825bc0b1/dev-lang/php/files/php-fpm_at-simple.service https://github.com/gentoo/gentoo/blob/4826d99cdd0ec59d041dd7ce888238a3825bc0b1/dev-lang/php/files/php-fpm_at.service and the ebuild should install the systemd service that the PHP build system produces instead. It looks like Gentoo will have to patch upstream's systemd unit's ExecStart= line, because upstream doesn't support slotting (I imagine that a sed invocation could handle that).
Can you provide a link to the units provided by upstream? If we have to patch them anyway, there may be little point in using them.
Here's upstream's: https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.service.in Just because they're similar now, doesn't mean they always will be - upstream may fix things or add features, in which case it will be nice to get those things. In my opinion, Gentoo should always try to use what upstream provides in all cases, and when not possible, submit patches upstream so that it eventually can.
It looks like we may be using a gentoo-specific wrapper script to implement the slotting support here. If that's the case, upstream's service file is not useful.
(In reply to Mike Gilbert from comment #3) > It looks like we may be using a gentoo-specific wrapper script to implement > the slotting support here. If that's the case, upstream's service file is > not useful. The only difference is the ExecStart= line - could Gentoo just replace that line with its own? Then at least the rest of the file will be upstream.
(In reply to candrews from comment #4) > > The only difference is the ExecStart= line - could Gentoo just replace that > line with its own? Then at least the rest of the file will be upstream. The PIDFile line is also different, because @localstatedir@ is set to ${EPREFIX}/var. A patch for the service file would be bigger than the service file itself, but I'm not strongly opposed to patching. I don't use systemd, however, so I can't do this myself. Someone else would have to write the patch, update the ebuilds, and test them.
I generally agree with the premise of this bug, that we should offload whatever work we can to upstream. But in this case, I think it's more trouble than it's worth: the service files are tiny and we need to change 2/5 of the [service] definition. If no one writes/tests a patch, I'll eventually assume that you all agree with me and mark this WONTFIX =)