]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
builder: reinstate building all
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 3 Apr 2018 12:06:25 +0000 (14:06 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 27 Sep 2018 11:59:30 +0000 (13:59 +0200)
.gitignore
builder
builder-support/dockerfiles/Dockerfile.debbuild
builder-support/dockerfiles/Dockerfile.rpmbuild
builder-support/dockerfiles/Dockerfile.target.sdist
builder-support/post-build [new file with mode: 0755]

index a2c07bf039e5165c3ca9183984e0ba91e7e0d79f..4a0fbce40300b5bf80829579061ceb86d827cfb0 100644 (file)
@@ -51,3 +51,4 @@ pdns_recursor.pid
 *.gcov
 modules/geoipbackend/regression-tests/GeoLiteCity.dat
 modules/geoipbackend/regression-tests/GeoLiteCity.mmdb
+built_pkgs
diff --git a/builder b/builder
index 620e8e74032009c7044da7a1eb45c248fd89c778..5181becf38d564399e6ffaa8d041b123d8418f8c 160000 (submodule)
--- a/builder
+++ b/builder
@@ -1 +1 @@
-Subproject commit 620e8e74032009c7044da7a1eb45c248fd89c778
+Subproject commit 5181becf38d564399e6ffaa8d041b123d8418f8c
index aa391f24dc407f205ec23417ff65a40c1dff1f5f..3d3779118f38b7d55fab96770613006841310a86 100644 (file)
@@ -1,4 +1,4 @@
-@IF [ ! -z "$M_authoritative" ]
+@IF [ ! -z "$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
 @ENDIF
 
-@IF [ ! -z "$M_recursor" ]
+@IF [ ! -z "$M_recursor$M_all" ]
 RUN builder/helpers/build-debs.sh pdns-recursor-${BUILDER_VERSION}
 
 RUN mv pdns-recursor*.deb /dist
 @ENDIF
 
-@IF [ ! -z "$M_dnsdist" ]
+@IF [ ! -z "$M_dnsdist$M_all" ]
 RUN builder/helpers/build-debs.sh dnsdist-${BUILDER_VERSION}
 
 RUN mv dnsdist*.deb /dist
index 9709921340d355732b6ecebe82034634094e8eb7..021e996e17933ac9f6ede22cef5ce0f1b9b6a441 100644 (file)
@@ -21,7 +21,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 [ ! -z "$M_authoritative$M_all" ]
 RUN if $(grep -q 'release 6' /etc/redhat-release); then \
       scl enable devtoolset-3 -- builder/helpers/build-specs.sh builder-support/specs/pdns.spec; \
     else \
@@ -29,7 +29,7 @@ RUN if $(grep -q 'release 6' /etc/redhat-release); then \
     fi
 @ENDIF
 
-@IF [ ! -z "$M_recursor" ]
+@IF [ ! -z "$M_recursor$M_all" ]
 RUN if $(grep -q 'release 6' /etc/redhat-release); then \
       scl enable devtoolset-3 -- builder/helpers/build-specs.sh builder-support/specs/pdns-recursor.spec; \
     else \
@@ -37,7 +37,7 @@ RUN if $(grep -q 'release 6' /etc/redhat-release); then \
     fi
 @ENDIF
 
-@IF [ ! -z "$M_dnsdist" ]
+@IF [ ! -z "$M_dnsdist$M_all" ]
 RUN if $(grep -q 'release 6' /etc/redhat-release); then \
       scl enable devtoolset-3 -- builder/helpers/build-specs.sh builder-support/specs/dnsdist.spec; \
     else \
index 28bb3d468d086612301b5207a87b2ddd72d1f07c..45c8da1aefc235b4d0cfc6b47ee1dba221a4e6fa 100644 (file)
@@ -1,25 +1,25 @@
-@IF [ ! -z "$M_authoritative" ]
+@IF [ ! -z "$M_authoritative$M_all" ]
 @INCLUDE Dockerfile.authoritative
 @ENDIF
 
-@IF [ ! -z "$M_recursor" ]
+@IF [ ! -z "$M_recursor$M_all" ]
 @INCLUDE Dockerfile.recursor
 @ENDIF
 
-@IF [ ! -z "$M_dnsdist" ]
+@IF [ ! -z "$M_dnsdist$M_all" ]
 @INCLUDE Dockerfile.dnsdist
 @ENDIF
 
 FROM alpine:3.6 as sdist
 
-@IF [ ! -z "$M_authoritative" ]
+@IF [ ! -z "$M_authoritative$M_all" ]
 COPY --from=pdns-authoritative /sdist/ /sdist/
 @ENDIF
 
-@IF [ ! -z "$M_recursor" ]
+@IF [ ! -z "$M_recursor$M_all" ]
 COPY --from=pdns-recursor /sdist/ /sdist/
 @ENDIF
 
-@IF [ ! -z "$M_dnsdist" ]
+@IF [ ! -z "$M_dnsdist$M_all" ]
 COPY --from=dnsdist /sdist/ /sdist/
 @ENDIF
diff --git a/builder-support/post-build b/builder-support/post-build
new file mode 100755 (executable)
index 0000000..aefc896
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+SRCDIR="${BUILDER_TMP}/${BUILDER_VERSION}/${BUILDER_TARGET}"
+DESTDIR="built_pkgs/"
+
+mkdir -p ${DESTDIR}
+
+for prog in pdns-recursor dnsdist pdns; do
+  if [ $(find ${SRCDIR}/dist -name "${prog}*" 2>/dev/null | wc -l) -ne 0 ]; then
+    dst=${DESTDIR}/${prog}/${BUILDER_VERSION}
+    mkdir -p ${dst}
+    cp ${BUILDER_TMP}/${BUILDER_VERSION}/sdist/${prog}*.tar.bz2 ${dst}
+    if [ "${prog}" = "pdns" ]; then
+      rm -f ${dst}/pdns-recursor*
+    fi
+    tardirname=${prog}-${BUILDER_VERSION}-${BUILDER_TARGET}
+    tar -cjf ${dst}/${tardirname}.tar.bz2 --transform="s,.*/,${tardirname}/,g"  $(find ${SRCDIR} -type f)
+  fi
+done