Re: Efforts to streamline installation for OSX via Homebrew Cask
"Paul Smith" <[email protected]> Fri, 27 Jan 2017 04:03:15 +0000
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
A small but important update: Booting my Mac in Recovery mode, disabling SIP, and rebooting again and the command line Installer works. It does not need any Choice configuring at all. So fundamentally it’s SIP related, and may just simply be a need for the package to be signed with a Developers certificate? Paul From: <[email protected]> on behalf of Paul Smith <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Friday, 27 January 2017 at 2:52 pm To: "[email protected]" <[email protected]> Subject: [pcp] Efforts to streamline installation for OSX via Homebrew Cask I thought I would describe my ‘progress’ in trying to have the OSX installation of PCP streamlined utilizing Homebrew Cask (see [1]). This would enable streamlined install & upgrade paths using a super-common installation method for OSX users, and in particular would then allow leveraging something like Boxen (see [2]) to automate installation of common environments. My goal was get things working to enable the following to work on OSX: brew cask install pcp brew cask upgrade pcp This would download the current/latest version configured from bintray download area. HOWEVER… I can’t get it to work.. I’m documenting how far I got here in case some other brains trust out there way more familiar than me with OSX internals might have some insight. After getting the download and checksums and initiation of the Pkg installation working through Homebrew Cask, I then run into problem that are outside the Homebrew environment. Fundamentally the PCP OSX Installer Pkg in its current from is either broken, or hanging by a thread. This could be a legacy of the pkg being generated on an older iMac (I think it was Nathan’s or Ken’s or something..). In _theory_, one can run the Pkg installer from the command line automating what the User does: sudo installer -allowUntrusted -dumplog -verboseR -pkg pcp-3.11.4-1.pkg -target / However this invocation hangs. I have to kill -9 it. I have been unable to capture any sort of backtrace (strace like) as dtruss (dtrace) on OSX can’t run on this because of System Integrity Protection (see [3]). So I have no idea what it is doing. I guess I’ll have to boot with SIP disabled to trace further… *sigh* It’s also possible the requirement of the Installer and the acceptance of a License Agreement is part of the hang. There’s options with “installer” to provide Choice overrides, and I thought this was the problem I was facing, but I’ve battled with these: … [-showChoicesXML] [-applyChoiceChangesXML <pathToFile>] [-showChoicesAfterApplyingChangesXML <pathtoFile>] To no avail. See Appendix section below on these. Hangs whether I try to configure choices or not. List of issues: · The Pkg is not signed with a developer certificate – One can see this now after downloading the DMG image, and simply double-clicking the Pkg. OSX complains that the Package is not signed and refuses to execute it. One gets around this by right clicking and choosing to “Open with…” and choosing the Installer application, which does launch with an option for the User to override this warning. This is the only way that people can install PCP on OSX with a modern OSX version. · Provide a way to accept the License agreement from the command line installer, or get rid of it entirely. Given one can install PCP on Linux without having to accept a license agreement, I’m not sure why this is necessary..? Other Suggestions in no particular order: · It may be time to consider a more stabilized modern build environment, leveraging a cloud-based image that can be reproducibly setup. Something like XCloud.me (see [4]) rather than someone’s home desktop – which is at risk of catching fire or getting nicked.. · Mandate a more modern OSX install for the clien– I am of course the Upgrade-a-tron so I’d be quite happy with osSierra So there’s where I am at. If anyone has any bright ideas to point me towards, I would appreciate it. Paul [1]: https://github.com/tallpsmith/homebrew-cask [2]: https://github.com/boxen/boxen [3]: http://internals.exposed/blog/dtrace-vs-sip.html [4]: https://xcloud.me/ Appendex A – Output of the -showChoicesXML of installer <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>childItems</key> <array/> <key>choiceDescription</key> <string>Performance Co-Pilot for Mac OS X</string> <key>choiceIdentifier</key> <string>PKG_REF_0</string> <key>choiceIsEnabled</key> <false/> <key>choiceIsSelected</key> <integer>1</integer> <key>choiceIsVisible</key> <true/> <key>choiceSizeInKilobytes</key> <integer>88384</integer> <key>choiceTitle</key> <string>PCP for Mac OS X</string> <key>pathsOfActivePackagesInChoice</key> <array> <string>file://localhost/Volumes/pcp-3.11.4-1/pcp-3.11.4-1.pkg</string> </array> </dict> </array> </plist> Appendix C – Trying to “apply” the only choice that’s in that XML (attributeSetting, choiceAttribute): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>childItems</key> <array/> <key>attributeSetting</key> <integer>1</integer> <key>choiceAttribute</key> <string>selected</string> <key>choiceDescription</key> <string>Performance Co-Pilot for Mac OS X</string> <key>choiceIdentifier</key> <string>PKG_REF_0</string> <key>choiceIsEnabled</key> <true/> <key>choiceIsSelected</key> <integer>1</integer> <key>choiceIsVisible</key> <true/> <key>choiceSizeInKilobytes</key> <integer>88384</integer> <key>choiceTitle</key> <string>PCP for Mac OS X</string> <key>pathsOfActivePackagesInChoice</key> <array> <string>file://localhost/Volumes/pcp-3.11.4-1/pcp-3.11.4-1.pkg</string> </array> </dict> </array> </plist> Appendix D Output of command line execution showing Choices after applying Appendix C: [ pcp-3.11.4-1 ]$ installer -dumplog -verboseR -pkg pcp-3.11.4-1.pkg/ -showChoicesAfterApplyingChangesXML /tmp/foo -target / Jan 27 14:45:47 installer[86082] <Debug>: fileURLForURL = x-disc://pcp-3.11.4-1/pcp-3.11.4-1.pkg Jan 27 14:45:47 installer[86082] <Debug>: fileURLForURL = file://localhost/Volumes/pcp-3.11.4-1/pcp-3.11.4-1.pkg Jan 27 14:45:47 installer[86082] <Debug>: Requirement: requires "OsVerLabelKey" SKIP for root=(none), domain=0 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array/> </plist> Note: this does NOT hang, and outputs that there are no more choices left to configure. Appendix E – Now apply the choices.. [ pcp-3.11.4-1 ]$ sudo installer -allowUntrusted -dumplog -verboseR -pkg pcp-3.11.4-1.pkg -target / --applyChoiceChangesXML /tmp/foo Password: Jan 27 14:14:16 installer[84483] <Debug>: fileURLForURL = x-disc://pcp-3.11.4-1/pcp-3.11.4-1.pkg Jan 27 14:14:16 installer[84483] <Debug>: fileURLForURL = file://localhost/Volumes/pcp-3.11.4-1/pcp-3.11.4-1.pkg Jan 27 14:14:16 installer[84483] <Debug>: Requirement: requires "OsVerLabelKey" SKIP for root=(none), domain=0 << HANGS >> Some hang and same location of hang as if the choices configuration hadn’t even been done..