Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 676990 - www-servers/apache - /etc/conf.d/apache2: apache2ctl fails on multiline APACHE2_OPTS
Summary: www-servers/apache - /etc/conf.d/apache2: apache2ctl fails on multiline APACH...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-31 16:00 UTC by Jiří Vyskočil
Modified: 2019-02-26 16:02 UTC (History)
1 user (show)

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 Jiří Vyskočil 2019-01-31 16:00:49 UTC
My APACHE2_OPTS variable in /etc/conf.d/apache2 is fairly long so I used to have it split in multiple lines for better readability and maintenance like this (actually quite a bit longer...): 

APACHE2_OPTS="
 -D DEFLATE 
 -D EVASIVE 
 -D HTTP2 
 -D INFO 
 -D LANGUAGE  
 -D SSL 
 -D SSL_DEFAULT_VHOST 
 -D SOCACHE_SHMCB 
 -D STATUS
 -D PROXY 
 -D WSGI 
 -D XSENDFILE 
"

Today I noticed that this makes apache2ctl fail since it is unable to correctly parse the variable unless it's specified on a single line:

yggdrasill ~ # apache2ctl -v
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
/usr/sbin/apache2ctl: eval: line 11: unexpected EOF while looking for matching `"'
/usr/sbin/apache2ctl: eval: line 12: syntax error: unexpected end of file


It would be nice if apache2ctl were able to read the multiline variable (which is correctly evaluated when starting the init script)
Comment 1 Larry the Git Cow gentoo-dev 2019-02-26 15:42:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/apache.git/commit/?id=88b2946f6ef88c1f99ceb63775c0173935d34af5

commit 88b2946f6ef88c1f99ceb63775c0173935d34af5
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-02-26 15:38:15 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-02-26 15:39:19 +0000

    apache2ctl: don't fail with mutli-line APACHE2_OPTS in conf.d file.
    
    Bug: https://bugs.gentoo.org/676990
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 2.4/scripts/apache2ctl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2019-02-26 16:02:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98796e214835653ba469213bec73d31eb2ce5818

commit 98796e214835653ba469213bec73d31eb2ce5818
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-02-26 15:54:16 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-02-26 16:02:00 +0000

    www-servers/apache: Revbump to fix apache2ctl issues.
    
    Closes: https://bugs.gentoo.org/676990
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 www-servers/apache/Manifest                                         | 1 +
 .../apache/{apache-2.4.38.ebuild => apache-2.4.38-r1.ebuild}        | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)