diff options
| -rw-r--r-- | AGENTS.md | 26 | ||||
| -rw-r--r-- | README.md | 7 | ||||
| -rwxr-xr-x | sbshadow | 14 |
3 files changed, 25 insertions, 22 deletions
@@ -30,18 +30,18 @@ slackrepo strips a dep from a package via a per-package **hintfile** (`<prgnam>. Pain point: a package with ~20 REQUIRES may pull in several phantom-dep dependents; hand-writing a hintfile per dependent each week is tedious and error-prone. -**Solution does not live here.** Hintfiles are owned by the `mkhint` tool (`../mkhintfile/`), which -already creates/backs up/reviews them. The phantom-dep auto-strip is implemented there, not in this -setup script: -- A phantom-dep list at `~/.config/mkhint/phantom-deps` (one dep per line, `#` comments). -- `mkhint --new` auto-adds `DELREQUIRES` for any listed dep it sees in the `.info` REQUIRES. -- `mkhint --fix-current` (`-F`) bulk-sweeps the whole repo after a weekly regen: every package whose - REQUIRES hits a phantom dep gets a hintfile with the right `DELREQUIRES` (created if absent, merged - in place if present). - -Weekly flow: regenerate repo with this script; `sbshadow` runs `mkhint -F` at the end. +**Solution does not live here.** Hintfiles are owned by sb-builder's VM helper `sbb-remote` +(`../sb-builder/remote/sbb-remote`), which creates, backs up (`.bak`) and reverts them: +- The phantom-dep list is the helper's `phantom_deps_file`, `/etc/sb-builder/phantom-deps` (one dep + per line, `#` comments), edited from the sb-builder GUI (Hints, Phantom deps), which also suggests + REQUIRES names no package of the tree has. +- `sbb-remote fix-current-now` (the GUI's `fix-current` job) bulk-sweeps the whole repo: every package + whose REQUIRES hits a phantom dep gets a hintfile with the right `DELREQUIRES` (created if absent, + merged in place if present). + +Weekly flow: regenerate repo with this script; `sbshadow` runs `sbb-remote fix-current-now` at the end. Do **not** add a hintfile generator to this script — it would create a second owner of HINT_DIR and -fight mkhint's `.bak` handling. +fight the helper's `.bak` handling. ## slackrepo config and publishing @@ -80,7 +80,9 @@ Pipeline, in order: package under `personal/` or `pentesting/` is `git rm`'d (shadow); any upstream package missing from HEAD and no longer carried in an overlay is restored with `git checkout current -- cat/pkg` (unshadow). A package is identified by a `$pkg/$pkg.SlackBuild` file. Match by directory - basename only, not content. Then it runs `mkhint -F`, except on `--no`. + basename only, not content. Then it runs `sbb-remote fix-current-now` + (sb-builder's helper; the phantom list is its `phantom_deps_file`), except + on `--no`. `sbshadow` is also called by the `sbpull` bash function (`sbpull.bash`, sourced from root's `.bashrc` on the build VM) after a `git subtree pull`, so overlay changes are applied without regenerating the whole repo. It is the @@ -21,9 +21,10 @@ upstream tree), so the overlay version wins. - `sbshadow`: reconciles shadowing both ways. Shadows upstream packages now carried in an overlay, and restores (unshadows) upstream packages no longer carried, from the pristine `current` branch. Asks once before changing - anything, commits, then runs `mkhint -F` to regenerate phantom-dep hintfiles. - `--yes` applies without asking, `--no` only shows the plan and skips - `mkhint -F` (for non-interactive callers such as sb-builder). `SBO_REPO` overrides the repo + anything, commits, then runs `sbb-remote fix-current-now` (sb-builder's + helper) to regenerate phantom-dep hintfiles. `--yes` applies without + asking, `--no` only shows the plan and skips the regen (for + non-interactive callers such as sb-builder). `SBO_REPO` overrides the repo path. - `slackrepo_SBo-danix.conf`: the slackrepo config for this repo (`/etc/slackrepo/`). Site values (rsync target, Gotify URL and key) are not @@ -10,7 +10,7 @@ # Shadow: upstream package whose name matches a personal/pentesting package is # git rm'd. Unshadow: upstream package no longer carried there is restored from # the pristine $UPSTREAM branch that danix-current was cut from. Then regenerates -# phantom-dep hintfiles with mkhint -F. +# phantom-dep hintfiles with sb-builder's helper (sbb-remote fix-current-now). # # Called by slackrepo_setup_SBo-danix.sh and by sbpull after a subtree pull. # @@ -76,17 +76,17 @@ else fi fi -# ── regenerate phantom-dep hintfiles (mkhint owns them) ─────────────────────── +# ── regenerate phantom-dep hintfiles (sb-builder's helper owns them) ───────── # Runs even with nothing to shadow (a subtree pull can change REQUIRES), but # not on --no: a preview leaves the hints alone too. -# mkhint reads ~/.config/mkhint/phantom-deps; missing tool = harmless skip. +# The list is the helper's phantom_deps_file; missing helper = harmless skip. if [[ $answer == n ]]; then echo echo "sbshadow: preview, phantom-dep hintfiles not regenerated." -elif command -v mkhint >/dev/null 2>&1; then +elif command -v sbb-remote >/dev/null 2>&1; then echo - echo "Regenerating phantom-dep hintfiles (mkhint -F)..." - mkhint -F + echo "Regenerating phantom-dep hintfiles (sbb-remote fix-current-now)..." + sbb-remote fix-current-now else - echo "NOTE: mkhint not found; skipping hintfile regen. Run 'mkhint -F' manually." >&2 + echo "NOTE: sbb-remote not found; skipping hintfile regen." >&2 fi |
