diff --git a/0001-Use-sort-on-finds-to-improve-deterministic-build.patch b/0001-Use-sort-on-finds-to-improve-deterministic-build.patch new file mode 100644 index 0000000..fc45957 --- /dev/null +++ b/0001-Use-sort-on-finds-to-improve-deterministic-build.patch @@ -0,0 +1,81 @@ +From b264e2f18c08ad9184ff8fa005c090ba2b4f8038 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Thu, 4 Apr 2019 13:33:26 +0200 +Subject: [PATCH] Use sort on finds to improve deterministic build + +This should sort out all outputs prior processing them further resulting +in equal output among multiple builds. + +Change-Id: Iaf24bbb94eb7b8960177bcf2c3e08d31d2fb7210 +--- + postprocess/CustomTarget_images.mk | 4 ++-- + postprocess/CustomTarget_registry.mk | 2 ++ + solenv/gbuild/GeneratedPackage.mk | 2 +- + solenv/gbuild/Module.mk | 2 +- + 4 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk +index 5ad55799e1e1..f1e32f0b28ff 100644 +--- a/postprocess/CustomTarget_images.mk ++++ b/postprocess/CustomTarget_images.mk +@@ -96,9 +96,9 @@ $(packimages_DIR)/commandimagelist.ilst : + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1) + $(call gb_Helper_abbreviate_dirs, \ + $(FIND) $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \ +- grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | $(SORT) | uniq | \ ++ grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | \ + sed "s#^#%MODULE%#" | \ +- LC_ALL=C $(SORT) > $@.tmp && \ ++ LC_ALL=C $(SORT) -u > $@.tmp && \ + $(call gb_Helper_replace_if_different_and_touch,$@.tmp,$@)) + + $(packimages_DIR)/sorted.lst : \ +diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk +index e84c35eec7e5..a2560f2e2d74 100644 +--- a/postprocess/CustomTarget_registry.mk ++++ b/postprocess/CustomTarget_registry.mk +@@ -597,6 +597,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list : + $(call gb_Helper_abbreviate_dirs,\ + $(FIND) $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/) \ + -name *.xcu -size +0c \ ++ | LC_ALL=C $(SORT) \ + | $(gb_AWK) 'BEGIN{print ""} \ + {print ""$$0""} \ + END {print ""}' > $@ \ +@@ -612,6 +613,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list : + $(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\ + $(call gb_XcuResTarget_get_target,updchk/$*/))\ + -name *.xcu \ ++ | LC_ALL=C $(SORT) \ + | $(gb_AWK) 'BEGIN{print ""} \ + {print ""$$0""} \ + END {print ""}' > $@ \ +diff --git a/solenv/gbuild/GeneratedPackage.mk b/solenv/gbuild/GeneratedPackage.mk +index 25af209b857e..05bbcf43a93e 100644 +--- a/solenv/gbuild/GeneratedPackage.mk ++++ b/solenv/gbuild/GeneratedPackage.mk +@@ -42,7 +42,7 @@ $(call gb_GeneratedPackage_get_target,%) : + $(foreach pair,$(PACKAGE_DIRS),&& cp -R $(PACKAGE_SOURCEDIR)/$(call gb_GeneratedPackage__get_srcdir,$(pair)) $(call gb_GeneratedPackage__get_destdir,$(pair))) \ + ) + $(call gb_Helper_abbreviate_dirs,\ +- $(FIND) $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \( -type f -o -type l \) -print > $@ \ ++ $(FIND) $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \( -type f -o -type l \) -print | LC_ALL=C $(SORT) > $@ \ + ) + + .PHONY : $(call gb_GeneratedPackage_get_clean_target,%) +diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk +index 8b74a425bb2e..52798fd40731 100644 +--- a/solenv/gbuild/Module.mk ++++ b/solenv/gbuild/Module.mk +@@ -235,7 +235,7 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize propex ulfex xrmex tr + $(call gb_Output_announce,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),$(true),POT,1) + $(call gb_Helper_abbreviate_dirs,\ + mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) $(SRCDIR) $(dir $@)/pot \ +- && $(FIND) $(dir $@)/pot -type f -printf "%P\n" | sed -e "s/\.pot/.po/" > $(dir $@)/LIST \ ++ && $(FIND) $(dir $@)/pot -type f -printf "%P\n" | sed -e "s/\.pot/.po/" | LC_ALL=C $(SORT) > $(dir $@)/LIST \ + && touch $@) + + # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined] +-- +2.21.0 + diff --git a/libreoffice.changes b/libreoffice.changes index ef128b3..cc66991 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 4 11:34:54 UTC 2019 - Tomáš Chvátal + +- Add patch to fix diff in generated helpfiles with rebuilds: + * 0001-Use-sort-on-finds-to-improve-deterministic-build.patch + ------------------------------------------------------------------- Fri Mar 22 10:52:26 UTC 2019 - Tomáš Chvátal diff --git a/libreoffice.spec b/libreoffice.spec index 335ce5b..0e17c2c 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -105,6 +105,7 @@ Patch8: 0001-Fix-LTO-segfault-in-libtest_sw_uwriter-test.patch Patch9: boost_169.patch Patch10: kde5.patch Patch11: old-icu.patch +Patch12: 0001-Use-sort-on-finds-to-improve-deterministic-build.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff # save time by relying on rpm check rather than doing stupid find+grep @@ -973,6 +974,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %patch990 -p1 %patch991 -p1