Skip to content

Commit b896f28

Browse files
committed
Compile proxmox-backup-client as static lib
1 parent d714772 commit b896f28

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

scripts/bundle-client.bash

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
DESTDIR=/
44
NAME=proxmox-backup-client-$VERSION
5-
BINARIES=( /src/proxmox-backup/target/release/{dump-catalog-shell-cli,pxar,proxmox-backup-client} )
5+
BINARIES=( /src/proxmox-backup/target/static-build/*/release/{pxar,proxmox-backup-client} )
66

77
mkdir -p "$DESTDIR/$NAME" "$DESTDIR/$NAME/lib"
88

99
cp -v ${BINARIES[@]} "$DESTDIR/$NAME"
10-
ldd ${BINARIES[@]} | grep "=> /" | awk '{print $3}' | sort -u | xargs -I '{}' cp -v '{}' "$DESTDIR/$NAME/lib"
11-
cp /lib/ld-linux*.so* "$DESTDIR/$NAME/lib"
12-
1310
cp -v /scripts/client/* "$DESTDIR/$NAME"
1411

1512
cd $DESTDIR

scripts/client/proxmox-backup-client.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33
SCRIPT_PATH=$(readlink -f "$0")
44
SCRIPT_DIR=$(dirname "$SCRIPT_PATH")
5-
SCRIPT_LIB="$SCRIPT_DIR/lib"
65

7-
exec "$SCRIPT_LIB"/ld-linux-* --library-path "$SCRIPT_LIB" "$SCRIPT_DIR/proxmox-backup-client" "$@"
6+
exec "$SCRIPT_DIR/proxmox-backup-client" "$@"

versions/v3.4.1/Dockerfile.client

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ RUN /scripts/experimental-cargo.bash
4242
RUN /scripts/resolve-dependencies.bash
4343

4444
# Build
45-
RUN \
46-
. /root/.cargo/env; \
47-
cargo build --manifest-path proxmox-backup/proxmox-backup-client/Cargo.toml --release && \
48-
cargo build --manifest-path proxmox-backup/pxar-bin/Cargo.toml --release
45+
RUN make -C proxmox-backup proxmox-backup-client-static BUILD_MODE=release COMPILEDIR=target/static/release
4946

5047
# Bundle client
5148
RUN /scripts/bundle-client.bash

0 commit comments

Comments
 (0)