Summary: | app-eselect/eselect-php: please consider adding logrotate for php-fpm | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tomáš Mózes <hydrapolic> |
Component: | Current packages | Assignee: | PHP Bugs <php-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mjo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Tomáš Mózes
2019-08-15 08:57:27 UTC
Maybe something like: /var/log/php-fpm.log /var/log/php-fpm-*.log.slow { create 600 root root size 5M copytruncate notifempty missingok } It's possible to signal php-fpm, but since you can have multiple versions, it's maybe fine to just copy and truncate the logs. The path to these logs doesn't change when you eselect different versions of php-fpm, right? I'm thinking this should go in dev-lang/php and not in eselect-php. Likewise -- even though I probably put it there -- I'm also thinking the tmpfiles entry for php-fpm should get moved out of eselect-php and into dev-lang/php. Only things with a $SLOT in them (basically, custom Gentoo stuff) needs to be part of eselect-php. (In reply to Michael Orlitzky from comment #2) > The path to these logs doesn't change when you eselect different versions of > php-fpm, right? I'm thinking this should go in dev-lang/php and not in > eselect-php. > > Likewise -- even though I probably put it there -- I'm also thinking the > tmpfiles entry for php-fpm should get moved out of eselect-php and into > dev-lang/php. Only things with a $SLOT in them (basically, custom Gentoo > stuff) needs to be part of eselect-php. I think you have this backwards a bit. Files *common* to all slots must go in a separate package as well or there will be a file collision when multiple slots are installed. If a single logrotate covers all slots, it needs to be in eselect-php (since that's where the common init files are too). If there is to be a different logrotate for each slot, then yes, it belongs in dev-lang/php (In reply to Brian Evans from comment #3) > > I think you have this backwards a bit. Files *common* to all slots must go > in a separate package as well or there will be a file collision when > multiple slots are installed. See, that's why you're in charge now. Tomas, presumably this has been working for you? If so I'll add it as-is to the git repo. Now's a good time to "upstream" the php-fpm-launcher script as well, and to figure out "eselect php embed" might look like. (In reply to Michael Orlitzky from comment #4) > Tomas, presumably this has been working for you? Yes, we have this deployed on our php-fpm servers. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=4b7d40cb0dd5213674766c48193efba1da74edff commit 4b7d40cb0dd5213674766c48193efba1da74edff Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-01-22 17:22:26 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2020-01-22 22:51:43 +0000 src/php-fpm.logrotate.in: add a logrotate script for php-fpm. Since all of the log files for php-fpm wind up in the same place regardless of slot, we install a single logrotate file as part of eselect-php. The contents of the file may not be perfect -- they were taken from the example submitted on bug 692194 untested -- but will be easy to update in the future. Bug: https://bugs.gentoo.org/692194 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> .gitignore | 1 + Makefile.am | 9 +++++++-- src/php-fpm.logrotate.in | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) Ok, it's in eselect-php-9999 and will be a part of 0.9.6 when I hear back on bug 659592. Thanks The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80e9cccfa6bf0f6fc15dda9f1423d5cdca8b2354 commit 80e9cccfa6bf0f6fc15dda9f1423d5cdca8b2354 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2020-03-01 13:10:27 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2020-03-01 13:58:34 +0000 app-eselect/eselect-php: new version 0.9.6. New EAPI=7 version with some nice stuff: * The php-fpm-launcher script and php-fpm.conf tmpfiles.d entry are now upstream, simplifying the ebuild. * We install a logrotate script for php-fpm. * The eselect module itself now supports $ROOT. * We support symlinks for the "phar" executable. Closes: https://bugs.gentoo.org/692194 Closes: https://bugs.gentoo.org/709422 Closes: https://bugs.gentoo.org/707876 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> app-eselect/eselect-php/Manifest | 1 + app-eselect/eselect-php/eselect-php-0.9.6.ebuild | 33 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+) |