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

36 Commits

Author SHA1 Message Date
Daniel Hilst c4c9492e57 fix(xcat-dep): merge master after the riscv64 and Ubuntu builds landed
Master gained the EL10 riscv64 forcearch target (PR #66) and the Perl Ubuntu
build (PR #63). Both touch the files this branch rewrites, so the merge is
resolved per file:

mockbuild-all.pl, mockbuild-perl-packages.pl keep the forcearch target profile,
the noarch chroot and --epel-gap from master, and this branch's manifest gate,
atomic per-cell deploy and per-package chroot scrub. assert_required_deps is
dropped: verify_target_repo replaced it. The post-join bootstrap scrub now reads
the uniqueext and the config recorded when the chroot was made, because the wave
loop of master no longer numbers packages in @packages order.

packages-manifest.conf gains a [rocky-10-riscv64-xcat] section. A target with no
section is fatal, so without it the riscv64 target cannot run.

goconserver/mockbuild.pl builds in the mock chroot for the host arch and cross-
compiles on the host for a foreign --target-arch. A forcearch chroot would run
the Go toolchain under qemu. Both paths overlay the pinned go.mod/go.sum and
ship server.conf as YAML.

The host-install smoke stays removed (it corrupts the build host rpm database).
The checks that do not install on the host are kept: the chroot install of a
cross-built ipmitool-xcat and XS perl module, and the binfmt run of the cross-
built goconserver binaries.

goconserver/gomod/ takes the pin of master, whose `go` directive is the lower of
the two, so both the EL10 chroot and the Ubuntu sbuild toolchain accept it.

t/genesis_openembedded_consumer.t: the skip count of the RPM block is 64, the
number of tests it runs. Both sides carried a stale number.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 09:39:55 -03:00
Daniel Hilst 5addcaa976 fix(xcat-dep): drop host-install smoke; fix ppc mock-root collision
PR #62 review raised two build-side problems:

1. The child builders installed each freshly built RPM onto the build host
   ("dnf -y install" + a run smoke). Because mockbuild-all builds el8/el9/el10
   on one host, this installs a foreign-EL RPM into the host RPM database and
   corrupts it. The real install-and-run verification already happens in the CI
   Test phase (cluster-test.pl boots a matching MN and installs xCAT + the
   freshly built xcat-dep there), so the host-side smoke was redundant. Remove
   the install/smoke step from every builder and the perl aggregate builder, and
   drop the now-dead --skip-install flag (builders, mockbuild-all.pl, and the
   pipeline invocations). The perl builder's --jobs 1 throttle existed only to
   avoid host dnf-lock contention during that install, so it goes too (perl
   packages build in parallel again). Also drop goconserver's now-unused run_rc.

2. build_mock_uniqueext truncated the run id by keeping the LAST 24 chars, which
   for the 7-char "ppc64le" arch dropped the leading EL digit -- so
   alma+epel-{8,9,10}-ppc64le collapsed to the same run part. goconserver
   compiles every EL in the el10 chroot (build_cfg rewritten to -10-), so the
   chroot name is identical across the three ELs and the uniqueext was the only
   thing keeping their mock roots apart: with parallel targets the three ppc
   goconserver builds raced in one root. Keep a readable leading token AND append
   a short digest of the full id so distinct ids always yield distinct uniqueext.
   Moved the helper into MockBuildUtils.pm and added fixtures (distinct per EL on
   a long run id, both arches, determinism).

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-21 18:42:28 -03:00
Daniel Hilst c808e06da3 fix(xcat-dep): address code review — run lock, loud tree wipes, wire tested genesis copier, dedupe pool, honest Release arches
Review follow-up for the Ubuntu sbuild matrix:

- Add a fail-fast exclusive flock over the whole run (<output-root>/.sbuild-all.lock,
  file-scoped handle) so two overlapping runs can't corrupt the shared staging/apt
  tree -- this is the root of the observed 'remove_tree .../staging/<cn>/<arch>:
  Directory not empty' (an NFS silly-rename from a concurrent run).
- wipe_tree(): remove_tree that captures {error} and dies loud, so an ENOTEMPTY no
  longer carps-and-continues leaving stale debs; used for all staging/pool/dists wipes.
- Wire the tested, hash-based cross_copy_genesis_deb into build_genesis (was a naive
  glob+copy, so the unit-tested stale-dropping copier was dead code); remove the
  genuinely-unused deb_snap_version/rewrite_changelog_top helpers + their subtests
  (compiled deps intentionally ship their tracked changelog version).
- Dedupe assemble_apt on binary Package+Architecture (keep highest via
  dpkg --compare-versions) so a double-produced genesis can't land two versions in
  the pool, independent of the --skip-genesis contract.
- Derive Release Architectures from the arches actually staged (non-empty
  binary-<arch>/Packages), not a hard-coded 'amd64 ppc64el'.
- goconserver: guard 'go mod init' when a go.mod exists (+ TODO to commit go.sum for
  the pinned SHA). Accept-and-ignore the unused per-package --log-dir/--build-number/
  --skip-install flags (documented). Remove orphaned make_deb.sh dispatchers
  (build-debs-all, build.sh, ipmitool/build.sh) + update the READMEs.

perl -c clean; prove t/sbuild-all.t: 71/71.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-12 11:49:54 -03:00
Daniel Hilst b72139c18c refactor(xcat-dep): make each <dep>/sbuild.pl a true per-package builder
The per-package <dep>/sbuild.pl were generic wrappers that shelled out to each
package's make_deb.sh, so a package's build brain was split across two files and
package-specific fixes (e.g. goconserver's Go toolchain) landed in make_deb.sh
instead of the builder -- inconsistent with the EL side, where <dep>/mockbuild.pl
IS the per-package builder.

Make each <dep>/sbuild.pl own its build (mirroring <dep>/mockbuild.pl), absorbing
its make_deb.sh (source prep, patches, toolchain, dpkg-buildpackage), and remove
all seven make_deb.sh. The common chroot orchestration -- ephemeral schroot session,
apt update, build-dep install, out-of-tree copy, SOURCE_DATE_EPOCH, deb collection +
host-side verification -- moves into BuildUtils::build_deb_in_chroot; each builder
supplies only its package-specific recipe (passed base64-encoded to avoid quoting
interplay through schroot).

Also make the older Ubuntu codenames buildable:
- goconserver: install a pinned modern Go (1.25.12) in the build -- focal/jammy ship
  a Go too old to even auto-switch toolchains, and goconserver's pinned deps need
  Go >= 1.25 (it is a static CGO-free binary, so the pinned toolchain is portable and
  reproducible across codenames).
- ipmitool + goconserver: lower debian/compat 13 -> 12 and Build-Depends debhelper
  (>= 12), since Ubuntu 20.04 (focal) ships debhelper 12; compat 12 also builds cleanly
  on newer codenames.

Validated: all recipe shapes build green through the new path -- tarball
(ipmitool@focal), git-clone+pinned-Go (goconserver@focal), tarball+patches
(syslinux@noble), in-place (grub2-xcat), in-place+custom-rules (xnba); 80/80 unit
tests still pass.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-11 13:12:59 -03:00
Daniel Hilst f6693ca06a fix(xcat-dep): sbuild.pl verifies debs land on the host after the chroot build
Each <dep>/sbuild.pl copies the built .deb(s) to --result-dir from INSIDE the
schroot session. That only reaches the host when --result-dir is on a path
bind-mounted into the chroot (the shared /opt/xcat-ci-shared tree, as the CI
uses). A mis-configured result-dir (e.g. a chroot-local /tmp) would let the
build "succeed" yet leave nothing on the host -- a silent no-output. Verify
host-side after the session that the .deb(s) are actually present and fail
loud with a pointed message otherwise (consistent with the fail-hard design).

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-10 19:03:21 -03:00
Daniel Hilst b4627bc227 feat(xcat-dep): rework the Ubuntu dep build as testable Perl (sbuild-all.pl)
The Ubuntu/Debian dependency build shipped as three bash scripts
(build-dep-debs.sh, build-apt-repo.sh, mk-dep-chroots.sh) whose review
(PR #63) surfaced correctness problems: partial/stale output could be
published, the rpm->deb genesis conversion dropped the maintained package
semantics (Depends/Breaks/Replaces + maintainer scripts), the arch matrix
was invalid (x86-only syslinux/elilo/xnba treated as ppc64el packages, and
Architecture:all packages with no single producer), several required
failures exited zero, and the build/repo scripts disagreed on their staging
path and codename set (focal missing from the assembler).

Rewrite it as proper, unit-tested Perl mirroring the EL side
(mockbuild-all.pl / MockBuildUtils.pm / <dep>/mockbuild.pl / t/*.t /
packages-manifest.conf), sharing one CLI vocabulary:

- BuildUtils.pm: shared, testable helpers + the canonical CLI spec, plus the
  Debian-specific helpers (out-of-tree changelog stamping, genesis control
  preservation, deb inspection, cross-arch genesis provisioning).
- sbuild-all.pl: the orchestrator, absorbing all three shell scripts. Builds
  + validates into a fresh per-arch staging tree and only (re)assembles the
  published apt repo from validated staging -- so partial/failed output never
  ships and stale debs never accumulate. Auto-initializes the per-codename
  sbuild chroots on first run. Fails the whole run non-zero on any missing
  chroot/package/artifact or version-pin mismatch.
- <dep>/sbuild.pl x7: per-package builders that drive each package's
  MAINTAINED debian/ in the matching chroot (never re-implemented), so the
  converted/built packages keep their control metadata and maintainer scripts.
- debs-manifest.conf: per-[<codename>-<arch>] required set + version pins,
  encoding the per-arch package sets (x86 boot components built once on amd64
  as the single producer; ppc64el builds only the arch-specific compiled deps).
- t/sbuild-all.t: fixture tests for every pure helper.
- goconserver/make_deb.sh: pin the upstream SHA instead of cloning a moving
  branch, so every matrix cell builds the same source (reproducible).

Codename set unified across build, assembly, chroots and docs (focal IS
supported). BUILD.md documents the new flow.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-08-10 18:55:29 -03:00
Daniel Hilst 12b7f10b60 docs(xcat-dep): record upstream source URLs in mockbuild.pl scripts
elilo, ipmitool and syslinux build from a tracked, in-repo source tarball and no
longer fetch at build time, so the upstream download URL was undocumented. Add
it back as a provenance comment next to the tracked-source block so it is clear
where the tarball came from and where to re-download when bumping the version.
(xnba already records https://ipxe.org/ and goconserver keeps its git repo URL
in $go_repo; grub2-xcat is repackaged from the distribution grub2 and conserver
uses a dummy spec, so neither has a single upstream download URL.)

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-28 13:01:31 -03:00
Daniel Hilst c70e09ceeb fix(build): stop concurrent per-arch builds racing on shared package sources
The elilo, ipmitool and syslinux builders each fetched their upstream
source and rewrote the tracked source tarball in place, inside the
package source directory that both arch builds share. When the two
per-arch builds run in parallel they were racing to fetch the source:
one build truncated and rewrote the tarball while the other read it, so
the reader got a truncated archive and failed intermittently with
"missing top-level tree" errors.

The correct, normalized source is already tracked in the repository and
is what mock consumes, so the fetch is redundant as well as unsafe. Drop
the download/normalize entirely and verify the tracked source read-only
(it exists and has the expected top-level tree). With no writer, the
shared source is only ever read, so parallel per-arch builds can no
longer race on it. Also removes the now-dead --source-url /
--skip-upstream-download options, the normalize helper, and the wget
dependency check.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-26 21:15:39 -03:00
Daniel Hilst 6742e5f862 fix(elilo): use tracked normalized source read-only to avoid a fetch race
elilo/mockbuild.pl wget'd the upstream tarball over $source_path and then
normalized it in place, rewriting the tracked source file. Parallel builds share
that same source file, so builds running concurrently raced to fetch and rewrite
it -- one build could read the file mid-rewrite and get a truncated archive, an
intermittent "Normalized source archive still missing elilo top-level tree"
failure. Because elilo is a required dep, one such flake failed the whole run.

The tracked tarball is already normalized (elilo/ top-level), so use it read-only
when normalized and only fetch upstream when it is absent or not yet normalized.
This removes the in-place rewrite (hence the race) and the flaky sourceforge
dependency, and is more reproducible.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-22 09:25:26 -03:00
Daniel Hilst a1ab3938d1 fix(xcat-dep): scope PR to EL and address cross-arch review feedback
Per review on xcat2/xcat-dep#62, narrow this PR to the EL matrix only
(rh8/rh9/rh10 x x86_64/ppc64le). The SUSE and Ubuntu work is reverted out of the
PR's net diff and will land in its own PR, so the reviewer's SUSE/Ubuntu points
(SuSE breakage, ubuntu20.04/focal in the default set, the xcat@megware.com key
default) are moot here -- those targets are no longer part of this change.

Reverted (net-zero vs master):
- SUSE target support in mockbuild-all.pl (opensuse-leap -> sles<N>).
- SUSE perl BuildRequires compat + elilo suse_version hunk.
- build-apt-repo.sh Ubuntu changes (focal + key default).

EL-relevant review fixes kept:
- Rename the finalize options to precise arch names: --x86-repo/--ppc-repo ->
  --x86_64-repo/--ppc64le-repo (and matching vars/labels). "x86"/"ppc" was
  ambiguous, especially since the genesis package is named -ppc64 via tarch yet
  carries no big-endian code.
- Clarify the "tolerated build" comment (reviewer #2): builder failures are
  tolerated only so one flaky builder cannot abort the others; correctness is
  enforced by RESULT via assert_required_deps (a missing REQUIRED rpm still fails
  the run), not by exit code. Toleration is load-bearing -- perl-Sys-Virt fails
  on el8 by design, and genesis "fails" cosmetically while still producing its rpm.
- BUILD.md: drop all references to the removed --skip-xcat flag and the stale
  "unified xCAT repository" framing (the core is built by the xcat-core
  pipeline), and document --finalize-xcat-dep.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-21 20:17:37 -03:00
Daniel Hilst 90c80b0034 fix(suse): elilo prebuilt on suse_version; perl BuildRequires compat repo
- elilo: add %if 0%{?suse_version} to use_prebuilt (openSUSE lacks the gnu-efi
  linker inputs elilo compiles against, same as EL8/ppc).
- mockbuild-perl-packages: on openSUSE mock, inject a tiny local repo whose one
  noarch rpm Provides perl-generators + perl-interpreter (Requires perl), so
  'dnf builddep' on the Fedora perl srpms resolves those (SUSE-absent) names.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-16 21:18:41 -03:00
Daniel Hilst 552e82b877 fix(elilo): match both ppc64le and powerpc64le for prebuilt (alma reports powerpc64le)
The mock chroot's %{_host_cpu} is 'powerpc64le' on AlmaLinux ppc chroots but
'ppc64le' on Rocky, so the single ppc64le compare left use_prebuilt unset on
alma and pulled in the ppc-absent gnu-efi BuildRequires. Match both spellings.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-16 17:10:45 -03:00
Daniel Hilst df28d848d3 fix(elilo): set use_prebuilt via %ifarch + %if (drop || that older rpm mis-evaluates)
EL8/EL9 mock chroots run an older rpm that does not evaluate an || between a
string compare and an arithmetic test like EL10's rpm, so use_prebuilt stayed
unset on el9-ppc and the gnu-efi BuildRequires (absent on ppc) broke the build.
Use two independent %ifarch ppc64le / %if 0%{?rhel}==8 blocks instead.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-16 17:06:17 -03:00
Daniel Hilst 1abfdf5428 fix(elilo): use tracked prebuilt payload on EL8 too; require elilo-xcat
EL8's gnu-efi-devel places elf_x86_64_efi.lds where elilo's Makefile can't find
it, so elilo failed to compile on EL8 -- yet xCAT hard-requires elilo-xcat on
every arch, so the whole dep repo became uninstallable. Reuse the same tracked
prebuilt elilo-x64.efi (SOURCE4) that ppc64le already uses (elilo-x64.efi is a
noarch artifact). Also add elilo-xcat to assert_required_deps so a missing elilo
fails the build loudly instead of surfacing later as a dnf depsolve error.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-16 16:30:49 -03:00
Daniel Hilst a2378ba780 build: Make builds deterministic
Port SOURCE_DATE_EPOCH patterns from xcat-core to all xcat-dep build
scripts. RPM and Debian packages now produce identical output given
the same Gitepoch timestamp, regardless of build host or time.

EL (RPM) changes:
- mockbuild-all.pl: --build-timestamp flag, deterministic run_id,
  tar --sort/--owner/--group/--mtime, createrepo --revision
- All mockbuild.pl: SOURCE_DATE_EPOCH cascade (CLI > Gitepoch > git > time),
  deterministic mock config with SOURCE_DATE_EPOCH in chroot env,
  RPM macros for timestamp clamping and fixed buildhost
- goconserver: -trimpath -buildvcs=false, canonical rpmbuild path
- xnba: canonical rpmbuild path
- syslinux: ZERO_AR_DATE=1 in mock env

Ubuntu (Debian) changes:
- All make_deb.sh: SOURCE_DATE_EPOCH fallback from Gitepoch
- goconserver: deterministic SNAP_TS and changelog from epoch,
  -trimpath -buildvcs=false in debian/rules
- syslinux: -fdebug-prefix-map for path-independent debug info
- build-apt-repo.sh: gzip -n, Release Date: from SOURCE_DATE_EPOCH

Verified: 31/33 package artifacts produce identical SHA256 hashes
across independent builds. 2 syslinux sub-packages (devel,
debugsource) have known limitations from upstream build system.
2026-06-20 17:28:16 -03:00
Daniel Hilst 19c65dbec5 fix(deb): Port syslinux, elilo, grub2-xcat to modern Ubuntu toolchains
syslinux 3.86: add GCC 10+ -fcommon, GCC 15 -Wno-error flags, glibc
sysmacros.h include, vpd.c pointer fix, python2 menugen skip.

elilo-xcat: three patches for GCC 15 (bool keyword, StrnCpy conflict
with gnu-efi 4.0) and binutils 2.46 (objcopy efi-app format removed).
Bump debhelper compat 5→10, fix changelog maintainer emails.

grub2-xcat: bump DH_COMPAT 5→8, add make_deb.sh.
2026-06-20 17:28:16 -03:00
Daniel Hilst Selli e15a2e62d8 fix: Fix elilo-xcat build in EL9
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-04-13 16:00:19 -03:00
Daniel Hilst Selli fdf8393a2b fix: Add scripts & patches for building in mock for EL10
Signed-off-by: Daniel Hilst Selli <392820+dhilst@users.noreply.github.com>
2026-03-13 07:20:46 -03:00
Mark Gurevich ea2636ff93 Build elilo-xcat 3.14-6 to include elilo.x86.efi 2021-05-06 16:15:42 -04:00
cxhong 6867291fdd missing elilo-x64.efi binary file in the deb package 2020-12-01 15:16:29 -05:00
cxhong 593f81ffe4 Check in dependents for building elilo-xcat deb packages 2020-11-06 09:45:39 -05:00
cxhong 3cf4f08b2d build new rpm for rhels 2020-07-10 15:13:42 -04:00
cxhong 6367a856e6 add new patch 2020-06-26 15:10:20 -04:00
cxhong c6ac80c7f6 Add elilo-big-bzimage-limit.patch 2020-06-26 15:01:43 -04:00
immarvin e31c2089b9 fix defect #4436 [dev] no elilo-x64.efi in elilo-xcat_3.14-4_all.deb
Former-commit-id: eb36fece54010f62ffe36d553b56bf620b05e685
2014-11-27 00:38:53 -08:00
immarvin 47d1f22ed5 update version&release of elilo since the arch has been changed to all
Former-commit-id: 569e3bbf7cd2eccdf1432e0edf3fbb467d81dc45
2014-11-14 00:48:34 -08:00
immarvin 7694e6ea40 modify the xnba to be arch independent package to support mixed cluster
Former-commit-id: 091f169d329e3193253d2fff8ea8003bf0421d63
2014-11-12 00:27:20 -08:00
xq2005 bb3e2fbc6d change the Maintainer to xCAT when building dependecy packages on ubuntu
Former-commit-id: aedd3c83a50b1ef980fb56f33fed3f5308e9b5ef
2013-06-26 07:41:45 +00:00
xq2005 544cc81678 do not signature the changefile and dsc file
Former-commit-id: 35a3a07da986e5cfc7aa6c32904262ff811c2660
2013-02-20 08:48:23 +00:00
arifali c361736952 elilo-xcat: add patch so that the Makefile.defaults is pointing to /usr/lib in ubuntu/debian for gnuefi
Former-commit-id: b6d89ab464b9b3713243693dadb2438970724852
2012-05-14 21:36:39 +00:00
arifali 7438530668 added elilo deb packaging
Former-commit-id: c64ae0e105c3a2f758ba018e1ee2817c3a724460
2012-05-13 19:54:00 +00:00
jbjohnso aac3a2d30b Bump elilo-xcat version number due to bad build floating around with -3. Remove ambiguity and upgrade the users of the bad -3 build
Former-commit-id: 6ad11e181cd266140dd686b48f11439458efd625
2012-02-25 17:08:04 +00:00
jbjohnso 0756b9f07b Fix slight mistake in elilo-xcat spec file
Former-commit-id: 1b87b380ba6fc9ff6ed163e485beb476eef5cf47
2011-12-15 18:59:36 +00:00
jbjohnso cdea944d09 Add a '%N' to elilo
Former-commit-id: 395b0dd95036aa3554d56720836c496a620d5dc0
2011-09-29 19:42:03 +00:00
jbjohnso dee2ca7bc9 Add '%M' to power BOOTIF
Former-commit-id: b73dcada300ada234033e8178a0ee47499df7af5
2011-09-13 20:23:57 +00:00
jbjohnso 85250e697d Add elilo to xcat-dep
Fix description of the esxboot-xcat rpm



Former-commit-id: db0724ce46de43cc48f3400eb9e8bbca9c7ea97d
2011-08-19 18:25:10 +00:00