all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v5 proxmox-backup 2/6] build: always set --target
Date: Wed,  9 Apr 2025 13:05:16 +0200	[thread overview]
Message-ID: <20250409110520.170697-3-c.ebner@proxmox.com> (raw)
In-Reply-To: <20250409110520.170697-1-c.ebner@proxmox.com>

since it affects whether cargo puts build artifacts directly into
target/debug (or target/release) or into a target-specific
sub-directory.

the package build will always pass `--target $(DEB_HOST_RUST_TYPE)`,
since it invokes the cargo wrapper in /usr/share/cargo/bin/cargo, so
this change unifies the behaviour across plain `make` and `make
deb`.

direct calls to `cargo build/test/..` will still work as before.

Originally-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
changes since version 4:
- not present in previous version

 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index dfbaacab4..dc6aa72fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
 include /usr/share/dpkg/default.mk
+include /usr/share/rustc/architecture.mk
 include defines.mk
 
 PACKAGE := proxmox-backup
 ARCH := $(DEB_BUILD_ARCH)
+export DEB_HOST_RUST_TYPE
 
 SUBDIRS := etc www docs templates
 
@@ -37,9 +39,10 @@ SUBCRATES != cargo metadata --no-deps --format-version=1 \
 	| sed -e "s!.*$$PWD/!!g" -e 's/\#.*$$//g' -e 's/)$$//g'
 
 ifeq ($(BUILD_MODE), release)
-CARGO_BUILD_ARGS += --release
+CARGO_BUILD_ARGS += --release --target $(DEB_HOST_RUST_TYPE)
 COMPILEDIR := target/$(DEB_HOST_RUST_TYPE)/release
 else
+CARGO_BUILD_ARGS += --target $(DEB_HOST_RUST_TYPE)
 COMPILEDIR := target/$(DEB_HOST_RUST_TYPE)/debug
 endif
 
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

  parent reply	other threads:[~2025-04-09 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 11:05 [pbs-devel] [PATCH v5 proxmox proxmox-backup 0/6] fix 4788: statically linked proxmox-backup-client Christian Ebner
2025-04-09 11:05 ` [pbs-devel] [PATCH v5 proxmox 1/6] http: client: make https connector generic over resolver Christian Ebner
2025-04-09 11:05 ` Christian Ebner [this message]
2025-04-09 11:05 ` [pbs-devel] [PATCH v5 proxmox-backup 3/6] fix: 4788: Makefile: target for statically linked client binary Christian Ebner
2025-04-09 11:05 ` [pbs-devel] [PATCH v5 proxmox-backup 4/6] buildsys: build and package " Christian Ebner
2025-04-09 11:05 ` [pbs-devel] [PATCH v5 proxmox-backup 5/6] client: http: Use custom resolver for statically linked binary Christian Ebner
2025-04-09 11:05 ` [pbs-devel] [PATCH v5 proxmox-backup 6/6] docs: mention different name resolution " Christian Ebner
2025-04-09 13:32 ` [pbs-devel] applied-series: [PATCH v5 proxmox proxmox-backup 0/6] fix 4788: statically linked proxmox-backup-client Fabian Grünbichler

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=20250409110520.170697-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal