Merge pull request #8136 from bmwiedemann/date
configury: make build reproducible
Этот коммит содержится в:
Коммит
00ccc9d936
16
README
16
README
@ -197,12 +197,16 @@ General notes
|
||||
|
||||
- Open MPI has taken some steps towards Reproducible Builds
|
||||
(https://reproducible-builds.org/). Specifically, Open MPI's
|
||||
"configure" and "make" process, by default, records some
|
||||
system-specific information such as the hostname where Open MPI was
|
||||
built and the username who built it. If you desire a Reproducible
|
||||
Build, set the $USER and $HOSTNAME environment variables before
|
||||
invoking "configure" and "make", and Open MPI will use those values
|
||||
instead of invoking "whoami" and/or "hostname", respectively.
|
||||
"configure" and "make" process, by default, records the build date
|
||||
and some system-specific information such as the hostname where Open
|
||||
MPI was built and the username who built it. If you desire a
|
||||
Reproducible Build, set the $SOURCE_DATE_EPOCH, $USER and $HOSTNAME
|
||||
environment variables before invoking "configure" and "make", and
|
||||
Open MPI will use those values instead of invoking "whoami" and/or
|
||||
"hostname", respectively. See
|
||||
https://reproducible-builds.org/docs/source-date-epoch/ for
|
||||
information on the expected format and content of the
|
||||
$SOURCE_DATE_EPOCH variable.
|
||||
|
||||
Platform Notes
|
||||
--------------
|
||||
|
@ -1209,7 +1209,7 @@ $dnl_line
|
||||
dnl This file is automatically created by autogen.pl; it should not
|
||||
dnl be edited by hand!!
|
||||
dnl
|
||||
dnl Generated by $username at " . localtime(time) . "
|
||||
dnl Generated by $username at " . localtime($ENV{SOURCE_DATE_EPOCH} || time) . "
|
||||
dnl on $full_hostname.
|
||||
$dnl_line\n\n";
|
||||
|
||||
|
10
config/getdate.sh
Исполняемый файл
10
config/getdate.sh
Исполняемый файл
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2017 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
|
||||
|
||||
# Provide a way to override build date for reproducible build results
|
||||
# See https://reproducible-builds.org/ for why this is good.
|
||||
|
||||
date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "$@"
|
@ -96,7 +96,7 @@ EOF
|
||||
|
||||
OPAL_CONFIGURE_USER="${USER:-`whoami`}"
|
||||
OPAL_CONFIGURE_HOST="${HOSTNAME:-`(hostname || uname -n) 2> /dev/null | sed 1q`}"
|
||||
OPAL_CONFIGURE_DATE="`date`"
|
||||
OPAL_CONFIGURE_DATE="`$srcdir/config/getdate.sh`"
|
||||
|
||||
OPAL_LIBNL_SANITY_INIT
|
||||
|
||||
@ -112,14 +112,6 @@ dnl #######################################################################
|
||||
dnl #######################################################################
|
||||
|
||||
AC_DEFUN([OPAL_BASIC_SETUP],[
|
||||
#
|
||||
# Save some stats about this build
|
||||
#
|
||||
|
||||
OPAL_CONFIGURE_USER="${USER:-`whoami`}"
|
||||
OPAL_CONFIGURE_HOST="${HOSTNAME:-`(hostname || uname -n) 2> /dev/null | sed 1q`}"
|
||||
OPAL_CONFIGURE_DATE="`date`"
|
||||
|
||||
#
|
||||
# Make automake clean emacs ~ files for "make clean"
|
||||
#
|
||||
|
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2020 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
@ -91,7 +91,7 @@ m4_define([OPAL_GET_VERSION],[
|
||||
$2_REPO_REV=`git describe --tags --always`
|
||||
fi
|
||||
else
|
||||
$2_REPO_REV="date`date '+%Y-%m-%d'`"
|
||||
$2_REPO_REV=date`$srcdir/getdate.sh '+%Y-%m-%d'`
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -34,7 +34,7 @@ AM_CFLAGS = \
|
||||
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
|
||||
-DOMPI_BUILD_USER="\"$$USER\"" \
|
||||
-DOMPI_BUILD_HOST="\"`(hostname || uname -n) | sed 1q`\"" \
|
||||
-DOMPI_BUILD_DATE="\"`date`\"" \
|
||||
-DOMPI_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
|
||||
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
|
||||
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
|
||||
-DOMPI_BUILD_CXXFLAGS="\"@CXXFLAGS@\"" \
|
||||
|
@ -30,7 +30,7 @@ AM_CFLAGS = \
|
||||
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
|
||||
-DOMPI_BUILD_USER="\"$$USER\"" \
|
||||
-DOMPI_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) 2> /dev/null | sed 1q`}\"" \
|
||||
-DOMPI_BUILD_DATE="\"`date`\"" \
|
||||
-DOMPI_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
|
||||
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
|
||||
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
|
||||
-DOMPI_BUILD_CXXFLAGS="\"@CXXFLAGS@\"" \
|
||||
|
@ -19,7 +19,7 @@ AM_CPPFLAGS = \
|
||||
-DOPAL_CONFIGURE_DATE="\"@OPAL_CONFIGURE_DATE@\"" \
|
||||
-DOMPI_BUILD_USER="\"$$USER\"" \
|
||||
-DOMPI_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) 2> /dev/null | sed 1q`}\"" \
|
||||
-DOMPI_BUILD_DATE="\"`date`\"" \
|
||||
-DOMPI_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
|
||||
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
|
||||
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
|
||||
-DOMPI_BUILD_CXXFLAGS="\"@CXXFLAGS@\"" \
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user