1 |
commit: 92f620de9364d333a3a8dcd6f529ac3861c673c7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 11 21:34:41 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 11 21:44:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92f620de |
7 |
|
8 |
dev-util/sysdig: Backport fix for building with 5.0.0 kernel |
9 |
|
10 |
Closes: https://bugs.gentoo.org/680084 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
.../sysdig/files/sysdig-0.24.2-kernel-5.0.0.patch | 34 ++++++++++++++++++++++ |
14 |
dev-util/sysdig/sysdig-0.24.2.ebuild | 7 ++++- |
15 |
2 files changed, 40 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-util/sysdig/files/sysdig-0.24.2-kernel-5.0.0.patch b/dev-util/sysdig/files/sysdig-0.24.2-kernel-5.0.0.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..711eb182751 |
20 |
--- /dev/null |
21 |
+++ b/dev-util/sysdig/files/sysdig-0.24.2-kernel-5.0.0.patch |
22 |
@@ -0,0 +1,34 @@ |
23 |
+From 2c8f0263382bf64800faec5fba5cc3e005d9fb1e Mon Sep 17 00:00:00 2001 |
24 |
+From: Colin Ian King <colin.king@×××××××××.com> |
25 |
+Date: Thu, 31 Jan 2019 10:54:00 +0000 |
26 |
+Subject: [PATCH] Update for change to access_ok in Linux 5.0 |
27 |
+ |
28 |
+Linux 5.0 removed the 1st argument 'type' from the access_ok macro. |
29 |
+Update the ppm_access_ok() macro to cater for this change for Linux |
30 |
+5.0 |
31 |
+ |
32 |
+Bug: https://github.com/draios/sysdig/issues/1299 |
33 |
+sysdig-CLA-1.0-signed-off-by: Colin Ian King <colin.king@×××××××××.com> |
34 |
+ |
35 |
+Signed-off-by: Colin Ian King <colin.king@×××××××××.com> |
36 |
+--- |
37 |
+ driver/ppm_events.c | 6 +++++- |
38 |
+ 1 file changed, 5 insertions(+), 1 deletion(-) |
39 |
+ |
40 |
+diff --git a/driver/ppm_events.c b/driver/ppm_events.c |
41 |
+index 717590888..cc3eb98d2 100644 |
42 |
+--- a/driver/ppm_events.c |
43 |
++++ b/driver/ppm_events.c |
44 |
+@@ -46,7 +46,11 @@ or GPL2.txt for full copies of the license. |
45 |
+ #ifdef access_ok_noprefault |
46 |
+ #define ppm_access_ok access_ok_noprefault |
47 |
+ #else |
48 |
+-#define ppm_access_ok access_ok |
49 |
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) |
50 |
++#define ppm_access_ok(type, addr, size) access_ok(type, addr, size) |
51 |
++#else |
52 |
++#define ppm_access_ok(type, addr, size) access_ok(addr, size) |
53 |
++#endif |
54 |
+ #endif |
55 |
+ |
56 |
+ extern bool g_tracers_enabled; |
57 |
|
58 |
diff --git a/dev-util/sysdig/sysdig-0.24.2.ebuild b/dev-util/sysdig/sysdig-0.24.2.ebuild |
59 |
index 3ba452c42e3..abc1676d9a6 100644 |
60 |
--- a/dev-util/sysdig/sysdig-0.24.2.ebuild |
61 |
+++ b/dev-util/sysdig/sysdig-0.24.2.ebuild |
62 |
@@ -1,4 +1,4 @@ |
63 |
-# Copyright 1999-2018 Gentoo Foundation |
64 |
+# Copyright 1999-2019 Gentoo Authors |
65 |
# Distributed under the terms of the GNU General Public License v2 |
66 |
|
67 |
EAPI="6" |
68 |
@@ -46,6 +46,11 @@ pkg_setup() { |
69 |
src_prepare() { |
70 |
sed -i -e 's:-ggdb::' CMakeLists.txt || die |
71 |
|
72 |
+ local PATCHES=( |
73 |
+ # compatibility with kernel 5.0.0 |
74 |
+ # https://bugs.gentoo.org/680084 |
75 |
+ "${FILESDIR}"/sysdig-0.24.2-kernel-5.0.0.patch |
76 |
+ ) |
77 |
cmake-utils_src_prepare |
78 |
} |