kokoabim / iOSOpenDev

iOSOpenDev
http://iOSOpenDev.com
Other
901 stars 284 forks source link

Installation Failed on OSX 10.6.8/Xcode 4.2 #43

Closed ashish1405 closed 2 months ago

ashish1405 commented 11 years ago

Hello,

Installation of iOSOpenDev-1.5 failed on OSX 10.6.8/Xcode 4.2. It seems that in postinstall script, plutil is using json, which is not available before 10.7.


Dec 22 11:37:15 MacBook-Pro installd[958]: ./postinstall: Adding specifications to platform... Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: Unknown format specifier: json Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: plutil: [command_option] [other_options] file... Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: The file '-' means stdin Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: Command options are (-lint is the default): Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -help
Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -lint check the property list files for syntax errors Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -convert fmt rewrite property list files in format Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: fmt is one of: xml1 binary1 Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: There are some additional optional arguments: Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -s be silent on success Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -o path specify alternate file path name for result; Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: the -o option is used with -convert, and is only Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: useful with one file argument (last file overwrites); Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: the path '-' means stdout Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -e extension specify alternate extension for converted files Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: -- specifies that all further arguments are file names Dec 22 11:37:16 MacBook-Pro installd[958]: ./postinstall: Failed to convert XCSpec file /Developer5.0/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec to JSON to temporary file /private/tmp/PKInstallSandbox.4I3MGq/tmp/iod-setup.T7VZmTlq/iPhoneOSPackageTypes.xcspec.plist Dec 22 11:37:16 MacBook-Pro installd[958]: PackageKit: Install Failed: PKG: post-install scripts for "com.iosopendev.iosopendev15.iod-setup.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x10060c300 "An error occurred while running scripts from the package “iOSOpenDev-1.5.pkg”." {\n NSFilePath = "./postinstall";\n NSLocalizedDescription = "An error occurred while running scripts from the package \U201ciOSOpenDev-1.5.pkg\U201d.";\n NSURL = "#iodsetup.pkg -- file://localhost/Users/ashishdesai/Desktop/Setups/jailbreak/iOSOpenDev-1.5.pkg";\n PKInstallPackageIdentifier = "com.iosopendev.iosopendev15.iod-setup.pkg";\n} Dec 22 11:37:16 MacBook-Pro Installer[946]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1004b4200 "An error occurred while running scripts from the package “iOSOpenDev-1.5.pkg”." Dec 22 11:37:16 MacBook-Pro Installer[946]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. Dec 22 11:37:16 MacBook-Pro Installer[946]: IFDInstallController 30AF70 state = 7

seizu commented 11 years ago

Same here (Mac OS 10.6.7), any workaround available ?

ashish1405 commented 11 years ago

Ok, I solved it the long way. Xcode 4.2 already has json xcspec so 1) download iOSOpenDev-installer from github. 2) open iod-setup file from scripts folder 3) change below line

#       plutil -convert json -o "$tempFile" "$specFile" || \
#           panic $? "Failed to convert XCSpec file $specFile to JSON to temporary file $tempFile"
        copyFile "$specFile" "$tempFile"

4) open iOSOpenDev.pmdoc. you will need to change the path in Configuration and Scripts 5) build. 6) install with the new installer. 7) now the new xcspec create is bplist so we need to replace contents of iPhoneOSProductTypes.xcspec.iOSOpenDev into iPhoneOSProductTypes.xcspec and iPhoneOSPackageTypes.xcspec.iOSOpenDev into iPhoneOSPackageTypes.xcspec 8) add changes two above to files as mentioned in https://github.com/gdbinit/readmem or https://github.com/kokoabim/iOSOpenDev/wiki/Setup-Explained

kokoabim commented 11 years ago

The newer Xcode uses a slightly different format of these files so that's why you're running into this problem.

On Jan 8, 2013, at 11:56 AM, ashish1405 notifications@github.com wrote:

Ok, I solved it the long way. Xcode 4.2 already has json xcspec so 1) download iOSOpenDev-installer from github. 2) open iod-setup file from scripts folder 3) change below line

plutil -convert json -o "$tempFile" "$specFile" || \

panic $? "Failed to convert XCSpec file $specFile to JSON to temporary file $tempFile"

    copyFile "$specFile" "$tempFile"

4) open iOSOpenDev.pmdoc. you will need to change the path in Configuration and Scripts 5) build. 6) install with the new installer. 7) now the new xcspec create is bplist so we need to replace contents of iPhoneOSProductTypes.xcspec.iOSOpenDev into iPhoneOSProductTypes.xcspec and iPhoneOSPackageTypes.xcspec.iOSOpenDev into iPhoneOSPackageTypes.xcspec 8) add changes to above to files as mentioned in https://github.com/gdbinit/readmem or https://github.com/kokoabim/iOSOpenDev/wiki/Setup-Explained

— Reply to this email directly or view it on GitHub.

Nividica commented 11 years ago

Edit: Actually it seems I'm not correctly building the package properly, it is just an empty pkg that does absolutely nothing. I will attempt to get it working and post back.

ashish, I was able to follow you up to step number 7. I'm unclear on which file contents need to be replaced. I do not seem to have the file "iPhoneOSProductTypes.xcspec.iOSOpenDev".

The steps I used to build and install the modified package: 1) Downloaded https://github.com/kokoabim/iOSOpenDev-Installer/archive/master.zip and unarchived 2) Moved the created folder named "iOSOpenDev" to my project directory: "/Users/nividica/Dev/iOSOpenDev" 3) Opened the file "iOSOpenDev/scripts/iod-setup" in TextEdit 4) Replaced the two lines:

       plutil -convert json -o "$tempFile" "$specFile" || \
           panic $? "Failed to convert XCSpec file $specFile to JSON to temporary file $tempFile"

with this line:

        copyFile "$specFile" "$tempFile"

5) Navigated to the folder "iOSOpenDev.pmdoc" 6) Opened each file in this directory with TextEdit and replaced each occurrence of "spencer/Projects" with "nividica/dev" 7) Created the folder "packages" in the folder "iOSOpenDev" 8) Ran the packagemaker with the following command:

/Developer/usr/bin/packagemaker -r /Users/nividica/Dev/iOSOpenDev/ -v -i com.iosopendev.iosopendev -o /Users/nividica/Dev/iOSOpenDev/packages/iosopendev.pkg

9) Once the packagemaker completed, I launched the package 10) The installer completed without issue.

From here I am quite lost as to what to do. As I mentioned I am missing one of the files, and I'm uncertain what I should do.

After completing step 10, I attempted to build a console app, and I am presented with:

Build Failed: target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform

I'm sure it has something to do with the files you mentioned. I have the following files:

/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/
iPhoneClangOptions.xcspec
iPhoneCompilerOptions.xcspec
iPhoneOSArchitectures.xcspec
iPhoneOSPackageTypes.xcspec
iPhoneOSPackageTypes.xcspec.iOSOpenDev
iPhoneOSProductTypes.xcspec
iPhoneXcode4Options.xcspec

Hopefully I can work out how to go about fixing the issue. If you (or anyone) has any comments on what it is I am missing, I would be very grateful. Thank you for your instructions thus far, they have been very helpful :)

System: I'm running OSX 10.6.8, with XCode 4.2.

ashish1405 commented 11 years ago

Hi Nividica, after I posted my comment I realized that the iod-setup script is converting bplist to json and back to bplist. Now in our case we already have json files so just comment both the plutil commands. and dont add my copy command.

About your iPhoneOSProductTypes.xcspec.iOSOpenDev not being created, am not sure of that. But as you ran the installer your iPhoneOSProductTypes may be damaged (if it is not jump to step 5). what you do is 1) extract that file from the sdk or reinstall it. 2) Then back up those two files somewhere. 3) Then run the iOSOpenDev setup. 4) After installation put those files back, 5) add the contents from the link.

BTW I dont know how to use packagemaker, but you can directly double click pmdoc and create a installer.

kokoabim commented 11 years ago

I really need to fix this. Because of the lack on jailbreak for the newer OS I have been lady on this matter.

On Jan 24, 2013, at 3:50 AM, ashish1405 notifications@github.com wrote:

Hi Nividica, after I posted my comment I realized that the iod-setup script is converting bplist to json and back to bplist. Now in our case we already have json files so just comment both the plutil commands. and dont add my copy command.

About your iPhoneOSProductTypes.xcspec.iOSOpenDev not being created, am not sure of that. But as you ran the installer your iPhoneOSProductTypes may be damaged (if it is not jump to step 5). what you do is 1) extract that file from the sdk or reinstall it. 2) Then back up those two files somewhere. 3) Then run the iOSOpenDev setup. 4) After installation put those files back, 5) add the contents from the link.

BTW I dont know how to use packagemaker, but you can directly double click pmdoc and create a installer.

— Reply to this email directly or view it on GitHub.

Nividica commented 11 years ago

It seems my problem was that the .pmdoc was not a registered type, so it was showing up as just a folder. After fixing that issue, I was able to adjust the package and build it.

I have tried removing just the two "plutil" lines, removing one but not the other, removing those two lines and the "perl" line but they all yeild the same result. File not found.

Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Adding specifications to platform...
Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Can't open /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist: No such file or directory.
Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: cp: /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist: No such file or directory
Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Failed to copy file /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist to /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec
Jan 24 07:28:38 Nividicas-Mac-Pro installd[5343]: PackageKit: Install Failed: PKG: post-install scripts for "com.iosopendev.iosopendev15.iod-setup.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100165b20 "An error occurred while running scripts from the package ÒiOSOpenDev-1.5.pkgÓ." {\n    NSFilePath = "./postinstall";\n    NSLocalizedDescription = "An error occurred while running scripts from the package \U201ciOSOpenDev-1.5.pkg\U201d.";\n    NSURL = "#iodsetup.pkg -- file://localhost/Users/nividica/Dev/iOSOpenDev/scripts/iOSOpenDev-1.5.pkg";\n    PKInstallPackageIdentifier = "com.iosopendev.iosopendev15.iod-setup.pkg";\n}

Ill keep playing with it and see what I can come up with

ashish1405 commented 11 years ago

Did you re-install xcode? it would be required before you run the iOSOpenDev setup.

You can also go with my previous process, just make sure that after reinstalling xcode you have both the xcspec files in the folder.

You can put more echo's in postinstall to debug it more.

Regards Ashish

On Fri, Jan 25, 2013 at 4:43 AM, Nividica notifications@github.com wrote:

It seems my problem was that the .pmdoc was not a registered type, so it was showing up as just a folder. After fixing that issue, I was able to adjust the package and build it.

I have tried removing just the two "plutil" lines, removing one but not the other, removing those two lines and the "perl" line but they all yeild the same result. File not found.

Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Adding specifications to platform... Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Can't open /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist: No such file or directory. Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: cp: /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist: No such file or directory Jan 24 07:28:37 Nividicas-Mac-Pro installd[5343]: ./postinstall: Failed to copy file /private/tmp/PKInstallSandbox.uNWnDn/tmp/iod-setup.OMGDaY14/iPhoneOSPackageTypes.xcspec.plist to /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec Jan 24 07:28:38 Nividicas-Mac-Pro installd[5343]: PackageKit: Install Failed: PKG: post-install scripts for "com.iosopendev.iosopendev15.iod-setup.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100165b20 "An error occurred while running scripts from the package ÒiOSOpenDev-1.5.pkgÓ." {\n NSFilePath = "./postinstall";\n NSLocalizedDescription = "An error occurred while running scripts from the package \U201ciOSOpenDev-1.5.pkg\U201d.";\n NSURL = "#iodsetup.pkg -- file://localhost/Users/nividica/Dev/iOSOpenDev/scripts/iOSOpenDev-1.5.pkg";\n PKInstallPackageIdentifier = "com.iosopendev.iosopendev15.iod-setup.pkg";\n}

Ill keep playing with it and see what I can come up with

— Reply to this email directly or view it on GitHubhttps://github.com/kokoabim/iOSOpenDev/issues/43#issuecomment-12679301.

kokoabim commented 11 years ago

Use installer 1.6-2 released on 7/25. This could help.

seizu commented 11 years ago

Thx, I'll check it out.

seizu commented 10 years ago

Hi Kokoabim! I've tested the installer 1.6-2 on a clean Xcode4.2 installation (10.6.7). Unfortunately there is still an issue with putil that is not supporting json on 10.6.x

Log:

Oct 15 00:30:49 ergos-mac-mini Installer[2821]: Create temporary directory "/var/folders/uB/uBUgF6oNEYm76-lCvn-YuE+++TI/-Tmp-//Install.28211uzO8n" Oct 15 00:30:49 ergos-mac-mini Installer[2821]: IFPKInstallElement (2 packages) Oct 15 00:30:49 ergos-mac-mini installd[2833]: PackageKit: ----- Begin install ----- Oct 15 00:30:49 ergos-mac-mini installd[2833]: PackageKit: request=PKInstallRequest <2 packages, destination=/> Oct 15 00:30:49 ergos-mac-mini installd[2833]: PackageKit: packages=(\n "PKLeopardPackage file://localhost/Users/ergo/Downloads/iOSOpenDev-1.6-2.pkg#iodsetup.pkg",\n "PKLeopardPackage file://localhost/Users/ergo/Downloads/iOSOpenDev-1.6-2.pkg#ioduninstall.pkg"\n) Oct 15 00:30:49 ergos-mac-mini installd[2833]: PackageKit: Extracting file://localhost/Users/ergo/Downloads/iOSOpenDev-1.6-2.pkg#iodsetup.pkg (destination=/var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root/opt/iOSOpenDevSetup/bin, uid=0) Oct 15 00:30:50 ergos-mac-mini installd[2833]: PackageKit: Extracting file://localhost/Users/ergo/Downloads/iOSOpenDev-1.6-2.pkg#ioduninstall.pkg (destination=/var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root/opt/iOSOpenDevUninstall/bin, uid=0) Oct 15 00:30:50 ergos-mac-mini installd[2833]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.3e09X0/Scripts/com.iosopendev.iosopendev162.iod-setup.pkg.wLNk2P Oct 15 00:30:51 ergos-mac-mini installd[2833]: PackageKit: Executing script "./preinstall" in /private/tmp/PKInstallSandbox.3e09X0/Scripts/com.iosopendev.iosopendev162.iod-uninstall.pkg.TYpS2b Oct 15 00:30:51 ergos-mac-mini installd[2833]: PackageKit: Shoving /var/folders/zz/zzzivhrRnAmviuee+++++++++++/Cleanup At Startup/PKInstallSandbox-tmp/Root (1 items) to / Oct 15 00:30:51 ergos-mac-mini installd[2833]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.3e09X0/Scripts/com.iosopendev.iosopendev162.iod-setup.pkg.wLNk2P Oct 15 00:30:51 ergos-mac-mini installd[2833]: ./postinstall: Running /opt/iOSOpenDevSetup/bin/iod-setup... Oct 15 00:30:52 ergos-mac-mini installd[2833]: ./postinstall: Downloading iOSOpenDev base from Github... Oct 15 00:30:56 ergos-mac-mini installd[2833]: ./postinstall: Downloading Xcode templates from Github... Oct 15 00:31:00 ergos-mac-mini installd[2833]: ./postinstall: Creating symlink to Xcode templates... Oct 15 00:31:00 ergos-mac-mini installd[2833]: ./postinstall: Modifying Bash personal initialization file... Oct 15 00:31:14 ergos-mac-mini installd[2833]: ./postinstall: Setting up iPhoneOS 5.0 SDK... Oct 15 00:31:14 ergos-mac-mini installd[2833]: ./postinstall: Modifying SDK settings... Oct 15 00:31:16 ergos-mac-mini installd[2833]: ./postinstall: Symlinking to private frameworks header files... Oct 15 00:31:23 ergos-mac-mini installd[2833]: ./postinstall: Adding specifications to platform... Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: Unknown format specifier: json Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: plutil: [command_option] [other_options] file... Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: The file '-' means stdin Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: Command options are (-lint is the default): Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -help show this message and exit Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -lint check the property list files for syntax errors Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -convert fmt rewrite property list files in format Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: fmt is one of: xml1 binary1 Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: There are some additional optional arguments: Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -s be silent on success Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -o path specify alternate file path name for result; Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: the -o option is used with -convert, and is only Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: useful with one file argument (last file overwrites); Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: the path '-' means stdout Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -e extension specify alternate extension for converted files Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: -- specifies that all further arguments are file names Oct 15 00:31:24 ergos-mac-mini installd[2833]: ./postinstall: Failed to convert XCSpec file /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec to JSON to temporary file /private/tmp/PKInstallSandbox.3e09X0/tmp/iod-setup.cQo81noe/iPhoneOSPackageTypes.xcspec.plist Oct 15 00:31:24 ergos-mac-mini installd[2833]: PackageKit: Install Failed: PKG: post-install scripts for "com.iosopendev.iosopendev162.iod-setup.pkg"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x429ba0 "An error occurred while running scripts from the package “iOSOpenDev-1.6-2.pkg”." {\n NSFilePath = "./postinstall";\n NSLocalizedDescription = "An error occurred while running scripts from the package \U201ciOSOpenDev-1.6-2.pkg\U201d.";\n NSURL = "#iodsetup.pkg -- file://localhost/Users/ergo/Downloads/iOSOpenDev-1.6-2.pkg";\n PKInstallPackageIdentifier = "com.iosopendev.iosopendev162.iod-setup.pkg";\n} Oct 15 00:31:24 ergos-mac-mini Installer[2821]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 UserInfo=0x1539e0 "An error occurred while running scripts from the package “iOSOpenDev-1.6-2.pkg”." Oct 15 00:31:25 ergos-mac-mini Installer[2821]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. Oct 15 00:31:25 ergos-mac-mini Installer[2821]: IFDInstallController 22A9F0 state = 7 Oct 15 00:31:25 ergos-mac-mini Installer[2821]: Displaying 'Install Failed' UI. Oct 15 00:31:25 ergos-mac-mini Installer[2821]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.