-
Notifications
You must be signed in to change notification settings - Fork 34
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 "bashish" code from our packages #715
Comments
The syntax "[[" is also a bash-extension (https://stackoverflow.com/questions/669452/is-double-square-brackets-preferable-over-single-square-brackets-in-ba) not supported in ash. So scripts using this syntax will not work as expected. works in BASH:
fails in Busybox/ASH:
|
"[[" is a bash-extension to POSIX not fully supported by ash. See issue freifunk-berlin/firmware#715.
PR openwrt/openwrt#2647 tries to remove some bashism in OpenWrt |
The reason for this issue remains open is the unmerged upstream commit to OpenWRT, right? |
Most of the referenced upstream commits have been merged already on 2020-01-26. The last one I just checked and resubmitted again. I assume it will be merged soon. But I think our repo still contains the bashism ... |
I did some grep-stuff on recent checkouts of the firmware and the firmware-packages-repo. There where matches in the packages repo only:
In the firmware-repo matches only did happen in patch files. But i assume, that they are fine, as the build environment uses bash, right? |
Correct host-commands of the build-scripts are executed by the host-bash. But the packages-code will run on the OpenWrt-Router with ash. |
The recent changes of the migration-code added some bashism to it, e.g. freifunk-berlin/firmware-packages@7fcc523#diff-9dd2e51c1a5b793cf384a31152376f36R403 .
We are using busybox-ash, which officially don't support "==" syntax, see expr-section of https://busybox.net/downloads/BusyBox.html. This should be changed to correct syntax, as was also done for OpenWrt once (openwrt/openwrt@d6ac8ca)
The text was updated successfully, but these errors were encountered: