]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Allow setting a fake-ish version number when building release images 9700/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Nov 2020 13:56:17 +0000 (14:56 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Nov 2020 13:56:17 +0000 (14:56 +0100)
Dockerfile-auth
Dockerfile-dnsdist
Dockerfile-recursor
pdns/recursordist/configure.ac

index 42bdf88e2fe08e630093285d134759f1aeb6cf8e..f56c6b6afcd39634dcd5a8e797a49d507a0756d1 100644 (file)
@@ -28,11 +28,18 @@ COPY m4 /source/m4
 COPY ext /source/ext
 COPY .git /source/.git
 ADD configure.ac Makefile.am /source/
+COPY builder/helpers/set-configure-ac-version.sh /usr/local/bin
 
 ARG MAKEFLAGS=
 ENV MAKEFLAGS ${MAKEFLAGS:--j2}
 
-RUN BUILDER_MODULES=authoritative autoreconf -vfi
+ARG DOCKER_FAKE_RELEASE=NO
+ENV DOCKER_FAKE_RELEASE ${DOCKER_FAKE_RELEASE}
+
+RUN if [ "${DOCKER_FAKE_RELEASE}" = "YES" ]; then \
+      BUILDER_VERSION="$(BUILDER_MODULES=authoritative ./builder-support/gen-version | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')" set-configure-ac-version.sh;\
+    fi && \
+    BUILDER_MODULES=authoritative autoreconf -vfi
 
 # simplify repeated -C calls with SUBDIRS?
 RUN mkdir /build && \
index 75dab70de0b5e5012acc34825e8df145e4a827e4..ee61975c124cece42ce8da4af6d4c22906bc91bf 100644 (file)
@@ -19,6 +19,7 @@ COPY pdns /source/pdns
 COPY build-aux /source/build-aux
 COPY m4 /source/m4
 COPY ext /source/ext
+COPY builder/helpers/set-configure-ac-version.sh /usr/local/bin
 COPY .git /source/.git
 
 # build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
@@ -27,9 +28,15 @@ WORKDIR /source/pdns/dnsdistdist
 ARG MAKEFLAGS=
 ENV MAKEFLAGS ${MAKEFLAGS:--j2}
 
+ARG DOCKER_FAKE_RELEASE=NO
+ENV DOCKER_FAKE_RELEASE ${DOCKER_FAKE_RELEASE}
+
 RUN touch dnsdist.1 # avoid having to install pandoc and venv
 
-RUN BUILDER_MODULES=dnsdist autoreconf -vfi
+RUN if [ "${DOCKER_FAKE_RELEASE}" = "YES" ]; then \
+      BUILDER_VERSION="$(BUILDER_MODULES=dnsdist ./builder-support/gen-version | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')" set-configure-ac-version.sh;\
+    fi && \
+    BUILDER_MODULES=dnsdist autoreconf -vfi
 
 RUN mkdir /build && \
     ./configure \
index 268417bb095c0b434a5360a2769c9922083b4089..3f1a487237aff41e907597acb155783fc5b842a6 100644 (file)
@@ -25,6 +25,7 @@ COPY build-aux /source/build-aux
 COPY m4 /source/m4
 COPY ext /source/ext
 COPY .git /source/.git
+COPY builder/helpers/set-configure-ac-version.sh /usr/local/bin
 
 # build and install (TODO: before we hit this line, rearrange /source structure if we are coming from a tarball)
 WORKDIR /source/pdns/recursordist
@@ -32,13 +33,19 @@ WORKDIR /source/pdns/recursordist
 ARG MAKEFLAGS=
 ENV MAKEFLAGS ${MAKEFLAGS:--j2}
 
+ARG DOCKER_FAKE_RELEASE=NO
+ENV DOCKER_FAKE_RELEASE ${DOCKER_FAKE_RELEASE}
+
 # Manpage deps
 # RUN apt-get install -y virtualenv && apt-get clean
 
 # Manpage prevent
 RUN touch pdns_recursor.1 rec_control.1 # avoid installing pandoc
 
-RUN BUILDER_MODULES=recursor autoreconf -vfi
+RUN if [ "${DOCKER_FAKE_RELEASE}" = "YES" ]; then \
+      BUILDER_VERSION="$(BUILDER_MODULES=recursor ./builder-support/gen-version | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')" set-configure-ac-version.sh;\
+    fi && \
+    BUILDER_MODULES=recursor autoreconf -vfi
 
 RUN mkdir /build && \
     ./configure \
index 0b756510ae58af44ff2e17564d14162a74016346..d5de20b8455337ca07ad8724180fba3d5058f577 100644 (file)
@@ -174,7 +174,7 @@ AS_IF([test "x$pdns_configure_args" != "x"],
   [summary_conf_opts=$pdns_configure_args],
   [summary_conf_opts="(no options)"]
 )
-AC_MSG_NOTICE([PowerDNS Recursor configured with: $summary_conf_opts])
+AC_MSG_NOTICE([PowerDNS Recursor $VERSION configured with: $summary_conf_opts])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([CC: $CC])
 AC_MSG_NOTICE([CXX: $CXX])