diff --git a/www-client/ungoogled-chromium/files/chromium-134-map_droppable-glibc.patch b/www-client/ungoogled-chromium/files/chromium-134-map_droppable-glibc.patch new file mode 100644 index 00000000..8220529b --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium-134-map_droppable-glibc.patch @@ -0,0 +1,35 @@ +From d1e4332f1a2361014175646fae4f4549b8c1abbf Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Thu, 13 Feb 2025 16:56:53 +1000 +Subject: [PATCH] seccomp: Define MAP_DROPPABLE for glibc 2.41 + +Bug: https://bugs.gentoo.org/949654 +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -1,3 +1,4 @@ ++ + // Copyright 2013 The Chromium Authors + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. +@@ -35,6 +36,10 @@ + #include "sandbox/linux/system_headers/linux_syscalls.h" + #include "sandbox/linux/system_headers/linux_time.h" + ++#if !defined(MAP_DROPPABLE) ++#define MAP_DROPPABLE 0x08 // Zero memory under memory pressure. ++#endif ++ + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ + !defined(__arm__) && !defined(__aarch64__) && \ + !defined(PTRACE_GET_THREAD_AREA) +@@ -238,7 +243,7 @@ ResultExpr RestrictMmapFlags() { + // TODO(davidung), remove MAP_DENYWRITE with updated Tegra libraries. + const uint64_t kAllowedMask = MAP_SHARED | MAP_PRIVATE | MAP_ANONYMOUS | + MAP_STACK | MAP_NORESERVE | MAP_FIXED | +- MAP_DENYWRITE | MAP_LOCKED | ++ MAP_DENYWRITE | MAP_LOCKED | MAP_DROPPABLE | + kArchSpecificAllowedMask; + const Arg flags(3); + return If((flags & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()); +-- +2.48.0 diff --git a/www-client/ungoogled-chromium/files/chromium-134-oauth2-client-switches.patch b/www-client/ungoogled-chromium/files/chromium-134-oauth2-client-switches.patch new file mode 100644 index 00000000..b7137e52 --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium-134-oauth2-client-switches.patch @@ -0,0 +1,35 @@ +From 628c8aad603791ec1276c6a5b8d3704a03840f86 Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Sat, 18 Jan 2025 11:09:46 +1000 +Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials + +Google doesn't let us bake in OAuth2 credentials, and for some time, +Google sign-in has been broken. Arch dealt with this in March, and so +did we to some degree, but in the last few months, our sign-in +credentials have been broken. It appears that we actually did remove API +credentials in March around Chrome 89, but they got added back, perhaps +when rotating newer versions to replace older versions. Work around this +by following Arch's lead: we remove the predefined credentials, as +before, but also we patch Chromium so that people can use their own +easily, using Arch's patch for that. +--- a/google_apis/api_key_cache.cc ++++ b/google_apis/api_key_cache.cc +@@ -192,13 +192,13 @@ ApiKeyCache::ApiKeyCache(const DefaultApiKeys& default_api_keys) { + + std::string default_client_id = CalculateKeyValue( + default_api_keys.google_default_client_id, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, std::string(), ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, std::string(), + environment.get(), command_line, gaia_config, + default_api_keys.allow_override_via_environment, + default_api_keys.allow_unset_values); + std::string default_client_secret = CalculateKeyValue( + default_api_keys.google_default_client_secret, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr, ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientID, + std::string(), environment.get(), command_line, gaia_config, + default_api_keys.allow_override_via_environment, + default_api_keys.allow_unset_values); +-- +2.48.0 + diff --git a/www-client/ungoogled-chromium/files/chromium-135-fix-non-wayland-build.patch b/www-client/ungoogled-chromium/files/chromium-135-fix-non-wayland-build.patch new file mode 100644 index 00000000..a31462ac --- /dev/null +++ b/www-client/ungoogled-chromium/files/chromium-135-fix-non-wayland-build.patch @@ -0,0 +1,45 @@ +From 919cda539b142b51fc2ef2342dbf1803b65f5434 Mon Sep 17 00:00:00 2001 +From: Matt Jolly +Date: Wed, 12 Feb 2025 20:13:09 +1000 +Subject: [PATCH] remoting: Linux: guard wayland includes + +During the refactor in 53f3429926deb4cb92d9cddcda5fc096a0332db3 +wayland support became required to build this component. + +Only include wayland components in the `platform_impls` target +if `ozone_platform_wayland` is true. + +Bug: 391722217 +See also: https://bugs.gentoo.org/948384 +Signed-off-by: Matt Jolly +--- a/remoting/host/linux/BUILD.gn ++++ b/remoting/host/linux/BUILD.gn +@@ -192,7 +192,6 @@ source_set("platform_impls") { + "wayland_seat.h", + ] + deps = [ +- ":wayland", + ":x11", + ":x11_display_utils", + "//base", +@@ -214,9 +213,16 @@ source_set("platform_impls") { + "//ui/base", + "//ui/base/x", + "//ui/events:dom_keycode_converter", +- "//ui/events/platform/wayland:wayland_event_watcher", + "//ui/gfx/x", + ] ++ # ui/events/platform/wayland:wayland_event_watcher asserts that the wayland ++ # platform is enabled. ++ if (ozone_platform_wayland) { ++ deps += [ ++ ":wayland", ++ "//ui/events/platform/wayland:wayland_event_watcher", ++ ] ++ } + } + + source_set("x11_display_utils") { +-- +2.48.0 + diff --git a/www-client/ungoogled-chromium/ungoogled-chromium-134.0.6998.35_p1.ebuild b/www-client/ungoogled-chromium/ungoogled-chromium-134.0.6998.35_p1.ebuild index 9f9b5f2f..b2f07794 100644 --- a/www-client/ungoogled-chromium/ungoogled-chromium-134.0.6998.35_p1.ebuild +++ b/www-client/ungoogled-chromium/ungoogled-chromium-134.0.6998.35_p1.ebuild @@ -26,7 +26,7 @@ HOMEPAGE="https://github.com/ungoogled-software/ungoogled-chromium" PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6" LITE_TARBALL=1 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PV/_*}${LITE_TARBALL:+-lite}.tar.xz - ppc64? ( + ppc64? ( https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2 ) "