19edfa358SPeter Maydell# syntax=docker/dockerfile:1.0.0-experimental 29edfa358SPeter Maydell# 39edfa358SPeter Maydell# Docker setup for running the "Coverity Scan" tools over the source 49edfa358SPeter Maydell# tree and uploading them to the website, as per 59edfa358SPeter Maydell# https://scan.coverity.com/projects/qemu/builds/new 69edfa358SPeter Maydell# We do this on a fixed config (currently Fedora 30 with a known 79edfa358SPeter Maydell# set of dependencies and a configure command that enables a specific 89edfa358SPeter Maydell# set of options) so that random changes don't result in our accidentally 99edfa358SPeter Maydell# dropping some files from the scan. 109edfa358SPeter Maydell# 119edfa358SPeter Maydell# We don't build on top of the fedora.docker file because we don't 129edfa358SPeter Maydell# want to accidentally change or break the scan config when that 139edfa358SPeter Maydell# is updated. 149edfa358SPeter Maydell 159edfa358SPeter Maydell# The work of actually doing the build is handled by the 169edfa358SPeter Maydell# run-coverity-scan script. 179edfa358SPeter Maydell 18*32a9d735SPaolo BonziniFROM registry.fedoraproject.org/fedora:37 19*32a9d735SPaolo Bonzini 20*32a9d735SPaolo BonziniRUN dnf install -y nosync && \ 21*32a9d735SPaolo Bonzini echo -e '#!/bin/sh\n\ 22*32a9d735SPaolo Bonziniif test -d /usr/lib64\n\ 23*32a9d735SPaolo Bonzinithen\n\ 24*32a9d735SPaolo Bonzini export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\ 25*32a9d735SPaolo Bonzinielse\n\ 26*32a9d735SPaolo Bonzini export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\ 27*32a9d735SPaolo Bonzinifi\n\ 28*32a9d735SPaolo Bonziniexec "$@"' > /usr/bin/nosync && \ 29*32a9d735SPaolo Bonzini chmod +x /usr/bin/nosync && \ 30*32a9d735SPaolo Bonzini nosync dnf update -y && \ 31*32a9d735SPaolo Bonzini nosync dnf install -y \ 32*32a9d735SPaolo Bonzini SDL2-devel \ 33*32a9d735SPaolo Bonzini SDL2_image-devel \ 349edfa358SPeter Maydell alsa-lib-devel \ 35*32a9d735SPaolo Bonzini bash \ 369edfa358SPeter Maydell bc \ 37*32a9d735SPaolo Bonzini bison \ 389edfa358SPeter Maydell brlapi-devel \ 399edfa358SPeter Maydell bzip2 \ 409edfa358SPeter Maydell bzip2-devel \ 41*32a9d735SPaolo Bonzini ca-certificates \ 42*32a9d735SPaolo Bonzini capstone-devel \ 439edfa358SPeter Maydell ccache \ 449edfa358SPeter Maydell clang \ 45*32a9d735SPaolo Bonzini ctags \ 469edfa358SPeter Maydell cyrus-sasl-devel \ 47*32a9d735SPaolo Bonzini daxctl-devel \ 489edfa358SPeter Maydell dbus-daemon \ 499edfa358SPeter Maydell device-mapper-multipath-devel \ 50*32a9d735SPaolo Bonzini diffutils \ 519edfa358SPeter Maydell findutils \ 52*32a9d735SPaolo Bonzini flex \ 53*32a9d735SPaolo Bonzini fuse3-devel \ 549edfa358SPeter Maydell gcc \ 559edfa358SPeter Maydell gcc-c++ \ 56*32a9d735SPaolo Bonzini gcovr \ 57*32a9d735SPaolo Bonzini genisoimage \ 589edfa358SPeter Maydell gettext \ 599edfa358SPeter Maydell git \ 609edfa358SPeter Maydell glib2-devel \ 61*32a9d735SPaolo Bonzini glib2-static \ 62*32a9d735SPaolo Bonzini glibc-langpack-en \ 63*32a9d735SPaolo Bonzini glibc-static \ 649edfa358SPeter Maydell glusterfs-api-devel \ 659edfa358SPeter Maydell gnutls-devel \ 669edfa358SPeter Maydell gtk3-devel \ 679edfa358SPeter Maydell hostname \ 68*32a9d735SPaolo Bonzini jemalloc-devel \ 69*32a9d735SPaolo Bonzini json-c-devel \ 709edfa358SPeter Maydell libaio-devel \ 719edfa358SPeter Maydell libasan \ 729edfa358SPeter Maydell libattr-devel \ 73*32a9d735SPaolo Bonzini libbpf-devel \ 74*32a9d735SPaolo Bonzini libcacard-devel \ 759edfa358SPeter Maydell libcap-ng-devel \ 76*32a9d735SPaolo Bonzini libcmocka-devel \ 779edfa358SPeter Maydell libcurl-devel \ 78*32a9d735SPaolo Bonzini libdrm-devel \ 799edfa358SPeter Maydell libepoxy-devel \ 809edfa358SPeter Maydell libfdt-devel \ 81*32a9d735SPaolo Bonzini libffi-devel \ 82*32a9d735SPaolo Bonzini libgcrypt-devel \ 839edfa358SPeter Maydell libiscsi-devel \ 849edfa358SPeter Maydell libjpeg-devel \ 859edfa358SPeter Maydell libnfs-devel \ 86*32a9d735SPaolo Bonzini libpmem-devel \ 879edfa358SPeter Maydell libpng-devel \ 889edfa358SPeter Maydell librbd-devel \ 899edfa358SPeter Maydell libseccomp-devel \ 90*32a9d735SPaolo Bonzini libselinux-devel \ 91*32a9d735SPaolo Bonzini libslirp-devel \ 929edfa358SPeter Maydell libssh-devel \ 93*32a9d735SPaolo Bonzini libtasn1-devel \ 949edfa358SPeter Maydell libubsan \ 95*32a9d735SPaolo Bonzini liburing-devel \ 969edfa358SPeter Maydell libusbx-devel \ 979edfa358SPeter Maydell libzstd-devel \ 989edfa358SPeter Maydell llvm \ 99*32a9d735SPaolo Bonzini lttng-ust-devel \ 1009edfa358SPeter Maydell lzo-devel \ 1019edfa358SPeter Maydell make \ 102*32a9d735SPaolo Bonzini mesa-libgbm-devel \ 103*32a9d735SPaolo Bonzini meson \ 1049edfa358SPeter Maydell ncurses-devel \ 1059edfa358SPeter Maydell nettle-devel \ 106*32a9d735SPaolo Bonzini ninja-build \ 107*32a9d735SPaolo Bonzini nmap-ncat \ 1089edfa358SPeter Maydell numactl-devel \ 109*32a9d735SPaolo Bonzini openssh-clients \ 110*32a9d735SPaolo Bonzini pam-devel \ 111*32a9d735SPaolo Bonzini pcre-static \ 1129edfa358SPeter Maydell pixman-devel \ 113*32a9d735SPaolo Bonzini pkgconfig \ 1149edfa358SPeter Maydell pulseaudio-libs-devel \ 1159edfa358SPeter Maydell python3 \ 116*32a9d735SPaolo Bonzini python3-PyYAML \ 117*32a9d735SPaolo Bonzini python3-numpy \ 118*32a9d735SPaolo Bonzini python3-opencv \ 119*32a9d735SPaolo Bonzini python3-pillow \ 120*32a9d735SPaolo Bonzini python3-pip \ 1219edfa358SPeter Maydell python3-sphinx \ 122*32a9d735SPaolo Bonzini python3-sphinx_rtd_theme \ 1239edfa358SPeter Maydell rdma-core-devel \ 124*32a9d735SPaolo Bonzini rpm \ 125*32a9d735SPaolo Bonzini sed \ 1269edfa358SPeter Maydell snappy-devel \ 127*32a9d735SPaolo Bonzini socat \ 1289edfa358SPeter Maydell sparse \ 129*32a9d735SPaolo Bonzini spice-protocol \ 1309edfa358SPeter Maydell spice-server-devel \ 1319edfa358SPeter Maydell systemd-devel \ 1329edfa358SPeter Maydell systemtap-sdt-devel \ 1339edfa358SPeter Maydell tar \ 134*32a9d735SPaolo Bonzini tesseract \ 135*32a9d735SPaolo Bonzini tesseract-langpack-eng \ 1369edfa358SPeter Maydell usbredir-devel \ 137*32a9d735SPaolo Bonzini util-linux \ 1389edfa358SPeter Maydell virglrenderer-devel \ 1399edfa358SPeter Maydell vte291-devel \ 1409edfa358SPeter Maydell which \ 1419edfa358SPeter Maydell xen-devel \ 1429edfa358SPeter Maydell xfsprogs-devel \ 143*32a9d735SPaolo Bonzini zlib-devel \ 144*32a9d735SPaolo Bonzini zlib-static \ 145*32a9d735SPaolo Bonzini zstd && \ 146*32a9d735SPaolo Bonzini nosync dnf autoremove -y && \ 147*32a9d735SPaolo Bonzini nosync dnf clean all -y && \ 148*32a9d735SPaolo Bonzini rpm -qa | sort > /packages.txt && \ 149*32a9d735SPaolo Bonzini mkdir -p /usr/libexec/ccache-wrappers && \ 150*32a9d735SPaolo Bonzini ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \ 151*32a9d735SPaolo Bonzini ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ 152*32a9d735SPaolo Bonzini ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \ 153*32a9d735SPaolo Bonzini ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ 154*32a9d735SPaolo Bonzini ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc 1559edfa358SPeter Maydell 156*32a9d735SPaolo BonziniENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" 157*32a9d735SPaolo BonziniENV LANG "en_US.UTF-8" 158*32a9d735SPaolo BonziniENV MAKE "/usr/bin/make" 159*32a9d735SPaolo BonziniENV NINJA "/usr/bin/ninja" 160*32a9d735SPaolo BonziniENV PYTHON "/usr/bin/python3" 161*32a9d735SPaolo BonziniENV QEMU_CONFIGURE_OPTS --meson=internal 162*32a9d735SPaolo Bonzini 163*32a9d735SPaolo BonziniRUN dnf install -y curl wget 1649edfa358SPeter MaydellENV COVERITY_TOOL_BASE=/coverity-tools 1652e90470eSPaolo BonziniCOPY coverity_tool.tgz coverity_tool.tgz 1662e90470eSPaolo BonziniRUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz 1679edfa358SPeter MaydellCOPY run-coverity-scan run-coverity-scan 168