master
docker 166 lines 5.19 KB
Raw
1 # syntax=docker/dockerfile:1.0.0-experimental
2 #
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.
10 #
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
13 # is updated.
14
15 # The work of actually doing the build is handled by the
16 # run-coverity-scan script.
17
18 FROM registry.fedoraproject.org/fedora:37
19
20 RUN dnf install -y nosync && \
21 echo -e '#!/bin/sh\n\
22 if test -d /usr/lib64\n\
23 then\n\
24 export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
25 else\n\
26 export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
27 fi\n\
28 exec "$@"' > /usr/bin/nosync && \
29 chmod +x /usr/bin/nosync && \
30 nosync dnf update -y && \
31 nosync dnf install -y \
32 SDL2-devel \
33 SDL2_image-devel \
34 alsa-lib-devel \
35 bash \
36 bc \
37 bison \
38 brlapi-devel \
39 bzip2 \
40 bzip2-devel \
41 ca-certificates \
42 capstone-devel \
43 ccache \
44 clang \
45 ctags \
46 cyrus-sasl-devel \
47 daxctl-devel \
48 dbus-daemon \
49 device-mapper-multipath-devel \
50 diffutils \
51 findutils \
52 flex \
53 fuse3-devel \
54 gcc \
55 gcc-c++ \
56 gcovr \
57 genisoimage \
58 gettext \
59 git \
60 glib2-devel \
61 glib2-static \
62 glibc-langpack-en \
63 glibc-static \
64 gnutls-devel \
65 gtk3-devel \
66 hostname \
67 jemalloc-devel \
68 json-c-devel \
69 libaio-devel \
70 libasan \
71 libattr-devel \
72 libbpf-devel \
73 libcacard-devel \
74 libcap-ng-devel \
75 libcmocka-devel \
76 libcurl-devel \
77 libdrm-devel \
78 libepoxy-devel \
79 libfdt-devel \
80 libffi-devel \
81 libgcrypt-devel \
82 libiscsi-devel \
83 libjpeg-devel \
84 libnfs-devel \
85 libpmem-devel \
86 libpng-devel \
87 librbd-devel \
88 libseccomp-devel \
89 libselinux-devel \
90 libslirp-devel \
91 libssh-devel \
92 libtasn1-devel \
93 libubsan \
94 liburing-devel \
95 libusbx-devel \
96 libzstd-devel \
97 llvm \
98 lttng-ust-devel \
99 lzo-devel \
100 make \
101 mesa-libgbm-devel \
102 meson \
103 ncurses-devel \
104 nettle-devel \
105 ninja-build \
106 nmap-ncat \
107 numactl-devel \
108 openssh-clients \
109 pam-devel \
110 pcre-static \
111 pixman-devel \
112 pkgconfig \
113 pulseaudio-libs-devel \
114 python3 \
115 python3-PyYAML \
116 python3-numpy \
117 python3-opencv \
118 python3-pillow \
119 python3-pip \
120 python3-sphinx \
121 python3-sphinx_rtd_theme \
122 rdma-core-devel \
123 rpm \
124 sed \
125 snappy-devel \
126 socat \
127 sparse \
128 spice-protocol \
129 spice-server-devel \
130 systemd-devel \
131 systemtap-sdt-devel \
132 tar \
133 tesseract \
134 tesseract-langpack-eng \
135 usbredir-devel \
136 util-linux \
137 virglrenderer-devel \
138 vte291-devel \
139 which \
140 xen-devel \
141 xfsprogs-devel \
142 zlib-devel \
143 zlib-static \
144 zstd && \
145 nosync dnf autoremove -y && \
146 nosync dnf clean all -y && \
147 rpm -qa | sort > /packages.txt && \
148 mkdir -p /usr/libexec/ccache-wrappers && \
149 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
150 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
151 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
152 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
153 ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
154
155 ENV CCACHE_WRAPPERSDIR=/usr/libexec/ccache-wrappers
156 ENV LANG=en_US.UTF-8
157 ENV MAKE=/usr/bin/make
158 ENV NINJA=/usr/bin/ninja
159 ENV PYTHON=/usr/bin/python3
160 ENV QEMU_CONFIGURE_OPTS=--meson=internal
161
162 RUN dnf install -y curl wget
163 ENV COVERITY_TOOL_BASE=/coverity-tools
164 COPY coverity_tool.tgz coverity_tool.tgz
165 RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz
166 COPY run-coverity-scan run-coverity-scan