From afb52dd57cdbed7695ff7b24e1486a119743cbc27fcccf4b89f7e71b5ff0bca1 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Tue, 26 Jun 2018 23:30:49 +0000 Subject: [PATCH] Accepting request 619148 from home:bmwiedemann:branches:games:tools Add reproducible.patch to not store extra timestamps in zip to make build reproducible this broke when 7z was replaced with zip again in the commit before OBS-URL: https://build.opensuse.org/request/show/619148 OBS-URL: https://build.opensuse.org/package/show/games:tools/slade?expand=0&rev=20 --- reproducible.patch | 24 ++++++++++++++++++++++++ slade.changes | 6 ++++++ slade.spec | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 reproducible.patch diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..25c0d67 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,24 @@ +From 74a3129429a8f99dfcac78ac676d2ca845e05af6 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Tue, 26 Jun 2018 12:36:57 +0200 +Subject: [PATCH] Do not save extra file attributes in .zip + +to make it easier to make a reproducible build +See https://reproducible-builds.org/ for why this is good. +--- + dist/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt +index 842d3cb1..a7c617bd 100644 +--- a/dist/CMakeLists.txt ++++ b/dist/CMakeLists.txt +@@ -4,7 +4,7 @@ find_program(ZIPTOOL_7Z_EXECUTABLE 7z "$ENV{ProgramFiles}/7-Zip") + if(ZIPTOOL_7Z_EXECUTABLE) + set(ZIP_COMMAND "${ZIPTOOL_7Z_EXECUTABLE}" u -tzip -r "${CMAKE_BINARY_DIR}/slade.pk3" .) + elseif(ZIPTOOL_ZIP_EXECUTABLE) +- set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -r "${CMAKE_BINARY_DIR}/slade.pk3" .) ++ set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -r "${CMAKE_BINARY_DIR}/slade.pk3" .) + else() + message(STATUS "no zip executable, slade.pk3 won't build") + endif() diff --git a/slade.changes b/slade.changes index d1539af..d1ce78e 100644 --- a/slade.changes +++ b/slade.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 26 10:46:19 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to not store extra timestamps in zip + to make build reproducible + ------------------------------------------------------------------- Tue Jun 12 12:46:57 UTC 2018 - jengelh@inai.de diff --git a/slade.spec b/slade.spec index 12d11a5..d58e24e 100644 --- a/slade.spec +++ b/slade.spec @@ -29,6 +29,8 @@ Source100: slade.appdata.xml Patch1: basepk3.diff Patch2: wxChar.patch Patch10: disable_sse.patch +# PATCH-FIX-UPSTREAM https://github.com/sirjuddington/SLADE/pull/892 +Patch11: reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ImageMagick BuildRequires: cmake @@ -60,6 +62,7 @@ from/to other generic formats such as PNG. %ifnarch %{ix86} x86_64 %patch10 -p0 %endif +%patch11 -p1 %build %cmake -DUSE_WEBKIT_STARTPAGE=ON