mbox series

[v2,for,3.0,00/16] various docker fixes

Message ID 20180713121741.19262-1-alex.bennee@linaro.org
Headers show
Series various docker fixes | expand

Message

Alex Bennée July 13, 2018, 12:17 p.m. UTC
Hi,

Unfortunately this series grew a little while I was re-basing as I
noticed a couple of bugs. An upstream change in debootstrap which I'd
been happily using for Ubuntu images caused a breakage which I've
hopefully now fixed:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903657

However since I upgraded by devbox I hadn't clocked to the fact I
should have been using the stable debootstrap anyway but our ugly
shell version check failed to pick it up. That's now fixed and I can
now bootstrap away.

I grabbed a couple of Philippe's patches while I was at it as they
were relevant to the other changes. It does mean the un-reviewed count
has gone up slightly:

  patch docker/base debian tricore on qemu debian9.patch
  patch docker/split configure_qemu from build_qemu.patch
  patch docker/move make check into check_qemu helper.patch
  patch docker/gracefully skip check_qemu.patch
  patch docker/Makefile.include don t include partial images.patch
  patch docker/disable debian powerpc user cross.patch
  patch docker/add test unit runner.patch
  patch docker/add expansion for docker test FOO to Makefile.patch
  patch docker/drop QEMU_TARGET check fallback in EXECUTABLE.patch
  patch docker/add hint to docker.py check.patch
  patch docker/add commentary to debian bootstrap.docker.patch
  patch docker/ignore distro versioning of debootstrap.patch


Alex Bennée (14):
  tests/.gitignore: don't ignore docker tests
  docker: base debian-tricore on qemu:debian9
  docker: fail more gracefully on docker.py check
  docker: split configure_qemu from build_qemu
  docker: move make check into check_qemu helper
  docker: gracefully skip check_qemu
  docker: Makefile.include don't include partial images
  docker: disable debian-powerpc-user-cross
  docker: add test-unit runner
  docker: add expansion for docker-test-FOO to Makefile.include
  docker: drop QEMU_TARGET check, fallback in EXECUTABLE not set
  docker: add --hint to docker.py check
  docker: add commentary to debian-bootstrap.docker
  docker: ignore distro versioning of debootstrap

Philippe Mathieu-Daudé (2):
  shippable: Build the TriCore docker image
  docker: Update debootstrap script after Debian migration from Alioth
    to Salsa

 .shippable.yml                                |  2 ++
 tests/.gitignore                              |  1 +
 tests/docker/Makefile.include                 | 26 ++++++++++++-------
 tests/docker/common.rc                        | 23 +++++++++++++++-
 tests/docker/docker.py                        | 10 +++++--
 .../dockerfiles/debian-bootstrap.docker       |  1 +
 tests/docker/dockerfiles/debian-bootstrap.pre | 13 ++++++----
 .../dockerfiles/debian-tricore-cross.docker   |  2 +-
 tests/docker/test-clang                       |  2 +-
 tests/docker/test-debug                       |  2 +-
 tests/docker/test-full                        |  2 +-
 tests/docker/test-quick                       |  2 +-
 tests/docker/test-unit                        | 21 +++++++++++++++
 13 files changed, 85 insertions(+), 22 deletions(-)
 create mode 100755 tests/docker/test-unit

-- 
2.17.1

Comments

Philippe Mathieu-Daudé July 17, 2018, 4:02 p.m. UTC | #1
On 07/13/2018 09:17 AM, Alex Bennée wrote:
> Hi,

> 

> Unfortunately this series grew a little while I was re-basing as I

> noticed a couple of bugs. An upstream change in debootstrap which I'd

> been happily using for Ubuntu images caused a breakage which I've

> hopefully now fixed:

> 

>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903657

> 

> However since I upgraded by devbox I hadn't clocked to the fact I

> should have been using the stable debootstrap anyway but our ugly

> shell version check failed to pick it up. That's now fixed and I can

> now bootstrap away.

> 

> I grabbed a couple of Philippe's patches while I was at it as they

> were relevant to the other changes. It does mean the un-reviewed count

> has gone up slightly:

> 

>   patch docker/base debian tricore on qemu debian9.patch

>   patch docker/split configure_qemu from build_qemu.patch

>   patch docker/move make check into check_qemu helper.patch

>   patch docker/gracefully skip check_qemu.patch

>   patch docker/Makefile.include don t include partial images.patch

>   patch docker/disable debian powerpc user cross.patch

>   patch docker/add test unit runner.patch

>   patch docker/add expansion for docker test FOO to Makefile.patch

>   patch docker/drop QEMU_TARGET check fallback in EXECUTABLE.patch

>   patch docker/add hint to docker.py check.patch

>   patch docker/add commentary to debian bootstrap.docker.patch

>   patch docker/ignore distro versioning of debootstrap.patch


[Note]

I hit:

$ make docker-binfmt-image-debian-powerpc-user
  BUILD   binfmt debian-powerpc-user (debootstrapped)
Cloning into './debootstrap.git'...
remote: Enumerating objects: 3262, done.
remote: Counting objects: 100% (3262/3262), done.
remote: Compressing objects: 100% (902/902), done.
remote: Total 3262 (delta 2353), reused 3245 (delta 2339)
Receiving objects: 100% (3262/3262), 531.08 KiB | 335.00 KiB/s, done.
Resolving deltas: 100% (2353/2353), done.
The command '/bin/sh -c /debootstrap/debootstrap --second-stage'
returned a non-zero code: 139
Traceback (most recent call last):
  File "tests/docker/docker.py", line 536, in <module>
    sys.exit(main())
  File "tests/docker/docker.py", line 533, in main
    return args.cmdobj.run(args, argv)
  File "tests/docker/docker.py", line 348, in run
    extra_files_cksum=cksum)
  File "tests/docker/docker.py", line 231, in build_image
    quiet=quiet)
  File "tests/docker/docker.py", line 158, in _do_check
    return subprocess.check_call(self._command + cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-t',
'qemu:debian-powerpc-user', '-f',
'/tmp/docker_buildPNDAtz/tmpIVpPn7.docker', '/tmp/docker_buildPNDAtz']'
returned non-zero exit status 139
make: *** [tests/docker/Makefile.include:62:
docker-binfmt-image-debian-powerpc-user] Error 1

"returned non-zero exit status 139" seems to be qemu-user crashing for
not being statistically linked.
Once rebuilt after ./configure --static, it worked:

$ make docker-binfmt-image-debian-powerpc-user V=1
[...]
I: Extracting zlib1g...
ppc-linux-user/qemu-ppc had no associated libraries (static build?)
Sending build context to Docker daemon  226.5MB
Step 1/7 : FROM scratch
Step 2/7 : ADD . /
Step 3/7 : RUN sed -i 's/in_target mount/echo not for docker in_target
mount/g' /debootstrap/functions
Step 4/7 : RUN /debootstrap/debootstrap --second-stage
I: Installing core packages...
[...]
Alex Bennée July 17, 2018, 6:53 p.m. UTC | #2
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 07/13/2018 09:17 AM, Alex Bennée wrote:

>> Hi,

>>

>> Unfortunately this series grew a little while I was re-basing as I

>> noticed a couple of bugs. An upstream change in debootstrap which I'd

>> been happily using for Ubuntu images caused a breakage which I've

>> hopefully now fixed:

>>

>>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903657

>>

>> However since I upgraded by devbox I hadn't clocked to the fact I

>> should have been using the stable debootstrap anyway but our ugly

>> shell version check failed to pick it up. That's now fixed and I can

>> now bootstrap away.

>>

>> I grabbed a couple of Philippe's patches while I was at it as they

>> were relevant to the other changes. It does mean the un-reviewed count

>> has gone up slightly:

>>

>>   patch docker/base debian tricore on qemu debian9.patch

>>   patch docker/split configure_qemu from build_qemu.patch

>>   patch docker/move make check into check_qemu helper.patch

>>   patch docker/gracefully skip check_qemu.patch

>>   patch docker/Makefile.include don t include partial images.patch

>>   patch docker/disable debian powerpc user cross.patch

>>   patch docker/add test unit runner.patch

>>   patch docker/add expansion for docker test FOO to Makefile.patch

>>   patch docker/drop QEMU_TARGET check fallback in EXECUTABLE.patch

>>   patch docker/add hint to docker.py check.patch

>>   patch docker/add commentary to debian bootstrap.docker.patch

>>   patch docker/ignore distro versioning of debootstrap.patch

>

> [Note]

>

> I hit:

>

> $ make docker-binfmt-image-debian-powerpc-user

>   BUILD   binfmt debian-powerpc-user (debootstrapped)

> Cloning into './debootstrap.git'...

> remote: Enumerating objects: 3262, done.

> remote: Counting objects: 100% (3262/3262), done.

> remote: Compressing objects: 100% (902/902), done.

> remote: Total 3262 (delta 2353), reused 3245 (delta 2339)

> Receiving objects: 100% (3262/3262), 531.08 KiB | 335.00 KiB/s, done.

> Resolving deltas: 100% (2353/2353), done.

> The command '/bin/sh -c /debootstrap/debootstrap --second-stage'

> returned a non-zero code: 139

> Traceback (most recent call last):

>   File "tests/docker/docker.py", line 536, in <module>

>     sys.exit(main())

>   File "tests/docker/docker.py", line 533, in main

>     return args.cmdobj.run(args, argv)

>   File "tests/docker/docker.py", line 348, in run

>     extra_files_cksum=cksum)

>   File "tests/docker/docker.py", line 231, in build_image

>     quiet=quiet)

>   File "tests/docker/docker.py", line 158, in _do_check

>     return subprocess.check_call(self._command + cmd, **kwargs)

>   File "/usr/lib/python2.7/subprocess.py", line 190, in check_call

>     raise CalledProcessError(retcode, cmd)

> subprocess.CalledProcessError: Command '['docker', 'build', '-t',

> 'qemu:debian-powerpc-user', '-f',

> '/tmp/docker_buildPNDAtz/tmpIVpPn7.docker', '/tmp/docker_buildPNDAtz']'

> returned non-zero exit status 139

> make: *** [tests/docker/Makefile.include:62:

> docker-binfmt-image-debian-powerpc-user] Error 1

>

> "returned non-zero exit status 139" seems to be qemu-user crashing for

> not being statistically linked.


What system are you building on? Basically --static is always safer but
as long as there isn't a clash between host/guest file system layouts it
can work which is why I don't enforce it (although earlier patches tried
to).

> Once rebuilt after ./configure --static, it worked:

>

> $ make docker-binfmt-image-debian-powerpc-user V=1

> [...]

> I: Extracting zlib1g...

> ppc-linux-user/qemu-ppc had no associated libraries (static build?)

> Sending build context to Docker daemon  226.5MB

> Step 1/7 : FROM scratch

> Step 2/7 : ADD . /

> Step 3/7 : RUN sed -i 's/in_target mount/echo not for docker in_target

> mount/g' /debootstrap/functions

> Step 4/7 : RUN /debootstrap/debootstrap --second-stage

> I: Installing core packages...

> [...]



--
Alex Bennée
Philippe Mathieu-Daudé July 17, 2018, 8:28 p.m. UTC | #3
On 07/17/2018 03:53 PM, Alex Bennée wrote:
> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

>> On 07/13/2018 09:17 AM, Alex Bennée wrote:

>>> Hi,

>>>

>>> Unfortunately this series grew a little while I was re-basing as I

>>> noticed a couple of bugs. An upstream change in debootstrap which I'd

>>> been happily using for Ubuntu images caused a breakage which I've

>>> hopefully now fixed:

>>>

>>>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903657

>>>

>>> However since I upgraded by devbox I hadn't clocked to the fact I

>>> should have been using the stable debootstrap anyway but our ugly

>>> shell version check failed to pick it up. That's now fixed and I can

>>> now bootstrap away.

>>>

>>> I grabbed a couple of Philippe's patches while I was at it as they

>>> were relevant to the other changes. It does mean the un-reviewed count

>>> has gone up slightly:

>>>

>>>   patch docker/base debian tricore on qemu debian9.patch

>>>   patch docker/split configure_qemu from build_qemu.patch

>>>   patch docker/move make check into check_qemu helper.patch

>>>   patch docker/gracefully skip check_qemu.patch

>>>   patch docker/Makefile.include don t include partial images.patch

>>>   patch docker/disable debian powerpc user cross.patch

>>>   patch docker/add test unit runner.patch

>>>   patch docker/add expansion for docker test FOO to Makefile.patch

>>>   patch docker/drop QEMU_TARGET check fallback in EXECUTABLE.patch

>>>   patch docker/add hint to docker.py check.patch

>>>   patch docker/add commentary to debian bootstrap.docker.patch

>>>   patch docker/ignore distro versioning of debootstrap.patch

>>

>> [Note]

>>

>> I hit:

>>

>> $ make docker-binfmt-image-debian-powerpc-user

>>   BUILD   binfmt debian-powerpc-user (debootstrapped)

>> Cloning into './debootstrap.git'...

>> remote: Enumerating objects: 3262, done.

>> remote: Counting objects: 100% (3262/3262), done.

>> remote: Compressing objects: 100% (902/902), done.

>> remote: Total 3262 (delta 2353), reused 3245 (delta 2339)

>> Receiving objects: 100% (3262/3262), 531.08 KiB | 335.00 KiB/s, done.

>> Resolving deltas: 100% (2353/2353), done.

>> The command '/bin/sh -c /debootstrap/debootstrap --second-stage'

>> returned a non-zero code: 139

>> Traceback (most recent call last):

>>   File "tests/docker/docker.py", line 536, in <module>

>>     sys.exit(main())

>>   File "tests/docker/docker.py", line 533, in main

>>     return args.cmdobj.run(args, argv)

>>   File "tests/docker/docker.py", line 348, in run

>>     extra_files_cksum=cksum)

>>   File "tests/docker/docker.py", line 231, in build_image

>>     quiet=quiet)

>>   File "tests/docker/docker.py", line 158, in _do_check

>>     return subprocess.check_call(self._command + cmd, **kwargs)

>>   File "/usr/lib/python2.7/subprocess.py", line 190, in check_call

>>     raise CalledProcessError(retcode, cmd)

>> subprocess.CalledProcessError: Command '['docker', 'build', '-t',

>> 'qemu:debian-powerpc-user', '-f',

>> '/tmp/docker_buildPNDAtz/tmpIVpPn7.docker', '/tmp/docker_buildPNDAtz']'

>> returned non-zero exit status 139

>> make: *** [tests/docker/Makefile.include:62:

>> docker-binfmt-image-debian-powerpc-user] Error 1

>>

>> "returned non-zero exit status 139" seems to be qemu-user crashing for

>> not being statistically linked.

> 

> What system are you building on? Basically --static is always safer but

> as long as there isn't a clash between host/guest file system layouts it

> can work which is why I don't enforce it (although earlier patches tried

> to).


$ docker info
Server Version: 18.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Kernel Version: 4.16.0-2-amd64
Operating System: Debian GNU/Linux buster/sid
OSType: linux
Architecture: x86_64

>> Once rebuilt after ./configure --static, it worked:

>>

>> $ make docker-binfmt-image-debian-powerpc-user V=1

>> [...]

>> I: Extracting zlib1g...

>> ppc-linux-user/qemu-ppc had no associated libraries (static build?)

>> Sending build context to Docker daemon  226.5MB

>> Step 1/7 : FROM scratch

>> Step 2/7 : ADD . /

>> Step 3/7 : RUN sed -i 's/in_target mount/echo not for docker in_target

>> mount/g' /debootstrap/functions

>> Step 4/7 : RUN /debootstrap/debootstrap --second-stage

>> I: Installing core packages...

>> [...]