2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 20:17:55 +00:00
Commit Graph

71 Commits

Author SHA1 Message Date
Daniel Hilst 1160214ce3 refactor(build): merge the two BuildUtils modules into one
The rebase onto master left the repository with two modules named
BuildUtils.pm: the shared build helpers at the root, package BuildUtils, and
the target architecture parser at build-utils/lib/XCAT/BuildUtils.pm, package
XCAT::BuildUtils. buildrpms.pl loaded both, one through `@INC` and one through a
path require. A reader cannot tell which module a BuildUtils reference names,
and the test sandbox staged the wrong one.

Move the shared helpers into build-utils/lib/XCAT/BuildUtils.pm as
XCAT::BuildUtils, and export targetarch_from_target beside them. Both builders
and the four tests now put build-utils/lib on `@INC` and import from the one
module. targetarch_from_target keeps its behaviour: it returns the same
architecture as before for suffixed targets, empty and undefined input, mixed
case and every architecture token.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 13:51:41 -03:00
Daniel Hilst 5abd4327c4 fix(build): keep build-ubunturepo as an oracle, and fix what running it found
builddebs.pl was written against build-ubunturepo but never run beside it. Keeping
the old script in the tree for one more cycle makes the comparison repeatable, and
running the two on xcat-master-ub found four defects that no unit test would have.

  * builddebs.pl was not executable. github_action_xcat_test.pl runs
    `sudo ./builddebs.pl`, so CI would have failed with Permission denied.

  * .deb files were collected after every ARCHITECTURE. dpkg-genbuildinfo reads
    the sibling artifacts of the source package it is building, so moving the
    amd64 .deb away before ppc64el ran killed the second build with
      dpkg-genbuildinfo: error: cannot fstat file ../xcat_..._amd64.deb
    Collection now happens once a package's last architecture is done.

  * A checkout dirtied by an aborted run poisoned the next one: a leftover
    .changes made dpkg-genbuildinfo name an architecture the run had not reached.
    The dpkg output is now cleared at start.

  * The maintainer was xcat@xcat.org where build-ubunturepo uses
    xcat-build@xcat.org, and a Release file in the tree was ignored.
    buildrpms.pl WRITES Release, so a pipeline building both would have stamped
    its debs with a different release from its rpms. Both corrected.

Equivalence, measured rather than assumed. Both builders were run on
xcat-master-ub from the same tree:

  package set      identical, 14/14, same names
  control metadata identical, 14/14
  payload contents identical, 14/14
  changelog.Debian differs, 2 packages -- deliberately, see below

Byte-identity is NOT the criterion, because neither implementation has it: two
consecutive runs of build-ubunturepo on the same tree agree on 0 of 14 packages.
A .deb records the build wall-clock time in its ar member mtimes and
SOURCE_DATE_EPOCH does not reach dpkg-deb here, so every run differs from every
other. That is a pre-existing property of the Debian build, not a regression, and
worth fixing separately.

The changelog difference is build-ubunturepo being wrong. Its

    sed -i "s/^ -- .*/ -- $DEBFULLNAME <$DEBEMAIL>  $deterministic_date/"

carries no line address, so it rewrites EVERY trailer in debian/changelog:
"OCF xCAT <xcat@ocf.co.uk>  Mon, 25 Oct 2010" ships as "xCAT Build
<xcat-build@xcat.org>  Tue, 01 Sep 2026". It falsifies the authorship and dates of
the 2008 and 2010 releases. builddebs.pl rewrites only the top stanza. Matching
byte-for-byte would mean reproducing the defect, so this difference stays.

(xcat-vlan appeared to differ under `diff -r`; that was diff reporting dangling
symlinks in both trees. Its member listing is identical.)

build-ubunturepo is documented as retained-for-comparison and not to be extended.
It goes once the Ubuntu CD pipelines call builddebs.pl.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 12:39:43 -03:00
Daniel Hilst b8510e1be3 refactor(build): replace build-ubunturepo with builddebs.pl and BuildUtils.pm
build-ubunturepo was 710 lines of shell doing the Debian half of what
buildrpms.pl does for rpms, with no code in common and a different CLI. It also
carried paths that are dead: GSA uploads, the PROMOTE/PREGA release flows, and a
-d mode that built an xcat-dep repository from a different project's packages.

builddebs.pl replaces it and mirrors buildrpms.pl -- Getopt::Long options, one
package list, build then index then sign -- so the two builders read the same way
and share BuildUtils.pm.

The design rests on one fact: xcat-core debs are Perl. They are byte-identical
for every Ubuntu release, so they are built ONCE and the same files are published
into every codename. Only xCAT, xCATsn and xCAT-genesis-scripts carry an
architecture, and there the difference is packaging metadata, not compiled
output. That is why this needs no sbuild and no per-codename chroot -- unlike
xcat-dep, whose packages are compiled and genuinely differ per release.

BuildUtils.pm holds what both builders need and what was worth making testable:
the Version-Release derivation from the commit time, the xCAT-probe helper
staging, the deb arch and dist tables, the debian/control version pinning, the
changelog rewrite, the reprepro conf generation, and the build lock. Every
function is pure or takes its side effect as an argument, so build_utils.t (45
assertions) drives each one rather than grepping a builder for evidence that it
is called. Verified by mutation: shrinking the arch table reddens 1, dropping
the /g from the control pin reddens 2.

The env-var CLI maps to options: BUILDALL=1 -> --force, GPGSIGN=1 -> --gpg-sign,
GPG_HOME -> --gpg-home, DEST -> --dest, DISTS -> --dist (repeatable). UP=0 has no
equivalent because uploading is gone -- the CD pipeline's deploy step publishes.

Callers updated: github_action_xcat_test.pl and travis.pl. The comment in
github_action_xcat_test.pl explaining why CI copies the tree before building is
corrected -- build-ubunturepo rm -rf'd $curdir/../../xcat-core, which under
GitHub's work/<repo>/<repo> layout is the checkout's own parent; builddebs.pl
writes under dist/debs inside the checkout and restores every file it edits, so
the copy is now only isolating the tests from build residue.

Two tests moved with it. build_ubunturepo_lock.t extracted the lock out of the
shell with a regex and ran that; the lock is now a function, so builddebs_lock.t
calls it -- and asserts what actually matters, that two builds of one checkout
fail fast while two builds of different checkouts run concurrently.
ubuntu_2604_pkglist.t asserted that resolute appeared in a shell fragment of
build-ubunturepo's source; it now asks BuildUtils for the release list and checks
a resolute stanza reaches conf/distributions. That assertion would have passed on
any file containing the fragment and broken on a reflow that changed nothing.

Verified: prove -r xCAT-test/unit fails on 6 files here against 7 on
upstream/master, the difference being apache_config_sources.t, fixed by the
preceding commit. The remaining 6 are missing DB modules on the machine that ran
it and are identical on both.

NOT done here, and required before this can merge: the Ubuntu core CD pipelines
still invoke ./build-ubunturepo (ci/ubuntu/Jenkinsfile.core-ubuntu-{devel,stable}
in VersatusHPC/xcat-core-ci-cd, and the inline script in each live Jenkins job).
Those must be switched to builddebs.pl in the same change window.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 12:39:43 -03:00
Daniel Hilst bd9c155f1a refactor(build): retire makerpm, buildcore.sh and buildlocal.sh
buildrpms.pl is what actually builds xcat-core now: every core CD pipeline calls
it (ci/{el,suse,ubuntu}/Jenkinsfile.core-*), and it reaches none of these
scripts. What is left of them is a second, diverging build path that nothing
runs -- buildcore.sh has no caller at all (its one mention in
Jenkinsfile.core-el-stable is a comment), makerpm's only caller is
buildlocal.sh, and buildlocal.sh has no caller.

That divergence broke master. #7774 added a source-only mode to these scripts
rather than to buildrpms.pl, giving makerpm an unguarded

    . "$(dirname "$0")/build-utils/source-only.sh"

at line 13, used on every build path (xcat_configure_rpm_build_mode,
xcat_announce_build), not only under SRCONLY. apache_config_sources.t stages
makerpm into a fixture that creates build-utils/ but copies only
sync-xcat-apache-configs into it, so makerpm died at line 13 and nothing reached
SOURCES/. Because prove -r xCAT-test/unit runs the whole suite, that reddened
xcat_pr_test on every open PR. It merged on a green run from 2026-08-27;
apache_config_sources.t landed 2026-08-30, and nothing rebuilt it in between.

Removed: makerpm, buildcore.sh, buildlocal.sh, build-utils/source-only.sh,
build-utils/buildcore-source-only.sh, and the tests that covered only them
(makerpm_source_only.t, buildcore_source_only.t). The makerpm half of
apache_config_sources.t goes with makerpm; its sync-xcat-apache-configs half
stays, because buildrpms.pl invokes that helper directly. The source-only
capability is preserved as buildrpms.pl --source-only, in the preceding commit.

build-ubunturepo is deliberately NOT touched. It is not a legacy script: both
Ubuntu core CD pipelines invoke it, github_action_xcat_test.pl:325 invokes it on
every PR, and it was last fixed this week. buildrpms.pl is RPM-only -- mock and
createrepo_c, no dpkg path -- so there is nothing to migrate it to. Giving
Debian builds an equivalent modern builder is separate work.

Verified: prove -r xCAT-test/unit before and after differs by exactly one file
-- apache_config_sources.t fails on upstream/master (4a0d9e0bb, tests 64-65) and
passes here. The other six failures are identical on both and are missing DB
modules on the machine that ran it. No remaining reference to any removed file
except the one comment in buildrpms.pl naming where its templates came from.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-02 12:39:43 -03:00
Vinícius Ferrão 040283f7a9 docs(riscv64): describe HTTP boot, the HTTP discovery payload and the media boot loader 2026-09-01 10:50:23 -03:00
Vinícius Ferrão 6eba1277fe docs(riscv64): document EL10 riscv64 compute node support
Add the riscv64 page to the cluster management guide (UEFI + grub2 boot
path, discovery through mknb's grub2 network configurations, stateful and
stateless provisioning, the dependency picture for a management node on
riscv64, limitations), list riscv64 in the node object attributes and in
the support matrices, add the architecture to the cross-build page for
stateless images, extend the grub2 install guide (and fix its swapped
x86_64/aarch64 file names), the uninstall package lists, the DHCP backend
validation matrix and the mknb/genimage man pages, and carry the riscv64
schema values into the generated nodetype, osimage, noderes, node and
group references.
2026-09-01 10:50:20 -03:00
Vinícius Ferrão 55bc165b9a docs(builds): describe the source-only build mode 2026-08-26 17:03:22 -03:00
Vinícius Ferrão 77dbee3bea docs(genesis): note RPM 4.11 package handling 2026-08-25 11:26:44 -03:00
Vinícius Ferrão cab4df434c docs(genesis): explain shared image activation 2026-08-25 11:26:44 -03:00
Vinícius Ferrão f87b6be787 docs(genesis): document signed extension bundles 2026-08-21 00:00:14 -03:00
Vinícius Ferrão e4de6a06fc docs(genesis): document OpenEmbedded image 2026-08-20 22:29:57 -03:00
Vinícius Ferrão 023beff053 Add Ubuntu 26.04 provisioning support 2026-05-01 11:13:45 -03:00
Vinícius Ferrão 1babd7b0e4 fix: improve Ubuntu LTS provisioning support 2026-04-29 18:19:12 -03:00
Vinícius Ferrão 0f606615b3 Fix Kea UEFI reservation boot policy 2026-04-28 03:35:53 -03:00
Vinícius Ferrão 24266c8fa8 Record ppc64le Genesis blocker provenance 2026-04-24 12:19:52 -03:00
Vinícius Ferrão 1412850457 Document DHCP backend validation matrix 2026-04-23 23:19:56 -03:00
Vinícius Ferrão 889b4ad254 Document the DHCP backend validation matrix 2026-04-23 11:51:09 -03:00
Vinícius Ferrão fcd22757d2 Refine Kea xNBA handling and validation notes 2026-04-23 11:14:01 -03:00
Vinícius Ferrão 6f3d9bb9d1 Add Kea DHCP backend 2026-04-23 02:01:33 -03:00
Markus Hilger f42011a493 Unify shebang lines 2024-05-07 16:43:07 +02:00
Mark Gurevich ee026089c3 Fix broken doc links 2019-11-07 16:18:43 -05:00
GONG Jie 1a9a2ddeb8 Remove trailing spaces in file docs/source/developers/license/xcat_individual_contributor_license_agreement.rst 2017-12-31 23:59:59 +00:00
GONG Jie 78d9120b60 Remove trailing spaces in file docs/source/developers/license/xcat_corporate_contributor_license_agreement.rst 2017-12-31 23:59:59 +00:00
GONG Jie bad0b77574 Remove trailing spaces in file docs/source/developers/license/maintainers.rst 2017-12-31 23:59:59 +00:00
GONG Jie 2d0ed7981d Remove trailing spaces in file docs/source/developers/license/index.rst 2017-12-31 23:59:59 +00:00
GONG Jie 28bf15a10f Remove trailing spaces in file docs/source/developers/license/contributors.rst 2017-12-31 23:59:59 +00:00
GONG Jie 8f01b28507 Remove trailing spaces in file docs/source/developers/guides/index.rst 2017-12-31 23:59:59 +00:00
GONG Jie ad29f0403e Remove trailing spaces in file docs/source/developers/guides/docs/doc_guidelines.rst 2017-12-31 23:59:59 +00:00
GONG Jie f632683d0d Remove trailing spaces in file docs/source/developers/guides/code/index.rst 2017-12-31 23:59:59 +00:00
GONG Jie 97041f92d4 Remove trailing spaces in file docs/source/developers/guides/code/code_standard.rst 2017-12-31 23:59:59 +00:00
GONG Jie 2002a81708 Remove trailing spaces in file docs/source/developers/guides/code/builds.rst 2017-12-31 23:59:59 +00:00
GONG Jie b59f6f696a Remove trailing spaces in file docs/source/developers/github/syncing_forks.rst 2017-12-31 23:59:59 +00:00
GONG Jie f9ae06aa8f Remove trailing spaces in file docs/source/developers/github/pull_request.rst 2017-12-31 23:59:59 +00:00
GONG Jie 7ef31416a6 Remove trailing spaces in file docs/source/developers/github/index.rst 2017-12-31 23:59:59 +00:00
GONG Jie 7f57db46d6 Remove trailing spaces in file docs/source/developers/github/forks.rst 2017-12-31 23:59:59 +00:00
GONG Jie 9b5a400088 Remove trailing spaces in file docs/source/developers/github/delete_branches.rst 2017-12-31 23:59:59 +00:00
GONG Jie c6de0b40d7 Remove trailing spaces in file docs/source/developers/github/create_branches.rst 2017-12-31 23:59:59 +00:00
GONG Jie e5416b7a85 Remove trailing spaces in file docs/source/developers/github/change_code.rst 2017-12-31 23:59:59 +00:00
Mark Gurevich ae09fdfe6d Spelling for man1 and some formatting fixes 2017-06-06 13:04:41 -04:00
Mark Gurevich fda07616e5 Spelling fixes for docs/sources/developers and overview 2017-05-30 13:26:36 -04:00
Mark Gurevich a50f3710f7 Doc spelling and gramma fixes 2016-10-25 15:31:20 -04:00
Mark Gurevich 8ea1c26113 Fix doc_guidelines.rst based on pull request review 2016-06-01 09:56:32 -04:00
Mark Gurevich f3b8e39827 Add some xCAT documentation writing guidelines 2016-05-31 11:38:02 -04:00
Mark Gurevich ef3bf0c437 Fix doc build errors and missing links 2016-05-24 16:16:34 -04:00
wangxiaopeng d877778013 Add descrption of how to install tidy; fix two minor issues 2016-01-07 04:11:01 -05:00
wangxiaopeng 14aeb23a05 Add xCAT code standard doc page 2016-01-06 07:11:08 -05:00
Victor Hu 9d7cfaf94e Update builds.rst 2015-10-30 12:23:05 -04:00
Victor Hu d35dd67667 Merge pull request #307 from whowutwut/developer_guide
Added documentation for building rst man pages
2015-10-28 09:57:44 -04:00
Victor Hu 74dbc15a11 Update change_code.rst
delete duplicate word
2015-10-26 16:55:20 -04:00
Victor Hu f000802d96 Update index.rst
fix mispelling
2015-10-26 16:54:57 -04:00