fix(package): opt-in /bin/zsh replacement + de-duplicate manifest#12
Merged
Conversation
…anifest The manifest defined 11 near-identical build recipes that had already drifted (inconsistent /bin/zsh guard). Add scripts/build-manifest.py as the single source of truth that regenerates package.json from one recipe template + version list. Fixes baked into the recipe: - /bin/zsh is no longer replaced by default; the sudo swap is gated behind an opt-in $ZSH_INSTALL_SYSTEM env var (builds into $ZPFX otherwise). - LDFLAGS typo corrected: /usr/libs -> /usr/lib, /usr/local/libs -> /usr/local/lib. - All version profiles now share one consistent build body (drift eliminated). README documents the opt-in system install. (ZSH-13)
There was a problem hiding this comment.
Pull request overview
This PR improves the Zi zsh package manifest by making system /bin/zsh replacement opt-in, fixing linker path typos, and centralizing the duplicated atclone build recipe generation into a single script to prevent drift across version profiles.
Changes:
- Added a Python generator (
scripts/build-manifest.py) to de-duplicate and regeneratepackage.jsonfrom a single build template + version list. - Updated all manifest profiles to use corrected
LDFLAGSpaths and to gate/bin/zshreplacement behindZSH_INSTALL_SYSTEM. - Documented the opt-in system installation behavior in
docs/README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/build-manifest.py | New generator script defining the single-source build recipe + profiles and writing package.json. |
| package.json | Regenerated manifest with corrected LDFLAGS paths and opt-in /bin/zsh replacement guard in atclone. |
| docs/README.md | Added a section describing the new opt-in system installation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ZSH-13 high-priority package-quality fixes for the Zi
zshpackage manifest./bin/zshby default. The system replacement path now requires explicitZSH_INSTALL_SYSTEM=1; by default it only builds into$ZPFX./bin/zsh.bkpand no longer forces success ifsudo mv/sudo cpfails.atclonethat had already drifted. Addedscripts/build-manifest.pyas the single source of truth; all profiles now share one consistent build body.LDFLAGS/usr/libs→/usr/lib,/usr/local/libs→/usr/local/lib./bin/zshreplacement.Verification
python3 scripts/build-manifest.pyregeneratedpackage.json.python3 -m json.tool package.json >/dev/null/usr/libs,/usr/local/libs, orsudo rm -f /bin/zshremains.${ZSH_INSTALL_SYSTEM:-} != 1gate.[[ ! -e /bin/zsh.bkp ]]before backup.; ((1)); } && m {ok}forced success.Runtime note
I did not run a destructive
ZSH_INSTALL_SYSTEM=1 zi pack for zshhost smoke because that path intentionally targets/bin/zsh. The opt-in behavior is verified statically here; a runtime system-install smoke should be done in a disposable VM/container.