From 151861654240b17a2cfe19a429c4fdefc299ae352c923d88e277c1d036707904 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 6 Feb 2019 09:18:30 +0000 Subject: [PATCH] Accepting request 662627 from home:bmwiedemann:branches:server:mail Add reproducible.patch to override build date (boo#1047218) OBS-URL: https://build.opensuse.org/request/show/662627 OBS-URL: https://build.opensuse.org/package/show/server:mail/courier-imap?expand=0&rev=81 --- courier-imap.changes | 5 +++++ courier-imap.spec | 3 +++ reproducible.patch | 25 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 reproducible.patch diff --git a/courier-imap.changes b/courier-imap.changes index c5b6f7f..ec3a654 100644 --- a/courier-imap.changes +++ b/courier-imap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 3 10:09:46 UTC 2019 - Bernhard Wiedemann + +- Add reproducible.patch to override build date (boo#1047218) + ------------------------------------------------------------------- Mon Dec 4 11:55:19 UTC 2017 - suse+build@de-korte.org diff --git a/courier-imap.spec b/courier-imap.spec index ede5950..31aed23 100644 --- a/courier-imap.spec +++ b/courier-imap.spec @@ -44,6 +44,8 @@ Patch2: %{name}-ulimit_conf.patch ### Patch for upstream: ## fixes typo in Makefile.am Patch3: %{name}-Makefile.patch +# PATCH-FIX-UPSTEAM https://github.com/svarshavchik/courier-libs/pull/10 +Patch4: reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 910 BuildRequires: audit-libs @@ -111,6 +113,7 @@ install the entire Courier server. %patch0 %patch2 %patch3 +%patch4 -p1 %build %configure \ diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..ecb990f --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,25 @@ +merged upstream: https://github.com/svarshavchik/courier-libs/pull/10 +from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824037 + +Date: 2016-05-11 +Description: Use SOURCE_DATE_EPOCH for imapd version + Use the environment variable SOURCE_DATE_EPOCH (if set) for imapd + PROGRAMVERSION, to make the build reproducible. + See https://reproducible-builds.org/specs/source-date-epoch/ +Author: Alexis Bienvenüe + +Index: courier-imap-4.18.2/libs/imap/configure +=================================================================== +--- courier-imap-4.18.2.orig/libs/imap/configure ++++ courier-imap-4.18.2/libs/imap/configure +@@ -18345,7 +18345,9 @@ courier) + ;; + esac + +-date=`date` ++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-`date +%s`}" ++date=`date -u -d "@$SOURCE_DATE_EPOCH" "+%F %T" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+%F %T" 2>/dev/null || date -u "+%F %T"` ++ + + cat >>confdefs.h <<_ACEOF + #define PROGRAMVERSION "$package/${target_cpu}-${target_vendor}-${target_os}/$date"