Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/, net-libs/nodejs/files/
Date: Mon, 17 Feb 2020 00:38:05
Message-Id: 1581899851.7beac2cd42801fc3ef9a1c81b9922d850e17a1c1.zorry@gentoo
1 commit: 7beac2cd42801fc3ef9a1c81b9922d850e17a1c1
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 17 00:33:45 2020 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 17 00:37:31 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7beac2cd
7
8 net-libs/nodejs: Fix building on pax enable kernel
9
10 Closes: https://bugs.gentoo.org/694100
11 Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
12 Package-Manager: Portage-2.3.84, Repoman-2.3.16
13
14 .../nodejs/files/nodejs-13.8.0-paxmarking.patch | 111 +++++++++++++++++++++
15 net-libs/nodejs/nodejs-13.8.0.ebuild | 2 +-
16 2 files changed, 112 insertions(+), 1 deletion(-)
17
18 diff --git a/net-libs/nodejs/files/nodejs-13.8.0-paxmarking.patch b/net-libs/nodejs/files/nodejs-13.8.0-paxmarking.patch
19 new file mode 100644
20 index 00000000000..0fb33cbee49
21 --- /dev/null
22 +++ b/net-libs/nodejs/files/nodejs-13.8.0-paxmarking.patch
23 @@ -0,0 +1,111 @@
24 + Bug: 694100
25 + Add actions for pax marking mkcodecache, node_mksnapshot and mksnapshot
26 + to disable mprotect for pax enable kernel.
27 + Reported-by: Attila Tóth <atoth@××××××××××.hu>
28 + Co-developed-by: Attila Tóth <atoth@××××××××××.hu>
29 + Signed-off-by: Magnus Granberg <zorry@g.o>
30 +
31 +--- a/node.gyp 2019-10-23 11:52:41.000000000 +0200
32 ++++ b/node.gyp 2019-11-12 20:58:43.957881862 +0100
33 +@@ -233,7 +233,9 @@
34 + 'deps/acorn-plugins/acorn-static-class-features/index.js',
35 + ],
36 + 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
37 ++ 'node_mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot_u<(EXECUTABLE_SUFFIX)',
38 + 'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',
39 ++ 'mkcodecache_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache_u<(EXECUTABLE_SUFFIX)',
40 + 'conditions': [
41 + [ 'node_shared=="true"', {
42 + 'node_target_type%': 'shared_library',
43 +@@ -436,10 +438,24 @@
44 + ],
45 + 'actions': [
46 + {
47 ++ 'action_name': 'run_pax_mkcodecache',
48 ++ 'inputs': [
49 ++ '<(mkcodecache_exec)',
50 ++ ],
51 ++ 'outputs': [
52 ++ '<(mkcodecache_u_exec)',
53 ++ ],
54 ++ 'action': [
55 ++ 'bash',
56 ++ '-c',
57 ++ 'mv <(mkcodecache_exec) <(mkcodecache_u_exec) && paxmark.sh m <(mkcodecache_u_exec)',
58 ++ ],
59 ++ },
60 ++ {
61 + 'action_name': 'run_mkcodecache',
62 + 'process_outputs_as_sources': 1,
63 + 'inputs': [
64 +- '<(mkcodecache_exec)',
65 ++ '<(mkcodecache_u_exec)',
66 + ],
67 + 'outputs': [
68 + '<(SHARED_INTERMEDIATE_DIR)/node_code_cache.cc',
69 +@@ -461,10 +477,24 @@
70 + ],
71 + 'actions': [
72 + {
73 ++ 'action_name': 'run_pax_mksnapshot',
74 ++ 'inputs': [
75 ++ '<(node_mksnapshot_exec)',
76 ++ ],
77 ++ 'outputs': [
78 ++ '<(node_mksnapshot_u_exec)',
79 ++ ],
80 ++ 'action': [
81 ++ 'bash',
82 ++ '-c',
83 ++ 'mv <(node_mksnapshot_exec) <(node_mksnapshot_u_exec) && paxmark.sh m <(node_mksnapshot_u_exec)',
84 ++ ],
85 ++ },
86 ++ {
87 + 'action_name': 'node_mksnapshot',
88 + 'process_outputs_as_sources': 1,
89 + 'inputs': [
90 +- '<(node_mksnapshot_exec)',
91 ++ '<(node_mksnapshot_u_exec)',
92 + ],
93 + 'outputs': [
94 + '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc',
95 +--- a/tools/v8_gypfiles/v8.gyp 2019-12-03 16:10:36.000000000 +0100
96 ++++ b/tools/v8_gypfiles/v8.gyp 2019-12-17 18:37:33.695839254 +0100
97 +@@ -9,6 +9,7 @@
98 + 'v8_vector_stores%': 0,
99 + 'v8_embed_script%': "",
100 + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
101 ++ 'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)',
102 + 'v8_os_page_size%': 0,
103 + 'generate_bytecode_output_root': '<(SHARED_INTERMEDIATE_DIR)/generate-bytecode-output-root',
104 + 'generate_bytecode_builtins_list_output': '<(generate_bytecode_output_root)/builtins-generated/bytecodes-builtins-list.h',
105 +@@ -427,6 +425,20 @@
106 + },
107 + 'actions': [
108 + {
109 ++ 'action_name': 'run_pax_mksnapshot',
110 ++ 'inputs': [
111 ++ '<(mksnapshot_exec)',
112 ++ ],
113 ++ 'outputs': [
114 ++ '<(mksnapshot_u_exec)',
115 ++ ],
116 ++ 'action': [
117 ++ 'bash',
118 ++ '-c',
119 ++ 'mv <(mksnapshot_exec) <(mksnapshot_u_exec) && paxmark.mksnapshot_u_exec)',
120 ++ ],
121 ++ },
122 ++ {
123 + 'action_name': 'run_mksnapshot',
124 + 'message': 'generating: >@(_outputs)',
125 + 'variables': {
126 +@@ -442,7 +454,7 @@
127 + ],
128 + },
129 + 'inputs': [
130 +- '<(mksnapshot_exec)',
131 ++ '<(mksnapshot_u_exec)',
132 + ],
133 + 'outputs': ["<(INTERMEDIATE_DIR)/snapshot.cc"],
134 + 'process_outputs_as_sources': 1,
135
136 diff --git a/net-libs/nodejs/nodejs-13.8.0.ebuild b/net-libs/nodejs/nodejs-13.8.0.ebuild
137 index 4912e94e0c6..157d3993d84 100644
138 --- a/net-libs/nodejs/nodejs-13.8.0.ebuild
139 +++ b/net-libs/nodejs/nodejs-13.8.0.ebuild
140 @@ -88,7 +88,7 @@ src_prepare() {
141 fi
142
143 # We need to disable mprotect on two files when it builds Bug 694100.
144 - use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch )
145 + use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch )
146
147 default
148 }