summarylogtreecommitdiffstats
path: root/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch
diff options
context:
space:
mode:
authorBjörn Bidar2021-10-23 14:36:39 +0300
committerBjörn Bidar2021-10-23 15:47:13 +0300
commit32b4b758c11d6771a5aa59c056dbfdb86dd6cada (patch)
tree45720f9579abea9edb375bf5026627f4fdb8f924 /0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch
parentd11024e3d1684bca1ee085a3cbcd45a107ff53ef (diff)
downloadaur-32b4b758c11d6771a5aa59c056dbfdb86dd6cada.tar.gz
Update to 93.0-1
- New upstream release - Update patches: - unity-menubar patch from Ubuntu - firefox-kde patches from openSUSE - Gentoo - Add patches for: - Preload dependencies for the Widevine CDM when sandboxing it on Linux MOZILLA#1725828 - Update packed_simd to a version that supports rustc >= 1.56 MOZILLA#1730397
Diffstat (limited to '0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch')
-rw-r--r--0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch b/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch
new file mode 100644
index 000000000000..f3eb981dfc86
--- /dev/null
+++ b/0033-bmo-1725828-Preload-dependencies-for-the-Widevine-CD.patch
@@ -0,0 +1,68 @@
+From 6dce72ee07bd835e613fece4f04fed3817ddd993 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 23 Sep 2021 16:31:41 +0200
+Subject: [PATCH 33/34] bmo#1725828: Preload dependencies for the Widevine CDM
+ when sandboxing it on Linux
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ dom/media/gmp/GMPChild.cpp | 8 +++++++-
+ dom/media/gmp/GMPParent.cpp | 14 ++++++++++++++
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp
+index 07d62f3ef0..c793ab5992 100644
+--- a/dom/media/gmp/GMPChild.cpp
++++ b/dom/media/gmp/GMPChild.cpp
+@@ -232,8 +232,14 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) {
+ }
+ #elif defined(XP_LINUX)
+ constexpr static const char* whitelist[] = {
++ // NSS libraries used by clearkey.
+ "libfreeblpriv3.so",
+ "libsoftokn3.so",
++ // glibc libraries merged into libc.so.6; see bug 1725828 and
++ // the corresponding code in GMPParent.cpp.
++ "libdl.so.2",
++ "libpthread.so.0",
++ "librt.so.1",
+ };
+
+ nsTArray<nsCString> libs;
+@@ -256,7 +262,7 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) {
+ }
+ // End bug 1698718 logging.
+
+- MOZ_CRASH("Couldn't load lib needed by NSS");
++ MOZ_CRASH("Couldn't load lib needed by media plugin");
+ }
+ }
+ }
+diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp
+index f7e745d2c0..8c9d5306d4 100644
+--- a/dom/media/gmp/GMPParent.cpp
++++ b/dom/media/gmp/GMPParent.cpp
+@@ -876,6 +876,20 @@ RefPtr<GenericPromise> GMPParent::ParseChromiumManifest(
+ return GenericPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
+ }
+
++#ifdef XP_LINUX
++ // These glibc libraries were merged into libc.so.6 as of glibc
++ // 2.34; they now exist only as stub libraries for compatibility and
++ // newly linked code won't depend on them, so we need to ensure
++ // they're loaded for plugins that may have been linked against a
++ // different version of glibc. (See also bug 1725828.)
++ if (!mDisplayName.EqualsASCII("clearkey")) {
++ if (!mLibs.IsEmpty()) {
++ mLibs.AppendLiteral(", ");
++ }
++ mLibs.AppendLiteral("libdl.so.2, libpthread.so.0, librt.so.1");
++ }
++#endif
++
+ nsCString codecsString = NS_ConvertUTF16toUTF8(m.mX_cdm_codecs);
+ nsTArray<nsCString> codecs;
+ SplitAt(",", codecsString, codecs);
+--
+2.33.1
+