From 096c6b5848f4c713e04ddfabb4ebee3235c58b31 Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Tue, 31 Dec 2019 21:42:26 -0600 Subject: [PATCH] added armel with manual patch for now Signed-off-by: Adam Hill --- Dockerfile.py | 6 +++--- Dockerfile.template | 3 ++- Dockerfile_aarch64 | 3 ++- Dockerfile_amd64 | 3 ++- Dockerfile_armel | 3 ++- Dockerfile_armhf | 3 ++- install.sh | 5 +++++ test/conftest.py | 2 +- tox.ini | 5 +++-- 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Dockerfile.py b/Dockerfile.py index 1d865ad..0ce67c3 100755 --- a/Dockerfile.py +++ b/Dockerfile.py @@ -99,9 +99,9 @@ def build_dockerfiles(args): for arch in args['--arch']: # TODO: include from external .py that can be shared with Dockerfile.py / Tests / deploy scripts ''' - if arch == 'armel': - print("Skipping armel, incompatible upstream binaries/broken") - continue + #if arch == 'armel': + # print("Skipping armel, incompatible upstream binaries/broken") + # continue build('pihole', arch, args) diff --git a/Dockerfile.template b/Dockerfile.template index 59ac7aa..c492092 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,6 +1,8 @@ FROM {{ pihole.base }} +ENV ARCH {{ pihole.arch }} ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.s6arch }}.tar.gz + COPY install.sh /usr/local/bin/install.sh COPY VERSION /etc/docker-pi-hole-version ENV PIHOLE_INSTALL /root/ph_install.sh @@ -36,7 +38,6 @@ ENV FTL_CMD no-daemon ENV DNSMASQ_USER root ENV VERSION {{ pihole.version }} -ENV ARCH {{ pihole.arch }} ENV PATH /opt/pihole:${PATH} LABEL image="{{ pihole.name }}:{{ pihole.version }}_{{ pihole.arch }}" diff --git a/Dockerfile_aarch64 b/Dockerfile_aarch64 index 8851b7c..f4e68e1 100644 --- a/Dockerfile_aarch64 +++ b/Dockerfile_aarch64 @@ -1,6 +1,8 @@ FROM multiarch/debian-debootstrap:arm64-stretch-slim +ENV ARCH aarch64 ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-aarch64.tar.gz + COPY install.sh /usr/local/bin/install.sh COPY VERSION /etc/docker-pi-hole-version ENV PIHOLE_INSTALL /root/ph_install.sh @@ -36,7 +38,6 @@ ENV FTL_CMD no-daemon ENV DNSMASQ_USER root ENV VERSION v4.3.2 -ENV ARCH aarch64 ENV PATH /opt/pihole:${PATH} LABEL image="pihole/pihole:v4.3.2_aarch64" diff --git a/Dockerfile_amd64 b/Dockerfile_amd64 index d18374d..a88cb57 100644 --- a/Dockerfile_amd64 +++ b/Dockerfile_amd64 @@ -1,6 +1,8 @@ FROM pihole/debian-base:latest +ENV ARCH amd64 ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-amd64.tar.gz + COPY install.sh /usr/local/bin/install.sh COPY VERSION /etc/docker-pi-hole-version ENV PIHOLE_INSTALL /root/ph_install.sh @@ -36,7 +38,6 @@ ENV FTL_CMD no-daemon ENV DNSMASQ_USER root ENV VERSION v4.3.2 -ENV ARCH amd64 ENV PATH /opt/pihole:${PATH} LABEL image="pihole/pihole:v4.3.2_amd64" diff --git a/Dockerfile_armel b/Dockerfile_armel index c8ce739..9a377bd 100644 --- a/Dockerfile_armel +++ b/Dockerfile_armel @@ -1,6 +1,8 @@ FROM multiarch/debian-debootstrap:armel-stretch-slim +ENV ARCH armel ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-arm.tar.gz + COPY install.sh /usr/local/bin/install.sh COPY VERSION /etc/docker-pi-hole-version ENV PIHOLE_INSTALL /root/ph_install.sh @@ -36,7 +38,6 @@ ENV FTL_CMD no-daemon ENV DNSMASQ_USER root ENV VERSION v4.3.2 -ENV ARCH armel ENV PATH /opt/pihole:${PATH} LABEL image="pihole/pihole:v4.3.2_armel" diff --git a/Dockerfile_armhf b/Dockerfile_armhf index bbc3daa..611e6c0 100644 --- a/Dockerfile_armhf +++ b/Dockerfile_armhf @@ -1,6 +1,8 @@ FROM multiarch/debian-debootstrap:armhf-stretch-slim +ENV ARCH armhf ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-armhf.tar.gz + COPY install.sh /usr/local/bin/install.sh COPY VERSION /etc/docker-pi-hole-version ENV PIHOLE_INSTALL /root/ph_install.sh @@ -36,7 +38,6 @@ ENV FTL_CMD no-daemon ENV DNSMASQ_USER root ENV VERSION v4.3.2 -ENV ARCH armhf ENV PATH /opt/pihole:${PATH} LABEL image="pihole/pihole:v4.3.2_armhf" diff --git a/install.sh b/install.sh index 44341ca..2126319 100755 --- a/install.sh +++ b/install.sh @@ -95,6 +95,11 @@ else fetch_release_metadata "${PI_HOLE_LOCAL_REPO}" "${CORE_VERSION}" fetch_release_metadata "${webInterfaceDir}" "${WEB_VERSION}" fi +# FTL Armel fix not in prod yet +# Remove once https://github.com/pi-hole/pi-hole/commit/3fbb0ac8dde14b8edc1982ae3a2a021f3cf68477 is in master +if [[ "$ARCH" == 'armel' ]]; then + curl -o /usr/bin/pihole-FTL https://ftl.pi-hole.net/development/pihole-FTL-armel-native +fi sed -i 's/readonly //g' /opt/pihole/webpage.sh sed -i '/^WEBPASSWORD/d' /etc/pihole/setupVars.conf diff --git a/test/conftest.py b/test/conftest.py index 6bef880..95fa39c 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -89,7 +89,7 @@ def DockerPersist(request, persist_test_args, persist_args, persist_image, persi def entrypoint(): return '' -@pytest.fixture(params=['amd64', 'armhf', 'aarch64']) +@pytest.fixture(params=['amd64', 'armhf', 'aarch64', 'armel']) def arch(request): return request.param diff --git a/tox.ini b/tox.ini index 5770826..931c543 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ deps = -rrequirements.txt commands = docker run --rm --privileged multiarch/qemu-user-static:register --reset ./Dockerfile.py -v --arch amd64 pytest -vv -n auto -k amd64 ./test/ - ./Dockerfile.py -v --arch armhf --arch aarch64 - pytest -vv -n auto -k armhf ./test/ + ./Dockerfile.py -v --arch armhf --arch aarch64 --arch armel pytest -vv -n auto -k aarch64 ./test/ + pytest -vv -n auto -k armhf ./test/ + pytest -vv -n auto -k armel ./test/