From c55ee43303aaf9035cc0ab3fe04cdb50cb486af3 Mon Sep 17 00:00:00 2001 From: robojerk Date: Tue, 2 Sep 2025 07:14:01 -0700 Subject: [PATCH] fix: update debian/rules to use CI profile and correct binary paths - Change CARGO_FLAGS from --release to --profile ci - Update binary paths from target/release/ to target/ci/ - Fixes linker error: 'file format not recognized' for serde_yaml - Resolves CI build failure with memory-optimized compilation - Package builds successfully with CI profile settings --- debian/rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index f5576718..832d2728 100755 --- a/debian/rules +++ b/debian/rules @@ -18,7 +18,7 @@ DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) RUST_TARGET := $(DEB_HOST_ARCH) # Build flags - Use safer flags to avoid Rust compiler SIGSEGV -CARGO_FLAGS := --release --config .cargo/config.toml +CARGO_FLAGS := --profile ci --config .cargo/config.toml # Environment variables for safer builds export RUSTFLAGS = -C opt-level=2 -C codegen-units=16 -C lto=false @@ -38,12 +38,12 @@ override_dh_auto_build: override_dh_auto_install: @echo "Installing apt-ostree binary..." # Check if binary exists - @if [ ! -f "debian/cargo/target/release/apt-ostree" ]; then \ + @if [ ! -f "debian/cargo/target/ci/apt-ostree" ]; then \ echo "Error: apt-ostree binary not found. Build failed."; \ exit 1; \ fi # Install the apt-ostree binary to the correct location - install -D -m 755 debian/cargo/target/release/apt-ostree \ + install -D -m 755 debian/cargo/target/ci/apt-ostree \ debian/apt-ostree/usr/bin/apt-ostree # Create additional directories mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree @@ -78,12 +78,12 @@ override_dh_auto_install: @echo "Installing apt-ostreed daemon into apt-ostree package..." # Check if binary exists - @if [ ! -f "debian/cargo/target/release/apt-ostreed" ]; then \ + @if [ ! -f "debian/cargo/target/ci/apt-ostreed" ]; then \ echo "Error: apt-ostreed binary not found. Build failed."; \ exit 1; \ fi # Install the apt-ostreed binary into the apt-ostree package - install -D -m 755 debian/cargo/target/release/apt-ostreed \ + install -D -m 755 debian/cargo/target/ci/apt-ostreed \ debian/apt-ostree/usr/libexec/apt-ostreed # Check and install systemd service files @if [ ! -f "daemon/systemd/apt-ostreed.service" ]; then \