From 38e200a22b523fb6501fff455cc1f8a184b3bfca Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 27 May 2023 17:37:49 +0200 Subject: [PATCH] use PBS workspace crates from submodule to allow easier building in restricted environments, in core principle nothing changes, those crates got and get in via git, some way or another. Signed-off-by: Thomas Lamprecht --- .gitmodules | 3 +++ Cargo.toml | 10 +++++----- Makefile | 5 ++++- submodules/proxmox-backup | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 160000 submodules/proxmox-backup diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..deb6818 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dependecies/proxmox-backup"] + path = submodules/proxmox-backup + url = git://git.proxmox.com/git/proxmox-backup.git diff --git a/Cargo.toml b/Cargo.toml index 88bdc52..dd3a738 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,11 +36,11 @@ proxmox-lang = "1" proxmox-schema = { version = "1", features = [ "api-macro" ] } proxmox-sys = { version = "0.4", features = [ "sortable-macro"] } -pbs-api-types = { git = "git://git.proxmox.com/git/proxmox-backup.git", rev = "f564ba0e4efe3641cd474d264e9b649fdfcfd22d" } -pbs-client = { git = "git://git.proxmox.com/git/proxmox-backup.git", rev = "f564ba0e4efe3641cd474d264e9b649fdfcfd22d" } -pbs-datastore = { git = "git://git.proxmox.com/git/proxmox-backup.git", rev = "f564ba0e4efe3641cd474d264e9b649fdfcfd22d" } -pbs-key-config = { git = "git://git.proxmox.com/git/proxmox-backup.git", rev = "f564ba0e4efe3641cd474d264e9b649fdfcfd22d" } -pbs-tools = { git = "git://git.proxmox.com/git/proxmox-backup.git", rev = "f564ba0e4efe3641cd474d264e9b649fdfcfd22d" } +pbs-api-types = { path = "submodules/proxmox-backup/pbs-api-types" } +pbs-client = { path = "submodules/proxmox-backup/pbs-client" } +pbs-datastore = { path = "submodules/proxmox-backup/pbs-datastore" } +pbs-key-config = { path = "submodules/proxmox-backup/pbs-key-config" } +pbs-tools = { path = "submodules/proxmox-backup/pbs-tools" } serde_json = "1.0" tokio = { version = "1.6", features = [ "fs", "io-util", "macros", "net", "rt-multi-thread", "signal", "time" ] } diff --git a/Makefile b/Makefile index ec49421..be704a4 100644 --- a/Makefile +++ b/Makefile @@ -30,13 +30,16 @@ build: rm -rf build cargo build --release diff -I 'PROXMOX_BACKUP_QEMU_VERSION' -up current-api.h proxmox-backup-qemu.h - rsync -a debian Makefile Cargo.toml Cargo.lock build.rs proxmox-backup-qemu.h src target current-api.h build/ + rsync -a debian submodules Makefile Cargo.toml Cargo.lock build.rs proxmox-backup-qemu.h src target current-api.h build/ .PHONY: install install: target/release/libproxmox_backup_qemu.so install -D -m 0755 target/release/libproxmox_backup_qemu.so $(DESTDIR)/usr/lib//libproxmox_backup_qemu.so.0 cd $(DESTDIR)/usr/lib/; ls *; ln -s libproxmox_backup_qemu.so.0 libproxmox_backup_qemu.so +submodule: + [ -e submodules/proxmox-backup/Cargo.toml ] || git submodule update --init --recursive + .PHONY: deb deb: $(OTHER_DEBS) $(OTHER_DEBS): $(MAIN_DEB) diff --git a/submodules/proxmox-backup b/submodules/proxmox-backup new file mode 160000 index 0000000..e5b6a0b --- /dev/null +++ b/submodules/proxmox-backup @@ -0,0 +1 @@ +Subproject commit e5b6a0b38dd0da736292fb696f6c7d0ec2563c36