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

50 Commits

Author SHA1 Message Date
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 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
Daniel Hilst 752fc237d3 fix: Add missing files
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-06-20 17:28:16 -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
Vinícius Ferrão 30dfa85538 fix(conserver): Port DH key setup to OpenSSL 3 opaque structs
OpenSSL 3.x made the DH struct opaque. Replace direct dh->p/dh->g
member access with DH_set0_pqg() behind a version guard so older
OpenSSL (< 1.1.0) keeps the original code path.
2026-05-11 21:06:20 -03:00
GONG Jie aa36074cb7 Spec file for build a dummy conserver 2018-11-23 14:50:04 +08:00
chenglch df41b32ae4 Upgrade conserver to 8.2.1 version
- Deprecated the patch for sslauthority.
- Leverage sslcacertificatefile configuration from upstream.
- Apply init script patches from old version.
- Changelog and package information for this new version on
  rhels and ubuntu systems.

implement-feature: #18
2017-06-14 15:30:01 +08:00
ligc fc80ecccec update bldconserver.pl for RHEL 7.1 ppc64le
Former-commit-id: 73185ac9373dfea088ea85ce596f0b985002cc35
2014-12-18 11:04:50 +08:00
ligc 29e0633b7e fix for 4312: build xcat-dep packages for SLES 12 x86_64
Former-commit-id: dc03d6519b6646ab2ae432f8008ed1c8a6a11b4d
2013-10-24 14:15:20 +08:00
xq2005 d0d8a8f439 sync the patch file on ubuntu
Former-commit-id: 32a53d327a5fc53cd2037f2c27c9e67baeb2c722
2013-06-26 08:05:11 +00: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
sjing 59aa475275 update the conserver-xcat version from 8.1.16-9 to 8.1.161-10
Former-commit-id: c4aa0034fbf1e8108b36a03bc040db7f697a34f7
2013-05-27 08:27:00 +00:00
ligc b256e6e424 add a README file for how to make conserver RPM and update the initscript.patch
Former-commit-id: c768e650358877d2589a33369279bf72499136e5
2013-05-27 08:03:31 +00:00
ligc 407271c642 fix an error with the last checkin, removing the BEGIN INIT INFO from the patch
Former-commit-id: c80e471f32d47df12ddc6727b80ed8d83490368d
2013-05-27 07:10:34 +00:00
xq2005 20fe4ee9b5 patch sync with rpm build
Former-commit-id: e88a920d11ce3b1728cb7bc284505784d1904497
2013-05-27 02:57:04 +00:00
ligc 2d7f45b073 make the conserver be LSB compatible, when conserver is not running, service conserver stop should exit 0, service conserver status should exit 3
Former-commit-id: dd6fcfb6ddeccd1d7ec7bbe15c3749b5a1a6cf74
2013-05-24 06:52:09 +00:00
xq2005 3e2cf3bd12 do not signature the changefile and dsc file
Former-commit-id: a833fe1a77d0ccf977ba1d2fa84cb55f75aad3c7
2013-02-20 08:49:46 +00:00
xq2005 4cc391cb3d build conserver on debian
Former-commit-id: 691c07e4221c919d35c95a631e0f020d33e36f60
2013-01-25 06:44:55 +00:00
xq2005 98ed581fd1 add the conserver into init.d for start automaticlly on debian/ubuntu
Former-commit-id: a832c47255abe6d0cd0eab1b659ed2ae105f67af
2013-01-24 06:40:42 +00:00
xq2005 a7c22717ae add conserver.cf into conserver-xcat package on debian/ubuntu
Former-commit-id: b37d5c2e86ed313b05ba85f97d7c1e1a259cafa0
2013-01-24 06:32:53 +00:00
xq2005 0f22db5000 build conserver-xcat on ubuntu
Former-commit-id: d7c66a17ee5aeefead08d91e9b39a8eafbd44587
2012-12-18 02:36:26 +00:00
xq2005 b1215f0f43 build conserver-xcat on ubutu
Former-commit-id: fd4ab774bcbf4d6090294a6ac4c14df6ba2a3a10
2012-12-18 02:35:53 +00:00
arifali dfac721311 change conserver to conserver-xcat for the debian package as well now
Former-commit-id: 6ab3718be3ceb60b01e3dec7a13125fa85865562
2012-04-07 20:23:47 +00:00
daniceexi 3a582c1a66 make conserver-xcat provides the dependency tag of conserver
Former-commit-id: ef6b95b018562f04b54be2d0a781d62a0dff4e09
2011-11-08 15:08:38 +00:00
daniceexi 2c8bcbce3b to make yum/zypper to remove conserver,conserver-client automatically when install conserver-xcat
Former-commit-id: 75026f852455adbd1087262f74b4132dc86fec0b
2011-10-13 09:09:12 +00:00
daniceexi 8834c8585a add a build script for conserver
Former-commit-id: 175fdd450eb6d31dc590df4d4357f6043293a49e
2011-09-23 08:35:35 +00:00
daniceexi dda610881f change the name of conserver to conserver-xcat
Former-commit-id: bff5a995f0393f82945694335a6770ac62a28c7b
2011-09-23 08:35:16 +00:00
hamzy bf08ce086d This is the first draft of building packages under Debian
Former-commit-id: 342cdeb67cc99dc5c0da1095d07cf5f239b58c4c
2011-05-03 20:29:30 +00:00
jbjohnso 15cce50a03 -Patch a segmentation fault if the configuration file lacks an option xCAT usually populates
Former-commit-id: c0b9077981cc06af0400009daa64db93f49e1f6e
2009-11-21 18:01:29 +00:00
mxi1 bdccd5535f add additional information for conserver&stunnel init.d services to adapt LSB standard; also the defetc 2818375 is fixed 2009-10-12 08:38:41 +00:00
memotype 1ede21126c patch for debian conserver package 2008-07-23 18:02:56 +00:00
jbjohnso dca6baa8e1 Increase version of conserver ofr SLES init script chang 2008-06-27 16:07:06 +00:00
jbjohnso 8b23bbe7e5 -Fix conserver init script status for SLES 2008-06-27 16:06:12 +00:00
jbjohnso 78cf18a134 -Fix passed output under RHEL4 in conserver init script 2008-06-26 15:19:19 +00:00
jbjohnso 07584a92b0 -Improved cosmetic enhancements for conserver init script 2008-06-26 15:15:09 +00:00
jbjohnso 439a141d90 -Improved cosmetic enhancements for conserver init script 2008-06-26 15:05:17 +00:00
jbjohnso af9802cafb -RH cosmetic init script fix for conserver 2008-06-26 15:01:16 +00:00
jbjohnso 1821c13252 -Rework init script to be more robust and SLES/RH agnostic 2008-06-19 14:26:47 +00:00
jbjohnso 45da8c7ef0 -Address sf issue 1904818, conserver init script now matches better 1.3 behavior 2008-05-07 19:59:45 +00:00
jbjohnso c22f1925fa Fix conserver build on 32-bit 2008-04-02 14:20:29 +00:00
jbjohnso 245102512c Make sure SSL support will make it into the rpm of conserver 2008-03-24 20:27:38 +00:00
sakolish 5d5fdd1206 Add conserver port to /etc/services - Line #80 2008-03-21 19:39:19 +00:00
jbjohnso b01bc65707 Check in the base conserver distribution for references 2008-01-17 17:06:05 +00:00
andywray 04238b84e4 Added conserver patch to make deb package with Jarrod's updates. 2008-01-17 17:02:59 +00:00
jbjohnso 38859f04d4 Spec file for conserver 8.1.6 tar file and patch to yield SSL client certificate functionality 2008-01-10 01:00:08 +00:00
jbjohnso dfd5def41f A patch for conserver to enable client certificate authentication.
One final task need be done before I would think it good to submit upstream, 
and that is to specify to fail on lack of client certificates only when 
specified in an option file.  The rest should not change conserver behavior without administrator/user request.
2008-01-09 22:11:29 +00:00