All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 1s
CI/CD Pipeline / Clippy Lints (push) Successful in 44s
CI/CD Pipeline / All Unit Tests (push) Successful in 1m12s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Enrollment Tests (push) Successful in 1m52s
CI/CD Pipeline / Verify Enrollment CLI Flag (push) Successful in 1m28s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 2m31s
CI/CD Pipeline / Build Arch Package (push) Successful in 2m47s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m46s
CI/CD Pipeline / Build RPM Package (push) Successful in 4m20s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m16s
Root cause: .apk-install is not a valid abuild suffix (lines 247-257 of abuild). abuild expects SEPARATE files: pkgname.pre-install, .post-install, .pre-deinstall, .post-deinstall. The old single .apk-install file caused abuild to die with "unknown install script suffix", but CI used || true which masked the failure, so APK was built WITHOUT install scripts. Verified on actual Alpine runner: install script suffixes now pass abuild validation. - configs/linux-patch-api.pre-install: create dirs, set permissions (matches Debian preinst) - configs/linux-patch-api.post-install: copy example configs, enable service (matches Debian postinst) - configs/linux-patch-api.pre-deinstall: stop and disable service (matches Debian prerm) - configs/linux-patch-api.post-deinstall: clean up empty dirs (matches Debian postrm) - Removed configs/linux-patch-api.apk-install (invalid format) - Updated build-alpine.sh: copy 4 install scripts to workspace, updated install= line in APKBUILD
20 lines
611 B
Bash
20 lines
611 B
Bash
#!/bin/sh
|
|
# Alpine Linux pre-install script for linux-patch-api
|
|
# Runs before package files are laid down
|
|
# Matches Debian preinst behavior: create directories, set permissions
|
|
|
|
# Create required directories
|
|
mkdir -p /etc/linux_patch_api/certs
|
|
mkdir -p /var/lib/linux_patch_api
|
|
mkdir -p /var/log/linux_patch_api
|
|
|
|
# Set proper ownership (service runs as root)
|
|
chown -R root:root /var/lib/linux_patch_api
|
|
chown -R root:root /var/log/linux_patch_api
|
|
|
|
# Set secure permissions
|
|
chmod 750 /etc/linux_patch_api
|
|
chmod 750 /etc/linux_patch_api/certs
|
|
chmod 755 /var/lib/linux_patch_api
|
|
chmod 755 /var/log/linux_patch_api
|