Avoid find -s, use find | sort instead.

find -s was introduced to make the metalog more
deterministic. However, find -s is not portable. find | sort is
portable and accomplishes the same goals, even if it isn't
pedantically the same. TZS is the same before / after the change so
any fussy differences between the two are moot and there won't be
METALOG churn across this change.

Differential Revision: https://reviews.freebsd.org/D14231
This commit is contained in:
Warner Losh 2018-02-06 23:12:16 +00:00
parent 7cbd6d338e
commit 3182fd63c4

View File

@ -95,8 +95,13 @@ zoneinfo: yearistype ${TDATA}
zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
#
# Sort TZS to ensure they are the same every build. find -s might
# be a shorter way to express this, but it's non-portable. Any
# differences between the two don't matter for this purpose.
#
.if make(*install*)
TZS!= cd ${TZBUILDDIR} && find -s * -type f
TZS!= cd ${TZBUILDDIR} && find * -type f | env LC_ALL=C sort
.endif
beforeinstall: install-zoneinfo