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.
This commit is contained in:
parent
089fbdddf9
commit
b4fa6fe1c2
1 changed files with 4 additions and 8 deletions
12
debian/rules
vendored
12
debian/rules
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue