Skip to content

Workflow

  • 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.

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.

The minimal set is these four files.

ターミナルウィンドウ
mkdir -p unstable/main/hello
cd unstable/main/hello
printf '1.0\n' > version
printf 'https://example.invalid/hello-1.0.tar.gz\n' > sources
sha256sum hello-1.0.tar.gz | awk '{print $1}' > checksums
cat > build <<'EOF'
#!/bin/sh
set -e
cd "$ZPKG_SRC/hello-$ZPKG_VERSION"
./configure --prefix=/usr
make -j"$(nproc)"
make DESTDIR="$ZPKG_DESTROOT" install
EOF
chmod +x build

If there are dependencies, create depends / makedepends.

ターミナルウィンドウ
printf 'zlib\n' > depends
printf 'pkgconf\n' > makedepends
ターミナルウィンドウ
zpkg build hello
zpkg install -p hello
zpkg install hello
  • zpkg build builds up to the destroot and does not install
  • zpkg install -p shows what would be installed, including dependencies
  • Run tests inside build with make check / ctest / meson test and so on
  • If possible, also check reproducibility with zpkg build --repro-check hello

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 hello
zpkg 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.

  1. Change version to the new release
  2. Update the URL in sources
  3. Update checksums to the SHA-256 of the new tarball
  4. Adjust configure options or patches in build if needed
  5. Raise revision (when the contents change)
  6. 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.

ターミナルウィンドウ
git switch -c hello-1.0
git add unstable/main/hello
git commit -m "hello: add 1.0"
git push origin hello-1.0

On an installed system, zpkg sync compares the git HEAD and fetches the tree only when it changed.

ターミナルウィンドウ
zpkg sync
zpkg sync --git --branch main

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)
  • Verify in testing, then promote to stable

  • Sign the recipe tree before pushing to main (maintainer)

    ターミナルウィンドウ
    git add -A
    ZIGNOS_SIGNING_KEY=/media/zignos-signing/zignos-recipes.key \
    scripts/sign-recipes.sh
    git commit -m "sign recipes"
    scripts/verify-recipes.sh
    git push origin main

    External 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-recipes first, then run make-stage3.sh

  • Release notes and release.json are generated at build time

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-channels
zpkg bump --check --channel testing --json

For recipes that cannot be inferred, check as before. Adding update.conf opts them into automatic detection.

  • The upstream release page / announcements
  • Matching the sources URLs against checksums
  • zpkg search <pkg> and zpkg info <pkg>
  • A regular zpkg sync and zpkg upgrade -p

For the meaning of each recipe file, see Recipes; for build examples, see Build patterns.