Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ghidra: update to 10.0.4.
@ 2021-10-21 14:48 Johnnynator
  2021-10-21 15:00 ` [PR PATCH] [Updated] " Johnnynator
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johnnynator @ 2021-10-21 14:48 UTC (permalink / raw)
  To: ml

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

There is a new pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages ghidra
https://github.com/void-linux/void-packages/pull/33670

ghidra: update to 10.0.4.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 33583e22eb39f481331aff43f706508d8cb07e09 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Thu, 21 Oct 2021 16:46:12 +0200
Subject: [PATCH] ghidra: update to 10.0.4.

---
 .../patches/honor_source_date_epoch.patch     | 29 ++++++++++++
 srcpkgs/ghidra/patches/protoc.patch           | 45 ++++++++++++-------
 srcpkgs/ghidra/template                       | 16 ++++---
 3 files changed, 68 insertions(+), 22 deletions(-)
 create mode 100644 srcpkgs/ghidra/patches/honor_source_date_epoch.patch

diff --git a/srcpkgs/ghidra/patches/honor_source_date_epoch.patch b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
new file mode 100644
index 000000000000..ecf92eb3c0b8
--- /dev/null
+++ b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
@@ -0,0 +1,29 @@
+--- a/ghidra_build/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:31:33.820391721 +0200
+@@ -246,7 +246,7 @@
+  *********************************************************************************/
+ def getCurrentDate() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd')
+ 	return formattedDate
+ }
+@@ -256,7 +256,7 @@
+  *********************************************************************************/
+ def getCurrentDateTime() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd-HHmm')
+ 	return formattedDate
+ }
+@@ -266,7 +266,7 @@
+  *********************************************************************************/
+ def getCurrentDateTimeLong() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyy-MMM-dd HHmm z')
+ 	return formattedDate
+ }
diff --git a/srcpkgs/ghidra/patches/protoc.patch b/srcpkgs/ghidra/patches/protoc.patch
index a3ab960346e3..30c45164caf9 100644
--- a/srcpkgs/ghidra/patches/protoc.patch
+++ b/srcpkgs/ghidra/patches/protoc.patch
@@ -1,16 +1,15 @@
---- ghidra-10.0.1/ghidra-Ghidra_10.0.1_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-07-08 12:16:19.000000000 -0500
-+++ -	2021-07-19 04:53:54.446268239 -0500
-@@ -27,7 +27,6 @@
- 
- configurations {
- 	allProtocArtifacts
--	protocArtifact
- }
- 
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:35:42.275129993 +0200
+@@ -33,21 +33,11 @@
  def os = org.gradle.internal.os.OperatingSystem.current()
-@@ -37,16 +36,6 @@
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
+ 
+ dependencies {
+-	allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_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:osx-x86_64@exe'
  
 -	if (os.isWindows()) {
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
@@ -22,12 +21,21 @@
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
 -    }
 -
- 	api 'com.google.protobuf:protobuf-java:3.11.1'
+-	api 'com.google.protobuf:protobuf-java:3.11.1'
++	api 'com.google.protobuf:protobuf-java:3.18.1'
  	api project(':Framework-AsyncComm')
  	api project(':Framework-Debugging')
-@@ -70,14 +59,9 @@
- 	ext.outdir = file("build/generated/source/proto/main/java")
- 	outputs.dir(outdir)
+ 	api project(':ProposedUtils')
+@@ -58,7 +48,7 @@
+ 
+ /*protobuf {
+ 	protoc {
+-		artifact = 'com.google.protobuf:protoc:3.11.1'
++		artifact = 'com.google.protobuf:protoc:3.18.1'
+ 	}
+ }*/
+ 
+@@ -72,12 +62,7 @@
  	inputs.files(src)
 -	dependsOn(configurations.protocArtifact)
  	doLast {
@@ -41,3 +49,8 @@
  			args src
  		}
  	}
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/Module.manifest	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:40:18.629990242 +0200
+@@ -1 +1 @@
+-MODULE FILE LICENSE: lib/protobuf-java-3.11.1.jar BSD
++MODULE FILE LICENSE: lib/protobuf-java-3.18.1.jar BSD
diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index 7f4182f3730a..0a9ea9899872 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -1,10 +1,11 @@
 # Template file for 'ghidra'
 pkgname=ghidra
-version=10.0.1
+version=10.0.4
 revision=1
 archs="x86_64*"
 create_wrksrc=yes
-hostmakedepends="gradle openjdk11 flex unzip protobuf"
+build_wrksrc="ghidra_build"
+hostmakedepends="gradle openjdk11 flex unzip protobuf which"
 depends="openjdk11"
 short_desc="Software reverse engineering (SRE) framework"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
@@ -15,7 +16,7 @@ distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${ver
  https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip
  https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-12.12/yajsw-stable-12.12.zip
  https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar"
-checksum="37c5d0cb8d016860eb6dd3ec3aa1b81d22b7d2d42dd7d40cf4f2fcab2b0e0b43
+checksum="76f1bd9604d49a2e59c47b347aedb90484bcfe51217c792e8cc771fc6481147c
  7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
  90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf
  1398fcb1e93abb19992c4fa06d7fe5758aabb4c45781d7ef306c6f57ca7a7321
@@ -43,8 +44,12 @@ skiprdeps="/usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/animals
  /usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/write"
 python_version=2 #unverified
 
+post_extract() {
+	# makes patching easier
+	mv ${wrksrc}/ghidra-Ghidra_${version}_build ${wrksrc}/ghidra_build
+}
+
 do_configure() {
-	cd ghidra-Ghidra_${version}_build
 	mkdir -p dependencies/flatRepo
 	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
 	for lib in csframework.jar hfsx_dmglib.jar hfsx.jar iharder-base64.jar; do
@@ -57,12 +62,11 @@ do_configure() {
 }
 
 do_build() {
-	cd ghidra-Ghidra_${version}_build
 	gradle buildGhidra
 }
 
 do_install() {
-	cd ghidra-Ghidra_${version}_build
+	cd ${wrksrc}/${build_wrksrc}
 	vmkdir usr/libexec/ghidra
 	bsdtar --strip-components 1 -C ${DESTDIR}/usr/libexec/ghidra -xf build/dist/ghidra_${version}_DEV_$(date -u +%Y%m%d)_linux64.zip
 	vmkdir usr/bin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] ghidra: update to 10.0.4.
  2021-10-21 14:48 [PR PATCH] ghidra: update to 10.0.4 Johnnynator
@ 2021-10-21 15:00 ` Johnnynator
  2021-10-21 15:03 ` Johnnynator
  2021-10-24 20:42 ` [PR PATCH] [Merged]: " Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Johnnynator @ 2021-10-21 15:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Johnnynator/void-packages ghidra
https://github.com/void-linux/void-packages/pull/33670

ghidra: update to 10.0.4.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From b1f8a7b2cd46b9ca7691990f61a95575d62fb18e Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Thu, 21 Oct 2021 16:46:12 +0200
Subject: [PATCH] ghidra: update to 10.0.4.

---
 .../patches/honor_source_date_epoch.patch     | 29 ++++++++++++
 srcpkgs/ghidra/patches/protoc.patch           | 45 ++++++++++++-------
 srcpkgs/ghidra/template                       | 16 ++++---
 srcpkgs/ghidra/update                         |  2 +
 4 files changed, 70 insertions(+), 22 deletions(-)
 create mode 100644 srcpkgs/ghidra/patches/honor_source_date_epoch.patch
 create mode 100644 srcpkgs/ghidra/update

diff --git a/srcpkgs/ghidra/patches/honor_source_date_epoch.patch b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
new file mode 100644
index 000000000000..ecf92eb3c0b8
--- /dev/null
+++ b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
@@ -0,0 +1,29 @@
+--- a/ghidra_build/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:31:33.820391721 +0200
+@@ -246,7 +246,7 @@
+  *********************************************************************************/
+ def getCurrentDate() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd')
+ 	return formattedDate
+ }
+@@ -256,7 +256,7 @@
+  *********************************************************************************/
+ def getCurrentDateTime() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd-HHmm')
+ 	return formattedDate
+ }
+@@ -266,7 +266,7 @@
+  *********************************************************************************/
+ def getCurrentDateTimeLong() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyy-MMM-dd HHmm z')
+ 	return formattedDate
+ }
diff --git a/srcpkgs/ghidra/patches/protoc.patch b/srcpkgs/ghidra/patches/protoc.patch
index a3ab960346e3..30c45164caf9 100644
--- a/srcpkgs/ghidra/patches/protoc.patch
+++ b/srcpkgs/ghidra/patches/protoc.patch
@@ -1,16 +1,15 @@
---- ghidra-10.0.1/ghidra-Ghidra_10.0.1_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-07-08 12:16:19.000000000 -0500
-+++ -	2021-07-19 04:53:54.446268239 -0500
-@@ -27,7 +27,6 @@
- 
- configurations {
- 	allProtocArtifacts
--	protocArtifact
- }
- 
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:35:42.275129993 +0200
+@@ -33,21 +33,11 @@
  def os = org.gradle.internal.os.OperatingSystem.current()
-@@ -37,16 +36,6 @@
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
+ 
+ dependencies {
+-	allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_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:osx-x86_64@exe'
  
 -	if (os.isWindows()) {
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
@@ -22,12 +21,21 @@
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
 -    }
 -
- 	api 'com.google.protobuf:protobuf-java:3.11.1'
+-	api 'com.google.protobuf:protobuf-java:3.11.1'
++	api 'com.google.protobuf:protobuf-java:3.18.1'
  	api project(':Framework-AsyncComm')
  	api project(':Framework-Debugging')
-@@ -70,14 +59,9 @@
- 	ext.outdir = file("build/generated/source/proto/main/java")
- 	outputs.dir(outdir)
+ 	api project(':ProposedUtils')
+@@ -58,7 +48,7 @@
+ 
+ /*protobuf {
+ 	protoc {
+-		artifact = 'com.google.protobuf:protoc:3.11.1'
++		artifact = 'com.google.protobuf:protoc:3.18.1'
+ 	}
+ }*/
+ 
+@@ -72,12 +62,7 @@
  	inputs.files(src)
 -	dependsOn(configurations.protocArtifact)
  	doLast {
@@ -41,3 +49,8 @@
  			args src
  		}
  	}
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/Module.manifest	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:40:18.629990242 +0200
+@@ -1 +1 @@
+-MODULE FILE LICENSE: lib/protobuf-java-3.11.1.jar BSD
++MODULE FILE LICENSE: lib/protobuf-java-3.18.1.jar BSD
diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index 7f4182f3730a..0a9ea9899872 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -1,10 +1,11 @@
 # Template file for 'ghidra'
 pkgname=ghidra
-version=10.0.1
+version=10.0.4
 revision=1
 archs="x86_64*"
 create_wrksrc=yes
-hostmakedepends="gradle openjdk11 flex unzip protobuf"
+build_wrksrc="ghidra_build"
+hostmakedepends="gradle openjdk11 flex unzip protobuf which"
 depends="openjdk11"
 short_desc="Software reverse engineering (SRE) framework"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
@@ -15,7 +16,7 @@ distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${ver
  https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip
  https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-12.12/yajsw-stable-12.12.zip
  https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar"
-checksum="37c5d0cb8d016860eb6dd3ec3aa1b81d22b7d2d42dd7d40cf4f2fcab2b0e0b43
+checksum="76f1bd9604d49a2e59c47b347aedb90484bcfe51217c792e8cc771fc6481147c
  7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
  90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf
  1398fcb1e93abb19992c4fa06d7fe5758aabb4c45781d7ef306c6f57ca7a7321
@@ -43,8 +44,12 @@ skiprdeps="/usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/animals
  /usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/write"
 python_version=2 #unverified
 
+post_extract() {
+	# makes patching easier
+	mv ${wrksrc}/ghidra-Ghidra_${version}_build ${wrksrc}/ghidra_build
+}
+
 do_configure() {
-	cd ghidra-Ghidra_${version}_build
 	mkdir -p dependencies/flatRepo
 	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
 	for lib in csframework.jar hfsx_dmglib.jar hfsx.jar iharder-base64.jar; do
@@ -57,12 +62,11 @@ do_configure() {
 }
 
 do_build() {
-	cd ghidra-Ghidra_${version}_build
 	gradle buildGhidra
 }
 
 do_install() {
-	cd ghidra-Ghidra_${version}_build
+	cd ${wrksrc}/${build_wrksrc}
 	vmkdir usr/libexec/ghidra
 	bsdtar --strip-components 1 -C ${DESTDIR}/usr/libexec/ghidra -xf build/dist/ghidra_${version}_DEV_$(date -u +%Y%m%d)_linux64.zip
 	vmkdir usr/bin
diff --git a/srcpkgs/ghidra/update b/srcpkgs/ghidra/update
new file mode 100644
index 000000000000..e6f8cb86edc0
--- /dev/null
+++ b/srcpkgs/ghidra/update
@@ -0,0 +1,2 @@
+site=https://github.com/NationalSecurityAgency/ghidra/tags
+pattern='/archive/refs/tags/Ghidra_?\K[\d.]+(?=_build\.tar\.gz")'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] ghidra: update to 10.0.4.
  2021-10-21 14:48 [PR PATCH] ghidra: update to 10.0.4 Johnnynator
  2021-10-21 15:00 ` [PR PATCH] [Updated] " Johnnynator
@ 2021-10-21 15:03 ` Johnnynator
  2021-10-24 20:42 ` [PR PATCH] [Merged]: " Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Johnnynator @ 2021-10-21 15:03 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Johnnynator/void-packages ghidra
https://github.com/void-linux/void-packages/pull/33670

ghidra: update to 10.0.4.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From be175e0b02da6aeb92cf436621a94f3a2058c9a1 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Thu, 21 Oct 2021 16:46:12 +0200
Subject: [PATCH] ghidra: update to 10.0.4.

---
 .../patches/honor_source_date_epoch.patch     | 29 ++++++++++++
 srcpkgs/ghidra/patches/protoc.patch           | 45 ++++++++++++-------
 srcpkgs/ghidra/template                       | 18 +++++---
 srcpkgs/ghidra/update                         |  2 +
 4 files changed, 71 insertions(+), 23 deletions(-)
 create mode 100644 srcpkgs/ghidra/patches/honor_source_date_epoch.patch
 create mode 100644 srcpkgs/ghidra/update

diff --git a/srcpkgs/ghidra/patches/honor_source_date_epoch.patch b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
new file mode 100644
index 000000000000..ecf92eb3c0b8
--- /dev/null
+++ b/srcpkgs/ghidra/patches/honor_source_date_epoch.patch
@@ -0,0 +1,29 @@
+--- a/ghidra_build/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:31:33.820391721 +0200
+@@ -246,7 +246,7 @@
+  *********************************************************************************/
+ def getCurrentDate() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd')
+ 	return formattedDate
+ }
+@@ -256,7 +256,7 @@
+  *********************************************************************************/
+ def getCurrentDateTime() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyyMMdd-HHmm')
+ 	return formattedDate
+ }
+@@ -266,7 +266,7 @@
+  *********************************************************************************/
+ def getCurrentDateTimeLong() {
+ 
+-	def date = new Date()
++	def date = System.getenv("SOURCE_DATE_EPOCH") == null ? new Date() : new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")))
+ 	def formattedDate = date.format('yyyy-MMM-dd HHmm z')
+ 	return formattedDate
+ }
diff --git a/srcpkgs/ghidra/patches/protoc.patch b/srcpkgs/ghidra/patches/protoc.patch
index a3ab960346e3..30c45164caf9 100644
--- a/srcpkgs/ghidra/patches/protoc.patch
+++ b/srcpkgs/ghidra/patches/protoc.patch
@@ -1,16 +1,15 @@
---- ghidra-10.0.1/ghidra-Ghidra_10.0.1_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-07-08 12:16:19.000000000 -0500
-+++ -	2021-07-19 04:53:54.446268239 -0500
-@@ -27,7 +27,6 @@
- 
- configurations {
- 	allProtocArtifacts
--	protocArtifact
- }
- 
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/build.gradle	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:35:42.275129993 +0200
+@@ -33,21 +33,11 @@
  def os = org.gradle.internal.os.OperatingSystem.current()
-@@ -37,16 +36,6 @@
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
-     allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
+ 
+ dependencies {
+-	allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe'
+-    allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_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:osx-x86_64@exe'
  
 -	if (os.isWindows()) {
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe'
@@ -22,12 +21,21 @@
 -    	protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe'
 -    }
 -
- 	api 'com.google.protobuf:protobuf-java:3.11.1'
+-	api 'com.google.protobuf:protobuf-java:3.11.1'
++	api 'com.google.protobuf:protobuf-java:3.18.1'
  	api project(':Framework-AsyncComm')
  	api project(':Framework-Debugging')
-@@ -70,14 +59,9 @@
- 	ext.outdir = file("build/generated/source/proto/main/java")
- 	outputs.dir(outdir)
+ 	api project(':ProposedUtils')
+@@ -58,7 +48,7 @@
+ 
+ /*protobuf {
+ 	protoc {
+-		artifact = 'com.google.protobuf:protoc:3.11.1'
++		artifact = 'com.google.protobuf:protoc:3.18.1'
+ 	}
+ }*/
+ 
+@@ -72,12 +62,7 @@
  	inputs.files(src)
 -	dependsOn(configurations.protocArtifact)
  	doLast {
@@ -41,3 +49,8 @@
  			args src
  		}
  	}
+--- a/ghidra_build/Ghidra/Debug/Debugger-gadp/Module.manifest	2021-09-28 20:47:24.000000000 +0200
++++ -	2021-10-21 16:40:18.629990242 +0200
+@@ -1 +1 @@
+-MODULE FILE LICENSE: lib/protobuf-java-3.11.1.jar BSD
++MODULE FILE LICENSE: lib/protobuf-java-3.18.1.jar BSD
diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template
index 7f4182f3730a..30eb7b2e9716 100644
--- a/srcpkgs/ghidra/template
+++ b/srcpkgs/ghidra/template
@@ -1,10 +1,11 @@
 # Template file for 'ghidra'
 pkgname=ghidra
-version=10.0.1
+version=10.0.4
 revision=1
 archs="x86_64*"
 create_wrksrc=yes
-hostmakedepends="gradle openjdk11 flex unzip protobuf"
+build_wrksrc="ghidra_build"
+hostmakedepends="gradle openjdk11 flex unzip protobuf which"
 depends="openjdk11"
 short_desc="Software reverse engineering (SRE) framework"
 maintainer="Andrew Benson <abenson+void@gmail.com>"
@@ -15,7 +16,7 @@ distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${ver
  https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip
  https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-12.12/yajsw-stable-12.12.zip
  https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar"
-checksum="37c5d0cb8d016860eb6dd3ec3aa1b81d22b7d2d42dd7d40cf4f2fcab2b0e0b43
+checksum="76f1bd9604d49a2e59c47b347aedb90484bcfe51217c792e8cc771fc6481147c
  7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
  90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf
  1398fcb1e93abb19992c4fa06d7fe5758aabb4c45781d7ef306c6f57ca7a7321
@@ -41,10 +42,14 @@ skiprdeps="/usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/animals
  /usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/sharedReturn
  /usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/switch
  /usr/libexec/ghidra/docs/GhidraClass/ExerciseFiles/Advanced/write"
-python_version=2 #unverified
+python_version=2 # Jython 2.7.2 stuff
+
+post_extract() {
+	# makes patching easier
+	mv ${wrksrc}/ghidra-Ghidra_${version}_build ${wrksrc}/ghidra_build
+}
 
 do_configure() {
-	cd ghidra-Ghidra_${version}_build
 	mkdir -p dependencies/flatRepo
 	cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo
 	for lib in csframework.jar hfsx_dmglib.jar hfsx.jar iharder-base64.jar; do
@@ -57,12 +62,11 @@ do_configure() {
 }
 
 do_build() {
-	cd ghidra-Ghidra_${version}_build
 	gradle buildGhidra
 }
 
 do_install() {
-	cd ghidra-Ghidra_${version}_build
+	cd ${wrksrc}/${build_wrksrc}
 	vmkdir usr/libexec/ghidra
 	bsdtar --strip-components 1 -C ${DESTDIR}/usr/libexec/ghidra -xf build/dist/ghidra_${version}_DEV_$(date -u +%Y%m%d)_linux64.zip
 	vmkdir usr/bin
diff --git a/srcpkgs/ghidra/update b/srcpkgs/ghidra/update
new file mode 100644
index 000000000000..e6f8cb86edc0
--- /dev/null
+++ b/srcpkgs/ghidra/update
@@ -0,0 +1,2 @@
+site=https://github.com/NationalSecurityAgency/ghidra/tags
+pattern='/archive/refs/tags/Ghidra_?\K[\d.]+(?=_build\.tar\.gz")'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: ghidra: update to 10.0.4.
  2021-10-21 14:48 [PR PATCH] ghidra: update to 10.0.4 Johnnynator
  2021-10-21 15:00 ` [PR PATCH] [Updated] " Johnnynator
  2021-10-21 15:03 ` Johnnynator
@ 2021-10-24 20:42 ` Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Johnnynator @ 2021-10-24 20:42 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

ghidra: update to 10.0.4.
https://github.com/void-linux/void-packages/pull/33670

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-24 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 14:48 [PR PATCH] ghidra: update to 10.0.4 Johnnynator
2021-10-21 15:00 ` [PR PATCH] [Updated] " Johnnynator
2021-10-21 15:03 ` Johnnynator
2021-10-24 20:42 ` [PR PATCH] [Merged]: " Johnnynator

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).