From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] coverity: unify Fedora dockerfiles
Date: Tue, 18 Apr 2023 16:15:42 +0100 [thread overview]
Message-ID: <ZD60HofB6D9LkCjT@redhat.com> (raw)
In-Reply-To: <20230331174844.376300-1-pbonzini@redhat.com>
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 :|
prev parent reply other threads:[~2023-04-18 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 17:48 [PATCH] coverity: unify Fedora dockerfiles Paolo Bonzini
2023-04-18 15:15 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZD60HofB6D9LkCjT@redhat.com \
--to=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).