mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
Record TIMESTAMP in make makesum
This is intended to support development and prototyping for ports reproducible build efforts which require some concept of a "last updated" time. It is being committed now so that timestamp entries will be populated "for free" as port distfiles updates happen. Submitted by: bapt (earlier version) Reviewed by: bapt, bdrewery Approved by: portmgr (bdrewery) Differential Revision: https://reviews.freebsd.org/D6031
This commit is contained in:
parent
2d1da0076f
commit
7fea5824d6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415078
10
CHANGES
10
CHANGES
@ -22,6 +22,16 @@ AUTHOR: mat@FreeBSD.org
|
||||
|
||||
WANT_BDB_VER=XX should be replaced by USES=bdb:XX.
|
||||
|
||||
20160512:
|
||||
AUTHOR: emaste@FreeBSD.org
|
||||
|
||||
"make makesum" now writes the current timestamp to distinfo when it is run.
|
||||
This is done to support development and prototyping efforts for reproducible
|
||||
package builds, which require some concept of a "last updated" time.
|
||||
|
||||
The TIMESTAMP can currently be ignored for ports that have no distinfo, and
|
||||
for updates done without using "make makesum."
|
||||
|
||||
20160414:
|
||||
AUTHOR: mat@FreeBSD.org
|
||||
|
||||
|
@ -4161,7 +4161,11 @@ checksum_init=\
|
||||
makesum: check-checksum-algorithms
|
||||
@cd ${.CURDIR} && ${MAKE} fetch NO_CHECKSUM=yes \
|
||||
DISABLE_SIZE=yes
|
||||
@if [ -f ${DISTINFO_FILE} ]; then ${CAT} /dev/null > ${DISTINFO_FILE}; fi
|
||||
@if [ -f ${DISTINFO_FILE} ]; then \
|
||||
if ${GREP} -q "^TIMESTAMP " ${DISTINFO_FILE}; then \
|
||||
${GREP} -v "^TIMESTAMP " ${DISTINFO_FILE} > ${DISTINFO_FILE}.sav; \
|
||||
fi; \
|
||||
fi
|
||||
@( \
|
||||
cd ${DISTDIR}; \
|
||||
\
|
||||
@ -4172,11 +4176,16 @@ makesum: check-checksum-algorithms
|
||||
eval alg_executable=\$$$$alg; \
|
||||
\
|
||||
if [ $$alg_executable != "NO" ]; then \
|
||||
$$alg_executable $$file >> ${DISTINFO_FILE}; \
|
||||
$$alg_executable $$file >> ${DISTINFO_FILE}.new; \
|
||||
fi; \
|
||||
done; \
|
||||
${ECHO_CMD} "SIZE ($$file) = `${STAT} -f \"%z\" $$file`" >> ${DISTINFO_FILE}; \
|
||||
done \
|
||||
${ECHO_CMD} "SIZE ($$file) = `${STAT} -f \"%z\" $$file`" >> ${DISTINFO_FILE}.new; \
|
||||
done; \
|
||||
if [ ! -f ${DISTINFO_FILE}.sav ] || ! cmp -s ${DISTINFO_FILE}.sav ${DISTINFO_FILE}.new; then \
|
||||
${ECHO_CMD} "TIMESTAMP = `date '+%s'`" > ${DISTINFO_FILE} ; \
|
||||
${CAT} ${DISTINFO_FILE}.new >> ${DISTINFO_FILE} ; \
|
||||
fi ; \
|
||||
rm -f ${DISTINFO_FILE}.new ${DISTINFO_FILE}.sav ; \
|
||||
)
|
||||
.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user