mirror of
https://github.com/wofferl/proxmox-backup-arm64
synced 2025-12-14 23:33:38 +00:00
remove building unnecessary dependencies, move building libproxmox-acme-plugins after the main build
This commit is contained in:
@@ -6,7 +6,7 @@ Script for building Proxmox Backup Server 2.x for Armbian64 based on Bullseye
|
|||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
build-essential curl sudo git lintian \
|
build-essential curl sudo git lintian \
|
||||||
pkg-config libudev-dev libssl-dev libapt-pkg-dev libclang-dev \
|
pkg-config libudev-dev libssl-dev libapt-pkg-dev libclang-dev \
|
||||||
libnetaddr-ip-perl libpam0g-dev libcurl4-openssl-dev uuid-dev
|
libnetaddr-ip-perl libpam0g-dev libcurl4-openssl-dev
|
||||||
```
|
```
|
||||||
## Install ``rustup``
|
## Install ``rustup``
|
||||||
```
|
```
|
||||||
|
|||||||
80
build.sh
80
build.sh
@@ -60,68 +60,6 @@ else
|
|||||||
echo "pve-eslint up-to-date"
|
echo "pve-eslint up-to-date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROXMOX_PERL_VER="0.2.1"
|
|
||||||
PROXMOX_PERL_GIT="9488180f9ef3bf57e049b645c001c3df9b65e11c"
|
|
||||||
PROXMOX_ACME_RS_GIT="abc0bdd09d5c3501534510d49da0ae8fa5c05c05"
|
|
||||||
PROXMOX_APT_GIT="6c0c48b97a29cac1519402e4a1c77010e8a5d216"
|
|
||||||
PROXMOX_GIT="2ae95b5f4e9870113dab8fea1df631299559d4a4"
|
|
||||||
PROXMOX_OPENID_GIT="ce6def219262b5c1f6dbe5440f9f90038bafb3d8"
|
|
||||||
PROXMOX_PERLMOD_GIT="9488180f9ef3bf57e049b645c001c3df9b65e11c"
|
|
||||||
if ! dpkg-query -W -f='${Version}' libproxmox-rs-perl | grep -q ${PROXMOX_PERL_VER}; then
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox-perl-rs.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_PERL_GIT} proxmox-perl-rs
|
|
||||||
cd proxmox-perl-rs
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_GIT} proxmox
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox-acme-rs.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_ACME_RS_GIT} proxmox-acme-rs
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox-apt.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_APT_GIT} proxmox-apt
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox-openid-rs.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_OPENID_GIT} proxmox-openid-rs
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/perlmod.git
|
|
||||||
git_clean_and_checkout ${PROXMOX_PERLMOD_GIT} perlmod
|
|
||||||
patch -p1 < "${PATCHES}/proxmox-perl-rs-dependencies.patch" || exit 0
|
|
||||||
cargo vendor || exit 0
|
|
||||||
make pve-deb pmg-deb common-deb || exit 0
|
|
||||||
${SUDO} dpkg -i --force-depends ./build/libproxmox-rs-perl_0.2.1_arm64.deb \
|
|
||||||
./build/libpve-rs-perl_0.7.2_arm64.deb \
|
|
||||||
./build/libpmg-rs-perl_0.6.2_arm64.deb || exit 0
|
|
||||||
cd ..
|
|
||||||
else
|
|
||||||
echo "libproxmox-rs-perl up-to-date"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
PVE_COMMON_VER="7.2-3"
|
|
||||||
PVE_COMMON_GIT="8949840eab24b9413495dccfbe65c22b33a146c6"
|
|
||||||
if ! dpkg-query -W -f='${Version}' libpve-common-perl | grep -q ${PVE_COMMON_VER}; then
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/pve-common.git
|
|
||||||
cd pve-common/
|
|
||||||
git_clean_and_checkout ${PVE_COMMON_GIT}
|
|
||||||
${SUDO} apt -y build-dep .
|
|
||||||
make deb || exit 0
|
|
||||||
${SUDO} dpkg -i --force-depends ./libpve-common-perl_${PVE_COMMON_VER}_all.deb || exit 0
|
|
||||||
cd ..
|
|
||||||
else
|
|
||||||
echo "libpve-common-perl up-to-date"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROXMOX_ACME_VER="1.4.2"
|
|
||||||
PROXMOX_ACME_GIT="831d879ba508c40835827852951be1d469208b13"
|
|
||||||
if ! dpkg-query -W -f='${Version}' libproxmox-acme-perl | grep -q ${PROXMOX_ACME_VER}; then
|
|
||||||
git_clone_or_fetch https://git.proxmox.com/git/proxmox-acme.git
|
|
||||||
cd proxmox-acme/
|
|
||||||
git_clean_and_checkout ${PROXMOX_ACME_GIT}
|
|
||||||
#${SUDO} apt -y build-dep . # don't install build-dep, because it will remove libpve-common-perl
|
|
||||||
make deb || exit 0
|
|
||||||
cp -a libproxmox-acme-plugins_${PROXMOX_ACME_VER}_all.deb "${PACKAGES}"
|
|
||||||
${SUDO} apt -y --fix-broken install ./libproxmox-acme-perl_${PROXMOX_ACME_VER}_all.deb ./libproxmox-acme-plugins_${PROXMOX_ACME_VER}_all.deb
|
|
||||||
cd ..
|
|
||||||
else
|
|
||||||
echo "libproxmox-acme-perl up-to-date"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROXMOX_WIDGETTOOLKIT_VER="3.5.3"
|
PROXMOX_WIDGETTOOLKIT_VER="3.5.3"
|
||||||
PROXMOX_WIDGETTOOLKIT_GIT="0bba4fc63f488d807c2f8410c49a7a051195a3fd"
|
PROXMOX_WIDGETTOOLKIT_GIT="0bba4fc63f488d807c2f8410c49a7a051195a3fd"
|
||||||
if ! dpkg-query -W -f='${Version}' proxmox-widget-toolkit-dev | grep -q ${PROXMOX_WIDGETTOOLKIT_VER}; then
|
if ! dpkg-query -W -f='${Version}' proxmox-widget-toolkit-dev | grep -q ${PROXMOX_WIDGETTOOLKIT_VER}; then
|
||||||
@@ -182,6 +120,24 @@ else
|
|||||||
echo "proxmox-backup up-to-date"
|
echo "proxmox-backup up-to-date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PROXMOX_ACME_VER="1.4.2"
|
||||||
|
PROXMOX_ACME_GIT="831d879ba508c40835827852951be1d469208b13" # Version 7.3-1
|
||||||
|
PVE_COMMON_GIT="9d14c9ddcf24a2f20a5ded58d28c3e1657ed3728"
|
||||||
|
if ! dpkg-query -W -f='${Version}' libproxmox-acme-perl | grep -q ${PROXMOX_ACME_VER}; then
|
||||||
|
git_clone_or_fetch https://git.proxmox.com/git/proxmox-acme.git
|
||||||
|
cd proxmox-acme/
|
||||||
|
git_clean_and_checkout ${PROXMOX_ACME_GIT}
|
||||||
|
git_clone_or_fetch https://git.proxmox.com/git/pve-common.git
|
||||||
|
git_clean_and_checkout ${PVE_COMMON_GIT} pve-common
|
||||||
|
${SUDO} apt -y build-dep .
|
||||||
|
export PERL5LIB=$PWD/pve-common/src
|
||||||
|
make deb || exit 0
|
||||||
|
cp -a libproxmox-acme-plugins_${PROXMOX_ACME_VER}_all.deb "${PACKAGES}"
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
echo "libproxmox-acme-perl up-to-date"
|
||||||
|
fi
|
||||||
|
|
||||||
PVE_XTERMJS_VER="4.16.0-1"
|
PVE_XTERMJS_VER="4.16.0-1"
|
||||||
PVE_XTERMJS_GIT="8dcff86a32c3ba8754b84e8aabb01369ef3de407"
|
PVE_XTERMJS_GIT="8dcff86a32c3ba8754b84e8aabb01369ef3de407"
|
||||||
PROXMOX_XTERMJS_GIT="41862eeb95b70201c47dfd27fca37879e23be3ff"
|
PROXMOX_XTERMJS_GIT="41862eeb95b70201c47dfd27fca37879e23be3ff"
|
||||||
|
|||||||
@@ -1,212 +0,0 @@
|
|||||||
diff --git a/.cargo/config b/.cargo/config
|
|
||||||
index 3b5b6e4..93c8be0 100644
|
|
||||||
--- a/.cargo/config
|
|
||||||
+++ b/.cargo/config
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
[source]
|
|
||||||
-[source.debian-packages]
|
|
||||||
-directory = "/usr/share/cargo/registry"
|
|
||||||
+[source.vendor]
|
|
||||||
+directory = "vendor"
|
|
||||||
[source.crates-io]
|
|
||||||
-replace-with = "debian-packages"
|
|
||||||
+replace-with = "vendor"
|
|
||||||
+
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 0836c9d..011b9bc 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -67,12 +67,17 @@ gen:
|
|
||||||
build:
|
|
||||||
rm -rf build
|
|
||||||
mkdir build
|
|
||||||
- echo system >build/rust-toolchain
|
|
||||||
+ #echo system >build/rust-toolchain
|
|
||||||
cp -a ./scripts ./build
|
|
||||||
cp -a ./common ./build
|
|
||||||
cp -a ./pve-rs ./build
|
|
||||||
cp -a ./pmg-rs ./build
|
|
||||||
cp -a ./Proxmox ./build
|
|
||||||
+ ln -s ../perlmod ./build/perlmod
|
|
||||||
+ ln -s ../proxmox ./build/proxmox
|
|
||||||
+ ln -s ../proxmox-apt ./build/proxmox-apt
|
|
||||||
+ ln -s ../proxmox-acme-rs ./build/proxmox-acme-rs
|
|
||||||
+ ln -s ../proxmox-openid-rs ./build/proxmox-openid-rs
|
|
||||||
$(MAKE) BUILD_MODE=release -C build -f ../Makefile gen
|
|
||||||
mkdir -p ./build/pve-rs/Proxmox/Lib
|
|
||||||
mv ./build/Proxmox/Lib/PVE.pm ./build/pve-rs/Proxmox/Lib/PVE.pm
|
|
||||||
diff --git a/pmg-rs/Cargo.toml b/pmg-rs/Cargo.toml
|
|
||||||
index 903ed3b..165b377 100644
|
|
||||||
--- a/pmg-rs/Cargo.toml
|
|
||||||
+++ b/pmg-rs/Cargo.toml
|
|
||||||
@@ -30,12 +30,21 @@ serde_bytes = "0.11.3"
|
|
||||||
serde_json = "1.0"
|
|
||||||
url = "2"
|
|
||||||
|
|
||||||
-perlmod = { version = "0.13", features = [ "exporter" ] }
|
|
||||||
+#perlmod = { version = "0.13", features = [ "exporter" ] }
|
|
||||||
|
|
||||||
-proxmox-acme-rs = { version = "0.4", features = ["client"] }
|
|
||||||
-proxmox-apt = "0.9"
|
|
||||||
-proxmox-http = { version = "0.7", features = ["client-sync", "client-trait"] }
|
|
||||||
-proxmox-subscription = "0.3"
|
|
||||||
-proxmox-sys = "0.4"
|
|
||||||
-proxmox-tfa = { version = "2.1", features = ["api"] }
|
|
||||||
-proxmox-time = "1.1.3"
|
|
||||||
+#proxmox-acme-rs = { version = "0.4", features = ["client"] }
|
|
||||||
+#proxmox-apt = "0.9"
|
|
||||||
+#proxmox-http = { version = "0.7", features = ["client-sync", "client-trait"] }
|
|
||||||
+#proxmox-subscription = "0.3"
|
|
||||||
+#proxmox-sys = "0.4"
|
|
||||||
+#proxmox-tfa = { version = "2.1", features = ["api"] }
|
|
||||||
+#proxmox-time = "1.1.3"
|
|
||||||
+
|
|
||||||
+perlmod = { path = "../perlmod/perlmod" }
|
|
||||||
+proxmox-acme-rs = { features = ["client"], path = "../proxmox-acme-rs" }
|
|
||||||
+proxmox-apt = { path = "../proxmox-apt" }
|
|
||||||
+proxmox-http = { features = ["client-sync", "client-trait"], path = "../proxmox/proxmox-http" }
|
|
||||||
+proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
|
|
||||||
+proxmox-sys = { path = "../proxmox/proxmox-sys" }
|
|
||||||
+proxmox-tfa = { features = ["api"], path = "../proxmox/proxmox-tfa" }
|
|
||||||
+proxmox-time = { path = "../proxmox/proxmox-time" }
|
|
||||||
diff --git a/pmg-rs/debian/control b/pmg-rs/debian/control
|
|
||||||
index 5af088b..6a18690 100644
|
|
||||||
--- a/pmg-rs/debian/control
|
|
||||||
+++ b/pmg-rs/debian/control
|
|
||||||
@@ -2,35 +2,6 @@ Source: libpmg-rs-perl
|
|
||||||
Section: perl
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
|
||||||
-Build-Depends:
|
|
||||||
- debhelper (>= 12),
|
|
||||||
- dh-cargo (>= 24),
|
|
||||||
- cargo:native <!nocheck>,
|
|
||||||
- rustc:native <!nocheck>,
|
|
||||||
- libstd-rust-dev <!nocheck>,
|
|
||||||
- librust-anyhow-1+default-dev,
|
|
||||||
- librust-hex-0.4+default-dev,
|
|
||||||
- librust-http-0.2+default-dev (>= 0.2.7-~~),
|
|
||||||
- librust-libc-0.2+default-dev,
|
|
||||||
- librust-nix-0.24+default-dev,
|
|
||||||
- librust-openssl-0.10+default-dev (>= 0.10.40-~~),
|
|
||||||
- librust-perlmod-0.13+default-dev,
|
|
||||||
- librust-perlmod-0.13+exporter-dev,
|
|
||||||
- librust-proxmox-acme-rs-0.4+client-dev,
|
|
||||||
- librust-proxmox-acme-rs-0.4+default-dev,
|
|
||||||
- librust-proxmox-apt-0.9+default-dev,
|
|
||||||
- librust-proxmox-http-0.7+client-sync-dev,
|
|
||||||
- librust-proxmox-http-0.7+client-trait-dev,
|
|
||||||
- librust-proxmox-http-0.7+default-dev,
|
|
||||||
- librust-proxmox-subscription-0.3+default-dev,
|
|
||||||
- librust-proxmox-sys-0.4+default-dev,
|
|
||||||
- librust-proxmox-tfa-2+api-dev (>= 2.1-~~),
|
|
||||||
- librust-proxmox-tfa-2+default-dev (>= 2.1-~~),
|
|
||||||
- librust-proxmox-time-1+default-dev (>= 1.1.3-~~),
|
|
||||||
- librust-serde-1+default-dev,
|
|
||||||
- librust-serde-bytes-0.11+default-dev (>= 0.11.3-~~),
|
|
||||||
- librust-serde-json-1+default-dev,
|
|
||||||
- librust-url-2+default-dev,
|
|
||||||
Standards-Version: 4.3.0
|
|
||||||
Homepage: https://www.proxmox.com
|
|
||||||
|
|
||||||
diff --git a/pve-rs/Cargo.toml b/pve-rs/Cargo.toml
|
|
||||||
index 855c72d..1a982df 100644
|
|
||||||
--- a/pve-rs/Cargo.toml
|
|
||||||
+++ b/pve-rs/Cargo.toml
|
|
||||||
@@ -28,12 +28,22 @@ serde_bytes = "0.11"
|
|
||||||
serde_json = "1.0"
|
|
||||||
url = "2"
|
|
||||||
|
|
||||||
-perlmod = { version = "0.13", features = [ "exporter" ] }
|
|
||||||
+#perlmod = { version = "0.13", features = [ "exporter" ] }
|
|
||||||
+
|
|
||||||
+#proxmox-apt = "0.9"
|
|
||||||
+#proxmox-http = { version = "0.7", features = ["client-sync", "client-trait"] }
|
|
||||||
+#proxmox-openid = "0.9.5"
|
|
||||||
+#proxmox-subscription = "0.3"
|
|
||||||
+#proxmox-sys = "0.4"
|
|
||||||
+#proxmox-tfa = { version = "2.1", features = ["api"] }
|
|
||||||
+#proxmox-time = "1.1.3"
|
|
||||||
+
|
|
||||||
+perlmod = { path = "../perlmod/perlmod" }
|
|
||||||
+proxmox-apt = { path = "../proxmox-apt" }
|
|
||||||
+proxmox-http = { features = ["client-sync", "client-trait"], path = "../proxmox/proxmox-http" }
|
|
||||||
+proxmox-openid = { path = "../proxmox-openid-rs" }
|
|
||||||
+proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
|
|
||||||
+proxmox-sys = { path = "../proxmox/proxmox-sys" }
|
|
||||||
+proxmox-tfa = { features = [ "api" ], path = "../proxmox/proxmox-tfa" }
|
|
||||||
+proxmox-time = { path = "../proxmox/proxmox-time" }
|
|
||||||
|
|
||||||
-proxmox-apt = "0.9"
|
|
||||||
-proxmox-http = { version = "0.7", features = ["client-sync", "client-trait"] }
|
|
||||||
-proxmox-openid = "0.9.5"
|
|
||||||
-proxmox-subscription = "0.3"
|
|
||||||
-proxmox-sys = "0.4"
|
|
||||||
-proxmox-tfa = { version = "2.1", features = ["api"] }
|
|
||||||
-proxmox-time = "1.1.3"
|
|
||||||
diff --git a/pve-rs/debian/control b/pve-rs/debian/control
|
|
||||||
index a0c785b..4ca09ea 100644
|
|
||||||
--- a/pve-rs/debian/control
|
|
||||||
+++ b/pve-rs/debian/control
|
|
||||||
@@ -1,36 +1,6 @@
|
|
||||||
Source: libpve-rs-perl
|
|
||||||
Section: perl
|
|
||||||
Priority: optional
|
|
||||||
-Build-Depends:
|
|
||||||
- debhelper (>= 12),
|
|
||||||
- dh-cargo (>= 24),
|
|
||||||
- cargo:native <!nocheck>,
|
|
||||||
- rustc:native <!nocheck>,
|
|
||||||
- libstd-rust-dev <!nocheck>,
|
|
||||||
- librust-anyhow-1+default-dev,
|
|
||||||
- librust-base32-0.4+default-dev,
|
|
||||||
- librust-base64-0.13+default-dev,
|
|
||||||
- librust-hex-0.4+default-dev,
|
|
||||||
- librust-http-0.2+default-dev (>= 0.2.7-~~),
|
|
||||||
- librust-libc-0.2+default-dev,
|
|
||||||
- librust-nix-0.24+default-dev,
|
|
||||||
- librust-openssl-0.10+default-dev (>= 0.10.40-~~),
|
|
||||||
- librust-perlmod-0.13+default-dev,
|
|
||||||
- librust-perlmod-0.13+exporter-dev,
|
|
||||||
- librust-proxmox-apt-0.9+default-dev,
|
|
||||||
- librust-proxmox-http-0.7+client-sync-dev,
|
|
||||||
- librust-proxmox-http-0.7+client-trait-dev,
|
|
||||||
- librust-proxmox-http-0.7+default-dev,
|
|
||||||
- librust-proxmox-openid-0.9+default-dev (>= 0.9.5-~~),
|
|
||||||
- librust-proxmox-subscription-0.3+default-dev,
|
|
||||||
- librust-proxmox-sys-0.4+default-dev,
|
|
||||||
- librust-proxmox-tfa-2+api-dev (>= 2.1-~~),
|
|
||||||
- librust-proxmox-tfa-2+default-dev (>= 2.1-~~),
|
|
||||||
- librust-proxmox-time-1+default-dev (>= 1.1.3-~~),
|
|
||||||
- librust-serde-1+default-dev,
|
|
||||||
- librust-serde-bytes-0.11+default-dev,
|
|
||||||
- librust-serde-json-1+default-dev,
|
|
||||||
- librust-url-2+default-dev,
|
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
|
||||||
Standards-Version: 4.5.1
|
|
||||||
Vcs-Git: git://git.proxmox.com/git/proxmox-perl-rs.git
|
|
||||||
diff --git a/proxmox-apt/Cargo.toml b/proxmox-apt/Cargo.toml
|
|
||||||
index 1045070..a6e2834 100644
|
|
||||||
--- a/proxmox-apt/Cargo.toml
|
|
||||||
+++ b/proxmox-apt/Cargo.toml
|
|
||||||
@@ -25,4 +25,5 @@ rfc822-like = "0.2.1"
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
|
||||||
serde_json = "1.0.41"
|
|
||||||
|
|
||||||
-proxmox-schema = { version = "1", features = [ "api-macro" ] }
|
|
||||||
+#proxmox-schema = { version = "1", features = [ "api-macro" ] }
|
|
||||||
+proxmox-schema = { features = [ "api-macro" ], path = "../proxmox/proxmox-schema" }
|
|
||||||
diff --git a/proxmox-openid-rs/Cargo.toml b/proxmox-openid-rs/Cargo.toml
|
|
||||||
index e42f495..c6dbef7 100644
|
|
||||||
--- a/proxmox-openid-rs/Cargo.toml
|
|
||||||
+++ b/proxmox-openid-rs/Cargo.toml
|
|
||||||
@@ -25,5 +25,7 @@ ureq = { version = "2.4", default-features = false, features = ["native-tls", "g
|
|
||||||
native-tls = "0.2"
|
|
||||||
url = "2.1"
|
|
||||||
|
|
||||||
-proxmox-time = "1"
|
|
||||||
-proxmox-sys = { version = "0.4", features = ["timer"] }
|
|
||||||
+#proxmox-time = "1"
|
|
||||||
+#proxmox-sys = { version = "0.4", features = ["timer"] }
|
|
||||||
+proxmox-time = { path = "../proxmox/proxmox-time" }
|
|
||||||
+proxmox-sys = { features = ["timer"], path = "../proxmox/proxmox-sys" }
|
|
||||||
Reference in New Issue
Block a user