Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834568 - >=www-servers/apache-2.4.42: please add systemd-Module to ebuild
Summary: >=www-servers/apache-2.4.42: please add systemd-Module to ebuild
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Apache Team - Bugzilla Reports
URL: https://httpd.apache.org/docs/current...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-04 08:54 UTC by Stefan Schmid
Modified: 2022-03-04 11:44 UTC (History)
0 users

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


Attachments
Apache Service Unit with systemd support (apache2.service,631 bytes, text/plain)
2022-03-04 11:06 UTC, Stefan Schmid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schmid 2022-03-04 08:54:12 UTC
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
Comment 1 Larry the Git Cow gentoo-dev 2022-03-04 10:13:04 UTC
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(-)
Comment 2 Stefan Schmid 2022-03-04 10:37:10 UTC
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.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-04 10:38:45 UTC
(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?
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-04 10:39:05 UTC
Oh and thanks for the quick testing and feedback :)
Comment 5 Stefan Schmid 2022-03-04 10:49:50 UTC
(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".
Comment 6 Stefan Schmid 2022-03-04 11:06:30 UTC
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).
Comment 7 Larry the Git Cow gentoo-dev 2022-03-04 11:22:42 UTC
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(+)
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-04 11:23:11 UTC
(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?
Comment 9 Stefan Schmid 2022-03-04 11:31:55 UTC
(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.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-04 11:43:59 UTC
Well, we could provide the unit file and make sure that USE="systemd" default-enables the systemd module.
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-03-04 11:44:24 UTC
*the new unit file