Public bug reported: uutils tr rejects a "[c*]" repeat construct in SET2 when the repeated character is '-'. GNU tr accepts it. This makes basez fail to build from source in stonking.
== Reproducer == echo "Base Z" | tr -s '[:blank:]' '[-*]' GNU coreutils: prints "Base-Z" rust-coreutils 0.12.0-1ubuntu1 (from the build log below): tr: range-endpoints of '[-*' are in reverse collating sequence order In POSIX/GNU tr, "[c*]" in SET2 means "repeat c until SET2 is as long as SET1", so '[-*]' means "replace with '-'". uutils seems to parse "[-*" as a range from '[' to '*' before it recognises the repeat construct. uutils handles "[c*]" with ordinary characters, so the problem seems specific to '-' (and possibly other characters that are special in range syntax). Note: the uutils output above comes from the build log; this was not re- run directly against a uutils binary. == Impact == basez 1.6.2-3build1 fails to build on all architectures in stonking (and failed in resolute): https://launchpad.net/ubuntu/+source/basez/1.6.2-3build1/+build/32793382 Its configure script (line 27) does: PKGNAME=`echo "$APPNAME" |tr '[:upper:]' '[:lower:]' |tr -s '[:blank:]' '[-*]'` With uutils tr, PKGNAME ends up empty and the build stops: tr: range-endpoints of '[-*' are in reverse collating sequence order ... Makefile:35: *** PKGNAME is missing. Stop. The build environment has coreutils-from-uutils 2ubuntu1 and rust- coreutils 0.12.0-1ubuntu1. Debian (GNU coreutils) is not affected. Other packages that use '[-*]' (or similar repeats of a range-special character) in tr calls are likely affected too. == Workaround == In basez, replacing '[-*]' with '-' gives the same result with both implementations. The tr incompatibility should still be fixed in uutils; I did not find an existing upstream issue for it. ** Affects: basez (Ubuntu) Importance: Undecided Status: New ** Affects: rust-coreutils (Ubuntu) Importance: Undecided Status: New ** Tags: update-excuse ** Also affects: basez (Ubuntu) Importance: Undecided Status: New ** Tags added: update-excuse -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2169227 Title: tr: '[-*]' repeat construct in SET2 rejected as reversed range (breaks basez FTBFS) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/basez/+bug/2169227/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
