Source-Changes-HG archive

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

[src/trunk]: src/etc Freeze the BUILDER and the BUILD_DATE for repeatable builds



details:   https://anonhg.NetBSD.org/src/rev/3905f70aa826
branches:  trunk
changeset: 342391:3905f70aa826
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 19 23:37:43 2015 +0000

description:
Freeze the BUILDER and the BUILD_DATE for repeatable builds

diffstat:

 etc/Makefile |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 5c2b85d6f2d5 -r 3905f70aa826 etc/Makefile
--- a/etc/Makefile      Sat Dec 19 22:29:23 2015 +0000
+++ b/etc/Makefile      Sat Dec 19 23:37:43 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.424 2015/08/31 06:08:07 uebayasi Exp $
+#      $NetBSD: Makefile,v 1.425 2015/12/19 23:37:43 christos Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -185,6 +185,17 @@
            > ${.TARGET}
 
 .include "${NETBSDSRCDIR}/etc/Makefile.params"
+.if ${MKREPRO:Uno} == "no"
+BUILDER!=      echo $${USER-root}@$$(hostname)
+.else
+BUILDER=       builder%localhost.NetBSD.org@localhost
+.endif
+.if ${MKREPRO_TIMESTAMP:Uno} == "no"
+BUILD_DATE!=   date -u
+.else
+BUILD_DATE!=   date -u -r "${MKREPRO_TIMESTAMP}"
+.endif
+
 CLEANFILES+=   etc-release
 etc-release: .EXEC .MAKE
        ${_MKTARGET_CREATE}
@@ -193,8 +204,8 @@
                cat ${NETBSDSRCDIR}/sys/conf/copyright; \
                echo ; \
                echo "Build information:"; \
-               printf "%20s   %s\n" "Build date" "$$(date -u)"; \
-               printf "%20s   %s\n"  "Built by" "$${USER-root}@$$(hostname)"; \
+               printf "%20s   %s\n" "Build date" "${BUILD_DATE}"; \
+               printf "%20s   %s\n"  "Built by" "${BUILDER}"; \
                if [ -n "${BUILDID}" ]; then \
                    printf "%20s   %s\n"  "Build ID" "${BUILDID}" ; \
                fi ; \



Home | Main Index | Thread Index | Old Index