Workflow
Prerequisites
Section titled “Prerequisites”- A Linux x86_64 build environment (gcc / make / tar / xz / git)
- ZIGNOS stage3 or a built root, plus
zpkg - Network access (to fetch upstream sources and dependencies)
- Enough disk space (for sources, work and binpkgs)
Recipes come from a clone of zignos-recipes or from
/usr/share/zignos/recipes fetched with zpkg sync.
1. Choose a channel
Section titled “1. Choose a channel”New packages start in unstable.
zignos-recipes/unstable/{core,main,desktop}/<package>/Once stable, promote to testing, and finally to stable. Do not add directly to stable.
2. Create the recipe
Section titled “2. Create the recipe”The minimal set is these four files.
mkdir -p unstable/main/hellocd unstable/main/hello
printf '1.0\n' > versionprintf 'https://example.invalid/hello-1.0.tar.gz\n' > sourcessha256sum hello-1.0.tar.gz | awk '{print $1}' > checksums
cat > build <<'EOF'#!/bin/shset -ecd "$ZPKG_SRC/hello-$ZPKG_VERSION"./configure --prefix=/usrmake -j"$(nproc)"make DESTDIR="$ZPKG_DESTROOT" installEOFchmod +x buildIf there are dependencies, create depends / makedepends.
printf 'zlib\n' > dependsprintf 'pkgconf\n' > makedepends3. Build and test
Section titled “3. Build and test”zpkg build hellozpkg install -p hellozpkg install hellozpkg buildbuilds up to the destroot and does not installzpkg install -pshows what would be installed, including dependencies- Run tests inside
buildwithmake check/ctest/meson testand so on - If possible, also check reproducibility with
zpkg build --repro-check hello
4. Update an existing recipe
Section titled “4. Update an existing recipe”zpkg bump uses update.conf when present and otherwise infers the detector
from version and sources. Detection through build verification uses the
same workflow.
zpkg bump --check --channel testing hellozpkg bump hello --channel testing --apply --build--check is read-only. --apply hashes the new source, validates the rewritten
recipe, then writes; --build rolls everything back if the build fails. See
Version bumps (zpkg bump) for details.
For recipes that cannot be inferred, or when you do not want automatic detection, update the recipe by hand.
- Change
versionto the new release - Update the URL in
sources - Update
checksumsto the SHA-256 of the new tarball - Adjust configure options or patches in
buildif needed - Raise
revision(when the contents change) - Check with
zpkg build/zpkg install
Do not change contents while keeping the same version+revision. binpkgs are matched by channel and recipe digest, but revision is also used for distribution order and identification.
5. git and sync
Section titled “5. git and sync”git switch -c hello-1.0git add unstable/main/hellogit commit -m "hello: add 1.0"git push origin hello-1.0On an installed system, zpkg sync compares the git HEAD and fetches the tree
only when it changed.
zpkg synczpkg sync --git --branch main6. Submit a PR
Section titled “6. Submit a PR”Include the following in the Pull Request.
- The channel and category you changed
- The build log (
/var/cache/zpkg/logs/<pkg>-<version>.log) - The output of
zpkg install -p - How you checked with QEMU / hardware, if you did
- Differences from the existing recipe (patches, configure options, dependencies)
7. After merge
Section titled “7. After merge”-
Verify in testing, then promote to stable
-
Sign the recipe tree before pushing to
main(maintainer)ターミナルウィンドウ git add -AZIGNOS_SIGNING_KEY=/media/zignos-signing/zignos-recipes.key \scripts/sign-recipes.shgit commit -m "sign recipes"scripts/verify-recipes.shgit push origin mainExternal contributor PRs may stay unsigned. After merging, the maintainer adds the signing commit above. The private key is never stored in the repository; keep it on the offline USB. See Package signing and verification for details.
-
To build stage3 / images, reflect the recipe tree in
/mnt/sources/zignos-recipesfirst, then runmake-stage3.sh -
Release notes and
release.jsonare generated at build time
Checking for updates
Section titled “Checking for updates”zpkg bump --check covers every recipe: recipes without an update.conf are
inferred from version and sources. bump-check.yml in zignos-recipes also
runs a daily detection and records the result in the job summary.
zpkg bump --check --all-channelszpkg bump --check --channel testing --jsonFor recipes that cannot be inferred, check as before. Adding update.conf
opts them into automatic detection.
- The upstream release page / announcements
- Matching the
sourcesURLs againstchecksums zpkg search <pkg>andzpkg info <pkg>- A regular
zpkg syncandzpkg upgrade -p
For the meaning of each recipe file, see Recipes; for build examples, see Build patterns.
