1 # syntax=docker/dockerfile:1.0.0-experimental
3 # Docker setup for running the "Coverity Scan" tools over the source
4 # tree and uploading them to the website, as per
5 # https://scan.coverity.com/projects/qemu/builds/new
6 # We do this on a fixed config (currently Fedora 30 with a known
7 # set of dependencies and a configure command that enables a specific
8 # set of options) so that random changes don't result in our accidentally
9 # dropping some files from the scan.
11 # We don't build on top of the fedora.docker file because we don't
12 # want to accidentally change or break the scan config when that
15 # The work of actually doing the build is handled by the
16 # run-coverity-scan script.
18 FROM registry.fedoraproject.org/fedora:37
20 RUN dnf install -y nosync && \
22 if test -d /usr/lib64\n\
24 export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
26 export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
28 exec "$@"' > /usr/bin/nosync && \
29 chmod +x /usr/bin/nosync && \
30 nosync dnf update -y && \
31 nosync dnf install -y \
49 device-mapper-multipath-devel \
114 pulseaudio-libs-devel \
122 python3-sphinx_rtd_theme \
132 systemtap-sdt-devel \
135 tesseract-langpack-eng \
138 virglrenderer-devel \
146 nosync dnf autoremove -y && \
147 nosync dnf clean all -y && \
148 rpm -qa | sort > /packages.txt && \
149 mkdir -p /usr/libexec/ccache-wrappers && \
150 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
151 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
152 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
153 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
154 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
156 ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
157 ENV LANG "en_US.UTF-8"
158 ENV MAKE "/usr/bin/make"
159 ENV NINJA "/usr/bin/ninja"
160 ENV PYTHON "/usr/bin/python3"
161 ENV QEMU_CONFIGURE_OPTS --meson=internal
163 RUN dnf install -y curl wget
164 ENV COVERITY_TOOL_BASE=/coverity-tools
165 COPY coverity_tool.tgz coverity_tool.tgz
166 RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz
167 COPY run-coverity-scan run-coverity-scan