From f0f773f92c56a54e5fed228a3a68294e2691ce10 Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Wed, 18 Nov 2015 12:59:03 -0800 Subject: [PATCH] Add correct permissions and symlinks to PKG generation Add proper symlinks to the postinstall script. Also, the permissions of the resulting directory post-install were wrong (set to root:wheel). This is fixed by using the --ownership preserve switch to pkgbuild. Fix #247 --- packaging/osx/package-osx.sh | 1 + packaging/osx/scripts/postinstall | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packaging/osx/package-osx.sh b/packaging/osx/package-osx.sh index 6add6a699..6b3c4d21a 100755 --- a/packaging/osx/package-osx.sh +++ b/packaging/osx/package-osx.sh @@ -41,6 +41,7 @@ PACKAGE_NAME=$PACKAGE_DIR/dotnet-cli-x64.${DOTNET_BUILD_VERSION}.pkg pkgbuild --root $STAGE2_DIR \ --version $DOTNET_BUILD_VERSION \ --scripts $DIR/scripts \ + --ownership preserve \ --identifier com.microsoft.dotnet.cli.pkg.dotnet-osx-x64 \ --install-location /usr/local/share/dotnet/cli \ $DIR/dotnet-osx-x64.$DOTNET_BUILD_VERSION.pkg diff --git a/packaging/osx/scripts/postinstall b/packaging/osx/scripts/postinstall index 7f17623f1..4b4b810a9 100755 --- a/packaging/osx/scripts/postinstall +++ b/packaging/osx/scripts/postinstall @@ -4,12 +4,12 @@ # Licensed under the MIT license. See LICENSE file in the project root for full license information. # -ln -s $2/dotnet /usr/local/bin/ -ln -s $2/dotnet-compile /usr/local/bin/ -ln -s $2/dotnet-compile-csc /usr/local/bin/ -ln -s $2/dotnet-publish /usr/local/bin/ -ln -s $2/dotnet-restore /usr/local/bin/ -ln -s $2/dotnet-restore /usr/local/bin/ -ln -s $2/resgen /usr/local/bin/ +ln -s $2/bin/dotnet /usr/local/bin/ +ln -s $2/bin/dotnet-compile /usr/local/bin/ +ln -s $2/bin/dotnet-compile-csc /usr/local/bin/ +ln -s $2/bin/dotnet-publish /usr/local/bin/ +ln -s $2/bin/dotnet-restore /usr/local/bin/ +ln -s $2/bin/dotnet-restore /usr/local/bin/ +ln -s $2/bin/resgen /usr/local/bin/ exit 0