From 897fdda4b53742e34e1cc982b1280e4e30717fca Mon Sep 17 00:00:00 2001 From: jk Date: Sat, 6 Feb 2021 23:38:34 -0500 Subject: upgpkg: ungoogled-chromium 88.0.4324.150-1 upstream release --- .SRCINFO | 8 ++- PKGBUILD | 11 +++- chromium-glibc-2.33.patch | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 6 deletions(-) create mode 100644 chromium-glibc-2.33.patch diff --git a/.SRCINFO b/.SRCINFO index 35b9b0b..f6d2d21 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ungoogled-chromium pkgdesc = A lightweight approach to removing Google web service dependency - pkgver = 88.0.4324.146 + pkgver = 88.0.4324.150 pkgrel = 1 url = https://github.com/Eloston/ungoogled-chromium arch = x86_64 @@ -55,18 +55,20 @@ pkgbase = ungoogled-chromium optdepends = kwallet: for storing passwords in KWallet on KDE desktops provides = chromium conflicts = chromium - source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-88.0.4324.146.tar.xz + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-88.0.4324.150.tar.xz source = ungoogled-chromium-88.0.4324.146-1.tar.gz::https://github.com/Eloston/ungoogled-chromium/archive/88.0.4324.146-1.tar.gz source = https://github.com/foutrelis/chromium-launcher/archive/v7/chromium-launcher-7.tar.gz source = chromium-drirc-disable-10bpc-color-configs.conf source = https://github.com/stha09/chromium-patches/releases/download/chromium-88-patchset-3/chromium-88-patchset-3.tar.xz + source = chromium-glibc-2.33.patch source = wayland-egl.patch source = subpixel-anti-aliasing-in-FreeType-2.8.1.patch - sha256sums = 38b118fbe8bbdf89e4f170ced090088f5eb2bb68f2295abbb0006cc94b7f827d + sha256sums = ae12e94392986c6b8ea4413356a49bae0a19356ffe2ea95495303cf2decb38c3 sha256sums = cbbc917097ca089a2bcd2b85f9d7f160e52323a9d900d2fc1da5a84567f7b357 sha256sums = 86859c11cfc8ba106a3826479c0bc759324a62150b271dd35d1a0f96e890f52f sha256sums = babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb sha256sums = e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9 + sha256sums = 2fccecdcd4509d4c36af873988ca9dbcba7fdb95122894a9fdf502c33a1d7a4b sha256sums = 34d08ea93cb4762cb33c7cffe931358008af32265fc720f2762f0179c3973574 sha256sums = 1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6 diff --git a/PKGBUILD b/PKGBUILD index 3cda44a..259daec 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,14 +9,14 @@ # Contributor: Daniel J Griffiths pkgname=ungoogled-chromium -pkgver=88.0.4324.146 +pkgver=88.0.4324.150 pkgrel=1 _launcher_ver=7 _gcc_patchset=3 _pkgname=$(echo $pkgname | cut -d\- -f1-2) _pkgver=$(echo $pkgver | cut -d\. -f1-4) # ungoogled chromium variables -_uc_ver=$pkgver-1 +_uc_ver=88.0.4324.146-1 _uc_usr=Eloston pkgdesc="A lightweight approach to removing Google web service dependency" arch=('x86_64') @@ -40,13 +40,15 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz chromium-drirc-disable-10bpc-color-configs.conf https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz + chromium-glibc-2.33.patch wayland-egl.patch subpixel-anti-aliasing-in-FreeType-2.8.1.patch) -sha256sums=('38b118fbe8bbdf89e4f170ced090088f5eb2bb68f2295abbb0006cc94b7f827d' +sha256sums=('ae12e94392986c6b8ea4413356a49bae0a19356ffe2ea95495303cf2decb38c3' 'cbbc917097ca089a2bcd2b85f9d7f160e52323a9d900d2fc1da5a84567f7b357' '86859c11cfc8ba106a3826479c0bc759324a62150b271dd35d1a0f96e890f52f' 'babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb' 'e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9' + '2fccecdcd4509d4c36af873988ca9dbcba7fdb95122894a9fdf502c33a1d7a4b' '34d08ea93cb4762cb33c7cffe931358008af32265fc720f2762f0179c3973574' '1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6') @@ -89,6 +91,9 @@ prepare() { third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ third_party/libxml/chromium/*.cc + # https://crbug.com/1164975 + patch -Np1 -i ../chromium-glibc-2.33.patch + # Upstream fixes patch -Np1 -d third_party/skia <../subpixel-anti-aliasing-in-FreeType-2.8.1.patch diff --git a/chromium-glibc-2.33.patch b/chromium-glibc-2.33.patch new file mode 100644 index 0000000..74ed677 --- /dev/null +++ b/chromium-glibc-2.33.patch @@ -0,0 +1,144 @@ +# Patch made by Kevin Kofler +# https://bugzilla.redhat.com/show_bug.cgi?id=1904652 + +diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix 2021-01-25 10:11:45.427436398 -0500 ++++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-25 10:12:51.337699003 -0500 +@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictKillTarget(current_pid, sysno); + } + ++#if defined(__NR_newfstatat) ++ if (sysno == __NR_newfstatat) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ ++#if defined(__NR_fstatat64) ++ if (sysno == __NR_fstatat64) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ + if (SyscallSets::IsFileSystem(sysno) || + SyscallSets::IsCurrentDirectory(sysno)) { + return Error(fs_denied_errno); +diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix 2021-01-25 10:13:10.179774081 -0500 ++++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-25 10:16:18.790525746 -0500 +@@ -6,6 +6,8 @@ + + #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" + ++#include ++#include + #include + #include + #include +@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct + return -ENOSYS; + } + ++intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ void* aux) { ++ switch (args.nr) { ++#if defined(__NR_newfstatat) ++ case __NR_newfstatat: ++#endif ++#if defined(__NR_fstatat64) ++ case __NR_fstatat64: ++#endif ++#if defined(__NR_newfstatat) || defined(__NR_fstatat64) ++ if (*reinterpret_cast(args.args[1]) == '\0' ++ && args.args[3] == static_cast(AT_EMPTY_PATH)) { ++ return sandbox::sys_fstat64(static_cast(args.args[0]), ++ reinterpret_cast(args.args[2])); ++ } else { ++ errno = EACCES; ++ return -1; ++ } ++ break; ++#endif ++ } ++ ++ CrashSIGSYS_Handler(args, aux); ++ ++ // Should never be reached. ++ RAW_CHECK(false); ++ return -ENOSYS; ++} ++ + bpf_dsl::ResultExpr CrashSIGSYS() { + return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); + } +@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS() + return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); + } + ++bpf_dsl::ResultExpr RewriteFstatatSIGSYS() { ++ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL); ++} ++ + void AllocateCrashKeys() { + #if !defined(OS_NACL_NONSFI) + if (seccomp_crash_key) +diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h +--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix 2021-01-25 10:16:36.982598236 -0500 ++++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-25 10:18:45.705111027 -0500 +@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail + // sched_setparam(), sched_setscheduler() + SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args, + void* aux); ++// If the fstatat syscall is actually a disguised fstat, calls the regular fstat ++// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler. ++SANDBOX_EXPORT intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ void* aux); + + // Variants of the above functions for use with bpf_dsl. + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS(); +@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex(); + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace(); + SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS(); ++SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS(); + + // Allocates a crash key so that Seccomp information can be recorded. + void AllocateCrashKeys(); +diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc +--- chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc.fstatfix 2021-01-25 10:18:53.307141311 -0500 ++++ chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc 2021-01-25 10:19:46.982355293 -0500 +@@ -261,4 +261,13 @@ int sys_sigaction(int signum, + + #endif // defined(MEMORY_SANITIZER) + ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf) ++{ ++#if defined(__NR_fstat64) ++ return syscall(__NR_fstat64, fd, buf); ++#else ++ return syscall(__NR_fstat, fd, buf); ++#endif ++} ++ + } // namespace sandbox +diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h +--- chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h.fstatfix 2021-01-25 10:19:53.115379741 -0500 ++++ chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h 2021-01-25 10:20:45.485588421 -0500 +@@ -17,6 +17,7 @@ struct sock_fprog; + struct rlimit64; + struct cap_hdr; + struct cap_data; ++struct stat64; + + namespace sandbox { + +@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig + const struct sigaction* act, + struct sigaction* oldact); + ++// Recent glibc rewrites fstat to fstatat. ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf); ++ + } // namespace sandbox + + #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ -- cgit v1.2.3