Commit 2a0c5e97 authored by Ian Goldberg's avatar Ian Goldberg
Browse files

Create a reproducible tarball from the git source

Hook am__tar and set GZIP_ENV so that "make dist" will create a
reproducible tarball from the git source, including a new
"source_date_epoch" file that contains the source (*not build*)
timestamp based on the git commit timestamp.
parent d8bc5628
2016-03-25
* Makefile.am:
* configure.ac: Hook am__tar and set GZIP_ENV so that "make
dist" will create a reproducible tarball from the git source,
including a new "source_date_epoch" file that contains the
source (*not build*) timestamp based on the git commit timestamp.
2016-03-07
* tests/regression/client/Makefile.am:
......
......@@ -5,10 +5,20 @@ if BUILD_TESTS
SUBDIRS += tests
endif
EXTRA_DIST = Protocol-v3.html UPGRADING packaging libotr.m4 libotr.pc.in bootstrap
EXTRA_DIST = Protocol-v3.html UPGRADING packaging libotr.m4 libotr.pc.in \
bootstrap source_date_epoch
aclocaldir = $(datadir)/aclocal
aclocal_DATA = libotr.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libotr.pc
# Don't include a filename or timestamp in the dist .tar.gz file, so that
# we can create a reproducible tarball (coupled with setting am__tar in
# configure.ac)
override GZIP_ENV='--best --no-name'
source_date_epoch: FORCE
git log --format=%ct -1 > source_date_epoch
FORCE:
......@@ -28,6 +28,13 @@ AC_SUBST(LIBOTR_LIBTOOL_VERSION)
AC_PROG_CC
LT_INIT
dnl Cause "make dist" to create a reproducible tarball (coupled with
dnl setting GZIP_ENV in Makefile.am). Note that this relies on the
dnl file source_date_epoch existing, which is created by a rule in
dnl Makefile.am. That file is included in the tarball, so it will be
dnl created before this command is run.
AC_SUBST([am__tar],['( export SOURCE_DATE_EPOCH=`tr -cd 0-9 < source_date_epoch`; chmod -R u=rwX,go=rX "$$tardir"; find "$$tardir" -exec touch -d @$${SOURCE_DATE_EPOCH} {} \; -print0 | LC_ALL=C sort -z | $${TAR-tar} --owner=root --group=root --numeric-owner --no-recursion --null -T - -chf - )'])
AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
AC_CANONICAL_HOST
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment