From nobody Thu Aug 01 17:51:32 2024 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZc384kT8z5R8cV; Thu, 01 Aug 2024 17:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZc382W3lz40Xt; Thu, 1 Aug 2024 17:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNqvM+ymIcXlzESug0uuhPwehNVZDATx8Nedyl15O9k=; b=WVQ2Vut2XzmtAO3q2ZAPlyPMPGSKAXhjtM8unuVOul785kcxTv9X604huGs//thEeG4dOZ wS+ombG2LR6diHN4AeLIResVntQodHV849TgRcBJJPFQNWbkeMQq7k381Hyz5uM4Y0JU6R ImTZ3zBzW0pZ6mzqx8ZSPZrySxAXma80bb4AXivOaiA6ITvP5tMuX+dHykTxJKAuTLOV9/ ZWye1haxYZidbG/WICtfDhRMY/0UyuIeUAscye/ipPea0UGBOYk+pH7rW5p6wg2ahyv2a8 cIh7TDYn7PrZ+wUxMowfECHk3pTNKXcGojbhgXNLn+ZSOsO+vQTN3+oKhji3+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722534692; a=rsa-sha256; cv=none; b=WFLoW3X+VlZZSmxU/mLRilRpgELCDufB+Q5Tr1FeRisMC7Ig+OThf2iIPbtyEoaXe/77+I T+8L9cQx/B3+I7gbUdphtGya7P6+hyrlK226F03m1moKHNBYfD6x+Gl4Gs43iPaSkwuhgO mW7yw8Ty2SuRNI3Ek4BmEwaD1D7MuDoW+1OnAd3+ew0mruryM1T2cYaNcHrHjeYTJrilAX px+XFo3OmFuO/VnpBZc2YE0n4GKUi2gAdmvF/GIsXVxYi1svdKWDoAUR9Y8ujs1HRAGIb7 Tr3uYAg7+vcqgc/LCkNG8IlteBJ1LuPrYQjJ7EA0Vqm4iarQFUdSPMlq0iSPMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNqvM+ymIcXlzESug0uuhPwehNVZDATx8Nedyl15O9k=; b=HzXqv98s/YaYxao5AQPsb79nwfUJr97AnKEgbbyDwciQeYIulHkxJHWLUnW+q0qf8Z0CCE LCixdTprleWWSwootYRc3DcO9+YuVXo1v64T9JRVffextOow8An/DIpTyoNs6D1Uq+0jKr 9h5eiug7siCnv2grdauIOYK11fqOr6hutv/nHHBcbcoZ+7lPEttBonxf8+5E3y/S9/hxmC R9Ih4xWSeCAYXQPgHEv2N4H+IYz9hYe3ssCsEF5VESP5x518955VU7ouWu7n2ax7a77fzN FoRXWe/fozsszdgUutiJPoD3wy4Pmdqj54JB6/G7wLcyZRbtk1AcKdVHtramtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WZc3826gtzvZT; Thu, 1 Aug 2024 17:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HpWLC062801; Thu, 1 Aug 2024 17:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HpWJI062768; Thu, 1 Aug 2024 17:51:32 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:51:32 GMT Message-Id: <202408011751.471HpWJI062768@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Vladimir Druzenko Subject: git: af9f0c5c69cb - 2024Q3 - devel/ghidra: fix permissions be able to run ghidra from the command line List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q3 X-Git-Reftype: branch X-Git-Commit: af9f0c5c69cb8743f1949eb434658d2ed7e46608 Auto-Submitted: auto-generated The branch 2024Q3 has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=af9f0c5c69cb8743f1949eb434658d2ed7e46608 commit af9f0c5c69cb8743f1949eb434658d2ed7e46608 Author: gatekeeper AuthorDate: 2024-08-01 17:41:53 +0000 Commit: Vladimir Druzenko 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 | 9 +++++++ devel/ghidra/files/ghidra.svg | 1 + devel/ghidra/pkg-message | 5 ++++ devel/ghidra/pkg-plist | 3 ++- 5 files changed, 54 insertions(+), 13 deletions(-) diff --git a/devel/ghidra/Makefile b/devel/ghidra/Makefile index 45e56d86d861..ef0a0324d949 100644 --- a/devel/ghidra/Makefile +++ b/devel/ghidra/Makefile @@ -23,14 +23,28 @@ CPE_VENDOR= nsa USE_JAVA= yes JAVA_VERSION= 17+ -SHEBANG_FILES= Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh \ - Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh \ - Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh \ - Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh \ - Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh \ - Ghidra/Features/BSim/make-postgres.sh \ +SHEBANG_FILES= Ghidra/Features/BSim/make-postgres.sh \ + ghidraRun \ + server/ghidraSvr \ server/jaas_external_program.example.sh \ - support/GhidraGo/ghidraGo + server/svrAdmin \ + server/svrInstall \ + server/svrUninstall \ + support/analyzeHeadless \ + support/bsim \ + support/bsim_ctl \ + support/buildGhidraJar \ + support/buildNatives \ + support/convertStorage \ + support/gdbGADPServerRun \ + support/ghidraClean \ + support/ghidraDebug \ + support/GhidraGo/ghidraGo \ + support/launch.sh \ + support/pythonRun \ + support/sleigh + +SUB_FILES= ghidra.desktop WRKSRC= ${WRKDIR}/${PORTNAME}_${DISTVERSION}_PUBLIC @@ -43,9 +57,10 @@ TMP_DIRS= Ghidra/Ghidra/.gradle Ghidra/Features/Decompiler/build/objs \ Ghidra/Features/Decompiler/build/tmp \ Ghidra/Features/FileFormats/build/objs \ Ghidra/Features/FileFormats/build/tmp GPL/.gradle \ - GPL/DemanglerGnu/build/objs GPL/DemanglerGnu/build/tmp + GPL/DemanglerGnu/build/objs GPL/DemanglerGnu/build/tmp \ + GPL/nativeBuildProperties.gradle.orig -STRIP_FILES= Ghidra/Features/FileFormats/${BUILD_SUBDIR}/lzfse \ +PROGRAM_FILES= Ghidra/Features/FileFormats/${BUILD_SUBDIR}/lzfse \ Ghidra/Features/Decompiler/${BUILD_SUBDIR}/decompile \ Ghidra/Features/Decompiler/${BUILD_SUBDIR}/sleigh \ GPL/DemanglerGnu/${BUILD_SUBDIR}/demangler_gnu_v2_24 \ @@ -55,15 +70,25 @@ do-build: @cd ${WRKSRC}/Ghidra && ${GRADLE_RUN} buildNatives @cd ${WRKSRC}/GPL/DemanglerGnu && ${GRADLE_RUN} build +pre-install: + ${REINPLACE_CMD} '1s|bash$$|bash\n\nexport JAVA_HOME="${JAVA_HOME}"|g' ${WRKSRC}/ghidraRun + do-install: .for F in ${TMP_DIRS} ${RM} -r ${WRKSRC}/${F} .endfor cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} - ${RLN} ${STAGEDIR}${DATADIR}/ghidraRun ${STAGEDIR}/${PREFIX}/bin/ghidra -.for F in ${STRIP_FILES} - ${STRIP_CMD} ${STAGEDIR}${DATADIR}/${F} +.for F in ${SHEBANG_FILES} + ${RM} ${STAGEDIR}${DATADIR}/${F} + ${INSTALL_SCRIPT} ${WRKSRC}/${F} ${STAGEDIR}${DATADIR}/${F} .endfor +.for F in ${PROGRAM_FILES} + ${RM} ${STAGEDIR}${DATADIR}/${F} + ${INSTALL_PROGRAM} ${WRKSRC}/${F} ${STAGEDIR}${DATADIR}/${F} +.endfor + ${INSTALL_DATA} ${WRKDIR}/ghidra.desktop ${STAGEDIR}/${PREFIX}/share/applications + ${INSTALL_DATA} ${FILESDIR}/ghidra.svg ${STAGEDIR}${DATADIR}/ghidra.svg + ${RLN} ${STAGEDIR}${DATADIR}/ghidraRun ${STAGEDIR}/${PREFIX}/bin/ghidra cd ${STAGEDIR}${DATADIR}/support && ${MV} launch.properties launch.properties.sample .include diff --git a/devel/ghidra/files/ghidra.desktop.in b/devel/ghidra/files/ghidra.desktop.in new file mode 100644 index 000000000000..cf3a38569a48 --- /dev/null +++ b/devel/ghidra/files/ghidra.desktop.in @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=ghidra +GenericName=ghidra +Comment=Software reverse engineering framework +Exec=%%DATADIR%%/ghidraRun +Icon=%%DATADIR%%/ghidra.svg +Terminal=false +Type=Application +Categories=Development diff --git a/devel/ghidra/files/ghidra.svg b/devel/ghidra/files/ghidra.svg new file mode 100644 index 000000000000..0b96661b9b37 --- /dev/null +++ b/devel/ghidra/files/ghidra.svg @@ -0,0 +1 @@ +GHIDRA_FAV150 diff --git a/devel/ghidra/pkg-message b/devel/ghidra/pkg-message new file mode 100644 index 000000000000..18827c4bb854 --- /dev/null +++ b/devel/ghidra/pkg-message @@ -0,0 +1,5 @@ +[ +{ type: install + message: "NOTE: ** Currently debugging support is not working in FreeBSD **" +} +] diff --git a/devel/ghidra/pkg-plist b/devel/ghidra/pkg-plist index 60d4fcbf3239..019ce4d48835 100644 --- a/devel/ghidra/pkg-plist +++ b/devel/ghidra/pkg-plist @@ -1,4 +1,5 @@ bin/ghidra +share/applications/ghidra.desktop %%DATADIR%%/Extensions/Eclipse/GhidraDev/GhidraDev-3.1.0.zip %%DATADIR%%/Extensions/Eclipse/GhidraDev/GhidraDev_README.html %%DATADIR%%/Extensions/Eclipse/GhidraSleighEditor/GhidraSleighEditor-1.0.2.zip @@ -181,7 +182,6 @@ bin/ghidra %%DATADIR%%/GPL/licenses/Modified_Nuvola_Icons_-_LGPL_2.1.txt %%DATADIR%%/GPL/licenses/Public_Domain.txt %%DATADIR%%/GPL/nativeBuildProperties.gradle -%%DATADIR%%/GPL/nativeBuildProperties.gradle.orig %%DATADIR%%/GPL/nativePlatforms.gradle %%DATADIR%%/GPL/settings.gradle %%DATADIR%%/GPL/utils.gradle @@ -4569,6 +4569,7 @@ bin/ghidra %%DATADIR%%/docs/languages/index.html %%DATADIR%%/docs/languages/manual_index.txt %%DATADIR%%/docs/languages/versioning.html +%%DATADIR%%/ghidra.svg %%DATADIR%%/ghidraRun %%DATADIR%%/ghidraRun.bat %%DATADIR%%/licenses/Apache_License_2.0.txt