From 40f06adcc0c66b6056d4ac98dda1b9e939d38ba186a26c4c2652eac97e2b8d3d Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Tue, 30 May 2017 00:52:43 +0000 Subject: [PATCH] Accepting request 499411 from home:bmwiedemann:branches:Publishing Add reproducible.patch to sort input files to make build reproducible (boo#1041090) OBS-URL: https://build.opensuse.org/request/show/499411 OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=54 --- mupdf.changes | 6 +++++ mupdf.spec | 3 +++ reproducible.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 reproducible.patch diff --git a/mupdf.changes b/mupdf.changes index ed3144c..e6e8ce9 100644 --- a/mupdf.changes +++ b/mupdf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 29 14:46:49 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input files to make build reproducible + (boo#1041090) + ------------------------------------------------------------------- Thu Apr 27 19:51:23 UTC 2017 - idonmez@suse.com diff --git a/mupdf.spec b/mupdf.spec index 2132cf2..78430d4 100644 --- a/mupdf.spec +++ b/mupdf.spec @@ -35,6 +35,8 @@ Patch5: CVE-2017-5627.patch Patch6: CVE-2017-5628.patch Patch7: CVE-2017-5896.patch Patch8: bsc1023760.patch +# PATCH-FIX-UPSTREAM https://bugs.ghostscript.com/show_bug.cgi?id=697958 +Patch9: reproducible.patch BuildRequires: freetype-devel BuildRequires: gcc-c++ BuildRequires: jbig2dec-devel @@ -73,6 +75,7 @@ based on mupdf. %patch1 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 pushd ./thirdparty/mujs %patch2 -p1 diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..04d8d34 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,57 @@ +Index: mupdf-1.10a-source/Makefile +=================================================================== +--- mupdf-1.10a-source.orig/Makefile ++++ mupdf-1.10a-source/Makefile +@@ -83,13 +83,13 @@ PDF_HDR := include/mupdf/pdf.h $(wildcar + SVG_HDR := include/mupdf/svg.h + HTML_HDR := include/mupdf/html.h + +-FITZ_SRC := $(wildcard source/fitz/*.c) +-PDF_SRC := $(wildcard source/pdf/*.c) +-XPS_SRC := $(wildcard source/xps/*.c) +-SVG_SRC := $(wildcard source/svg/*.c) +-CBZ_SRC := $(wildcard source/cbz/*.c) +-HTML_SRC := $(wildcard source/html/*.c) +-GPRF_SRC := $(wildcard source/gprf/*.c) ++FITZ_SRC := $(sort $(wildcard source/fitz/*.c)) ++PDF_SRC := $(sort $(wildcard source/pdf/*.c)) ++XPS_SRC := $(sort $(wildcard source/xps/*.c)) ++SVG_SRC := $(sort $(wildcard source/svg/*.c)) ++CBZ_SRC := $(sort $(wildcard source/cbz/*.c)) ++HTML_SRC := $(sort $(wildcard source/html/*.c)) ++GPRF_SRC := $(sort $(wildcard source/gprf/*.c)) + + FITZ_SRC_HDR := $(wildcard source/fitz/*.h) + PDF_SRC_HDR := $(wildcard source/pdf/*.h) source/pdf/pdf-name-table.h +@@ -116,11 +116,11 @@ $(GPRF_OBJ) : $(FITZ_HDR) $(GPRF_HDR) $( + + # --- Generated embedded font files --- + +-FONT_BIN_DROID := $(wildcard resources/fonts/droid/*.ttf) +-FONT_BIN_NOTO := $(wildcard resources/fonts/noto/*.ttf) +-FONT_BIN_HAN := $(wildcard resources/fonts/han/*.otf) +-FONT_BIN_URW := $(wildcard resources/fonts/urw/*.cff) +-FONT_BIN_SIL := $(wildcard resources/fonts/sil/*.cff) ++FONT_BIN_DROID := $(sort $(wildcard resources/fonts/droid/*.ttf)) ++FONT_BIN_NOTO := $(sort $(wildcard resources/fonts/noto/*.ttf)) ++FONT_BIN_HAN := $(sort $(wildcard resources/fonts/han/*.otf)) ++FONT_BIN_URW := $(sort $(wildcard resources/fonts/urw/*.cff)) ++FONT_BIN_SIL := $(sort $(wildcard resources/fonts/sil/*.cff)) + + FONT_GEN_DROID := $(subst resources/fonts/droid/, $(GEN)/, $(addsuffix .c, $(basename $(FONT_BIN_DROID)))) + FONT_GEN_NOTO := $(subst resources/fonts/noto/, $(GEN)/, $(addsuffix .c, $(basename $(FONT_BIN_NOTO)))) +@@ -210,10 +210,10 @@ NAMEDUMP := $(OUT)/namedump + CQUOTE := $(OUT)/cquote + BIN2HEX := $(OUT)/bin2hex + +-CMAP_CNS_SRC := $(wildcard resources/cmaps/cns/*) +-CMAP_GB_SRC := $(wildcard resources/cmaps/gb/*) +-CMAP_JAPAN_SRC := $(wildcard resources/cmaps/japan/*) +-CMAP_KOREA_SRC := $(wildcard resources/cmaps/korea/*) ++CMAP_CNS_SRC := $(sort $(wildcard resources/cmaps/cns/*)) ++CMAP_GB_SRC := $(sort $(wildcard resources/cmaps/gb/*)) ++CMAP_JAPAN_SRC := $(sort $(wildcard resources/cmaps/japan/*)) ++CMAP_KOREA_SRC := $(sort $(wildcard resources/cmaps/korea/*)) + + $(GEN)/gen_cmap_cns.h : $(CMAP_CNS_SRC) + $(QUIET_GEN) $(CMAPDUMP) $@ $(CMAP_CNS_SRC)