Created attachment 252349 [details] git patch To be able to run ghidra from the command line, some permissions need to be fixed - this patch achieves that.
that patch seems incomplete, what if the user is neither root nor in the wheel group?
Created attachment 252353 [details] git patch Yes, you are right... Fixed.
There are other scripts in share/ghidra/support: gdbGADPServerRun pythonRun bsim bsim_ctl and etc.
Created attachment 252370 [details] git patch Yes; nice catch... With this patch, I change permissions (0555) for the executable, and shell script files.
(In reply to gatekeeper from comment #4) What about python scripts?
(In reply to Vladimir Druzenko from comment #5) I have not marked these python scripts as executable because, to my understanding, they are not supposed to be executed. They are either (basic) examples of how to script ghidra using python (requires an additional package pyhidra), or internal ghidra python libraries; some of these examples are even written in python v2 and will not run out-of-the-box with v3. Note: to be able to use the examples, an additional library might be required - pyhidra - which, to the best of my knowledge, has not been ported to FreeBSD yet...
Created attachment 252398 [details] v1 Check my patch.
Created attachment 252406 [details] git patch Thanks for the patch. I did some changes, namely: - removed from SHEBANG_FILES those that are related with debugging - added a desktop icon - when ghidra is run for the first time, it asks for the path to openjdk; therefore, I have created a small wrapper script (ghidraRunX) that detects if ghidra has been previously configured and, if not, starts ghidra in an xterm, so that a user has the opportunity to configure it; therefore, I also added a dependency on xterm. - added a pkg-message
Created attachment 252407 [details] patch as xz Same as the git patch, but also as .tar.xz
Created attachment 252413 [details] git patch removes need for xterm and properly configures JAVA_HOME using the default installed java version
Created attachment 252414 [details] patch as .tar.xz same thing as #10, but as .tar.xz
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2bf3f54aafa6470ebedc2f048ea28453afc76005 commit 2bf3f54aafa6470ebedc2f048ea28453afc76005 Author: gatekeeper <tiago.gasiba@gmail.com> AuthorDate: 2024-08-01 17:41:53 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-08-01 17:41:53 +0000 devel/ghidra: fix permissions be able to run ghidra from the command line Also: - remove from SHEBANG_FILES those that are related with debugging - add a desktop file + icon from: https://github.com/NationalSecurityAgency/ghidra/discussions/3709 - add a pkg-message - configure JAVA_HOME using the default installed java version PR: 280494 Fixes: e2b8d2a61766 (update 9.1 → 11.1.2, take maintainership) MFH: 2024Q3 devel/ghidra/Makefile | 49 ++++++++++++++++++++++-------- devel/ghidra/files/ghidra.desktop.in (new) | 9 ++++++ devel/ghidra/files/ghidra.svg (new) | 1 + devel/ghidra/pkg-message (new) | 5 +++ devel/ghidra/pkg-plist | 3 +- 5 files changed, 54 insertions(+), 13 deletions(-)
A commit in branch 2024Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=af9f0c5c69cb8743f1949eb434658d2ed7e46608 commit af9f0c5c69cb8743f1949eb434658d2ed7e46608 Author: gatekeeper <tiago.gasiba@gmail.com> AuthorDate: 2024-08-01 17:41:53 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2024-08-01 17:51:26 +0000 devel/ghidra: fix permissions be able to run ghidra from the command line Also: - remove from SHEBANG_FILES those that are related with debugging - add a desktop file + icon from: https://github.com/NationalSecurityAgency/ghidra/discussions/3709 - add a pkg-message - configure JAVA_HOME using the default installed java version PR: 280494 Fixes: e2b8d2a61766 (update 9.1 → 11.1.2, take maintainership) MFH: 2024Q3 (cherry picked from commit 2bf3f54aafa6470ebedc2f048ea28453afc76005) devel/ghidra/Makefile | 49 ++++++++++++++++++++++-------- devel/ghidra/files/ghidra.desktop.in (new) | 9 ++++++ devel/ghidra/files/ghidra.svg (new) | 1 + devel/ghidra/pkg-message (new) | 5 +++ devel/ghidra/pkg-plist | 3 +- 5 files changed, 54 insertions(+), 13 deletions(-)
Thanks.