diff --git a/chromium-86.0.4240.80-fcntl-h.patch b/chromium-86.0.4240.80-fcntl-h.patch deleted file mode 100644 index 085989c..0000000 --- a/chromium-86.0.4240.80-fcntl-h.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up chromium-86.0.4240.75/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-kcmp chromium-86.0.4240.75/sandbox/policy/linux/bpf_gpu_policy_linux.cc ---- chromium-86.0.4240.75/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-kcmp 2020-10-20 11:58:00.449812627 -0400 -+++ chromium-86.0.4240.75/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2020-10-20 11:58:32.919071919 -0400 -@@ -22,6 +22,22 @@ - #include "sandbox/policy/linux/sandbox_linux.h" - #include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" - -+#ifndef F_LINUX_SPECIFIC_BASE -+#define F_LINUX_SPECIFIC_BASE 1024 -+#endif -+#ifndef F_SEAL_SEAL -+#define F_SEAL_SEAL 0x0001 -+#endif -+#ifndef F_SEAL_SHRINK -+#define F_SEAL_SHRINK 0x0002 -+#endif -+#ifndef F_SEAL_GROW -+#define F_SEAL_GROW 0x0004 -+#endif -+#ifndef F_ADD_SEALS -+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) -+#endif -+ - using sandbox::bpf_dsl::Allow; - using sandbox::bpf_dsl::Arg; - using sandbox::bpf_dsl::Error; diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index e2f039e..160e18a 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -92,6 +92,9 @@ Source10: %{name}.rpmlintrc Source11: rpmlint-wrapper.sh # Bring xcb-proto with us (might need more than python on EPEL?) Source20: https://www.x.org/releases/individual/proto/xcb-proto-%{xcb_version}.tar.xz +# From https://github.com/systemd/systemd/blob/main/src/basic/missing_fcntl.h +# to fix building on rosa2016.1 where glibc does not have /usr/include/bits/fcntl-linux.h +Source21: missing_fcntl.h Source30: master_preferences Source31: default_bookmarks.html Source32: chromium.default @@ -133,8 +136,6 @@ Patch600: chromium-buildname-60.0.3112.90.patch Patch601: chromium-62-include-cstdlib.patch # Add "ROSA" to the user agent string -# Fix build /sandbox/policy/linux/bpf_gpu_policy_linux.cc on rosa2016.1 -Patch637: chromium-86.0.4240.80-fcntl-h.patch Patch627: chromium-68.0.3440.106-rosa-user-agent.patch # Fix building third_party/wayland on rosa2016.1 Patch639: wayland-strndup.patch @@ -367,7 +368,6 @@ cp -f %{_gostsourcedir}/src/msspi/third_party/cprocsp/include/* third_party/bori %patch600 -p1 %patch601 -p1 %patch627 -p1 -%patch637 -p1 %patch639 -p1 %patch640 -p1 %patch643 -p1 @@ -595,6 +595,10 @@ export LDFLAGS="-Wl,--threads=1" %endif %endif +%if %{mdvver} < 201900 +grep -IrlE '#include([[:space:]])*' | xargs sed -i'' -E -e 's,#include([[:space:]])*,#include "%{SOURCE21}",' +%endif + out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release pushd out/Release diff --git a/missing_fcntl.h b/missing_fcntl.h new file mode 100644 index 0000000..3527f66 --- /dev/null +++ b/missing_fcntl.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* From systemd, commit db9ecf050165fd1033c6f81485917e229c4be537 */ + +#pragma once + +#include + +#ifndef F_LINUX_SPECIFIC_BASE +#define F_LINUX_SPECIFIC_BASE 1024 +#endif + +#ifndef F_SETPIPE_SZ +#define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7) +#endif + +#ifndef F_GETPIPE_SZ +#define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8) +#endif + +#ifndef F_ADD_SEALS +#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9) +#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10) + +#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */ +#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */ +#define F_SEAL_GROW 0x0004 /* prevent file from growing */ +#define F_SEAL_WRITE 0x0008 /* prevent writes */ +#endif + +#ifndef F_OFD_GETLK +#define F_OFD_GETLK 36 +#define F_OFD_SETLK 37 +#define F_OFD_SETLKW 38 +#endif + +#ifndef MAX_HANDLE_SZ +#define MAX_HANDLE_SZ 128 +#endif + +/* The precise definition of __O_TMPFILE is arch specific; use the + * values defined by the kernel (note: some are hexa, some are octal, + * duplicated as-is from the kernel definitions): + * - alpha, parisc, sparc: each has a specific value; + * - others: they use the "generic" value. + */ + +#ifndef __O_TMPFILE +#if defined(__alpha__) +#define __O_TMPFILE 0100000000 +#elif defined(__parisc__) || defined(__hppa__) +#define __O_TMPFILE 0400000000 +#elif defined(__sparc__) || defined(__sparc64__) +#define __O_TMPFILE 0x2000000 +#else +#define __O_TMPFILE 020000000 +#endif +#endif + +/* a horrid kludge trying to make sure that this will fail on old kernels */ +#ifndef O_TMPFILE +#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) +#endif