Accepting request 511366 from home:wanghaisu:branches:network:ha-clustering:Factory
Add missing reproducible.patch based on Bernhard's patch in mailing list. OBS-URL: https://build.opensuse.org/request/show/511366 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=52
This commit is contained in:
parent
c3b1cc4105
commit
984d8f8306
53
reproducible.patch
Normal file
53
reproducible.patch
Normal file
@ -0,0 +1,53 @@
|
||||
commit 9777375cea4d39a6298b774c80eb1287836b217d
|
||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Date: Mon Jul 17 21:05:47 2017 +0200
|
||||
|
||||
drbd: sort file list
|
||||
|
||||
because it influences the ordering of entries in compat.h
|
||||
which influences srcversion= checksum
|
||||
which prevents drbd.ko from building reproducibly.
|
||||
|
||||
See https://reproducible-builds.org/ for why this matters.
|
||||
|
||||
diff --git a/drbd/Kbuild b/drbd/Kbuild
|
||||
index 2d1b4d0..c5787a6 100644
|
||||
--- a/drbd/Kbuild
|
||||
+++ b/drbd/Kbuild
|
||||
@@ -70,7 +70,7 @@ COMPAT_FORCE := FORCE
|
||||
endif
|
||||
|
||||
ifneq ($(KBUILD_STAGE),modpost)
|
||||
-TEST_C := $(wildcard $(src)/drbd-kernel-compat/tests/*.c)
|
||||
+TEST_C := $(sort $(wildcard $(src)/drbd-kernel-compat/tests/*.c))
|
||||
TEST_R := $(TEST_C:$(src)/drbd-kernel-compat/tests/%.c=$(obj)/.compat_test.%.result)
|
||||
$(obj)/.compat_test.%.result: $(src)/drbd-kernel-compat/tests/%.c $(COMPAT_FORCE)
|
||||
$(call cmd,compat_test_result)
|
||||
commit 794951592b004e82c0160014751d9ebb654035c0
|
||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Date: Tue Jul 18 10:30:16 2017 +0200
|
||||
|
||||
drbd: Allow to override build date (v3)
|
||||
|
||||
and to not record build user and hostname if requested
|
||||
in order to allow for reproducible builds.
|
||||
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.
|
||||
|
||||
diff --git a/drbd/Kbuild b/drbd/Kbuild
|
||||
index 2d1b4d0..80b8099 100644
|
||||
--- a/drbd/Kbuild
|
||||
+++ b/drbd/Kbuild
|
||||
@@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y))
|
||||
echo >&2 "Your DRBD source tree is broken. Unpack again."; \
|
||||
exit 1; \
|
||||
fi ; \
|
||||
- echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
|
||||
+ if [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] || [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
|
||||
+ buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
|
||||
+ else \
|
||||
+ buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
|
||||
+ fi ; \
|
||||
+ echo -e "\t\t\" $$buildinfo\";\n}"; \
|
||||
mv -f $@.new $@
|
Loading…
Reference in New Issue
Block a user