2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-01 08:22:00 +00:00
Commit Graph

51 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 53fc261235 fix(xcat-dep): build every dep natively per arch; parallel-safe repos + genesis
mockbuild-all.pl treated xnba-undi/grub2-xcat as x86-only @SHARED_NOARCH imported
onto ppc, so an x86 build failure rippled into a fatal "grub2-xcat missing" on
ppc; both actually build on any arch (noarch repackaging of committed artifacts)
and xCAT requires them on ppc too. Un-gate xnba-undi and drop the import so each
host builds a complete, self-sufficient dep repo. Add a single --output that
re-roots all NFS-shared output plus a fail-fast lock at <output>/.lock (owner-pid
guarded so forked build children do not delete it). Default gpg-key-name to the
real "xCAT Signing Key" and --xcat-source to ../xcat-core.

Make concurrent builds safe: give the genesis buildrpms.pl its own HOME/rpmbuild
tree (a shared /root/rpmbuild raced across parallel targets), and nest the
xnba/goconserver rpmbuild dirs under the run-scoped --work-dir (they hard-coded
/var/tmp/xcat-rpmbuild-* and wiped each other). Add --parallel-targets/--max-parallel,
defaulting to serial since the per-package scripts still share repo tarballs under
full parallelism.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-07-03 00:51:25 +00: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
Vinícius Ferrão eeb06fbb42 fix: Resolve mock config for AlmaLinux and Rocky Linux builders
Auto-detection used OS ID directly (e.g. almalinux+epel-10-ppc64le)
but mock configs use short forms (alma+epel-10-ppc64le). Add
resolve_mock_cfg helper that tries the full ID first, then falls
back to known short forms.
2026-05-10 14:03:48 -03:00
Vinícius Ferrão 792179227b feat: Add xnba/mockbuild.pl for pre-built binary packaging
Package the existing pre-built xnba.kpxe and xnba.efi binaries into
an xnba-undi RPM via rpmbuild. These are iPXE-based network boot
agents that ship as pre-compiled firmware blobs.
2026-05-10 04:07:42 -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 5217561470 Update README 2021-10-01 15:10:20 -04:00
Mark Gurevich 64d98810c5 Build new xnba-undi package based on ipxe version 1.21.1 2021-09-23 16:28:09 -04:00
Mark Gurevich 1a27740413 Update README 2021-06-22 14:43:36 -04:00
Mark Gurevich 9ea7adf92a Fix formatting of patch file to update splash version 2021-06-14 15:03:49 -04:00
Mark Gurevich a997028717 Make EXTRAVERSION -1 instead of + 2021-06-14 11:00:28 -04:00
Mark Gurevich c66df363ae Use correct patch number 2021-06-08 15:57:11 -04:00
Mark Gurevich ae90744fee Add binaries also 2021-06-08 15:55:16 -04:00
Mark Gurevich b49782536e Use snponly.efi instead of ipxe.efi 2021-06-08 15:36:26 -04:00
Mark Gurevich 0d879fd7b2 Update README 2021-02-01 13:55:53 -05:00
Mark Gurevich 3896e800fe Update README 2021-02-01 13:55:10 -05:00
Mark Gurevich e5395b48ba Update README 2021-02-01 13:54:26 -05:00
Mark Gurevich 722c32975a Update README 2021-02-01 12:31:22 -05:00
Mark Gurevich 2785c92d96 Update README 2021-02-01 12:08:43 -05:00
Mark Gurevich e373d433cb Update README 2021-02-01 11:31:44 -05:00
Mark Gurevich 8d37a77dd8 Update README
Updated build instructions
2021-02-01 10:40:13 -05:00
cxhong 03033021eb Modified README 2021-01-29 16:46:05 -05:00
cxhong 2dac6f315f update README 2020-11-12 14:47:42 -05:00
cxhong 1d6c551711 Add patches to source to build deb packages 2020-11-12 14:20:47 -05:00
cxhong 9d358873f3 Modification for debian build 2020-11-12 10:21:38 -05:00
cxhong 34783c8166 Add files to binary 2020-11-11 15:21:05 -05:00
cxhong ae63beceb5 change source name 2020-11-11 15:13:48 -05:00
cxhong 214eca4468 fix ipxe-dhcp.patch 2020-11-10 17:44:57 -05:00
cxhong 41f1a1ad6c Build xNBA based on source from ipxe.org on October 29th 2020 2020-11-10 16:02:09 -05:00
cxhong 7dca24aaf4 put xnba boot loader to binary dir 2020-11-09 11:15:34 -05:00
immarvin 42f718a176 enhance xnba build scripts to build xnba-undi package from existed binaries,modify the xnba to be arch independent package to support mixed cluster
Former-commit-id: e40c545260450a69138a509aa07a2184178f0f05
2014-11-12 00:22:23 -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 16c0794a03 do not signature the changefile and dsc file
Former-commit-id: 4af56e97cf8e0538620bbc7977887159df646786
2013-02-20 08:46:00 +00:00
xq2005 29b36cecaf use xnba directory to build xnba-undi on ubuntu
Former-commit-id: 0106626001a040023abbd08e0113e729866b9319
2012-12-26 08:44:52 +00:00
xq2005 3cc0052a45 use xnba directory to build xnba-undi on ubuntu
Former-commit-id: da2c4464600173dd2e2d5a8c51ab96ce017acc28
2012-12-26 08:42:45 +00:00
jbjohnso 1bcb32e9c7 Push spec file tweaks in place for current xnba builds
Former-commit-id: b579e4c6cf0f00281d2f0e1f64851fa97258b4a4
2012-02-25 17:08:11 +00:00
jbjohnso 781c1ed055 Redo xnba-undi.spec changes
Former-commit-id: c904040de202a5481942471ba8b4e50d32f8dac9
2012-01-04 20:53:57 +00:00
jbjohnso 4906c2acce No change
Former-commit-id: 48a92ef2fe644e9923185e6114778e028dc7ded3
2012-01-04 20:53:51 +00:00
jbjohnso 4051331a10 Tweaks. No longer tracking xnba source code in xcat-dep, src.rpm will have the exact source and git will hold the rest
Former-commit-id: 685ce1bf874984596951498290580e6dad6d4553
2011-12-15 18:53:27 +00:00
jbjohnso 7d7598c7d4 Add 1.0.3 snapshot to xcat-dep
Former-commit-id: 582072afa7dbfbdcde34a7dd2d35fa8aec3ab8ab
2011-09-20 15:37:57 +00:00
jbjohnso 6f9499845a Refresh to current ipxe tree, also fix 'machyp'
Former-commit-id: 10597a001377a87613b541769b538d0d56e9642a
2011-09-20 15:31:03 +00:00
jbjohnso b363ffd24d Move to using ipxe archived from the git repository, no patches in the spec file needed
Build UEFI compatible xNBA



Former-commit-id: d12444a30b83f7a267812d51b6330cf734be8cbf
2011-08-19 18:02:38 +00:00
jbjohnso 33f920505c -Change to build ipxe, will provide tar file of git snapshot
Former-commit-id: 13576432e6120c0c247d1c1a61ad7b557e33b65f
2011-05-24 19:30:40 +00:00
jbjohnso 99e83e3fd6 -Fix the patch to droppackets
-update spec file



Former-commit-id: 7a056d129cce80f05784f0c10c3b694f8ad8c65f
2010-11-12 20:29:34 +00:00
jbjohnso 51cc66ef02 -Smooth out gPXE->iPXE transition by having a version number that doesn't confuse people who don't care. iPXE will catch up (hopefully) and all will be sane one day again.
Former-commit-id: 8684ffa2d548c25444776be1ef24be89c9579e20
2010-11-12 16:15:38 +00:00