support for SOURCE_DATE_EPOCH (reproducible builds)
This commit is contained in:
parent
f47a3e0f0b
commit
4750bea4ff
@ -1,5 +1,6 @@
|
|||||||
0.8.4dev
|
0.8.4dev
|
||||||
========
|
========
|
||||||
|
18-Feb-2022: - support for reproducible builds and SOURCE_DATE_EPOCH
|
||||||
05-Jan-2022: - reworked Y2038 fix
|
05-Jan-2022: - reworked Y2038 fix
|
||||||
25-Oct-2021: - fixed some Y2038 issues related to 64bit time
|
25-Oct-2021: - fixed some Y2038 issues related to 64bit time
|
||||||
support for 32bit plattforms
|
support for 32bit plattforms
|
||||||
|
|||||||
23
configure.ac
23
configure.ac
@ -391,20 +391,31 @@ dnl --with-custom-fwmodule
|
|||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl add
|
dnl reproducible-build:
|
||||||
dnl --enable-reproducible-build
|
dnl SOURCE_DATE_EPOCH defined, or --enable-reproducible-build given
|
||||||
|
dnl
|
||||||
reproducible_build="no"
|
reproducible_build="no"
|
||||||
|
dnl check SOURCE_DATE_EPOCH
|
||||||
|
AC_MSG_CHECKING(whether we have SOURCE_DATE_EPOCH defined)
|
||||||
|
if test "x$SOURCE_DATE_EPOCH" != "x"; then
|
||||||
|
AC_SUBST(SOURCE_DATE_EPOCH, $SOURCE_DATE_EPOCH)
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(HAVE_SOURCE_DATE_EPOCH, test "x$SOURCE_DATE_EPOCH" != "x")
|
||||||
|
|
||||||
|
dnl check --enable-reproducible-build
|
||||||
AC_MSG_CHECKING(whether to enable a reproducible build)
|
AC_MSG_CHECKING(whether to enable a reproducible build)
|
||||||
AC_ARG_ENABLE(reproducible-build,
|
AC_ARG_ENABLE(reproducible-build,
|
||||||
[ --enable-reproducible-build
|
[ --enable-reproducible-build
|
||||||
enable reproducible build (default is no)],
|
enable reproducible build (default is no)],
|
||||||
[ if test "x$enableval" = "xyes"; then
|
[ if test "x$enableval" = "xyes"; then
|
||||||
reproducible_build="yes"
|
reproducible_build="yes"
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
fi
|
||||||
], [AC_MSG_RESULT(no)])
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($reproducible_build)
|
||||||
AM_CONDITIONAL(REPRODUCIBLE_BUILD, test "x$reproducible_build" = "xyes")
|
AM_CONDITIONAL(REPRODUCIBLE_BUILD, test "x$reproducible_build" = "xyes")
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
@ -18,13 +18,18 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# some magic for reproducible builds
|
||||||
if REPRODUCIBLE_BUILD
|
if HAVE_SOURCE_DATE_EPOCH
|
||||||
BUILDDATE="\"unknown\""
|
BUILDDATE="\"`date -d @$(SOURCE_DATE_EPOCH) -u '+%Y-%m-%dT%H:%M:%S'`\""
|
||||||
BUILDSTR="\"none\""
|
BUILDSTR="\"none\""
|
||||||
else
|
else
|
||||||
BUILDDATE="\"`date -u '+%Y-%m-%dT%H:%M:%S'`\""
|
if REPRODUCIBLE_BUILD
|
||||||
BUILDSTR="\"`cat .buildno`\""
|
BUILDDATE="\"unknown\""
|
||||||
|
BUILDSTR="\"none\""
|
||||||
|
else
|
||||||
|
BUILDDATE="\"`date -u '+%Y-%m-%dT%H:%M:%S'`\""
|
||||||
|
BUILDSTR="\"`cat .buildno`\""
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CFLAGS = -D_GNU_SOURCE $(LTDLDEF) \
|
AM_CFLAGS = -D_GNU_SOURCE $(LTDLDEF) \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user