From 747517da480c986e5f7146ede0ccfbc2b15b6924 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 28 May 2016 16:06:03 -0500 Subject: [PATCH 1/2] qt56.qmakeHook: remove temporary directory in postInstall Fixes #15556. If the temporary directory is not removed, it will be retained in RPATH, which is a serious security concern. --- pkgs/development/libraries/qt-5/5.6/qmake-hook.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh index cf3803a1b9c..9fd4735209c 100644 --- a/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/5.6/qmake-hook.sh @@ -74,6 +74,10 @@ _qtModuleMultioutDevsPost() { fi } +_qtRmQtOut() { + rm -fr "$qtOut" +} + qmakeConfigurePhase() { runHook preConfigure @@ -116,6 +120,8 @@ if [ -n "$NIX_QT_SUBMODULE" ]; then postInstallHooks+=(_qtRmQmake _qtRmModules) preFixupHooks+=(_qtModuleMultioutDevsPre) postFixupHooks+=(_qtModuleMultioutDevsPost) +else + postInstallHooks+=(_qtRmQtOut) fi fi From 95c5bfc2dc6f2f0476d4dbabd706a4127461ecc2 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 29 May 2016 14:07:03 -0500 Subject: [PATCH 2/2] qt55.qmakeHook: remove temporary directory in postInstall Fixes #15556. If the temporary directory is not removed, it will be retained in RPATH, which is a serious security concern. --- pkgs/development/libraries/qt-5/5.5/qmake-hook.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh index 2669a396280..5401a71bc4c 100644 --- a/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qmake-hook.sh @@ -68,6 +68,10 @@ _qtMultioutModuleDevs() { fi } +_qtRmQtOut() { + rm -fr "$qtOut" +} + qmakeConfigurePhase() { runHook preConfigure @@ -109,6 +113,8 @@ fi if [ -n "$NIX_QT_SUBMODULE" ]; then postInstallHooks+=(_qtRmQmake _qtRmModules) preFixupHooks+=(_qtMultioutModuleDevs) +else + postInstallHooks+=(_qtRmQtOut) fi fi