2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-17 17:20:31 +00:00
Files
xcat-dep/.github/workflows/genesis-openembedded.yml
T
Daniel Hilst e5ceff876b test(xcat-dep): the openEuler native overlays enable a plugin the host cannot run
Every openEuler ppc64le native prerequisite after procenv itself fails before
rpmbuild starts:

  FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/procenv'

raised from mock's procenv plugin prebuild hook. The plugin runs ["/usr/bin/procenv"]
through mockbuild.util.do with no chroot prefix, so it executes the BUILD HOST's copy,
and xcat-master-ppc has none. The plugin also appends procenv to the buildroot's
preexisting_deps itself, so the chroot already gets the package: a run that installed
it, with "Installing : procenv-0.60-1.ppc64le" in root.log, failed on the same line.

mock ships procenv_enable False. The overlays turn it on, which makes every native
build depend on a host package that neither repository declares, for a procenv.log
that nothing reads.

The overlay text was built inline in native_overlay, so there was nothing a unit test
could call. native_overlay_text in XCAT::NativeInputs now renders one overlay and
reproduces today's values exactly, and native_overlay writes what it returns.

openeuler_native_procenv_plugin.t asserts the plugin is left at its default in all
three overlays, that the prerequisite repository and the bind mount survive, and that
the uid split does not move. Two of its eleven checks fail on this commit, which is
the defect.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 10:16:16 -03:00

100 lines
3.6 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 bats createrepo-c dpkg-dev gnupg \
libfile-slurper-perl \
libparallel-forkmanager-perl libperl-critic-perl rpm rpm2cpio cpio
- 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
perl -c ipxe-xcat/mockbuild.pl
perl -c ipxe-xcat/sbuild.pl
perl -c ipxe-xcat/verify-payload.pl
rpmspec -P ipxe-xcat/ipxe-xcat.spec >/dev/null
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 \
ipxe-xcat/mockbuild.pl \
ipxe-xcat/sbuild.pl \
ipxe-xcat/verify-payload.pl \
lib/XCAT/BuildUtils.pm \
lib/XCAT/GenesisRelease.pm \
mockbuild-all.pl \
t/build_utils.t \
t/common-repo-gate.t \
t/genesis_openembedded_release.t \
t/genesis_openembedded_consumer.t \
t/ipxe_xcat_payload.t \
t/lib/XCAT/GenesisReleaseTest.pm
- name: Run package tests
run: |
prove -v t/build_utils.t
prove -v t/build_timeout.t
prove -v t/sbuild-all.t
prove -v t/goconserver_cross_build.t
prove -v t/ipxe_xcat_payload.t
prove -v t/mockbuild-all.t
prove -v t/net_dns_rr_types.t
prove -v t/repo-lock-race.t
prove -v t/nfslock.t
prove -v -It/lib t/genesis_openembedded_release.t
sudo -E prove -v -It/lib t/genesis_openembedded_consumer.t
prove -v t/riscv64_perl_cell.t
sudo -E prove -v -It/lib t/common-repo-gate.t
prove -v t/openeuler.t
prove -v t/openeuler_mock_template_include.t
prove -v t/openeuler_native_result_permissions.t
prove -v -Ilib t/openeuler_native_procenv_plugin.t
prove -v -Ilib t/openeuler_native_trust_dbpath.t
prove -v -Ilib t/openeuler_native_cpio_scan.t
bats t/verify-xcatsn-install.bats
# Ubuntu's AppArmor policy blocks these unprivileged test namespaces.
- name: Run native packaging tests
run: |
set -o pipefail
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
prove -v native/buildinfo_provenance.t native/goconserver-openeuler.t \
native/openeuler-power-inputs.t native/openeuler-srpm.t \
native/xnba-release-suffix.t 2>&1 | tee native.tap
# prove returns success when a test file skips all its checks.
if grep -E '^1\.\.0 # SKIP|^native/[^ ]+\.t \.+ skipped' native.tap; then
echo 'a native test file was skipped' >&2
exit 1
fi