From 1970457e018aacdc646eac1860f057938c334ab7 Mon Sep 17 00:00:00 2001
From: Andras Gemes
Date: Wed, 23 Oct 2024 21:00:38 +0200
Subject: [PATCH] BSim: Update PostgreSQL (15.10->17.0) and add migrate
commands
---
Ghidra/Features/BSim/Module.manifest | 2 +-
Ghidra/Features/BSim/build.gradle | 2 +-
.../topics/BSim/CommandLineReference.html | 18 +++
.../topics/BSim/DatabaseConfiguration.html | 8 +-
.../bsim/query/BSimControlLaunchable.java | 121 ++++++++++++++++++
Ghidra/Features/BSim/support/make-postgres.sh | 10 +-
gradle/support/fetchDependencies.gradle | 6 +-
7 files changed, 153 insertions(+), 14 deletions(-)
diff --git a/Ghidra/Features/BSim/Module.manifest b/Ghidra/Features/BSim/Module.manifest
index 46e50f56693..029c696197a 100755
--- a/Ghidra/Features/BSim/Module.manifest
+++ b/Ghidra/Features/BSim/Module.manifest
@@ -1,5 +1,5 @@
##MODULE IP: Oxygen Icons - LGPL 3.0
-MODULE FILE LICENSE: postgresql-15.10.tar.gz Postgresql License
+MODULE FILE LICENSE: postgresql-17.0.tar.gz Postgresql License
MODULE FILE LICENSE: lib/postgresql-42.7.3.jar PostgresqlJDBC License
MODULE FILE LICENSE: lib/commons-dbcp2-2.9.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-pool2-2.11.1.jar Apache License 2.0
diff --git a/Ghidra/Features/BSim/build.gradle b/Ghidra/Features/BSim/build.gradle
index 93c6c8b4d19..42b18b3d066 100755
--- a/Ghidra/Features/BSim/build.gradle
+++ b/Ghidra/Features/BSim/build.gradle
@@ -26,7 +26,7 @@ import java.nio.file.Files
import org.gradle.util.GUtil
// NOTE: fetchDependencies.gradle must be updated if postgresql version changes
-def postgresql_distro = "postgresql-15.10.tar.gz"
+def postgresql_distro = "postgresql-17.0.tar.gz"
dependencies {
api project(":Decompiler")
diff --git a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html
index 57cfba217f6..c89d83d0be9 100644
--- a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html
+++ b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html
@@ -47,6 +47,8 @@
+ dumpall
+
+
+ Dumps all PostgreSQL databases into a specified file. A dump file must be
+ specified, and the PostgreSQL server must be running.
+
+
+ restore
+
+
+ Restores all PostgreSQL databases from a specified file. A dump file must be
+ specified, and the PostgreSQL server must be running.
+
+
--Global
Options--
diff --git a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/DatabaseConfiguration.html b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/DatabaseConfiguration.html
index 22da4e61ed8..d1027b30d7b 100644
--- a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/DatabaseConfiguration.html
+++ b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/DatabaseConfiguration.html
@@ -107,13 +107,13 @@ Building the Server
in the module directory Ghidra/Features/BSim/support
that builds both the PostgreSQL
server and the BSim extension from source and prepares the installation for use with
Ghidra. If not already included in the Ghidra installation, the source distribution
- file, currently postgresql-15.10.tar.gz
, can be obtained from the PostgreSQL
+ file, currently postgresql-17.0.tar.gz
, can be obtained from the PostgreSQL
website at