configure: Fix shell syntax to placate OpenBSD's pdksh
PATCH 1/1 configure: Fix shell syntax to placate OpenBSD's pdksh
Unfortunately the OpenBSD pdksh does not like brackets inside the right part of a ${variable+word} parameter expansion:
$ echo "${a+($b)}"
ksh: ${a+($b)}": bad substitutionthough both bash and dash accept them. In any case this line was causing odd output in the case where nettle is not present:
nettle no ()
(because if nettle is not present then $nettle will be "no", not a null string or unset).
Rewrite it to just use an if.
This bug was originally introduced in becaeb726 and was present in the 2.4.0 release.
---
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
@@ -4758,7 +4758,11 @@ echo "GTK GL support $gtk_gl" echo "GNUTLS support $gnutls" echo "GNUTLS hash $gnutls_hash" echo "libgcrypt $gcrypt" -echo "nettle $nettle ${nettle+($nettle_version)}" +if test "$nettle" = "yes"; then + echo "nettle $nettle ($nettle_version)" +else + echo "nettle $nettle" +fi echo "libtasn1 $tasn1" echo "VTE support $vte" echo "curses support $curses"
Signature · 1 line
1.9.1
Quoted 18 lines · Peter Maydell
Unfortunately the OpenBSD pdksh does not like brackets inside the right part of a ${variable+word} parameter expansion:
$ echo "${a+($b)}" ksh: ${a+($b)}": bad substitutionthough both bash and dash accept them. In any case this line was causing odd output in the case where nettle is not present:
nettle no ()(because if nettle is not present then $nettle will be "no", not a null string or unset).
Rewrite it to just use an if.
This bug was originally introduced in
becaeb726and was present in the 2.4.0 release.
Quoted 8 lines
Reported-by Dmitrij D. CzarkoffSigned-off-by Peter Maydell <[email protected]>---
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
Can OpenBSD users do:
/path/to/bash ./configure
to work around it?
That, and the fact that we went an entire release cycle without a report of a problem, means few developers are even attempting OpenBSD builds. So, I would argue that as a non-regression, and where there is a likely workaround of using a different shell, this can wait until 2.6.
Quoted 9 lines
configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)configure +0
-0
configure echo "GTK GL support $gtk_gl" · line 4765
Quoted 9 lines
configure +5
-1@@ -4758,7 +4758,11 @@ echo "GTK GL support $gtk_gl" echo "GNUTLS support $gnutls" echo "GNUTLS hash $gnutls_hash" echo "libgcrypt $gcrypt" -echo "nettle $nettle ${nettle+($nettle_version)}" +if test "$nettle" = "yes"; then + echo "nettle $nettle ($nettle_version)" +else + echo "nettle $nettle" +fi
At any rate,
Quoted 4 lines
configure +0
-0echo "libtasn1 $tasn1" echo "VTE support $vte" echo "curses support $curses"
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 18 lines · Peter Maydell
Unfortunately the OpenBSD pdksh does not like brackets inside the right part of a ${variable+word} parameter expansion:
$ echo "${a+($b)}" ksh: ${a+($b)}": bad substitutionthough both bash and dash accept them. In any case this line was causing odd output in the case where nettle is not present:
nettle no ()(because if nettle is not present then $nettle will be "no", not a null string or unset).
Rewrite it to just use an if.
This bug was originally introduced in
becaeb726and was present in the 2.4.0 release.
Quoted 8 lines
Reported-by Dmitrij D. CzarkoffSigned-off-by Peter Maydell <[email protected]>---
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
Harmless enough that it shouldn't warrant an extra rc.
Paolo
Quoted 21 lines
configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)configure +5
-1@@ -4758,7 +4758,11 @@ echo "GTK GL support $gtk_gl" echo "GNUTLS support $gnutls" echo "GNUTLS hash $gnutls_hash" echo "libgcrypt $gcrypt" -echo "nettle $nettle ${nettle+($nettle_version)}" +if test "$nettle" = "yes"; then + echo "nettle $nettle ($nettle_version)" +else + echo "nettle $nettle" +fi echo "libtasn1 $tasn1" echo "VTE support $vte" echo "curses support $curses"
Quoted 8 lines · Eric Blake
Quoted 4 lines · Peter Maydell
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
Can OpenBSD users do:
Quoted 8 lines
/path/to/bash ./configure
to work around it?
That, and the fact that we went an entire release cycle without a report of a problem, means few developers are even attempting OpenBSD builds. So, I would argue that as a non-regression, and where there is a likely workaround of using a different shell, this can wait until 2.6.
Mmm, I'm kind of leaning towards "don't put this in 2.5" as well.
thanks
-- PMM
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Eric Blake
Quoted 4 lines · Peter Maydell
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
Can OpenBSD users do:
/path/to/bash ./configure
Quoted 8 lines
Quoted 6 lines
to work around it?
That, and the fact that we went an entire release cycle without a report of a problem, means few developers are even attempting OpenBSD builds. So, I would argue that as a non-regression, and where there is a likely workaround of using a different shell, this can wait until 2.6.
Mmm, I'm kind of leaning towards "don't put this in 2.5" as well.
Add to http://qemu-project.org/ChangeLog/2.5#Known_issues and call it a day?
Am 14.12.2015 um 20:31 schrieb Markus Armbruster:
Quoted 5 lines
Peter Maydell <[email protected]> writes:
Mmm, I'm kind of leaning towards "don't put this in 2.5" as well. Add to http://qemu-project.org/ChangeLog/2.5#Known_issues and call it a day?
Good idea. Done.
Regards,
Stefan
Quoted 18 lines · Peter Maydell
Unfortunately the OpenBSD pdksh does not like brackets inside the right part of a ${variable+word} parameter expansion:
$ echo "${a+($b)}" ksh: ${a+($b)}": bad substitutionthough both bash and dash accept them. In any case this line was causing odd output in the case where nettle is not present:
nettle no ()(because if nettle is not present then $nettle will be "no", not a null string or unset).
Rewrite it to just use an if.
This bug was originally introduced in
becaeb726and was present in the 2.4.0 release.
Quoted 8 lines
Reported-by Dmitrij D. CzarkoffSigned-off-by Peter Maydell <[email protected]>---
This fixes a problem where configure just falls over on OpenBSD, but on the other hand it is not a regression since 2.4.0... Opinions on whether we should put it in 2.5 as a last minute thing welcome.
Now committed to master since we're post-2.5. I added a
Cc: [email protected]
too.
thanks
-- PMM