From 9162c87eb41534b6268b969cb0cd94d4c8597ba5a017d3119fea110c87ec617e Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Thu, 3 Feb 2022 17:24:14 +0000 Subject: [PATCH] Accepting request 951346 from home:dirkmueller:branches:mozilla:Factory - disable ccache, this adds about 1 minute of build time and over 2 GB of disk space usage without benefit on OBS builds - build with rust-simd like upstream does - use -g1 for debuginfo generation as this is what upstream does as well and it saves ~ 2GB of writes - use %limit on x86_64 to scale down to less capable workers - disable install stripping so that debuginfo is useful - use autopatch - cleanup constraints to specify only jobs, physicalmemory and memoryperjob to be more flexible on which host to build on OBS-URL: https://build.opensuse.org/request/show/951346 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=956 --- MozillaFirefox.changes | 15 +++++++++++ MozillaFirefox.spec | 45 +++++++------------------------ _constraints | 60 +++++------------------------------------- 3 files changed, 31 insertions(+), 89 deletions(-) diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index fe66963..9e37a70 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Jan 30 23:58:34 UTC 2022 - Dirk Müller + +- disable ccache, this adds about 1 minute of build time and + over 2 GB of disk space usage without benefit on OBS builds +- build with rust-simd like upstream does +- use -g1 for debuginfo generation as this is what upstream + does as well and it saves ~ 2GB of writes +- use %limit on x86_64 to scale down to less capable workers +- disable install stripping so that debuginfo is useful +- use autopatch +- cleanup constraints to specify only jobs, physicalmemory + and memoryperjob to be more flexible on which host to build + on + ------------------------------------------------------------------- Fri Jan 28 15:26:45 UTC 2022 - Wolfgang Rosenauer diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index a872aa5..37b94e9 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -42,13 +42,10 @@ # upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 -# PIE, full relro -%define build_hardened 1 - %bcond_with only_print_mozconfig # define if ccache should be used or not -%define useccache 1 +%define useccache 0 # SLE-12 doesn't have this macro %{!?_rpmmacrodir: %global _rpmmacrodir %{_rpmconfigdir}/macros.d} @@ -326,32 +323,7 @@ fi %setup -q -n %{srcname}-%{orig_version} %endif cd $RPM_BUILD_DIR/%{srcname}-%{orig_version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -# Firefox -%patch101 -p1 -%patch102 -p1 +%autopatch -p1 %endif %build @@ -410,9 +382,7 @@ export CFLAGS="$CFLAGS -fimplicit-constexpr" # Limit RAM usage during link export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -%if 0%{?build_hardened} export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" -%endif %ifarch ppc64 ppc64le %if 0%{?clang_build} == 0 export CFLAGS="$CFLAGS -mminimal-toc" @@ -438,8 +408,8 @@ echo "export MOZ_TELEMETRY_REPORTING=1" echo "" cat << EOF %else -%ifarch aarch64 %arm ppc64 ppc64le -%limit_build -m 2000 +%ifarch aarch64 ppc64 ppc64le x86_64 +%limit_build -m 2048 %endif cat << EOF > $MOZCONFIG %endif @@ -462,7 +432,8 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 %ifarch %ix86 %arm ac_add_options --disable-debug-symbols %else -ac_add_options --enable-debug-symbols +ac_add_options --enable-debug-symbols=-g1 +ac_add_options --disable-install-strip %endif # building with elf-hack started to fail everywhere with FF73 #%if 0%{?suse_version} > 1549 @@ -485,7 +456,6 @@ ac_add_options --disable-updater ac_add_options --disable-tests ac_add_options --enable-alsa ac_add_options --disable-debug -#ac_add_options --enable-chrome-format=jar ac_add_options --enable-update-channel=%{update_channel} ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} # Google-service currently not available for free anymore @@ -495,6 +465,9 @@ ac_add_options --with-unsigned-addon-scopes=app ac_add_options --allow-addon-sideload # at least temporary until the "wasi-sysroot" issue is solved ac_add_options --without-wasm-sandboxed-libraries +%ifarch x86_64 aarch64 +ac_add_options --enable-rust-simd +%endif %if %branding ac_add_options --enable-official-branding %endif diff --git a/_constraints b/_constraints index ee68889..f6f9e27 100644 --- a/_constraints +++ b/_constraints @@ -1,15 +1,16 @@ + 4 - 36 + 24 - + 8 - - - 2000 - + + + 1536 + @@ -17,9 +18,6 @@ armv7l - - 1000 - 12 @@ -28,48 +26,4 @@ - - - aarch64 - - - 4 - - 36 - - - 1000 - - - 12 - - - - - - x86_64 - - - - 18 - - - - - - ppc64 - ppc64le - - - - 36 - - - 11 - - - 2500 - - -