Skip to content

mozjs128: drop scanner-flagged aes_archive.zip from Source0#17340

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

mozjs128: drop scanner-flagged aes_archive.zip from Source0#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 2 times, most recently from 7f6d4ff to ddc3c17 Compare May 18, 2026 22:54
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 ddc3c17 to af90ffa Compare May 18, 2026 23:41
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