diff -r 52b1745787cf -r 146af4f081b9 MozillaFirefox/MozillaFirefox.spec --- a/MozillaFirefox/MozillaFirefox.spec Mon Nov 25 08:41:45 2019 +0100 +++ b/MozillaFirefox/MozillaFirefox.spec Thu Jun 11 22:04:26 2020 +0200 @@ -1,8 +1,8 @@ # # spec file for package MozillaFirefox # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. -# 2006-2019 Wolfgang Rosenauer +# Copyright (c) 2020 SUSE LLC +# 2006-2020 Wolfgang Rosenauer # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,18 @@ # changed with every update -%define major 70 -%define mainver %major.99 -%define orig_version 71.0 -%define orig_suffix b11 -%define update_channel beta +%define major 77 +%define mainver %major.0.1 +%define orig_version 77.0.1 +%define orig_suffix %{nil} +%define update_channel release %define branding 1 %define devpkg 1 -# always build with GCC as SUSE Security Team requires that +# PGO builds do not work in TW currently (bmo#1642410) +%define do_profiling 0 + +# upstream default is clang (to use gcc for large parts set to 0) %define clang_build 0 # PIE, full relro @@ -72,7 +75,7 @@ %else BuildRequires: gcc-c++ %endif -BuildRequires: cargo >= 1.37 +BuildRequires: cargo >= 1.41 BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel BuildRequires: libidl-devel @@ -80,15 +83,15 @@ BuildRequires: libnotify-devel BuildRequires: libproxy-devel BuildRequires: makeinfo -BuildRequires: mozilla-nspr-devel >= 4.23 -BuildRequires: mozilla-nss-devel >= 3.47.1 -BuildRequires: nasm >= 2.13 -BuildRequires: nodejs8 >= 8.11 +BuildRequires: mozilla-nspr-devel >= 4.25 +BuildRequires: mozilla-nss-devel >= 3.52.1 +BuildRequires: nasm >= 2.14 +BuildRequires: nodejs10 >= 10.19.0 BuildRequires: python-devel BuildRequires: python2-xml BuildRequires: python3 >= 3.5 -BuildRequires: rust >= 1.37 -BuildRequires: rust-cbindgen >= 0.9.1 +BuildRequires: rust >= 1.41 +BuildRequires: rust-cbindgen >= 0.14.1 BuildRequires: startup-notification-devel BuildRequires: unzip BuildRequires: update-desktop-files @@ -101,6 +104,7 @@ %if 0%{?suse_version} < 1550 BuildRequires: pkgconfig(gconf-2.0) >= 1.2.1 %endif +BuildRequires: clang-devel >= 5 BuildRequires: pkgconfig(gdk-x11-2.0) BuildRequires: pkgconfig(glib-2.0) >= 2.22 BuildRequires: pkgconfig(gobject-2.0) @@ -110,12 +114,6 @@ BuildRequires: pkgconfig(gtk+-unix-print-3.0) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libpulse) -%if 0%{?suse_version} > 1320 -BuildRequires: llvm-clang-devel >= 3.9.0 -%else -# this covers the workaround to compile on Leap 42 in OBS -BuildRequires: clang4-devel -%endif # libavcodec is required for H.264 support but the # openSUSE version is currently not able to play H.264 # therefore the Packman version is required @@ -137,7 +135,7 @@ Summary: Mozilla %{appname} Web Browser License: MPL-2.0 Group: Productivity/Networking/Web/Browsers -Url: http://www.mozilla.org/ +URL: http://www.mozilla.org/ %if !%{with only_print_mozconfig} Source: http://ftp.mozilla.org/pub/%{srcname}/releases/%{version}%{orig_suffix}/source/%{srcname}-%{orig_version}%{orig_suffix}.source.tar.xz Source1: MozillaFirefox.desktop @@ -147,11 +145,10 @@ Source7: l10n-%{orig_version}%{orig_suffix}.tar.xz Source8: firefox-mimeinfo.xml Source9: firefox.js -Source10: compare-locales.tar.xz Source11: firefox.1 Source12: mozilla-get-app-id Source13: spellcheck.js -Source14: https://github.com/openSUSE/firefox-scripts/raw/04d38e104a6ecdea33442755282688e8090ffa66/create-tar.sh +Source14: https://github.com/openSUSE/firefox-scripts/raw/8a54002/create-tar.sh Source15: firefox-appdata.xml Source16: %{name}.changes # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys @@ -167,7 +164,7 @@ Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-aarch64-startup-crash.patch Patch5: mozilla-bmo1463035.patch -Patch6: mozilla-cubeb-noreturn.patch +Patch6: mozilla-sandbox-fips.patch Patch7: mozilla-fix-aarch64-libopus.patch Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch Patch9: mozilla-s390-context.patch @@ -184,6 +181,7 @@ Patch20: mozilla-fix-top-level-asm.patch Patch21: mozilla-bmo1504834-part4.patch Patch22: mozilla-bmo849632.patch +Patch23: mozilla-bmo1634646.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -205,7 +203,7 @@ %if 0%{?suse_version} < 1220 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 %endif -##BuildArch: i686 x86_64 aarch64 ppc64le +ExcludeArch: armv6l armv6hl %description Mozilla Firefox is a standalone web browser, designed for standards @@ -290,7 +288,7 @@ exit 1 fi -%setup -q -n %{srcname}-%{orig_version} -b 7 -b 10 +%setup -q -n %{srcname}-%{orig_version} -b 7 %else %setup -q -n %{srcname}-%{orig_version} %endif @@ -319,6 +317,7 @@ %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 # Firefox %patch101 -p1 %patch102 -p1 @@ -380,7 +379,11 @@ echo "" cat << EOF %else +%ifarch ppc64 ppc64le +%limit_build -m 2500 +%else %limit_build -m 2000 +%endif cat << EOF > $MOZCONFIG %endif mk_add_options MOZILLA_OFFICIAL=1 @@ -392,7 +395,7 @@ ac_add_options --libdir=%{_libdir} ac_add_options --includedir=%{_includedir} ac_add_options --enable-release -ac_add_options --enable-default-toolkit=cairo-gtk3 +ac_add_options --enable-default-toolkit=cairo-gtk3-wayland %if 0%{?suse_version} >= 1550 ac_add_options --disable-gconf %endif @@ -402,11 +405,12 @@ %else ac_add_options --enable-debug-symbols %endif -%if 0%{?suse_version} > 1549 +# building with elf-hack started to fail everywhere with FF73 +#%if 0%{?suse_version} > 1549 %ifnarch aarch64 ppc64 ppc64le s390x ac_add_options --disable-elf-hack %endif -%endif +#%endif ac_add_options --with-system-nspr ac_add_options --with-system-nss %if %{localize} @@ -471,6 +475,31 @@ xvfb-run --server-args="-screen 0 1920x1080x24" \ %endif ./mach build -v + +# build additional locales +%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 ' + locale=$1 + ./mach build langpack-$locale + cp -rL ../obj/dist/xpi-stage/locale-$locale \ + %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org + # 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 + # 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 \ + >> %{_tmppath}/translations.$_l10ntarget +' -- {} +%endif + %endif # only_print_mozconfig %install @@ -499,35 +528,7 @@ install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/ # install browser prefs install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js -# build additional locales -%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 ' - locale=$1 - pushd $RPM_BUILD_DIR/compare-locales - PYTHONPATH=lib \ - scripts/compare-locales -m ../l10n-merged/$locale \ - ../%{srcname}-%{orig_version}/browser/locales/l10n.ini ../l10n $locale - popd - LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ - make -C browser/locales langpack-$locale - cp -rL dist/xpi-stage/locale-$locale \ - %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org - # 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 - # 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 \ - >> %{_tmppath}/translations.$_l10ntarget -' -- {} -%endif + # remove some executable permissions find %{buildroot}%{progdir} \ -name "*.js" -o \ @@ -572,10 +573,11 @@ # mkdir -p %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid} mkdir -p %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid} -mkdir -p %{buildroot}/usr/share/pixmaps/ -ln -sf %{progdir}/browser/chrome/icons/default/default128.png %{buildroot}/usr/share/pixmaps/%{progname}.png -ln -sf %{progdir}/browser/chrome/icons/default/default128.png %{buildroot}/usr/share/pixmaps/%{progname}-gnome.png %if %branding +# Install symbolic icon for GNOME +mkdir -p %{buildroot}%{gnome_dir}/share/icons/hicolor/symbolic/apps/ +cp %{_builddir}/%{srcname}-%{orig_version}/browser/branding/official/content/identity-icons-brand.svg \ + %{buildroot}%{gnome_dir}/share/icons/hicolor/symbolic/apps/%{progname}-symbolic.svg for size in 16 22 24 32 48 64 128 256; do %else for size in 16 32 48; do @@ -605,7 +607,7 @@ %%firefox_version %{version} %%firefox_mainver %{mainver} %%firefox_mozillapath %%{_libdir}/%{progname} -%%firefox_pluginsdir %%{_libdir}/browser-plugins +%%firefox_pluginsdir %%{_libdir}/mozilla/plugins %%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) @@ -659,8 +661,6 @@ %{progdir}/browser/defaults %{progdir}/browser/features/ %{progdir}/browser/chrome/icons -%{progdir}/browser/blocklist.xml -%{progdir}/browser/chrome.manifest %{progdir}/browser/omni.ja %dir %{progdir}/distribution/ %{progdir}/distribution/extensions/ @@ -672,7 +672,6 @@ %{progdir}/%{progname} %{progdir}/%{progname}-bin %{progdir}/application.ini -%{progdir}/chrome.manifest %{progdir}/dependentlibs.list %{progdir}/*.so %{progdir}/omni.ja @@ -689,7 +688,6 @@ %endif %{_datadir}/applications/%{desktop_file_name}.desktop %{_datadir}/mime/packages/%{progname}.xml -%{_datadir}/pixmaps/firefox* %dir %{_datadir}/mozilla %dir %{_datadir}/mozilla/extensions %dir %{_datadir}/mozilla/extensions/%{firefox_appid}