Yubico / yubikey-neo-manager

Cross platform personalization tool for the YubiKey NEO
https://developers.yubico.com/yubikey-neo-manager/
BSD 2-Clause "Simplified" License
56 stars 12 forks source link

Install fails to patch plist on OS X 10.10 #16

Closed jasonrm closed 10 years ago

jasonrm commented 10 years ago

Fails to patch /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist.

Oct 18 20:52:03 Jasons-MBP Installer[17138]: LSExceptions [0x7f920042ce00] loaded
Oct 18 20:52:03 Jasons-MBP Installer[17138]: @(#)PROGRAM:Install  PROJECT:Install-920
Oct 18 20:52:03 Jasons-MBP Installer[17138]: @(#)PROGRAM:Installer  PROJECT:Installer-815
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Hardware: MacBookPro8,2 @ 2.30 GHz (x 8), 16384 MB RAM
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Running OS Build: Mac OS X 10.10 (14A388a)
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: USER=jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: COMMAND_MODE=unix2003
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: LOGNAME=jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BlzWVgA9Vc/Listeners
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.OLS2fbZeud/Render
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: HOME=/Users/jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: SHELL=/bin/zsh
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: TMPDIR=/var/folders/kt/88v2jj0j4g38c_082dxwn6h00000gn/T/
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: XPC_SERVICE_NAME=com.apple.xpc.launchd.oneshot.0x10000024.Installer
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BlzWVgA9Vc/Listeners
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.OLS2fbZeud/Render
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: XPC_FLAGS=0x0
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: LOGNAME=jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: USER=jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: HOME=/Users/jason
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: SHELL=/bin/zsh
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Env: TMPDIR=/var/folders/kt/88v2jj0j4g38c_082dxwn6h00000gn/T/
Oct 18 20:52:03 Jasons-MBP Installer[17138]: YubiKey NEO Manager  Installation Log
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Opened from: /Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg
Oct 18 20:52:03 Jasons-MBP Installer[17138]: Product archive /Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg trustLevel=202
Oct 18 20:52:05 Jasons-MBP Installer[17138]: InstallerStatusNotifications plugin loaded
Oct 18 20:52:12 Jasons-MBP runner[17142]: Administrator authorization granted.
Oct 18 20:52:12 Jasons-MBP Installer[17138]: ================================================================================
Oct 18 20:52:12 Jasons-MBP Installer[17138]: User picked Custom Install
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Choices selected for installation:
Oct 18 20:52:12 Jasons-MBP Installer[17138]:    Install: "YubiKey NEO Manager"
Oct 18 20:52:12 Jasons-MBP Installer[17138]:    Install: "YubiKey NEO Manager"
Oct 18 20:52:12 Jasons-MBP Installer[17138]:        yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg : com.yubico.pkg.YubiKeyNEOManager : 0.2.0
Oct 18 20:52:12 Jasons-MBP Installer[17138]: ================================================================================
Oct 18 20:52:12 Jasons-MBP Installer[17138]: It took 0.00 seconds to summarize the package selections.
Oct 18 20:52:12 Jasons-MBP Installer[17138]: -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhost
Oct 18 20:52:12 Jasons-MBP Installer[17138]: -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Set authorization level to root for session
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Will use PK session
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Starting installation:
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Configuring volume "Macintosh SSD"
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Preparing disk for local booted install.
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Free space on "Macintosh SSD": 56.84 GB (56839712768 bytes).
Oct 18 20:52:12 Jasons-MBP Installer[17138]: Create temporary directory "/var/folders/kt/88v2jj0j4g38c_082dxwn6h00000gn/T//Install.17138sTachf"
Oct 18 20:52:13 Jasons-MBP Installer[17138]: IFPKInstallElement (1 packages)
Oct 18 20:52:13 Jasons-MBP Installer[17138]: Using authorization level of root for IFPKInstallElement
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: Adding client PKInstallDaemonClient pid=17138, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
Oct 18 20:52:13 Jasons-MBP Installer[17138]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: ----- Begin install -----
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: packages=(
        "PKLeopardPackage <file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg>"
    )
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: Extracting file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/C274A350-CE38-4769-AC55-096AD3C1D317.activeSandbox/Root, uid=0)
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: prevent user idle system sleep
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: suspending backupd
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/C274A350-CE38-4769-AC55-096AD3C1D317.sandboxTrash for sandbox /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/C274A350-CE38-4769-AC55-096AD3C1D317.activeSandbox
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: Shoving /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/C274A350-CE38-4769-AC55-096AD3C1D317.activeSandbox/Root (1 items) to /
Oct 18 20:52:13 Jasons-MBP install_monitor[17146]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
Oct 18 20:52:13 Jasons-MBP installd[17080]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.qu7LUm/Scripts/com.yubico.pkg.YubiKeyNEOManager.eNjYwf
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: patching file /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #1 FAILED at 104.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #2 FAILED at 237.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #3 FAILED at 370.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: 3 out of 3 hunks FAILED -- saving rejects to file -
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: patching file /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #1 FAILED at 104.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #2 FAILED at 241.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: Hunk #3 FAILED at 378.
Oct 18 20:52:13 Jasons-MBP installd[17080]: ./postinstall: 3 out of 3 hunks FAILED -- saving rejects to file /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist.rej
Oct 18 20:52:13 Jasons-MBP install_monitor[17146]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
Oct 18 20:52:13 Jasons-MBP Installer[17138]: LSExceptions [0x7f920042ce00] unloaded
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: releasing backupd
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: allow user idle system sleep
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “yubikey-neo-manager-0.2.2-mac.pkg”." UserInfo=0x7fc7cb639dc0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg, PKInstallPackageIdentifier=com.yubico.pkg.YubiKeyNEOManager, NSLocalizedDescription=An error occurred while running scripts from the package “yubikey-neo-manager-0.2.2-mac.pkg”.} {
        NSFilePath = "./postinstall";
        NSLocalizedDescription = "An error occurred while running scripts from the package \U201cyubikey-neo-manager-0.2.2-mac.pkg\U201d.";
        NSURL = "file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg";
        PKInstallPackageIdentifier = "com.yubico.pkg.YubiKeyNEOManager";
    }
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: Running idle tasks
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: Removing client PKInstallDaemonClient pid=17138, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
Oct 18 20:52:14 Jasons-MBP Installer[17138]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “yubikey-neo-manager-0.2.2-mac.pkg”." UserInfo=0x7f92005039e0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/jason/Downloads/yubikey-neo-manager-0.2.2-mac.pkg#YubiKey_NEO_Manager.pkg, PKInstallPackageIdentifier=com.yubico.pkg.YubiKeyNEOManager, NSLocalizedDescription=An error occurred while running scripts from the package “yubikey-neo-manager-0.2.2-mac.pkg”.}
Oct 18 20:52:14 Jasons-MBP installd[17080]: PackageKit: Done with sandbox removals
Oct 18 20:52:15 Jasons-MBP Installer[17138]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Oct 18 20:52:15 Jasons-MBP Installer[17138]: IFDInstallController 527670 state = 8
Oct 18 20:52:15 Jasons-MBP Installer[17138]: Displaying 'Install Failed' UI.
Oct 18 20:52:15 Jasons-MBP Installer[17138]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
jasonrm commented 10 years ago

Although it fails to patch, NEO Manager app was still installed and works as far as I can tell. It's been a while since I've messed with SmartCardServices so I can't recall what I'd need to check for that. YubiKey Personalization Tool from the App Store isn't working however, unsure if that's related but thought I'd mention it.

dainnilsson commented 10 years ago

The patch adds all different modes for the NEO (which use different PIDs) to the libccid configuration. Without it, it is likely that some modes of the NEO won't be detectable over the CCID transport. You can verify that your file contains all the needed entries by opening it and searching for "Yubikey" within the file. There should be 4 entries (which are: OTP+CCID, CCID, U2F+CCID, OTP+U2F+CCID).

We probably want to make this patching more robust.

jasisk commented 10 years ago

So looks like Yosemite now contains the defs for OTP+CCID and CCID but not U2F+CCID and OPT+U2F+CCID (not surprisingly).

Here's a patch.

Same issue as #20.

dainnilsson commented 10 years ago

Please try the new 0.2.4 build, available here: https://developers.yubico.com/yubikey-neo-manager/Releases/

dainnilsson commented 10 years ago

We've gotten multiple reports that 0.2.4 fixes things, so I'm closing this issue. Feel free to reopen it (or open a new issue) if the 0.2.4 build is giving you problems.