From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6E6351FF146 for ; Tue, 23 Jun 2026 15:04:09 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D78F73572A; Tue, 23 Jun 2026 15:04:07 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH installer v2] buildsys: add static version of proxmox-auto-install-assistant Date: Tue, 23 Jun 2026 15:00:03 +0200 Message-ID: <20260623130321.1425355-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782219799794 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.077 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com,architecture.mk,spice-vdagent.sh,default.mk] Message-ID-Hash: KW6K655DGN6EWWURAHKHRUXSHQMWLI5H X-Message-ID-Hash: KW6K655DGN6EWWURAHKHRUXSHQMWLI5H X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This adds a separate debian package to the build, containing a statically-built version of `proxmox-auto-install-assistant`, as was suggested by Thomas. Similar how we ship a static variant of proxmox-backup-client. The binary is placed at /usr/bin/proxmox-auto-install-assistant-static, with a symlink to it at /usr/bin/proxmox-auto-install-assistant. Signed-off-by: Christoph Heiss --- Decided to pick this up again, as it recently came up in a discussion. lintian reports `shared-library-lacks-prerequisites` [0] for the resulting package, which seems rather irrelevant (or even bogus) in our case - thus the override. v1: https://lore.proxmox.com/pve-devel/20240816161942.2044889-1-c.heiss@proxmox.com/ Changes v1 -> v2: * rebased on latest master [0] https://lintian.debian.org/tags/shared-library-lacks-prerequisites Makefile | 21 +++++++++++++++++-- debian/control | 10 +++++++++ ...xmox-auto-install-assistant-static.install | 1 + ...roxmox-auto-install-assistant-static.links | 1 + ...install-assistant-static.lintian-overrides | 1 + 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 debian/proxmox-auto-install-assistant-static.install create mode 100644 debian/proxmox-auto-install-assistant-static.links create mode 100644 debian/proxmox-auto-install-assistant-static.lintian-overrides diff --git a/Makefile b/Makefile index bb5dc86..f7c25ec 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ include /usr/share/dpkg/default.mk +include /usr/share/rustc/architecture.mk PACKAGE = proxmox-installer BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) @@ -6,17 +7,26 @@ BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb ASSISTANT_DEB=proxmox-auto-install-assistant_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb FIRST_BOOT_DEB=proxmox-first-boot_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb +ASSISTANT_STATIC_DEB=proxmox-auto-install-assistant-static_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb -ALL_DEBS = $(DEB) $(ASSISTANT_DEB) $(FIRST_BOOT_DEB) +ALL_DEBS = $(DEB) $(ASSISTANT_DEB) $(FIRST_BOOT_DEB) $(ASSISTANT_STATIC_DEB) DSC=$(PACKAGE)_$(DEB_VERSION).dsc CARGO ?= cargo + +CARGO_STATIC_TARGET_DIR := target/static +CARGO_STATIC_RUSTC_FLAGS := -C target-feature=+crt-static +CARGO_STATIC_BUILD_ARGS += --target $(DEB_HOST_RUST_TYPE) --target-dir $(CARGO_STATIC_TARGET_DIR) + ifeq ($(BUILD_MODE), release) CARGO_BUILD_ARGS += --release CARGO_COMPILEDIR := target/release +CARGO_STATIC_BUILD_ARGS += --release +CARGO_STATIC_COMPILEDIR := $(CARGO_STATIC_TARGET_DIR)/$(DEB_HOST_RUST_TYPE)/release else CARGO_COMPILEDIR := target/debug +CARGO_STATIC_COMPILEDIR := $(CARGO_STATIC_TARGET_DIR)/$(DEB_HOST_RUST_TYPE)/debug endif INSTALLER_SOURCES=$(shell git ls-files) locale-info.json @@ -83,6 +93,7 @@ tidy: deb: $(DEB) $(ASSISTANT_DEB): $(DEB) +$(ASSISTANT_STATIC_DEB): $(DEB) $(FIRST_BOOT_DEB): $(DEB) $(DEB): $(BUILDDIR) cd $(BUILDDIR); dpkg-buildpackage -b -us -uc @@ -122,7 +133,7 @@ VARLIBDIR=$(DESTDIR)/var/lib/proxmox-installer HTMLDIR=$(VARLIBDIR)/html/common .PHONY: install -install: $(INSTALLER_SOURCES) $(COMPILED_BINS) +install: $(INSTALLER_SOURCES) $(COMPILED_BINS) auto-install-assistant-static $(MAKE) -C banner install $(MAKE) -C Proxmox install $(MAKE) -C proxmox-first-boot install @@ -134,6 +145,7 @@ install: $(INSTALLER_SOURCES) $(COMPILED_BINS) install -D -m 755 proxinstall $(DESTDIR)/usr/bin/proxinstall install -D -m 755 proxmox-low-level-installer $(DESTDIR)/$(BINDIR)/proxmox-low-level-installer $(foreach i,$(USR_BIN), install -m755 $(CARGO_COMPILEDIR)/$(i) $(DESTDIR)$(BINDIR)/ ;) + install -D -m 755 $(CARGO_STATIC_COMPILEDIR)/proxmox-auto-install-assistant $(DESTDIR)$(BINDIR)/proxmox-auto-install-assistant-static install -D -m 755 checktime $(DESTDIR)/usr/bin/checktime install -D -m 644 xinitrc $(DESTDIR)/.xinitrc install -D -m 755 spice-vdagent.sh $(DESTDIR)/.spice-vdagent.sh @@ -150,6 +162,11 @@ cargo-build: --package proxmox-post-hook --bin proxmox-post-hook \ $(CARGO_BUILD_ARGS) +.PHONY: auto-install-assistant-static +auto-install-assistant-static: + RUSTFLAGS="$(CARGO_STATIC_RUSTC_FLAGS)" \ + $(CARGO) build --package proxmox-auto-install-assistant $(CARGO_STATIC_BUILD_ARGS) + %-banner.png: %-banner.svg rsvg-convert -o $@ $< diff --git a/debian/control b/debian/control index 7565c2a..95f695f 100644 --- a/debian/control +++ b/debian/control @@ -77,6 +77,16 @@ Description: Assistant to help with automated installations installation of a Proxmox project, and preparing a official ISO image to use this answer file. +Package: proxmox-auto-install-assistant-static +Architecture: any +Recommends: xorriso, ${misc:Depends}, +Conflicts: proxmox-auto-install-assistant +Provides: proxmox-auto-install-assistant +Description: Assistant to help with automated installations - static build + Provides a helper that can assist with creating an answer file for a automated + installation of a Proxmox project, and preparing a official ISO image to use + this answer file. + Package: proxmox-first-boot Architecture: any Depends: ${misc:Depends}, ${perl:Depends}, diff --git a/debian/proxmox-auto-install-assistant-static.install b/debian/proxmox-auto-install-assistant-static.install new file mode 100644 index 0000000..abd2c64 --- /dev/null +++ b/debian/proxmox-auto-install-assistant-static.install @@ -0,0 +1 @@ +usr/bin/proxmox-auto-install-assistant-static diff --git a/debian/proxmox-auto-install-assistant-static.links b/debian/proxmox-auto-install-assistant-static.links new file mode 100644 index 0000000..28e003c --- /dev/null +++ b/debian/proxmox-auto-install-assistant-static.links @@ -0,0 +1 @@ +usr/bin/proxmox-auto-install-assistant-static usr/bin/proxmox-auto-install-assistant diff --git a/debian/proxmox-auto-install-assistant-static.lintian-overrides b/debian/proxmox-auto-install-assistant-static.lintian-overrides new file mode 100644 index 0000000..85efadd --- /dev/null +++ b/debian/proxmox-auto-install-assistant-static.lintian-overrides @@ -0,0 +1 @@ +proxmox-auto-install-assistant-static: shared-library-lacks-prerequisites [usr/bin/proxmox-auto-install-assistant-static] -- 2.54.0