--- a/MozillaFirefox/MozillaFirefox.changes Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes Wed Oct 07 13:48:57 2020 +0200
@@ -1,18 +1,270 @@
-------------------------------------------------------------------
-Wed Jun 17 07:51:25 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
-
-- Mozilla Firefox 78.0b8
+Tue Sep 29 11:58:46 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- try to remove python2 dependencies
+
+-------------------------------------------------------------------
+Fri Sep 18 06:22:40 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 81.0
+ * https://www.mozilla.org/en-US/firefox/81.0/releasenotes
+ MFSA 2020-42 (bsc#1176756)
+ * CVE-2020-15675 (bmo#1654211)
+ Use-After-Free in WebGL
+ * CVE-2020-15677 (bmo#1641487)
+ Download origin spoofing via redirect
+ * CVE-2020-15676 (bmo#1646140)
+ XSS when pasting attacker-controlled data into a
+ contenteditable element
+ * CVE-2020-15678 (bmo#1660211)
+ When recursing through layers while scrolling, an iterator
+ may have become invalid, resulting in a potential use-after-
+ free scenario
+ * CVE-2020-15673 (bmo#1648493, bmo#1660800)
+ Memory safety bugs fixed in Firefox 81 and Firefox ESR 78.3
+ * CVE-2020-15674 (bmo#1656063, bmo#1656064, bmo#1656067, bmo#1660293)
+ Memory safety bugs fixed in Firefox 81
+- requires
+ NSPR 4.28
+ NSS 3.56
+- removed obsolete patches
+ * mozilla-system-nspr.patch
+ * mozilla-bmo1661715.patch
+ * mozilla-silence-no-return-type.patch
+- skip post-build-checks for 15.0 and 15.1
+- add revert-795c8762b16b.patch to fix LTO builds with gcc
+ (related to bmo#1644409)
+- require python3-curses as workaround to fix i586 build
+
+-------------------------------------------------------------------
+Thu Sep 17 11:45:31 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
+
+- Use %limit_build macro again for aarch64 and armv7, instead of
+ the new memoryperjob _constraints to use more workers
+
+-------------------------------------------------------------------
+Sat Sep 5 17:43:26 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- add mozilla-bmo1661715.patch to fix Flash plugin
+
+-------------------------------------------------------------------
+Wed Sep 2 17:11:19 UTC 2020 - Manfred Hollstein <manfred.h@gmx.net>
+
+- Mozilla Firefox 80.0.1: Bug fixes:
+ * Fixed a performance regression when encountering new intermediate
+ CA certificates (bmo#1661543)
+ * Fixed crashes possibly related to GPU resets (bmo#1627616)
+ * Fixed rendering on some sites using WebGL (bmo#1659225)
+ * Fixed the zoom-in keyboard shortcut on Japanese language builds
+ (bmo#1661895)
+ * Fixed download issues related to extensions and cookies
+ (bmo#1655190)
+- added mozilla-silence-no-return-type.patch
+
+-------------------------------------------------------------------
+Tue Aug 25 19:30:15 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- more whitelisting (/dev/random) for sandbox in relation to FIPS
+ (bsc#1174284)
+- improve langpack builds to use dedicated objdirs and make it
+ parallel again
+
+-------------------------------------------------------------------
+Sat Aug 22 06:52:01 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 80.0
+ MFSA 2020-36 (bsc#1175686)
+ * CVE-2020-15663 (bmo#1643199)
+ Downgrade attack on the Mozilla Maintenance Service could
+ have resulted in escalation of privilege
+ * CVE-2020-15664 (bmo#1658214)
+ Attacker-induced prompt for extension installation
+ * CVE-2020-12401 (bmo#1631573)
+ Timing-attack on ECDSA signature generation
+ * CVE-2020-6829 (bmo#1631583)
+ P-384 and P-521 vulnerable to an electro-magnetic side
+ channel attack on signature generation
+ * CVE-2020-12400 (bmo#1623116)
+ P-384 and P-521 vulnerable to a side channel attack on
+ modular inversion
+ * CVE-2020-15665 (bmo#1651636)
+ Address bar not reset when choosing to stay on a page after
+ the beforeunload dialog is shown
+ * CVE-2020-15666 (bmo#1450853)
+ MediaError message property leaks cross-origin response
+ status
+ * CVE-2020-15667 (bmo#1653371)
+ Heap overflow when processing an update file
+ * CVE-2020-15668 (bmo#1651520)
+ Data Race when reading certificate information
+ * CVE-2020-15670 (bmo#1651001, bmo#1651449, bmo#1653626,
+ bmo#1656957)
+ Memory safety bugs fixed in Firefox 80 and Firefox ESR 78.2
+- requires
+ * NSPR 4.27
+ * NSS 3.55
+- added mozilla-system-nspr.patch (bmo#1661096)
+- exclude ga-IE locale as it's failing to build
+- rollback parallelize locale build because it breaks bookmarks
+ (boo#1167976)
+- preserve original default bookmark file during langpack build
+ (boo#1167976)
+- add some ccache output during build
+
+-------------------------------------------------------------------
+Thu Aug 20 13:07:33 UTC 2020 - Martin Liška <mliska@suse.cz>
+
+- Use new memoryperjob _constraints instead of %limit_build macro.
+
+-------------------------------------------------------------------
+Mon Aug 10 09:19:38 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- use ccache for build
+- replace versioned RPM deps with requires_ge
+- parallelize locale build
+
+-------------------------------------------------------------------
+Thu Aug 6 14:37:16 UTC 2020 - Yunhe Guo <i@guoyunhe.me>
+
+- Change *.appdata.xml location to latest AppStream standard
+
+-------------------------------------------------------------------
+Thu Jul 23 21:00:34 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 79.0
+ MFSA 2020-30 (bsc#1174538)
+ * CVE-2020-15652 (bmo#1634872)
+ Potential leak of redirect targets when loading scripts in a worker
+ * CVE-2020-6514 (bmo#1642792)
+ WebRTC data channel leaks internal address to peer
+ * CVE-2020-15655 (bmo#1645204)
+ Extension APIs could be used to bypass Same-Origin Policy
+ * CVE-2020-15653 (bmo#1521542)
+ Bypassing iframe sandbox when allowing popups
+ * CVE-2020-6463 (bmo#1635293)
+ Use-after-free in ANGLE gl::Texture::onUnbindAsSamplerTexture
+ * CVE-2020-15656 (bmo#1647293)
+ Type confusion for special arguments in IonMonkey
+ * CVE-2020-15658 (bmo#1637745)
+ Overriding file type when saving to disk
+ * CVE-2020-15657 (bmo#1644954)
+ DLL hijacking due to incorrect loading path
+ * CVE-2020-15654 (bmo#1648333)
+ Custom cursor can overlay user interface
+ * CVE-2020-15659 (bmo#1550133, bmo#1633880, bmo#1638856,
+ bmo#1643613, bmo#1644839, bmo#1645835, bmo#1646006, bmo#1646220,
+ bmo#1646787, bmo#1649347, bmo#1650811, bmo#1651678)
+ Memory safety bugs fixed in Firefox 79
+- updated dependency requirements:
+ * mozilla-nspr >= 4.26
+ * mozilla-nss >= 3.54
+ * rust >= 1.43
+ * rust-cbindgen >= 0.14.3
+- removed obsolete patch
+ mozilla-bmo1463035.patch
+
+-------------------------------------------------------------------
+Tue Jul 21 21:31:20 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- fixed syntax issue in desktop file (boo#1174360)
+
+-------------------------------------------------------------------
+Fri Jul 17 15:07:45 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Add mozilla-libavcodec58_91.patch to link against updated
+ soversion of libavcodec (58.91) with ffmpeg >= 4.3.
+ (patch provided by Atri Bhattacharya <badshah400@gmail.com>
+- enable MOZ_USE_XINPUT2 for TW (again) (boo#1173320)
+ (Plasma 5.19.3 is now in TW)
+
+-------------------------------------------------------------------
+Sat Jul 11 11:08:06 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 78.0.2
+ * Fixed an accessibility regression in reader mode (bmo#1650922)
+ * Made the address bar more resilient to data corruption in the
+ user profile (bmo#1649981)
+ * Fixed a regression opening certain external applications (bmo#1650162)
+ MFSA 2020-28
+ * CVE pending (bmo#1644076)
+ X-Frame-Options bypass using object or embed tags
+- added desktop file actions
+- do not use XINPUT2 for the moment until Plasma 5.19.3 has landed
+ (boo#1173993)
+- rework langpack integration (boo#1173991)
+ * ship XPIs instead of directories
+ * allow addon sideloading
+ * mark signatures for langpacks non-mandatory
+ * do not autodisable user profile scopes
+- Google API key is not usable for geolocation service
+- fix pipewire support for TW (boo#1172903)
+
+-------------------------------------------------------------------
+Wed Jul 1 07:15:02 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 78.0.1
+ * Fixed an issue which could cause installed search engines to not
+ be visible when upgrading from a previous release.
+- enable MOZ_USE_XINPUT2 for TW (boo#1173320)
+
+-------------------------------------------------------------------
+Sun Jun 28 07:17:13 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+
+- Mozilla Firefox 78.0
* startup notifications now using Gtk instead of libnotify
+ * PDF downloads now show an option to open the PDF directly in Firefox
+ * Protections Dashboard (about:protections)
+ * WebRTC not interrupted by screensaver anymore
+ * disabled TLS 1.0 and 1.1 by default
+ MFSA 2020-24 (bsc#1173576)
+ * CVE-2020-12415 (bmo#1586630)
+ AppCache manifest poisoning due to url encoded character processing
+ * CVE-2020-12416 (bmo#1639734)
+ Use-after-free in WebRTC VideoBroadcaster
+ * CVE-2020-12417 (bmo#1640737)
+ Memory corruption due to missing sign-extension for ValueTags
+ on ARM64
+ * CVE-2020-12418 (bmo#1641303)
+ Information disclosure due to manipulated URL object
+ * CVE-2020-12419 (bmo#1643874)
+ Use-after-free in nsGlobalWindowInner
+ * CVE-2020-12420 (bmo#1643437)
+ Use-After-Free when trying to connect to a STUN server
+ * CVE-2020-12402 (bmo#1631597)
+ RSA Key Generation vulnerable to side-channel attack
+ * CVE-2020-12421 (bmo#1308251)
+ Add-On updates did not respect the same certificate trust
+ rules as software updates
+ * CVE-2020-12422 (bmo#1450353)
+ Integer overflow in nsJPEGEncoder::emptyOutputBuffer
+ * CVE-2020-12423 (bmo#1642400)
+ DLL Hijacking due to searching %PATH% for a library
+ * CVE-2020-12424 (bmo#1562600)
+ WebRTC permission prompt could have been bypassed by a
+ compromised content process
+ * CVE-2020-12425 (bmo#1634738)
+ Out of bound read in Date.parse()
+ * CVE-2020-12426 (bmo#1608068, bmo#1609951, bmo#1631187, bmo#1637682)
+ Memory safety bugs fixed in Firefox 78
- requires
- * NSS >= 3.53
+ * NSS >= 3.53.1
* nodejs >= 10.21
* Gtk+3 >= 3.14
-- removed obsolete patch
+- removed obsolete patches
* mozilla-s390-bigendian.patch
+ * mozilla-bmo1634646.patch
- Add mozilla-pipewire-0-3.patch for openSUSE >= 15.2 to build
WebRTC with pipewire support to enable screen sharing under
Wayland; also add BuildRequires: pkgconfig(libpipewire-0.3)
appropriately (boo#1172903).
+- adding SLE12 compatibility in spec file
+- add patches for s390x
+ * mozilla-bmo1602730.patch (bmo#1602730)
+ * mozilla-bmo1626236.patch (bmo#1626236)
+ * mozilla-bmo998749.patch (bmo#998749)
+ * mozilla-s390x-skia-gradient.patch
+- update create-tar.sh
+- Use same _constraints for ppc64 (BE) as ppc64le to avoid oom build failure
-------------------------------------------------------------------
Wed Jun 10 07:17:15 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
--- a/MozillaFirefox/MozillaFirefox.desktop Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/MozillaFirefox.desktop Wed Oct 07 13:48:57 2020 +0200
@@ -11,8 +11,16 @@
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-xpinstall;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Type=Application
-Actions=PrivateBrowsing;
+Actions=new-window;PrivateBrowsing;ProfileManager
+
+[Desktop Action new-window]
+Name=New Window
+Exec=%EXEC --new-window %u
[Desktop Action PrivateBrowsing]
Name=New Private Browsing Window
Exec=%EXEC --private-window %u
+
+[Desktop Action ProfileManager]
+Name=Profile Manager
+Exec=%EXEC --ProfileManager
--- 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
--- a/MozillaFirefox/_constraints Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/_constraints Wed Oct 07 13:48:57 2020 +0200
@@ -7,6 +7,9 @@
<memory>
<size unit="G">8</size>
</memory>
+ <memoryperjob>
+ <size unit="M">2000</size>
+ </memoryperjob>
</hardware>
<overwrite>
<conditions>
@@ -14,12 +17,15 @@
<arch>armv7l</arch>
</conditions>
<hardware>
+ <memoryperjob>
+ <size unit="M">1000</size>
+ </memoryperjob>
<disk>
<size unit="G">12</size>
</disk>
- <memory>
+ <physicalmemory>
<size unit="G">5</size>
- </memory>
+ </physicalmemory>
</hardware>
</overwrite>
<overwrite>
@@ -27,9 +33,13 @@
<arch>aarch64</arch>
</conditions>
<hardware>
- <memory>
+ <processors>4</processors>
+ <memoryperjob>
+ <size unit="M">1000</size>
+ </memoryperjob>
+ <physicalmemory>
<size unit="G">12</size>
- </memory>
+ </physicalmemory>
</hardware>
</overwrite>
<overwrite>
@@ -44,6 +54,7 @@
</overwrite>
<overwrite>
<conditions>
+ <arch>ppc64</arch>
<arch>ppc64le</arch>
</conditions>
<hardware>
@@ -53,6 +64,9 @@
<physicalmemory>
<size unit="G">10</size>
</physicalmemory>
+ <memoryperjob>
+ <size unit="M">2500</size>
+ </memoryperjob>
</hardware>
</overwrite>
</constraints>
--- a/MozillaFirefox/create-tar.sh Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/create-tar.sh Wed Oct 07 13:48:57 2020 +0200
@@ -181,10 +181,7 @@
BUILD_ID=$(get_build_number "$VERSION$VERSION_SUFFIX")
if [ -z ${SKIP_LOCALES+x} ]; then
- # TODO: Thunderbird has usually "default" as locale entry.
- # There we probably need to double-check Firefox-locals
- # For now, just download every time for Thunderbird
- if [ "$PRODUCT" = "firefox" ] && [ "$PREV_VERSION" != "" ] && locales_unchanged "$BUILD_ID"; then
+ if [ "$PREV_VERSION" != "" ] && locales_unchanged "$BUILD_ID"; then
printf "%-40s: Did not change. Skipping.\n" "locales"
LOCALES_CHANGED=0
else
--- a/MozillaFirefox/firefox.1 Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/firefox.1 Wed Oct 07 13:48:57 2020 +0200
@@ -60,7 +60,7 @@
\fB\-\-UILocale\fR \fIlocale\fR
Start with \fIlocale\fR resources as UI Locale.
.TP
-\fB\-\-save\-mode\fR
+\fB\-\-safe\-mode\fR
Disables extensions and themes for this session.
.TP
\fB\-\-headless\fR
--- a/MozillaFirefox/firefox.js Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/firefox.js Wed Oct 07 13:48:57 2020 +0200
@@ -2,6 +2,7 @@
pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
/* Disable DoH by default */
pref("network.trr.mode", 5);
-// do not disable system-global or app-global extensions
-pref("extensions.autoDisableScopes", 3);
+// do not disable any scope
+pref("extensions.autoDisableScopes", 0);
pref("extensions.shownSelectionUI", true);
+pref("extensions.langpacks.signatures.required", false);
--- a/MozillaFirefox/mozilla-bmo1463035.patch Sun Jun 28 08:52:27 2020 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-bmo1463035.patch
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-libavcodec58_91.patch Wed Oct 07 13:48:57 2020 +0200
@@ -0,0 +1,1 @@
+../mozilla-libavcodec58_91.patch
\ No newline at end of file
--- a/MozillaFirefox/mozilla.sh.in Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/mozilla.sh.in Wed Oct 07 13:48:57 2020 +0200
@@ -58,6 +58,8 @@
MOZ_DIST_LIB="%PROGDIR"
MOZ_APPNAME="%APPNAME"
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME"
+MOZ_LANGPACKS_DIR="$MOZ_DIST_LIB/langpacks"
+MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh"
if [ "$0" = "$MOZ_APP_LAUNCHER" ]; then
@@ -87,9 +89,85 @@
export MOZ_ENABLE_WAYLAND=1
fi
-# enable xinput2 (boo#1032003)
-# breaks too many things right now (boo#1053959)
-#export MOZ_USE_XINPUT2=1
+##
+## Use D-Bus remote exclusively when there's Wayland display.
+##
+if [ "$WAYLAND_DISPLAY" ]; then
+ export MOZ_DBUS_REMOTE=1
+fi
+
+# xinput2 (boo#1173320)
+source /etc/os-release
+if [ "$ID" = "opensuse-tumbleweed" ]; then
+ export MOZ_USE_XINPUT2=1
+fi
+
+##
+## To disable the use of Firefox localization handling for
+## the home profile, set MOZ_DISABLE_LANGPACKS=1
+## in your environment before launching Firefox.
+## currently disabled by default since langpacks
+## are shipped as app sideloading addons
+##
+#
+MOZ_DISABLE_LANGPACKS=1
+export MOZ_DISABLE_LANGPACKS
+#
+
+##
+## Automatically installed langpacks are tracked by .suse-langpack-install
+## config file.
+##
+SUSE_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.suse-langpack-install"
+
+# MOZ_DISABLE_LANGPACKS disables language packs completely
+MOZILLA_DOWN=0
+if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
+ if [ -x $MOZ_PROGRAM ]; then
+ # Is firefox running?
+ /bin/pidof %APPNAME% > /dev/null 2>&1
+ MOZILLA_DOWN=$?
+ fi
+fi
+
+# Modify language pack configuration only when firefox is not running
+# and language packs are not disabled
+if [ $MOZILLA_DOWN -ne 0 ]; then
+ # Clear already installed langpacks
+ mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR
+ if [ -f $SUSE_LANGPACK_CONFIG ]; then
+ rm `cat $SUSE_LANGPACK_CONFIG` > /dev/null 2>&1
+ rm $SUSE_LANGPACK_CONFIG > /dev/null 2>&1
+ # remove all empty langpacks dirs while they block installation of langpacks
+ rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1
+ fi
+ # Get locale from system
+ CURRENT_LOCALE=$LC_ALL
+ CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
+ CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
+ # Try with a local variant first, then without a local variant
+ SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g" | sed "s|\..*||g"`
+ MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g" | sed "s|\..*||g"`
+ function create_langpack_link() {
+ local language=$*
+ local langpack=langpack-${language}@firefox.mozilla.org.xpi
+ if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then
+ rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+ # If the target file is a symlink (the fallback langpack),
+ # install the original file instead of the fallback one
+ if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then
+ langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack`
+ fi
+ ln -s $MOZ_LANGPACKS_DIR/$langpack \
+ $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+ echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $SUSE_LANGPACK_CONFIG
+ return 0
+ fi
+ return 1
+ }
+ create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true
+fi
+
moz_debug=0
script_args=""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/revert-795c8762b16b.patch Wed Oct 07 13:48:57 2020 +0200
@@ -0,0 +1,1 @@
+../revert-795c8762b16b.patch
\ No newline at end of file
--- a/MozillaFirefox/tar_stamps Sun Jun 28 08:52:27 2020 +0200
+++ b/MozillaFirefox/tar_stamps Wed Oct 07 13:48:57 2020 +0200
@@ -1,11 +1,11 @@
PRODUCT="firefox"
-CHANNEL="beta"
-VERSION="78.0"
-VERSION_SUFFIX="b8"
-PREV_VERSION="78.0b7"
+CHANNEL="release"
+VERSION="81.0"
+VERSION_SUFFIX=""
+PREV_VERSION="80.0.1"
PREV_VERSION_SUFFIX=""
#SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation
-RELEASE_REPO="https://hg.mozilla.org/releases/mozilla-beta"
-RELEASE_TAG="7e670bc63fef7995f5ae856b51c34c518e26ea74"
-RELEASE_TIMESTAMP="20200616235426"
+RELEASE_REPO="https://hg.mozilla.org/releases/mozilla-release"
+RELEASE_TAG="080f865dcb5a2427138f686afa8e72ba81936743"
+RELEASE_TIMESTAMP="20200917005511"
--- a/firefox-branded-icons.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/firefox-branded-icons.patch Wed Oct 07 13:48:57 2020 +0200
@@ -1,6 +1,6 @@
# HG changeset patch
# Parent e0751ad74e835e80041a61ea00c2a63bf6fbe2de
-# Parent 91064bb25b378c1fdcc2d99a89aeaf5e821b1689
+# Parent fe8ed2b997914bef9446d854a4c189fb69394bac
diff --git a/browser/branding/branding-common.mozbuild b/browser/branding/branding-common.mozbuild
--- a/browser/branding/branding-common.mozbuild
@@ -24,9 +24,9 @@
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
-@@ -249,20 +249,23 @@
- @RESPATH@/browser/chrome/pdfjs.manifest
- @RESPATH@/browser/chrome/pdfjs/*
+@@ -252,20 +252,23 @@
+ @RESPATH@/chrome/pdfjs.manifest
+ @RESPATH@/chrome/pdfjs/*
@RESPATH@/chrome/toolkit@JAREXT@
@RESPATH@/chrome/toolkit.manifest
@RESPATH@/chrome/recording.manifest
--- a/firefox-kde.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/firefox-kde.patch Wed Oct 07 13:48:57 2020 +0200
@@ -3,7 +3,7 @@
# Date 1559300151 -7200
# Fri May 31 12:55:51 2019 +0200
# Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
-# Parent 0fd58e0df883086574263e0881e1503cf110562a
+# Parent 3804871eac4171b99e9049dbc881b5304b5ac207
How to apply this patch:
1. Import and apply it
2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
@@ -14,7 +14,7 @@
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
-@@ -336,16 +336,23 @@ var gMainPane = {
+@@ -335,16 +335,23 @@ var gMainPane = {
}, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
};
@@ -38,7 +38,7 @@
);
let performanceSettingsUrl =
Services.urlFormatter.formatURLPref("app.support.baseURL") +
-@@ -1301,16 +1308,27 @@ var gMainPane = {
+@@ -1291,16 +1298,27 @@ var gMainPane = {
this._backoffIndex = 0;
let shellSvc = getShellService();
@@ -139,7 +139,7 @@
+ if (!str)
+ return NS_ERROR_FAILURE;
+
-+ str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
++ str->SetData("ISDEFAULTBROWSER"_ns);
+ command->AppendElement( str );
+
+ if( nsKDEUtils::command( command ))
@@ -160,10 +160,10 @@
+ if (!cmdstr || !paramstr)
+ return NS_ERROR_FAILURE;
+
-+ cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
++ cmdstr->SetData("SETDEFAULTBROWSER"_ns);
+ command->AppendElement( cmdstr );
+
-+ paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
++ paramstr->SetData( aClaimAllTypes ? "ALLTYPES"_ns : "NORMAL"_ns );
+ command->AppendElement( paramstr );
+
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
--- a/mozilla-bmo1463035.patch Sun Jun 28 08:52:27 2020 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-
-# HG changeset patch
-# User Mike Hommey <mh+mozilla@glandium.org>
-# Date 1526871862 -32400
-# Node ID 94f21505ff13cd089f7129cd24927cf8b31a0f43
-# Parent 0b7e1398ca2e15e27da93144ba9fb30db38367b1
-Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r?darchons
-
-For some reason, GNU as is not happy with the assembly generated after
-bug 1238661 anymore on Debian armel.
-
-OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
-workaround anymore, so let's just kill it.
-
-diff --git a/mozglue/baseprofiler/core/platform-linux-android.cpp b/mozglue/baseprofiler/core/platform-linux-android.cpp
---- a/mozglue/baseprofiler/core/platform-linux-android.cpp
-+++ b/mozglue/baseprofiler/core/platform-linux-android.cpp
-@@ -55,17 +55,16 @@
- #ifdef __GLIBC__
- # include <execinfo.h> // backtrace, backtrace_symbols
- #endif // def __GLIBC__
- #include <strings.h> // index
- #include <errno.h>
- #include <stdarg.h>
-
- #include "prenv.h"
--#include "mozilla/LinuxSignal.h"
- #include "mozilla/PodOperations.h"
- #include "mozilla/DebugOnly.h"
-
- #include <string.h>
- #include <list>
-
- using namespace mozilla;
-
-@@ -266,17 +265,17 @@ Sampler::Sampler(PSLockRef aLock)
-
- // NOTE: We don't initialize LUL here, instead initializing it in
- // SamplerThread's constructor. This is because with the
- // profiler_suspend_and_sample_thread entry point, we want to be able to
- // sample without waiting for LUL to be initialized.
-
- // Request profiling signals.
- struct sigaction sa;
-- sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
-+ sa.sa_sigaction = SigprofHandler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART | SA_SIGINFO;
- if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
- MOZ_CRASH("Error installing SIGPROF handler in the profiler");
- }
- }
-
- void Sampler::Disable(PSLockRef aLock) {
-diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
---- a/tools/profiler/core/platform-linux-android.cpp
-+++ b/tools/profiler/core/platform-linux-android.cpp
-@@ -258,17 +258,17 @@ Sampler::Sampler(PSLockRef aLock)
-
- // NOTE: We don't initialize LUL here, instead initializing it in
- // SamplerThread's constructor. This is because with the
- // profiler_suspend_and_sample_thread entry point, we want to be able to
- // sample without waiting for LUL to be initialized.
-
- // Request profiling signals.
- struct sigaction sa;
-- sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
-+ sa.sa_sigaction = SigprofHandler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART | SA_SIGINFO;
- if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
- MOZ_CRASH("Error installing SIGPROF handler in the profiler");
- }
- }
-
- void Sampler::Disable(PSLockRef aLock) {
--- a/mozilla-kde.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/mozilla-kde.patch Wed Oct 07 13:48:57 2020 +0200
@@ -3,7 +3,7 @@
# Date 1559294891 -7200
# Fri May 31 11:28:11 2019 +0200
# Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112
-# Parent aa58e8c70d1448a08407c6c191ea8b76d61e8bf6
+# Parent e89d21ead66fbb34b6349edda42748a3ad9e6136
Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com>
@@ -31,7 +31,7 @@
#ifdef MOZ_MEMORY
# include "mozmemory.h"
#endif
-@@ -4566,25 +4567,37 @@ nsresult Preferences::InitInitialObjects
+@@ -4536,25 +4537,37 @@ nsresult Preferences::InitInitialObjects
// application pref files for backwards compatibility.
static const char* specialFiles[] = {
#if defined(XP_MACOSX)
@@ -69,7 +69,7 @@
// Load jar:$app/omni.jar!/defaults/preferences/*.js
// or jar:$gre/omni.jar!/defaults/preferences/*.js.
-@@ -4630,17 +4643,17 @@ nsresult Preferences::InitInitialObjects
+@@ -4600,17 +4613,17 @@ nsresult Preferences::InitInitialObjects
}
nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
@@ -91,7 +91,7 @@
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
-@@ -114,16 +114,20 @@ EXPORTS.mozilla += [
+@@ -118,16 +118,20 @@ EXPORTS.mozilla += [
]
EXPORTS.mozilla += sorted(['!' + g for g in gen_h])
@@ -106,12 +106,12 @@
+
gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
- GENERATED_FILES += [gen_all_tuple]
+ GeneratedFile(*gen_all_tuple, script='init/generate_static_pref_list.py',
+ entry_point='emit_code', inputs=['init/StaticPrefList.yaml'])
- static_pref_list = GENERATED_FILES[gen_all_tuple]
- static_pref_list.script = 'init/generate_static_pref_list.py:emit_code'
- static_pref_list.inputs = ['init/StaticPrefList.yaml']
-
+ PYTHON_UNITTEST_MANIFESTS += [
+ 'test/python.ini',
+ ]
diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py
--- a/python/mozbuild/mozpack/chrome/flags.py
+++ b/python/mozbuild/mozpack/chrome/flags.py
@@ -157,7 +157,7 @@
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
--- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build
-@@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [
+@@ -45,10 +45,14 @@ XPCOM_MANIFESTS += [
if CONFIG['MOZ_PLACES']:
EXTRA_JS_MODULES += [
@@ -175,7 +175,7 @@
diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm
--- a/toolkit/mozapps/downloads/HelperAppDlg.jsm
+++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm
-@@ -1203,36 +1203,66 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -1239,36 +1239,66 @@ nsUnknownContentTypeDialog.prototype = {
params.handlerApp &&
params.handlerApp.executable &&
params.handlerApp.executable.isFile()
@@ -302,7 +302,7 @@
nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) {
// dbus prevents us from being threadsafe, but this routine should not block
// anyhow
-@@ -384,21 +387,50 @@ nsresult nsUnixSystemProxySettings::GetP
+@@ -381,21 +384,50 @@ nsresult nsUnixSystemProxySettings::GetP
return NS_OK;
}
@@ -338,7 +338,7 @@
+ url += nsPrintfCString("%d", aPort);
+ }
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "GETPROXY" ));
++ command.AppendElement( "GETPROXY"_ns );
+ command.AppendElement( url );
+ nsTArray<nsCString> result;
+ if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 )
@@ -356,7 +356,7 @@
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
-@@ -88,17 +88,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+@@ -90,17 +90,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
'../components/printingui',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@@ -454,8 +454,8 @@
+static bool getKdeSupport()
+ {
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "CHECK" ));
-+ command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION )));
++ command.AppendElement( "CHECK"_ns );
++ command.AppendElement( "KMOZILLAHELPER_VERSION"_ns );
+ bool kde = nsKDEUtils::command( command );
+#ifdef DEBUG_KDE
+ fprintf( stderr, "KDE RUNNING %d\n", kde );
@@ -991,7 +991,7 @@
+nsKDERegistry::HandlerExists(const char *aProtocolScheme)
+{
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" ));
++ command.AppendElement( "HANDLEREXISTS"_ns );
+ command.AppendElement( nsAutoCString( aProtocolScheme ));
+ return nsKDEUtils::command( command );
+}
@@ -1000,7 +1000,7 @@
+nsKDERegistry::LoadURL(nsIURI *aURL)
+{
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "OPEN" ));
++ command.AppendElement( "OPEN"_ns );
+ nsCString url;
+ aURL->GetSpec( url );
+ command.AppendElement( url );
@@ -1016,7 +1016,7 @@
+ nsAString& aDesc)
+{
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "GETAPPDESCFORSCHEME" ));
++ command.AppendElement( "GETAPPDESCFORSCHEME"_ns );
+ command.AppendElement( aScheme );
+ nsTArray<nsCString> output;
+ if( nsKDEUtils::command( command, &output ) && output.Length() == 1 )
@@ -1029,7 +1029,7 @@
+{
+ NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot");
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "GETFROMEXTENSION" ));
++ command.AppendElement( "GETFROMEXTENSION"_ns );
+ command.AppendElement( aFileExt );
+ return GetFromHelper( command );
+}
@@ -1038,7 +1038,7 @@
+nsKDERegistry::GetFromType(const nsACString& aMIMEType)
+{
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "GETFROMTYPE" ));
++ command.AppendElement( "GETFROMTYPE"_ns );
+ command.AppendElement( aMIMEType );
+ return GetFromHelper( command );
+}
@@ -1171,9 +1171,9 @@
+ bool supports;
+ if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) {
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "OPEN" ));
++ command.AppendElement( "OPEN"_ns );
+ command.AppendElement( nativePath );
-+ command.AppendElement( NS_LITERAL_CSTRING( "MIMETYPE" ));
++ command.AppendElement( "MIMETYPE"_ns );
+ command.AppendElement( mSchemeOrType );
+ if( nsKDEUtils::command( command ))
+ return NS_OK;
@@ -1214,7 +1214,7 @@
#include "nsIFileStreams.h"
#include "nsILineInputStream.h"
#include "nsIFile.h"
-@@ -1022,17 +1022,17 @@ nsresult nsOSHelperAppService::GetHandle
+@@ -1019,17 +1019,17 @@ nsresult nsOSHelperAppService::GetHandle
nsresult nsOSHelperAppService::OSProtocolHandlerExists(
const char* aProtocolScheme, bool* aHandlerExists) {
@@ -1233,7 +1233,7 @@
nsCOMPtr<nsIHandlerService> handlerSvc =
do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && handlerSvc) {
-@@ -1042,17 +1042,17 @@ nsresult nsOSHelperAppService::OSProtoco
+@@ -1039,17 +1039,17 @@ nsresult nsOSHelperAppService::OSProtoco
}
return rv;
@@ -1252,7 +1252,7 @@
NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol(
const nsACString& aScheme, bool* _retval) {
-@@ -1139,17 +1139,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
+@@ -1136,17 +1136,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
nsresult rv =
LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
minorType, mime_types_description, true);
@@ -1271,7 +1271,7 @@
rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
minorType, mime_types_description, false);
-@@ -1251,17 +1251,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
+@@ -1247,17 +1247,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
// Now look up our extensions
nsAutoString extensions, mime_types_description;
@@ -1293,15 +1293,15 @@
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
-@@ -131,16 +131,17 @@ include('/ipc/chromium/chromium-config.m
-
- FINAL_LIBRARY = 'xul'
+@@ -134,16 +134,17 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/layout/base',
+ '/layout/forms',
'/layout/generic',
'/layout/xul',
'/other-licenses/atk-1.0',
+ '/third_party/cups/include',
+ '/toolkit/xre',
'/widget',
'/widget/headless',
@@ -1534,10 +1534,10 @@
+ }
+ command.AppendElement( title );
+ if( mMode == nsIFilePicker::modeOpenMultiple )
-+ command.AppendElement( NS_LITERAL_CSTRING( "MULTIPLE" ));
++ command.AppendElement( "MULTIPLE"_ns );
+ if( PRInt32 xid = windowToXid( mParentWidget ))
+ {
-+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
++ command.AppendElement( "PARENT"_ns );
+ nsAutoCString parent;
+ parent.AppendInt( xid );
+ command.AppendElement( parent );
@@ -1625,11 +1625,11 @@
+ title.Adopt(ToNewUTF8String(mTitle));
+
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "APPSDIALOG" ));
++ command.AppendElement( "APPSDIALOG"_ns );
+ command.AppendElement( title );
+ if( PRInt32 xid = windowToXid( mParentWidget ))
+ {
-+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
++ command.AppendElement( "PARENT"_ns );
+ nsAutoCString parent;
+ parent.AppendInt( xid );
+ command.AppendElement( parent );
@@ -1703,25 +1703,25 @@
int argc;
bool ischrome;
-@@ -394,16 +395,17 @@ void ParseManifest(NSLocationType aType,
- NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
- NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
- NS_NAMED_LITERAL_STRING(kApplication, "application");
- NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
- NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
- NS_NAMED_LITERAL_STRING(kOs, "os");
- NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
- NS_NAMED_LITERAL_STRING(kABI, "abi");
-+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop");
- NS_NAMED_LITERAL_STRING(kProcess, "process");
+@@ -393,16 +394,17 @@ void ParseManifest(NSLocationType aType,
+ constexpr auto kRemoteEnabled = u"remoteenabled"_ns;
+ constexpr auto kRemoteRequired = u"remoterequired"_ns;
+ constexpr auto kApplication = u"application"_ns;
+ constexpr auto kAppVersion = u"appversion"_ns;
+ constexpr auto kGeckoVersion = u"platformversion"_ns;
+ constexpr auto kOs = u"os"_ns;
+ constexpr auto kOsVersion = u"osversion"_ns;
+ constexpr auto kABI = u"abi"_ns;
++ constexpr auto kDesktop = u"desktop"_ns;
+ constexpr auto kProcess = u"process"_ns;
#if defined(MOZ_WIDGET_ANDROID)
- NS_NAMED_LITERAL_STRING(kTablet, "tablet");
+ constexpr auto kTablet = u"tablet"_ns;
#endif
- NS_NAMED_LITERAL_STRING(kMain, "main");
- NS_NAMED_LITERAL_STRING(kContent, "content");
+ constexpr auto kMain = u"main"_ns;
+ constexpr auto kContent = u"content"_ns;
-@@ -449,39 +451,44 @@ void ParseManifest(NSLocationType aType,
+@@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType,
CopyUTF8toUTF16(s, abi);
abi.Insert(char16_t('_'), 0);
abi.Insert(osTarget, 0);
@@ -1739,17 +1739,17 @@
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion,
info.dwMinorVersion);
}
-+ desktop = NS_LITERAL_STRING("win");
++ desktop = u"win"_ns;
# pragma warning(pop)
#elif defined(MOZ_WIDGET_COCOA)
SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor();
SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor();
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion);
-+ desktop = NS_LITERAL_STRING("macosx");
++ desktop = u"macosx"_ns);
#elif defined(MOZ_WIDGET_GTK)
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version,
gtk_minor_version);
-+ desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
++ desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns;
#elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) {
@@ -1757,7 +1757,7 @@
"android/os/Build$VERSION", "RELEASE", osVersion);
isTablet = java::GeckoAppShell::IsTablet();
}
-+ desktop = NS_LITERAL_STRING("android");
++ desktop = u"android"_ns;
#endif
if (XRE_IsContentProcess()) {
@@ -1766,7 +1766,7 @@
process = kMain;
}
-@@ -568,25 +575,27 @@ void ParseManifest(NSLocationType aType,
+@@ -567,25 +574,27 @@ void ParseManifest(NSLocationType aType,
TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified;
TriState stABI = eUnspecified;
@@ -1794,7 +1794,7 @@
continue;
}
-@@ -623,17 +632,17 @@ void ParseManifest(NSLocationType aType,
+@@ -622,17 +631,17 @@ void ParseManifest(NSLocationType aType,
}
LogMessageWithContext(
@@ -1907,7 +1907,7 @@
#endif
+ if(nsKDEUtils::kdeSupport()) {
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING("REVEAL") );
++ command.AppendElement( "REVEAL"_ns );
+ command.AppendElement( mPath );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
@@ -1927,7 +1927,7 @@
#ifdef MOZ_WIDGET_GTK
+ if( nsKDEUtils::kdeSupport()) {
+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING("OPEN") );
++ command.AppendElement( "OPEN"_ns );
+ command.AppendElement( mPath );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-libavcodec58_91.patch Wed Oct 07 13:48:57 2020 +0200
@@ -0,0 +1,20 @@
+Index: firefox-78.0.2/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+===================================================================
+--- firefox-78.0.2.orig/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
++++ firefox-78.0.2/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+@@ -30,6 +30,7 @@ static FFmpegLibWrapper sLibAV;
+ static const char* sLibs[] = {
+ // clang-format off
+ #if defined(XP_DARWIN)
++ "libavcodec.58.91.dylib",
+ "libavcodec.58.dylib",
+ "libavcodec.57.dylib",
+ "libavcodec.56.dylib",
+@@ -37,6 +38,7 @@ static const char* sLibs[] = {
+ "libavcodec.54.dylib",
+ "libavcodec.53.dylib",
+ #else
++ "libavcodec.so.58.91",
+ "libavcodec.so.58",
+ "libavcodec-ffmpeg.so.58",
+ "libavcodec-ffmpeg.so.57",
--- a/mozilla-nongnome-proxies.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/mozilla-nongnome-proxies.patch Wed Oct 07 13:48:57 2020 +0200
@@ -3,7 +3,7 @@
# Date 1558442915 -7200
# Tue May 21 14:48:35 2019 +0200
# Node ID 6bcf2dfebc1ea2aa34e5cc61152709fc8e409dc5
-# Parent dc1684693eed684bdafeff0ad78d4f6d288fcae1
+# Parent bd5d1f49975deb730064a16b3079edb53c4a5f84
Do not use gconf for proxy settings if not running within Gnome
Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
===================================================================
@@ -13,7 +13,7 @@
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
-@@ -49,21 +49,24 @@ NS_IMETHODIMP
+@@ -49,20 +49,24 @@ NS_IMETHODIMP
nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) {
// dbus prevents us from being threadsafe, but this routine should not block
// anyhow
@@ -24,15 +24,14 @@
void nsUnixSystemProxySettings::Init() {
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
- if (mGSettings) {
-- mGSettings->GetCollectionForSchema(
-- NS_LITERAL_CSTRING("org.gnome.system.proxy"),
-- getter_AddRefs(mProxySettings));
+- mGSettings->GetCollectionForSchema("org.gnome.system.proxy"_ns,
+- getter_AddRefs(mProxySettings));
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) {
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ if (mGSettings) {
+ mGSettings->GetCollectionForSchema(
-+ NS_LITERAL_CSTRING("org.gnome.system.proxy"),
++ "org.gnome.system.proxy"_ns,
+ getter_AddRefs(mProxySettings));
+ }
}
@@ -42,4 +41,4 @@
if (mProxySettings) {
nsCString proxyMode;
// Check if mode is auto
- nsresult rv =
+ nsresult rv = mProxySettings->GetString("mode"_ns, proxyMode);
--- a/mozilla-pipewire-0-3.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/mozilla-pipewire-0-3.patch Wed Oct 07 13:48:57 2020 +0200
@@ -1,8 +1,15 @@
+# HG changeset patch
+# Parent 5bd7b491505076dc38ba1efc7c406b9c53ba8389
+
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
-index 2081d0c683a4..641133bf1ea4 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
-@@ -314,6 +314,7 @@ system_headers = [
+@@ -309,16 +309,17 @@ system_headers = [
+ 'gdk/gdkkeysyms.h',
+ 'gdk/gdkprivate.h',
+ 'gdk/gdkwayland.h',
+ 'gdk/gdkx.h',
+ 'gdk-pixbuf/gdk-pixbuf.h',
'Gestalt.h',
'getopt.h',
'gio/gio.h',
@@ -10,7 +17,17 @@
'glibconfig.h',
'glib.h',
'glib-object.h',
-@@ -607,6 +608,7 @@ system_headers = [
+ 'glob.h',
+ 'gmodule.h',
+ 'gnome.h',
+ 'gnu/libc-version.h',
+ 'gps.h',
+@@ -602,16 +603,17 @@ system_headers = [
+ 'pango/pangoxft.h',
+ 'pascal.h',
+ 'Patches.h',
+ 'Path.h',
+ 'pcfs/pc_dir.h',
'Pgenerr.h',
'PGenErr.h',
'Ph.h',
@@ -18,11 +35,20 @@
'pixman.h',
'pk11func.h',
'pk11pqg.h',
+ 'pk11priv.h',
+ 'pk11pub.h',
+ 'pk11sdr.h',
+ 'pkcs11f.h',
+ 'pkcs11.h',
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
-index ba885217b3ba..201d3b755221 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
-@@ -158,7 +158,7 @@ if (rtc_include_tests) {
+@@ -153,17 +153,17 @@ if (rtc_include_tests) {
+ "../../test:test_support",
+ ]
+ }
+ }
+
if (is_linux) {
if (rtc_use_pipewire) {
pkg_config("pipewire") {
@@ -31,11 +57,20 @@
defines = [ "WEBRTC_USE_PIPEWIRE" ]
}
+
+ pkg_config("gio") {
+ packages = [
+ "gio-2.0",
+ "gio-unix-2.0",
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
-index 90b40431c7e4..d844aa79d591 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
-@@ -194,6 +194,30 @@ if CONFIG["OS_TARGET"] == "Linux":
+@@ -112,16 +112,39 @@ if CONFIG["OS_TARGET"] == "DragonFly":
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/x_atom_cache.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/x_error_trap.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc",
"/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc"
]
@@ -62,15 +97,23 @@
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc"
+ ]
+
-+
- if CONFIG["OS_TARGET"] == "NetBSD":
+ if CONFIG["OS_TARGET"] == "FreeBSD":
DEFINES["USE_X11"] = "1"
+ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+
+ OS_LIBS += [
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
-index 1eb8ead26efa..316468eed1fc 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h
-@@ -141,7 +141,7 @@ class DesktopCaptureOptions {
+@@ -136,15 +136,15 @@ class DesktopCaptureOptions {
+ #if defined(USE_X11)
+ bool use_update_notifications_ = false;
+ #else
+ bool use_update_notifications_ = true;
+ #endif
bool disable_effects_ = true;
bool detect_updated_region_ = false;
#if defined(WEBRTC_USE_PIPEWIRE)
@@ -79,11 +122,18 @@
#endif
};
+ } // namespace webrtc
+
+ #endif // MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
-index 379341c833de..76349f1fbd4d 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
-@@ -15,8 +15,11 @@
+@@ -10,18 +10,21 @@
+
+ #include "modules/desktop_capture/linux/base_capturer_pipewire.h"
+
+ #include <gio/gunixfdlist.h>
+ #include <glib-object.h>
#include <spa/param/format-utils.h>
#include <spa/param/props.h>
@@ -97,34 +147,36 @@
#include <memory>
#include <utility>
-@@ -36,31 +39,36 @@ const char kSessionInterfaceName[] = "org.freedesktop.portal.Session";
+
+ #include "modules/desktop_capture/desktop_capture_options.h"
+ #include "modules/desktop_capture/desktop_capturer.h"
+ #include "rtc_base/checks.h"
+ #include "rtc_base/logging.h"
+@@ -31,181 +34,158 @@ namespace webrtc {
+ const char kDesktopBusName[] = "org.freedesktop.portal.Desktop";
+ const char kDesktopObjectPath[] = "/org/freedesktop/portal/desktop";
+ const char kDesktopRequestObjectPath[] =
+ "/org/freedesktop/portal/desktop/request";
+ const char kSessionInterfaceName[] = "org.freedesktop.portal.Session";
const char kRequestInterfaceName[] = "org.freedesktop.portal.Request";
const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast";
--// static
++
+ // static
-void BaseCapturerPipeWire::OnStateChanged(void* data,
- pw_remote_state old_state,
- pw_remote_state state,
- const char* error_message) {
- BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
- RTC_DCHECK(that);
++void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
++ struct dma_buf_sync sync = { 0 };
++
++ sync.flags = start_or_end | DMA_BUF_SYNC_READ;
- switch (state) {
- case PW_REMOTE_STATE_ERROR:
- RTC_LOG(LS_ERROR) << "PipeWire remote state error: " << error_message;
-- break;
-- case PW_REMOTE_STATE_CONNECTED:
-- RTC_LOG(LS_INFO) << "PipeWire remote state: connected.";
-- that->CreateReceivingStream();
-- break;
-- case PW_REMOTE_STATE_CONNECTING:
-- RTC_LOG(LS_INFO) << "PipeWire remote state: connecting.";
-+// static
-+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) {
-+ struct dma_buf_sync sync = { 0 };
-+
-+ sync.flags = start_or_end | DMA_BUF_SYNC_READ;
-+
+ while(true) {
+ int ret;
+ ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync);
@@ -133,15 +185,22 @@
+ } else if (ret == -1) {
+ RTC_LOG(LS_ERROR) << "Failed to synchronize DMA buffer: " << g_strerror(errno);
break;
+- case PW_REMOTE_STATE_CONNECTED:
+- RTC_LOG(LS_INFO) << "PipeWire remote state: connected.";
+- that->CreateReceivingStream();
++ } else {
+ break;
+- case PW_REMOTE_STATE_CONNECTING:
+- RTC_LOG(LS_INFO) << "PipeWire remote state: connecting.";
+- break;
- case PW_REMOTE_STATE_UNCONNECTED:
- RTC_LOG(LS_INFO) << "PipeWire remote state: unconnected.";
-+ } else {
- break;
+- break;
+ }
}
}
-+// static
+ // static
+void BaseCapturerPipeWire::OnCoreError(void *data,
+ uint32_t id,
+ int seq,
@@ -150,23 +209,28 @@
+ RTC_LOG(LS_ERROR) << "core error: " << message;
+}
+
- // static
++// static
void BaseCapturerPipeWire::OnStreamStateChanged(void* data,
pw_stream_state old_state,
-@@ -73,76 +81,54 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data,
+ pw_stream_state state,
+ const char* error_message) {
+ BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
+ RTC_DCHECK(that);
+
+ switch (state) {
case PW_STREAM_STATE_ERROR:
RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message;
break;
- case PW_STREAM_STATE_CONFIGURE:
- pw_stream_set_active(that->pw_stream_, true);
- break;
-- case PW_STREAM_STATE_UNCONNECTED:
-- case PW_STREAM_STATE_CONNECTING:
++ case PW_STREAM_STATE_PAUSED:
++ case PW_STREAM_STATE_STREAMING:
+ case PW_STREAM_STATE_UNCONNECTED:
+ case PW_STREAM_STATE_CONNECTING:
- case PW_STREAM_STATE_READY:
- case PW_STREAM_STATE_PAUSED:
- case PW_STREAM_STATE_STREAMING:
-+ case PW_STREAM_STATE_UNCONNECTED:
-+ case PW_STREAM_STATE_CONNECTING:
+- case PW_STREAM_STATE_PAUSED:
+- case PW_STREAM_STATE_STREAMING:
break;
}
}
@@ -256,20 +320,20 @@
}
// static
-@@ -150,15 +136,25 @@ void BaseCapturerPipeWire::OnStreamProcess(void* data) {
+ void BaseCapturerPipeWire::OnStreamProcess(void* data) {
BaseCapturerPipeWire* that = static_cast<BaseCapturerPipeWire*>(data);
RTC_DCHECK(that);
- pw_buffer* buf = nullptr;
+ struct pw_buffer *next_buffer;
+ struct pw_buffer *buffer = nullptr;
-+
+
+- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) {
+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_);
+ while (next_buffer) {
+ buffer = next_buffer;
+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_);
-
-- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) {
++
+ if (next_buffer)
+ pw_stream_queue_buffer (that->pw_stream_, buffer);
+ }
@@ -286,7 +350,10 @@
}
BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type)
-@@ -169,38 +165,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() {
+ : capture_source_type_(source_type) {}
+
+ BaseCapturerPipeWire::~BaseCapturerPipeWire() {
+ if (pw_main_loop_) {
pw_thread_loop_stop(pw_main_loop_);
}
@@ -329,16 +396,22 @@
if (start_request_signal_id_) {
g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_);
}
-@@ -250,27 +230,35 @@ void BaseCapturerPipeWire::InitPortal() {
+ if (sources_request_signal_id_) {
+ g_dbus_connection_signal_unsubscribe(connection_,
+ sources_request_signal_id_);
+ }
+ if (session_request_signal_id_) {
+@@ -245,142 +225,220 @@ void BaseCapturerPipeWire::InitPortal()
+ kDesktopBusName, kDesktopObjectPath, kScreenCastInterfaceName,
+ /*cancellable=*/nullptr,
+ reinterpret_cast<GAsyncReadyCallback>(OnProxyRequested), this);
+ }
+
void BaseCapturerPipeWire::InitPipeWire() {
pw_init(/*argc=*/nullptr, /*argc=*/nullptr);
- pw_loop_ = pw_loop_new(/*properties=*/nullptr);
- pw_main_loop_ = pw_thread_loop_new(pw_loop_, "pipewire-main-loop");
--
-- pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr);
-- pw_core_type_ = pw_core_get_type(pw_core_);
-- pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0);
+ pw_main_loop_ = pw_thread_loop_new("pipewire-main-loop", nullptr);
+ pw_context_ = pw_context_new(pw_thread_loop_get_loop(pw_main_loop_), nullptr, 0);
+ if (!pw_context_) {
@@ -346,6 +419,10 @@
+ return;
+ }
+- pw_core_ = pw_core_new(pw_loop_, /*properties=*/nullptr);
+- pw_core_type_ = pw_core_get_type(pw_core_);
+- pw_remote_ = pw_remote_new(pw_core_, nullptr, /*user_data_size=*/0);
+-
- InitPipeWireTypes();
+ pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
+ if (!pw_core_) {
@@ -378,7 +455,7 @@
if (pw_thread_loop_start(pw_main_loop_) < 0) {
RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop";
-@@ -278,81 +266,132 @@ void BaseCapturerPipeWire::InitPipeWire() {
+ portal_init_failed_ = true;
}
}
@@ -391,19 +468,20 @@
- spa_type_format_video_map(map, &pw_type_->format_video);
- spa_type_video_format_map(map, &pw_type_->video_format);
-}
--
++pw_stream* BaseCapturerPipeWire::CreateReceivingStream() {
++ spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1};
++ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX};
+
-void BaseCapturerPipeWire::CreateReceivingStream() {
-+pw_stream* BaseCapturerPipeWire::CreateReceivingStream() {
- spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1};
+- spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1};
- spa_rectangle pwScreenBounds =
- spa_rectangle{static_cast<uint32_t>(desktop_size_.width()),
- static_cast<uint32_t>(desktop_size_.height())};
-+ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX};
++ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr);
- spa_fraction pwFrameRateMin = spa_fraction{0, 1};
- spa_fraction pwFrameRateMax = spa_fraction{60, 1};
-+ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr);
-
+-
- pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1",
- /*end of varargs*/ nullptr);
- pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps);
@@ -439,12 +517,11 @@
- // min and max values and it is undecided (u) to allow negotiation
- ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2,
- &pwFrameRateMin, &pwFrameRateMax));
--
++ const spa_pod* params[2];
++ spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer, sizeof (buffer));
+
- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_,
- this);
-+ const spa_pod* params[2];
-+ spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer, sizeof (buffer));
-+
+ params[0] = reinterpret_cast<spa_pod *>(spa_pod_builder_add_object(&builder,
+ SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
+ SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video),
@@ -494,13 +571,13 @@
+ RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno);
+ return;
+ }
-+
+
+- if (!(src = spaBuffer->datas[0].data)) {
+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t);
+ } else if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) {
+ int fd;
+ fd = spaBuffer->datas[0].fd;
-
-- if (!(src = spaBuffer->datas[0].data)) {
++
+ map = static_cast<uint8_t*>(mmap(
+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset,
+ PROT_READ, MAP_PRIVATE, fd, 0));
@@ -569,14 +646,27 @@
if (srcStride != (desktop_size_.width() * kBytesPerPixel)) {
RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: "
<< srcStride
-@@ -361,21 +400,40 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) {
+ << " != " << (desktop_size_.width() * kBytesPerPixel);
+ portal_init_failed_ = true;
return;
}
- if (!current_frame_) {
- current_frame_ = static_cast<uint8_t*>(malloc(maxSize));
+- }
+- RTC_DCHECK(current_frame_ != nullptr);
+ dst = current_frame_.get();
-+
+
+- // If both sides decided to go with the RGBx format we need to convert it to
+- // BGRx to match color format expected by WebRTC.
+- if (spa_video_format_->format == pw_type_->video_format.RGBx) {
+- uint8_t* tempFrame = static_cast<uint8_t*>(malloc(maxSize));
+- std::memcpy(tempFrame, src, maxSize);
+- ConvertRGBxToBGRx(tempFrame, maxSize);
+- std::memcpy(current_frame_, tempFrame, maxSize);
+- free(tempFrame);
+- } else {
+- std::memcpy(current_frame_, src, maxSize);
+ // Adjust source content based on crop video position
+ if (video_crop_size_initialized_ &&
+ (video_crop->region.position.y + video_crop_size_.height() <= desktop_size_.height())) {
@@ -602,19 +692,8 @@
+ }
+ src += srcStride - xOffset;
+ dst += dstStride;
- }
-- RTC_DCHECK(current_frame_ != nullptr);
-
-- // If both sides decided to go with the RGBx format we need to convert it to
-- // BGRx to match color format expected by WebRTC.
-- if (spa_video_format_->format == pw_type_->video_format.RGBx) {
-- uint8_t* tempFrame = static_cast<uint8_t*>(malloc(maxSize));
-- std::memcpy(tempFrame, src, maxSize);
-- ConvertRGBxToBGRx(tempFrame, maxSize);
-- std::memcpy(current_frame_, tempFrame, maxSize);
-- free(tempFrame);
-- } else {
-- std::memcpy(current_frame_, src, maxSize);
++ }
++
+ if (map) {
+ if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) {
+ SyncDmaBuf(spaBuffer->datas[0].fd, DMA_BUF_SYNC_END);
@@ -623,7 +702,17 @@
}
}
-@@ -725,10 +783,7 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal(
+ void BaseCapturerPipeWire::ConvertRGBxToBGRx(uint8_t* frame, uint32_t size) {
+ // Change color format for KDE KWin which uses RGBx and not BGRx
+ for (uint32_t i = 0; i < size; i += 4) {
+ uint8_t tempR = frame[i];
+ uint8_t tempB = frame[i + 2];
+@@ -720,20 +778,17 @@ void BaseCapturerPipeWire::OnStartReques
+ guint32 stream_id;
+ gint32 width;
+ gint32 height;
+ GVariant* options;
+
g_variant_get(variant, "(u@a{sv})", &stream_id, &options);
RTC_DCHECK(options != nullptr);
@@ -635,7 +724,17 @@
g_variant_unref(options);
g_variant_unref(variant);
}
-@@ -813,10 +868,15 @@ void BaseCapturerPipeWire::CaptureFrame() {
+ }
+ g_variant_iter_free(iter);
+ g_variant_unref(response_data);
+
+ that->OpenPipeWireRemote();
+@@ -808,20 +863,25 @@ void BaseCapturerPipeWire::CaptureFrame(
+ return;
+ }
+
+ if (!current_frame_) {
+ callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
return;
}
@@ -654,7 +753,17 @@
if (!result) {
callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
return;
-@@ -837,4 +897,22 @@ bool BaseCapturerPipeWire::SelectSource(SourceId id) {
+ }
+ callback_->OnCaptureResult(Result::SUCCESS, std::move(result));
+ }
+
+ bool BaseCapturerPipeWire::GetSourceList(SourceList* sources) {
+@@ -832,9 +892,27 @@ bool BaseCapturerPipeWire::GetSourceList
+ return true;
+ }
+
+ bool BaseCapturerPipeWire::SelectSource(SourceId id) {
+ // Screen selection is handled by the xdg-desktop-portal.
return true;
}
@@ -678,10 +787,14 @@
+
} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
-index 56b101acbaa6..de54157d1a2a 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h
-@@ -22,17 +22,13 @@
+@@ -17,99 +17,103 @@
+ #include <spa/param/video/format-utils.h>
+
+ #include "modules/desktop_capture/desktop_capture_options.h"
+ #include "modules/desktop_capture/desktop_capturer.h"
+ #include "rtc_base/constructormagic.h"
namespace webrtc {
@@ -704,7 +817,10 @@
explicit BaseCapturerPipeWire(CaptureSourceType source_type);
~BaseCapturerPipeWire() override;
-@@ -43,28 +39,32 @@ class BaseCapturerPipeWire : public DesktopCapturer {
+
+ // DesktopCapturer interface.
+ void Start(Callback* delegate) override;
+ void CaptureFrame() override;
bool GetSourceList(SourceList* sources) override;
bool SelectSource(SourceId id) override;
@@ -745,7 +861,13 @@
// <-- end of PipeWire types
-@@ -78,33 +78,37 @@ class BaseCapturerPipeWire : public DesktopCapturer {
+ GDBusConnection* connection_ = nullptr;
+ GDBusProxy* proxy_ = nullptr;
+ gchar* portal_handle_ = nullptr;
+ gchar* session_handle_ = nullptr;
+ gchar* sources_handle_ = nullptr;
+ gchar* start_handle_ = nullptr;
+ guint session_request_signal_id_ = 0;
guint sources_request_signal_id_ = 0;
guint start_request_signal_id_ = 0;
@@ -792,11 +914,20 @@
static void OnStreamProcess(void* data);
static void OnNewBuffer(void* data, uint32_t id);
+ guint SetupRequestResponseSignal(const gchar* object_path,
+ GDBusSignalCallback callback);
+
+ static void OnProxyRequested(GObject* object,
+ GAsyncResult* result,
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
-index 26956fc67dc8..3813d697bb38 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc
-@@ -15,7 +15,7 @@
+@@ -10,17 +10,17 @@
+
+ #include "modules/desktop_capture/linux/screen_capturer_pipewire.h"
+
+ #include <memory>
+
namespace webrtc {
ScreenCapturerPipeWire::ScreenCapturerPipeWire()
@@ -805,11 +936,20 @@
ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {}
// static
+ std::unique_ptr<DesktopCapturer>
+ ScreenCapturerPipeWire::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
+ return std::make_unique<ScreenCapturerPipeWire>();
+ }
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
-index 35436475cb4d..c43a1f1a0c4e 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc
-@@ -15,7 +15,7 @@
+@@ -10,17 +10,17 @@
+
+ #include "modules/desktop_capture/linux/window_capturer_pipewire.h"
+
+ #include <memory>
+
namespace webrtc {
WindowCapturerPipeWire::WindowCapturerPipeWire()
@@ -818,11 +958,20 @@
WindowCapturerPipeWire::~WindowCapturerPipeWire() {}
// static
+ std::unique_ptr<DesktopCapturer>
+ WindowCapturerPipeWire::CreateRawWindowCapturer(
+ const DesktopCaptureOptions& options) {
+ return std::make_unique<WindowCapturerPipeWire>();
+ }
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
-index cf8a9dd0e0db..d27fab8d28d9 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
-@@ -26,7 +26,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+@@ -21,17 +21,17 @@
+
+ namespace webrtc {
+
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
const DesktopCaptureOptions& options) {
#if defined(WEBRTC_USE_PIPEWIRE)
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
@@ -831,11 +980,20 @@
}
#endif // defined(WEBRTC_USE_PIPEWIRE)
+ #if defined(USE_X11)
+ return ScreenCapturerX11::CreateRawScreenCapturer(options);
+ #endif // defined(USE_X11)
+
+ return nullptr;
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
-index 82359e50c2db..bb9724cf7cc2 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
-@@ -26,7 +26,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
+@@ -21,17 +21,17 @@
+
+ namespace webrtc {
+
+ // static
+ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawWindowCapturer(
const DesktopCaptureOptions& options) {
#if defined(WEBRTC_USE_PIPEWIRE)
if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) {
@@ -844,3 +1002,8 @@
}
#endif // defined(WEBRTC_USE_PIPEWIRE)
+ #if defined(USE_X11)
+ return WindowCapturerX11::CreateRawWindowCapturer(options);
+ #endif // defined(USE_X11)
+
+ return nullptr;
--- a/mozilla-sandbox-fips.patch Sun Jun 28 08:52:27 2020 +0200
+++ b/mozilla-sandbox-fips.patch Wed Oct 07 13:48:57 2020 +0200
@@ -1,16 +1,49 @@
-From: meissner@suse.com
+From: meissner@suse.com, cgrobertson@suse.com
Subject: allow Firefox to access addtional process information
-Reference: http://bugzilla.suse.com/show_bug.cgi?id=1167132
+References:
+http://bugzilla.suse.com/show_bug.cgi?id=1167132
+bsc#1174284 - Firefox tab just crashed in FIPS mode
-Index: firefox-74.0/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
-===================================================================
---- firefox-74.0.orig/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
-+++ firefox-74.0/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
-@@ -276,6 +276,7 @@ SandboxBrokerPolicyFactory::SandboxBroke
+diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp
+--- a/security/sandbox/linux/Sandbox.cpp
++++ b/security/sandbox/linux/Sandbox.cpp
+@@ -647,16 +647,17 @@ void SetMediaPluginSandbox(const char* a
+ SANDBOX_LOG_ERROR("failed to open plugin file %s: %s", aFilePath,
+ strerror(errno));
+ MOZ_CRASH("failed while trying to open the plugin file ");
+ }
+
+ auto files = new SandboxOpenedFiles();
+ files->Add(std::move(plugin));
+ files->Add("/dev/urandom", true);
++ files->Add("/dev/random", true);
+ files->Add("/etc/ld.so.cache"); // Needed for NSS in clearkey.
+ files->Add("/sys/devices/system/cpu/cpu0/tsc_freq_khz");
+ files->Add("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq");
+ files->Add("/proc/cpuinfo"); // Info also available via CPUID instruction.
+ files->Add("/proc/sys/crypto/fips_enabled"); // Needed for NSS in clearkey.
+ #ifdef __i386__
+ files->Add("/proc/self/auxv"); // Info also in process's address space.
+ #endif
+diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+--- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
++++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+@@ -308,16 +308,18 @@ void SandboxBrokerPolicyFactory::InitCon
+ policy->AddDir(rdwr, "/dev/dri");
+ }
+
+ // Bug 1575985: WASM library sandbox needs RW access to /dev/null
+ policy->AddPath(rdwr, "/dev/null");
// Read permissions
policy->AddPath(rdonly, "/dev/urandom");
++ policy->AddPath(rdonly, "/dev/random");
+ policy->AddPath(rdonly, "/proc/sys/crypto/fips_enabled");
policy->AddPath(rdonly, "/proc/cpuinfo");
policy->AddPath(rdonly, "/proc/meminfo");
policy->AddDir(rdonly, "/sys/devices/cpu");
+ policy->AddDir(rdonly, "/sys/devices/system/cpu");
+ policy->AddDir(rdonly, "/lib");
+ policy->AddDir(rdonly, "/lib64");
+ policy->AddDir(rdonly, "/usr/lib");
+ policy->AddDir(rdonly, "/usr/lib32");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/revert-795c8762b16b.patch Wed Oct 07 13:48:57 2020 +0200
@@ -0,0 +1,25 @@
+diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure
+--- a/build/moz.configure/lto-pgo.configure
++++ b/build/moz.configure/lto-pgo.configure
+@@ -224,17 +224,20 @@ def lto(value, c_compiler, ld64_known_go
+ #
+ # https://github.com/llvm/llvm-project/blob/e7694f34ab6a12b8bb480cbfcb396d0a64fe965f/llvm/lib/Target/X86/X86.td#L1165-L1187
+ if target.cpu == 'x86_64':
+ ldflags.append('-mllvm:-mcpu=x86-64')
+ # We do not need special flags for arm64. Hooray for fixed-length
+ # instruction sets.
+ else:
+ num_cores = multiprocessing.cpu_count()
+- cflags.append("-flto")
++ if len(value) and value[0].lower() == 'full':
++ cflags.append("-flto")
++ else:
++ cflags.append("-flto=thin")
+ cflags.append("-flifetime-dse=1")
+
+ ldflags.append("-flto=%s" % num_cores)
+ ldflags.append("-flifetime-dse=1")
+
+ # Tell LTO not to inline functions above a certain size, to mitigate
+ # binary size growth while still getting good performance.
+ # (For hot functions, PGO will put a multiplier on this limit.)
--- a/series Sun Jun 28 08:52:27 2020 +0200
+++ b/series Wed Oct 07 13:48:57 2020 +0200
@@ -3,7 +3,6 @@
mozilla-kde.patch
mozilla-ntlm-full-path.patch
mozilla-aarch64-startup-crash.patch
-mozilla-bmo1463035.patch
mozilla-sandbox-fips.patch
mozilla-fix-aarch64-libopus.patch
mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch
@@ -25,6 +24,8 @@
mozilla-bmo998749.patch
mozilla-bmo1626236.patch
mozilla-s390x-skia-gradient.patch
+mozilla-libavcodec58_91.patch
+#revert-795c8762b16b.patch
# Firefox patches
firefox-kde.patch