bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28317: Non-portable sh script - $RANDOM


From: Neven Sajko
Subject: bug#28317: Non-portable sh script - $RANDOM
Date: Fri, 1 Sep 2017 14:17:38 +0200

automake version 1.15.1, also in latest git master.

See

https://git.savannah.gnu.org/cgit/automake.git/tree/lib/install-sh#n327

The RANDOM variable giving pseudo-random numbers is not a POSIX sh
feature. Dash, for example, does not implement it.

So line 327 is probably wrong.

Maybe this would work instead:

random=`dd 'if=/dev/urandom' 'count=1' 'bs=256' 2>/dev/null | cksum | sed "$r"`\
`date -u | cksum | sed "$r"`

If this fix is correct, maybe you would also like to update
https://git.savannah.gnu.org/cgit/automake.git/tree/lib/config.guess#n104


Regards





reply via email to

[Prev in Thread] Current Thread [Next in Thread]