[PATCH] busybox: tr: enable options required by POSIX
Petr Štetiar
ynezz at true.cz
Tue Jul 14 05:04:16 EDT 2020
Jordan Geoghegan <jordan at geoghegan.ca> [2020-07-13 22:44:05]:
> scripts/mkits.sh
> 59:ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
What's a problem here? It's running on host, so this classes are supported.
> ryzen$ rg "tr '\["
> utils/lxc/patches/010-Remove-distro-check.patch
> 43:-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
Upstream issue, it's removed, so not actually used, but still host related.
Should be fixed upstream anyway not OpenWrt related. Unlikely that this value
would ever contain square brackets.
> sound/shairport-sync/patches/010-no-cxx.patch
> 28:@@ -19,7 +19,6 @@ with_os=`echo ${with_os} | tr '[[:upper:]]'
> '[[:lower:]]' `
Upstream issue, this is context in the patch not added by OpenWrt, running on
host. Unlikely that this value would ever contain square brackets.
> utils/pciutils/patches/105-fix-host.patch
> 7:-host=`echo $HOST | sed -e
> 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e
> 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\2/' -e
> 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
> 8:+host=`echo $HOST | sed -e
> 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e
> 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
Upstream even provided you the comment few lines above:
# CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
> net/ser2net/files/ser2net.init
> 28: [ "$uc" -eq 1 ] && key=`echo "$key" | tr '[a-z]' '[A-Z]'`
> 120: parity=`echo "$parity" | tr '[a-z]' '[A-Z]'`
If you look at the context, not an issue. Those values would never contain
square brackets. Anyway feel free to submit PR with a square brackets removal.
So actually no issues.
-- ynezz
More information about the openwrt-devel
mailing list