Repository navigation
feat: release ignity as deb, rpm and apk packages - #35
Merged
Merged
Conversation
Build static (musl) execline, s6 and s6-portable-utils in a container and
bundle them with ignity into deb, rpm and apk packages for amd64 and
arm64, published on GitHub Releases. Same layout as techcode-io/terranova.
- distributions: build script, Containerfile and nfpm configs
- scripts: binds (container, nfpm, git, gh) and tasks (build, package,
release, project); poe build, package:{deb,rpm,apk}, release:{pre,post}
- stage3: execline-cd and /usr/libexec/ignity/wait, as bash owns cd,
umask and wait on rpm distributions; install-ignity.sh links the wait
- packages: GNU findutils and grep on alpine (fix-perms, gen-accounts)
- tests: IGNITY_INSTALL=package runs the suite against the package,
portable owner matching, no-start services get time to print
- ci: package per arch, attest, run the suite from the packages on
debian, alpine and fedora; pre-release and release workflows
- docs: install from a package, build and release
Keep execline, s6 and s6-portable-utils out of the root filesystem, for both the packages and the source install: nothing conflicts with the distribution anymore, its own execline/s6 can be installed alongside. - build with --bindir/--libexecdir under /usr/lib/ignity and --enable-absolute-paths - /init and the entry points that can run outside it put /usr/lib/ignity/bin first in PATH (with-ignity-path); the PATH reset of fix-perms, gen-accounts and load-envfile is gone - ignity scripts use #!/usr/lib/ignity/bin/execlineb; /bin/execlineb is a compat link for user scripts, created only when absent - packages: no conflicts/provides, no rpm special case; stage3 back to plain cd and wait - drop the default 00-container-discover init script - tests: binaries resolved from /usr/lib/ignity, compat link present - docs: where ignity installs its binaries, ENV PATH for exec sessions
Git doesn't keep empty directories: with 00-container-discover removed, nothing under src/etc/ignity is tracked, so a fresh checkout installed from source has no /etc/ignity. The packages already create them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the change being made?
Ignity is released as Linux packages (
.deb,.rpm,.apk) for amd64 and arm64, published on GitHub Releases. The layout follows techcode-io/terranova.distributions/build/: builds execline, s6 and s6-portable-utils statically (musl) in an Alpine container and bundles them withsrc/(withoutinstall-ignity.sh). The versions are still read frominstall-ignity.sh, sopoe project:upgradekeeps bumping both install paths.distributions/packages/: nfpm configs per arch, pluspostinstall.sh/preremove.sh. Assets are namedignity-<version>-linux-<amd64|arm64>.<deb|rpm|apk>, so a Dockerfile can pick one fromTARGETARCH.scripts/binds/+scripts/tasks/: new poe tasksbuild,package:{deb,rpm,apk},release:pre,release,release:post. The version is now0.1.0-dev.ci.yml(now reusable): builds packages per arch, attests them, then runs the full suite from the packages on debian, alpine and fedora.pre-release.yml/release.yml: the terranova release flow (bump PR → tag + GitHub release → next iteration PR).Binaries out of the root filesystem, for the packages and the source install alike:
/usr/lib/ignity/{bin,libexec}, built with--enable-absolute-paths. Nothing goes into/binor/usr/binanymore./initputs/usr/lib/ignity/binfirst inPATHthrough/usr/lib/ignity/libexec/with-ignity-path. The entry points that can run outside/init(preboot,fix-perms,gen-accounts,load-envfile,with-retries) start with the same helper. The oldPATH=/usr/bin:/binreset came from the previous layout and is gone.#!/usr/lib/ignity/bin/execlineb./bin/execlinebis a compat link for user scripts, created only when no other execline provides one, and removed on uninstall if it's ours.cd/umask/waiton rpm distributions no longer matter, sostage3keeps plaincd /andwait { }.Other changes:
findutilsandgrep:fix-permsusesfind -gid/-uidandgen-accountsusesgrep -z, which busybox lacks.00-container-discoverinit script is dropped.Why is the change being made?
install-ignity.shonly works on Debian/Ubuntu and compiles the skarnet stack in every image build. It needs git, build-essential and network access to GitHub. Packages install in one layer on Debian/Ubuntu, Alpine and Fedora/RHEL/UBI, with nothing to compile and nothing written over the distribution's files.How has this been tested?
Locally on arm64 (podman), with
/usr/lib/ignity:uv run poe test(source install) andIGNITY_INSTALL=package DOCKER_BASE_IMAGE=<base> uv run poe testondebian:bookworm-slim,alpine:3andfedora:latest: 69 passed each. This includes two new tests: binaries resolve from/usr/lib/ignity(waittoo), and the compat link is present./init, with the image'sPATHand withPATHunset./usr/lib/ignityremoved).00-container-discoverremoval.Test changes that were not caused by the packages:
shlost that race every time.lscolumn padding.ubuntu:24.04is not in the CI matrix: its image already has a uid/gid 1000 user, which the tests map.Not run yet: the CI workflows themselves, amd64, and the release flow.
release.ymlusestechcode-io/github-actions/setup-github-bot, so this repo needs the same access to it as terranova.How has this been documented?
ENV PATHfor exec sessions and probes;.claude/CLAUDE.mdupdated.Related Issues