2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-17 17:20:31 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Hilst 774b592df7 Merge pull request #84 from VersatusHPC/fix/openeuler-ppc64le-manifest-ipxe
fix(xcat-dep): openEuler ppc64le has no ipxe-xcat and xCAT cannot install
2026-10-08 11:20:37 -03:00
Daniel Hilst cf90df2723 test(xcat-dep): the native owner tests skip mock 6.8 and never check result ownership
native/openeuler-power-inputs.t gates its whole native owner section on
"from mockbuild.util import load_config". mock 6.8 keeps load_config in
mockbuild.config, so the import fails, $can_owner is false and 52 assertions skip
on the only architecture that can run them. native/fixtures/power-mock.py imports
it the same way and cannot start at all.

The fake mock also created --resultdir as the user that started it and wrote no
logs, so it could not see what mock 6.8 does: it reloads its uid manager from
chrootuid, then creates --resultdir and opens state.log, build.log and root.log in
it as that uid.

Both now use mockbuild.config, and the fake mock creates --resultdir and opens
those three logs as chrootuid. Against the unfixed tree the native owner fails:

  mock: [Errno 13] Permission denied:
    .../native-results/native-leaf/state.log
  ERROR: Step failed (rc=1): Build native prerequisite: native-leaf
  Failed 14/115 subtests

The directory is root root 755 and chrootuid is 1000, which is the catalog's
declared build_uid for that node.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 10:03:08 -03:00
Daniel Hilst 6f90c54125 test(xcat-dep): no test measures which x86-64 baseline goconserver is built for
The published x86_64 goconserver is compiled GOAMD64=v3, and that binary stops
a pre-AVX2 management node with SIGILL. Nothing caught it. A grep for an export
line in the build script is no help: it passes when the export stops reaching
the compiler, which is the failure itself.

native/goconserver-openeuler.t now drives the cross path with an amd64 target
and reads the setting out of the compiled binary. The stubbed compiler reports
the setting the build asked for, and FIXTURE_GOAMD64 lets a case report a
different one -- what a compiler that ignores the request looks like. Two more
assertions hold the in-chroot gate down, because no unit test executes the
generated spec.

Twelve assertions fail on this tree. The fix that follows makes all 160 pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 00:36:50 -03:00
Daniel Hilst 717f6dc5b1 fix(xcat-dep): no openEuler target builds, for three independent reasons
openeuler-20.03sp4-x86_64 and openeuler-22.03sp4-x86_64 build nothing. Both exit 3
at "Could not find included config file:
/etc/mock/templates/openeuler-20.03-sp4.tpl", and both targets report that every
build step failed. mock-core-configs names its openEuler templates by release
alone, openeuler-20.03.tpl and openeuler-22.03.tpl, and each already sets
releasever to the newest service pack. The two configurations spelled the service
pack into the template name, which matches no file in any mock package.
openeuler-24.03sp4-x86_64.cfg already includes openeuler-24.03.tpl, which is why
that target builds.

The ppc64le target fails before any package is built, for two further reasons.

rpmkeys --dbpath cannot import the publisher key: rpm takes an fcntl transaction
lock on <dbpath>/.rpm.lock, the staging directory is NFS mounted local_lock=none,
and that lock answers errno 524 there. The keyring database moves to local
temporary storage, keyed on the staging directory so two targets of one run do not
share it. The staged source RPMs and the gpg home do not move.

A verified publisher RPM is rejected as unreadable: reject_elf_payload read the
exit status of rpm2cpio as the verdict on the payload, and on rpm 4.19 rpm2cpio
writes the whole payload and still exits 1 with nothing on stderr. The cpio walk
moves into scan_cpio_for_elf, which returns its own answer. A truncated stream
never reaches the trailer and still dies, which is the case the exit status stood
in for, and verify_input has already matched the sha256 and run rpmkeys --checksig
before this point.

Each fix has a test that fails without it. openeuler_mock_template_include.t reads
the configurations only. openeuler_native_trust_dbpath.t and
openeuler_native_cpio_scan.t run no rpmkeys and no rpm2cpio: the second builds its
cpio streams in Perl and refuses an ELF member, a truncated stream, data after the
trailer and a stream that is not cpio, each by name.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-01 18:19:06 -03:00
Daniel Hilst 5d680aef0d fix(xcat-dep): every openEuler mock --init fails on a slow repo.openeuler.org
mock --init failed for every openEuler target. repo.openeuler.org is the only
source the chroots have, and it served a build host at 7 kB/s, then reset
connections mid-transfer: "Curl error (28) Operation too slow", "Curl error
(56) SSL_read: SSL_ERROR_SYSCALL", "Curl error (92) INTERNAL_ERROR". All three
attempts per package failed, so the openEuler core build could not start.

mock-configs/templates/openeuler-lts-xcat.tpl builds dnf.conf, so baseurl now
lists two mirrors before repo.openeuler.org, which stays last as the authority
of record, and timeout rises to 300. minrate stays at dnf's default: the rate
abort is the only signal that moves dnf to the next baseurl. gpgcheck stays on
and gpgkey still names repo.openeuler.org, so a mirror cannot change what is
built. Measured on one host, same gcc rpm: repo.openeuler.org 7 kB/s,
mirrors.tuna 2.8 MB/s, mirror.nju 3.9 MB/s. A cold mock --init then completed
in 2m38s.

native/mock-configs.t asserts the slowest host is not first, the canonical url
is present, every url names the same release and architecture, and minrate is
unset. It could not run before: native/fixtures/mock-configs.py copied two
templates no source ships and raised FileNotFoundError, so the test measured no
config at all.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-30 18:09:19 -03:00
Vinícius Ferrão 3f3289bc95 Test native repository locks and publisher signature preservation
Exercise mixed repository finalization and changed publisher inputs on x86_64. Check native manifest selection and use File::Slurper in the goconserver fixture.
2026-09-29 00:03:57 -03:00
Vinícius Ferrão 41e7dc90f1 docs: document native packaging tests 2026-09-22 23:09:27 -03:00
Vinícius Ferrão a41b0bd684 test: simplify openEuler native fixtures 2026-09-22 23:09:27 -03:00