Skip to content

refactor: replacing modify_sources script with toml driven archive ov…#17816

Draft
Tonisal-byte wants to merge 1 commit into
4.0from
asalinas/replace-modify-source-script
Draft

refactor: replacing modify_sources script with toml driven archive ov…#17816
Tonisal-byte wants to merge 1 commit into
4.0from
asalinas/replace-modify-source-script

Conversation

@Tonisal-byte

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings June 26, 2026 20:42

Copilot AI 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.

Pull request overview

This PR refactors how scanner-flagged test fixtures are stripped from upstream source archives across nine components. It replaces the previous mechanism — a source-files entry with replace-upstream = true pointing at a pre-repacked tarball in the AZL lookaside (produced by a per-component modify_source.sh) — with file-remove / file-search-replace overlays that target paths inside the source archive (e.g. firefox-148.0.source.tar.xz/dom/base/crashtests/607222.html). The corresponding rendered specs and sources manifests are regenerated.

Changes:

  • Convert 9 components (yara, rubygem-pdf-reader, libkml, libabigail, kf6-karchive, gdal, firefox, exfatprogs, espeak-ng, apache-commons-compress) from replace-upstream repacked tarballs to in-tree archive overlays, plus accompanying source/spec edits (e.g. yara Makefile.am, libkml zip_file_test.cc, rubygem reader_spec_helper.rb).
  • Regenerate rendered sources (now pointing at the unmodified upstream tarball hash) and bump Release for each component.
  • Update the explanatory comments in each comp.toml to describe the overlay approach.

A few cross-cutting concerns: the rendered sources now reference the genuine upstream tarball (which still contains the AV-flagged content), so it must be verified that the produced SRPM no longer carries those files; three rendered specs contain azldev <azldev@local> "Local changes (uncommitted)" placeholder changelogs (a non-finalized render that will fail Check Rendered Specs); the orphaned modify_source.sh scripts and some stale comments remain. Note also that no locks/*.lock updates appear in this change set — overlay edits change the component fingerprint, so locks likely need refreshing for the Update Locks check.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
base/comps/firefox/firefox.comp.toml Replace repacked-tarball source with two file-remove overlays; comment still references orphaned modify_source.sh/REMOVE_PATHS
base/comps/gdal/gdal.comp.toml file-remove overlay; description regresses from AV/Trojan rationale to "reduce source size"
base/comps/libkml/libkml.comp.toml file-remove + file-search-replace; brace-matching regex and its justifying comment are unsafe
base/comps/libabigail/libabigail.comp.toml file-remove directory glob + existing patch overlay; residual "repacked Source0" wording
base/comps/kf6-karchive/kf6-karchive.comp.toml Two file-remove overlays replacing repacked tarball
base/comps/exfatprogs/exfatprogs.comp.toml tests/** file-remove overlay
base/comps/espeak-ng/espeak-ng.comp.toml file-remove of PHP webshell demo fixture
base/comps/apache-commons-compress/apache-commons-compress.comp.toml Four file-remove overlays
base/comps/yara/yara.comp.toml Eight file-remove + four Makefile.am file-search-replace overlays
base/comps/rubygem-pdf-reader/rubygem-pdf-reader.comp.toml 35 file-remove overlays + two Ruby helper file-search-replace overlays
specs/f/firefox/sources Hash reverts to genuine upstream tarball (still contains flagged files)
specs/{e,l,k,g,a,r,y}/*/sources Same upstream-hash revert across converted components
specs/y/yara/yara.spec, specs/e/exfatprogs/…, specs/a/apache-commons-compress/… Release bump + non-finalized azldev@local changelog entries
specs/{l,k,g,r}//.spec Release-tag bumps

Comment thread specs/f/firefox/sources
SHA512 (cbindgen-vendor.tar.xz) = bea420e66bdd1c7c944655dd3e01abd6e7d6ac4b245c7ee190f31d800f7786f21e5cae11715b479bf795f4369d18c40dc12df19e0b643664f2f78e5c8a681415
SHA512 (firefox-langpacks-148.0-20260223.tar.xz) = 7e5d283e1a83787984e63901c915f6672eae48c38c5fd64b9f8055f154d83be77f76cb77de2048f2ea263353313a90eefa54b7c173533bec2db4dddf32436302
SHA512 (firefox-148.0.source.tar.xz) = c9c9f29fbd8f889bf3cf3d88776e1a62da7b2a65d386538d2bd048dd70caaaf8324adb5303a5fa9aa73c2cf6eb9f89cb4b34f9e67c4208d88636dd5376af90a9
SHA512 (firefox-148.0.source.tar.xz) = b0e862091f3a07a02890f6414e77b433893364a8beaf522d440e97ed0060c9b14bdb2fffdecdf12dca849efce8c57d95a534b23e04259d83a96ee8f29e078349
Comment thread specs/y/yara/yara.spec Outdated
Comment thread specs/e/exfatprogs/exfatprogs.spec Outdated
Comment thread specs/a/apache-commons-compress/apache-commons-compress.spec Outdated
[[components.gdal.overlays]]
type = "file-remove"
file = "gdalautotest-3.11.5.tar.gz/gcore/data/zero_5GB_sozip_of_sozip.zip"
description = "Remove large test fixture to reduce source size"
Comment on lines +10 to +16
# The sed range `TEST_F(ZipFileTest, TestBadTooLarge) {` through the next
# column-0 `}` is safe because nested braces inside the test body are
# always indented.
[[components.libkml.overlays]]
type = "file-search-replace"
file = "libkml-1.3.0.tar.gz/tests/kml/base/zip_file_test.cc"
regex = 'TEST_F\(ZipFileTest, TestBadTooLarge\) \{[^}]*\}\n'
Comment on lines +146 to +151
# Archive overlays strip the scanner-flagged fixtures from upstream Source0
# during source preparation, avoiding a separate modified-source tarball.
#
# When bumping the firefox version (or changing REMOVE_PATHS):
# 1. Edit VERSION and UPSTREAM_SHA512 in modify_source.sh.
# 2. Re-run the script and copy the new SHA-512 into the source-files entry.
# 3. Upload the new tarball to the modified-source lookaside (see script output).
# 1. Update the overlay paths below if upstream fixture paths change.
# 2. Re-render and build to verify the archive overlays still apply.
@Tonisal-byte Tonisal-byte force-pushed the asalinas/replace-modify-source-script branch from 6919a49 to 1caf30d Compare June 26, 2026 21:52
@github-actions

Copy link
Copy Markdown

📄❌ Rendered specs are out of date

FIX: — run this and commit the result:

azldev component render -a --clean-stale

Or download the fix patch and apply it:

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

Files to add

These files are produced by azldev component render but are missing from your branch. Add them.

  • specs/a/apache-commons-compress/RENDER_FAILED
  • specs/e/espeak-ng/RENDER_FAILED
  • specs/e/exfatprogs/RENDER_FAILED
  • specs/f/firefox/RENDER_FAILED
  • specs/g/gdal/RENDER_FAILED
  • specs/k/kf6-karchive/RENDER_FAILED
  • specs/l/libabigail/RENDER_FAILED
  • specs/l/libkml/RENDER_FAILED
  • specs/r/rubygem-pdf-reader/RENDER_FAILED
  • specs/y/yara/RENDER_FAILED

Files to remove

These files are in your branch but are not produced by render. Remove them.

  • specs/a/apache-commons-compress/0001-Remove-Brotli-compressor.patch
  • specs/a/apache-commons-compress/0002-Remove-ZSTD-compressor.patch
  • specs/a/apache-commons-compress/0003-Remove-Pack200-compressor.patch
  • specs/a/apache-commons-compress/0004-Replace-unmappable-character-with-oe.patch
  • specs/a/apache-commons-compress/apache-commons-compress.spec
  • specs/a/apache-commons-compress/sources
  • specs/e/espeak-ng/espeak-ng-1.51-CVE-2023-49990-4.patch
  • specs/e/espeak-ng/espeak-ng-1.51-add-text-to-phonemes-with-terminator.patch
  • specs/e/espeak-ng/espeak-ng-1.51-add-translate-clause-with-terminator.patch
  • specs/e/espeak-ng/espeak-ng.spec
  • specs/e/espeak-ng/sources
  • specs/e/exfatprogs/exfatprogs.spec
  • specs/e/exfatprogs/sources
  • specs/f/firefox/0001-GLIBCXX-fix-for-GCC-12.patch
  • specs/f/firefox/0025-Add-KDE-integration-to-Firefox-toolkit-parts.patch
  • specs/f/firefox/0026-Add-KDE-integration-to-Firefox.patch
  • specs/f/firefox/D278446.patch
  • specs/f/firefox/D278447.patch
  • specs/f/firefox/D278448.patch
  • specs/f/firefox/D278449.patch
  • specs/f/firefox/D278450.patch
  • specs/f/firefox/D280359.patch
  • specs/f/firefox/build-aarch64-skia.patch
  • specs/f/firefox/build-arm-libopus.patch
  • specs/f/firefox/build-c11-threads-avail.patch
  • specs/f/firefox/build-seccomp.patch
  • specs/f/firefox/disable-openh264-download.patch
  • specs/f/firefox/distribution.ini.in
  • specs/f/firefox/fedora-customization.patch
  • specs/f/firefox/firefox-enable-addons.patch
  • specs/f/firefox/firefox-gcc-13-build.patch
  • specs/f/firefox/firefox-gcc-15.0-s390.patch
  • specs/f/firefox/firefox-gcc-always-inline.patch
  • specs/f/firefox/firefox-gcc-build.patch
  • specs/f/firefox/firefox-i686-build.patch
  • specs/f/firefox/firefox-mozconfig
  • specs/f/firefox/firefox-nss-addon-hack.patch
  • specs/f/firefox/firefox-redhat-default-prefs.js
  • specs/f/firefox/firefox-symbolic.svg
  • specs/f/firefox/firefox-wayland.desktop
  • specs/f/firefox/firefox-wayland.sh.in
  • specs/f/firefox/firefox-x11.desktop
  • specs/f/firefox/firefox-x11.sh.in
  • specs/f/firefox/firefox.1
  • specs/f/firefox/firefox.appdata.xml.in
  • specs/f/firefox/firefox.azl.macros
  • specs/f/firefox/firefox.desktop
  • specs/f/firefox/firefox.sh.in
  • specs/f/firefox/firefox.spec
  • specs/f/firefox/google-api-key

… and 57 more file(s).

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.

2 participants