Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 762946

Summary: net-misc/wget-1.21 configure error when /bin/sh != bash
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, ionen
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://git.savannah.gnu.org/cgit/wget.git/commit/?id=1e89e5f66c3627aa86e7cbffd3789828ddb6eddb
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: fix-configure-bashism.patch

Description Matt Whitlock 2021-01-01 18:07:02 UTC
Created attachment 680536 [details, diff]
fix-configure-bashism.patch

wget's configure.ac contains a Bashism (use of == operator with test built-in). Thus, configure emits an error when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

AM_CONDITIONAL([WITH_NTLM], [test "X$ENABLE_NTLM" == "Xyes"])

./configure: 55928: test: Xno: unexpected operator

The attached patch removes the Bashism and allows net-misc/wget-1.21 to configure without error when /bin/sh is Dash.
Comment 1 Ionen Wolkens gentoo-dev 2021-01-01 19:05:02 UTC
Good to keep in mind but I believe it's benign for us, WITH_NTLM_TRUE/FALSE is (currently) only used for one thing:

fuzz/Makefile.in:@WITH_NTLM_TRUE@am__append_1 = wget_ntlm_fuzzer$(EXEEXT)

However, the ebuild does not --enable-fuzzing
Comment 2 Larry the Git Cow gentoo-dev 2021-01-02 19:46:58 UTC
The bug has been closed via the following commit(s):

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

commit 38e53c2df01940da65e045f5d6b2185b671f9eb0
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-01-02 19:43:31 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-01-02 19:45:56 +0000

    net-misc/wget: Don't use bashisms in configure
    
    Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
    Closes: https://bugs.gentoo.org/762946
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 net-misc/wget/files/wget-1.21-avoid_bashisms.patch | 26 ++++++++++++++++++++++
 .../wget/files/wget-1.21-avoid_eautoreconf.patch   | 11 +++++++++
 net-misc/wget/wget-1.21-r1.ebuild                  |  4 +++-
 3 files changed, 40 insertions(+), 1 deletion(-)