Private
Public Access
1
0

49 Commits

Author SHA1 Message Date
80f8f4fed2 merge: PR #8 - fix Alpine abuild key generation
- Force HOME=/root in build-alpine.sh for consistent key location
- Use find instead of ls for key discovery (handles dash-prefixed filenames)
- Search multiple paths for generated keys
- Copy keys from KEY_DIR to builduser home directory
- Set env.HOME=/root in Alpine container spec
- Remove separate abuild-keygen step (handled by build-alpine.sh)
- Add error exit if no signing key found

Co-authored-by: git-echo <git-echo@moon-dragon.us>
2026-05-31 16:13:49 -05:00
2f73237fd6 fix: Alpine build - truncated YAML and wrong abuild output path
Root causes of ALL Alpine build failures:
1. ci.yml: Verify Alpine package step was TRUNCATED at line 339 -
   missing closing quote, then clause, fi, and entire upload step.
   This caused YAML parse failure every run.
2. build-alpine.sh: Copy path was /home/builduser/packages/home/x86_64/
   but abuild outputs to /home/builduser/packages/builduser/x86_64/.
   The find fallback caught stale packages from previous builds.

Fixes:
- Complete the Verify Alpine package step with proper if/fi
- Add Upload to Gitea Release step for Alpine (was completely missing)
- Fix abuild output path in build-alpine.sh
2026-05-27 22:01:19 -05:00
904654212f fix: remove all Alpine cleanup steps that broke abuild
- Revert build-alpine.sh to original (no cleanup lines)
- Remove CI Alpine cleanup step entirely
- Keep version verification and exact version upload in CI
- The original build worked fine without cleanup; stale packages
  are caught by version verification
2026-05-27 20:44:16 -05:00
1fb9962c22 fix: remove mkdir -p from Alpine cleanup that broke abuild
- Remove mkdir -p /home/builduser/packages/home/x86_64/ that was creating
  root-owned directories that abuild (running as builduser) couldnt write to
- Keep targeted rm -f of stale .apk files only
- abuild creates its own output directories with correct ownership
2026-05-27 20:42:48 -05:00
f1602fde4c fix: preserve abuild directory structure in Alpine cleanup
- Replace aggressive rm -rf /home/builduser/packages/ with targeted rm -f of stale .apk files
- Add mkdir -p to ensure abuild output directory exists before build
- Fixes Alpine CI build failure caused by removing required directory structure
2026-05-27 20:21:23 -05:00
0ffdb0eb2d fix: correct Alpine version bug and add Ubuntu 24.04 package suffix
- Alpine: clean entire /home/builduser/packages/ before abuild (not just releases/)
- Alpine: add version verification step to CI (like RPM already has)
- Alpine: upload uses exact version match instead of head -1
- Debian: add u2404 suffix to build-deb output filename
- Remove duplicate 1.1.12 entry from debian/changelog
2026-05-27 19:58:35 -05:00
5a6165a7fe fix: remove stale build artifacts from releases/ and add cleanup to Alpine build
- Add /releases/ to .gitignore to prevent tracking build artifacts
- Remove old 1.0.0 .deb files from git tracking
- Add stale .apk cleanup to build-alpine.sh (matching build-arch.sh)
- Add cleanup step to CI Alpine workflow to remove stale packages

Fixes Alpine package version mismatch caused by old artifacts in releases/
2026-05-27 17:02:32 -05:00
b8900d1eae fix: Alpine install scripts - use separate files with valid abuild suffixes
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
2026-05-20 12:43:37 +00:00
63b0bfce34 fix: align all non-Ubuntu packages with Debian baseline behavior
- Arch: remove system user creation, root:root ownership, fix $startdir path in PKGBUILD
- RPM: uncomment BuildRequires, add runtime deps (openssl-libs, ca-certificates), remove system user, root:root ownership
- Alpine: remove system user creation, root:root ownership, co-locate install script with APKBUILD
- All platforms now match Debian: no system user, root:root, create dirs, copy example configs, enable service
2026-05-20 02:01:52 +00:00
b6809dc935 fix: FQDN resolution and display_name blank bug; fix: Arch/Alpine/RPM packages
Bug fixes:
- get_fqdn() now prioritizes 'hostname -f' (returns full FQDN) over /etc/hostname (returns short hostname)
- Added get_hostname() for short hostname extraction
- Added hostname field to EnrollmentRequest for manager display_name population
- Updated SPEC.md and API_DOCUMENTATION.md

Package fixes:
- Arch: Added linux-patch-api.install with post_install/upgrade/remove hooks, user creation, directory creation, config handling
- Alpine: Added linux-patch-api.apk-install with pre/post install/deinstall hooks, user creation, directory creation, config handling, missing config.yaml.example
- RPM: Dynamic version from Cargo.toml, %ghost %config(noreplace) for live configs, tarball exclusions, /var/log in %files
2026-05-18 23:51:00 +00:00
48fb8752c9 feat(enrollment): add route-based IP selection and fix package versioning for v1.1.5 2026-05-18 03:35:46 +00:00
4f2c68bad2 fix: properly commit build fixes that were never in 0984684
CRITICAL: Previous commit 0984684 did not include these fixes.

Debian (debian/rules):
- Use && to keep cargo build in same shell as . "$HOME/.cargo/env"
- Make runs each recipe line in a separate shell

Arch (build-arch.sh):
- Use << "EOF" heredoc with hardcoded path to prevent $pkgdir expansion
- $pkgdir must be literal for makepkg to expand at runtime

Alpine (build-alpine.sh):
- Copy signing public key to /etc/apk/keys/ BEFORE abuild
- Use || true on abuild because index update may fail but APK is still created
2026-04-27 01:52:56 +00:00
09846848c6 fix: resolve final build failures
debian/rules: Escape $HOME for make (use $$HOME)
  - Make interprets $H as variable, $$ escapes it

build-alpine.sh: Install signing public key
  - Copy .abuild/*.rsa.pub to /etc/apk/keys/
  - Fixes UNTRUSTED signature error on index update

build-arch.sh: Use /home/builduser/repo for all paths
  - PKGDIR=/home/builduser/repo/arch-package
  - WORKSPACE_DIR=/home/builduser/repo
  - Fixes permission denied on act cache path
2026-04-27 01:06:56 +00:00
9cb48a01eb fix: resolve remaining build failures
debian/rules: Source cargo env before calling cargo
  - Add `. "$HOME/.cargo/env"` to override_dh_auto_build

build-alpine.sh: Use /home/builduser for all paths
  - PKGDIR=/home/builduser/apk-package (accessible by builduser)
  - WORKSPACE_DIR=/home/builduser (for APKBUILD package function)
  - Removed duplicate else line

build-arch.sh: Copy repo to accessible directory
  - Copy repo contents to /home/builduser/repo before makepkg
  - Run makepkg in /home/builduser/repo (not act cache path)
2026-04-27 00:57:03 +00:00
3723d97427 fix: resolve all build job failures
CI workflow (ci.yml):
- Proper YAML structure for all steps
- curl+tar checkout (act runners lack git)
- GITEATOKEN authentication for private repo access
- build-essential/gcc added to all jobs
- dpkg-buildpackage -d flag (skip apt dep check)

Build scripts:
- build-alpine.sh: Copy APKBUILD to /home/builduser before abuild
- build-arch.sh: Use REPO_DIR variable instead of $(pwd) in su commands
2026-04-27 00:37:51 +00:00
3326fa4445 fix: resolve all 4 build job failures
Debian: Add -d flag to dpkg-buildpackage (skip dep check,
rustup installed Rust not apt)

RPM/Arch: Fix missing run: | YAML syntax in dependency steps

Alpine: Fix abuild working directory - use /home/builduser
explicitly instead of $(pwd) which referenced act cache path
2026-04-27 00:19:32 +00:00
d6748fa261 refactor: update CI for native per-OS runners
- Replace generic "linux" runner label with dedicated per-OS labels
  (ubuntu-24.04, fedora, alpine, arch)
- Remove all container declarations (native runner execution)
- Add build gate dependencies: build jobs need fmt+clippy+test
- Extract release upload logic into reusable scripts/upload-release.sh
- Fix build-alpine.sh: remove hardcoded container paths, add
  SKIP_CARGO_BUILD support
- Fix build-arch.sh: remove hardcoded container paths, add
  SKIP_CARGO_BUILD support
- Fix build-rpm.sh: remove sudo, native runner compatible
- Remove Dockerfile.rpm and Dockerfile.arch (no longer needed)
- Add sudo to Ubuntu/Fedora/Arch package installs for safety
- Add nodejs to Alpine deps for Gitea Actions compatibility
- Make upload-release.sh POSIX sh compatible (Alpine)
- Fix curl -sf to curl -s in upload-release.sh (404 on new releases)
2026-04-26 19:21:09 +00:00
42b36ad319 fix: Restore execute permission 2026-04-14 12:34:25 +00:00
e351e4e30c fix: Copy APK directly after build instead of using abuild repo (APK built successfully!) 2026-04-14 12:34:01 +00:00
710ee85c3e fix: Restore execute permission on build-alpine.sh 2026-04-14 11:48:49 +00:00
5665be0d6d fix: Create directory structure in APKBUILD package() function 2026-04-14 11:48:39 +00:00
0b38f54a5d fix: Restore execute permission on build-alpine.sh 2026-04-14 04:03:30 +00:00
bb305ba74a fix: Use -d flag for abuild dependency disable instead of -G 2026-04-14 04:03:17 +00:00
8df45476a3 fix: Restore execute permission on build-alpine.sh 2026-04-14 03:53:08 +00:00
0beacdfbd2 fix: Use ABUILD_NODEPENDS=1 to skip makedepends installation 2026-04-14 03:52:55 +00:00
53155eeb2e fix: Restore execute permission on build-alpine.sh 2026-04-14 03:36:25 +00:00
488894357a fix: Add builduser to abuild group (required for apk install permissions) 2026-04-14 03:36:18 +00:00
33a31e349f fix: Restore execute permission on build-alpine.sh 2026-04-14 03:26:23 +00:00
cf6c15b0fc fix: Write PACKAGER_PRIVKEY to builduser's ~/.abuild/abuild.conf (standard abuild behavior) 2026-04-14 03:26:11 +00:00
a53819b996 fix: Restore execute permission on build-alpine.sh 2026-04-14 03:13:44 +00:00
097e44bace fix: ALWAYS generate abuild keys (remove conditional - stale /etc/abuild.conf causes skip) 2026-04-14 03:13:30 +00:00
8f2d1972f7 fix: Restore execute permission on build-alpine.sh 2026-04-14 03:12:50 +00:00
0886ba248a fix: Export PACKAGER_PRIVKEY with proper variable expansion 2026-04-14 03:12:07 +00:00
53ceca729a fix: Restore execute permission on build-alpine.sh 2026-04-14 02:52:06 +00:00
637683e6d0 fix: Move abuild-keygen inside build-alpine.sh for same-shell key persistence 2026-04-14 02:52:00 +00:00
738fee0717 fix: Restore execute permission on build-alpine.sh 2026-04-14 01:30:30 +00:00
e9f47e4ed5 fix: Copy abuild keys to builduser home directory 2026-04-14 01:30:25 +00:00
9835ea2aa0 fix: Restore execute permission on build-alpine.sh (git stripped it again) 2026-04-14 01:15:53 +00:00
45ce4c435f fix: Remove duplicate closing brace in APKBUILD package() 2026-04-14 01:15:47 +00:00
20760b139e fix: Restore execute permission on build-alpine.sh 2026-04-14 00:28:03 +00:00
3799c3c051 fix: Remove apk-package from APKBUILD sources (directory not file) 2026-04-14 00:19:54 +00:00
ef34786c11 Fix: Use non-root builduser for abuild in CI container 2026-04-14 00:05:14 +00:00
ed055b3b44 Fix: Add abuild checksum generation for APKBUILD validation 2026-04-13 23:54:25 +00:00
f8153d0b01 Fix: Source cargo env in build-alpine.sh for rustup toolchain 2026-04-13 22:22:48 +00:00
d92f0f3ffd Fix: Restore execute permission on build-alpine.sh 2026-04-13 21:20:37 +00:00
4037c49712 Fix: Change shebang to #!/bin/sh for Alpine compatibility 2026-04-13 21:20:31 +00:00
ed05364bbf Restore execute permission on build-alpine.sh
- File lost execute bit during patch operation
- Required for CI to run the build script
2026-04-13 21:08:40 +00:00
78f8882663 Add Alpine/OpenRC compatibility for init system support
- Updated SPEC.md: Changed systemd requirements to distribution-dependent init system
- Updated ARCHITECTURE.md: Added OpenRC hardening options and init script locations
- Updated build-alpine.sh: Replaced systemd-dev with openrc, use /etc/init.d
- Created configs/linux-patch-api-openrc: Full OpenRC init script
- Added Dockerfile.rpm for RPM build container

Init system support:
- systemd: Debian, Ubuntu, RHEL, CentOS, Fedora
- OpenRC: Alpine Linux

Binary remains init-system agnostic - no Rust code changes required.
2026-04-13 20:16:10 +00:00
943aafbec2 Add multi-platform build scripts
- build-rpm.sh: Build RPM packages on RHEL/CentOS/Fedora
- build-alpine.sh: Build APK packages on Alpine Linux
- build-arch.sh: Build Arch packages on Arch Linux/Manjaro

Each script can also run in Docker containers for cross-platform builds.
Complements CI/CD pipeline for local package building.
2026-04-10 02:01:46 +00:00