Skip to content

Conversation

hunsche
Copy link

@hunsche hunsche commented Sep 5, 2025

Context

This PR is a significant step in modernizing the OSS-Fuzz infrastructure by upgrading the base images from Ubuntu 20.04 to 24.04. The primary motivation is to address the upcoming End-of-Life (EOL) of Ubuntu 20.04, ensuring the project remains secure and maintainable.

Instead of a simple replacement, this work refactors the entire infra/base-images directory to support parallel builds for both Ubuntu 20.04 and 24.04, ensuring a smooth and verifiable transition.

Description of Changes

  • Dual Dockerfile Structure: Replaced the single, generic Dockerfile for each base image with two version-specific files: ubuntu20-04.Dockerfile and ubuntu24-04.Dockerfile.
  • Version-Aware Scripts: Modified various build and installation scripts (e.g., fuzzbench_install_dependencies, install_swift.sh) to detect the underlying Ubuntu version and install appropriate packages or apply necessary patches.
  • Dependency Tree Migration: Systematically processed each base image according to its dependency tree, starting from base-image and finishing with base-runner-debug, to ensure stability at each step.
  • Comprehensive Documentation:
    • Added a BUILD_ANALYSIS_AND_REPORT.md file for each image to document the migration process, issues encountered, and their resolutions.
    • Created a top-level CHANGELOG.md in infra/base-images to summarize the entire refactoring effort.
  • Build Fixes: Resolved multiple version-specific issues, including pytype and Orange3 incompatibilities in fuzzbench and linker errors related to PIE in base-builder.

How to Test

A reviewer can verify these changes by building all the base images locally using the provided script.

  1. Check out this branch.
  2. From the root of the repository, run the build command:
    infra/base-images/all.sh
  3. The script should complete successfully, building all image variants for both Ubuntu 20.04 and 24.04 without errors.

Related Issues

  • This is part of the work for the main tracking issue: b/441792142
  • This PR specifically addresses the task: "Refactor the Docker image infrastructure in infra/base-images to support both Ubuntu 20.04 and 24.04".

Next Steps

With the base images updated, the next steps will involve integrating these new Ubuntu 24.04 images into the main CI/CD workflows and updating the project-wide documentation to reflect the new build process.

hunsche and others added 2 commits September 5, 2025 18:38
This commit refactors the base image infrastructure in `infra/base-images` to support building on both Ubuntu 20.04 and Ubuntu 24.04.

Key changes include:

- **Dual Dockerfiles:** For each base image, the single `Dockerfile` has been replaced by version-specific `ubuntu20-04.Dockerfile` and `ubuntu24-04.Dockerfile`.
- **Dependency Tree Migration:** All images were migrated one by one, following the dependency tree to ensure a stable build process.
- **Script and Config Updates:** Build scripts and configurations were updated to handle package differences and incompatibilities between Ubuntu versions (e.g., pytype, Orange3, python-dev packages).
- **Build Documentation:** Added `BUILD_ANALYSIS_AND_REPORT.md` for each image to document the migration process, issues encountered, and resolutions.
- **Changelog:** A new `CHANGELOG.md` summarizes the entire refactoring effort.

This change modernizes the build environment and ensures the project's fuzzing infrastructure remains up-to-date.
@hunsche
Copy link
Author

hunsche commented Sep 5, 2025

/gcbrun

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