Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genisoimage not available (MacOS 11.3) #4

Closed
feedface opened this issue May 3, 2021 · 7 comments
Closed

genisoimage not available (MacOS 11.3) #4

feedface opened this issue May 3, 2021 · 7 comments
Assignees

Comments

@feedface
Copy link

feedface commented May 3, 2021

However,
replacing with mkisofs seems to work.
You can brew install cdrtools which includes mkisofs

Sorry if this is the wrong way to do this note. I'm a leach, not a contributor!

@TorgoTorgo TorgoTorgo self-assigned this May 4, 2021
@TorgoTorgo
Copy link
Owner

I've pushed up a version that uses hdiutil to create the dmg. hdiutil is bundled with macOS and so you shouldn't need to install anything with brew.

Please try this new version.

@feedface
Copy link
Author

feedface commented May 4, 2021

It doesn't seem to catch the exception (not working, still):
[+] Extracted to /var/folders/_2/tjyb3yfs0y51r4b99xdhhkdm0000gq/T/tmp1v5flayo/Ghidra.app/Contents/Resources
[+] Building dmg
/bin/sh: genisoimage: command not found
hdiutil: create: Only one image can be created at a time.
Usage: hdiutil create [options]
hdiutil create -help
Traceback (most recent call last):
File "/Users/robthebrew/Desktop/Ghidra-App-Bundle/./update.py", line 171, in
subprocess.run(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'genisoimage -V "Ghidra 9.2.2" -D -R -apple -no-pad -o "Ghidra 9.2.2.dmg" "/var/folders/_2/tjyb3yfs0y51r4b99xdhhkdm0000gq/T/tmp1v5flayo"' returned non-zero exit status 127.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/robthebrew/Desktop/Ghidra-App-Bundle/./update.py", line 174, in
subprocess.run(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'hdiutil create -volname "Ghidra 9.2.2" -fs HFS+ -srcfolder "/var/folders/_2/tjyb3yfs0y51r4b99xdhhkdm0000gq/T/tmp1v5flayo" Ghidra 9.2.2.dmg' returned non-zero exit status 1.

@TorgoTorgo
Copy link
Owner

Oh apologies, I see the issue. There's a missing quotation mark.

@TorgoTorgo
Copy link
Owner

I've just pushed a new commit. Please try again, this time it should work.

@feedface
Copy link
Author

feedface commented May 5, 2021

Now it builds the dmg. However, the app bounces once and quits. I have tried code signing with no change. Console is giving me this:
May 5 14:25:48 MacBook-Air com.apple.xpc.launchd[1]: Coalition Cache Hit: app<application.gov.nsa.ghidra.13496623.13496627(503)> [19156]
May 5 14:25:48 MacBook-Air com.apple.xpc.launchd[1] (application.gov.nsa.ghidra.13496623.13496627[29810]): Service exited with abnormal code: 127
Note: the build I did using my suggestion in the OP works.
Also possibly related or not:
bash-3.2$ ./update.py --dmg
[!] Neither path nor url were specified!

@TorgoTorgo
Copy link
Owner

Can you please try running the Ghidra.app/Contents/MacOS/ghidra script directly from the terminal after building and extracting? The behaviour you described is what happens when the script can't find your JDK. You should at least get some output to help diagnose the issue.

Curious that your build with mkisofs works... Can you run the script directly as I described above and compare the output? It might also be worthwhile trying the --tar option.

Please note with the codesigning: I have placed the Ghidra install (which contains executables) into Resources which is a "non-code place". This will surely lead to an invalid bundle sig if you sign with --deep.

@feedface
Copy link
Author

feedface commented May 6, 2021

Sorry, my bad. As I had my successfully built app, I saved the latest as Ghidra 2.app. That screws up the load script as it is hardwired to expect just Ghidra.app. Working successfully once renamed.
However, the ./update.py --dmg does not work without a url (eg as in your second example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants