From dd3c55ffd66f964b4015be6a6a4370601eab9566 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 27 Apr 2024 16:47:06 +1000 Subject: [PATCH 1/5] Added Ubuntu 24.04 --- .github/workflows/build.yml | 21 ++++--- Makefile | 9 +-- .../Dockerfile | 0 .../Dockerfile-dbg | 0 .../Makefile | 0 .../README-dbg.md | 0 .../python.supp | 0 .../setup.sh | 0 .../test.sh | 0 .../update.sh | 0 .../ubuntu-22.04-jammy-arm64v8}/Dockerfile | 0 .../ubuntu-22.04-jammy-arm64v8}/Makefile | 0 .../ubuntu-22.04-jammy-arm64v8}/test.sh | 0 .../ubuntu-22.04-jammy-arm64v8}/update.sh | 0 .../ubuntu-22.04-jammy-ppc64le}/Dockerfile | 0 .../ubuntu-22.04-jammy-ppc64le}/Makefile | 0 .../ubuntu-22.04-jammy-ppc64le}/test.sh | 0 .../ubuntu-22.04-jammy-ppc64le}/update.sh | 0 .../ubuntu-22.04-jammy-s390x}/Dockerfile | 0 .../ubuntu-22.04-jammy-s390x}/Makefile | 0 .../ubuntu-22.04-jammy-s390x}/test.sh | 0 .../ubuntu-22.04-jammy-s390x}/update.sh | 0 manylinux2014-wheel-build/Makefile | 2 +- manylinux_2_28-wheel-build/Makefile | 2 +- ubuntu-24.04-noble-amd64-valgrind/Dockerfile | 55 +++++++++++++++++ .../Dockerfile-dbg | 26 ++++++++ ubuntu-24.04-noble-amd64-valgrind/Makefile | 38 ++++++++++++ .../README-dbg.md | 52 ++++++++++++++++ ubuntu-24.04-noble-amd64-valgrind/python.supp | 6 ++ ubuntu-24.04-noble-amd64-valgrind/setup.sh | 7 +++ ubuntu-24.04-noble-amd64-valgrind/test.sh | 16 +++++ ubuntu-24.04-noble-amd64-valgrind/update.sh | 2 + ubuntu-24.04-noble-amd64/Dockerfile | 61 +++++++++++++++++++ ubuntu-24.04-noble-amd64/Makefile | 1 + ubuntu-24.04-noble-amd64/test.sh | 7 +++ ubuntu-24.04-noble-amd64/update.sh | 2 + ubuntu-24.04-noble-arm64v8/Dockerfile | 51 ++++++++++++++++ ubuntu-24.04-noble-arm64v8/Makefile | 1 + ubuntu-24.04-noble-arm64v8/test.sh | 6 ++ ubuntu-24.04-noble-arm64v8/update.sh | 2 + ubuntu-24.04-noble-ppc64le/Dockerfile | 51 ++++++++++++++++ ubuntu-24.04-noble-ppc64le/Makefile | 1 + ubuntu-24.04-noble-ppc64le/test.sh | 6 ++ ubuntu-24.04-noble-ppc64le/update.sh | 2 + ubuntu-24.04-noble-s390x/Dockerfile | 50 +++++++++++++++ ubuntu-24.04-noble-s390x/Makefile | 1 + ubuntu-24.04-noble-s390x/test.sh | 6 ++ ubuntu-24.04-noble-s390x/update.sh | 2 + 48 files changed, 470 insertions(+), 16 deletions(-) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/Dockerfile (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/Dockerfile-dbg (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/Makefile (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/README-dbg.md (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/python.supp (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/setup.sh (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/test.sh (100%) rename {ubuntu-22.04-jammy-amd64-valgrind => archive/ubuntu-22.04-jammy-amd64-valgrind}/update.sh (100%) rename {ubuntu-22.04-jammy-arm64v8 => archive/ubuntu-22.04-jammy-arm64v8}/Dockerfile (100%) rename {ubuntu-22.04-jammy-arm64v8 => archive/ubuntu-22.04-jammy-arm64v8}/Makefile (100%) rename {ubuntu-22.04-jammy-arm64v8 => archive/ubuntu-22.04-jammy-arm64v8}/test.sh (100%) rename {ubuntu-22.04-jammy-arm64v8 => archive/ubuntu-22.04-jammy-arm64v8}/update.sh (100%) rename {ubuntu-22.04-jammy-ppc64le => archive/ubuntu-22.04-jammy-ppc64le}/Dockerfile (100%) rename {ubuntu-22.04-jammy-ppc64le => archive/ubuntu-22.04-jammy-ppc64le}/Makefile (100%) rename {ubuntu-22.04-jammy-ppc64le => archive/ubuntu-22.04-jammy-ppc64le}/test.sh (100%) rename {ubuntu-22.04-jammy-ppc64le => archive/ubuntu-22.04-jammy-ppc64le}/update.sh (100%) rename {ubuntu-22.04-jammy-s390x => archive/ubuntu-22.04-jammy-s390x}/Dockerfile (100%) rename {ubuntu-22.04-jammy-s390x => archive/ubuntu-22.04-jammy-s390x}/Makefile (100%) rename {ubuntu-22.04-jammy-s390x => archive/ubuntu-22.04-jammy-s390x}/test.sh (100%) rename {ubuntu-22.04-jammy-s390x => archive/ubuntu-22.04-jammy-s390x}/update.sh (100%) create mode 100644 ubuntu-24.04-noble-amd64-valgrind/Dockerfile create mode 100644 ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg create mode 100644 ubuntu-24.04-noble-amd64-valgrind/Makefile create mode 100644 ubuntu-24.04-noble-amd64-valgrind/README-dbg.md create mode 100644 ubuntu-24.04-noble-amd64-valgrind/python.supp create mode 100755 ubuntu-24.04-noble-amd64-valgrind/setup.sh create mode 100755 ubuntu-24.04-noble-amd64-valgrind/test.sh create mode 100755 ubuntu-24.04-noble-amd64-valgrind/update.sh create mode 100644 ubuntu-24.04-noble-amd64/Dockerfile create mode 120000 ubuntu-24.04-noble-amd64/Makefile create mode 100755 ubuntu-24.04-noble-amd64/test.sh create mode 100755 ubuntu-24.04-noble-amd64/update.sh create mode 100644 ubuntu-24.04-noble-arm64v8/Dockerfile create mode 120000 ubuntu-24.04-noble-arm64v8/Makefile create mode 100755 ubuntu-24.04-noble-arm64v8/test.sh create mode 100755 ubuntu-24.04-noble-arm64v8/update.sh create mode 100644 ubuntu-24.04-noble-ppc64le/Dockerfile create mode 120000 ubuntu-24.04-noble-ppc64le/Makefile create mode 100755 ubuntu-24.04-noble-ppc64le/test.sh create mode 100755 ubuntu-24.04-noble-ppc64le/update.sh create mode 100644 ubuntu-24.04-noble-s390x/Dockerfile create mode 120000 ubuntu-24.04-noble-s390x/Makefile create mode 100755 ubuntu-24.04-noble-s390x/test.sh create mode 100755 ubuntu-24.04-noble-s390x/update.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a9cee8f..9cc4b813 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,11 +16,11 @@ jobs: matrix: image: # Run slower jobs first to give them a headstart and reduce waiting time - - "ubuntu-22.04-jammy-arm64v8" - - "ubuntu-22.04-jammy-ppc64le" - - "ubuntu-22.04-jammy-s390x" + - "ubuntu-24.04-noble-arm64v8" + - "ubuntu-24.04-noble-ppc64le" + - "ubuntu-24.04-noble-s390x" # test image for manylinux-wheel build - - "ubuntu-22.04-jammy-amd64" + - "ubuntu-24.04-noble-amd64" # Then run the remainder - "alpine" - "amazon-2-amd64" @@ -34,20 +34,21 @@ jobs: - "fedora-40-amd64" - "gentoo" - "ubuntu-20.04-focal-amd64" - - "ubuntu-22.04-jammy-amd64-valgrind" + - "ubuntu-22.04-jammy-amd64" + - "ubuntu-24.04-noble-amd64-valgrind" # has a dependency on the test image - "manylinux2014-wheel-build" - "manylinux_2_28-wheel-build" include: - image: "manylinux2014-wheel-build" - test-image: "ubuntu-22.04-jammy-amd64" + test-image: "ubuntu-24.04-noble-amd64" - image: "manylinux_2_28-wheel-build" - test-image: "ubuntu-22.04-jammy-amd64" - - image: "ubuntu-22.04-jammy-arm64v8" + test-image: "ubuntu-24.04-noble-amd64" + - image: "ubuntu-24.04-noble-arm64v8" qemu-arch: "aarch64" - - image: "ubuntu-22.04-jammy-ppc64le" + - image: "ubuntu-24.04-noble-ppc64le" qemu-arch: "ppc64le" - - image: "ubuntu-22.04-jammy-s390x" + - image: "ubuntu-24.04-noble-s390x" qemu-arch: "s390x" steps: diff --git a/Makefile b/Makefile index 0d83fb05..32165b62 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,11 @@ TARGETS = \ manylinux_2_28-wheel-build \ ubuntu-20.04-focal-amd64 \ ubuntu-22.04-jammy-amd64 \ - ubuntu-22.04-jammy-amd64-valgrind \ - ubuntu-22.04-jammy-arm64v8 \ - ubuntu-22.04-jammy-ppc64le \ - ubuntu-22.04-jammy-s390x + ubuntu-24.04-noble-amd64 \ + ubuntu-24.04-noble-amd64-valgrind \ + ubuntu-24.04-noble-arm64v8 \ + ubuntu-24.04-noble-ppc64le \ + ubuntu-24.04-noble-s390x BUILDDIRS = $(TARGETS:%=build-%) PUSHDIRS = $(TARGETS:%=push-%) diff --git a/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile b/archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/Dockerfile rename to archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile diff --git a/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg b/archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg rename to archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg diff --git a/ubuntu-22.04-jammy-amd64-valgrind/Makefile b/archive/ubuntu-22.04-jammy-amd64-valgrind/Makefile similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/Makefile rename to archive/ubuntu-22.04-jammy-amd64-valgrind/Makefile diff --git a/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md b/archive/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md rename to archive/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md diff --git a/ubuntu-22.04-jammy-amd64-valgrind/python.supp b/archive/ubuntu-22.04-jammy-amd64-valgrind/python.supp similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/python.supp rename to archive/ubuntu-22.04-jammy-amd64-valgrind/python.supp diff --git a/ubuntu-22.04-jammy-amd64-valgrind/setup.sh b/archive/ubuntu-22.04-jammy-amd64-valgrind/setup.sh similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/setup.sh rename to archive/ubuntu-22.04-jammy-amd64-valgrind/setup.sh diff --git a/ubuntu-22.04-jammy-amd64-valgrind/test.sh b/archive/ubuntu-22.04-jammy-amd64-valgrind/test.sh similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/test.sh rename to archive/ubuntu-22.04-jammy-amd64-valgrind/test.sh diff --git a/ubuntu-22.04-jammy-amd64-valgrind/update.sh b/archive/ubuntu-22.04-jammy-amd64-valgrind/update.sh similarity index 100% rename from ubuntu-22.04-jammy-amd64-valgrind/update.sh rename to archive/ubuntu-22.04-jammy-amd64-valgrind/update.sh diff --git a/ubuntu-22.04-jammy-arm64v8/Dockerfile b/archive/ubuntu-22.04-jammy-arm64v8/Dockerfile similarity index 100% rename from ubuntu-22.04-jammy-arm64v8/Dockerfile rename to archive/ubuntu-22.04-jammy-arm64v8/Dockerfile diff --git a/ubuntu-22.04-jammy-arm64v8/Makefile b/archive/ubuntu-22.04-jammy-arm64v8/Makefile similarity index 100% rename from ubuntu-22.04-jammy-arm64v8/Makefile rename to archive/ubuntu-22.04-jammy-arm64v8/Makefile diff --git a/ubuntu-22.04-jammy-arm64v8/test.sh b/archive/ubuntu-22.04-jammy-arm64v8/test.sh similarity index 100% rename from ubuntu-22.04-jammy-arm64v8/test.sh rename to archive/ubuntu-22.04-jammy-arm64v8/test.sh diff --git a/ubuntu-22.04-jammy-arm64v8/update.sh b/archive/ubuntu-22.04-jammy-arm64v8/update.sh similarity index 100% rename from ubuntu-22.04-jammy-arm64v8/update.sh rename to archive/ubuntu-22.04-jammy-arm64v8/update.sh diff --git a/ubuntu-22.04-jammy-ppc64le/Dockerfile b/archive/ubuntu-22.04-jammy-ppc64le/Dockerfile similarity index 100% rename from ubuntu-22.04-jammy-ppc64le/Dockerfile rename to archive/ubuntu-22.04-jammy-ppc64le/Dockerfile diff --git a/ubuntu-22.04-jammy-ppc64le/Makefile b/archive/ubuntu-22.04-jammy-ppc64le/Makefile similarity index 100% rename from ubuntu-22.04-jammy-ppc64le/Makefile rename to archive/ubuntu-22.04-jammy-ppc64le/Makefile diff --git a/ubuntu-22.04-jammy-ppc64le/test.sh b/archive/ubuntu-22.04-jammy-ppc64le/test.sh similarity index 100% rename from ubuntu-22.04-jammy-ppc64le/test.sh rename to archive/ubuntu-22.04-jammy-ppc64le/test.sh diff --git a/ubuntu-22.04-jammy-ppc64le/update.sh b/archive/ubuntu-22.04-jammy-ppc64le/update.sh similarity index 100% rename from ubuntu-22.04-jammy-ppc64le/update.sh rename to archive/ubuntu-22.04-jammy-ppc64le/update.sh diff --git a/ubuntu-22.04-jammy-s390x/Dockerfile b/archive/ubuntu-22.04-jammy-s390x/Dockerfile similarity index 100% rename from ubuntu-22.04-jammy-s390x/Dockerfile rename to archive/ubuntu-22.04-jammy-s390x/Dockerfile diff --git a/ubuntu-22.04-jammy-s390x/Makefile b/archive/ubuntu-22.04-jammy-s390x/Makefile similarity index 100% rename from ubuntu-22.04-jammy-s390x/Makefile rename to archive/ubuntu-22.04-jammy-s390x/Makefile diff --git a/ubuntu-22.04-jammy-s390x/test.sh b/archive/ubuntu-22.04-jammy-s390x/test.sh similarity index 100% rename from ubuntu-22.04-jammy-s390x/test.sh rename to archive/ubuntu-22.04-jammy-s390x/test.sh diff --git a/ubuntu-22.04-jammy-s390x/update.sh b/archive/ubuntu-22.04-jammy-s390x/update.sh similarity index 100% rename from ubuntu-22.04-jammy-s390x/update.sh rename to archive/ubuntu-22.04-jammy-s390x/update.sh diff --git a/manylinux2014-wheel-build/Makefile b/manylinux2014-wheel-build/Makefile index 44ebf5d7..ec867ee1 100644 --- a/manylinux2014-wheel-build/Makefile +++ b/manylinux2014-wheel-build/Makefile @@ -3,7 +3,7 @@ TARGET := $(notdir $(WD)) ROOT := $(abspath $(WD)/../Pillow) IMAGENAME := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET), $(TARGET)) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -TEST_TARGET = ubuntu-22.04-jammy-amd64 +TEST_TARGET = ubuntu-24.04-noble-amd64 TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TEST_TARGET):$(BRANCH), pythonpillow/$(TEST_TARGET):main) .PHONY: build diff --git a/manylinux_2_28-wheel-build/Makefile b/manylinux_2_28-wheel-build/Makefile index 0cd94f59..df4017fe 100644 --- a/manylinux_2_28-wheel-build/Makefile +++ b/manylinux_2_28-wheel-build/Makefile @@ -3,7 +3,7 @@ TARGET := $(notdir $(WD)) ROOT := $(abspath $(WD)/../Pillow) IMAGENAME := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET), $(TARGET)) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -TEST_TARGET = ubuntu-22.04-jammy-amd64 +TEST_TARGET = ubuntu-24.04-noble-amd64 TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TEST_TARGET):$(BRANCH), pythonpillow/$(TEST_TARGET):main) .PHONY: build diff --git a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile new file mode 100644 index 00000000..6a49b412 --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile @@ -0,0 +1,55 @@ +FROM ubuntu:noble + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + cmake \ + ghostscript \ + git \ + libffi-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo-progs \ + libjpeg8-dev \ + liblcms2-dev \ + libopenjp2-7-dev \ + libssl-dev \ + libtiff5-dev \ + libwebp-dev \ + meson \ + netpbm \ + python3.12-dbg \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + valgrind \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN useradd pillow \ + && addgroup pillow sudo \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + +RUN virtualenv -p /usr/bin/python3.12-dbg --system-site-packages /vpy3 \ + && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ + && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout pytest-valgrind \ + && chown -R pillow:pillow /vpy3 + +ADD depends /depends +RUN cd /depends \ + && ./install_raqm.sh + +COPY python.supp /depends + +USER pillow +CMD ["depends/test.sh"] + +#docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/ubuntu-24.04-noble-amd64 diff --git a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg new file mode 100644 index 00000000..e0c6bc63 --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg @@ -0,0 +1,26 @@ +FROM ubuntu-24.04-noble-amd64-valgrind + +USER root +RUN apt-get -qq update && apt-get install -y ubuntu-dbgsym-keyring + +RUN echo "deb http://ddebs.ubuntu.com noble main restricted universe multiverse" > /etc/apt/sources.list.d/ddebs.list +RUN echo "deb http://ddebs.ubuntu.com noble-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/ddebs.list +RUN perl -pi -e 's/# deb-src/deb-src/;' /etc/apt/sources.list + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + libfreetype6-dbgsym \ + libtiff5-dbgsym \ + libwebpmux3-dbgsym \ + libwebp7-dbgsym \ + libwebpdemux2-dbgsym \ + libwebpmux3-dbgsym \ + libopenjp2-7-dbgsym \ + libharfbuzz0b-dbgsym \ + libfribidi0-dbgsym \ + emacs-nox + +RUN cd /usr/src && apt-get source freetype tiff libwebp libopenjp2-7 harfbuzz fribidi + +COPY setup.sh /depends/setup.sh +USER pillow +CMD ["/depends/setup.sh"] diff --git a/ubuntu-24.04-noble-amd64-valgrind/Makefile b/ubuntu-24.04-noble-amd64-valgrind/Makefile new file mode 100644 index 00000000..096cebcd --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/Makefile @@ -0,0 +1,38 @@ +WD = $(shell pwd) +USERNAME := $(shell docker info | grep Username | xargs | cut -d ' ' -f 2) +TARGET := $(notdir $(WD)) +ROOT := $(abspath $(WD)/../Pillow) +IMAGENAME := $(if $(USERNAME), $(USERNAME)/$(TARGET), $(TARGET)) +BRANCH := $(shell git rev-parse --abbrev-ref HEAD) + +.PHONY: build +build: + cp -r ../Pillow/depends . + cp test.sh depends + docker build -t $(IMAGENAME):$(BRANCH) . + +.PHONY: update +update: + ./update.sh + +.PHONY: test +test: + docker run --rm -e "PILLOW_VALGRIND_TEST=true" -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH) + +.PHONY: push +push: + docker push $(IMAGENAME):$(BRANCH) + +.PHONY: clean +clean: + rm -r depends + +.PHONY: shell +shell: + docker run --rm -it -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH) /bin/bash + +build-dbg: + docker build -t $(IMAGENAME)-dbg:$(BRANCH) -f Dockerfile-dbg . + +dbg: + docker run --privileged --rm -it -v $(ROOT):/Pillow $(IMAGENAME)-dbg:$(BRANCH) diff --git a/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md b/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md new file mode 100644 index 00000000..f983c705 --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md @@ -0,0 +1,52 @@ +# Debug image + +Sometimes we'll get an error that's most easily reproduced in the +valgrind docker image. [citation needed] + +The `build-dbg` and `dbg` shell provide some symbols and debugging +tools to fix that. Emacs is provided, as are some of the source packages. + +You may need to set source directories with the `set substitute-path` +command. + +e.g.: + +``` +pillow@2f7a4ea5c959:/Pillow/oss-fuzz-tests$ gdb python +GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 +Copyright (C) 2022 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +Type "show copying" and "show warranty" for details. +This GDB was configured as "x86_64-linux-gnu". +Type "show configuration" for configuration details. +For bug reporting instructions, please see: +. +Find the GDB manual and other documentation resources online at: + . + +For help, type "help". +Type "apropos word" to search for commands related to "word"... +Reading symbols from python... +(gdb) b _imagingft.c:922 +No source file named _imagingft.c. +Make breakpoint pending on future shared library load? (y or [n]) y +Breakpoint 1 (_imagingft.c:922) pending. +(gdb) r f.py DejaVuSans-24-8-stripped.ttf +Starting program: /vpy3/bin/python f.py DejaVuSans-24-8-stripped.ttf +[Thread debugging using libthread_db enabled] +Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". + +Breakpoint 1, font_render (self=0x7ffff70e9780, args=) at src/_imagingft.c:922 +922 if (!bitmap.buffer) { +... +0x00007ffff6fe4d6a in FT_Bitmap_Convert (library=, source=source@entry=0x7fffffffdff0, target=target@entry=0x7fffffffe020, alignment=alignment@entry=1) at ./src/base/ftbitmap.c:633 +633 ./src/base/ftbitmap.c: No such file or directory. +(gdb) set substitute-path ./src /usr/src/freetype-2.11.1+dfsg/src/ +(gdb) f +#0 0x00007ffff6fe4d6a in FT_Bitmap_Convert (library=, source=source@entry=0x7fffffffdff0, target=target@entry=0x7fffffffe020, + alignment=alignment@entry=1) at ./src/base/ftbitmap.c:633 +633 FT_Int val = *ss; + +``` diff --git a/ubuntu-24.04-noble-amd64-valgrind/python.supp b/ubuntu-24.04-noble-amd64-valgrind/python.supp new file mode 100644 index 00000000..80d7a16f --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/python.supp @@ -0,0 +1,6 @@ +{ + + Memcheck:Cond + ... + fun:encode_current_locale +} diff --git a/ubuntu-24.04-noble-amd64-valgrind/setup.sh b/ubuntu-24.04-noble-amd64-valgrind/setup.sh new file mode 100755 index 00000000..83cbaa8f --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install + +bash diff --git a/ubuntu-24.04-noble-amd64-valgrind/test.sh b/ubuntu-24.04-noble-amd64-valgrind/test.sh new file mode 100755 index 00000000..a174ad32 --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/test.sh @@ -0,0 +1,16 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-coverage + +PYTHONMALLOC=malloc valgrind --suppressions=/depends/python.supp --leak-check=no \ + --log-file=/tmp/valgrind-output \ + python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output + +# To run one test in the image: +# make bash +# PYTHONMALLOC=malloc valgrind --leak-check=no --suppressions=/depends/python.supp pytest -vv --valgrind --no-memcheck Tests/test_file_eps.py + +# to run one test with GDB support: +# PYTHONMALLOC=malloc valgrind --vgdb-error=0 --suppressions=../../test/python.supp pytest Tests/test_file_libtiff.py::TestFileLibTiff::test_custom_metadata diff --git a/ubuntu-24.04-noble-amd64-valgrind/update.sh b/ubuntu-24.04-noble-amd64-valgrind/update.sh new file mode 100755 index 00000000..b5962bec --- /dev/null +++ b/ubuntu-24.04-noble-amd64-valgrind/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull ubuntu:noble diff --git a/ubuntu-24.04-noble-amd64/Dockerfile b/ubuntu-24.04-noble-amd64/Dockerfile new file mode 100644 index 00000000..8f382726 --- /dev/null +++ b/ubuntu-24.04-noble-amd64/Dockerfile @@ -0,0 +1,61 @@ +FROM ubuntu:noble + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + cmake \ + ghostscript \ + git \ + libegl-dev \ + libffi-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo-progs \ + libjpeg8-dev \ + liblcms2-dev \ + libopengl-dev \ + libopenjp2-7-dev \ + libssl-dev \ + libtiff5-dev \ + libwebp-dev \ + libxcb-cursor0 \ + libxcb-icccm4 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-randr0 \ + libxcb-render-util0 \ + libxcb-shape0 \ + libxkbcommon-x11-0 \ + meson \ + netpbm \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd pillow \ + && addgroup pillow sudo \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + +RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ + && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ + && /vpy3/bin/pip install --no-cache-dir cffi olefile pyside6 pytest pytest-cov pytest-timeout \ + && chown -R pillow:pillow /vpy3 + +ADD depends /depends +RUN cd /depends \ + && ./install_raqm.sh + +USER pillow +CMD ["depends/test.sh"] + +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-24.04-noble-amd64 diff --git a/ubuntu-24.04-noble-amd64/Makefile b/ubuntu-24.04-noble-amd64/Makefile new file mode 120000 index 00000000..5e7b0e26 --- /dev/null +++ b/ubuntu-24.04-noble-amd64/Makefile @@ -0,0 +1 @@ +../Makefile.sub \ No newline at end of file diff --git a/ubuntu-24.04-noble-amd64/test.sh b/ubuntu-24.04-noble-amd64/test.sh new file mode 100755 index 00000000..f1b1726c --- /dev/null +++ b/ubuntu-24.04-noble-amd64/test.sh @@ -0,0 +1,7 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-coverage +python3 -c "from PIL import Image" +/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests diff --git a/ubuntu-24.04-noble-amd64/update.sh b/ubuntu-24.04-noble-amd64/update.sh new file mode 100755 index 00000000..b5962bec --- /dev/null +++ b/ubuntu-24.04-noble-amd64/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull ubuntu:noble diff --git a/ubuntu-24.04-noble-arm64v8/Dockerfile b/ubuntu-24.04-noble-arm64v8/Dockerfile new file mode 100644 index 00000000..cf70cd61 --- /dev/null +++ b/ubuntu-24.04-noble-arm64v8/Dockerfile @@ -0,0 +1,51 @@ +FROM arm64v8/ubuntu:noble + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + cmake \ + ghostscript \ + git \ + libffi-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo-progs \ + libjpeg8-dev \ + liblcms2-dev \ + libopenjp2-7-dev \ + libssl-dev \ + libtiff5-dev \ + libwebp-dev \ + meson \ + netpbm \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd pillow \ + && addgroup pillow sudo \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + +RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ + && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ + && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \ + && chown -R pillow:pillow /vpy3 + +ADD depends /depends +RUN cd /depends \ + && ./install_raqm.sh + +USER pillow +CMD ["depends/test.sh"] + +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-24.04-noble-arm64v8 diff --git a/ubuntu-24.04-noble-arm64v8/Makefile b/ubuntu-24.04-noble-arm64v8/Makefile new file mode 120000 index 00000000..5e7b0e26 --- /dev/null +++ b/ubuntu-24.04-noble-arm64v8/Makefile @@ -0,0 +1 @@ +../Makefile.sub \ No newline at end of file diff --git a/ubuntu-24.04-noble-arm64v8/test.sh b/ubuntu-24.04-noble-arm64v8/test.sh new file mode 100755 index 00000000..815f05fe --- /dev/null +++ b/ubuntu-24.04-noble-arm64v8/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-coverage +/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests diff --git a/ubuntu-24.04-noble-arm64v8/update.sh b/ubuntu-24.04-noble-arm64v8/update.sh new file mode 100755 index 00000000..4f18fbcf --- /dev/null +++ b/ubuntu-24.04-noble-arm64v8/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull arm64v8/ubuntu:noble diff --git a/ubuntu-24.04-noble-ppc64le/Dockerfile b/ubuntu-24.04-noble-ppc64le/Dockerfile new file mode 100644 index 00000000..3f37c5fe --- /dev/null +++ b/ubuntu-24.04-noble-ppc64le/Dockerfile @@ -0,0 +1,51 @@ +FROM ppc64le/ubuntu:noble + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + cmake \ + ghostscript \ + git \ + libffi-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo-progs \ + libjpeg8-dev \ + liblcms2-dev \ + libopenjp2-7-dev \ + libssl-dev \ + libtiff5-dev \ + libwebp-dev \ + meson \ + netpbm \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd pillow \ + && addgroup pillow sudo \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + +RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ + && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ + && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \ + && chown -R pillow:pillow /vpy3 + +ADD depends /depends +RUN cd /depends \ + && ./install_raqm.sh + +USER pillow +CMD ["depends/test.sh"] + +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-24.04-noble-ppc64le diff --git a/ubuntu-24.04-noble-ppc64le/Makefile b/ubuntu-24.04-noble-ppc64le/Makefile new file mode 120000 index 00000000..5e7b0e26 --- /dev/null +++ b/ubuntu-24.04-noble-ppc64le/Makefile @@ -0,0 +1 @@ +../Makefile.sub \ No newline at end of file diff --git a/ubuntu-24.04-noble-ppc64le/test.sh b/ubuntu-24.04-noble-ppc64le/test.sh new file mode 100755 index 00000000..815f05fe --- /dev/null +++ b/ubuntu-24.04-noble-ppc64le/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-coverage +/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests diff --git a/ubuntu-24.04-noble-ppc64le/update.sh b/ubuntu-24.04-noble-ppc64le/update.sh new file mode 100755 index 00000000..8c7571be --- /dev/null +++ b/ubuntu-24.04-noble-ppc64le/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull ppc64le/ubuntu:noble diff --git a/ubuntu-24.04-noble-s390x/Dockerfile b/ubuntu-24.04-noble-s390x/Dockerfile new file mode 100644 index 00000000..41f26699 --- /dev/null +++ b/ubuntu-24.04-noble-s390x/Dockerfile @@ -0,0 +1,50 @@ +FROM s390x/ubuntu:noble + +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + cmake \ + ghostscript \ + git \ + libffi-dev \ + libfreetype6-dev \ + libfribidi-dev \ + libharfbuzz-dev \ + libimagequant-dev \ + libjpeg-turbo-progs \ + libjpeg8-dev \ + liblcms2-dev \ + libopenjp2-7-dev \ + libtiff5-dev \ + meson \ + netpbm \ + python3-dev \ + python3-numpy \ + python3-setuptools \ + python3-tk \ + sudo \ + tcl8.6-dev \ + tk8.6-dev \ + virtualenv \ + wget \ + xvfb \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd pillow \ + && addgroup pillow sudo \ + && mkdir /home/pillow \ + && chown pillow:pillow /home/pillow + +RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ + && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ + && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \ + && chown -R pillow:pillow /vpy3 + +ADD depends /depends +RUN cd /depends \ + && ./install_raqm.sh \ + && ./install_webp.sh + +USER pillow +CMD ["depends/test.sh"] + +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-24.04-noble-s390x diff --git a/ubuntu-24.04-noble-s390x/Makefile b/ubuntu-24.04-noble-s390x/Makefile new file mode 120000 index 00000000..5e7b0e26 --- /dev/null +++ b/ubuntu-24.04-noble-s390x/Makefile @@ -0,0 +1 @@ +../Makefile.sub \ No newline at end of file diff --git a/ubuntu-24.04-noble-s390x/test.sh b/ubuntu-24.04-noble-s390x/test.sh new file mode 100755 index 00000000..815f05fe --- /dev/null +++ b/ubuntu-24.04-noble-s390x/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source /vpy3/bin/activate +cd /Pillow +make clean +make install-coverage +/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests diff --git a/ubuntu-24.04-noble-s390x/update.sh b/ubuntu-24.04-noble-s390x/update.sh new file mode 100755 index 00000000..026a8e35 --- /dev/null +++ b/ubuntu-24.04-noble-s390x/update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker pull s390x/ubuntu:noble From c488621cc19238cc0ef78b44d64432c9f21f9b89 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 27 Apr 2024 16:22:01 +1000 Subject: [PATCH 2/5] Removed addgroup and change user id to 1001 --- .github/workflows/build.yml | 2 +- alpine/Dockerfile | 2 +- amazon-2-amd64/Dockerfile | 2 +- amazon-2023-amd64/Dockerfile | 2 +- arch/Dockerfile | 2 +- centos-stream-9-amd64/Dockerfile | 2 +- debian-11-bullseye-amd64/Dockerfile | 2 +- debian-12-bookworm-amd64/Dockerfile | 2 +- debian-12-bookworm-x86/Dockerfile | 2 +- fedora-39-amd64/Dockerfile | 2 +- fedora-40-amd64/Dockerfile | 2 +- gentoo/Dockerfile | 2 +- ubuntu-20.04-focal-amd64/Dockerfile | 2 +- ubuntu-22.04-jammy-amd64/Dockerfile | 2 +- ubuntu-24.04-noble-amd64-valgrind/Dockerfile | 1 - ubuntu-24.04-noble-amd64/Dockerfile | 1 - ubuntu-24.04-noble-arm64v8/Dockerfile | 1 - ubuntu-24.04-noble-ppc64le/Dockerfile | 1 - ubuntu-24.04-noble-s390x/Dockerfile | 1 - 19 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cc4b813..4c03cb2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,7 +70,7 @@ jobs: git submodule update --remote Pillow fi (cd Pillow && git checkout main) - sudo chown -R 1000 $(pwd) + sudo chown -R 1001 $(pwd) - name: Test Image Build if: "matrix.test-image" diff --git a/alpine/Dockerfile b/alpine/Dockerfile index e54ecf89..01f78d4b 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -40,7 +40,7 @@ RUN cd /depends \ && ./install_imagequant.sh \ && ./install_raqm.sh -RUN /usr/sbin/adduser -D pillow \ +RUN /usr/sbin/adduser -D --uid 1001 pillow \ && virtualenv /vpy3 \ && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ && /vpy3/bin/pip install --no-cache-dir olefile pytest pytest-cov pytest-timeout \ diff --git a/amazon-2-amd64/Dockerfile b/amazon-2-amd64/Dockerfile index 4e353d96..7603e890 100644 --- a/amazon-2-amd64/Dockerfile +++ b/amazon-2-amd64/Dockerfile @@ -35,7 +35,7 @@ RUN yum install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd --uid 1000 pillow +RUN useradd --uid 1001 pillow RUN wget https://www.python.org/ftp/python/3.9.16/Python-3.9.16.tgz \ && tar xzf Python-3.9.16.tgz \ diff --git a/amazon-2023-amd64/Dockerfile b/amazon-2023-amd64/Dockerfile index 60b0750b..dcfb89e0 100644 --- a/amazon-2023-amd64/Dockerfile +++ b/amazon-2023-amd64/Dockerfile @@ -36,7 +36,7 @@ RUN yum install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd --uid 1000 pillow +RUN useradd --uid 1001 pillow RUN bash -c "/usr/bin/pip3 install virtualenv \ && /usr/bin/python3 -mvirtualenv -p /usr/bin/python3 --system-site-packages /vpy3 \ diff --git a/arch/Dockerfile b/arch/Dockerfile index 64f6409b..36f3fb87 100644 --- a/arch/Dockerfile +++ b/arch/Dockerfile @@ -41,7 +41,7 @@ RUN cd /depends \ && ./install_imagequant.sh \ && ./install_raqm.sh -RUN /sbin/useradd -m -U -u 1000 pillow \ +RUN /sbin/useradd -m -U --uid 1001 pillow \ && virtualenv --system-site-packages /vpy3 \ && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \ diff --git a/centos-stream-9-amd64/Dockerfile b/centos-stream-9-amd64/Dockerfile index a384f63d..3dca1cea 100644 --- a/centos-stream-9-amd64/Dockerfile +++ b/centos-stream-9-amd64/Dockerfile @@ -33,7 +33,7 @@ RUN yum install -y \ zlib-devel \ && yum clean all -RUN useradd --uid 1000 pillow +RUN useradd --uid 1001 pillow RUN bash -c "python3.9 -m pip install virtualenv \ && python3.9 -m virtualenv --system-site-packages /vpy3 \ diff --git a/debian-11-bullseye-amd64/Dockerfile b/debian-11-bullseye-amd64/Dockerfile index e1c572d0..07b1a3a3 100644 --- a/debian-11-bullseye-amd64/Dockerfile +++ b/debian-11-bullseye-amd64/Dockerfile @@ -65,7 +65,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/debian-12-bookworm-amd64/Dockerfile b/debian-12-bookworm-amd64/Dockerfile index 818e07e9..245d0fce 100644 --- a/debian-12-bookworm-amd64/Dockerfile +++ b/debian-12-bookworm-amd64/Dockerfile @@ -65,7 +65,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/debian-12-bookworm-x86/Dockerfile b/debian-12-bookworm-x86/Dockerfile index fcf467c7..9036e6a7 100644 --- a/debian-12-bookworm-x86/Dockerfile +++ b/debian-12-bookworm-x86/Dockerfile @@ -65,7 +65,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host=i686-unknown-linux-gnu ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd pillow \ +RUN useradd -u 1001 pillow \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/fedora-39-amd64/Dockerfile b/fedora-39-amd64/Dockerfile index 6d45acf4..a387ee8d 100644 --- a/fedora-39-amd64/Dockerfile +++ b/fedora-39-amd64/Dockerfile @@ -25,7 +25,7 @@ RUN dnf install -y \ zlib-devel \ && dnf clean all -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && chown pillow:pillow /home/pillow RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ diff --git a/fedora-40-amd64/Dockerfile b/fedora-40-amd64/Dockerfile index 9e72e9b6..246235af 100644 --- a/fedora-40-amd64/Dockerfile +++ b/fedora-40-amd64/Dockerfile @@ -25,7 +25,7 @@ RUN dnf install -y \ zlib-devel \ && dnf clean all -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && chown pillow:pillow /home/pillow RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ diff --git a/gentoo/Dockerfile b/gentoo/Dockerfile index 5be45e59..6967946a 100644 --- a/gentoo/Dockerfile +++ b/gentoo/Dockerfile @@ -27,7 +27,7 @@ RUN emerge --quiet dev-python/virtualenv dev-util/cargo-c dev-build/meson x11-mi RUN USE="jpeg jpeg2k lcms tiff truetype webp xcb zlib" emerge --quiet --onlydeps dev-python/pillow RUN emerge --quiet app-text/ghostscript-gpl dev-python/numpy -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && chown pillow:pillow /home/pillow RUN virtualenv --system-site-packages /vpy3 \ diff --git a/ubuntu-20.04-focal-amd64/Dockerfile b/ubuntu-20.04-focal-amd64/Dockerfile index 8145482f..e66ab36f 100644 --- a/ubuntu-20.04-focal-amd64/Dockerfile +++ b/ubuntu-20.04-focal-amd64/Dockerfile @@ -43,7 +43,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-22.04-jammy-amd64/Dockerfile b/ubuntu-22.04-jammy-amd64/Dockerfile index 92cce941..c4a87de1 100644 --- a/ubuntu-22.04-jammy-amd64/Dockerfile +++ b/ubuntu-22.04-jammy-amd64/Dockerfile @@ -40,7 +40,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile index 6a49b412..12851b2c 100644 --- a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile +++ b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile @@ -34,7 +34,6 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ && apt-get clean && rm -rf /var/lib/apt/lists/* RUN useradd pillow \ - && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-24.04-noble-amd64/Dockerfile b/ubuntu-24.04-noble-amd64/Dockerfile index 8f382726..04e5995c 100644 --- a/ubuntu-24.04-noble-amd64/Dockerfile +++ b/ubuntu-24.04-noble-amd64/Dockerfile @@ -42,7 +42,6 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ && rm -rf /var/lib/apt/lists/* RUN useradd pillow \ - && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-24.04-noble-arm64v8/Dockerfile b/ubuntu-24.04-noble-arm64v8/Dockerfile index cf70cd61..74f72eb7 100644 --- a/ubuntu-24.04-noble-arm64v8/Dockerfile +++ b/ubuntu-24.04-noble-arm64v8/Dockerfile @@ -32,7 +32,6 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ && rm -rf /var/lib/apt/lists/* RUN useradd pillow \ - && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-24.04-noble-ppc64le/Dockerfile b/ubuntu-24.04-noble-ppc64le/Dockerfile index 3f37c5fe..2759042d 100644 --- a/ubuntu-24.04-noble-ppc64le/Dockerfile +++ b/ubuntu-24.04-noble-ppc64le/Dockerfile @@ -32,7 +32,6 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ && rm -rf /var/lib/apt/lists/* RUN useradd pillow \ - && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/ubuntu-24.04-noble-s390x/Dockerfile b/ubuntu-24.04-noble-s390x/Dockerfile index 41f26699..e880ae71 100644 --- a/ubuntu-24.04-noble-s390x/Dockerfile +++ b/ubuntu-24.04-noble-s390x/Dockerfile @@ -30,7 +30,6 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ && rm -rf /var/lib/apt/lists/* RUN useradd pillow \ - && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow From 05a6ad51d8ca91923b1f397857ab9304bde398b5 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 27 Apr 2024 22:05:53 +1000 Subject: [PATCH 3/5] Restored Ubuntu 22.04 arm64v8 --- .github/workflows/build.yml | 4 +- Makefile | 2 +- .../Dockerfile | 2 +- .../Makefile | 0 .../test.sh | 0 .../update.sh | 0 ubuntu-24.04-noble-arm64v8/Dockerfile | 50 ------------------- ubuntu-24.04-noble-arm64v8/Makefile | 1 - ubuntu-24.04-noble-arm64v8/test.sh | 6 --- ubuntu-24.04-noble-arm64v8/update.sh | 2 - 10 files changed, 4 insertions(+), 63 deletions(-) rename {archive/ubuntu-22.04-jammy-arm64v8 => ubuntu-22.04-jammy-arm64v8}/Dockerfile (97%) rename {archive/ubuntu-22.04-jammy-arm64v8 => ubuntu-22.04-jammy-arm64v8}/Makefile (100%) rename {archive/ubuntu-22.04-jammy-arm64v8 => ubuntu-22.04-jammy-arm64v8}/test.sh (100%) rename {archive/ubuntu-22.04-jammy-arm64v8 => ubuntu-22.04-jammy-arm64v8}/update.sh (100%) delete mode 100644 ubuntu-24.04-noble-arm64v8/Dockerfile delete mode 120000 ubuntu-24.04-noble-arm64v8/Makefile delete mode 100755 ubuntu-24.04-noble-arm64v8/test.sh delete mode 100755 ubuntu-24.04-noble-arm64v8/update.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c03cb2e..3536eaef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: matrix: image: # Run slower jobs first to give them a headstart and reduce waiting time - - "ubuntu-24.04-noble-arm64v8" + - "ubuntu-22.04-jammy-arm64v8" - "ubuntu-24.04-noble-ppc64le" - "ubuntu-24.04-noble-s390x" # test image for manylinux-wheel build @@ -44,7 +44,7 @@ jobs: test-image: "ubuntu-24.04-noble-amd64" - image: "manylinux_2_28-wheel-build" test-image: "ubuntu-24.04-noble-amd64" - - image: "ubuntu-24.04-noble-arm64v8" + - image: "ubuntu-22.04-jammy-arm64v8" qemu-arch: "aarch64" - image: "ubuntu-24.04-noble-ppc64le" qemu-arch: "ppc64le" diff --git a/Makefile b/Makefile index 32165b62..799fb734 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ TARGETS = \ ubuntu-22.04-jammy-amd64 \ ubuntu-24.04-noble-amd64 \ ubuntu-24.04-noble-amd64-valgrind \ - ubuntu-24.04-noble-arm64v8 \ + ubuntu-22.04-jammy-arm64v8 \ ubuntu-24.04-noble-ppc64le \ ubuntu-24.04-noble-s390x diff --git a/archive/ubuntu-22.04-jammy-arm64v8/Dockerfile b/ubuntu-22.04-jammy-arm64v8/Dockerfile similarity index 97% rename from archive/ubuntu-22.04-jammy-arm64v8/Dockerfile rename to ubuntu-22.04-jammy-arm64v8/Dockerfile index 2093d95e..54b97f55 100644 --- a/archive/ubuntu-22.04-jammy-arm64v8/Dockerfile +++ b/ubuntu-22.04-jammy-arm64v8/Dockerfile @@ -31,7 +31,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/archive/ubuntu-22.04-jammy-arm64v8/Makefile b/ubuntu-22.04-jammy-arm64v8/Makefile similarity index 100% rename from archive/ubuntu-22.04-jammy-arm64v8/Makefile rename to ubuntu-22.04-jammy-arm64v8/Makefile diff --git a/archive/ubuntu-22.04-jammy-arm64v8/test.sh b/ubuntu-22.04-jammy-arm64v8/test.sh similarity index 100% rename from archive/ubuntu-22.04-jammy-arm64v8/test.sh rename to ubuntu-22.04-jammy-arm64v8/test.sh diff --git a/archive/ubuntu-22.04-jammy-arm64v8/update.sh b/ubuntu-22.04-jammy-arm64v8/update.sh similarity index 100% rename from archive/ubuntu-22.04-jammy-arm64v8/update.sh rename to ubuntu-22.04-jammy-arm64v8/update.sh diff --git a/ubuntu-24.04-noble-arm64v8/Dockerfile b/ubuntu-24.04-noble-arm64v8/Dockerfile deleted file mode 100644 index 74f72eb7..00000000 --- a/ubuntu-24.04-noble-arm64v8/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -FROM arm64v8/ubuntu:noble - -RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ - cmake \ - ghostscript \ - git \ - libffi-dev \ - libfreetype6-dev \ - libfribidi-dev \ - libharfbuzz-dev \ - libimagequant-dev \ - libjpeg-turbo-progs \ - libjpeg8-dev \ - liblcms2-dev \ - libopenjp2-7-dev \ - libssl-dev \ - libtiff5-dev \ - libwebp-dev \ - meson \ - netpbm \ - python3-dev \ - python3-numpy \ - python3-setuptools \ - python3-tk \ - sudo \ - tcl8.6-dev \ - tk8.6-dev \ - virtualenv \ - wget \ - xvfb \ - zlib1g-dev \ - && rm -rf /var/lib/apt/lists/* - -RUN useradd pillow \ - && mkdir /home/pillow \ - && chown pillow:pillow /home/pillow - -RUN virtualenv -p /usr/bin/python3.12 --system-site-packages /vpy3 \ - && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ - && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout \ - && chown -R pillow:pillow /vpy3 - -ADD depends /depends -RUN cd /depends \ - && ./install_raqm.sh - -USER pillow -CMD ["depends/test.sh"] - -#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-24.04-noble-arm64v8 diff --git a/ubuntu-24.04-noble-arm64v8/Makefile b/ubuntu-24.04-noble-arm64v8/Makefile deleted file mode 120000 index 5e7b0e26..00000000 --- a/ubuntu-24.04-noble-arm64v8/Makefile +++ /dev/null @@ -1 +0,0 @@ -../Makefile.sub \ No newline at end of file diff --git a/ubuntu-24.04-noble-arm64v8/test.sh b/ubuntu-24.04-noble-arm64v8/test.sh deleted file mode 100755 index 815f05fe..00000000 --- a/ubuntu-24.04-noble-arm64v8/test.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -source /vpy3/bin/activate -cd /Pillow -make clean -make install-coverage -/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests diff --git a/ubuntu-24.04-noble-arm64v8/update.sh b/ubuntu-24.04-noble-arm64v8/update.sh deleted file mode 100755 index 4f18fbcf..00000000 --- a/ubuntu-24.04-noble-arm64v8/update.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -docker pull arm64v8/ubuntu:noble From 0c8026ba13a9a45879fb52805b3b878df124d976 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 28 Apr 2024 07:05:03 +1000 Subject: [PATCH 4/5] Restored Ubuntu 22.04 amd64 valgrind --- .github/workflows/build.yml | 2 +- Makefile | 2 +- .../Dockerfile | 2 +- .../Dockerfile-dbg | 0 .../Makefile | 0 .../README-dbg.md | 0 .../python.supp | 0 .../setup.sh | 0 .../test.sh | 0 .../update.sh | 0 ubuntu-24.04-noble-amd64-valgrind/Dockerfile | 54 ------------------- .../Dockerfile-dbg | 26 --------- ubuntu-24.04-noble-amd64-valgrind/Makefile | 38 ------------- .../README-dbg.md | 52 ------------------ ubuntu-24.04-noble-amd64-valgrind/python.supp | 6 --- ubuntu-24.04-noble-amd64-valgrind/setup.sh | 7 --- ubuntu-24.04-noble-amd64-valgrind/test.sh | 16 ------ ubuntu-24.04-noble-amd64-valgrind/update.sh | 2 - 18 files changed, 3 insertions(+), 204 deletions(-) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/Dockerfile (97%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/Dockerfile-dbg (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/Makefile (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/README-dbg.md (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/python.supp (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/setup.sh (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/test.sh (100%) rename {archive/ubuntu-22.04-jammy-amd64-valgrind => ubuntu-22.04-jammy-amd64-valgrind}/update.sh (100%) delete mode 100644 ubuntu-24.04-noble-amd64-valgrind/Dockerfile delete mode 100644 ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg delete mode 100644 ubuntu-24.04-noble-amd64-valgrind/Makefile delete mode 100644 ubuntu-24.04-noble-amd64-valgrind/README-dbg.md delete mode 100644 ubuntu-24.04-noble-amd64-valgrind/python.supp delete mode 100755 ubuntu-24.04-noble-amd64-valgrind/setup.sh delete mode 100755 ubuntu-24.04-noble-amd64-valgrind/test.sh delete mode 100755 ubuntu-24.04-noble-amd64-valgrind/update.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3536eaef..051015a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - "gentoo" - "ubuntu-20.04-focal-amd64" - "ubuntu-22.04-jammy-amd64" - - "ubuntu-24.04-noble-amd64-valgrind" + - "ubuntu-22.04-jammy-amd64-valgrind" # has a dependency on the test image - "manylinux2014-wheel-build" - "manylinux_2_28-wheel-build" diff --git a/Makefile b/Makefile index 799fb734..af2e46b7 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ TARGETS = \ ubuntu-20.04-focal-amd64 \ ubuntu-22.04-jammy-amd64 \ ubuntu-24.04-noble-amd64 \ - ubuntu-24.04-noble-amd64-valgrind \ + ubuntu-22.04-jammy-amd64-valgrind \ ubuntu-22.04-jammy-arm64v8 \ ubuntu-24.04-noble-ppc64le \ ubuntu-24.04-noble-s390x diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile b/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile similarity index 97% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile rename to ubuntu-22.04-jammy-amd64-valgrind/Dockerfile index 507e7e4b..3c3293ea 100644 --- a/archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile +++ b/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile @@ -33,7 +33,7 @@ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ valgrind \ && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN useradd pillow \ +RUN useradd --uid 1001 pillow \ && addgroup pillow sudo \ && mkdir /home/pillow \ && chown pillow:pillow /home/pillow diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg b/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg rename to ubuntu-22.04-jammy-amd64-valgrind/Dockerfile-dbg diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/Makefile b/ubuntu-22.04-jammy-amd64-valgrind/Makefile similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/Makefile rename to ubuntu-22.04-jammy-amd64-valgrind/Makefile diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md b/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md rename to ubuntu-22.04-jammy-amd64-valgrind/README-dbg.md diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/python.supp b/ubuntu-22.04-jammy-amd64-valgrind/python.supp similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/python.supp rename to ubuntu-22.04-jammy-amd64-valgrind/python.supp diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/setup.sh b/ubuntu-22.04-jammy-amd64-valgrind/setup.sh similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/setup.sh rename to ubuntu-22.04-jammy-amd64-valgrind/setup.sh diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/test.sh b/ubuntu-22.04-jammy-amd64-valgrind/test.sh similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/test.sh rename to ubuntu-22.04-jammy-amd64-valgrind/test.sh diff --git a/archive/ubuntu-22.04-jammy-amd64-valgrind/update.sh b/ubuntu-22.04-jammy-amd64-valgrind/update.sh similarity index 100% rename from archive/ubuntu-22.04-jammy-amd64-valgrind/update.sh rename to ubuntu-22.04-jammy-amd64-valgrind/update.sh diff --git a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile deleted file mode 100644 index 12851b2c..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM ubuntu:noble - -RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ - cmake \ - ghostscript \ - git \ - libffi-dev \ - libfreetype6-dev \ - libfribidi-dev \ - libharfbuzz-dev \ - libimagequant-dev \ - libjpeg-turbo-progs \ - libjpeg8-dev \ - liblcms2-dev \ - libopenjp2-7-dev \ - libssl-dev \ - libtiff5-dev \ - libwebp-dev \ - meson \ - netpbm \ - python3.12-dbg \ - python3-dev \ - python3-numpy \ - python3-setuptools \ - python3-tk \ - sudo \ - tcl8.6-dev \ - tk8.6-dev \ - virtualenv \ - wget \ - xvfb \ - zlib1g-dev \ - valgrind \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN useradd pillow \ - && mkdir /home/pillow \ - && chown pillow:pillow /home/pillow - -RUN virtualenv -p /usr/bin/python3.12-dbg --system-site-packages /vpy3 \ - && /vpy3/bin/pip install --no-cache-dir --upgrade pip \ - && /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov pytest-timeout pytest-valgrind \ - && chown -R pillow:pillow /vpy3 - -ADD depends /depends -RUN cd /depends \ - && ./install_raqm.sh - -COPY python.supp /depends - -USER pillow -CMD ["depends/test.sh"] - -#docker run -v $TRAVIS_BUILD_DIR:/Pillow pythonpillow/ubuntu-24.04-noble-amd64 diff --git a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg b/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg deleted file mode 100644 index e0c6bc63..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/Dockerfile-dbg +++ /dev/null @@ -1,26 +0,0 @@ -FROM ubuntu-24.04-noble-amd64-valgrind - -USER root -RUN apt-get -qq update && apt-get install -y ubuntu-dbgsym-keyring - -RUN echo "deb http://ddebs.ubuntu.com noble main restricted universe multiverse" > /etc/apt/sources.list.d/ddebs.list -RUN echo "deb http://ddebs.ubuntu.com noble-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/ddebs.list -RUN perl -pi -e 's/# deb-src/deb-src/;' /etc/apt/sources.list - -RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ - libfreetype6-dbgsym \ - libtiff5-dbgsym \ - libwebpmux3-dbgsym \ - libwebp7-dbgsym \ - libwebpdemux2-dbgsym \ - libwebpmux3-dbgsym \ - libopenjp2-7-dbgsym \ - libharfbuzz0b-dbgsym \ - libfribidi0-dbgsym \ - emacs-nox - -RUN cd /usr/src && apt-get source freetype tiff libwebp libopenjp2-7 harfbuzz fribidi - -COPY setup.sh /depends/setup.sh -USER pillow -CMD ["/depends/setup.sh"] diff --git a/ubuntu-24.04-noble-amd64-valgrind/Makefile b/ubuntu-24.04-noble-amd64-valgrind/Makefile deleted file mode 100644 index 096cebcd..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -WD = $(shell pwd) -USERNAME := $(shell docker info | grep Username | xargs | cut -d ' ' -f 2) -TARGET := $(notdir $(WD)) -ROOT := $(abspath $(WD)/../Pillow) -IMAGENAME := $(if $(USERNAME), $(USERNAME)/$(TARGET), $(TARGET)) -BRANCH := $(shell git rev-parse --abbrev-ref HEAD) - -.PHONY: build -build: - cp -r ../Pillow/depends . - cp test.sh depends - docker build -t $(IMAGENAME):$(BRANCH) . - -.PHONY: update -update: - ./update.sh - -.PHONY: test -test: - docker run --rm -e "PILLOW_VALGRIND_TEST=true" -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH) - -.PHONY: push -push: - docker push $(IMAGENAME):$(BRANCH) - -.PHONY: clean -clean: - rm -r depends - -.PHONY: shell -shell: - docker run --rm -it -v $(ROOT):/Pillow $(IMAGENAME):$(BRANCH) /bin/bash - -build-dbg: - docker build -t $(IMAGENAME)-dbg:$(BRANCH) -f Dockerfile-dbg . - -dbg: - docker run --privileged --rm -it -v $(ROOT):/Pillow $(IMAGENAME)-dbg:$(BRANCH) diff --git a/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md b/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md deleted file mode 100644 index f983c705..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/README-dbg.md +++ /dev/null @@ -1,52 +0,0 @@ -# Debug image - -Sometimes we'll get an error that's most easily reproduced in the -valgrind docker image. [citation needed] - -The `build-dbg` and `dbg` shell provide some symbols and debugging -tools to fix that. Emacs is provided, as are some of the source packages. - -You may need to set source directories with the `set substitute-path` -command. - -e.g.: - -``` -pillow@2f7a4ea5c959:/Pillow/oss-fuzz-tests$ gdb python -GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 -Copyright (C) 2022 Free Software Foundation, Inc. -License GPLv3+: GNU GPL version 3 or later -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. -Type "show copying" and "show warranty" for details. -This GDB was configured as "x86_64-linux-gnu". -Type "show configuration" for configuration details. -For bug reporting instructions, please see: -. -Find the GDB manual and other documentation resources online at: - . - -For help, type "help". -Type "apropos word" to search for commands related to "word"... -Reading symbols from python... -(gdb) b _imagingft.c:922 -No source file named _imagingft.c. -Make breakpoint pending on future shared library load? (y or [n]) y -Breakpoint 1 (_imagingft.c:922) pending. -(gdb) r f.py DejaVuSans-24-8-stripped.ttf -Starting program: /vpy3/bin/python f.py DejaVuSans-24-8-stripped.ttf -[Thread debugging using libthread_db enabled] -Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". - -Breakpoint 1, font_render (self=0x7ffff70e9780, args=) at src/_imagingft.c:922 -922 if (!bitmap.buffer) { -... -0x00007ffff6fe4d6a in FT_Bitmap_Convert (library=, source=source@entry=0x7fffffffdff0, target=target@entry=0x7fffffffe020, alignment=alignment@entry=1) at ./src/base/ftbitmap.c:633 -633 ./src/base/ftbitmap.c: No such file or directory. -(gdb) set substitute-path ./src /usr/src/freetype-2.11.1+dfsg/src/ -(gdb) f -#0 0x00007ffff6fe4d6a in FT_Bitmap_Convert (library=, source=source@entry=0x7fffffffdff0, target=target@entry=0x7fffffffe020, - alignment=alignment@entry=1) at ./src/base/ftbitmap.c:633 -633 FT_Int val = *ss; - -``` diff --git a/ubuntu-24.04-noble-amd64-valgrind/python.supp b/ubuntu-24.04-noble-amd64-valgrind/python.supp deleted file mode 100644 index 80d7a16f..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/python.supp +++ /dev/null @@ -1,6 +0,0 @@ -{ - - Memcheck:Cond - ... - fun:encode_current_locale -} diff --git a/ubuntu-24.04-noble-amd64-valgrind/setup.sh b/ubuntu-24.04-noble-amd64-valgrind/setup.sh deleted file mode 100755 index 83cbaa8f..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -source /vpy3/bin/activate -cd /Pillow -make clean -make install - -bash diff --git a/ubuntu-24.04-noble-amd64-valgrind/test.sh b/ubuntu-24.04-noble-amd64-valgrind/test.sh deleted file mode 100755 index a174ad32..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -source /vpy3/bin/activate -cd /Pillow -make clean -make install-coverage - -PYTHONMALLOC=malloc valgrind --suppressions=/depends/python.supp --leak-check=no \ - --log-file=/tmp/valgrind-output \ - python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output - -# To run one test in the image: -# make bash -# PYTHONMALLOC=malloc valgrind --leak-check=no --suppressions=/depends/python.supp pytest -vv --valgrind --no-memcheck Tests/test_file_eps.py - -# to run one test with GDB support: -# PYTHONMALLOC=malloc valgrind --vgdb-error=0 --suppressions=../../test/python.supp pytest Tests/test_file_libtiff.py::TestFileLibTiff::test_custom_metadata diff --git a/ubuntu-24.04-noble-amd64-valgrind/update.sh b/ubuntu-24.04-noble-amd64-valgrind/update.sh deleted file mode 100755 index b5962bec..00000000 --- a/ubuntu-24.04-noble-amd64-valgrind/update.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -docker pull ubuntu:noble From e5c825e1aacd695a335c4f19330f1308c6275402 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 28 Apr 2024 18:20:49 +1000 Subject: [PATCH 5/5] Restored Ubuntu 22.04 bases for manylinux builds --- .github/workflows/build.yml | 4 ++-- manylinux2014-wheel-build/Makefile | 2 +- manylinux_2_28-wheel-build/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 051015a8..991fc48d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,9 +41,9 @@ jobs: - "manylinux_2_28-wheel-build" include: - image: "manylinux2014-wheel-build" - test-image: "ubuntu-24.04-noble-amd64" + test-image: "ubuntu-22.04-jammy-amd64" - image: "manylinux_2_28-wheel-build" - test-image: "ubuntu-24.04-noble-amd64" + test-image: "ubuntu-22.04-jammy-amd64" - image: "ubuntu-22.04-jammy-arm64v8" qemu-arch: "aarch64" - image: "ubuntu-24.04-noble-ppc64le" diff --git a/manylinux2014-wheel-build/Makefile b/manylinux2014-wheel-build/Makefile index ec867ee1..44ebf5d7 100644 --- a/manylinux2014-wheel-build/Makefile +++ b/manylinux2014-wheel-build/Makefile @@ -3,7 +3,7 @@ TARGET := $(notdir $(WD)) ROOT := $(abspath $(WD)/../Pillow) IMAGENAME := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET), $(TARGET)) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -TEST_TARGET = ubuntu-24.04-noble-amd64 +TEST_TARGET = ubuntu-22.04-jammy-amd64 TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TEST_TARGET):$(BRANCH), pythonpillow/$(TEST_TARGET):main) .PHONY: build diff --git a/manylinux_2_28-wheel-build/Makefile b/manylinux_2_28-wheel-build/Makefile index df4017fe..0cd94f59 100644 --- a/manylinux_2_28-wheel-build/Makefile +++ b/manylinux_2_28-wheel-build/Makefile @@ -3,7 +3,7 @@ TARGET := $(notdir $(WD)) ROOT := $(abspath $(WD)/../Pillow) IMAGENAME := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TARGET), $(TARGET)) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -TEST_TARGET = ubuntu-24.04-noble-amd64 +TEST_TARGET = ubuntu-22.04-jammy-amd64 TEST_IMAGE := $(if $(DOCKER_USERNAME), $(DOCKER_USERNAME)/$(TEST_TARGET):$(BRANCH), pythonpillow/$(TEST_TARGET):main) .PHONY: build