Ghidra is a software reverse engineering (SRE) framework
GP-5456: Upgrade protobuf to 4.31.0 (java) and 6.31.0 (python)
Danf1607b5cfdab
diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/pyproject.toml b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/pyproject.tomlindex 042a9c7b1d..32c11920f9 100644--- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/pyproject.toml+++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/pyproject.toml@@ -4,20 +4,20 @@ build-backend = "setuptools.build_meta"[project]name = "ghidradbg"-version = "11.4"+version = "11.5"authors = [{ name="Ghidra Development Team" },]description = "Ghidra's Plugin for dbgeng"readme = "README.md"-requires-python = ">=3.7"+requires-python = ">=3.9"classifiers = ["Programming Language :: Python :: 3","License :: OSI Approved :: Apache Software License","Operating System :: OS Independent",]dependencies = [- "ghidratrace==11.4",+ "ghidratrace==11.5","pybag>=2.2.12"]diff --git a/Ghidra/Debug/Debugger-agent-drgn/src/main/py/pyproject.toml b/Ghidra/Debug/Debugger-agent-drgn/src/main/py/pyproject.tomlindex 3daaa693b8..3590cbb18d 100644--- a/Ghidra/Debug/Debugger-agent-drgn/src/main/py/pyproject.toml+++ b/Ghidra/Debug/Debugger-agent-drgn/src/main/py/pyproject.toml@@ -4,20 +4,20 @@ build-backend = "setuptools.build_meta"[project]name = "ghidradrgn"-version = "11.4"+version = "11.5"authors = [{ name="Ghidra Development Team" },]description = "Ghidra's Plugin for drgn"readme = "README.md"-requires-python = ">=3.7"+requires-python = ">=3.9"classifiers = ["Programming Language :: Python :: 3","License :: OSI Approved :: Apache Software License","Operating System :: OS Independent",]dependencies = [- "ghidratrace==11.4",+ "ghidratrace==11.5",][project.urls]diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/pyproject.toml b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/pyproject.tomlindex e187033213..74dd4142ee 100644--- a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/pyproject.toml+++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/pyproject.toml@@ -4,20 +4,20 @@ build-backend = "setuptools.build_meta"[project]name = "ghidragdb"-version = "11.4"+version = "11.5"authors = [{ name="Ghidra Development Team" },]description = "Ghidra's Plugin for gdb"readme = "README.md"-requires-python = ">=3.7"+requires-python = ">=3.9"classifiers = ["Programming Language :: Python :: 3","License :: OSI Approved :: Apache Software License","Operating System :: OS Independent",]dependencies = [- "ghidratrace==11.4",+ "ghidratrace==11.5",][project.urls]diff --git a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/pyproject.toml b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/pyproject.tomlindex f9b07a5ceb..02e2c6498c 100644--- a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/pyproject.toml+++ b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/pyproject.toml@@ -4,20 +4,20 @@ build-backend = "setuptools.build_meta"[project]name = "ghidralldb"-version = "11.4"+version = "11.5"authors = [{ name="Ghidra Development Team" },]description = "Ghidra's Plugin for lldb"readme = "README.md"-requires-python = ">=3.7"+requires-python = ">=3.9"classifiers = ["Programming Language :: Python :: 3","License :: OSI Approved :: Apache Software License","Operating System :: OS Independent",]dependencies = [- "ghidratrace==11.4",+ "ghidratrace==11.5",][project.urls]diff --git a/Ghidra/Debug/Debugger-rmi-trace/Module.manifest b/Ghidra/Debug/Debugger-rmi-trace/Module.manifestindex fefac7bf9c..22c6608a4d 100644--- a/Ghidra/Debug/Debugger-rmi-trace/Module.manifest+++ b/Ghidra/Debug/Debugger-rmi-trace/Module.manifest@@ -1,4 +1,4 @@-MODULE FILE LICENSE: pypkg/dist/protobuf-3.20.3-py2.py3-none-any.whl BSD-3-GOOGLE+MODULE FILE LICENSE: pypkg/dist/protobuf-6.31.0-py3-none-any.whl BSD-3-GOOGLEMODULE FILE LICENSE: pypkg/dist/psutil-5.9.8.tar.gz BSD-3-PSUTILMODULE FILE LICENSE: pypkg/dist/setuptools-68.0.0-py3-none-any.whl MITMODULE FILE LICENSE: pypkg/dist/wheel-0.37.1-py2.py3-none-any.whl MITdiff --git a/Ghidra/Debug/Debugger-rmi-trace/build.gradle b/Ghidra/Debug/Debugger-rmi-trace/build.gradleindex 4fa3b9a539..8fa654b6c5 100644--- a/Ghidra/Debug/Debugger-rmi-trace/build.gradle+++ b/Ghidra/Debug/Debugger-rmi-trace/build.gradle@@ -72,7 +72,7 @@ tasks.assemblePyPackage {}}-distributePyDep("protobuf-3.20.3-py2.py3-none-any.whl")+distributePyDep("protobuf-6.31.0-py3-none-any.whl")distributePyDep("psutil-5.9.8.tar.gz")distributePyDep("setuptools-68.0.0-py3-none-any.whl")distributePyDep("wheel-0.37.1-py2.py3-none-any.whl")diff --git a/Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/service/tracermi/TraceRmiHandler.java b/Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/service/tracermi/TraceRmiHandler.javaindex 784d329075..4d32deabaf 100644--- a/Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/service/tracermi/TraceRmiHandler.java+++ b/Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/service/tracermi/TraceRmiHandler.java@@ -69,7 +69,11 @@ import ghidra.util.exception.CancelledException;import ghidra.util.exception.DuplicateFileException;public class TraceRmiHandler extends AbstractTraceRmiConnection {- public static final String VERSION = "11.4";+ /**+ * NOTE: This can't just be Application.getApplicationVersion(), because the Python client only+ * specifies up to the minor, not patch, release.+ */+ public static final String VERSION = "11.5";protected static class VersionMismatchError extends TraceRmiError {public VersionMismatchError(String remote) {diff --git a/Ghidra/Debug/Debugger-rmi-trace/src/main/py/pyproject.toml b/Ghidra/Debug/Debugger-rmi-trace/src/main/py/pyproject.tomlindex d29c8e2bdb..06acacc3e3 100644--- a/Ghidra/Debug/Debugger-rmi-trace/src/main/py/pyproject.toml+++ b/Ghidra/Debug/Debugger-rmi-trace/src/main/py/pyproject.toml@@ -4,20 +4,20 @@ build-backend = "setuptools.build_meta"[project]name = "ghidratrace"-version = "11.4"+version = "11.5"authors = [{ name="Ghidra Development Team" },]description = "Ghidra's TraceRmi for Python3"readme = "README.md"-requires-python = ">=3.7"+requires-python = ">=3.9"classifiers = ["Programming Language :: Python :: 3","License :: OSI Approved :: Apache Software License","Operating System :: OS Independent",]dependencies = [- "protobuf >= 3.20.0",+ "protobuf >= 6.31.0",][project.urls]diff --git a/Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py b/Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.pyindex f92b403e17..d0792aaf36 100644--- a/Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py+++ b/Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py@@ -48,7 +48,7 @@ from .util import send_delimited, recv_delimited# Other places to change:# * every pyproject.toml file (incl. deps)# * TraceRmiHandler.VERSION-VERSION = '11.4'+VERSION = '11.5'E = TypeVar('E')diff --git a/Ghidra/Debug/ProposedUtils/Module.manifest b/Ghidra/Debug/ProposedUtils/Module.manifestindex 89174007c9..d2e42429ea 100644--- a/Ghidra/Debug/ProposedUtils/Module.manifest+++ b/Ghidra/Debug/ProposedUtils/Module.manifest@@ -1 +1 @@-MODULE FILE LICENSE: lib/protobuf-java-3.21.8.jar BSD-3-GOOGLE+MODULE FILE LICENSE: lib/protobuf-java-4.31.0.jar BSD-3-GOOGLEdiff --git a/Ghidra/Debug/ProposedUtils/build.gradle b/Ghidra/Debug/ProposedUtils/build.gradleindex f71b8c51a3..e63a0535f3 100644--- a/Ghidra/Debug/ProposedUtils/build.gradle+++ b/Ghidra/Debug/ProposedUtils/build.gradle@@ -23,8 +23,10 @@ eclipse.project.name = 'Debug ProposedUtils'// val autoServiceVersion = "1.0-rc5"+def version = getProperty("ghidra.protobuf.java.version")+dependencies {- api 'com.google.protobuf:protobuf-java:3.21.8'+ api "com.google.protobuf:protobuf-java:${version}"api project(':DB')api project(':Project')api project(':SoftwareModeling')diff --git a/Ghidra/Extensions/MachineLearning/Module.manifest b/Ghidra/Extensions/MachineLearning/Module.manifestindex 72935d28d5..b3aff00729 100644--- a/Ghidra/Extensions/MachineLearning/Module.manifest+++ b/Ghidra/Extensions/MachineLearning/Module.manifest@@ -1,6 +1,5 @@MODULE FILE LICENSE: lib/olcut-config-protobuf-5.2.0.jar BSD-2-ORACLEMODULE FILE LICENSE: lib/olcut-core-5.2.0.jar BSD-2-ORACLE-MODULE FILE LICENSE: lib/protobuf-java-3.21.8.jar BSD-3-GOOGLEMODULE FILE LICENSE: lib/tribuo-classification-core-4.2.0.jar Apache License 2.0MODULE FILE LICENSE: lib/tribuo-classification-tree-4.2.0.jar Apache License 2.0MODULE FILE LICENSE: lib/tribuo-common-tree-4.2.0.jar Apache License 2.0diff --git a/Ghidra/Extensions/MachineLearning/build.gradle b/Ghidra/Extensions/MachineLearning/build.gradleindex 59173063e0..0623ca4930 100644--- a/Ghidra/Extensions/MachineLearning/build.gradle+++ b/Ghidra/Extensions/MachineLearning/build.gradle@@ -21,12 +21,13 @@ apply from: "$rootProject.projectDir/gradle/helpProject.gradle"apply plugin: 'eclipse'eclipse.project.name = 'Xtra MachineLearning'+def protobufVersion = getProperty("ghidra.protobuf.java.version")+dependencies {api project(':Base')api "com.oracle.labs.olcut:olcut-config-protobuf:5.2.0" //{exclude group: "com.google.protobuf", module: "protobuf-java"}api ("com.oracle.labs.olcut:olcut-core:5.2.0") {exclude group: "org.jline"}- api "com.google.protobuf:protobuf-java:3.21.8" //only needed for running junitsapi "org.tribuo:tribuo-classification-core:4.2.0"api "org.tribuo:tribuo-classification-tree:4.2.0"api "org.tribuo:tribuo-common-tree:4.2.0"@@ -36,10 +37,5 @@ dependencies {api ("org.tribuo:tribuo-util-onnx:4.2.0") //{exclude group: "com.google.protobuf", module: "protobuf-java"}testImplementation project(path: ':SoftwareModeling', configuration: 'testArtifacts')-+ testImplementation "com.google.protobuf:protobuf-java:${protobufVersion}"}-----diff --git a/gradle.properties b/gradle.propertiesindex 879249cd9f..976933ba20 100644--- a/gradle.properties+++ b/gradle.properties@@ -1,3 +1,4 @@# Increase maximum Gradle heap size (default is 1G)# And fix build in locales with non-default capitalizations (e.g. tr_TR)org.gradle.jvmargs=-Xmx2G -Duser.language=en -Duser.country=US+ghidra.protobuf.java.version=4.31.0diff --git a/gradle/hasProtobuf.gradle b/gradle/hasProtobuf.gradleindex a8c176bcbe..7a360b5a4e 100644--- a/gradle/hasProtobuf.gradle+++ b/gradle/hasProtobuf.gradle@@ -24,38 +24,40 @@ configurations {def platform = getCurrentPlatformName()+def version = getProperty('ghidra.protobuf.java.version')+dependencies {- allProtocArtifacts 'com.google.protobuf:protoc:3.21.8:windows-x86_64@exe'- allProtocArtifacts 'com.google.protobuf:protoc:3.21.8:linux-x86_64@exe'- allProtocArtifacts 'com.google.protobuf:protoc:3.21.8:linux-aarch_64@exe'- allProtocArtifacts 'com.google.protobuf:protoc:3.21.8:osx-x86_64@exe'- allProtocArtifacts 'com.google.protobuf:protoc:3.21.8:osx-aarch_64@exe'+ allProtocArtifacts "com.google.protobuf:protoc:${version}:windows-x86_64@exe"+ allProtocArtifacts "com.google.protobuf:protoc:${version}:linux-x86_64@exe"+ allProtocArtifacts "com.google.protobuf:protoc:${version}:linux-aarch_64@exe"+ allProtocArtifacts "com.google.protobuf:protoc:${version}:osx-x86_64@exe"+ allProtocArtifacts "com.google.protobuf:protoc:${version}:osx-aarch_64@exe"if (isCurrentWindows()) {- protocArtifact 'com.google.protobuf:protoc:3.21.8:windows-x86_64@exe'+ protocArtifact "com.google.protobuf:protoc:${version}:windows-x86_64@exe"}if (isCurrentLinux()) {if (platform.endsWith("x86_64")) {- protocArtifact 'com.google.protobuf:protoc:3.21.8:linux-x86_64@exe'+ protocArtifact "com.google.protobuf:protoc:${version}:linux-x86_64@exe"}else {- protocArtifact 'com.google.protobuf:protoc:3.21.8:linux-aarch_64@exe'+ protocArtifact "com.google.protobuf:protoc:${version}:linux-aarch_64@exe"}}if (isCurrentMac()) {if (platform.endsWith("x86_64")) {- protocArtifact 'com.google.protobuf:protoc:3.21.8:osx-x86_64@exe'+ protocArtifact "com.google.protobuf:protoc:${version}:osx-x86_64@exe"}else {- protocArtifact 'com.google.protobuf:protoc:3.21.8:osx-aarch_64@exe'+ protocArtifact "com.google.protobuf:protoc:${version}:osx-aarch_64@exe"}}}/*protobuf {protoc {- artifact = 'com.google.protobuf:protoc:3.21.8'+ artifact = 'com.google.protobuf:protoc:${version}'}}*/diff --git a/gradle/support/fetchDependencies.gradle b/gradle/support/fetchDependencies.gradleindex 84009f13d8..9470625f34 100644--- a/gradle/support/fetchDependencies.gradle+++ b/gradle/support/fetchDependencies.gradle@@ -164,9 +164,9 @@ ext.deps = [destination: FID_DIR],[- name: "protobuf-3.20.3-py2.py3-none-any.whl",- url: "https://files.pythonhosted.org/packages/8d/14/619e24a4c70df2901e1f4dbc50a6291eb63a759172558df326347dce1f0d/protobuf-3.20.3-py2.py3-none-any.whl",- sha256: "a7ca6d488aa8ff7f329d4c545b2dbad8ac31464f1d8b1c87ad1346717731e4db",+ name: "protobuf-6.31.0-py3-none-any.whl",+ url: "https://files.pythonhosted.org/packages/ee/01/1ed1d482960a5718fd99c82f6d79120181947cfd4667ec3944d448ed44a3/protobuf-6.31.0-py3-none-any.whl",+ sha256: "6ac2e82556e822c17a8d23aa1190bbc1d06efb9c261981da95c71c9da09e9e23",destination: file("${DEPS_DIR}/Debugger-rmi-trace/")],[