From 0b36e206a90da56681a587937a47f4db56c6626d28bd23c68ce72f88d61bc235 Mon Sep 17 00:00:00 2001 From: Herbert Graeber Date: Sat, 27 May 2017 22:10:25 +0000 Subject: [PATCH] Accepting request 498588 from home:bmwiedemann:branches:hardware Add reproducible.patch to sort input files to make build reproducible (boo#1041090) OBS-URL: https://build.opensuse.org/request/show/498588 OBS-URL: https://build.opensuse.org/package/show/hardware/spacenavd?expand=0&rev=8 --- reproducible.patch | 19 +++++++++++++++++++ spacenavd.changes | 6 ++++++ spacenavd.spec | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 reproducible.patch diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..24295b7 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,19 @@ +sort input files (boo#1041090) + +when building packages (e.g. for openSUSE Linux) +(random) filesystem order of input files +influences ordering of functions in the output, +thus without the patch, builds (in disposable VMs) would differ. + +See https://reproducible-builds.org/ for why this matters. + +Index: spacenavd-0.6/Makefile.in +=================================================================== +--- spacenavd-0.6.orig/Makefile.in ++++ spacenavd-0.6/Makefile.in +@@ -1,4 +1,4 @@ +-src = $(wildcard src/*.c) $(wildcard src/serial/*.c) $(wildcard src/magellan/*.c) ++src = $(sort $(wildcard src/*.c) $(wildcard src/serial/*.c) $(wildcard src/magellan/*.c)) + hdr = $(wildcard src/*.h) $(wildcard src/serial/*.h) $(wildcard src/magellan/*.h) + obj = $(src:.c=.o) + dep = $(obj:.o=.d) diff --git a/spacenavd.changes b/spacenavd.changes index 844efe3..fe98fff 100644 --- a/spacenavd.changes +++ b/spacenavd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat May 27 05:26:02 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input files to make build reproducible + (boo#1041090) + ------------------------------------------------------------------- Sun Oct 30 17:43:38 UTC 2016 - jengelh@inai.de diff --git a/spacenavd.spec b/spacenavd.spec index c1d273d..fb5cf4e 100644 --- a/spacenavd.spec +++ b/spacenavd.spec @@ -19,6 +19,8 @@ Source1: spacenavd.8.gz Source2: spnavrc Source3: xinitrc-%{name} Source4: %{name}.service +# PATCH-FIX-UPSTREAM bmwiedemann https://sourceforge.net/p/spacenav/patches/6/ +Patch0: reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: xorg-x11 BuildRequires: xorg-x11-devel @@ -37,6 +39,7 @@ any program that was written for the 3Dconnexion driver. %prep %setup -q +%patch0 -p1 %build %configure