2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 04:26:25 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
Vinícius Ferrão e52b31e1fd build(mockbuild): retry a mock run once when its package manager fails (rc=30)
A riscv64 run lost perl-Crypt-SSLeay to a transient mirror problem: the
bootstrap chroot's dnf got HTTP 404 for BaseOS primary.xml.gz on every Rocky
mirror (metadata mid-sync) and mock exited 30 (YumError) from --buildsrpm,
which the builder treated as a hard failure. Give the mock-driven builders --
mockbuild-perl-packages.pl, ipmitool, grub2-xcat and conserver -- a small
run_mock wrapper that reruns the same mock command once when it exits 30
(the package-manager failure code; build failures exit 10 and are not
retried), and use it for their --buildsrpm/--rebuild invocations.
2026-08-25 18:31:43 -03:00
Vinícius Ferrão 4704e595e9 build(mockbuild): let the per-package builders produce another arch (forcearch)
The per-package builders take the arch of what they build from 'uname -m', which
is wrong for a forcearch mock config such as rocky-10-riscv64-xcat built on an
x86_64 host: the chroot produces riscv64 rpms and the scripts then reject them
("Unexpected RPM arch"). Give every arch-producing builder a --target-arch
option (default: uname -m, so nothing changes for native builds):

- ipmitool/mockbuild.pl, conserver/mockbuild.pl: look for and verify
  <target-arch> rpms. ipmitool's install smoke test cannot install a foreign
  rpm on the host, so for a cross build it installs the rpm into the build
  chroot with mock --install and runs ipmitool-xcat -V there (conserver already
  smoke-tests in the chroot).
- goconserver/mockbuild.pl: the binaries are built on the host, so cross-compile
  with GOARCH (x86_64 amd64, aarch64 arm64, riscv64 riscv64, ...) and package
  with rpmbuild --target <arch>; rpm refuses 'BuildArch: <foreign arch>' on
  this host ("No compatible architectures found for build"), so that line is
  only emitted for native builds. A cross build cannot install its rpm on the
  host either, so the smoke test unpacks it and runs goconserver and congo
  through the binfmt handler (qemu-user-static) the forcearch mock builds of
  the other deps need anyway.
- mockbuild-perl-packages.pl: --target-arch for the 'native' rpm check and the
  default result/log dirs; the 'native' (XS) packages of a cross build are
  smoke-tested inside the build chroot (mock --install, then perl -M<module>
  there) instead of on the host; --noarch-mock-cfg to build the noarch
  packages in a native chroot of the same release instead of the emulated one
  (the rpms are identical for every arch, and an emulated perl build is an
  order of magnitude slower); and a 'needs' key in the package table: a
  package that needs others is built after them, in waves, with their rpms
  installed into its chroot via mock --additional-package. Needs outside the
  selected set are ignored, so the default list6 build is unchanged (the
  chroot provides the module, e.g. from EPEL). This is what lets an EPEL-free
  chroot build perl-Crypt-Blowfish on top of our own perl-Crypt-CBC, or
  perl-Crypt-SSLeay with perl-Path-Class.
2026-08-25 18:30:13 -03:00
Daniel Hilst a02adbfc63 feat(mockbuild-all): build conserver-xcat as a dep builder
Register conserver-xcat in mockbuild-all.pl's dep-builder set so the
traditional C conserver (8.2.1) is built per-EL/arch alongside goconserver.
xCAT itself requires goconserver, so conserver stays a build-on-demand
artifact, but wiring it into the full dep build keeps it produced and
signed with the rest of xcat-dep for sites that want it.

conserver/mockbuild.pl gains the --build-timestamp option that
mockbuild-all passes to every builder (SOURCE_DATE_EPOCH for deterministic
builds); without it the child invocation would abort on an unknown option.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-05 16:51:09 -03:00
Daniel Hilst 9f01a153e0 fix(conserver): build on EL8-EL10 x86_64; add per-EL mockbuild.pl
conserver.spec had not been built on a modern EL toolchain and no longer
compiled on EL9/EL10:

- %prep used the bare %patch / %patch1 macros, which rpm 4.18+ (EL9/EL10)
  rejects with "Patch number not specified". Switched to explicit
  Patch0:/Patch1: with the numbered %patch0/%patch1 macros, which apply
  cleanly on EL8 through EL10.
- BuildRequires listed only openssl-devel, so on EL9/EL10's minimal mock
  buildroot the toolchain was absent and %configure failed with
  "C compiler cannot create executables". Added gcc, make and glibc-devel.

Also add conserver/mockbuild.pl, a standalone per-EL builder matching the
other xcat-dep builders (goconserver/ipmitool): it stages the sources and
spec, builds the SRPM, mock-rebuilds it in the target chroot, copies the
RPMs to --result-dir, and smoke-tests console/conserver in the chroot.
conserver is not in the default mockbuild-all.pl set (xCAT uses goconserver),
so this builder is run on demand. Built + smoke-tested conserver-xcat-8.2.1
for alma+epel-{8,9,10}-x86_64.

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