From: Kevin P. Fleming Date: Thu, 24 Sep 2020 11:27:08 +0000 (-0400) Subject: builder-support: Extend 'all' module support to docs/sdist/deb targets X-Git-Tag: auth-4.4.0-beta1~1^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dea1d27341fe3725601962f4d56d56d71b4f914;p=thirdparty%2Fpdns.git builder-support: Extend 'all' module support to docs/sdist/deb targets The build.sh script can build 'all' modules in a single execution, but not all of the Dockerfile templates supported this mode. Since this is useful for manual testing of the build process, this patch adds 'all' support to the 'docs' and 'sdist' templates, and the templates which produce Debian-style packages. Signed-off-by: Kevin P. Fleming --- diff --git a/builder-support/dockerfiles/Dockerfile.debbuild b/builder-support/dockerfiles/Dockerfile.debbuild index e0458f3109..5b350d666a 100644 --- a/builder-support/dockerfiles/Dockerfile.debbuild +++ b/builder-support/dockerfiles/Dockerfile.debbuild @@ -1,4 +1,4 @@ -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] RUN if $(echo ${BUILDER_VERSION} | grep -q -E '^0\.0\.'); then \ # make sure we don't break dependencies for master releases \ sed -i '/pdns-server (<< .*/d' pdns-${BUILDER_VERSION}/debian/control; \ @@ -9,13 +9,13 @@ RUN PDNS_TEST_NO_IPV6=1 builder/helpers/build-debs.sh pdns-${BUILDER_VERSION} RUN mv pdns*.deb /dist; mv pdns*.ddeb /dist || true @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] RUN builder/helpers/build-debs.sh pdns-recursor-${BUILDER_VERSION} RUN mv pdns-recursor*.deb /dist; mv pdns-recursor*.ddeb /dist || true @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] RUN builder/helpers/build-debs.sh dnsdist-${BUILDER_VERSION} RUN mv dnsdist*.deb /dist; mv dnsdist*.ddeb /dist || true diff --git a/builder-support/dockerfiles/Dockerfile.debbuild-prepare b/builder-support/dockerfiles/Dockerfile.debbuild-prepare index 7bbbc37ed8..08b3c8cb36 100644 --- a/builder-support/dockerfiles/Dockerfile.debbuild-prepare +++ b/builder-support/dockerfiles/Dockerfile.debbuild-prepare @@ -15,15 +15,15 @@ ARG BUILDER_RELEASE COPY --from=sdist /sdist /sdist -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] RUN tar xvf /sdist/pdns-${BUILDER_VERSION}.tar.bz2 @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] RUN tar xvf /sdist/pdns-recursor-${BUILDER_VERSION}.tar.bz2 @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] RUN if grep 'VERSION="9 (stretch)"' /etc/os-release; then \ mkdir /libh2o && cd /libh2o && \ apt-get install -q -y curl libssl-dev zlib1g-dev cmake && \ diff --git a/builder-support/dockerfiles/Dockerfile.rpmbuild b/builder-support/dockerfiles/Dockerfile.rpmbuild index f3fd7a0f29..c5f1f455e0 100644 --- a/builder-support/dockerfiles/Dockerfile.rpmbuild +++ b/builder-support/dockerfiles/Dockerfile.rpmbuild @@ -22,7 +22,7 @@ RUN for file in /sdist/* ; do ln -s $file /root/rpmbuild/SOURCES/ ; done && ls / ADD builder-support/specs/ /pdns/builder-support/specs RUN find /pdns/builder-support/specs/ -not -name '*.spec' -exec ln -s {} /root/rpmbuild/SOURCES/ \; -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] RUN touch /var/lib/rpm/* && if $(grep -q 'release 6' /etc/redhat-release); then \ scl enable devtoolset-7 -- builder/helpers/build-specs.sh builder-support/specs/pdns.spec; \ else \ @@ -30,7 +30,7 @@ RUN touch /var/lib/rpm/* && if $(grep -q 'release 6' /etc/redhat-release); then fi @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] RUN touch /var/lib/rpm/* && if $(grep -q 'release 6' /etc/redhat-release); then \ scl enable devtoolset-7 -- builder/helpers/build-specs.sh builder-support/specs/pdns-recursor.spec; \ else \ @@ -38,7 +38,7 @@ RUN touch /var/lib/rpm/* && if $(grep -q 'release 6' /etc/redhat-release); then fi @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] RUN if $(grep -q 'release 6' /etc/redhat-release); then \ true ; \ else \ diff --git a/builder-support/dockerfiles/Dockerfile.target.debian-buster b/builder-support/dockerfiles/Dockerfile.target.debian-buster index 989ea49737..66cc4ea6ea 100644 --- a/builder-support/dockerfiles/Dockerfile.target.debian-buster +++ b/builder-support/dockerfiles/Dockerfile.target.debian-buster @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.debian-jessie b/builder-support/dockerfiles/Dockerfile.target.debian-jessie index 33440735d7..d697cebf53 100644 --- a/builder-support/dockerfiles/Dockerfile.target.debian-jessie +++ b/builder-support/dockerfiles/Dockerfile.target.debian-jessie @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-jessie/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-jessie/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-jessie/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.debian-stretch b/builder-support/dockerfiles/Dockerfile.target.debian-stretch index c775cf63e0..267b5af73a 100644 --- a/builder-support/dockerfiles/Dockerfile.target.debian-stretch +++ b/builder-support/dockerfiles/Dockerfile.target.debian-stretch @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-stretch/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-stretch/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-stretch/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.docs b/builder-support/dockerfiles/Dockerfile.target.docs index 8ece113aa9..203fe28b9b 100644 --- a/builder-support/dockerfiles/Dockerfile.target.docs +++ b/builder-support/dockerfiles/Dockerfile.target.docs @@ -17,18 +17,18 @@ RUN mkdir -p /pdns /dist /sdist ADD builder/helpers/ /pdns/builder/helpers/ -@IF [ ! -z "$M_authoritative$M_all" ] +@IF [ -n "$M_authoritative$M_all" ] ADD docs/ /pdns/docs ADD modules/ /pdns/modules @ENDIF -@IF [ ! -z "$M_recursor$M_all" ] +@IF [ -n "$M_recursor$M_all" ] ADD docs/ /pdns/docs ADD pdns/dnsmessage.proto /pdns/pdns/dnsmessage.proto ADD pdns/recursordist/ /pdns/pdns/recursordist @ENDIF -@IF [ ! -z "$M_dnsdist$M_all" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD pdns/dnsdistdist/docs/ /pdns/pdns/dnsdistdist/docs @ENDIF @@ -36,7 +36,7 @@ ARG BUILDER_VERSION ARG PIP_INDEX_URL ARG PIP_TRUSTED_HOST -@IF [ ! -z "$M_authoritative$M_all" ] +@IF [ -n "$M_authoritative$M_all" ] WORKDIR /pdns/docs RUN rm -rf .venv _build RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1) @@ -45,7 +45,7 @@ RUN mkdir -p /dist/auth RUN cp -R _build/html _build/latex/PowerDNS*.pdf /dist/auth @ENDIF -@IF [ ! -z "$M_recursor$M_all" ] +@IF [ -n "$M_recursor$M_all" ] WORKDIR /pdns/pdns/recursordist/docs RUN rm -rf .venv _build RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1) @@ -54,7 +54,7 @@ RUN mkdir -p /dist/rec RUN cp -R _build/html _build/latex/PowerDNS*.pdf /dist/rec @ENDIF -@IF [ ! -z "$M_dnsdist$M_all" ] +@IF [ -n "$M_dnsdist$M_all" ] WORKDIR /pdns/pdns/dnsdistdist/docs RUN rm -rf .venv _build RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1) diff --git a/builder-support/dockerfiles/Dockerfile.target.raspbian-buster b/builder-support/dockerfiles/Dockerfile.target.raspbian-buster index 22dfe4a546..2dd2f6249a 100644 --- a/builder-support/dockerfiles/Dockerfile.target.raspbian-buster +++ b/builder-support/dockerfiles/Dockerfile.target.raspbian-buster @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie b/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie index 3fa259c741..3a113d1299 100644 --- a/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie +++ b/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-jessie/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-jessie/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-jessie/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch b/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch index 4f95c4c162..9d7875e2d3 100644 --- a/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch +++ b/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-stretch/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-stretch/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-stretch/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.sdist b/builder-support/dockerfiles/Dockerfile.target.sdist index 97fa23512f..6bc27fb3ce 100644 --- a/builder-support/dockerfiles/Dockerfile.target.sdist +++ b/builder-support/dockerfiles/Dockerfile.target.sdist @@ -1,30 +1,30 @@ -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] @INCLUDE Dockerfile.authoritative @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] @INCLUDE Dockerfile.recursor @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] @INCLUDE Dockerfile.dnsdist @ENDIF FROM alpine:3.10 as sdist ARG BUILDER_CACHE_BUSTER= -@IF [ -z "$M_authoritative$M_recursor$M_dnsdist"] -RUN echo "no valid module specified! - please pick just one using -m {authoritative|recursor|dnsdist}" ; exit 1 +@IF [ -z "$M_authoritative$M_recursor$M_dnsdist$M_all" ] +RUN echo "no valid module specified! - please pick just one using -m {authoritative|recursor|dnsdist|all}" ; exit 1 @ENDIF -@IF [ ! -z "$M_authoritative$M_all" ] +@IF [ -n "$M_authoritative$M_all" ] COPY --from=pdns-authoritative /sdist/ /sdist/ @ENDIF -@IF [ ! -z "$M_recursor$M_all" ] +@IF [ -n "$M_recursor$M_all" ] COPY --from=pdns-recursor /sdist/ /sdist/ @ENDIF -@IF [ ! -z "$M_dnsdist$M_all" ] +@IF [ -n "$M_dnsdist$M_all" ] COPY --from=dnsdist /sdist/ /sdist/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic b/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic index bf22d1dfab..c7eb5f015b 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic b/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic index 158f47fd4b..0c5d36ab16 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic @@ -8,16 +8,16 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-stretch/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-stretch/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] -ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ +@IF [ -n "$M_dnsdist$M_all" ] +ADD builder-support/debian/dnsdist/debian-stretch/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF @INCLUDE Dockerfile.debbuild diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-disco b/builder-support/dockerfiles/Dockerfile.target.ubuntu-disco index b3115e46c9..764c10b23f 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-disco +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-disco @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-eoan b/builder-support/dockerfiles/Dockerfile.target.ubuntu-eoan index 4c50615f19..860375e7d4 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-eoan +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-eoan @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-focal b/builder-support/dockerfiles/Dockerfile.target.ubuntu-focal index 77e9afd60d..c1294bc2e7 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-focal +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-focal @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-buster/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-buster/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-buster/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial b/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial index 92a83e1cbd..aa0cc4dbe7 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial @@ -8,15 +8,15 @@ RUN apt-get update && apt-get -y dist-upgrade @INCLUDE Dockerfile.debbuild-prepare -@IF [ ! -z "$M_authoritative" ] +@IF [ -n "$M_authoritative$M_all" ] ADD builder-support/debian/authoritative/debian-jessie/ pdns-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_recursor" ] +@IF [ -n "$M_recursor$M_all" ] ADD builder-support/debian/recursor/debian-jessie/ pdns-recursor-${BUILDER_VERSION}/debian/ @ENDIF -@IF [ ! -z "$M_dnsdist" ] +@IF [ -n "$M_dnsdist$M_all" ] ADD builder-support/debian/dnsdist/debian-jessie/ dnsdist-${BUILDER_VERSION}/debian/ @ENDIF