2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 12:36:23 +00:00
Files
xcat-dep/conserver
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
..
2026-06-20 17:28:16 -03:00
2017-06-14 15:30:01 +08:00

To make the conserver-xcat rpm, run:

./bldconserver.pl

The original patches like initscript.patch and initscript1.patch have been
replaced with initscript_8.2.1.patch, please follow the steps below to create
patch for init script.

1. Copy conserver-8.2.1.tar.gz to a directory, say /root/conserverstart
  mkdir /root/conservertar
  cp conserver-8.2.1.tar.gz /root/conserverstart

2. Copy the initscript_8.2.1.patch to the same directory
  cp initscript_8.2.1.patch /root/conserverstart

3. Uncompress the conserver-8.2.1.tar.gz into two copies:
  tar zxvf conserver-8.2.1.tar.gz
  mv conserver-8.2.1 conserver-8.2.1-diffinit
  tar zxvf conserver-8.2.1.tar.gz

4. Patch the conserver.init with the original patch copied from Git repository
  cd /root/conservertar
  cat initscript_8.2.1.patch | /usr/bin/patch -s -p1 --fuzz=0
  select conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init as the file to patch

5. Update the conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init with whatever changes that are needed

6. Generate the new patch:
  cd /root/conserverstart
  diff -ruN conserver-8.2.1/contrib/redhat-rpm/conserver.init conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init > initscript_8.2.1.patch

7. Copy the new patch to the xcat-dep Git repository and checkin
  cp initscript_8.2.1.patch ~/xcat/xcat-dep/conserver/
  cd ~/xcat/xcat-dep/conserver/
  git commit -m "blah blah blah"