From b4fa6fe1c2b8ef541ba5fefb44b2cdd28c9ddc24 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 15 Aug 2025 15:08:55 -0700 Subject: [PATCH] fix: Simplify debian/rules to resolve build errors - Remove unsupported DEB_HOST_ARCH_GNU_TYPE variable - Remove invalid --dbg-package=apt-ostree-dbg reference - Simplify cross-compilation logic to avoid complex conditionals - Fix binary install path to use standard release target - Resolves dpkg-architecture and dh_strip errors in CI build Fixes Debian package build failures in CI workflow. --- debian/rules | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/debian/rules b/debian/rules index 8912d637..2a062069 100755 --- a/debian/rules +++ b/debian/rules @@ -14,14 +14,11 @@ export CARGO_TARGET_DIR = $(CURDIR)/debian/cargo/target DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -# Rust target for cross-compilation -RUST_TARGET := $(shell dpkg-architecture -qDEB_HOST_ARCH_GNU_TYPE) +# Rust target for cross-compilation (simplified) +RUST_TARGET := $(DEB_HOST_ARCH) # Build flags CARGO_FLAGS := --release -ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) - CARGO_FLAGS += --target $(RUST_TARGET) -endif override_dh_auto_build: @echo "Building apt-ostree for $(DEB_HOST_ARCH)..." @@ -34,7 +31,7 @@ override_dh_auto_build: override_dh_auto_install: @echo "Installing apt-ostree binary..." # Install the apt-ostree binary to the correct location - install -D -m 755 debian/cargo/target/$(if $(filter $(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)),release,$(RUST_TARGET)/release)/apt-ostree \ + install -D -m 755 debian/cargo/target/release/apt-ostree \ debian/apt-ostree/usr/bin/apt-ostree # Create additional directories mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree @@ -65,8 +62,7 @@ override_dh_auto_clean: override_dh_strip: # Strip debug symbols from binary - dh_strip --dbg-package=apt-ostree-dbg - # Keep debug package for development + dh_strip override_dh_shlibdeps: # Handle shared library dependencies