Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf145121

Browse files
committed
Fix Atheris install in local dev helper Docker image
The Atheris package bundles a binary that supplies libFuzzer on somehost machines, but in some cases (such as ARM based mac hosts) Atherisseems to require building libFuzzer at install time while pip builds thewheel. In the latter case, clang and related dependencies must bepresent and available for the build, which itself requires using a non"slim" version of the Python base image and not passing the`--no-install-recommends` flag to `apt-get install` as both prevent therequired related libraries from being automatically installed.It is also worth noting that at the time of this commit, the defaultversion of LLVM & Clang installed when `clang` is installed from `apt`is version 14, while the latest stable version is 17 and OSS-Fuzz uses15. The decision to install the default version (14) available via thedebian repos was intentional because a) it appears to work fine for ourneeds and Atheris version b) specifying a different version requiresmore complexity depending on install method, but the goal of thisDockerfile is simplicity and low maintenance.If it becomes neccissary to upgrade Clang/LLVM in the future, one optionto consider besides installing from source is the apt repositorymaintained by the LLVM project:https://apt.llvm.org/See the discussion in this issue for additional context to this change:#1904
1 parentfdce837 commitf145121

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎fuzzing/local-dev-helpers/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22

33
# Use the same Python version as OSS-Fuzz to accidental incompatibilities in test code
4-
FROM python:3.8-slim
4+
FROM python:3.8-bookworm
55

66
LABEL project="GitPython Fuzzing Local Dev Helper"
77

@@ -11,12 +11,12 @@ COPY . .
1111

1212
# Update package managers, install necessary packages, and cleanup unnecessary files in a single RUN to keep the image smaller.
1313
RUN apt-get update && \
14-
apt-get install --no-install-recommends -y git && \
14+
apt-get install -y git clang && \
1515
python -m pip install --upgrade pip && \
1616
python -m pip install atheris && \
1717
python -m pip install -e . && \
1818
apt-get clean && \
1919
apt-get autoremove -y && \
20-
rm -rf /var/lib/apt/lists/* /root/.cache
20+
rm -rf /var/lib/apt/lists/*
2121

2222
CMD ["bash"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp