diff --git a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch index 098bd95a8de..c04eb47a013 100644 --- a/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch +++ b/srcpkgs/qt6-webengine/patches/0007-riscv-sandbox.patch @@ -133,10 +133,10 @@ Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_paramete !defined(PTRACE_GET_THREAD_AREA) // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. -@@ -443,7 +444,7 @@ ResultExpr RestrictPtrace() { +@@ -442,7 +442,7 @@ #endif return Switch(request) - .CASES(( + .Cases({ -#if !defined(__aarch64__) +#if !defined(__aarch64__) && !defined(__riscv) PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA, @@ -242,23 +242,6 @@ Index: chromium-107.0.5304.87/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc case __NR_epoll_create: case __NR_epoll_wait: #endif -@@ -483,14 +483,14 @@ bool SyscallSets::IsAllowedEpoll(int sys - - bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { - switch (sysno) { --#if !defined(__aarch64__) -+#if !defined(__aarch64__) && !defined(__riscv) - case __NR_pipe: - #endif - case __NR_pipe2: - return true; - default: - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__riscv) - case __NR_socketpair: // We will want to inspect its argument. - #endif - return false; @@ -500,7 +500,7 @@ bool SyscallSets::IsAllowedGetOrModifySo bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { switch (sysno) { diff --git a/srcpkgs/qt6-webengine/patches/0008-rsicv-allocator.patch b/srcpkgs/qt6-webengine/patches/0008-rsicv-allocator.patch new file mode 100644 index 00000000000..98b009f6615 --- /dev/null +++ b/srcpkgs/qt6-webengine/patches/0008-rsicv-allocator.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni 2023-10-03 21:49:54.000000000 +0200 ++++ - 2023-10-27 19:05:06.146398062 +0200 +@@ -14,7 +14,7 @@ + if (is_nacl) { + # NaCl targets don't use 64-bit pointers. + has_64_bit_pointers = false +-} else if (current_cpu == "x64" || current_cpu == "arm64") { ++} else if (current_cpu == "x64" || current_cpu == "arm64" || current_cpu == "riscv64") { + has_64_bit_pointers = true + } else if (current_cpu == "x86" || current_cpu == "arm") { + has_64_bit_pointers = false diff --git a/srcpkgs/qt6-webengine/patches/0010-chromium-musl-tid-caching.patch b/srcpkgs/qt6-webengine/patches/0010-chromium-musl-tid-caching.patch new file mode 100644 index 00000000000..8fbf4c0b1ba --- /dev/null +++ b/srcpkgs/qt6-webengine/patches/0010-chromium-musl-tid-caching.patch @@ -0,0 +1,88 @@ +Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-caching.patch +the sandbox caching of thread id's only works with glibc +see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356 +see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579 +-- +--- a/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc ++++ b/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc +@@ -209,6 +209,70 @@ + return base::LaunchProcess(argv, launch_options_copy); + } + ++#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) ++#define TLS_ABOVE_TP ++#endif ++ ++struct musl_pthread ++{ ++ /* Part 1 -- these fields may be external or ++ * internal (accessed via asm) ABI. Do not change. */ ++ struct pthread *self; ++#ifndef TLS_ABOVE_TP ++ uintptr_t *dtv; ++#endif ++ struct pthread *prev, *next; /* non-ABI */ ++ uintptr_t sysinfo; ++#ifndef TLS_ABOVE_TP ++#ifdef CANARY_PAD ++ uintptr_t canary_pad; ++#endif ++ uintptr_t canary; ++#endif ++ ++/* Part 2 -- implementation details, non-ABI. */ ++ int tid; ++ int errno_val; ++ volatile int detach_state; ++ volatile int cancel; ++ volatile unsigned char canceldisable, cancelasync; ++ unsigned char tsd_used:1; ++ unsigned char dlerror_flag:1; ++ unsigned char *map_base; ++ size_t map_size; ++ void *stack; ++ size_t stack_size; ++ size_t guard_size; ++ void *result; ++ struct __ptcb *cancelbuf; ++ void **tsd; ++ struct { ++ volatile void *volatile head; ++ long off; ++ volatile void *volatile pending; ++ } robust_list; ++ int h_errno_val; ++ volatile int timer_id; ++ locale_t locale; ++ volatile int killlock[1]; ++ char *dlerror_buf; ++ void *stdio_locks; ++ ++ /* Part 3 -- the positions of these fields relative to ++ * the end of the structure is external and internal ABI. */ ++#ifdef TLS_ABOVE_TP ++ uintptr_t canary; ++ uintptr_t *dtv; ++#endif ++}; ++ ++void MaybeUpdateMuslTidCache() ++{ ++ pid_t real_tid = sys_gettid(); ++ pid_t* cached_tid_location = &reinterpret_cast(pthread_self())->tid; ++ *cached_tid_location = real_tid; ++} ++ + // static + pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) { + const pid_t pid = +@@ -226,6 +290,8 @@ + #if defined(LIBC_GLIBC) + MaybeUpdateGlibcTidCache(); +-#endif ++#else ++ MaybeUpdateMuslTidCache(); ++#endif + return 0; + } + diff --git a/srcpkgs/qt6-webengine/patches/0113-chromium-pthread-stacksize.patch b/srcpkgs/qt6-webengine/patches/0113-chromium-pthread-stacksize.patch deleted file mode 100644 index 384fd0af186..00000000000 --- a/srcpkgs/qt6-webengine/patches/0113-chromium-pthread-stacksize.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/threading/platform_thread_linux.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/threading/platform_thread_linux.cc -@@ -437,8 +437,13 @@ void TerminateOnThread() {} - - size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { - #if !defined(THREAD_SANITIZER) -+#if defined(__GLIBC__) - return 0; - #else -+ // musl libcs default is too small, use 8mb like glibc -+ return (1 << 23); -+#endif -+#else - // ThreadSanitizer bloats the stack heavily. Evidence has been that the - // default stack size isn't enough for some browser tests. - return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). diff --git a/srcpkgs/qt6-webengine/patches/0114-do-not-narrow-int.patch b/srcpkgs/qt6-webengine/patches/0114-do-not-narrow-int.patch deleted file mode 100644 index 2cd6a07382a..00000000000 --- a/srcpkgs/qt6-webengine/patches/0114-do-not-narrow-int.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/files/file_util_linux.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/files/file_util_linux.cc -@@ -23,14 +23,14 @@ bool GetFileSystemType(const FilePath& p - - // Not all possible |statfs_buf.f_type| values are in linux/magic.h. - // Missing values are copied from the statfs man page. -- switch (statfs_buf.f_type) { -+ switch (static_cast(statfs_buf.f_type)) { - case 0: - *type = FILE_SYSTEM_0; - break; - case EXT2_SUPER_MAGIC: // Also ext3 and ext4 - case MSDOS_SUPER_MAGIC: - case REISERFS_SUPER_MAGIC: -- case static_cast(BTRFS_SUPER_MAGIC): -+ case BTRFS_SUPER_MAGIC: - case 0x5346544E: // NTFS - case 0x58465342: // XFS - case 0x3153464A: // JFS -@@ -40,14 +40,14 @@ bool GetFileSystemType(const FilePath& p - *type = FILE_SYSTEM_NFS; - break; - case SMB_SUPER_MAGIC: -- case static_cast(0xFF534D42): // CIFS -+ case 0xFF534D42: // CIFS - *type = FILE_SYSTEM_SMB; - break; - case CODA_SUPER_MAGIC: - *type = FILE_SYSTEM_CODA; - break; -- case static_cast(HUGETLBFS_MAGIC): -- case static_cast(RAMFS_MAGIC): -+ case HUGETLBFS_MAGIC: -+ case RAMFS_MAGIC: - case TMPFS_MAGIC: - *type = FILE_SYSTEM_MEMORY; - break; ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/system/sys_info_posix.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/system/sys_info_posix.cc -@@ -100,10 +100,10 @@ bool IsStatsZeroIfUnlimited(const base:: - if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0) - return false; - -- switch (stats.f_type) { -+ switch (static_cast(stats.f_type)) { - case TMPFS_MAGIC: -- case static_cast(HUGETLBFS_MAGIC): -- case static_cast(RAMFS_MAGIC): -+ case HUGETLBFS_MAGIC: -+ case RAMFS_MAGIC: - return true; - } - return false; diff --git a/srcpkgs/qt6-webengine/patches/0115-chromium-no-canonicalize-file-name.patch b/srcpkgs/qt6-webengine/patches/0115-chromium-no-canonicalize-file-name.patch deleted file mode 100644 index 556784b013d..00000000000 --- a/srcpkgs/qt6-webengine/patches/0115-chromium-no-canonicalize-file-name.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/nasm/config/config-linux.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/nasm/config/config-linux.h -@@ -139,7 +139,9 @@ - #define HAVE_ACCESS 1 - - /* Define to 1 if you have the `canonicalize_file_name' function. */ -+#ifdef __GLIBC__ - #define HAVE_CANONICALIZE_FILE_NAME 1 -+#endif - - /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ - /* #undef HAVE_CPU_TO_LE16 */ diff --git a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch index 5f090c81057..3a06a994dd6 100644 --- a/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch +++ b/srcpkgs/qt6-webengine/patches/0117-chromium-musl-resolver.patch @@ -1,11 +1,51 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc +diff --git a/src/3rdparty/chromium/net/dns/dns_reloader.cc b/src/3rdparty/chromium/net/dns/dns_reloader.cc +index 363eb14dc..3a86c12ee 100644 +--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc ++++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc +@@ -8,7 +8,7 @@ + + // If we're not on a POSIX system, it's not even safe to try to include resolv.h + // - there's not guarantee it exists at all. :( +-#if BUILDFLAG(IS_POSIX) ++#if defined(__GLIBC__) + + #include + +diff --git a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc +index d8142e8da..f2461b877 100644 +--- a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc ++++ b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc +@@ -351,8 +351,9 @@ void HostResolverSystemTask::OnLookupComplete(const uint32_t attempt_number, + } + + void EnsureSystemHostResolverCallReady() { ++#if defined(__GLIBC__) + EnsureDnsReloaderInit(); +-#if BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_WIN) + EnsureWinsockInit(); + #endif + } +@@ -434,7 +435,9 @@ int SystemHostResolverCall(const std::string& host, + // current process during that time. + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::WILL_BLOCK); ++#if defined(__GLIBC__) + DnsReloaderMaybeReload(); ++#endif + + auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); + bool should_retry = false; +diff --git a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc +index 2743697bf..36dc8adbf 100644 +--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc ++++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc @@ -13,7 +13,7 @@ namespace net { ScopedResState::ScopedResState() { -#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) ++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE) // Note: res_ninit in glibc always returns 0 and sets RES_INIT. // res_init behaves the same way. memset(&_res, 0, sizeof(_res)); @@ -18,46 +58,3 @@ // Prefer res_ndestroy where available. #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) -@@ -34,7 +34,7 @@ ScopedResState::~ScopedResState() { - res_nclose(&res_); - #endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) - --#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) -+#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - } - - bool ScopedResState::IsValid() const { ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/dns_reloader.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/dns_reloader.cc -@@ -7,7 +7,8 @@ - #include "build/build_config.h" - - #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ -- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) -+ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \ -+ !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - - #include - ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc -@@ -310,8 +310,7 @@ - } - - void EnsureSystemHostResolverCallReady() { --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ -- !BUILDFLAG(IS_ANDROID) -+#if defined(__GLIBC__) - EnsureDnsReloaderInit(); - #elif BUILDFLAG(IS_WIN) - EnsureWinsockInit(); -@@ -192,7 +192,8 @@ int SystemHostResolverCall(const std::st - base::BlockingType::WILL_BLOCK); - - #if BUILDFLAG(IS_POSIX) && \ -- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) -+ !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID) || \ -+ (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))) - DnsReloaderMaybeReload(); - #endif - auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); diff --git a/srcpkgs/qt6-webengine/patches/0119-chromium-musl-stack-utils.patch b/srcpkgs/qt6-webengine/patches/0119-chromium-musl-stack-utils.patch deleted file mode 100644 index 548a1dec76b..00000000000 --- a/srcpkgs/qt6-webengine/patches/0119-chromium-musl-stack-utils.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -@@ -29,7 +29,7 @@ size_t GetUnderestimatedStackSize() { - // FIXME: On Mac OSX and Linux, this method cannot estimate stack size - // correctly for the main thread. - --#elif defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_FUCHSIA) - // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of blink_unittests). -@@ -97,7 +97,7 @@ size_t GetUnderestimatedStackSize() { - } - - void* GetStackStart() { --#if defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_FUCHSIA) - pthread_attr_t attr; - int error; diff --git a/srcpkgs/qt6-webengine/patches/0121-chromium-musl-stat.patch b/srcpkgs/qt6-webengine/patches/0121-chromium-musl-stat.patch deleted file mode 100644 index 8c8c4b863b6..00000000000 --- a/srcpkgs/qt6-webengine/patches/0121-chromium-musl-stat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/files/file.h -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/files/file.h -@@ -19,7 +19,8 @@ - #include "build/build_config.h" - - #if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \ -- BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) -+ BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \ -+ (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)) - struct stat; - namespace base { - typedef struct stat stat_wrapper_t; diff --git a/srcpkgs/qt6-webengine/patches/0123-chromium-musl-no-execinfo.patch b/srcpkgs/qt6-webengine/patches/0123-chromium-musl-no-execinfo.patch deleted file mode 100644 index 25fae7bde11..00000000000 --- a/srcpkgs/qt6-webengine/patches/0123-chromium-musl-no-execinfo.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/debug/stack_trace_posix.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/debug/stack_trace_posix.cc -@@ -30,7 +30,7 @@ - #if !defined(USE_SYMBOLIZE) - #include - #endif --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - #include - #endif - -@@ -97,7 +97,7 @@ void DemangleSymbols(std::string* text) - // Note: code in this function is NOT async-signal safe (std::string uses - // malloc internally). - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - std::string::size_type search_from = 0; - while (search_from < text->size()) { - // Look for the start of a mangled symbol, from search_from. -@@ -144,7 +144,7 @@ class BacktraceOutputHandler { - virtual ~BacktraceOutputHandler() = default; - }; - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { - // This should be more than enough to store a 64-bit number in hex: - // 16 hex digits + 1 for null-terminator. -@@ -868,7 +868,7 @@ size_t CollectStackTrace(void** trace, s - // If we do not have unwind tables, then try tracing using frame pointers. - return base::debug::TraceStackFramePointers(const_cast(trace), - count, 0); --#elif !defined(__UCLIBC__) && !defined(_AIX) -+#elif defined(__GLIBC__) && !defined(_AIX) - // Though the backtrace API man page does not list any possible negative - // return values, we take no chance. - return base::saturated_cast(backtrace(trace, count)); -@@ -881,13 +881,13 @@ void StackTrace::PrintWithPrefix(const c - // NOTE: This code MUST be async-signal safe (it's used by in-process - // stack dumping signal handler). NO malloc or stdio is allowed here. - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - PrintBacktraceOutputHandler handler; - ProcessBacktrace(trace_, count_, prefix_string, &handler); - #endif - } - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(_AIX) - void StackTrace::OutputToStreamWithPrefix(std::ostream* os, - const char* prefix_string) const { - StreamBacktraceOutputHandler handler(os); ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc -@@ -12,7 +12,9 @@ - - #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) - #define SYMBOLIZE_FUNCTION -+#if defined(__GLIBC__) - #include -+#endif - - #include - -@@ -103,7 +105,7 @@ void ExternalReferenceTable::Init(Isolat - } - - const char* ExternalReferenceTable::ResolveSymbol(void* address) { --#ifdef SYMBOLIZE_FUNCTION -+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__) - char** names = backtrace_symbols(&address, 1); - const char* name = names[0]; - // The array of names is malloc'ed. However, each name string is static diff --git a/srcpkgs/qt6-webengine/patches/0125-chromium-remove-strip_binary.patch b/srcpkgs/qt6-webengine/patches/0125-chromium-remove-strip_binary.patch deleted file mode 100644 index 115e4492a2b..00000000000 --- a/srcpkgs/qt6-webengine/patches/0125-chromium-remove-strip_binary.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/chrome/test/chromedriver/BUILD.gn -+++ qt6-webengine-6.4.2/src/3rdparty/chromium/chrome/test/chromedriver/BUILD.gn -@@ -335,11 +335,7 @@ source_set("lib") { - } - } - --if (is_linux) { -- chromedriver_output = "chromedriver.unstripped" --} else { -- chromedriver_output = "chromedriver" --} -+chromedriver_output = "chromedriver" - - executable("$chromedriver_output") { - testonly = true -@@ -361,16 +357,6 @@ executable("$chromedriver_output") { - } - } - --if (is_linux) { -- strip_binary("chromedriver") { -- testonly = true -- binary_input = "$root_out_dir/$chromedriver_output" -- symbol_output = "$root_out_dir/chromedriver.debug" -- stripped_binary_output = "$root_out_dir/chromedriver" -- deps = [ ":$chromedriver_output" ] -- } --} -- - python_library("chromedriver_py_tests") { - testonly = true - deps = [ diff --git a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch index 46b917a3174..8332e6a6711 100644 --- a/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch +++ b/srcpkgs/qt6-webengine/patches/0301-chromium-musl-sandbox.patch @@ -47,12 +47,13 @@ case __NR_unshare: #if !defined(__mips__) && !defined(__aarch64__) case __NR_vfork: -@@ -550,6 +555,9 @@ bool SyscallSets::IsAllowedAddressSpaceA +@@ -550,6 +555,10 @@ bool SyscallSets::IsAllowedAddressSpaceA case __NR_mlock: case __NR_munlock: case __NR_munmap: +#ifndef __GLIBC__ + case __NR_mremap: ++ case __NR_membarrier: +#endif return true; case __NR_madvise: diff --git a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch index 13b9c2c3164..9f8d4a15c28 100644 --- a/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch +++ b/srcpkgs/qt6-webengine/patches/0302-chromium-no-mallinfo.patch @@ -60,3 +60,17 @@ ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); #endif +musl does not implement mallinfo()/mallinfo2() +(or rather, malloc-ng, musl's allocator, doesn't) +-- +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +@@ -717,7 +717,7 @@ + + #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if defined(__GLIBC__) + SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { + base::SimplePartitionStatsDumper allocator_dumper; + Allocator()->DumpStats("malloc", true, &allocator_dumper); diff --git a/srcpkgs/qt6-webengine/patches/0900-cross-build-examples.patch b/srcpkgs/qt6-webengine/patches/0998-cross.patch similarity index 54% rename from srcpkgs/qt6-webengine/patches/0900-cross-build-examples.patch rename to srcpkgs/qt6-webengine/patches/0998-cross.patch index 6978f08757e..9e62be4b4c6 100644 --- a/srcpkgs/qt6-webengine/patches/0900-cross-build-examples.patch +++ b/srcpkgs/qt6-webengine/patches/0998-cross.patch @@ -1,16 +1,18 @@ ---- qt6-webengine-6.4.2.orig/examples/CMakeLists.txt -+++ qt6-webengine-6.4.2/examples/CMakeLists.txt -@@ -4,7 +4,6 @@ +--- a/examples/CMakeLists.txt 2023-10-03 21:49:54.000000000 +0200 ++++ - 2023-10-27 11:12:01.573293042 +0200 +@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16) qt_examples_build_begin(EXTERNAL_BUILD) --if(NOT CMAKE_CROSSCOMPILING AND Qt6Core_VERSION VERSION_GREATER_EQUAL "6.5") #QTBUG-86533 +-if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533 ++#if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533 if(TARGET Qt::WebEngineCore) add_subdirectory(webenginequick) endif() -@@ -17,5 +16,4 @@ +@@ -17,5 +17,5 @@ if(TARGET Qt::PdfWidgets) add_subdirectory(pdfwidgets) endif() -endif() ++#endif() qt_examples_build_end() diff --git a/srcpkgs/qt6-webengine/patches/0999-python3.12.patch b/srcpkgs/qt6-webengine/patches/0999-python3.12.patch new file mode 100644 index 00000000000..40d4010c826 --- /dev/null +++ b/srcpkgs/qt6-webengine/patches/0999-python3.12.patch @@ -0,0 +1,20 @@ +--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py 2023-10-03 21:49:54.000000000 +0200 ++++ - 2023-10-13 23:26:56.151025878 +0200 +@@ -3,7 +3,6 @@ + # found in the LICENSE file. + + import errno +-import imp + import os.path + import sys + +--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-10-03 21:49:54.000000000 +0200 ++++ - 2023-10-13 23:28:56.391987051 +0200 +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-import imp + import os.path + import sys + diff --git a/srcpkgs/qt6-webengine/patches/Partial-migration-from-imp-to-importlib.patch b/srcpkgs/qt6-webengine/patches/Partial-migration-from-imp-to-importlib.patch new file mode 100644 index 00000000000..46cc88f9bf1 --- /dev/null +++ b/srcpkgs/qt6-webengine/patches/Partial-migration-from-imp-to-importlib.patch @@ -0,0 +1,36 @@ +From cbf5f7ad619a967bd54482e1d1df36d80b28145a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= +Date: Thu, 13 Jul 2023 12:18:00 +0200 +Subject: [PATCH] Partial migration from imp to importlib + +--- + .../resources/protobufs/binary_proto_generator.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py +index 2a1802d..ba67251 100755 +--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py ++++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py +@@ -9,7 +9,7 @@ + """ + from __future__ import print_function + import abc +-import imp ++from importlib import util + import optparse + import os + import re +@@ -68,7 +68,9 @@ class GoogleProtobufModuleImporter: + raise ImportError(fullname) + + filepath = self._fullname_to_filepath(fullname) +- return imp.load_source(fullname, filepath) ++ spec = util.spec_from_file_location(fullname, filepath) ++ loaded = util.module_from_spec(spec) ++ return spec.loader.exec_module(loaded) + + class BinaryProtoGenerator: + +-- +2.41.0 + diff --git a/srcpkgs/qt6-webengine/patches/pipewire-fcntl-call.patch b/srcpkgs/qt6-webengine/patches/pipewire-fcntl-call.patch new file mode 100644 index 00000000000..a139a7e8a53 --- /dev/null +++ b/srcpkgs/qt6-webengine/patches/pipewire-fcntl-call.patch @@ -0,0 +1,18 @@ +Patch-Source: https://webrtc-review.googlesource.com/c/src/+/305120 +-- +diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index 5878180..b2ad7ad 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -452,8 +452,8 @@ + PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_); + + if (fd >= 0) { +- pw_core_ = pw_context_connect_fd( +- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0); ++ pw_core_ = pw_context_connect_fd( ++ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0); + } else { + pw_core_ = pw_context_connect(pw_context_, nullptr, 0); + } + diff --git a/srcpkgs/qt6-webengine/template b/srcpkgs/qt6-webengine/template index a92b06c6f0c..588194d573f 100644 --- a/srcpkgs/qt6-webengine/template +++ b/srcpkgs/qt6-webengine/template @@ -1,7 +1,7 @@ # Template file for 'qt6-webengine' pkgname=qt6-webengine -version=6.5.2 -revision=3 +version=6.6.0 +revision=1 build_style=cmake configure_args=" -DQT_FEATURE_webengine_system_ffmpeg=ON @@ -33,7 +33,11 @@ maintainer="John " license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause" homepage="https://www.qt.io" distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz" -checksum=e7c9438b56f502b44b4e376b92ed80f1db7c2c3881d68d319b0677afd5701d9f +checksum=d5dc9ff05a2c57adbf99cbf0c7cb6f19527f67216caf627b0cc160a1d253b780 + +case "$XBPS_TARGET_MACHINE" in + riscv64*) broken="Patchset needs updating";; +esac if [ "$XBPS_LIBC" = "musl" ]; then hostmakedepends+=" musl-legacy-compat" @@ -128,6 +132,14 @@ _wrap_ninja() { } pre_configure() { + rm src/3rdparty/chromium/third_party/six/src/six.py + rm src/3rdparty/chromium/third_party/catapult/third_party/six/six.py + rm src/3rdparty/chromium/third_party/wpt_tools/wpt/tools/third_party/six/six.py + + ln -s ${py3_sitelib}/six.py src/3rdparty/chromium/third_party/six/src/six.py + ln -s ${py3_sitelib}/six.py src/3rdparty/chromium/third_party/catapult/third_party/six/six.py + ln -s ${py3_sitelib}/six.py src/3rdparty/chromium/third_party/wpt_tools/wpt/tools/third_party/six/six.py + _bootstrap_gn # _unbundle_libs _wrap_ninja