diff -r 909f866430ee -r 1d5f5674df6c MozillaFirefox/MozillaFirefox.spec --- a/MozillaFirefox/MozillaFirefox.spec Sun Jun 28 08:52:27 2020 +0200 +++ b/MozillaFirefox/MozillaFirefox.spec Wed Oct 07 13:48:57 2020 +0200 @@ -17,6 +17,10 @@ # +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150100 +#!BuildIgnore: post-build-checks +%endif + # changed with every update # orig_version vs. mainver: To have beta-builds # FF70beta3 would be released as FF69.99 @@ -25,18 +29,16 @@ # orig_suffix b3 # major 69 # mainver %major.99 -%define major 77 -%define mainver %major.99 -%define orig_version 78.0 -%define orig_suffix b8 -%define update_channel beta +%define major 81 +%define mainver %major.0 +%define orig_version 81.0 +%define orig_suffix %{nil} +%define update_channel release %define branding 1 %define devpkg 1 -%if 0%{?suse_version} > 1500 # PGO builds do not work in TW currently (bmo#1642410) %define do_profiling 0 -%endif # upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 @@ -70,11 +72,11 @@ %else %define crashreporter 0 %endif -%if 0%{?sle_version} > 150100 +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150100 # pipewire is too old on Leap <15.1 +%define with_pipewire0_3 0 +%else %define with_pipewire0_3 1 -%else -%define with_pipewire0_3 0 %endif Name: %{pkgname} @@ -90,27 +92,28 @@ %else BuildRequires: gcc-c++ %endif -BuildRequires: cargo >= 1.41 +BuildRequires: cargo >= 1.43 +BuildRequires: ccache BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel BuildRequires: libidl-devel BuildRequires: libiw-devel BuildRequires: libproxy-devel BuildRequires: makeinfo -BuildRequires: mozilla-nspr-devel >= 4.25 -BuildRequires: mozilla-nss-devel >= 3.53.1 +BuildRequires: mozilla-nspr-devel >= 4.28 +BuildRequires: mozilla-nss-devel >= 3.56 BuildRequires: nasm >= 2.14 BuildRequires: nodejs10 >= 10.21.0 -BuildRequires: python-devel %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 BuildRequires: python-libxml2 BuildRequires: python36 %else -BuildRequires: python2-xml +BuildRequires: python3-devel BuildRequires: python3 >= 3.5 +BuildRequires: python3-curses %endif -BuildRequires: rust >= 1.41 -BuildRequires: rust-cbindgen >= 0.14.1 +BuildRequires: rust >= 1.43 +BuildRequires: rust-cbindgen >= 0.14.3 BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXt-devel @@ -188,7 +191,6 @@ Patch2: mozilla-kde.patch Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-aarch64-startup-crash.patch -Patch5: mozilla-bmo1463035.patch Patch6: mozilla-sandbox-fips.patch Patch7: mozilla-fix-aarch64-libopus.patch Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch @@ -210,16 +212,19 @@ Patch25: mozilla-bmo998749.patch Patch26: mozilla-bmo1626236.patch Patch27: mozilla-s390x-skia-gradient.patch +Patch28: mozilla-libavcodec58_91.patch +Patch29: revert-795c8762b16b.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch -%endif # only_print_mozconfig +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils shared-mime-info desktop-file-utils Requires(postun): shared-mime-info desktop-file-utils Requires: %{name}-branding >= 68 -Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr) -Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss) +%requires_ge mozilla-nspr +%requires_ge mozilla-nss +%requires_ge libfreetype6 Recommends: libcanberra0 Recommends: libpulse0 # addon leads to startup crash (bnc#908892) @@ -327,7 +332,6 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 @@ -351,10 +355,12 @@ %patch25 -p1 %patch26 -p1 %patch27 -p1 +%patch28 -p1 +%patch29 -p1 -R # Firefox %patch101 -p1 %patch102 -p1 -%endif # only_print_mozconfig +%endif %build %if !%{with only_print_mozconfig} @@ -377,9 +383,9 @@ echo fix kde helper version in the .spec file exit 1 fi -%endif # only_print_mozconfig source %{SOURCE4} +%endif export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo export MOZ_SOURCE_CHANGESET=$RELEASE_TAG @@ -390,6 +396,7 @@ export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 export MOZ_TELEMETRY_REPORTING=1 +export MACH_USE_SYSTEM_PYTHON=1 %if 0%{?suse_version} <= 1320 export CC=gcc-9 %else @@ -430,9 +437,7 @@ echo "" cat << EOF %else -%ifarch ppc64 ppc64le -%limit_build -m 2500 -%else +%ifarch aarch64 %arm %limit_build -m 2000 %endif cat << EOF > $MOZCONFIG @@ -465,6 +470,7 @@ #%endif ac_add_options --with-system-nspr ac_add_options --with-system-nss +ac_add_options --with-ccache %if %{localize} ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n %endif @@ -478,9 +484,11 @@ #ac_add_options --enable-chrome-format=jar ac_add_options --enable-update-channel=%{update_channel} ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} -ac_add_options --with-google-location-service-api-keyfile=%{SOURCE19} +# Google-service currently not available for free anymore +#ac_add_options --with-google-location-service-api-keyfile=%{SOURCE19} ac_add_options --with-google-safebrowsing-api-keyfile=%{SOURCE19} ac_add_options --with-unsigned-addon-scopes=app +ac_add_options --allow-addon-sideload %if %branding ac_add_options --enable-official-branding %endif @@ -522,6 +530,7 @@ ls -l config/external/icu/data rm -f config/external/icu/data/icudt*l.dat %endif +ccache -s %if 0%{?do_profiling} xvfb-run --server-args="-screen 0 1920x1080x24" \ %endif @@ -531,27 +540,51 @@ %if %localize mkdir -p %{buildroot}%{progdir}/browser/extensions truncate -s 0 %{_tmppath}/translations.{common,other} -sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ - | xargs -n 1 -I {} /bin/sh -c ' +# langpack-build can not be done in parallel easily (see https://bugzilla.mozilla.org/show_bug.cgi?id=1660943) +# Therefore, we have to have a separate obj-dir for each language +# We do this, by creating a mozconfig-template with the necessary switches +# and a placeholder obj-dir, which gets copied and modified for each language + +# Create mozconfig-template for langbuild +cat << EOF > ${MOZCONFIG}_LANG +mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj_LANG +. \$topsrcdir/browser/config/mozconfig +ac_add_options --prefix=%{_prefix} +ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n +ac_add_options --disable-updater +%if %branding +ac_add_options --enable-official-branding +%endif +EOF + +sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ + | xargs -n 1 %{?jobs:-P %jobs} -I {} /bin/sh -c ' locale=$1 - ./mach build langpack-$locale - cp -rL ../obj/dist/xpi-stage/locale-$locale \ - %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org + cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale + sed -i "s|obj_LANG|obj_$locale|" ${MOZCONFIG}_$locale + export MOZCONFIG=${MOZCONFIG}_$locale + # nsinstall is needed for langpack-build. It is already built by `./mach build`, but building it again is very fast + ./mach build config/nsinstall langpack-$locale + cp -L ../obj_$locale/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \ + %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi # remove prefs, profile defaults, and hyphenation from langpack - rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults - rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation + #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults + #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation # check against the fixed common list and sort into the right filelist _matched=0 for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do [ "$_match" = "$locale" ] && _matched=1 done [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other - echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ + echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \ >> %{_tmppath}/translations.$_l10ntarget ' -- {} %endif -%endif # only_print_mozconfig +ccache -s +%endif %install cd $RPM_BUILD_DIR/obj @@ -613,9 +646,9 @@ mkdir -p %{buildroot}%{_datadir}/mime/packages cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml # appdata -mkdir -p %{buildroot}%{_datadir}/appdata +mkdir -p %{buildroot}%{_datadir}/metainfo sed "s:firefox.desktop:%{desktop_file_name}:g" \ - %{SOURCE15} > %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml + %{SOURCE15} > %{buildroot}%{_datadir}/metainfo/%{desktop_file_name}.appdata.xml # install man-page mkdir -p %{buildroot}%{_mandir}/man1/ cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1 @@ -748,7 +781,7 @@ %{gnome_dir}/share/icons/hicolor/ %{_bindir}/%{progname} %doc %{_mandir}/man1/%{progname}.1.gz -%{_datadir}/appdata/ +%{_datadir}/metainfo/ %if 0%{?devpkg} %files devel