Github messages for voidlinux
 help / color / mirror / Atom feed
From: vitezfh <vitezfh@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] ghidra: update to 10.2
Date: Wed, 09 Nov 2022 15:38:32 +0100	[thread overview]
Message-ID: <20221109143832.QFN2nUdZUPgkDoRSfZqt5lFbocP1IGvbQnorKXcoHWM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40381@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

There is an updated pull request by vitezfh against master on the void-packages repository

https://github.com/vitezfh/void-packages ghidra_update
https://github.com/void-linux/void-packages/pull/40381

ghidra: update to 10.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)

Maybe someone familiar with ghidra can have another look. @abenson ?
It compiles and patches successfully after these changes. Runs seemingly fine too.

A patch file from https://github.com/void-linux/void-packages/pull/40381.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ghidra_update-40381.patch --]
[-- Type: text/x-diff, Size: 13550 bytes --]

From ed8164a7864f9e1a6773979910cb82cd7182824f Mon Sep 17 00:00:00 2001
From: sv <stjepan@vitez.xyz>
Date: Tue, 8 Nov 2022 14:30:36 +0100
Subject: [PATCH 1/3] ghidra: update to 10.2

---
 srcpkgs/ghidra/patches/protoc.patch | 28 +++++++++---------
 srcpkgs/ghidra/template             | 44 ++++++++---------------------
 2 files changed, 25 insertions(+), 47 deletions(-)

diff --git a/srcpkgs/ghidra/patches/protoc.patch b/srcpkgs/ghidra/patches/protoc.patch
index aa985b86cf6d..ed98035e6372 100644
--- a/srcpkgs/ghidra/patches/protoc.patch
+++ b/srcpkgs/ghidra/patches/protoc.patch
@@ -9,39 +9,39 @@
 -	allProtocArtifacts 'com.google.protobuf:protoc:3.17.3:linux-aarch_64@exe'
 -	allProtocArtifacts 'com.google.protobuf:protoc:3.17.3:osx-x86_64@exe'
 -	allProtocArtifacts 'com.google.protobuf:protoc:3.17.3:osx-aarch_64@exe'
-+	allProtocArtifacts 'com.google.protobuf:protoc:3.18.1:windows-x86_64@exe'
-+	allProtocArtifacts 'com.google.protobuf:protoc:3.18.1:linux-x86_64@exe'
-+	allProtocArtifacts 'com.google.protobuf:protoc:3.18.1:linux-aarch_64@exe'
-+	allProtocArtifacts 'com.google.protobuf:protoc:3.18.1:osx-x86_64@exe'
-+	allProtocArtifacts 'com.google.protobuf:protoc:3.18.1:osx-aarch_64@exe'
++	allProtocArtifacts 'com.google.protobuf:protoc:3.21.9:windows-x86_64@exe'
++	allProtocArtifacts 'com.google.protobuf:protoc:3.21.9:linux-x86_64@exe'
++	allProtocArtifacts 'com.google.protobuf:protoc:3.21.9:linux-aarch_64@exe'
++	allProtocArtifacts 'com.google.protobuf:protoc:3.21.9:osx-x86_64@exe'
++	allProtocArtifacts 'com.google.protobuf:protoc:3.21.9:osx-aarch_64@exe'
  
  	if (isCurrentWindows()) {
 -		protocArtifact 'com.google.protobuf:protoc:3.17.3:windows-x86_64@exe'
-+		protocArtifact 'com.google.protobuf:protoc:3.18.1:windows-x86_64@exe'
++		protocArtifact 'com.google.protobuf:protoc:3.21.9:windows-x86_64@exe'
  	}
  	if (isCurrentLinux()) {
  		if (platform.endsWith("x86_64")) {
 -			protocArtifact 'com.google.protobuf:protoc:3.17.3:linux-x86_64@exe'
-+			protocArtifact 'com.google.protobuf:protoc:3.18.1:linux-x86_64@exe'
++			protocArtifact 'com.google.protobuf:protoc:3.21.9:linux-x86_64@exe'
  		}
  		else {
 -			protocArtifact 'com.google.protobuf:protoc:3.17.3:linux-aarch_64@exe'
-+			protocArtifact 'com.google.protobuf:protoc:3.18.1:linux-aarch_64@exe'
++			protocArtifact 'com.google.protobuf:protoc:3.21.9:linux-aarch_64@exe'
  		}
  	}
  	if (isCurrentMac()) {
  		if (platform.endsWith("x86_64")) {
 -			protocArtifact 'com.google.protobuf:protoc:3.17.3:osx-x86_64@exe'
-+			protocArtifact 'com.google.protobuf:protoc:3.18.1:osx-x86_64@exe'
++			protocArtifact 'com.google.protobuf:protoc:3.21.9:osx-x86_64@exe'
  		}
  		else {
 -			protocArtifact 'com.google.protobuf:protoc:3.17.3:osx-aarch_64@exe'
-+			protocArtifact 'com.google.protobuf:protoc:3.18.1:osx-aarch_64@exe'
++			protocArtifact 'com.google.protobuf:protoc:3.21.9:osx-aarch_64@exe'
  		}
  	}
  
 -	api 'com.google.protobuf:protobuf-java:3.17.3'
-+	api 'com.google.protobuf:protobuf-java:3.18.1'
++	api 'com.google.protobuf:protobuf-java:3.21.9'
  	api project(':Framework-AsyncComm')
  	api project(':Framework-Debugging')
  	api project(':ProposedUtils')
@@ -50,7 +50,7 @@
  /*protobuf {
  	protoc {
 -		artifact = 'com.google.protobuf:protoc:3.17.3'
-+		artifact = 'com.google.protobuf:protoc:3.18.1'
++		artifact = 'com.google.protobuf:protoc:3.21.9'
  	}
  }*/
  
@@ -73,5 +73,5 @@
 --- ghidra-10.1/ghidra_build/Ghidra/Debug/Debugger-gadp/Module.manifest	2021-12-10 19:03:38.000000000 +0100
 +++ -	2021-12-11 13:02:09.420069640 +0100
 @@ -1 +1 @@
--MODULE FILE LICENSE: lib/protobuf-java-3.17.3.jar BSD
-+MODULE FILE LICENSE: lib/protobuf-java-3.18.1.jar BSD
+-MODULE FILE LICENSE: lib/protobuf-java-3.17.3.jar BSD-3-GOOGLE
++MODULE FILE LICENSE: lib/protobuf-java-3.21.9.jar BSD-3-GOOGLE
diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index 32edeb3be08b..055ea7358b2a 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -1,50 +1,29 @@
 # Template file for 'ghidra'
 pkgname=ghidra
-version=10.1.5
+version=10.2
 revision=1
-_commit=939210dab2570714944ac35a4daef9633fd842b3
+_commit=17884b878680e640dd5c30210736a1d062ae5ba2
 archs="x86_64* aarch64*"
 # Other 64bit archs should be easily patchable,
 # grep for linux_arm_64 to find all places in need of patching
 create_wrksrc=yes
 build_wrksrc="ghidra_build"
-hostmakedepends="gradle openjdk11 flex unzip protobuf which"
-depends="openjdk11"
+hostmakedepends="gradle openjdk17 flex unzip protobuf which"
+depends="openjdk17"
 short_desc="Software reverse engineering (SRE) framework"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
 license="Apache-2.0"
 homepage="https://ghidra-sre.org/"
 distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${version}_build.tar.gz
  https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip
- https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-beta-13.01/yajsw-beta-13.01.zip
- https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2012_x64.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2012_x86.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2015_x64.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2015_x86.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2017_x64.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2017_x86.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2019_x64.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2019_x86.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vsOlder_x64.fidb
- https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vsOlder_x86.fidb"
-checksum="935840ba384406a58f9bf70542f29ec33270c2f484365a5b00997d4fa2de5458
+ https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-13.05/yajsw-stable-13.05.zip
+ https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar"
+checksum="75988e08d39b3dc57e72e8465e54a46347b66b03a2f6be3c661ced219e6ec063
  7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
- 430fb7901bd0fd52a5b90bd0cbd89e9d334077eb72a9b26896f465de1e593a99
- 00ed038eb6abaf6ddec8d202a3ed7a81b521458f4cd459948115cfd02ff59d6d
- 80d1c31c636b1775dd06001747dfb7e2ff60ff716299a8fcc232b8d2faa53a21
- 8fc7ea9451b3a201ac3623b4a0924427cbb6bba410bdf9ebba4f2dfe8e77dfad
- c3c16d23517c233d6950d5d43e34cdfa1b15c1ee2e066c8e9a53b4f75a907a87
- 6fc0a61e935a0060ab33bd6406c9ca5f215ac3dff655f83c18f3d144ad389fe5
- 5b0f8b8dee110d8c54fc27ed808ea28c2c675e95f3809e33eb99f03672741833
- 2a81615d588aa80043f7bc3a35db04580c990c90398e77399fcffc66f053e5ac
- 80413b57ae20fc1850d15a401d1cec87ac61b1809a1dafc2fa4403bf2029ec94
- 68b96a4e13ee2c157517636aa1c7841f750fbfc0026188f6123af017f3fa3117
- 2466595f6e74d9599e16095cc61c6de769461c935c20a442db1d2dfd2d7bde9b
- 5b97f786eaebc785aaa365f17eb7cc9a1dd2b5a15b277a5229157ea76945fdc1"
+ ff7a4c8262f7d24079b16607122bad8f6fb024f051c27b91883d9498568429a9
+ 00ed038eb6abaf6ddec8d202a3ed7a81b521458f4cd459948115cfd02ff59d6d"
 conf_files="/usr/libexec/ghidra/server/server.conf"
-skip_extraction="AXMLPrinter2.jar  vs2012_x64.fidb vs2015_x64.fidb vs2017_x64.fidb vs2019_x64.fidb
- vsOlder_x64.fidb vsOlder_x86.fidb vs2012_x86.fidb vs2015_x86.fidb vs2017_x86.fidb vs2019_x86.fidb"
+skip_extraction="AXMLPrinter2.jar"
 nopie=yes
 nostrip_files="animals createStructure dataMutability inline ldiv opaque
  setRegister switch compilerVsDecompiler custom globalRegVars.so
@@ -75,9 +54,8 @@ post_extract() {
 
 do_configure() {
 	mkdir -p dependencies/{GhidraServer,fidb,flatRepo}
-	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/yajsw-beta-13.01.zip dependencies/GhidraServer
-	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.fidb dependencies/fidb
 	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
+	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/yajsw-stable-13.05.zip dependencies/GhidraServer
 	cp -f ../dex2jar-2.0/lib/dex-*.jar dependencies/flatRepo
 }
 

From d9ad3784cb9f91e0e3ddf82d64e304730094d725 Mon Sep 17 00:00:00 2001
From: vitezfh <stjepan@vitez.xyz>
Date: Wed, 9 Nov 2022 14:10:19 +0100
Subject: [PATCH 2/3] ghidra: 10.2 update, revert/fix *.fidb removal

---
 srcpkgs/ghidra/template | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index 055ea7358b2a..e385b682e874 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -2,7 +2,8 @@
 pkgname=ghidra
 version=10.2
 revision=1
-_commit=17884b878680e640dd5c30210736a1d062ae5ba2
+# commit id of 'ghidra-data' repo:
+_commit=939210dab2570714944ac35a4daef9633fd842b3
 archs="x86_64* aarch64*"
 # Other 64bit archs should be easily patchable,
 # grep for linux_arm_64 to find all places in need of patching
@@ -17,13 +18,34 @@ homepage="https://ghidra-sre.org/"
 distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${version}_build.tar.gz
  https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip
  https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-13.05/yajsw-stable-13.05.zip
- https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar"
+ https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2012_x64.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2012_x86.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2015_x64.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2015_x86.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2017_x64.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2017_x86.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2019_x64.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vs2019_x86.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vsOlder_x64.fidb
+ https://github.com/NationalSecurityAgency/ghidra-data/raw/${_commit}/FunctionID/vsOlder_x86.fidb"
 checksum="75988e08d39b3dc57e72e8465e54a46347b66b03a2f6be3c661ced219e6ec063
  7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
  ff7a4c8262f7d24079b16607122bad8f6fb024f051c27b91883d9498568429a9
- 00ed038eb6abaf6ddec8d202a3ed7a81b521458f4cd459948115cfd02ff59d6d"
+ 00ed038eb6abaf6ddec8d202a3ed7a81b521458f4cd459948115cfd02ff59d6d
+ 80d1c31c636b1775dd06001747dfb7e2ff60ff716299a8fcc232b8d2faa53a21
+ 8fc7ea9451b3a201ac3623b4a0924427cbb6bba410bdf9ebba4f2dfe8e77dfad
+ c3c16d23517c233d6950d5d43e34cdfa1b15c1ee2e066c8e9a53b4f75a907a87
+ 6fc0a61e935a0060ab33bd6406c9ca5f215ac3dff655f83c18f3d144ad389fe5
+ 5b0f8b8dee110d8c54fc27ed808ea28c2c675e95f3809e33eb99f03672741833
+ 2a81615d588aa80043f7bc3a35db04580c990c90398e77399fcffc66f053e5ac
+ 80413b57ae20fc1850d15a401d1cec87ac61b1809a1dafc2fa4403bf2029ec94
+ 68b96a4e13ee2c157517636aa1c7841f750fbfc0026188f6123af017f3fa3117
+ 2466595f6e74d9599e16095cc61c6de769461c935c20a442db1d2dfd2d7bde9b
+ 5b97f786eaebc785aaa365f17eb7cc9a1dd2b5a15b277a5229157ea76945fdc1"
 conf_files="/usr/libexec/ghidra/server/server.conf"
-skip_extraction="AXMLPrinter2.jar"
+skip_extraction="AXMLPrinter2.jar  vs2012_x64.fidb vs2015_x64.fidb vs2017_x64.fidb vs2019_x64.fidb
+ vsOlder_x64.fidb vsOlder_x86.fidb vs2012_x86.fidb vs2015_x86.fidb vs2017_x86.fidb vs2019_x86.fidb"
 nopie=yes
 nostrip_files="animals createStructure dataMutability inline ldiv opaque
  setRegister switch compilerVsDecompiler custom globalRegVars.so
@@ -54,8 +76,9 @@ post_extract() {
 
 do_configure() {
 	mkdir -p dependencies/{GhidraServer,fidb,flatRepo}
-	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
 	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/yajsw-stable-13.05.zip dependencies/GhidraServer
+	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/*.fidb dependencies/fidb
+	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
 	cp -f ../dex2jar-2.0/lib/dex-*.jar dependencies/flatRepo
 }
 

From ca897e9e46c4a9d2aa778374c30d05c18cedc16e Mon Sep 17 00:00:00 2001
From: vitezfh <stjepan@vitez.xyz>
Date: Wed, 9 Nov 2022 15:38:24 +0100
Subject: [PATCH 3/3] ghidra: remove extraneous binary compiled for glibc

---
 srcpkgs/ghidra/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index e385b682e874..27141ba7218c 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -96,4 +96,5 @@ do_install() {
 	bsdtar --strip-components 1 -C ${DESTDIR}/usr/libexec/ghidra -xf build/dist/ghidra_${version}_DEV_$(date -u +%Y%m%d)_linux_${arch}.zip
 	vmkdir usr/bin
 	ln -srf /usr/libexec/$pkgname/ghidraRun ${DESTDIR}/usr/bin/ghidra
+	rm ${DESTDIR}/usr/libexec/ghidra/Ghidra/Features/FileFormats/data/sevenzipnativelibs/Linux-amd64/lib7-Zip-JBinding.so
 }

  parent reply	other threads:[~2022-11-09 14:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 13:43 [PR PATCH] " vitezfh
2022-11-08 23:07 ` classabbyamp
2022-11-08 23:39 ` vitezfh
2022-11-09 11:52 ` unspecd
2022-11-09 12:03 ` unspecd
2022-11-09 12:04 ` unspecd
2022-11-09 12:05 ` vitezfh
2022-11-09 12:06 ` unspecd
2022-11-09 12:11 ` unspecd
2022-11-09 13:04 ` vitezfh
2022-11-09 13:04 ` vitezfh
2022-11-09 13:13 ` [PR PATCH] [Updated] " vitezfh
2022-11-09 14:38 ` vitezfh
2022-11-09 14:38 ` vitezfh [this message]
2022-11-09 14:47 ` unspecd
2022-11-09 14:50 ` unspecd
2022-11-09 14:52 ` unspecd
2022-11-09 14:54 ` unspecd
2022-11-09 14:55 ` unspecd
2022-11-09 16:51 ` [PR PATCH] [Updated] " vitezfh
2022-11-12  6:01 ` oreo639
2022-11-12  6:02 ` oreo639
2022-11-13 16:33 ` [PR PATCH] [Updated] " vitezfh
2022-11-29  3:13 ` [PR PATCH] [Closed]: ghidra: update to 10.2.1 abenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109143832.QFN2nUdZUPgkDoRSfZqt5lFbocP1IGvbQnorKXcoHWM@z \
    --to=vitezfh@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).