commit 2fdd8304ad65098de91fa00f6882aa40be2e1a14
Author: qvint <dotqvint(a)gmail.com>
Date: Sat Jun 27 10:53:45 2020 +0300
Try alternative locations for the Widevine CDM library
chromium-browser-privacy.spec | 4 ++++
chromium-widevine-locations.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
---
diff --git a/chromium-browser-privacy.spec b/chromium-browser-privacy.spec
index e5798fd..8bf0e15 100644
--- a/chromium-browser-privacy.spec
+++ b/chromium-browser-privacy.spec
@@ -243,6 +243,9 @@ Patch403: chromium-rpm-fusion-brand.patch
# RPM Fusion patches [free/chromium-browser-privacy]:
Patch500: chromium-default-user-data-dir.patch
+# Additional patches:
+Patch600: chromium-widevine-locations.patch
+
%description
%{name} is an ungoogled-chromium distribution.
@@ -790,6 +793,7 @@ appstream-util validate-relax --nonet
"%{buildroot}%{_metainfodir}/%{name}.appda
* Sat Jun 27 2020 qvint <dotqvint(a)gmail.com> - 83.0.4103.116-1
- Update Chromium to 83.0.4103.116
- Update ungoogled-chromium to 83.0.4103.116-1
+- Try alternative locations for the Widevine CDM library
* Wed May 06 2020 qvint <dotqvint(a)gmail.com> - 81.0.4044.138-1
- Update Chromium to 81.0.4044.138
diff --git a/chromium-widevine-locations.patch b/chromium-widevine-locations.patch
new file mode 100644
index 0000000..5eb5315
--- /dev/null
+++ b/chromium-widevine-locations.patch
@@ -0,0 +1,39 @@
+Description: try alternative locations for the Widevine CDM library:
+ - $HOME/.local/lib/WidevineCdm/ (snap-friendly, see
https://launchpad.net/bugs/1738149)
+ - /opt/google/chrome/WidevineCdm/ (installed by official google chrome package)
+ The manifest lives at the top level, whereas libwidevinecdm.so is inside
+ a platform specific directory, see media::GetPlatformSpecificDirectory(…).
+Author: Olivier Tilloy <olivier.tilloy(a)canonical.com>
+
+Source:
https://bazaar.launchpad.net/~chromium-team/chromium-browser/disco-dev/vi...
+
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -379,8 +379,17 @@ bool PathProvider(int key, base::FilePat
+ cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
+ break;
+
+-#if defined(OS_LINUX) && BUILDFLAG(BUNDLE_WIDEVINE_CDM)
++#if defined(OS_LINUX) && BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+ case chrome::DIR_BUNDLED_WIDEVINE_CDM:
++ base::PathService::Get(base::DIR_HOME, &cur);
++ cur = cur.Append(FILE_PATH_LITERAL(".local/lib"))
++ .AppendASCII(kWidevineCdmBaseDirectory);
++ if (base::PathExists(cur))
++ break;
++ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome"))
++ .AppendASCII(kWidevineCdmBaseDirectory);
++ if (base::PathExists(cur))
++ break;
+ if (!GetComponentDirectory(&cur))
+ return false;
+ #if !defined(OS_CHROMEOS)
+@@ -389,7 +398,7 @@ bool PathProvider(int key, base::FilePat
+ cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
+ #endif // !defined(OS_CHROMEOS)
+ break;
+-#endif // defined(OS_LINUX) && BUILDFLAG(BUNDLE_WIDEVINE_CDM)
++#endif // defined(OS_LINUX) && BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+
+ #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && \
+ BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)