From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Fam Zheng" <fam@euphon.net>,
"Thomas Huth" <thuth@redhat.com>,
kvm@vger.kernel.org,
"Viktor Prutyanov" <viktor.prutyanov@phystech.edu>,
"Laurent Vivier" <lvivier@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Greg Kurz" <groug@kaod.org>, "Max Reitz" <mreitz@redhat.com>,
qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-block@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH 1/9] tests/docker: Add dockerfile for Alpine Linux
Date: Tue, 22 Dec 2020 15:37:04 -0300 [thread overview]
Message-ID: <db01b083-6b48-3e88-f46f-22191927acf3@redhat.com> (raw)
In-Reply-To: <20201221005318.11866-2-jiaxun.yang@flygoat.com>
Hi,
On 12/20/20 9:53 PM, Jiaxun Yang wrote:
> Alpine Linux[1] is a security-oriented, lightweight Linux distribution
> based on musl libc and busybox.
>
> It it popular among Docker guests and embedded applications.
>
> Adding it to test against different libc.
>
> [1]: https://alpinelinux.org/
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> tests/docker/dockerfiles/alpine.docker | 56 ++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
> create mode 100644 tests/docker/dockerfiles/alpine.docker
Unless one passes `NOUSER=1` as an argument (e.g. `make NOUSER=1
docker-image-alpine`) then the image build is going to fail due to the
lack of useradd command on the base Alpine image. See the error below.
As a result do build inside the container will fail (e.g. `make
docker-test-build@alpine`). Apparently this issue can be solved by
installing the "shadow" package in the image.
Without applying the patches 02-08 the build will fail on Alpine (tested
with `make docker-test-build@alpine`). Actually patch 08 did not apply
on master tree (error: patch failed: tests/migration/stress.c:174) so I
could not successfully build it in the container.
I suggest that you move the patch 01 later on this series, just after
all build issues are fixed so that it can be built inside the container.
---
$ make docker-image-alpine
BUILD alpine
Trying to pull registry.gitlab.com/qemu-project/qemu/qemu/alpine...
manifest unknown: manifest unknown
Error: unable to pull registry.gitlab.com/qemu-project/qemu/qemu/alpine:
Error initializing source
docker://registry.gitlab.com/qemu-project/qemu/qemu/alpine:latest: Error
reading manifest latest in
registry.gitlab.com/qemu-project/qemu/qemu/alpine: manifest unknown:
manifest unknown
/bin/sh: useradd: not found
Error: error building at STEP "RUN id wmoschet 2>/dev/null || useradd -u
1000 -U wmoschet": error while running runtime: exit status 127
Traceback (most recent call last):
File "/home/wmoschet/src/qemu/tests/docker/docker.py", line 709, in
<module>
sys.exit(main())
File "/home/wmoschet/src/qemu/tests/docker/docker.py", line 705, in main
return args.cmdobj.run(args, argv)
File "/home/wmoschet/src/qemu/tests/docker/docker.py", line 498, in run
dkr.build_image(tag, docker_dir, dockerfile,
File "/home/wmoschet/src/qemu/tests/docker/docker.py", line 353, in
build_image
self._do_check(build_args,
File "/home/wmoschet/src/qemu/tests/docker/docker.py", line 244, in
_do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['podman', 'build', '-t',
'qemu/alpine', '-f', '/tmp/docker_build063jqidd/tmpn9zbbxzu.docker',
'--cache-from', 'registry.gitlab.com/qemu-project/qemu/qemu/alpine',
'/tmp/docker_build063jqidd']' returned non-zero exit status 125.
make: *** [/home/wmoschet/src/qemu/tests/docker/Makefile.include:62:
docker-image-alpine] Error 1
---
>
> diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
> new file mode 100644
> index 0000000000..a1b80f08d2
> --- /dev/null
> +++ b/tests/docker/dockerfiles/alpine.docker
> @@ -0,0 +1,56 @@
> +
> +FROM alpine:edge
> +
> +RUN apk update
> +RUN apk upgrade
> +
> +# Please keep this list sorted alphabetically
> +ENV PACKAGES \
> + alsa-lib-dev \
> + bash \
> + bison \
> + build-base \
> + coreutils \
> + curl-dev \
> + flex \
> + git \
> + glib-dev \
> + glib-static \
> + gnutls-dev \
> + gtk+3.0-dev \
> + libaio-dev \
> + libcap-dev \
> + libcap-ng-dev \
> + libjpeg-turbo-dev \
> + libnfs-dev \
> + libpng-dev \
> + libseccomp-dev \
> + libssh-dev \
> + libusb-dev \
> + libxml2-dev \
> + linux-headers \
> + lzo-dev \
> + mesa-dev \
> + mesa-egl \
> + mesa-gbm \
> + meson \
> + ncurses-dev \
> + ninja \
> + paxmark \
> + perl \
> + pulseaudio-dev \
> + python3 \
> + py3-sphinx \
> + snappy-dev \
To solve the problem I mentioned above:
diff --git a/tests/docker/dockerfiles/alpine.docker
b/tests/docker/dockerfiles/alpine.docker
index a1b80f08d2..5be5198d00 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -41,6 +41,7 @@ ENV PACKAGES \
pulseaudio-dev \
python3 \
py3-sphinx \
+ shadow \
snappy-dev \
spice-dev \
texinfo \
> + spice-dev \
> + texinfo \
> + usbredir-dev \
> + util-linux-dev \
> + vde2-dev \
> + virglrenderer-dev \
> + vte3-dev \
> + xfsprogs-dev \
> + zlib-dev \
> + zlib-static
> +
> +RUN apk add $PACKAGES
next prev parent reply other threads:[~2020-12-22 18:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 0:53 [PATCH 0/9] Alpine Linux build fix and CI pipeline Jiaxun Yang
2020-12-21 0:53 ` [PATCH 1/9] tests/docker: Add dockerfile for Alpine Linux Jiaxun Yang
2020-12-22 18:37 ` Wainer dos Santos Moschetta [this message]
2020-12-21 0:53 ` [PATCH 2/9] configure: Add sys/timex.h to probe clk_adjtime Jiaxun Yang
2021-01-13 6:59 ` Thomas Huth
2020-12-21 0:53 ` [PATCH 3/9] configure/meson: Only check sys/signal.h on non-Linux Jiaxun Yang
2021-01-13 7:05 ` Thomas Huth
2021-01-13 11:36 ` Peter Maydell
2020-12-21 0:53 ` [PATCH 4/9] libvhost-user: Include poll.h instead of sys/poll.h Jiaxun Yang
2021-01-13 7:08 ` Thomas Huth
2020-12-21 0:53 ` [PATCH 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE Jiaxun Yang
2021-01-13 7:14 ` Thomas Huth
2020-12-21 0:53 ` [PATCH 6/9] hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE Jiaxun Yang
2021-01-13 7:16 ` Thomas Huth
2020-12-21 0:53 ` [PATCH 7/9] accel/kvm: avoid using predefined PAGE_SIZE Jiaxun Yang
2021-01-13 7:19 ` Thomas Huth
2021-01-13 9:07 ` Jiaxun Yang
2020-12-21 0:53 ` [PATCH 8/9] tests: Rename PAGE_SIZE definitions Jiaxun Yang
2021-01-13 7:21 ` Thomas Huth
2020-12-21 0:53 ` [PATCH 9/9] gitlab-ci: Add alpine to pipeline Jiaxun Yang
2020-12-21 1:06 ` [PATCH 0/9] Alpine Linux build fix and CI pipeline no-reply
2020-12-21 8:25 ` Jiaxun Yang
2020-12-22 18:41 ` Wainer dos Santos Moschetta
2020-12-23 0:54 ` Jiaxun Yang
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=db01b083-6b48-3e88-f46f-22191927acf3@redhat.com \
--to=wainersm@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alistair@alistair23.me \
--cc=david@gibson.dropbear.id.au \
--cc=fam@euphon.net \
--cc=groug@kaod.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
--cc=viktor.prutyanov@phystech.edu \
/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).