]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add support for rec-43. 8771/head
authorErik Winkels <erik.winkels@powerdns.com>
Fri, 31 Jan 2020 10:25:24 +0000 (11:25 +0100)
committerErik Winkels <erik.winkels@powerdns.com>
Fri, 31 Jan 2020 10:25:24 +0000 (11:25 +0100)
build-scripts/docker/generate-repo-files.sh

index 6397ce10357bf003384b290ecff44fe38edc03e2..9026e32755cdeb9a996ec7f42e26f4e19c6d1000 100755 (executable)
@@ -13,45 +13,63 @@ if [ "$1" = "" -o "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then
     exit 1
 fi
 
+
 write_centos()
 {
     OS=centos
     VERSION=$1
     PKG=$2
     CMD=$3
+
     cat <<EOF > Dockerfile.$RELEASE.$OS-$VERSION
 FROM $OS:$VERSION
 
 RUN yum install -y epel-release bind-utils
 EOF
+
     if [ "$VERSION" = "6" -o "$VERSION" = "7" ]; then
         cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
 RUN yum install -y yum-plugin-priorities
 EOF
     fi
+
     cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
 RUN curl -o /etc/yum.repos.d/powerdns-$RELEASE.repo https://repo.powerdns.com/repo-files/$OS-$RELEASE.repo
 RUN yum install -y $PKG
+EOF
+
+    if [ "$RELEASE" = "rec-43" ]; then
+    cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
+
+RUN mkdir /var/run/pdns-recursor
+EOF
+    fi
+
+    cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
 
 CMD $CMD --version
 EOF
 }
 
+
 write_debian_or_ubuntu()
 {
     OS=$1
     VERSION=$2
     PKG=$3
     CMD=$4
+
     cat <<EOF > pdns.list.$RELEASE.$OS-$VERSION
 deb [arch=amd64] http://repo.powerdns.com/$OS $VERSION-$RELEASE main
 EOF
+
     # if not exists
     cat <<EOF > pdns.debian-and-ubuntu
 Package: pdns-*
 Pin: origin repo.powerdns.com
 Pin-Priority: 600
 EOF
+
     cat <<EOF > Dockerfile.$RELEASE.$OS-$VERSION
 FROM $OS:$VERSION
 
@@ -64,21 +82,34 @@ COPY pdns.list.$RELEASE.$OS-$VERSION /etc/apt/sources.list.d/pdns.list
 RUN curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add -
 RUN apt-get update
 RUN apt-get install -y $PKG
+EOF
+
+    if [ "$RELEASE" = "rec-43" ]; then
+    cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
+
+RUN mkdir /var/run/pdns-recursor
+EOF
+    fi
+
+    cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
 
 CMD $CMD --version
 EOF
 }
 
+
 write_debian()
 {
     write_debian_or_ubuntu debian $1 $2 $3
 }
 
+
 write_ubuntu()
 {
     write_debian_or_ubuntu ubuntu $1 $2 $3
 }
 
+
 RELEASE=$1
 
 if [ "$RELEASE" = "auth-40" ]; then
@@ -96,15 +127,7 @@ elif [ "$RELEASE" = "auth-41" ]; then
     write_ubuntu trusty pdns-server pdns_server
     write_ubuntu xenial pdns-server pdns_server
     write_ubuntu bionic pdns-server pdns_server
-elif [ "$RELEASE" = "auth-42" ]; then
-    write_centos 6 pdns pdns_server
-    write_centos 7 pdns pdns_server
-    write_centos 8 pdns pdns_server
-    write_debian stretch pdns-server pdns_server
-    write_debian buster pdns-server pdns_server
-    write_ubuntu xenial pdns-server pdns_server
-    write_ubuntu bionic pdns-server pdns_server
-elif [ "$RELEASE" = "auth-43" ]; then
+elif [ "$RELEASE" = "auth-42" -o "$RELEASE" = "auth-43" ]; then
     write_centos 6 pdns pdns_server
     write_centos 7 pdns pdns_server
     write_centos 8 pdns pdns_server
@@ -127,15 +150,7 @@ elif [ "$RELEASE" = "rec-41" ]; then
     write_ubuntu trusty pdns-recursor pdns_recursor
     write_ubuntu xenial pdns-recursor pdns_recursor
     write_ubuntu bionic pdns-recursor pdns_recursor
-elif [ "$RELEASE" = "rec-42" ]; then
-    write_centos 6 pdns-recursor pdns_recursor
-    write_centos 7 pdns-recursor pdns_recursor
-    write_centos 8 pdns-recursor pdns_recursor
-    write_debian stretch pdns-recursor pdns_recursor
-    write_debian buster pdns-recursor pdns_recursor
-    write_ubuntu xenial pdns-recursor pdns_recursor
-    write_ubuntu bionic pdns-recursor pdns_recursor
-elif [ "$RELEASE" = "rec-43" ]; then
+elif [ "$RELEASE" = "rec-42" -o "$RELEASE" = "rec-43" ]; then
     write_centos 6 pdns-recursor pdns_recursor
     write_centos 7 pdns-recursor pdns_recursor
     write_centos 8 pdns-recursor pdns_recursor