E45E How to build base images? · Issue #14151 · google/oss-fuzz · GitHub
[go: up one dir, main page]

Skip to content

How to build base images? #14151

@DavidKorczynski

Description

@DavidKorczynski

Following the recent changes in base images, it's unclear how to build them now.

Previously, we could run:

git clone https://github.com/google/oss-fuzz
cd oss-fuzz
infra/base-images/all.sh

This is no longer available.

The instructions

# Usage:
# # Build the 'latest' version of all images.
# ./all.sh
#
# # Build the 'ubuntu-24-04' version of all images.
doesn't work for me:

git clone https://github.com/google/oss-fuzz
cd oss-fuzz/infra/base-images
./all.sh
...
+ VERSION_TAG=latest
+++ dirname ./all.sh
++ cd .
++ pwd
+ SCRIPT_DIR=/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images
++ python3 /home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images/list_images.py
Traceback (most recent call last):
  File "/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images/list_images.py", line 30, in <module>
    import base_images
  File "/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/build/functions/base_images.py", line 32, in <module>
    import build_lib
  File "/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/build/functions/build_lib.py", line 39, in <module>
    from oauth2client import service_account as service_account_lib
ModuleNotFoundError: No module named 'oauth2client'
+ IMAGE_LIST=

Furthermore, after installing various Python modules:

$ ./all.sh 
+ VERSION_TAG=latest
+++ dirname ./all.sh
++ cd .
++ pwd
+ SCRIPT_DIR=/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images
++ python3 /home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images/list_images.py
/home/dav/code/oss-fuzz-base-images/oss-fuzz/.venv/lib/python3.11/site-packages/google/api_core/__init__.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import get_distribution
Traceback (most recent call last):
  File "/home/dav/code/oss-fuzz-base-images/oss-fuzz/infra/base-images/list_images.py", line 32, in <module>
    for image_config in base_images.BASE_IMAGES:
                        ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'base_images' has no attribute 'BASE_IMAGES'. Did you mean: 'BASE_IMAGE_DEFS'?
+ IMAGE_LIST=

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0