Since version 2.4.42 Apache has a module for better systemd support (see Link). But the module cannot be installed because it is missing in the USE flags for Apache. The ebuild should be adapted to allow the use of this module. Reproducible: Always
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49afd441bbb925e1e9bcd1c52c6757b33b560ec0 commit 49afd441bbb925e1e9bcd1c52c6757b33b560ec0 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2022-03-04 10:00:42 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-03-04 10:12:54 +0000 www-servers/apache: Add support for systemd module Removed old versions that would now break without systemd in IUSE. Bug: https://bugs.gentoo.org/834568 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> www-servers/apache/apache-2.4.51-r1.ebuild | 264 --------------------- www-servers/apache/apache-2.4.51-r2.ebuild | 8 +- www-servers/apache/apache-2.4.51.ebuild | 262 -------------------- ...pache-2.4.52.ebuild => apache-2.4.52-r1.ebuild} | 4 +- 4 files changed, 6 insertions(+), 532 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=412f32ed8c733160b3e22e146c3e399444c8bb2c commit 412f32ed8c733160b3e22e146c3e399444c8bb2c Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2022-03-04 09:53:10 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-03-04 10:12:54 +0000 apache-2.eclass: Add support for systemd module Bug: https://bugs.gentoo.org/834568 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> eclass/apache-2.eclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
I tested it and it worked for me. Thanks. The only thing that is suboptimal is that the service unit installed by the package is not customized. But you can adjust that yourself.
(In reply to Stefan Schmid from comment #2) > I tested it and it worked for me. > Thanks. > > The only thing that is suboptimal is that the service unit installed by the > package is not customized. But you can adjust that yourself. The problem is that I do not have a Gentoo installation with systemd for testing available right now. Do you mind attaching a patch that does what you need?
Oh and thanks for the quick testing and feedback :)
(In reply to Lars Wendler (Polynomial-C) from comment #3) > (In reply to Stefan Schmid from comment #2) > > I tested it and it worked for me. > > Thanks. > > > > The only thing that is suboptimal is that the service unit installed by the > > package is not customized. But you can adjust that yourself. > > The problem is that I do not have a Gentoo installation with systemd for > testing available right now. Do you mind attaching a patch that does what > you need? Difficult. I don't think the same service unit can work with both variants (with systemd support / without systemd support). It would probably have to be provided for each variant a separate service unit and installed to match the selected variant. Example: With systemd support, the "Type" option in the service unit changes to "notify".
Created attachment 766222 [details] Apache Service Unit with systemd support Just as an example, here is my service unit (NOTE: This will probably not work without systemd support).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0683c784f2928cc374803638c382821ad5fee14c commit 0683c784f2928cc374803638c382821ad5fee14c Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2022-03-04 11:22:14 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2022-03-04 11:22:34 +0000 www-servers/apache: Added missing systemd module defines Bug: https://bugs.gentoo.org/834568 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> www-servers/apache/apache-2.4.51-r2.ebuild | 1 + www-servers/apache/apache-2.4.52-r1.ebuild | 1 + 2 files changed, 2 insertions(+)
(In reply to Stefan Schmid from comment #5) > (In reply to Lars Wendler (Polynomial-C) from comment #3) > > (In reply to Stefan Schmid from comment #2) > > > I tested it and it worked for me. > > > Thanks. > > > > > > The only thing that is suboptimal is that the service unit installed by the > > > package is not customized. But you can adjust that yourself. > > > > The problem is that I do not have a Gentoo installation with systemd for > > testing available right now. Do you mind attaching a patch that does what > > you need? > > Difficult. > I don't think the same service unit can work with both variants (with > systemd support / without systemd support). It would probably have to be > provided for each variant a separate service unit and installed to match the > selected variant. > > Example: > With systemd support, the "Type" option in the service unit changes to > "notify". I suppose you mean the unit needs to be different depending on whether the systemd module is enabled or not in the apache config?
(In reply to Lars Wendler (Polynomial-C) from comment #8) > I suppose you mean the unit needs to be different depending on whether the > systemd module is enabled or not in the apache config? Yes, but I am pretty sure that the old service unit still works/starts when mod_systemd is enabled. The advantages provided by the module are then just not used.
Well, we could provide the unit file and make sure that USE="systemd" default-enables the systemd module.
*the new unit file