diff options
author | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-04-29 12:46:58 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-06-09 20:45:56 +0200 |
commit | d78aba37168399b92418b4f3b7571efa4e042211 (patch) | |
tree | 06cc8959332590746e16a943429ddeeeb65c409e /instsetoo_native | |
parent | sw: fix use-after-free in SwFrame::ImplFindPageFrame() (diff) | |
download | core-d78aba37168399b92418b4f3b7571efa4e042211.tar.gz core-d78aba37168399b92418b4f3b7571efa4e042211.zip |
Get make_installer calls to run in parallel
If available, use GNU parallel to run N make_installer.pl scripts in
parallel, to scale packaging LibreOffice up with the rest of gbuild.
* fallback if no GNU parallel found - run make_installer sequentially
as before
* push most of the make_installer.pl input param tweaks from gbuild
down into a shared call_installer.sh script
* call gnu parallel with generated number of
"templ:lang:prodname:ext:pkgfmt:strip-flag" tuples, one for each
package to build (empty templ for non-windows, to save on cmd line
length)
* such that we can run all those in parallel (taking into account
the build's PARALLELISM parameter)
* there's still the main package build running epm sequentially for
umpteen sub-packages from within _one_ make_installer.pl instance, but
that's much harder to parallelize from inside Perl (so we punt on
that here)
Change-Id: Ie7d3084ed60d003d587c5e64dc9fb1809b23e409
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133957
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135343
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'instsetoo_native')
-rw-r--r-- | instsetoo_native/CustomTarget_install.mk | 83 |
1 files changed, 33 insertions, 50 deletions
diff --git a/instsetoo_native/CustomTarget_install.mk b/instsetoo_native/CustomTarget_install.mk index 0974240be1fb..2edb9ef365fa 100644 --- a/instsetoo_native/CustomTarget_install.mk +++ b/instsetoo_native/CustomTarget_install.mk @@ -62,41 +62,18 @@ export LOCAL_COMMON_OUT := $(instsetoo_OUT) instsetoo_native_WITH_LANG := en-US $(filter-out en-US,$(gb_WITH_LANG)) -PRODUCTNAME_no_spaces := $(subst $(WHITESPACE),,$(PRODUCTNAME)) - -ifeq (WNT,$(OS)) -define instsetoo_native_msitemplates - -TEMPLATE_DIR=$(dir $@)msi_templates \ -&& rm -rf $${TEMPLATE_DIR} \ -&& mkdir -p $${TEMPLATE_DIR}/Binary \ -&& for I in $(SRCDIR)/instsetoo_native/inc_$(1)/windows/msi_templates/*.* ; do $(GREP) -v '^#' "$$I" > $${TEMPLATE_DIR}/`basename $$I` || true ; done \ -&& $(GNUCOPY) $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* $${TEMPLATE_DIR}/Binary -endef -else -instsetoo_native_msitemplates := -endif - define instsetoo_native_install_command -$(call instsetoo_native_msitemplates,$(1)) -$(call gb_Helper_print_on_error, \ -cd $(dir $@) \ -$(foreach pkgformat,$(5),\ -&& $(PERL) -w $< \ - -f $(BUILDDIR)/instsetoo_native/util/openoffice.lst \ - -l $(subst $(WHITESPACE),$(COMMA),$(strip $(2))) \ - -p $(PRODUCTNAME_no_spaces)$(3) \ - -u $(instsetoo_OUT) \ - -packer $(COMPRESSIONTOOL) \ - -buildid $(if $(filter deb0 rpm0,$(pkgformat)$(LIBO_VERSION_PATCH)),1,$(LIBO_VERSION_PATCH)) \ - $(if $(filter WNT,$(OS)), \ - -msitemplate $(dir $@)msi_templates \ - -msilanguage $(dir $@)win_ulffiles \ - ) \ - $(4) \ - -format $(pkgformat) \ - $(if $(verbose),-verbose,-quiet) \ -),$@.log) +$(if $(GNUPARALLEL), \ + $(call gb_Helper_print_on_error, \ + cd $(dir $@) && \ + $(GNUPARALLEL) -j $(PARALLELISM) $(SRCDIR)/solenv/bin/call_installer.sh $(if $(verbose),-verbose,-quiet) -- $(1) \ + ,$@.log) \ +, \ + $(call gb_Helper_print_on_error, \ + cd $(dir $@) \ + $(foreach curpkg,$(1),\ + && $(SRCDIR)/solenv/bin/call_installer.sh $(if $(verbose),-verbose,-quiet) $(curpkg) \ + ),$@.log)) endef $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: @@ -104,32 +81,38 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL) rm -rf $(instsetoo_OUT) ifeq (TRUE,$(LIBO_TEST_INSTALL)) - $(call instsetoo_native_install_command,openoffice,en-US,,,archive) - unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)/archive/install/en-US/LibreOffice*_archive.zip + $(call instsetoo_native_install_command, "openoffice:en-US:::archive:nostrip") + unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_WITHOUT_SPACES)/archive/install/en-US/LibreOffice*_archive.zip mv $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*/* $(TESTINSTALLDIR)/ rmdir $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice* rmdir $(TESTINSTALLDIR)/LibreOffice*_archive ifeq (ODK,$(filter ODK,$(BUILD_TYPE))) - $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,archive) - unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)_SDK/archive/install/en-US/LibreOffice*_archive_sdk.zip + $(call instsetoo_native_install_command, "sdkoo:en-US:_SDK::archive:nostrip") + unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_WITHOUT_SPACES)_SDK/archive/install/en-US/LibreOffice*_archive_sdk.zip mv $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK/sdk \ $(TESTINSTALLDIR)/ rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk endif else # LIBO_TEST_INSTALL - $(call instsetoo_native_install_command,openoffice,$(if $(filter WNT MACOSX,$(OS)),$(instsetoo_native_WITH_LANG),en-US),,,$(PKGFORMAT)) -ifeq (ODK,$(filter ODK,$(BUILD_TYPE))) - $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,$(PKGFORMAT)) -endif -ifeq (HELP,$(filter HELP,$(BUILD_TYPE))$(filter MACOSX,$(OS))) - $(foreach lang,$(gb_HELP_LANGS),\ - $(call instsetoo_native_install_command,ooohelppack,$(lang),,-helppack,$(PKGFORMAT))) -endif -ifeq (,$(filter WNT MACOSX,$(OS))) - $(foreach lang,$(instsetoo_native_WITH_LANG),\ - $(call instsetoo_native_install_command,ooolangpack,$(lang),,-languagepack,$(PKGFORMAT))) -endif + $(call instsetoo_native_install_command, \ + $(foreach pkgformat,$(PKGFORMAT),\ + $(if $(filter WNT,$(OS)), \ + "openoffice:$(subst $(WHITESPACE),$(COMMA),$(strip $(instsetoo_native_WITH_LANG))):::$(pkgformat):$(if $(filter-out archive,$(pkgformat)),strip,nostrip)" \ + $(if $(filter ODK,$(BUILD_TYPE)), \ + "sdkoo:en-US:_SDK::$(pkgformat):nostrip") \ + $(if $(filter HELP,$(BUILD_TYPE)), \ + $(foreach lang,$(gb_HELP_LANGS), \ + "ooohelppack:$(lang)::-helppack:$(pkgformat):nostrip" )) \ + , \ + ":en-US:::$(pkgformat):$(if $(filter-out archive,$(pkgformat)),strip,nostrip)" \ + $(if $(filter ODK,$(BUILD_TYPE)), \ + ":en-US:_SDK::$(pkgformat):nostrip") \ + $(if $(and $(filter HELP,$(BUILD_TYPE)), $(filter-out MACOSX,$(OS))), \ + $(foreach lang,$(gb_HELP_LANGS), \ + ":$(lang)::-helppack:$(pkgformat):nostrip" )) \ + $(foreach lang,$(instsetoo_native_WITH_LANG), \ + ":$(lang)::-languagepack:$(pkgformat):nostrip" ) ))) endif # LIBO_TEST_INSTALL touch $@ $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL) |