fix fatal error: linux/kcmp.h on epel7

drop needless patches
This commit is contained in:
Than Ngo 2023-02-08 20:52:15 +01:00
parent 4e41734103
commit 2fc2dc4d1b
4 changed files with 16 additions and 114 deletions

View File

@ -1,76 +0,0 @@
diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h
index 842553a..89de703 100644
--- a/components/media_router/common/providers/cast/channel/enum_table.h
+++ b/components/media_router/common/providers/cast/channel/enum_table.h
@@ -8,6 +8,7 @@
#include <cstdint>
#include <cstring>
#include <ostream>
+#include <vector>
#include "base/check_op.h"
#include "base/notreached.h"
@@ -187,7 +188,6 @@ class
inline constexpr GenericEnumTableEntry(int32_t value);
inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
private:
@@ -253,7 +253,6 @@ class EnumTable {
constexpr Entry(E value, base::StringPiece str)
: GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
- Entry(const Entry&) = delete;
Entry& operator=(const Entry&) = delete;
};
@@ -312,15 +311,14 @@ class EnumTable {
if (is_sorted_) {
const std::size_t index = static_cast<std::size_t>(value);
if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
- const auto& entry = data_.begin()[index];
+ const auto& entry = data_[index];
if (ANALYZER_ASSUME_TRUE(entry.has_str()))
return entry.str();
}
return absl::nullopt;
}
return GenericEnumTableEntry::FindByValue(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), static_cast<int32_t>(value));
+ &data_[0], data_.size(), static_cast<int32_t>(value));
}
// This overload of GetString is designed for cases where the argument is a
@@ -348,8 +346,7 @@ class EnumTable {
// enum value directly.
absl::optional<E> GetEnum(base::StringPiece str) const {
auto* entry = GenericEnumTableEntry::FindByString(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), str);
+ &data_[0], data_.size(), str);
return entry ? static_cast<E>(entry->value) : absl::optional<E>();
}
@@ -364,7 +361,7 @@ class EnumTable {
// Align the data on a cache line boundary.
alignas(64)
#endif
- std::initializer_list<Entry> data_;
+ const std::vector<Entry> data_;
bool is_sorted_;
constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
@@ -376,8 +373,8 @@ class EnumTable {
for (std::size_t i = 0; i < data.size(); i++) {
for (std::size_t j = i + 1; j < data.size(); j++) {
- const Entry& ei = data.begin()[i];
- const Entry& ej = data.begin()[j];
+ const Entry& ei = data[i];
+ const Entry& ej = data[j];
DCHECK(ei.value != ej.value)
<< "Found duplicate enum values at indices " << i << " and " << j;
DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

View File

@ -1,3 +1,17 @@
diff -up chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc
--- chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me 2023-02-08 20:34:02.700010846 +0100
+++ chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc 2023-02-08 20:35:30.455580670 +0100
@@ -4,7 +4,9 @@
#include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h"
-#include <linux/kcmp.h>
+#ifndef KCMP_FILE
+#define KCMP_FILE 0
+#endif
#include "media/gpu/buildflags.h"
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc
--- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500 --- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500
+++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500 +++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500

View File

@ -1,25 +0,0 @@
diff -up chromium-96.0.4664.45/remoting/signaling/message_tracker.cc.gcc-remoting-constexpr chromium-96.0.4664.45/remoting/signaling/message_tracker.cc
--- chromium-96.0.4664.45/remoting/signaling/message_tracker.cc.gcc-remoting-constexpr 2021-11-19 16:53:23.197177348 -0500
+++ chromium-96.0.4664.45/remoting/signaling/message_tracker.cc 2021-11-19 17:03:16.354910826 -0500
@@ -9,7 +9,7 @@
namespace remoting {
// static
-const base::TimeDelta MessageTracker::kCleanupInterval = base::Minutes(2);
+constexpr base::TimeDelta MessageTracker::kCleanupInterval;
MessageTracker::MessageTracker() = default;
diff -up chromium-96.0.4664.45/remoting/signaling/message_tracker.h.gcc-remoting-constexpr chromium-96.0.4664.45/remoting/signaling/message_tracker.h
--- chromium-96.0.4664.45/remoting/signaling/message_tracker.h.gcc-remoting-constexpr 2021-11-12 05:24:33.000000000 -0500
+++ chromium-96.0.4664.45/remoting/signaling/message_tracker.h 2021-11-19 17:03:00.112809836 -0500
@@ -40,7 +40,8 @@ class MessageTracker final {
// All IDs older than now - kCleanupInterval will be eventually removed, but
// they are not guaranteed to be immediately removed after the interval.
- static const base::TimeDelta kCleanupInterval;
+ static constexpr base::TimeDelta kCleanupInterval =
+ base::Minutes(2);
void RemoveExpiredIds();

View File

@ -21,7 +21,7 @@
# This flag is so I can build things very fast on a giant system. # This flag is so I can build things very fast on a giant system.
# Enabling this in koji causes aarch64 builds to timeout indefinitely. # Enabling this in koji causes aarch64 builds to timeout indefinitely.
%global use_all_cpus 0 %global use_all_cpus 1
%if %{use_all_cpus} %if %{use_all_cpus}
%global numjobs %{_smp_build_ncpus} %global numjobs %{_smp_build_ncpus}
@ -268,9 +268,6 @@ Patch12: chromium-101.0.4951.41-fedora-user-agent.patch
# debian patch, disable font-test # debian patch, disable font-test
Patch20: chromium-disable-font-tests.patch Patch20: chromium-disable-font-tests.patch
# Needs to be submitted..
Patch51: chromium-96.0.4664.45-gcc-remoting-constexpr.patch
# https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch
Patch52: chromium-81.0.4044.92-unbundle-zlib.patch Patch52: chromium-81.0.4044.92-unbundle-zlib.patch
@ -296,10 +293,6 @@ Patch69: chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch
# Update six to 1.16.0 # Update six to 1.16.0
Patch70: chromium-105.0.5195.52-python-six-1.16.0.patch Patch70: chromium-105.0.5195.52-python-six-1.16.0.patch
# Fix crashes with components/cast_*
# Thanks to Gentoo
Patch80: chromium-108-EnumTable-crash.patch
# Disable tests on remoting build # Disable tests on remoting build
Patch82: chromium-98.0.4758.102-remoting-no-tests.patch Patch82: chromium-98.0.4758.102-remoting-no-tests.patch
@ -323,7 +316,7 @@ Patch100: chromium-108-el7-include-fcntl-memfd.patch
Patch101: chromium-108-el7-wayland-strndup-error.patch Patch101: chromium-108-el7-wayland-strndup-error.patch
# Work around old and missing headers on EPEL7 # Work around old and missing headers on EPEL7
Patch103: chromium-99.0.4844.51-epel7-old-headers-workarounds.patch Patch103: chromium-110-epel7-old-headers-workarounds.patch
# Use old cups (chromium's code workaround breaks on gcc) # Use old cups (chromium's code workaround breaks on gcc)
# Revert: https://github.com/chromium/chromium/commit/c3213f8779ddc427e89d982514185ed5e4c94e91 # Revert: https://github.com/chromium/chromium/commit/c3213f8779ddc427e89d982514185ed5e4c94e91
@ -910,9 +903,6 @@ udev.
%patch20 -p1 -b .disable-font-test %patch20 -p1 -b .disable-font-test
# Short term fixes (usually gcc and backports)
%patch51 -p1 -b .gcc-remoting-constexpr
%if 0%{?fedora} || 0%{?rhel} >= 8 %if 0%{?fedora} || 0%{?rhel} >= 8
%patch52 -p1 -b .unbundle-zlib %patch52 -p1 -b .unbundle-zlib
%endif %endif
@ -927,7 +917,6 @@ udev.
%patch65 -p1 -b .java-only-allowed %patch65 -p1 -b .java-only-allowed
%patch69 -p1 -b .update-rjsmin-to-1.2.0 %patch69 -p1 -b .update-rjsmin-to-1.2.0
%patch70 -p1 -b .update-six-to-1.16.0 %patch70 -p1 -b .update-six-to-1.16.0
%patch80 -p1 -b .EnumTable-crash
%patch82 -p1 -b .remoting-no-tests %patch82 -p1 -b .remoting-no-tests
%if ! %{bundlebrotli} %if ! %{bundlebrotli}