diff --git a/ndpi.changes b/ndpi.changes index c5cd5e6..0ad11b5 100644 --- a/ndpi.changes +++ b/ndpi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 5 04:03:31 UTC 2019 - Bernhard Wiedemann + +- Add reproducible.patch to override build date (boo#1047218) + ------------------------------------------------------------------- Sat Mar 30 09:53:01 UTC 2019 - Martin Hauke diff --git a/ndpi.spec b/ndpi.spec index 344288b..ffa888a 100644 --- a/ndpi.spec +++ b/ndpi.spec @@ -33,6 +33,8 @@ URL: https://github.com/ntop/nDPI Source: https://github.com/ntop/nDPI/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # FIXME: Upstream makefile is broken Patch0: ndpi-fix-build.patch +# PATCH-FIX-UPSTREAM https://github.com/ntop/nDPI/pull/662 +Patch1: reproducible.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -89,6 +91,7 @@ This package contains the ndpiReader binary. %prep %setup -q -n nDPI-%{version} %patch0 -p1 +%patch1 -p1 %build sh autogen.sh diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..5dede33 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,29 @@ +https://github.com/ntop/nDPI/pull/662 + +From e91123e17a6ebe2cb1f718aa3e44edb10b707779 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Thu, 24 Jan 2019 14:21:06 +0100 +Subject: [PATCH] Use ChangeLog date instead of build date + +in order to make builds reproducible. +See https://reproducible-builds.org/ for why this is good. + +This date call works with GNU date and BSD date. +Also use UTC/gmtime to be independent of timezone. +--- + configure.seed | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.seed b/configure.seed +index 1aa68f17..006e6d97 100644 +--- a/configure.seed ++++ b/configure.seed +@@ -30,7 +30,7 @@ if test -d ".git"; then : + GIT_RELEASE="${PACKAGE_VERSION}-${GIT_NUM}-${GIT_TAG}" + else + GIT_RELEASE="${PACKAGE_VERSION}" +- GIT_DATE=`date` ++ GIT_DATE=`date -u -r CHANGELOG.md` + fi + + AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])