commit: ee50f94201794f6e06f67526dd06c73f6249f5b6
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 14 22:40:27 2023 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep 14 22:45:38 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee50f942
net-libs/nodejs: fix pax-marking patch for 20.6.1
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
.../nodejs/files/nodejs-20.6.0-paxmarking.patch | 88 ++++++++++++++++++++++
net-libs/nodejs/nodejs-20.6.1.ebuild | 2 +-
2 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/net-libs/nodejs/files/nodejs-20.6.0-paxmarking.patch
b/net-libs/nodejs/files/nodejs-20.6.0-paxmarking.patch
new file mode 100644
index 000000000000..32fbe2d1d00a
--- /dev/null
+++ b/net-libs/nodejs/files/nodejs-20.6.0-paxmarking.patch
@@ -0,0 +1,88 @@
+diff --git a/node.gyp b/node.gyp
+index 49e39c3ce8..767ebc4e5f 100644
+--- a/node.gyp
++++ b/node.gyp
+@@ -369,6 +369,7 @@
+ 'src/quic/transportparams.h',
+ ],
+ 'node_mksnapshot_exec':
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
++ 'node_mksnapshot_u_exec':
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot_u<(EXECUTABLE_SUFFIX)',
+ 'node_js2c_exec':
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)',
+ 'conditions': [
+ ['GENERATOR == "ninja"', {
+@@ -626,11 +627,25 @@
+ 'conditions': [
+ ['node_snapshot_main!=""', {
+ 'actions': [
++ {
++ 'action_name': 'run_pax_mksnapshot',
++ 'inputs': [
++ '<(node_mksnapshot_exec)',
++ ],
++ 'outputs': [
++ '<(node_mksnapshot_u_exec)',
++ ],
++ 'action': [
++ 'bash',
++ '-c',
++ 'mv <(node_mksnapshot_exec) <(node_mksnapshot_u_exec) &&
paxmark.sh m <(node_mksnapshot_u_exec)',
++ ],
++ },
+ {
+ 'action_name': 'node_mksnapshot',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
+- '<(node_mksnapshot_exec)',
++ '<(node_mksnapshot_u_exec)',
+ '<(node_snapshot_main)',
+ ],
+ 'outputs': [
+diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
+index f822c056e5..8b2820abf7 100644
+--- a/tools/v8_gypfiles/v8.gyp
++++ b/tools/v8_gypfiles/v8.gyp
+@@ -9,6 +9,7 @@
+ 'v8_vector_stores%': 0,
+ 'v8_embed_script%': "",
+ 'mksnapshot_exec':
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
++ 'mksnapshot_u_exec':
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)',
+ 'v8_os_page_size%': 0,
+ 'generate_bytecode_output_root':
'<(SHARED_INTERMEDIATE_DIR)/generate-bytecode-output-root',
+ 'generate_bytecode_builtins_list_output':
'<(generate_bytecode_output_root)/builtins-generated/bytecodes-builtins-list.h',
+@@ -1520,7 +1521,7 @@
+ ],
+ }, # bytecode_builtins_list_generator
+ {
+- 'target_name': 'mksnapshot',
++ 'target_name': 'mksnapshot_u',
+ 'type': 'executable',
+ 'dependencies': [
+ 'v8_base_without_compiler',
+@@ -1545,6 +1546,27 @@
+ 'ldflags': [ '-fno-lto' ],
+ }],
+ ],
++ }, # mksnapshot_u
++ {
++ 'target_name': 'mksnapshot',
++ 'type': 'none',
++ 'dependencies': ['mksnapshot_u'],
++ 'actions': [
++ {
++ 'action_name': 'paxmark_mksnapshot',
++ 'inputs': [
++ '<(mksnapshot_u_exec)',
++ ],
++ 'outputs': [
++ '<(mksnapshot_exec)',
++ ],
++ 'action': [
++ 'bash',
++ '-c',
++ 'cp <(mksnapshot_u_exec) <(mksnapshot_exec) && paxmark.sh m
<(mksnapshot_exec)'
++ ],
++ },
++ ],
+ }, # mksnapshot
+ {
+ 'target_name': 'torque',
diff --git a/net-libs/nodejs/nodejs-20.6.1.ebuild
b/net-libs/nodejs/nodejs-20.6.1.ebuild
index a70dfde5f996..ad9c3ca7ca9d 100644
--- a/net-libs/nodejs/nodejs-20.6.1.ebuild
+++ b/net-libs/nodejs/nodejs-20.6.1.ebuild
@@ -108,7 +108,7 @@ src_prepare() {
fi
# We need to disable mprotect on two files when it builds Bug 694100.
- use pax-kernel && PATCHES+=(
"${FILESDIR}"/${PN}-18.16.0-paxmarking.patch )
+ use pax-kernel && PATCHES+=(
"${FILESDIR}"/${PN}-20.6.0-paxmarking.patch )
default
}