PR/50360: Thomas Klausner: if MKREPRO is set, provide a consistent timestamp

for the files in the cdroms to be built. For now we copy the timestamp of
<sys/param.h>. We could set an absolute timestamp too like -T 0 for the epoch.
This commit is contained in:
christos 2015-11-25 00:50:57 +00:00
parent 799916c021
commit f7d3cc6004
2 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.bootcd,v 1.32 2015/05/29 06:28:50 martin Exp $
# $NetBSD: Makefile.bootcd,v 1.33 2015/11/25 00:50:57 christos Exp $
#
# Makefile snipped to create a CD/DVD ISO
#
@ -74,6 +74,10 @@ _CDMAKEFSOPTIONS= rockridge,label=${ISO_VOLID},publisher=${PUBLISHER},${CDMAKEFS
_CDMAKEFSOPTIONS= rockridge,label=${ISO_VOLID},publisher=${PUBLISHER}
.endif
.if ${MKREPRO:Uno} == "yes"
TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
.endif
.if ${MKUNPRIVED} == "no"
CD_METALOG.unpriv=
mtunpriv=
@ -281,7 +285,7 @@ image:
.endif
if [ -s ${WORKSPEC} ]; then specarg="-F ${WORKSPEC}"; fi; \
${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg} \
${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
${TIMESTAMP} ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
.if ${CDRELEASE} == false
release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.bootimage,v 1.11 2015/05/08 17:46:03 riastradh Exp $
# $NetBSD: Makefile.bootimage,v 1.12 2015/11/25 00:50:57 christos Exp $
#
# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved.
#
@ -127,6 +127,10 @@
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
.if ${MKREPRO:Uno} == "yes"
TIMESTAMP=-T ${NETBSDSRCDIR}/sys/sys/param.h
.endif
.if empty(IMGBASE)
.BEGIN:
@echo "Error: IMGBASE is not set"
@ -292,6 +296,7 @@ ${TARGETFS}: prepare_md_post
${TOOL_MAKEFS} -M ${FSSIZE} -m ${FSSIZE} \
-B ${TARGET_ENDIANNESS} \
-F ${WORKSPEC} -N ${WORKDIR}/etc \
${TIMESTAMP} \
${IMGMAKEFSOPTIONS} \
${WORKFS} ${WORKDIR}
.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"