summary refs log tree commit diff
path: root/pkgs/stdenv/generic/setup.sh
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-05-25 19:36:50 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-05-27 18:57:59 +0200
commit6648b04381b8fefb704824f5db898813f22dafbb (patch)
treec30e786112651d59a398620ec95749deba02df4b /pkgs/stdenv/generic/setup.sh
parentdc13593b9fad3ea3728e2fd32f90841d5ec7662d (diff)
downloadnixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar.gz
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar.bz2
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar.lz
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar.xz
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.tar.zst
nixlib-6648b04381b8fefb704824f5db898813f22dafbb.zip
stdenv: fix paxmark
On Linux, paxctl's setup hook should overwrite the paxmark stub, but the
stub is defined after the setup hooks are sourced, so the stub ends up
overwriting the real function.  The result is that paxmark fails to do
anything.  The fix is to define the stub before any setup hooks are
sourced.  Thanks to @vcunat for figuring this out.

Closes #15492
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r--pkgs/stdenv/generic/setup.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index ce5feac3c66d..85e74461d2a4 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -236,6 +236,11 @@ BASH="$SHELL"
 export CONFIG_SHELL="$SHELL"
 
 
+# Dummy implementation of the paxmark function. On Linux, this is
+# overwritten by paxctl's setup hook.
+paxmark() { true; }
+
+
 # Execute the pre-hook.
 if [ -z "$shell" ]; then export shell=$SHELL; fi
 runHook preHook
@@ -369,11 +374,6 @@ fi
 export NIX_BUILD_CORES
 
 
-# Dummy implementation of the paxmark function. On Linux, this is
-# overwritten by paxctl's setup hook.
-paxmark() { true; }
-
-
 # Prevent OpenSSL-based applications from using certificates in
 # /etc/ssl.
 if [ -z "$SSL_CERT_FILE" ]; then