2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 04:26:25 +00:00
Files
xcat-dep/.github/workflows/genesis-openembedded.yml
T
Daniel Hilst de98bb24f1 feat(xcat-dep): merge master and carry the Genesis release into the apt publisher
PR #64 landed on master and added --genesis-release to build-apt-repo.sh -- the
very script this branch deletes, having absorbed the apt assembly + signing phase
into sbuild-all.pl. A plain merge would either resurrect the shell publisher or
silently drop the OpenEmbedded Genesis release from every apt suite, so the
feature is ported to where apt publication now lives.

sbuild-all.pl --genesis-release <dir>:

- The release is validated once at startup, before any build or publish, with the
  same checksum-verify-checksum sequence mockbuild-all.pl uses on the rpm side, so
  a release rewritten together with its SHA256SUMS while the verifier runs is
  rejected. It must be complete (every supported architecture) and carry debs.
- During assemble_into, each release deb is copied into the codename's pool and the
  flat per-version directory and re-checked against the verified checksums. That
  happens with the publish lock held, between the pool wipe and apt-ftparchive, so
  the bytes that are indexed and signed are the bytes that were verified -- the
  separate re-verification pass build-apt-repo.sh ran before indexing has no
  window left to cover here.
- Copies are plain copies, never link(): a pool file sharing an inode with the
  release would let a write through either path change what the other holds.
- Anything staged under the OpenEmbedded Genesis package name is dropped when the
  option is given; the verified release is the only source of those packages.
- XCAT::GenesisRelease is loaded on demand rather than imported at compile time. It
  pulls in XCAT::BuildUtils, which needs File::Slurper, and xcat-master-ub does not
  carry it: a compile-time import made every apt build -- including the ones that
  never pass --genesis-release -- die with "Can't locate File/Slurper.pm".

Also here:

- --publish-lock-wait <seconds> makes the 1800s publish-lock wait settable, so a
  caller that would rather fail fast than queue can, and so the lock is testable.
- t/genesis_openembedded_consumer.t: the four APT consumer tests now drive
  sbuild-all.pl's real publish path (staging tree, publish lock, atomic swap)
  instead of build-apt-repo.sh, including the new flock-based lock behaviour.
- The workflow compiles sbuild-all.pl and BuildUtils.pm instead of shellchecking
  the removed script; BUILD.md and genesis-openembedded/README.md document the apt
  invocation.

Full suite green on both build hosts: 345 tests on xcat-master-ub (Ubuntu 24.04,
where the APT and RPM consumer tests actually run) and 341 on xcat-master.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-24 15:36:27 -03:00

60 lines
1.8 KiB
YAML

name: Genesis OpenEmbedded packages
on:
pull_request:
push:
branches:
- master
permissions:
contents: read
jobs:
package-tests:
runs-on: ubuntu-24.04
env:
XCAT_GENESIS_CI: 1
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
apt-utils createrepo-c dpkg-dev gnupg \
libfile-slurper-perl \
libparallel-forkmanager-perl libperl-critic-perl rpm
- name: Run static checks
run: |
perl -c genesis-openembedded/build
perl -c genesis-openembedded/package
perl -c genesis-openembedded/verify-release
perl -Ilib -c lib/XCAT/BuildUtils.pm
perl -Ilib -c lib/XCAT/GenesisRelease.pm
perl -c mockbuild-all.pl
perl -c BuildUtils.pm
perl -c sbuild-all.pl
rpmspec -P \
-D 'genesis_arch x86_64' \
-D 'version 2.19.0' \
-D 'release snap202608210726' \
genesis-openembedded/rpm/xCAT-genesis-openembedded.spec >/dev/null
perlcritic \
genesis-openembedded/build \
genesis-openembedded/package \
genesis-openembedded/verify-release \
lib/XCAT/BuildUtils.pm \
lib/XCAT/GenesisRelease.pm \
mockbuild-all.pl \
t/build_utils.t \
t/genesis_openembedded_release.t \
t/genesis_openembedded_consumer.t \
t/lib/XCAT/GenesisReleaseTest.pm
- name: Run package tests
run: |
prove -v t/build_utils.t
prove -v -It/lib t/genesis_openembedded_release.t
sudo -E prove -v -It/lib t/genesis_openembedded_consumer.t