From 54a17f44a53864b62320fd726afe037ed0d7408ac70973d4c3feb1c44359442d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 18 Oct 2017 10:19:00 +0000 Subject: [PATCH] Accepting request 534913 from home:bmwiedemann:reproducible Add make-sorted-glob.patch to make many other packages like dpdk build reproducibly without patching them individually (boo#1041090) now with changed patch tag, even though the patch might be accepted by upstream later OBS-URL: https://build.opensuse.org/request/show/534913 OBS-URL: https://build.opensuse.org/package/show/Base:System/make?expand=0&rev=55 --- make-sorted-glob.patch | 33 +++++++++++++++++++++++++++++++++ make.changes | 6 ++++++ make.spec | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 make-sorted-glob.patch diff --git a/make-sorted-glob.patch b/make-sorted-glob.patch new file mode 100644 index 0000000..499ae5d --- /dev/null +++ b/make-sorted-glob.patch @@ -0,0 +1,33 @@ +https://savannah.gnu.org/bugs/index.php?52076 + +commit faa0098ac6b196375b00c48528a91ee553313e8d +Author: Bernhard M. Wiedemann +Date: Tue Sep 5 13:16:08 2017 +0200 + + Sort glob file lists + + to make builds more reproducible by default. + See https://reproducible-builds.org/ for why this is good. + + commit b9f831b8 added GLOB_NOSORT for no apparent reason, + possibly by mistake. + + man 3 glob is very specific that the only reason to add this flag is + to save processing time, but since ordering actually matters in a + variety of cases, (e.g. when linking .o files into a binary, + or appending snippets to a collection) + we want the list sorted. + +Index: make-4.2.1/read.c +=================================================================== +--- make-4.2.1.orig/read.c ++++ make-4.2.1/read.c +@@ -3275,7 +3275,7 @@ parse_file_seq (char **stringp, unsigned + nlist = &name; + } + else +- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) ++ switch (glob (name, GLOB_ALTDIRFUNC, NULL, &gl)) + { + case GLOB_NOSPACE: + OUT_OF_MEM(); diff --git a/make.changes b/make.changes index 3f1e910..fe7916b 100644 --- a/make.changes +++ b/make.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 18 09:09:44 UTC 2017 - bwiedemann@suse.com + +- Add make-sorted-glob.patch to make many other packages like dpdk + build reproducibly without patching them individually (boo#1041090) + ------------------------------------------------------------------- Tue Sep 12 08:10:12 UTC 2017 - schwab@suse.de diff --git a/make.spec b/make.spec index 6ac0030..f5183f6 100644 --- a/make.spec +++ b/make.spec @@ -28,6 +28,8 @@ Source1: http://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2.sig # keyring downloaded from http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=make Source2: %{name}.keyring Patch1: make-testcases_timeout.diff +# FEATURE-OPENSUSE sort glob https://savannah.gnu.org/bugs/index.php?52076 +Patch2: make-sorted-glob.patch Patch64: make-library-search-path.diff Requires(post): %{install_info_prereq} Requires(preun): %{install_info_prereq} @@ -43,6 +45,7 @@ The GNU make command with extensive documentation. %prep %setup -q %patch1 -p1 +%patch2 -p1 if [ %{_lib} == lib64 ]; then %patch64 -p1 fi