[PATCH] make check_white_space fix for leap-seconds.list
* Makefile (check_white_space): Allow trailing white space in leap-seconds.list. This file is maintained by NIST, and the current version has trailing white space, and has a checksum making it inadvisable for us to remove the trailing white space in our copy. Also, coalesce two 'grep' calls into one, and check for weird white space characters anywhere, not just before line end. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9e8e468..2503463 100644 --- a/Makefile +++ b/Makefile @@ -484,9 +484,9 @@ check_character_set: $(ENCHILADA) ! grep -Env $(VALID_LINE) $(ENCHILADA) check_white_space: $(ENCHILADA) - ! grep -n ' '$(TAB_CHAR) $(ENCHILADA) - ! grep -n '[[:space:]]$$' $(ENCHILADA) - ! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA) + ! grep -En ' '$(TAB_CHAR)"|$$(printf '[\f\r\v]')" $(ENCHILADA) + ! grep -n '[[:space:]]$$' \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } -- 2.1.0
On 2015-01-28 17:58, Paul Eggert wrote:
* Makefile (check_white_space): Allow trailing white space in leap-seconds.list. This file is maintained by NIST, and the current version has trailing white space, and has a checksum making it inadvisable for us to remove the trailing white space in our copy.
The hash at the end of leapseconds.list depends only on the non-comment and special comment numeric digits, not regular comments or any non-digit characters. Removing trailing white space characters would affect agreement with the MD5 checksum in the md5checksum file, but MD5 has been deprecated since 1996 and SHA replacements recommended, as used in the end of file hash. -- Take care. Thanks, Brian Inglis
Brian Inglis wrote:
Removing trailing white space characters would affect agreement with the MD5 checksum in the md5checksum file, but MD5 has been deprecated since 1996 and SHA replacements recommended, as used in the end of file hash.
Thanks for the clarification. I imagine somebody somewhere will eventually compare the two copies, and if our copy differs even only by omitting trailing spaces this may cause hassles for them, so I'd rather keep the copies identical even if this complicates our 'make check' rules.
participants (2)
-
Brian Inglis -
Paul Eggert