Skip to content

pkg zap-cli with node20-linuxstatic + CI portability checks - #1707

Open
brdandu wants to merge 3 commits into
project-chip:masterfrom
brdandu:bug/staticallyLinkedZAPBinary/ZAPP-1717
Open

pkg zap-cli with node20-linuxstatic + CI portability checks#1707
brdandu wants to merge 3 commits into
project-chip:masterfrom
brdandu:bug/staticallyLinkedZAPBinary/ZAPP-1717

Conversation

@brdandu

@brdandu brdandu commented May 11, 2026

Copy link
Copy Markdown
Collaborator
  • Switch pkg:linux targets from node20-linux-{x64,arm64} to node20-linuxstatic-{x64,arm64} to avoid host GLIBC version coupling.
  • In matter.yml and release.yml: after the Linux build, assert zap-cli is fully static (file/objdump) and has no GLIBC versioned symbols.
  • Add linux-portability-test job (ubuntu:22.04, debian:bullseye, rockylinux:8) to run zap-cli --version on old glibc and selfCheck dquote> - JIRA: ZAPP-1717

- Switch pkg:linux targets from node20-linux-{x64,arm64} to
  node20-linuxstatic-{x64,arm64} to avoid host GLIBC version coupling.
- In matter.yml and release.yml: after the Linux build, assert zap-cli is
  fully static (file/objdump) and has no GLIBC versioned symbols.
- Add linux-portability-test job (ubuntu:22.04, debian:bullseye, rockylinux:8)
  to run zap-cli --version on old glibc and selfCheck
dquote> - JIRA: ZAPP-1717

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the pkg:linux script in package.json to use linuxstatic targets for both x64 and arm64 architectures. The reviewer identified that this change will likely break the packaging workflow due to filename mismatches expected by downstream scripts and noted inconsistencies with other target configurations in the same file that were not updated.

Comment thread package.json
"pack:cli:mac": "node ./src-script/pack-cli.js -p mac",
"pkg": "npx pkg --out-path dist/ --compress GZip --options max-old-space-size=4096 .",
"pkg:linux": "npx pkg -t node20-linux-x64,node20-linux-arm64 --public --no-bytecode --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg:linux": "npx pkg -t node20-linuxstatic-x64,node20-linuxstatic-arm64 --public --no-bytecode --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Switching the target platform from linux to linuxstatic will likely break the packaging workflow:

  1. Filename Mismatch: pkg generates output filenames based on the target platform string. Changing linux to linuxstatic will likely result in filenames like zap-linux-linuxstatic-x64 (and -arm64), which will cause src-script/pack-cli.js (lines 67 and 70) to fail as it expects zap-linux-x64 (and -arm64).
  2. Inconsistency: Other references to node20-linux-x64 in this file, specifically the pkg-use-local-fork script (line 120) and the pkg.targets configuration (line 368), have not been updated. These should be synchronized to node20-linuxstatic-x64 to ensure consistent behavior across all packaging commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant