FS#38951 - [xmlto] shebang reads /bin/sh but uses bashisms
Attached to Project:
Arch Linux
Opened by Eric Mrak (sxtynnmach1) - Tuesday, 18 February 2014, 01:25 GMT
Last edited by Jan de Groot (JGC) - Thursday, 20 February 2014, 12:55 GMT
Opened by Eric Mrak (sxtynnmach1) - Tuesday, 18 February 2014, 01:25 GMT
Last edited by Jan de Groot (JGC) - Thursday, 20 February 2014, 12:55 GMT
|
Details
Description:
The executable /usr/bin/xmlto references #!/bin/sh as the interpreter, but uses bashisms. Additional info: * version 0.0.25-3 Log output: /usr/bin/xmlto: 582: [: 0: unexpected operator /usr/bin/xmlto: 1: /usr/bin/xmlto: Bad substitution /usr/bin/xmlto: 115: /usr/bin/xmlto: declare: not found /usr/bin/xmlto: 119: /usr/bin/xmlto: declare: not found /usr/bin/xmlto: 1: eval: CLEANFILES[0]=/tmp/xmlto-xsl.VEJiJ4: not found /usr/bin/xmlto: 1: eval: CLEANFILES[1]=/tmp/xmlto-xsl.IJpD9A: not found /usr/bin/xmlto: 201: /usr/bin/xmlto: XSL_MODS[0]=/tmp/xmlto-xsl.IJpD9A: not found /usr/bin/xmlto: 1: eval: CLEANFILES[2]=/tmp/xmlto-xsl.KFHlMx: not found /usr/bin/xmlto: 507: /usr/bin/xmlto: Bad substitution /usr/bin/xmlto: 1: eval: CLEANFILES[3]=/tmp/xmlto.wnHfWz: not found /usr/bin/xmlto: 582: [: 0: unexpected operator Steps to reproduce: 1. symlink /bin/sh -> /usr/bin/dash 2. Try to build xdg-utils-mimeo from AUR 3. Installation fails ("declare" not found, unexpected operators, etc) 4. Edit /usr/bin/xmlto to have #!/bin/bash (or #!/usr/bin/bash) as line 1 5. Try to install xdg-utils-mimeo again. 6. Installation succeeds When /bin/sh is symlinked to a non-bash compliant shell, xmlto will error out. Proposed solution: * specify #!/bin/bash or #!/usr/bin/bash as the interpreter in the xmlto executable |
This task depends upon
Closed by Jan de Groot (JGC)
Thursday, 20 February 2014, 12:55 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed now (you could verify this by looking at 1st line of /usr/bin/xmlto in the package)
Thursday, 20 February 2014, 12:55 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed now (you could verify this by looking at 1st line of /usr/bin/xmlto in the package)
https://fedorahosted.org/xmlto/browser/configure.in
It seems on arch systems it determines that bash is /bin/sh, but on user's systems with /bin/sh symlinked to dash (or other) the binary package's executable doesn't run.
I prepended BASH=/bin/bash to the configure line in the attached PKGBUILD
I have verified that the new fix works on default Arch installs as well as those with a different symlink from /bin/sh
The correct line should be:
./configure BASH=/bin/bash --prefix=/usr --mandir=/usr/share/man
This should save the configured variable reliably
Please, let me know if it is ok now.