Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some bashisms from configure.ac #2607

Merged
merged 1 commit into from Jan 7, 2019

Conversation

@0mp
Copy link
Contributor

commented Dec 30, 2018

"configure.ac" is used to generate "configure", which is supposed to be
run with /bin/sh (as suggested by the shebang line of "configure"). As a
result it is a good idea to remove any /bin/sh-incompatible syntax from
configure.ac. Otherwise, systems that do not use Bash as their /bin/sh
are unable to run "configure" due to syntax errors.

"configure.ac" is used to generate "configure", which is supposed to be
run with /bin/sh (as suggested by the shebang line of "configure"). As a
result it is a good idea to remove any /bin/sh-incompatible syntax from
configure.ac. Otherwise, systems that do not use Bash as their /bin/sh
are unable to run "configure" due to syntax errors.
@0mp

This comment has been minimized.

Copy link
Contributor Author

commented Jan 2, 2019

Related to #2604.

@edolstra edolstra merged commit 2fadd30 into NixOS:master Jan 7, 2019
@0mp 0mp deleted the 0mp:configure.ac-fix branch Jan 8, 2019
@kirelagin

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

This line from configure.ac

    if printf '%s' "${name}" | egrep '^[_[:alpha:]][_[:alnum:]]*$'

ends up being

    if printf '%s' "${name}" | egrep '^_[:alpha:]_[:alnum:]*$'

in configure after running ./bootstrap.sh, which results in

  • grep: character class syntax is [[:space:]], not [:space:]
  • and, hm, I guess, in the end, it just does not what it was meant to.

I’m not sure how this even works 😕.

@0mp

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

Hmm, it looks like we have to escape [ and ] here (https://stackoverflow.com/a/2309394/4694621).

0mp added a commit to 0mp/nix that referenced this pull request Jan 9, 2019
This patch attempts to solve the regression introduced in e8b0efd
(NixOS#2607).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.