coverity-scan.docker 5.2 KB

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