Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650678 - www-servers/apache-2.4.32 - /usr/sbin/apache2ctl: line 20: [: =~: binary operator expected
Summary: www-servers/apache-2.4.32 - /usr/sbin/apache2ctl: line 20: [: =~: binary oper...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-17 05:43 UTC by Josh G
Modified: 2018-03-23 17:49 UTC (History)
0 users

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 Josh G 2018-03-17 05:43:10 UTC
There's an error in the apache-2.4.32 /usr/sbin/apache2ctl shell script. The if statement on line 20 is broken

Current: if [ "${RC_VERBS}" =~ "${1}" ] ; then

Fixed version: if [[ "${RC_VERBS}" =~ "${1}" ]] ; then


Reproducible: Always

Steps to Reproduce:
1.apache2ctl reload
2.
3.
Actual Results:  
/usr/sbin/apache2ctl: line 20: [: =~: binary operator expected


Expected Results:  
Shell script errored out

It should have reloaded the apache config and done a gentle restart of the web server.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-03-23 16:15:21 UTC
(In reply to Josh G from comment #0)
> There's an error in the apache-2.4.32 /usr/sbin/apache2ctl shell script. The
> if statement on line 20 is broken
> 
> Current: if [ "${RC_VERBS}" =~ "${1}" ] ; then
> 
> Fixed version: if [[ "${RC_VERBS}" =~ "${1}" ]] ; then
> 

No this is as broken as the current implementation for POSIX shells. I am working on a better fix...
Comment 2 Larry the Git Cow gentoo-dev 2018-03-23 16:32:43 UTC
The bug has been closed via the following commit(s):

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

commit d843c623b4d478dc4c78cd9c1a47bd67a4b1bcfd
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-03-23 16:32:04 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-03-23 16:32:34 +0000

    www-servers/apache: Bump to version 2.4.33. Removed old.
    
    Changes/Enhancements:
    - Start apache daemon after entropy daemon if available (#470018)
    - Fixed "bashism" in apache2ctl file (#650678)
    
    Closes: https://bugs.gentoo.org/470018
    Closes: https://bugs.gentoo.org/650678
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 www-servers/apache/Manifest                                       | 4 ++--
 www-servers/apache/{apache-2.4.32.ebuild => apache-2.4.33.ebuild} | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 3 Josh G 2018-03-23 17:49:31 UTC
Thanks for fixing it Lars! I appreciate you.