From c7273c06dab75941b9fb058208e55fb871a7c559 Mon Sep 17 00:00:00 2001 From: David Given Date: Fri, 22 Nov 2024 21:17:34 +0100 Subject: [PATCH 1/2] Add docker tests for Fedora 41. --- Makefile | 20 +++++--------------- tests/docker/Dockerfile.debian11 | 2 +- tests/docker/Dockerfile.debian12 | 2 +- tests/docker/Dockerfile.fedora41 | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 tests/docker/Dockerfile.fedora41 diff --git a/Makefile b/Makefile index f04549cc..3f371c04 100644 --- a/Makefile +++ b/Makefile @@ -109,21 +109,11 @@ include build/ab.mk DOCKERFILES = \ debian11 \ - debian12 + debian12 \ + fedora41 -define run-docker - docker build -t $1 -f tests/docker/Dockerfile.$(strip $1) . - docker run \ - --device=/dev/kvm \ - --rm \ - --attach STDOUT \ - --attach STDERR \ - $1 \ - make - -endef +docker-%: tests/docker/Dockerfile.% + docker build -t $* -f $< . .PHONY: dockertests -dockertests: - $(hide) echo DOCKERTESTS - $(foreach f,$(DOCKERFILES), $(call run-docker, $f)) +dockertests: $(foreach f,$(DOCKERFILES), docker-$(strip $f) .WAIT) diff --git a/tests/docker/Dockerfile.debian11 b/tests/docker/Dockerfile.debian11 index f05e6dce..abf5d9d2 100644 --- a/tests/docker/Dockerfile.debian11 +++ b/tests/docker/Dockerfile.debian11 @@ -28,4 +28,4 @@ COPY --chown=app:app config.py . COPY --chown=app:app protocol.h . COPY --chown=app:app README.md . - +RUN make diff --git a/tests/docker/Dockerfile.debian12 b/tests/docker/Dockerfile.debian12 index e788210d..330db663 100644 --- a/tests/docker/Dockerfile.debian12 +++ b/tests/docker/Dockerfile.debian12 @@ -28,4 +28,4 @@ COPY --chown=app:app config.py . COPY --chown=app:app protocol.h . COPY --chown=app:app README.md . - +RUN make diff --git a/tests/docker/Dockerfile.fedora41 b/tests/docker/Dockerfile.fedora41 new file mode 100644 index 00000000..ed5b2d28 --- /dev/null +++ b/tests/docker/Dockerfile.fedora41 @@ -0,0 +1,32 @@ +FROM fedora:41 + +RUN dnf update -y +RUN dnf -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-41.noarch.rpm +RUN dnf -y install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-40-1.noarch.rpm +RUN dnf -y install \ + protobuf-compiler protobuf-devel sqlite-devel libudev-devel \ + wxGTK-devel gcc gcc-c++ fmt-devel png2ico + +RUN useradd app +RUN mkdir -p /home/app +RUN chown app /home/app +USER app +WORKDIR /home/app + +COPY --chown=app:app arch arch +COPY --chown=app:app build build +COPY --chown=app:app dep dep +COPY --chown=app:app doc doc +COPY --chown=app:app extras extras +COPY --chown=app:app lib lib +COPY --chown=app:app scripts scripts +COPY --chown=app:app src src +COPY --chown=app:app tests tests +COPY --chown=app:app tools tools +COPY --chown=app:app Makefile . +COPY --chown=app:app build.py . +COPY --chown=app:app config.py . +COPY --chown=app:app protocol.h . +COPY --chown=app:app README.md . + +RUN make From 8ff01537083c257d3f96baee40cc658462d06ad3 Mon Sep 17 00:00:00 2001 From: David Given Date: Fri, 22 Nov 2024 21:21:05 +0100 Subject: [PATCH 2/2] Add fedora 40 docker test. --- Makefile | 1 + tests/docker/Dockerfile.fedora40 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/docker/Dockerfile.fedora40 diff --git a/Makefile b/Makefile index 3f371c04..2a2560f8 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,7 @@ include build/ab.mk DOCKERFILES = \ debian11 \ debian12 \ + fedora40 \ fedora41 docker-%: tests/docker/Dockerfile.% diff --git a/tests/docker/Dockerfile.fedora40 b/tests/docker/Dockerfile.fedora40 new file mode 100644 index 00000000..09d024e7 --- /dev/null +++ b/tests/docker/Dockerfile.fedora40 @@ -0,0 +1,32 @@ +FROM fedora:40 + +RUN dnf update -y +RUN dnf -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-40.noarch.rpm +RUN dnf -y install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-40-1.noarch.rpm +RUN dnf -y install \ + protobuf-compiler protobuf-devel sqlite-devel libudev-devel \ + wxGTK-devel gcc gcc-c++ fmt-devel png2ico + +RUN useradd app +RUN mkdir -p /home/app +RUN chown app /home/app +USER app +WORKDIR /home/app + +COPY --chown=app:app arch arch +COPY --chown=app:app build build +COPY --chown=app:app dep dep +COPY --chown=app:app doc doc +COPY --chown=app:app extras extras +COPY --chown=app:app lib lib +COPY --chown=app:app scripts scripts +COPY --chown=app:app src src +COPY --chown=app:app tests tests +COPY --chown=app:app tools tools +COPY --chown=app:app Makefile . +COPY --chown=app:app build.py . +COPY --chown=app:app config.py . +COPY --chown=app:app protocol.h . +COPY --chown=app:app README.md . + +RUN make