packages: normalize unpacked stage packages (CRAFT-33)
Metadata
Current evaluation
Merged PR #76 (commit 486bc6b9) added craft_parts/packages/normalize.py, porting Snapcraft package normalization: shebang rewriting, relative symlinks, suid/gid cleanup, and pkg-config/xml2/xslt path fixes.
Resolution: closed resolved
Reason: PR #76 was approved and merged as 486bc6b9, adding normalize.py (first commit a64ac1e5 'packages: normalize unpacked stage packages') plus tests. The code is still present at HEAD, later refined by follow-ups.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #76 (commit 486bc6b9) added craft_parts/packages/normalize.py, porting Snapcraft package normalization: shebang rewriting, relative symlinks, suid/gid cleanup, and pkg-config/xml2/xslt path fixes. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #76, normalizing staged packages by fixing Python shebangs, converting absolute symlinks, clearing suid/gid bits, and updating configuration paths. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged implementation normalizing unpacked stage packages. The change patches Python shebangs, converts absolute symlinks to relative, removes suid/guid bits, and updates config paths. Ported from Snapcraft and approved by reviewers. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Normalizes unpacked stage packages by patching shebangs, converting absolute symlinks to relative, stripping SUID/SGID bits, and updating config paths. Ported from Snapcraft and integrated. |
Update history
No update history recorded yet.
Related work
-
Related To:
craft-parts#215
(confidence 95%)
Follow-up fix 45fe13c0 (merged in cf1004fc) replaced Path.relative_to() with os.path.relpath() for symlinks whose targets traverse parent components.
-
Related To:
craft-parts#81
(confidence 90%)
Follow-up PR (merge 1c9dd125) added a regression test that normalization is skipped when unpacking extracts no files.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #81 packages: add test to ensure unnecessary normalize not called (CRAFT-221) | craft-parts | merged | Merged in canonical/craft-parts#81 (1c9dd125), adding a regression test verifying normalization is skipped when stage-package unpacking extracts no files. | |
| #3529 repo: normalize if stage-packages and check types (CRAFT-222) | snapcraft | merged | Merged in #3529 as commit 58d50bf, fixing stage-packages normalization to check file types so directories such as snap.pc are not passed to fileinput. | |
| #216 Release 1.6.1 | craft-parts | merged | Released craft-parts 1.6.1 via merged PR #216, including the stage-package symlink normalization fix from PR #215 (commit 45fe13c0). | |
| #1642446 Better documentation for stage-packages and build-packages | snapcraft (launchpad) | closed | Resolved by merged canonical/snapcraft#913 (commit 2875ecb56), which updated plugin help to document stage-packages and build-packages, including ELF dependency crawling and omitted cases. | |
| #3534 repo: normalize only if there are packages to unpack | snapcraft | merged | Merged PR #3534 in commit bd493eb8a, fixing pathlib.glob generator handling so staged package contents are normalized only when packages exist to unpack. |