Linux-base install bunch of scripts with #!/bin/bash shebang. That is obviously wrong. Port maintainer (emulation@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 Fix: Either: - shebang should be changed to ${LINUXBASE}/bin/bash (but that won't work in chroot) - the port should depend on native bash - shebang should be changed to #!/bin/sh if there are no compatibility problems How-To-Repeat: run /usr/compat/linux/usr/bin/ldd
Responsible Changed From-To: freebsd-ports-bugs->emulation Over to maintainer (via the GNATS Auto Assign Tool)
Responsible Changed From-To: emulation->freebsd-emulation Canonicalize assignment.
Yep, the first suggestion won't work at chroot. Your second workaround should be added with "... and create a link /usr/local/bin/bash -> /bin/bash". Not good either. The third one does not work. :-( The best I can advice here is to use linux interpreter at command line (so it won't be evaluated while running the script): ----- % /compat/linux/bin/sh /compat/linux/usr/bin/ldd /compat/linux/lib/libz.so.1 libc.so.6 => /lib/libc.so.6 (0x2bc39000) /lib/ld-linux.so.2 (0x00000000) ----- If anyone knows/suggests a better solution/patches -- I'm all ears. Thanks! -- WBR, bsam
* Boris Samorodov (bsam@ipt.ru) wrote: > If anyone knows/suggests a better solution/patches -- I'm all ears. /usr/bin/env bash, perhaps? -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
On Mon, 10 Aug 2009 18:51:22 +0400 Dmitry Marakasov wrote: > * Boris Samorodov (bsam@ipt.ru) wrote: > > If anyone knows/suggests a better solution/patches -- I'm all ears. > /usr/bin/env bash, perhaps? Whithout chroot the script will run as native FreeBSD script and won't look for linux paths. -- WBR, Boris Samorodov (bsam)
* Boris Samorodov (bsam@ipt.ru) wrote: > Whithout chroot the script will run as native FreeBSD script > and won't look for linux paths. Yes. Why is that bad? -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
On Mon, 10 Aug 2009 21:36:11 +0400 Dmitry Marakasov wrote: > * Boris Samorodov (bsam@ipt.ru) wrote: > > Whithout chroot the script will run as native FreeBSD script > > and won't look for linux paths. > Yes. Why is that bad? It just doesn't help! ;-) Well, at least not always. So it can't be a solution, just a new workaround. ----- % bash --version GNU bash, version 4.0.24(0)-release (i386-portbld-freebsd8.0) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. % ls file.1 file.2 % cat /compat/linux/usr/bin/test-ls #!/usr/bin/env bash listing=`dir $1` echo $listing % LANG=C /compat/linux/usr/bin/test-ls /compat/linux/usr/bin/test-ls: line 3: dir: command not found % /compat/linux/bin/bash /compat/linux/usr/bin/test-ls file.1 file.2 ----- -- WBR, bsam
did anybody ever try the patch enclosed in this PR ? http://www.freebsd.org/cgi/query-pr.cgi?pr=36952 does it fix the issue? cheers. alex
Responsible Changed From-To: freebsd-emulation->emulation Over to maintainer (via the GNATS Auto Assign Tool)
Responsible Changed From-To: emulation->freebsd-emulation Over to maintainer(s).
is this bug still relevant?