From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v4 proxmox-backup 2/5] fix: 4788: Makefile: target for statically linked client binary
Date: Tue, 8 Apr 2025 17:04:15 +0200 [thread overview]
Message-ID: <20250408150418.292311-3-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250408150418.292311-1-c.ebner@proxmox.com>
Adds the build target including workarounds to generate a statically
linked version of the proxmox-backup-client binary.
Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=4788
Suggested-by: Christoph Heiss <c.heiss@proxmox.com>
Originally-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
---
changes since version 3:
- no changes
Makefile | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index dfbaacab4..00e7f7401 100644
--- a/Makefile
+++ b/Makefile
@@ -227,3 +227,12 @@ upload: $(SERVER_DEB) $(CLIENT_DEB) $(RESTORE_DEB) $(DOC_DEB)
| ssh -X repoman@repo.proxmox.com upload --product pbs --dist $(UPLOAD_DIST)
tar cf - $(CLIENT_DEB) $(CLIENT_DBG_DEB) | ssh -X repoman@repo.proxmox.com upload --product "pve,pmg,pbs-client" --dist $(UPLOAD_DIST)
tar cf - $(RESTORE_DEB) $(RESTORE_DBG_DEB) | ssh -X repoman@repo.proxmox.com upload --product "pve" --dist $(UPLOAD_DIST)
+
+.PHONY: proxmox-backup-client-static
+proxmox-backup-client-static:
+ mkdir -p target/release/deps/ && \
+ echo '!<arch>' > target/release/deps/libsystemd.a # workaround for to greedy linkage and proxmox-systemd
+ RUSTFLAGS='-C target-feature=+crt-static -C strip=debuginfo' \
+ $(CARGO) build $(CARGO_BUILD_ARGS) \
+ --package proxmox-backup-client --bin proxmox-backup-client \
+ --target x86_64-unknown-linux-gnu
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-04-08 15:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 15:04 [pbs-devel] [PATCH v4 proxmox proxmox-backup 0/5] fix 4788: statically linked proxmox-backup-client Christian Ebner
2025-04-08 15:04 ` [pbs-devel] [PATCH v4 proxmox 1/5] http: client: make https connector generic over resolver Christian Ebner
2025-04-08 15:04 ` Christian Ebner [this message]
2025-04-08 15:04 ` [pbs-devel] [PATCH v4 proxmox-backup 3/5] Makefile: switch path based on build mode and target Christian Ebner
2025-04-08 15:04 ` [pbs-devel] [PATCH v4 proxmox-backup 4/5] client: http: Use custom resolver for statically linked binary Christian Ebner
2025-04-08 15:04 ` [pbs-devel] [PATCH v4 proxmox-backup 5/5] docs: mention different name resolution " Christian Ebner
2025-04-09 11:12 ` [pbs-devel] superseded: [PATCH v4 proxmox proxmox-backup 0/5] fix 4788: statically linked proxmox-backup-client Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250408150418.292311-3-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal