Skip to content

fix(mozjs128): drop scanner-flagged aes_archive.zip#17340

Closed
PawelWMS wants to merge 1 commit into
4.0from
pawelwi/mozjs128-strip-aes-archive
Closed

fix(mozjs128): drop scanner-flagged aes_archive.zip#17340
PawelWMS wants to merge 1 commit into
4.0from
pawelwi/mozjs128-strip-aes-archive

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

@PawelWMS PawelWMS commented May 18, 2026

Summary

Drop the single scanner-flagged file firefox-128.11.0/third_party/rust/zip/tests/data/aes_archive.zip from mozjs128's Source0 via a downstream modify_source.sh repack. The fixture is an AES-encrypted ZIP from the cargo-vendored Rust zip crate's test suite that trips the automated package-signing pipeline's deep scanner with a benign encrypted-archive verdict, failing the SRPM signing step. It is never read at AZL build time — mozjs128 only consumes js/src/.

Files

  • base/comps/components.toml — remove the inline [components.mozjs128] row (the dedicated component file is auto-included by the **/*.comp.toml glob).
  • base/comps/mozjs128/mozjs128.comp.toml — declare [[components.mozjs128.source-files]] with replace-upstream = true pointing at the locally-modified tarball in pkgs_modified/mozjs128/ (SHA-512 39141838…370db2d).
  • base/comps/mozjs128/modify_source.sh — deterministic repack script: download upstream .tar.xz, verify published SHA-512, extract, delete the one fixture, repack via tar --sort=name --mtime --owner=0 --group=0 --numeric-owner | xz -T1 -9e. Single-threaded xz keeps the output hash host-CPU independent.
  • locks/mozjs128.lock — refreshed input-fingerprint.
  • specs/m/mozjs128/{mozjs128.spec,sources} — re-rendered: bumps release_number to 10, swaps the sources SHA-512 to the modified tarball hash, adds a %changelog entry.

Approach

Single-file strike (aes_archive.zip only) rather than a broader subtree strip — the only confirmed scanner detection on this SRPM is the single hit on this exact file. A minimal repack keeps the diff to a 4 MB delta against the upstream tarball and avoids breaking any of mozjs128's reverse-dependencies (cjs + the 8 cinnamon-* components).

Supersedes the broader strip on #17208 (kept-only-js/ plus restored subtrees), which the build pipeline rejected.

@PawelWMS PawelWMS force-pushed the pawelwi/mozjs128-strip-aes-archive branch 3 times, most recently from ddc3c17 to af90ffa Compare May 18, 2026 23:41
@PawelWMS PawelWMS changed the title mozjs128: drop scanner-flagged aes_archive.zip from Source0 fix(mozjs128): drop scanner-flagged aes_archive.zip May 20, 2026
The upstream `firefox-128.11.0esr.source.tar.xz` ships an
AES-encrypted ZIP fixture at
`firefox-128.11.0/third_party/rust/zip/tests/data/aes_archive.zip`
that comes from the cargo-vendored Rust `zip` crate's test suite.
That file trips the automated package-signing pipeline's deep
scanner with a benign encrypted-archive verdict, which fails the
SRPM signing step for mozjs128 even though the fixture is never
read at AZL build time -- the SpiderMonkey build only consumes
`js/src/`, and the cargo `zip` crate's test corpus is not
exercised by SpiderMonkey.

Mitigation: serve a downstream-modified Source0 with that single
file removed. The repack is deterministic so the resulting
tarball SHA-512 is reproducible from a fresh clone.

Files:

- `base/comps/components.toml`: remove the inline
  `[components.mozjs128]` row (the dedicated component file is
  auto-included by the `**/*.comp.toml` glob).
- `base/comps/mozjs128/mozjs128.comp.toml`: declare a
  `[[components.mozjs128.source-files]]` block with
  `replace-upstream = true` pointing at the locally-modified
  tarball in the `pkgs_modified/mozjs128/` lookaside path
  (SHA-512 = 39141838...370db2d).
- `base/comps/mozjs128/modify_source.sh`: deterministic script
  that downloads the upstream `.tar.xz`, verifies its published
  SHA-512, extracts, deletes the single `aes_archive.zip` leaf,
  and repacks via `tar --sort=name --mtime --owner=0 --group=0
  --numeric-owner | xz -T1 -9e`. Single-threaded xz keeps the
  block-boundary layout (and therefore the SHA-512) host-CPU
  independent.
- `locks/mozjs128.lock`: refreshed `input-fingerprint` to
  reflect the new component definition.
- `specs/m/mozjs128/{mozjs128.spec,sources}`: re-rendered:
  bumps `release_number` to 10, swaps the `sources` SHA-512 to
  the modified-tarball hash, adds a `%changelog` entry.
@PawelWMS PawelWMS force-pushed the pawelwi/mozjs128-strip-aes-archive branch from af90ffa to 2648707 Compare May 20, 2026 17:34
@github-actions
Copy link
Copy Markdown

📄❌ Rendered specs are out of date

FIX: — run this and commit the result:

azldev component render mozjs128

Or download the fix patch and apply it:

gh run download 26179220266 -R microsoft/azurelinux -n rendered-specs-patch
git apply rendered-specs.patch
Category Count
Content diffs 1
Extra files (untracked) 0
Missing files (deleted) 0

Content diffs

`specs/m/mozjs128/mozjs128.spec`
--- committed/specs/m/mozjs128/mozjs128.spec
+++ rendered/specs/m/mozjs128/mozjs128.spec
@@ -262,7 +262,7 @@
 %changelog
 ## START: Generated by rpmautospec
 * Mon May 18 2026 Pawel Winogrodzki <pawelwi@microsoft.com> - 128.11.0-10
-- mozjs128: drop scanner-flagged aes_archive.zip from Source0
+- fix(mozjs128): drop scanner-flagged aes_archive.zip from source0
 
 * Thu Apr 30 2026 Daniel McIlvaney <damcilva@microsoft.com> - 128.11.0-9
 - feat: introduce deterministic commit resolution via Azure Linux lock file

@PawelWMS
Copy link
Copy Markdown
Contributor Author

Superseded by #17368 (merged 2026-05-21), which removed mozjs128 from Azure Linux 4.0 entirely along with the Cinnamon dependency cluster that was its only consumer. The targeted Source0-stripping approach in this PR is no longer needed.

@PawelWMS PawelWMS closed this May 21, 2026
@PawelWMS PawelWMS deleted the pawelwi/mozjs128-strip-aes-archive branch May 21, 2026 21:36
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