Jump to content

Plastic on OS X El Capitan fails installation (and a workaround)


andersl

Recommended Posts

Hi,

 

Today I tried to install the latest version of Plastic (5.4.16.693) on my macbook pro running the last beta of OS X El Capitan. However the installation fails at the end.

I looked through the installation log file:

 

tail -n 200 /var/log/install.log

 

And found the following:

 

Sep 27 11:06:07 mac installd[308]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.VmSjLM/Scripts/com.codicesoftware.plasticscm.macplastic.rFNjcO

Sep 27 11:06:07 mac installd[308]: ./postinstall: /tmp/PKInstallSandbox.VmSjLM/Scripts/com.codicesoftware.plasticscm.macplastic.rFNjcO/postinstall: line 2: /usr/bin/PlasticSCMUnityPlugin: Operation not permitted
Sep 27 11:06:07 mac installd[308]: ./postinstall: /tmp/PKInstallSandbox.VmSjLM/Scripts/com.codicesoftware.plasticscm.macplastic.rFNjcO/postinstall: line 3: /usr/bin/PlasticSCMUnityPlugin: Operation not permitted
Sep 27 11:06:07 mac installd[308]: ./postinstall: chmod: /usr/bin/PlasticSCMUnityPlugin: No such file or directory
Sep 27 11:06:07 mac install_monitor[6403]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
Sep 27 11:06:07 mac installd[308]: PackageKit: releasing backupd
Sep 27 11:06:07 mac installd[308]: PackageKit: allow user idle system sleep
Sep 27 11:06:07 mac installd[308]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “macplastic-5.4.16.693.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file://localhost/Users/andersl/Downloads/macplastic-5.4.16.693.pkg#com.codicesoftware.plasticscm.

 

It seems there is something with the installation of the Unity plugin script in /usr/bin/ that fails due to not having the correct permissions (I was root) this might be something new on El Capitan (OS X 10.11).

 

I don't use Unity anyway so I created a workaround that works for me:

 

First I unpacked the downloaded installation .pkg file with:

 

pkgutil --expand macplastic-5.4.16.693.pkg macplastic

 
Then I opened the post install script with nano:
 
nano macplastic/com.codicesoftware.plasticscm.macplastic.pkg/Scripts/postinstall 
 
I removed everything regrind the Unity plugin and only left the first line in the file:
 
#!/bin/bash
 
Finally I flattened the directory to a new .pkg file:
 
pkgutil --flatten macplastic macplastic.pkg
 
By double clicking this new .pkg file I could install the Plastic SCM client. However note that the Unity plugin does not work. 
 
/Anders
 
Link to comment
Share on other sites

Ok, The problem is with the new El Capitan "rootless" feature. See http://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really

 

We are trying to create the UnityPlugin script at "/usr/bin" which is now read-only. We can change it to /usr/local/bin, it will keep working as expected.

 

But I have one question, you did the MacOS upgrade to El Capitán right? Did you perform the upgrade with macplastic installed? In that case, can you check if you still have "PlasticSCMUnityPlugin" installed on "/usr/bin"? Can you also check, just in case MacOS move it automatically, if it exists on "/usr/local/bin"?

 

Thanks.

Link to comment
Share on other sites

Well shoot. If x11 is gone forever I am in trouble. Does or will macplastic have the same diff abilities that X11 has? I need the ability to diff a whole changeset or branch.

 

I, luckily, had macplastic on my machine before my OS update so I can use it, but it seems too limited. Out of the box, I can't get any of the diff or merge tools to work. I had had this issue before with macplastic and it was so frustrating that I just dropped it in favor of x11. The ability to view an entire changeset worth of changes in invaluable. Will that be coming soon to macplastic?

 

Thanks.

Link to comment
Share on other sites

Hey, just a heads-up for those that installed Capitan and need the Unity plug-in working immediately, you can turn off System Integrity Protection temporarily (until the good folks at Codice release the new Mac version) and you'll be able to install and use the Unity plug-in:

 

http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/

 

Disclaimer: I DO NOT RECOMMEND YOU DO THIS and I'd rather wait for the next Mac version, but I can't!

 

(Once they do release the new version that page has instructions on how to turn it back on!)

 

Cheers!

Link to comment
Share on other sites

Hi!

 

it seems Unity is using the following (custom) PATH variable:

 

/usr/bin:/bin:/usr/sbin:/sbin

 

And as you may know we are not able to write on those paths because of the El capitan rootless feature.... so our script is out of the PATH sleeping at "/usr/local/bin"

 

Meanwhile we communicate the issue to Unity, you can also write to them to make some noise :P, we can manually fix it by editing an Unity script, it's located here:

 
/Applications/Unity/Unity.app/Contents/Tools/VersionControl/PlasticSCMPlugin
 
And you'll need to change this line: 
EXE_DEFAULT_PATH="/Applications/PlasticSCM/client/PlasticSCMUnityPlugin"
 
Setting the following content: 
EXE_DEFAULT_PATH="/usr/local/bin/PlasticSCMUnityPlugin"
 
Save the file and the plugin will start working.  Remember to set the "GluonMode" Plastic SCM filed to false at the Unity Editot configuration.
 
Sorry for the inconveniences!
Link to comment
Share on other sites

  • 2 weeks later...

Actually found a couple more issues:

 

When trying to "Apply All Incoming Changes", I get a "PlasticSCM : No process is associated with this object." error in the console, so I can't update the workspace from within Unity.

 

Also, when trying to "Show Branch Explorer" from within Unity I get a "PlasticSCM : Process ID has not been set.".

Link to comment
Share on other sites

Hi!

 

I do get the second error -> "PlasticSCM : Process ID has not been set." while trying to open the branch explorer. Unfortunately it's not implemented for Mac yet.

 

But I can't not reproduce the "Apply All Incoming Changes" issue. Do you always get if? I have tested with a changed file and it was correctly downloaded, I also tested with added items and they where downloaded too. Deleted items on Head were also deleted during the Apply all Incoming Changes" operation. I'm testing Unity 5.1.1f1 and Plastic SCM 5.4.16.699.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...