Fix bootc build: resolve rustup environment and install path conflicts
- 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:
parent
3b59e37d1c
commit
7685b8275b
1 changed files with 6 additions and 3 deletions
9
debian/rules
vendored
9
debian/rules
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue