Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 762946 - net-misc/wget-1.21 configure error when /bin/sh != bash
Summary: net-misc/wget-1.21 configure error when /bin/sh != bash
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Keywords: PATCH
Depends on:
Blocks: nonbash
  Show dependency tree
Reported: 2021-01-01 18:07 UTC by Matt Whitlock
Modified: 2021-01-04 01:37 UTC (History)
2 users (show)

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

fix-configure-bashism.patch (fix-configure-bashism.patch,763 bytes, patch)
2021-01-01 18:07 UTC, Matt Whitlock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2021-01-01 18:07:02 UTC
Created attachment 680536 [details, diff]

wget's 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.


./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/ = 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):

commit 38e53c2df01940da65e045f5d6b2185b671f9eb0
Author:     Lars Wendler <>
AuthorDate: 2021-01-02 19:43:31 +0000
Commit:     Lars Wendler <>
CommitDate: 2021-01-02 19:45:56 +0000

    net-misc/wget: Don't use bashisms in configure
    Reported-by: Matt Whitlock <>
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Lars Wendler <>

 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(-)