From 3bb91cabca026be82bfa8989f8c1322d8ec522c3 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 7 Jul 2020 13:58:34 -0700 Subject: [PATCH] munki: rename "/usr/local/munki/python" symlink to "munki-python" (#997) Avoid masking the system /usr/bin/python by calling our symlink "munki-python" instead of "python". Closes #996 --- code/client/app_usage_monitor | 2 +- code/client/appusaged | 2 +- code/client/authrestartd | 2 +- code/client/iconimporter | 2 +- code/client/launchapp | 2 +- code/client/logouthelper | 2 +- code/client/makepkginfo | 2 +- code/client/managedsoftwareupdate | 2 +- code/client/manifestutil | 2 +- code/client/munkiimport | 2 +- code/client/precache_agent | 2 +- code/client/ptyexec | 2 +- code/client/removepackages | 2 +- code/client/supervisor | 2 +- .../Resources_no_python/English.lproj/Description.plist | 2 +- code/tools/make_munki_mpkg.sh | 4 ++-- code/tools/make_munki_mpkg_DEP.sh | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/code/client/app_usage_monitor b/code/client/app_usage_monitor index 41f22b51..3bb09e7d 100755 --- a/code/client/app_usage_monitor +++ b/code/client/app_usage_monitor @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2017-2020 Greg Neagle. diff --git a/code/client/appusaged b/code/client/appusaged index ed6ac2c3..2b08ab4a 100755 --- a/code/client/appusaged +++ b/code/client/appusaged @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2018-2020 Greg Neagle. diff --git a/code/client/authrestartd b/code/client/authrestartd index ee2759a1..bbe54b29 100755 --- a/code/client/authrestartd +++ b/code/client/authrestartd @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2017-2020 Greg Neagle. diff --git a/code/client/iconimporter b/code/client/iconimporter index 695f544c..49e768a4 100755 --- a/code/client/iconimporter +++ b/code/client/iconimporter @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2010-2020 Greg Neagle. diff --git a/code/client/launchapp b/code/client/launchapp index eb93118c..d9632588 100755 --- a/code/client/launchapp +++ b/code/client/launchapp @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2010-2020 Greg Neagle. diff --git a/code/client/logouthelper b/code/client/logouthelper index d879d51b..92fbdb02 100755 --- a/code/client/logouthelper +++ b/code/client/logouthelper @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2011-2020 Greg Neagle. diff --git a/code/client/makepkginfo b/code/client/makepkginfo index 6eca440b..22abc382 100755 --- a/code/client/makepkginfo +++ b/code/client/makepkginfo @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2008-2020 Greg Neagle. diff --git a/code/client/managedsoftwareupdate b/code/client/managedsoftwareupdate index d4dc0738..9f4a5a15 100755 --- a/code/client/managedsoftwareupdate +++ b/code/client/managedsoftwareupdate @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2009-2020 Greg Neagle. diff --git a/code/client/manifestutil b/code/client/manifestutil index 804c8d6c..bed700e8 100755 --- a/code/client/manifestutil +++ b/code/client/manifestutil @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2011-2020 Greg Neagle. diff --git a/code/client/munkiimport b/code/client/munkiimport index 39769a8b..98af9751 100755 --- a/code/client/munkiimport +++ b/code/client/munkiimport @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2010-2020 Greg Neagle. diff --git a/code/client/precache_agent b/code/client/precache_agent index 5c2f8441..465cadc1 100755 --- a/code/client/precache_agent +++ b/code/client/precache_agent @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2018-2020 Greg Neagle. diff --git a/code/client/ptyexec b/code/client/ptyexec index 5fe5f9d5..5b9010b2 100755 --- a/code/client/ptyexec +++ b/code/client/ptyexec @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2011-2017 Google Inc. All Rights Reserved. diff --git a/code/client/removepackages b/code/client/removepackages index 86168be5..025a85f0 100755 --- a/code/client/removepackages +++ b/code/client/removepackages @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2009-2020 Greg Neagle. diff --git a/code/client/supervisor b/code/client/supervisor index d52f6feb..c34f5524 100755 --- a/code/client/supervisor +++ b/code/client/supervisor @@ -1,4 +1,4 @@ -#!/usr/local/munki/python +#!/usr/local/munki/munki-python # encoding: utf-8 # # Copyright 2011-2013 Google Inc. All Rights Reserved. diff --git a/code/pkgtemplate/Resources_no_python/English.lproj/Description.plist b/code/pkgtemplate/Resources_no_python/English.lproj/Description.plist index 4dc3253b..db4ec7d2 100644 --- a/code/pkgtemplate/Resources_no_python/English.lproj/Description.plist +++ b/code/pkgtemplate/Resources_no_python/English.lproj/Description.plist @@ -5,6 +5,6 @@ IFPkgDescriptionTitle System Python link IFPkgDescriptionDescription - Creates symlink to system Python at /usr/local/munki/python. Available for install if you choose not to install Munki's embedded Python. + Creates symlink to system Python at /usr/local/munki/munki-python. Available for install if you choose not to install Munki's embedded Python. diff --git a/code/tools/make_munki_mpkg.sh b/code/tools/make_munki_mpkg.sh index ade65dbc..9a43dd3c 100755 --- a/code/tools/make_munki_mpkg.sh +++ b/code/tools/make_munki_mpkg.sh @@ -539,7 +539,7 @@ chmod -R 755 "$PYTHONROOT/usr" # Copy framework cp -R "$MUNKIROOT/Python.framework" "$PYTHONROOT/usr/local/munki/" # Create symlink -ln -s Python.framework/Versions/3.7/bin/python3 "$PYTHONROOT/usr/local/munki/python" +ln -s Python.framework/Versions/3.7/bin/python3 "$PYTHONROOT/usr/local/munki/munki-python" # Set permissions. chmod -R go-w "$PYTHONROOT/usr/local/munki" chmod +x "$PYTHONROOT/usr/local/munki" @@ -560,7 +560,7 @@ mkdir -m 1775 "$NOPYTHONROOT" mkdir -p "$NOPYTHONROOT/usr/local/munki" chmod -R 755 "$NOPYTHONROOT/usr" # Create symlink -ln -s /usr/bin/python "$NOPYTHONROOT/usr/local/munki/python" +ln -s /usr/bin/python "$NOPYTHONROOT/usr/local/munki/munki-python" # Set permissions. chmod -R go-w "$NOPYTHONROOT/usr/local/munki" chmod +x "$NOPYTHONROOT/usr/local/munki" diff --git a/code/tools/make_munki_mpkg_DEP.sh b/code/tools/make_munki_mpkg_DEP.sh index a148c004..6083e4be 100755 --- a/code/tools/make_munki_mpkg_DEP.sh +++ b/code/tools/make_munki_mpkg_DEP.sh @@ -550,7 +550,7 @@ chmod -R 755 "$PYTHONROOT/usr" # Copy framework cp -R "$MUNKIROOT/Python.framework" "$PYTHONROOT/usr/local/munki/" # Create symlink -ln -s Python.framework/Versions/3.7/bin/python3 "$PYTHONROOT/usr/local/munki/python" +ln -s Python.framework/Versions/3.7/bin/python3 "$PYTHONROOT/usr/local/munki/munki-python" # Set permissions. chmod -R go-w "$PYTHONROOT/usr/local/munki" chmod +x "$PYTHONROOT/usr/local/munki" @@ -571,7 +571,7 @@ mkdir -m 1775 "$NOPYTHONROOT" mkdir -p "$NOPYTHONROOT/usr/local/munki" chmod -R 755 "$NOPYTHONROOT/usr" # Create symlink -ln -s /usr/bin/python "$NOPYTHONROOT/usr/local/munki/python" +ln -s /usr/bin/python "$NOPYTHONROOT/usr/local/munki/munki-python" # Set permissions. chmod -R go-w "$NOPYTHONROOT/usr/local/munki" chmod +x "$NOPYTHONROOT/usr/local/munki"