Fix bootc build: resolve rustup environment and install path conflicts
Some checks failed
Build bootc Package / Build bootc Package (push) Successful in 5m26s
Test Build / Test bootc Build (with existing libostree) (push) Failing after 2m13s

- Add PATH export in debian/rules build step to ensure cargo finds rustup tools
- Fix binary install path to use debian/cargo/target/release/bootc (correct cargo target dir)
- Remove conflicting dh_auto_install call that was looking for wrong binary path
- Add manual package structure creation (usr/share/doc/bootc directory)
- Ensure rustup environment variables are set in workflow step for dpkg-buildpackage

This resolves the 'rustup could not choose a version of cargo' error and
the 'install: cannot stat target/release/bootc' error by properly handling
the CARGO_TARGET_DIR setting and avoiding conflicting install targets.

Build should now complete successfully from cargo compilation through
package creation and upload to Forgejo Debian Package Registry.
This commit is contained in:
robojerk 2025-07-21 23:11:35 +00:00
parent 3b59e37d1c
commit 7685b8275b

9
debian/rules vendored
View file

@ -17,14 +17,17 @@ override_dh_auto_patch:
dh_auto_patch
override_dh_auto_build:
# Build bootc with cargo
# Build bootc with cargo - ensure rustup environment is available
export PATH=$(HOME)/.cargo/bin:$$PATH
cargo build --release
dh_auto_build
override_dh_auto_install:
# Install the bootc binary
# Install the bootc binary to the correct location
install -D -m 755 debian/cargo/target/release/bootc debian/bootc/usr/bin/bootc
dh_auto_install
# Create any additional directories or files needed
mkdir -p debian/bootc/usr/share/doc/bootc
# Skip dh_auto_install since we've handled installation manually
override_dh_auto_clean:
# Clean cargo build artifacts