Source-Changes-HG archive

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

[src/trunk]: src/distrib more MKREPRO_TIMESTAMP fixes (for pax/tar generated ...



details:   https://anonhg.NetBSD.org/src/rev/103b1f9fcb48
branches:  trunk
changeset: 351364:103b1f9fcb48
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 11 03:07:06 2017 +0000

description:
more MKREPRO_TIMESTAMP fixes (for pax/tar generated files)

diffstat:

 distrib/amd64/uefi-installimage/Makefile.bootimage |   7 ++++---
 distrib/cdrom/Makefile                             |   9 +++++++--
 distrib/common/Makefile.bootcd                     |  15 +++++++++------
 distrib/common/Makefile.image                      |   5 +++--
 distrib/common/Makefile.tarfloppy                  |   4 ++--
 distrib/common/bootimage/Makefile.bootimage        |   8 +++++---
 distrib/common/buildfloppies.sh                    |   9 ++++++---
 distrib/evbarm/instkernel/sshramdisk/Makefile      |   9 +++++++--
 distrib/vax/floppy/Makefile                        |   9 +++++++--
 distrib/x68k/stand/Makefile                        |   9 +++++++--
 10 files changed, 57 insertions(+), 27 deletions(-)

diffs (truncated from 334 to 300 lines):

diff -r 49e38067540a -r 103b1f9fcb48 distrib/amd64/uefi-installimage/Makefile.bootimage
--- a/distrib/amd64/uefi-installimage/Makefile.bootimage        Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/amd64/uefi-installimage/Makefile.bootimage        Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootimage,v 1.3 2017/02/10 16:53:51 christos Exp $
+#      $NetBSD: Makefile.bootimage,v 1.4 2017/02/11 03:07:06 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -138,6 +138,7 @@
 
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
 .endif
 
 .if empty(IMGBASE)
@@ -260,7 +261,7 @@
                false;                                                  \
        fi
        @echo Extracting ${set}.tgz ...
-       @(cd ${WORKDIR}; ${TOOL_PAX} -rnz -f ${SETS_DIR}/${set}.tgz .)
+       @(cd ${WORKDIR}; ${TOOL_PAX} ${PAX_TIMESTAMP} -rnz -f ${SETS_DIR}/${set}.tgz .)
 .endfor
 .if defined(SECONDARY_BOOT)
        @echo Copying secondary boot...
@@ -303,7 +304,7 @@
        fi
        ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET}
        (cd ${_SRCDIR} ;                                                \
-           ${TOOL_PAX} -rw -pe -v                                      \
+           ${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pe -v                     \
            ${IMGDIR_EXCLUDE}                                           \
            . ${.OBJDIR}/${WORKDIR}/${_TARGET} )
 .endfor
diff -r 49e38067540a -r 103b1f9fcb48 distrib/cdrom/Makefile
--- a/distrib/cdrom/Makefile    Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/cdrom/Makefile    Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2014/03/31 11:25:47 martin Exp $
+# $NetBSD: Makefile,v 1.51 2017/02/11 03:07:06 christos Exp $
 #
 # Consult "*.conf" for the configuration variables; this Makefile is typically
 # not edited for basic configuration changes.
@@ -12,6 +12,10 @@
 .include "site.conf"
 .endif
 
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+.endif
+
 .if !defined(RELEASE)
 .BEGIN:
        @echo "Please set RELEASE in the environment or in site.conf to the basename"
@@ -377,7 +381,8 @@
                        cp `pwd -P`/${>:S/,link$//} $@;; \
                *.tgz,*) \
                        echo "Extracting: $> --> $@..."; \
-                       ${TOOL_PAX} -rnz -f ${>:C/,.*$//} ${>:C/^.*,//} ; \
+                       ${TOOL_PAX} ${PAX_TIMESTAMP} -rnz \
+                       -f ${>:C/,.*$//} ${>:C/^.*,//} ; \
                        cp ${>:C/^.*,//} $@; rm -rf ${>:C/^.*,//} ;; \
                *.gz) echo "gunzip -c <$> >$@"; gunzip -c <$> >$@;; \
                *) echo "Unknown archive method for $@"; false;; \
diff -r 49e38067540a -r 103b1f9fcb48 distrib/common/Makefile.bootcd
--- a/distrib/common/Makefile.bootcd    Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/common/Makefile.bootcd    Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootcd,v 1.36 2017/02/10 16:43:59 christos Exp $
+#      $NetBSD: Makefile.bootcd,v 1.37 2017/02/11 03:07:06 christos Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -76,6 +76,7 @@
 
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
 .endif
 
 .if ${MKUNPRIVED} == "no"
@@ -181,7 +182,7 @@
                release_destdir="${CUROBJDIR}/cdrom/${MACHINE}";        \
                cd ${RELEASEDIR}/${RELEASEMACHINEDIR};                  \
                echo Copying $$(pwd) to $$release_destdir ...;          \
-               ${TOOL_PAX}                                             \
+               ${TOOL_PAX} ${PAX_TIMESTAMP}                            \
                        -rw -pe ${PAX_v}                                \
                        ${CDRELEASE_EXCLUDE}                            \
                        . $$release_destdir;                            \
@@ -196,7 +197,7 @@
                release_destdir="${CUROBJDIR}/cdrom/source";            \
                cd ${RELEASEDIR}/source;                                \
                echo Copying $$(pwd) to $$release_destdir ...;          \
-               ${TOOL_PAX}                                             \
+               ${TOOL_PAX} ${PAX_TIMESTAMP}                            \
                        -rw -pe ${PAX_v}                                \
                        . $$release_destdir;                            \
                cd "${CUROBJDIR}";                                      \
@@ -207,7 +208,8 @@
                cd ${DESTDIR};                                          \
                for cde in ${CDRUNTIME};                                \
                do                                                      \
-                       ${TOOL_PAX} -rw -pp ${PAX_v} $${cde} $$release_destdir;\
+                       ${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pp ${PAX_v}   \
+                               $${cde} $$release_destdir;              \
                done;                                                   \
                cd "${CUROBJDIR}";                                      \
        fi
@@ -234,8 +236,9 @@
                                cd $${cde};                             \
                                echo Copying $$(pwd) to $$release_destdir ...;  \
                                ${TOOL_MTREE} -c $${skipflag} |         \
-                                       ${TOOL_PAX} -rw -pe ${PAX_v} -M \
-                                       $$release_destdir;              \
+                                       ${TOOL_PAX} ${PAX_TIMESTAMP}    \
+                                       -rw -pe ${PAX_v}                \
+                                       -M $$release_destdir;           \
                        else                                            \
                                echo "Missing $${cde}, aborting";       \
                                exit 1;                                 \
diff -r 49e38067540a -r 103b1f9fcb48 distrib/common/Makefile.image
--- a/distrib/common/Makefile.image     Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/common/Makefile.image     Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.image,v 1.39 2015/12/20 22:47:59 christos Exp $
+#      $NetBSD: Makefile.image,v 1.40 2017/02/11 03:07:06 christos Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -43,6 +43,7 @@
 
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
 .endif
 
 .if !target(${WORKBUILT})                                      # {
@@ -131,7 +132,7 @@
        ${_MKTARGET_CREATE}
        ( cd ${WORKDIR}; \
          GZIP=${GZIP_FLAGS:Q} \
-         ${TOOL_PAX} --use-compress-program=${TOOL_GZIP:Q} \
+         ${TOOL_PAX} ${PAX_TIMESTAMP} --use-compress-program=${TOOL_GZIP:Q} \
              -ON ${NETBSDSRCDIR}/etc -wdM <${.OBJDIR}/${WORKSPEC} \
        ) > ${.TARGET}.tmp \
        && mv ${.TARGET}.tmp ${.TARGET}
diff -r 49e38067540a -r 103b1f9fcb48 distrib/common/Makefile.tarfloppy
--- a/distrib/common/Makefile.tarfloppy Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/common/Makefile.tarfloppy Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.tarfloppy,v 1.18 2014/08/05 15:40:58 apb Exp $
+#      $NetBSD: Makefile.tarfloppy,v 1.19 2017/02/11 03:07:06 christos Exp $
 #
 # Makefile snippet to create a set of ustar floppies.
 # Each floppy has an 8KB header, followed by part or all of the ustar archive.
@@ -82,7 +82,7 @@
        PAX=${TOOL_PAX:Q} ${HOST_SH} ${DISTRIBDIR}/common/buildfloppies.sh \
            ${FLOPPYINSTBOOT:D-i ${FLOPPYINSTBOOT}} ${FLOPPYPAD:D-p} \
            ${FLOPPYMAX:D-m ${FLOPPYMAX}} ${FLOPPYSUFFIX:D-s ${FLOPPYSUFFIX}} \
-           -N ${DESTDIR}/etc \
+           ${MKREPRO_TIMESTAMP:D-t ${MKREPRO_TIMESTAMP}} -N ${DESTDIR}/etc \
            ${FLOPPYBASE} ${FLOPPYSIZE} ${FLOPPYFILES}
 
 CLEANFILES+=   ${FLOPPYBASE}?${FLOPPYSUFFIX}
diff -r 49e38067540a -r 103b1f9fcb48 distrib/common/bootimage/Makefile.bootimage
--- a/distrib/common/bootimage/Makefile.bootimage       Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/common/bootimage/Makefile.bootimage       Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootimage,v 1.14 2017/02/10 16:43:59 christos Exp $
+#      $NetBSD: Makefile.bootimage,v 1.15 2017/02/11 03:07:06 christos Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -129,6 +129,8 @@
 
 .if ${MKREPRO_TIMESTAMP:Uno} != "no"
 MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+.endif
 .endif
 
 .if empty(IMGBASE)
@@ -235,7 +237,7 @@
                false;                                                  \
        fi
        @echo Extracting ${set}.tgz ...
-       @(cd ${WORKDIR}; ${TOOL_PAX} -rnz -f ${SETS_DIR}/${set}.tgz .)
+       @(cd ${WORKDIR}; ${TOOL_PAX} ${PAX_TIMESTAMP} -rnz -f ${SETS_DIR}/${set}.tgz .)
 .endfor
 .if defined(SECONDARY_BOOT)
        @echo Copying secondary boot...
@@ -257,7 +259,7 @@
        fi
        ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET}
        (cd ${_SRCDIR} ;                                                \
-           ${TOOL_PAX} -rw -pe -v                                      \
+           ${TOOL_PAX} -rw -pe -v ${PAX_TIMESTAMP}                     \
            ${IMGDIR_EXCLUDE}                                           \
            . ${.OBJDIR}/${WORKDIR}/${_TARGET} )
 .endfor
diff -r 49e38067540a -r 103b1f9fcb48 distrib/common/buildfloppies.sh
--- a/distrib/common/buildfloppies.sh   Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/common/buildfloppies.sh   Sat Feb 11 03:07:06 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: buildfloppies.sh,v 1.17 2008/11/12 14:22:16 apb Exp $
+# $NetBSD: buildfloppies.sh,v 1.18 2017/02/11 03:07:06 christos Exp $
 #
 # Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -48,6 +48,7 @@
        -N etcdir       directory in which to find passwd and group files.
        -p              pad last floppy to floppy size
        -s suffix       suffix for floppies
+       -t timestamp    set timestamp for reproducible builds
        base            basename of generated floppies
        size            size of a floppy in 512 byte blocks
        file [...]      file(s) to store in the floppies
@@ -69,7 +70,7 @@
 #      parse and check arguments
 #
 
-while getopts i:m:N:ps: opt; do
+while getopts i:m:N:ps:t: opt; do
        case ${opt} in
        i)
                instboot=${OPTARG} ;;
@@ -81,6 +82,8 @@
                pad=1 ;;
        s)
                suffix=${OPTARG} ;;
+       t)
+               timestamp="--timestamp ${OPTARG}" ;;
        \?|*)
                usage
                ;;
@@ -109,7 +112,7 @@
                echo "./$f type=file uname=root gname=wheel mode=0444"
        done
 ) | \
-${PAX} -O -w -b8k -M -N "${etcdir}" -s,^./,, >> ${floppy} || exit 1
+${PAX} ${timestamp} -O -w -b8k -M -N "${etcdir}" -s,^./,, >> ${floppy} || exit 1
 
 #      install bootstrap before the image is split into multiple disks
 #
diff -r 49e38067540a -r 103b1f9fcb48 distrib/evbarm/instkernel/sshramdisk/Makefile
--- a/distrib/evbarm/instkernel/sshramdisk/Makefile     Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/evbarm/instkernel/sshramdisk/Makefile     Sat Feb 11 03:07:06 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2017/01/24 18:04:02 christos Exp $
+#      $NetBSD: Makefile,v 1.13 2017/02/11 03:07:06 christos Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -7,6 +7,11 @@
 IMAGESIZE=     20000k
 MAKEFS_FLAGS+= -f 15
 
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+.endif
+
 WARNS=         1
 DBG=           -Os
 
@@ -24,7 +29,7 @@
                ${NETBSDSRCDIR}/etc/group \
                ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
                ${DISTRIBDIR}/common/services
-IMAGEPREBUILD= ${TOOL_PAX} -rw -pp ${DESTDIR}/libdata/firmware ${WORKDIR}
+IMAGEPREBUILD= ${TOOL_PAX} ${PAX_TIMESTAMP{ -rw -pp ${DESTDIR}/libdata/firmware ${WORKDIR}
 
 # Use stubs to eliminate some large stuff from libc
 HACKSRC=       ${DISTRIBDIR}/utils/libhack
diff -r 49e38067540a -r 103b1f9fcb48 distrib/vax/floppy/Makefile
--- a/distrib/vax/floppy/Makefile       Fri Feb 10 23:26:23 2017 +0000
+++ b/distrib/vax/floppy/Makefile       Sat Feb 11 03:07:06 2017 +0000
@@ -1,10 +1,15 @@
-#      $NetBSD: Makefile,v 1.13 2008/06/23 02:16:54 matt Exp $
+#      $NetBSD: Makefile,v 1.14 2017/02/11 03:07:06 christos Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 .include <bsd.kernobj.mk>
 
+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
+PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
+.endif
+
 INSTKERNOBJ!=  cd ${.CURDIR}/../ramdisk-kernel && ${PRINTOBJDIR}
 
 IMAGE=         boot.fs
@@ -24,7 +29,7 @@
 



Home | Main Index | Thread Index | Old Index