ckolivas / lrzip

Long Range Zip
http://lrzip.kolivas.org
GNU General Public License v2.0
619 stars 76 forks source link

bashism in Makefile.am #257

Open eli-schwartz opened 1 day ago

eli-schwartz commented 1 day ago

https://github.com/ckolivas/lrzip/blob/15f5621928016eaf54c30356a68f68744f3c0104/lzma/C/Makefile.am#L47-L63

This uses echo -e which doesn't have predictable or reliable behavior e.g. when your /bin/sh is the dash shell rather than GNU Bash. The resulting libtool script ends up with an -e at the start of the file because -e isn't an option depending on the echo implementation.

There are some notes about reliability of the echo command at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html including a warning that for reliability and robustness reasons one should always prefer to use printf unless echoing a string that doesn't begin with a dash and which contains no escape sequences whatsoever.

See e.g. https://bugs.gentoo.org/923990