Some checks failed
CI/CD Pipeline / Code Format (push) Successful in 2s
CI/CD Pipeline / Clippy Lints (push) Successful in 44s
CI/CD Pipeline / All Unit Tests (push) Successful in 1m13s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Enrollment Tests (push) Successful in 1m29s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Failing after 5s
CI/CD Pipeline / Verify Enrollment CLI Flag (push) Successful in 1m6s
CI/CD Pipeline / Build Debian Package (push) Failing after 4s
CI/CD Pipeline / Build Arch Package (push) Successful in 2m20s
CI/CD Pipeline / Build RPM Package (push) Successful in 2m13s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m5s
The debian/rules override_dh_auto_build was sourcing $HOME/.cargo/env which fails under sudo where HOME=/root while cargo is at /home/runner/.cargo/. The CI workflow already passes PATH via "sudo env PATH=$PATH", so cargo is in PATH without sourcing. Co-authored-by: git-echo <git-echo@moon-dragon.us>
35 lines
1.2 KiB
Makefile
35 lines
1.2 KiB
Makefile
#!/usr/bin/make -f
|
|
# debian/rules for linux-patch-api
|
|
|
|
export DEB_CARGO_PACKAGE=linux-patch-api
|
|
export DEB_CARGO_BUILD_FLAGS=--release
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
cargo build --release --target x86_64-unknown-linux-gnu
|
|
|
|
override_dh_auto_install:
|
|
dh_auto_install
|
|
# Create installation directories in debian/tmp
|
|
mkdir -p debian/tmp/usr/bin
|
|
mkdir -p debian/tmp/etc/linux_patch_api
|
|
mkdir -p debian/tmp/lib/systemd/system
|
|
mkdir -p debian/tmp/var/log/linux_patch_api
|
|
mkdir -p debian/tmp/var/lib/linux_patch_api
|
|
# Install binary
|
|
install -D -m 755 target/x86_64-unknown-linux-gnu/release/linux-patch-api debian/tmp/usr/bin/linux-patch-api
|
|
# Install systemd service
|
|
install -D -m 644 configs/linux-patch-api.service debian/tmp/lib/systemd/system/linux-patch-api.service
|
|
# Install default configs
|
|
install -D -m 644 configs/config.yaml.example debian/tmp/etc/linux_patch_api/config.yaml
|
|
install -D -m 644 configs/whitelist.yaml.example debian/tmp/etc/linux_patch_api/whitelist.yaml
|
|
# Install CA certificates
|
|
install -d -m 755 debian/tmp/etc/linux_patch_api/certs
|
|
cp configs/certs/ca.pem debian/tmp/etc/linux_patch_api/certs/ 2>/dev/null || true
|
|
|
|
override_dh_auto_test:
|
|
# Skip tests during package build (tests run in CI test job)
|
|
true
|