From 461dcbfa8538c9ab47d41b96f3c8d1835166382e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 21 Jul 2020 11:01:24 -0700 Subject: [PATCH] Apply the canonical backported ebtree patch from upstream --- 2.0/alpine/Dockerfile | 8 +++++--- Dockerfile-alpine.template | 8 +++++--- update.sh | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/2.0/alpine/Dockerfile b/2.0/alpine/Dockerfile index 78e5223f..622f119b 100644 --- a/2.0/alpine/Dockerfile +++ b/2.0/alpine/Dockerfile @@ -16,6 +16,7 @@ RUN set -x \ make \ openssl \ openssl-dev \ + patch \ pcre2-dev \ readline-dev \ tar \ @@ -27,9 +28,10 @@ RUN set -x \ && tar -xzf haproxy.tar.gz -C /usr/src/haproxy --strip-components=1 \ && rm haproxy.tar.gz \ # https://github.com/haproxy/haproxy/issues/760 ("ebtree/ebtree.c:43:2: error: unknown type name 'ssize_t'; did you mean 'size_t'?") - && ! grep -qF 'unistd.h' /usr/src/haproxy/ebtree/ebtree.c \ - && awk '$1 == "#include" && !inc { print "#include "; inc = 1 } { print }' /usr/src/haproxy/ebtree/ebtree.c > ebtree.c \ - && mv ebtree.c /usr/src/haproxy/ebtree/ebtree.c \ +# ebtree patch/fix: https://git.haproxy.org/?p=haproxy-2.0.git;a=commit;h=5df32b51bb0c3c89b503d04cd7d31bdd77932370 + && wget -O ebtree.patch 'https://git.haproxy.org/?p=haproxy-2.0.git;a=patch;h=5df32b51bb0c3c89b503d04cd7d31bdd77932370' \ + && patch -p1 --input="$PWD/ebtree.patch" --directory=/usr/src/haproxy \ + && rm ebtree.patch \ \ && makeOpts=' \ TARGET=linux-glibc \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 48b02687..fdf84375 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -16,6 +16,7 @@ RUN set -x \ make \ openssl \ openssl-dev \ + patch \ pcre2-dev \ readline-dev \ tar \ @@ -27,9 +28,10 @@ RUN set -x \ && tar -xzf haproxy.tar.gz -C /usr/src/haproxy --strip-components=1 \ && rm haproxy.tar.gz \ # https://github.com/haproxy/haproxy/issues/760 ("ebtree/ebtree.c:43:2: error: unknown type name 'ssize_t'; did you mean 'size_t'?") - && ! grep -qF 'unistd.h' /usr/src/haproxy/ebtree/ebtree.c \ - && awk '$1 == "#include" && !inc { print "#include "; inc = 1 } { print }' /usr/src/haproxy/ebtree/ebtree.c > ebtree.c \ - && mv ebtree.c /usr/src/haproxy/ebtree/ebtree.c \ +# ebtree patch/fix: https://git.haproxy.org/?p=haproxy-2.0.git;a=commit;h=5df32b51bb0c3c89b503d04cd7d31bdd77932370 + && wget -O ebtree.patch 'https://git.haproxy.org/?p=haproxy-2.0.git;a=patch;h=5df32b51bb0c3c89b503d04cd7d31bdd77932370' \ + && patch -p1 --input="$PWD/ebtree.patch" --directory=/usr/src/haproxy \ + && rm ebtree.patch \ \ && makeOpts=' \ TARGET=linux-musl \ diff --git a/update.sh b/update.sh index ccad8db0..c3420716 100755 --- a/update.sh +++ b/update.sh @@ -71,6 +71,7 @@ for version in "${versions[@]}"; do else sedExpr+=' /ebtree/d + /patch/d ' fi sed -r "$sedExpr" 'Dockerfile-debian.template' > "$version/Dockerfile"