Skip to content

Commit 1f90343

Browse files
committed
Fix proxmox-backup-client-static compilation
1 parent af93dad commit 1f90343

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

dockerfiles/Dockerfile.client

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN /scripts/strip-cargo.bash
4040
RUN /scripts/resolve-dependencies.bash
4141

4242
# Build
43-
RUN make -C proxmox-backup proxmox-backup-client-static BUILD_MODE=release COMPILEDIR=target/static/release
43+
RUN make -C proxmox-backup proxmox-backup-client-static BUILD_MODE=release COMPILEDIR=target/static/release CARGO_STATIC_CONFIG=
4444

4545
# Bundle client
4646
ARG VERSION
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/debian/rules b/debian/rules
2+
index 8bc4971b..523fd014 100755
3+
--- a/debian/rules
4+
+++ b/debian/rules
5+
@@ -40,7 +40,7 @@ override_dh_auto_configure:
6+
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
7+
#$(CARGO) prepare-debian --help $(CURDIR)/debian/cargo_registry --link-from-system
8+
# add a new config for static building, sync with Makefile!
9+
- cp debian/cargo_home/config.toml debian/cargo_home/config.static.toml
10+
+ cp $(CARGO_HOME)/config.toml debian/cargo_home/config.static.toml
11+
sed -ri -e 's!^(rustflags = .*)\]$$!\1, "-C", "target-feature=+crt-static", "-L", "$(STATIC_COMPILEDIR)/deps-stubs/"\]!' debian/cargo_home/config.static.toml
12+
# `cargo build` and `cargo install` have different config precedence, symlink
13+
# the wrapper config into a place where `build` picks it up as well..

0 commit comments

Comments
 (0)