Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723092 - dev-util/oprofile-1.3.0 configure errors when /bin/sh != bash
Summary: dev-util/oprofile-1.3.0 configure errors 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: Andrew Savchenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2020-05-14 19:13 UTC by Matt Whitlock
Modified: 2020-08-30 13:05 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 Matt Whitlock 2020-05-14 19:13:51 UTC
oprofile's configure.ac contains Bashisms (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.

elif test "`getent passwd oprofile 2>/dev/null`" == "" || \
     test "`getent group oprofile 2>/dev/null`" == ""; then

./configure: 22444: test: oprofile:x:105:989:added by portage for oprofile:/dev/null:/sbin/nologin: unexpected operator
./configure: 22445: test: oprofile:x:989:: unexpected operator

Suggest setting CONFIG_SHELL=/bin/bash when running configure. The "unexpected operator" messages above are not present when CONFIG_SHELL=/bin/bash.
Comment 1 Andrew Savchenko gentoo-dev 2020-05-15 18:36:13 UTC
I'll look into this, but this is extremely strange: on my systems I use dash as /bin/sh for many years now and had no such problems.

What is you shell?
Comment 2 Matt Whitlock 2020-05-15 18:40:09 UTC
(In reply to Andrew Savchenko from comment #1)
> I'll look into this, but this is extremely strange: on my systems I use dash
> as /bin/sh for many years now and had no such problems.
> 
> What is you shell?

I use Dash as /bin/sh too.

Dash in Gentoo was only recently unbroken so that Autoconf now uses it by default (unless CONFIG_SHELL is set):

https://github.com/gentoo/gentoo/commit/808dded4f103becf7929562b1ed58046aa63f3f6#diff-1950efa4b44082ca7e999f49425833d5
Comment 3 Larry the Git Cow gentoo-dev 2020-08-30 13:05:18 UTC
The bug has been closed via the following commit(s):

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

commit d9f840af70f1d562cb326d3829861c1be64aa761
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2020-08-30 13:01:42 +0000
Commit:     Andrew Savchenko <bircoph@gentoo.org>
CommitDate: 2020-08-30 13:05:04 +0000

    dev-util/oprofile: version bump
    
    - Update to 1.4.0
    - Migrate to GLEP 81
    - Add support for doxygen docs build via USE=apidoc
    - Remove bash-specific operators from configure
    - Add USE="static-libs" to control *.a and *.la installation
    
    Closes: https://bugs.gentoo.org/730716
    Closes: https://bugs.gentoo.org/723092
    Package-Manager: Portage-3.0.3, Repoman-3.0.0
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>

 dev-util/oprofile/Manifest              |  1 +
 dev-util/oprofile/metadata.xml          |  3 ++
 dev-util/oprofile/oprofile-1.4.0.ebuild | 87 +++++++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+)