* [PATCH] coverity: unify Fedora dockerfiles
@ 2023-03-31 17:48 Paolo Bonzini
2023-04-18 15:15 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-03-31 17:48 UTC (permalink / raw)
To: qemu-devel
The Fedora CI and coverity runs are using a slightly different set of
packages. Copy most of the content over from tests/docker while
keeping the commands at the end that unpack the tools.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/coverity-scan/coverity-scan.docker | 250 ++++++++++++---------
1 file changed, 145 insertions(+), 105 deletions(-)
diff --git a/scripts/coverity-scan/coverity-scan.docker b/scripts/coverity-scan/coverity-scan.docker
index 6f60a52d23..a349578526 100644
--- a/scripts/coverity-scan/coverity-scan.docker
+++ b/scripts/coverity-scan/coverity-scan.docker
@@ -15,112 +15,152 @@
# The work of actually doing the build is handled by the
# run-coverity-scan script.
-FROM fedora:30
-ENV PACKAGES \
- alsa-lib-devel \
- bc \
- brlapi-devel \
- bzip2 \
- bzip2-devel \
- ccache \
- clang \
- curl \
- cyrus-sasl-devel \
- dbus-daemon \
- device-mapper-multipath-devel \
- findutils \
- gcc \
- gcc-c++ \
- gettext \
- git \
- glib2-devel \
- glusterfs-api-devel \
- gnutls-devel \
- gtk3-devel \
- hostname \
- libaio-devel \
- libasan \
- libattr-devel \
- libblockdev-mpath-devel \
- libcap-devel \
- libcap-ng-devel \
- libcurl-devel \
- libepoxy-devel \
- libfdt-devel \
- libgbm-devel \
- libiscsi-devel \
- libjpeg-devel \
- libpmem-devel \
- libnfs-devel \
- libpng-devel \
- librbd-devel \
- libseccomp-devel \
- libssh-devel \
- libubsan \
- libudev-devel \
- libusbx-devel \
- libzstd-devel \
- llvm \
- lzo-devel \
- make \
- mingw32-bzip2 \
- mingw32-curl \
- mingw32-glib2 \
- mingw32-gmp \
- mingw32-gnutls \
- mingw32-gtk3 \
- mingw32-libjpeg-turbo \
- mingw32-libpng \
- mingw32-libtasn1 \
- mingw32-nettle \
- mingw32-nsis \
- mingw32-pixman \
- mingw32-pkg-config \
- mingw32-SDL2 \
- mingw64-bzip2 \
- mingw64-curl \
- mingw64-glib2 \
- mingw64-gmp \
- mingw64-gnutls \
- mingw64-gtk3 \
- mingw64-libjpeg-turbo \
- mingw64-libpng \
- mingw64-libtasn1 \
- mingw64-nettle \
- mingw64-pixman \
- mingw64-pkg-config \
- mingw64-SDL2 \
- ncurses-devel \
- nettle-devel \
- numactl-devel \
- perl \
- perl-Test-Harness \
- pixman-devel \
- pulseaudio-libs-devel \
- python3 \
- python3-sphinx \
- PyYAML \
- rdma-core-devel \
- SDL2-devel \
- snappy-devel \
- sparse \
- spice-server-devel \
- systemd-devel \
- systemtap-sdt-devel \
- tar \
- usbredir-devel \
- virglrenderer-devel \
- vte291-devel \
- wget \
- which \
- xen-devel \
- xfsprogs-devel \
- zlib-devel
-ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+FROM registry.fedoraproject.org/fedora:37
-RUN dnf install -y $PACKAGES
-RUN rpm -q $PACKAGES | sort > /packages.txt
-ENV PATH $PATH:/usr/libexec/python3-sphinx/
+RUN dnf install -y nosync && \
+ echo -e '#!/bin/sh\n\
+if test -d /usr/lib64\n\
+then\n\
+ export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
+else\n\
+ export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
+fi\n\
+exec "$@"' > /usr/bin/nosync && \
+ chmod +x /usr/bin/nosync && \
+ nosync dnf update -y && \
+ nosync dnf install -y \
+ SDL2-devel \
+ SDL2_image-devel \
+ alsa-lib-devel \
+ bash \
+ bc \
+ bison \
+ brlapi-devel \
+ bzip2 \
+ bzip2-devel \
+ ca-certificates \
+ capstone-devel \
+ ccache \
+ clang \
+ ctags \
+ cyrus-sasl-devel \
+ daxctl-devel \
+ dbus-daemon \
+ device-mapper-multipath-devel \
+ diffutils \
+ findutils \
+ flex \
+ fuse3-devel \
+ gcc \
+ gcc-c++ \
+ gcovr \
+ genisoimage \
+ gettext \
+ git \
+ glib2-devel \
+ glib2-static \
+ glibc-langpack-en \
+ glibc-static \
+ glusterfs-api-devel \
+ gnutls-devel \
+ gtk3-devel \
+ hostname \
+ jemalloc-devel \
+ json-c-devel \
+ libaio-devel \
+ libasan \
+ libattr-devel \
+ libbpf-devel \
+ libcacard-devel \
+ libcap-ng-devel \
+ libcmocka-devel \
+ libcurl-devel \
+ libdrm-devel \
+ libepoxy-devel \
+ libfdt-devel \
+ libffi-devel \
+ libgcrypt-devel \
+ libiscsi-devel \
+ libjpeg-devel \
+ libnfs-devel \
+ libpmem-devel \
+ libpng-devel \
+ librbd-devel \
+ libseccomp-devel \
+ libselinux-devel \
+ libslirp-devel \
+ libssh-devel \
+ libtasn1-devel \
+ libubsan \
+ liburing-devel \
+ libusbx-devel \
+ libzstd-devel \
+ llvm \
+ lttng-ust-devel \
+ lzo-devel \
+ make \
+ mesa-libgbm-devel \
+ meson \
+ ncurses-devel \
+ nettle-devel \
+ ninja-build \
+ nmap-ncat \
+ numactl-devel \
+ openssh-clients \
+ pam-devel \
+ pcre-static \
+ pixman-devel \
+ pkgconfig \
+ pulseaudio-libs-devel \
+ python3 \
+ python3-PyYAML \
+ python3-numpy \
+ python3-opencv \
+ python3-pillow \
+ python3-pip \
+ python3-sphinx \
+ python3-sphinx_rtd_theme \
+ rdma-core-devel \
+ rpm \
+ sed \
+ snappy-devel \
+ socat \
+ sparse \
+ spice-protocol \
+ spice-server-devel \
+ systemd-devel \
+ systemtap-sdt-devel \
+ tar \
+ tesseract \
+ tesseract-langpack-eng \
+ usbredir-devel \
+ util-linux \
+ virglrenderer-devel \
+ vte291-devel \
+ which \
+ xen-devel \
+ xfsprogs-devel \
+ zlib-devel \
+ zlib-static \
+ zstd && \
+ nosync dnf autoremove -y && \
+ nosync dnf clean all -y && \
+ rpm -qa | sort > /packages.txt && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV QEMU_CONFIGURE_OPTS --meson=internal
+
+RUN dnf install -y curl wget
ENV COVERITY_TOOL_BASE=/coverity-tools
COPY coverity_tool.tgz coverity_tool.tgz
RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] coverity: unify Fedora dockerfiles
2023-03-31 17:48 [PATCH] coverity: unify Fedora dockerfiles Paolo Bonzini
@ 2023-04-18 15:15 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2023-04-18 15:15 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
On Fri, Mar 31, 2023 at 01:48:44PM -0400, Paolo Bonzini wrote:
> The Fedora CI and coverity runs are using a slightly different set of
> packages. Copy most of the content over from tests/docker while
> keeping the commands at the end that unpack the tools.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> scripts/coverity-scan/coverity-scan.docker | 250 ++++++++++++---------
> 1 file changed, 145 insertions(+), 105 deletions(-)
>
> diff --git a/scripts/coverity-scan/coverity-scan.docker b/scripts/coverity-scan/coverity-scan.docker
> index 6f60a52d23..a349578526 100644
> --- a/scripts/coverity-scan/coverity-scan.docker
> +++ b/scripts/coverity-scan/coverity-scan.docker
> @@ -15,112 +15,152 @@
> # The work of actually doing the build is handled by the
> # run-coverity-scan script.
snip
> + zstd && \
> + nosync dnf autoremove -y && \
> + nosync dnf clean all -y && \
> + rpm -qa | sort > /packages.txt && \
> + mkdir -p /usr/libexec/ccache-wrappers && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
> +
> +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
> +ENV LANG "en_US.UTF-8"
> +ENV MAKE "/usr/bin/make"
> +ENV NINJA "/usr/bin/ninja"
> +ENV PYTHON "/usr/bin/python3"
> +ENV QEMU_CONFIGURE_OPTS --meson=internal
> +
> +RUN dnf install -y curl wget
Note this leaves the dnf cache since it doesn't remove 'clean all',
and thus bloats the container layer.
> ENV COVERITY_TOOL_BASE=/coverity-tools
> COPY coverity_tool.tgz coverity_tool.tgz
> RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz
We could actually make this entire thing be generated by the
tests/lcitool/refresh script
Create tests/lcitool/projects/coverity.yml with
--
packages:
- curl
- wget
And then pass *both* 'qemu' and 'coverity' as project names when
generating the container, so it'll create a dockerfile that installs
both sets of packages in one command.
The ENV/COPY/RUN commands can be put in the refersh script
coverity_extras = [
"ENV COVERITY_TOOL_BASE=/coverity-tools"
"COPY coverity_tool.tgz coverity_tool.tgz"
"RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz"
]
and adding trailer="".join(coverity_extras)
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-18 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 17:48 [PATCH] coverity: unify Fedora dockerfiles Paolo Bonzini
2023-04-18 15:15 ` Daniel P. Berrangé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.