Skip to content

Commit

Permalink
Merge pull request #215 from Darlelet/master
Browse files Browse the repository at this point in the history
Use Lua5.4 as default version when building haproxy 2.9+
  • Loading branch information
tianon authored Dec 18, 2023
2 parents 7643b2d + 0d5ae96 commit 66c5b5e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions 2.9/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2.9/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.0/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ RUN set -eux; \
ENV HAPROXY_VERSION {{ .version }}
ENV HAPROXY_URL {{ .url }}
ENV HAPROXY_SHA256 {{ .sha256 }}
{{
def lua:
# Lua 5.3 is EOL since 2020: https://www.lua.org/versions.html#5.3
#
# Since 5.4 is supported on haproxy, better use it now, but only for
# newer versions since there could be some minor incompatibilities
# for existing scripts: https://www.lua.org/manual/5.4/manual.html#8
if ([ "2.0", "2.2", "2.4", "2.6", "2.7", "2.8" ] | index(env.version)) then
"5.3"
else
"5.4"
end
-}}

# see https://sources.debian.net/src/haproxy/jessie/debian/rules/ for some helpful navigation of the possible "make" arguments
RUN set -eux; \
Expand All @@ -45,7 +58,7 @@ RUN set -eux; \
gcc \
libc-dev \
linux-headers \
lua5.3-dev \
lua{{ lua }}-dev \
make \
openssl \
openssl-dev \
Expand All @@ -62,7 +75,7 @@ RUN set -eux; \
ca-certificates \
gcc \
libc6-dev \
liblua5.3-dev \
liblua{{ lua }}-dev \
libpcre2-dev \
libssl-dev \
make \
Expand Down Expand Up @@ -91,7 +104,7 @@ RUN set -eux; \
makeOpts=' \
TARGET={{ haproxy_target }} \
USE_GETADDRINFO=1 \
USE_LUA=1 LUA_INC=/usr/include/lua5.3 {{ if env.variant == "alpine" then "LUA_LIB=/usr/lib/lua5.3 " else "" end }}\
USE_LUA=1 LUA_INC=/usr/include/lua{{ lua }}{{ if env.variant == "alpine" then (" LUA_LIB=/usr/lib/lua" + lua) else "" end }} \
USE_OPENSSL=1 \
USE_PCRE2=1 USE_PCRE2_JIT=1 \
{{ if ([ "2.0", "2.2" ] | index(env.version)) then ( -}}
Expand Down

0 comments on commit 66c5b5e

Please sign in to comment.