[pbs-devel] [PATCH proxmox-backup v4 2/7] move proxmox-backup-debug back to main crate

Dominik Csapak d.csapak at proxmox.com
Tue Sep 21 12:11:13 CEST 2021


we want to add something to it that needs access to the
proxmox_backup::api2 stuff, so it cannot live in a sub crate

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 Cargo.toml                                     |  1 -
 Makefile                                       |  2 --
 debian/proxmox-backup-debug.bash-completion    |  1 -
 debian/proxmox-backup-server.bash-completion   |  1 +
 proxmox-backup-debug/Cargo.toml                | 18 ------------------
 .../main.rs => src/bin/proxmox-backup-debug.rs |  4 ++--
 .../bin/proxmox_backup_debug}/inspect.rs       |  0
 src/bin/proxmox_backup_debug/mod.rs            |  2 ++
 .../bin/proxmox_backup_debug}/recover.rs       |  0
 9 files changed, 5 insertions(+), 24 deletions(-)
 delete mode 100644 debian/proxmox-backup-debug.bash-completion
 delete mode 100644 proxmox-backup-debug/Cargo.toml
 rename proxmox-backup-debug/src/main.rs => src/bin/proxmox-backup-debug.rs (86%)
 rename {proxmox-backup-debug/src => src/bin/proxmox_backup_debug}/inspect.rs (100%)
 create mode 100644 src/bin/proxmox_backup_debug/mod.rs
 rename {proxmox-backup-debug/src => src/bin/proxmox_backup_debug}/recover.rs (100%)

diff --git a/Cargo.toml b/Cargo.toml
index cd7af590..b90b5021 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,7 +33,6 @@ members = [
 
     "proxmox-backup-banner",
     "proxmox-backup-client",
-    "proxmox-backup-debug",
     "proxmox-file-restore",
     "proxmox-restore-daemon",
     "pxar-bin",
diff --git a/Makefile b/Makefile
index 56fb5437..90723241 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,6 @@ SUBCRATES := \
 	pbs-tools \
 	proxmox-backup-banner \
 	proxmox-backup-client \
-	proxmox-backup-debug \
 	proxmox-file-restore \
 	proxmox-restore-daemon \
 	pxar-bin
@@ -180,7 +179,6 @@ $(COMPILED_BINS) $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen: .do-
 	    --bin proxmox-backup-banner \
 	    --package proxmox-backup-client \
 	    --bin proxmox-backup-client \
-	    --package proxmox-backup-debug \
 	    --bin proxmox-backup-debug \
 	    --package proxmox-file-restore \
 	    --bin proxmox-file-restore \
diff --git a/debian/proxmox-backup-debug.bash-completion b/debian/proxmox-backup-debug.bash-completion
deleted file mode 100644
index b977f953..00000000
--- a/debian/proxmox-backup-debug.bash-completion
+++ /dev/null
@@ -1 +0,0 @@
-debian/proxmox-backup-debug.bc proxmox-backup-debug
diff --git a/debian/proxmox-backup-server.bash-completion b/debian/proxmox-backup-server.bash-completion
index a2165699..d4257edd 100644
--- a/debian/proxmox-backup-server.bash-completion
+++ b/debian/proxmox-backup-server.bash-completion
@@ -1,4 +1,5 @@
 debian/proxmox-backup-manager.bc proxmox-backup-manager
+debian/proxmox-backup-debug.bc proxmox-backup-debug
 debian/proxmox-tape.bc proxmox-tape
 debian/pmtx.bc pmtx
 debian/pmt.bc pmt
diff --git a/proxmox-backup-debug/Cargo.toml b/proxmox-backup-debug/Cargo.toml
deleted file mode 100644
index 21b3cc2f..00000000
--- a/proxmox-backup-debug/Cargo.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-[package]
-name = "proxmox-backup-debug"
-version = "0.1.0"
-authors = ["Proxmox Support Team <support at proxmox.com>"]
-edition = "2018"
-
-[dependencies]
-anyhow = "1.0"
-walkdir = "2"
-serde_json = "1.0"
-
-proxmox = { version = "0.13.3", features = [ "api-macro", "cli" ] }
-
-pbs-config = { path = "../pbs-config" }
-pbs-client = { path = "../pbs-client" }
-pbs-datastore = { path = "../pbs-datastore" }
-pbs-runtime = { path = "../pbs-runtime" }
-pbs-tools = { path = "../pbs-tools" }
diff --git a/proxmox-backup-debug/src/main.rs b/src/bin/proxmox-backup-debug.rs
similarity index 86%
rename from proxmox-backup-debug/src/main.rs
rename to src/bin/proxmox-backup-debug.rs
index b768f57a..4d6164ef 100644
--- a/proxmox-backup-debug/src/main.rs
+++ b/src/bin/proxmox-backup-debug.rs
@@ -1,7 +1,7 @@
 use proxmox::api::cli::{run_cli_command, CliCommandMap, CliEnvironment};
 
-mod inspect;
-mod recover;
+mod proxmox_backup_debug;
+use proxmox_backup_debug::*;
 
 fn main() {
     let cmd_def = CliCommandMap::new()
diff --git a/proxmox-backup-debug/src/inspect.rs b/src/bin/proxmox_backup_debug/inspect.rs
similarity index 100%
rename from proxmox-backup-debug/src/inspect.rs
rename to src/bin/proxmox_backup_debug/inspect.rs
diff --git a/src/bin/proxmox_backup_debug/mod.rs b/src/bin/proxmox_backup_debug/mod.rs
new file mode 100644
index 00000000..bbaca751
--- /dev/null
+++ b/src/bin/proxmox_backup_debug/mod.rs
@@ -0,0 +1,2 @@
+pub mod inspect;
+pub mod recover;
diff --git a/proxmox-backup-debug/src/recover.rs b/src/bin/proxmox_backup_debug/recover.rs
similarity index 100%
rename from proxmox-backup-debug/src/recover.rs
rename to src/bin/proxmox_backup_debug/recover.rs
-- 
2.30.2






More information about the pbs-devel mailing list