diff --git a/infinipath-psm.changes b/infinipath-psm.changes index 406fed6..38b8700 100644 --- a/infinipath-psm.changes +++ b/infinipath-psm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 14 04:58:35 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to fix build date (boo#1047218) + ------------------------------------------------------------------- Wed Feb 14 08:29:56 UTC 2018 - nmoreychaisemartin@suse.com diff --git a/infinipath-psm.spec b/infinipath-psm.spec index 8ba9f53..94b5ae2 100644 --- a/infinipath-psm.spec +++ b/infinipath-psm.spec @@ -33,6 +33,8 @@ Patch0: infinipath-psm-cflags.patch Patch1: infinipath-psm-no_werror.patch # PATCH-FIX-UPSTREAM infinipath-psm-executable_headers.patch pth@suse.de Patch3: infinipath-psm-executable_headers.patch +# PATCH-FIX-UPSTREAM bmwiedemann https://github.com/intel/psm/pull/16 boo#1047218 +Patch4: reproducible.patch BuildRequires: libuuid-devel Conflicts: infinipath-libs ExclusiveArch: %ix86 x86_64 @@ -97,6 +99,7 @@ interfaces in parallel environments. %patch0 %patch1 %patch3 +%patch4 -p1 %build export RPM_OPT_FLAGS="%{optflags} -Wno-unused-but-set-variable" diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..518bb41 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,28 @@ +From 47497ea8597baaa65d7781468d4db09abb8ebd53 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Sun, 23 Jul 2017 07:02:28 +0200 +Subject: [PATCH] Allow to override build date + +in order to make builds reproducible. +See https://reproducible-builds.org/ for why this is good +and https://reproducible-builds.org/specs/source-date-epoch/ +for the definition of this variable. + +Also uses UTC to be independent of timezone settings. +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d79c4bd..99406ef 100644 +--- a/Makefile ++++ b/Makefile +@@ -270,7 +270,7 @@ ${TARGLIB}.so.${MAJOR}: ${TARGLIB}.so.${MAJOR}.${MINOR} + # file around. Generate it such that the ident command can find it + # and strings -a | grep InfiniPath does a reasonable job as well. + ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs} +- date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c ++ date -u -d@$${SOURCE_DATE_EPOCH:-$$(date +%s)} +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c + $(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o + $(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \ + ${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)