Skip to content

[v0.2] Add multi-distribution package smoke tests - #23

Merged
Lingbou merged 1 commit into
mainfrom
feat/distro-package-matrix
Sep 30, 2026
Merged

Lingbou merged 1 commit into
mainfrom
feat/distro-package-matrix

Conversation

@Lingbou

@Lingbou Lingbou commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Parent: #1

Closes #9

What changed

  • The in-container install checks now live in packaging/smoke/ (lib.sh plus one script per artifact kind), so they are reviewable and runnable locally instead of being generated as heredocs inside the workflow.
  • deb-install and rpm-install collapse into a single package-install matrix on the native arm64 runner covering debian:bookworm-slim, ubuntu:24.04, fedora:latest, and rockylinux:9. Adding a distribution is one matrix entry.
  • Every image now verifies both non-interactive modes: line --version (shape-checked) and line --list.
  • Static linkage is asserted in the package job, right after the build, using readelf: no INTERP program header, no NEEDED entries.
  • The native dpkg -i step in the package job is gone; the container matrix covers it with dependency resolution.
  • The package job installs binutils explicitly for readelf.

Why readelf instead of ldd

ldd is not a reliable static-linkage oracle across images. Glibc's ldd reports "statically linked" for our static-pie build, but busybox ldd on Alpine prints the musl loader path for the same binary, which made the Alpine leg of the tarball job fail on a perfectly static artifact. Checking the ELF directly for INTERP and NEEDED gives the same verdict everywhere, and it now runs where the binary is built, so the signal is available for every artifact kind (deb, rpm, tarball) rather than only inside the containers that happen to have glibc.

Runtime

The install jobs only pull a base image and the distribution's OpenSSH packages; the expensive compilation stays in the package job and is shared through the uploaded artifacts. Each container leg finishes in well under a minute.

Verification

  • actionlint clean.
  • All three scripts were run locally against real artifacts in all six images (debian, ubuntu, fedora, rockylinux, alpine, archlinux) after the refactor; the readelf assertions were negative-tested against a dynamically linked binary.
  • Found and fixed a zsh-only hazard while testing: "$var:ro" applies the zsh :r modifier, so local harnesses must quote as "${var}:ro". CI runs bash, so the workflows are unaffected.

Move the in-container install checks into packaging/smoke so they can be
reviewed and run locally, drive them from one ARM64 matrix covering
debian, ubuntu, fedora, and rocky, and assert 'line --list' next to
'line --version' on every distribution image.

Assert static linkage where the binary is built, with readelf instead of
ldd, because busybox ldd reports a loader for static-pie binaries.

Refs #9

Signed-off-by: Xingqiu Xu <hilbertanjou83@gmail.com>
@Lingbou
Lingbou force-pushed the feat/distro-package-matrix branch from e2868b0 to 2a0be29 Compare September 30, 2026 11:54
@Lingbou
Lingbou merged commit 2a0be29 into main Sep 30, 2026
11 checks passed
@Lingbou
Lingbou deleted the feat/distro-package-matrix branch September 30, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v0.2] Add multi-distribution package smoke tests

1 participant