Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920346 - net-print/cups-filters-2.0.0: configure error when /bin/sh != bash
Summary: net-print/cups-filters-2.0.0: configure error when /bin/sh != bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2023-12-20 02:42 UTC by Matt Whitlock
Modified: 2024-04-08 16:34 UTC (History)
1 user (show)

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


Attachments
cups-filters-configure-remove-bashism.patch (cups-filters-configure-remove-bashism.patch,827 bytes, patch)
2023-12-20 02:42 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 2023-12-20 02:42:54 UTC
Created attachment 880021 [details, diff]
cups-filters-configure-remove-bashism.patch

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

./configure: 17209: test: x/usr/bin/gs: unexpected operator

This error is due to this Bashism in configure.ac:

AS_IF([test "x$CUPS_GHOSTSCRIPT" == "x" -a "x$CUPS_PDFTOPS" == "x"], [
    enable_universal_cups_filter=no
])

The attached patch corrects the Bashism and allows net-print/cups-filters-2.0.0 to configure without error.
Comment 1 Eli Schwartz 2023-12-20 03:17:16 UTC
Hmm, this makes me realize my test container doesn't have dash as /bin/sh! My main machine does...

I've submitted a PR with the obvious fix upstream (probably the same as your patch but I didn't check).
Comment 2 Larry the Git Cow gentoo-dev 2024-04-08 16:34:32 UTC
The bug has been closed via the following commit(s):

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

commit 0ba8517af025fc9e8170ad5aeb1a196f11280a4f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-08 16:28:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-08 16:34:19 +0000

    net-print/cups-filters: add bash workaround for now
    
    Closes: https://bugs.gentoo.org/920346
    Signed-off-by: Sam James <sam@gentoo.org>

 .../cups-filters/cups-filters-2.0.0-r1.ebuild      | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)