From fb6d21cc9b719fbcbe18b11a5133ddbf3423ea23 Mon Sep 17 00:00:00 2001 From: Colin Hutchinson Date: Wed, 4 Sep 2019 07:17:34 -0400 Subject: [PATCH] fix(lyaml) let luarocks install lyaml (#124) --- Dockerfile.openresty | 3 --- Makefile | 1 - build-kong.sh | 10 ++++------ install-lyaml.sh | 19 ------------------- 4 files changed, 4 insertions(+), 29 deletions(-) delete mode 100755 install-lyaml.sh diff --git a/Dockerfile.openresty b/Dockerfile.openresty index 8d2616bf3aa7..ee8750f44641 100644 --- a/Dockerfile.openresty +++ b/Dockerfile.openresty @@ -53,12 +53,9 @@ ARG RESTY_LUAROCKS_VERSION=2.4.3 LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}" COPY openresty-build-tools /tmp/openresty-build-tools/ -COPY install-lyaml.sh /tmp/install-lyaml.sh COPY build-openresty.sh /tmp/build-openresty.sh RUN /tmp/build-openresty.sh -RUN /tmp/install-lyaml.sh - RUN sed -i 's/\/tmp\/build//' `grep -l -I -r '\/tmp\/build' /tmp/build/` || true diff --git a/Makefile b/Makefile index 00989b0d927e..5d3952e75756 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,6 @@ RESTY_CONFIG_OPTIONS ?= "--with-cc-opt='-I/tmp/openssl/include' \ --with-stream_realip_module \ " LIBYAML_VERSION ?= 0.2.1 -LYAML_VERSION ?= 6.2.3 DOCKER_MACHINE_ARM64_NAME?=docker-machine-arm64-${USER} diff --git a/build-kong.sh b/build-kong.sh index a6b2a122540c..5d7eb92d1e5c 100755 --- a/build-kong.sh +++ b/build-kong.sh @@ -16,11 +16,6 @@ export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChec export LUAROCKS_CONFIG=$ROCKS_CONFIG export LUA_PATH="/usr/local/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;;" export PATH=$PATH:/usr/local/openresty/luajit/bin - -/usr/local/bin/luarocks install lyaml 6.2.3 \ - YAML_LIBDIR=/tmp/build/usr/local/kong/lib \ - YAML_INCDIR=/tmp/yaml-6.2.3 \ - CFLAGS="-L/tmp/build/usr/local/kong/lib -Wl,-rpath,/usr/local/kong/lib -O2 -fPIC" cp -R /tmp/build/* / @@ -64,7 +59,10 @@ pushd /kong /usr/local/bin/luarocks make kong-${ROCKSPEC_VERSION}.rockspec \ CRYPTO_DIR=/usr/local/kong \ - OPENSSL_DIR=/usr/local/kong + OPENSSL_DIR=/usr/local/kong \ + YAML_LIBDIR=/tmp/build/usr/local/kong/lib \ + YAML_INCDIR=/tmp/yaml \ + CFLAGS="-L/tmp/build/usr/local/kong/lib -Wl,-rpath,/usr/local/kong/lib -O2 -fPIC" mkdir -p /tmp/build/etc/kong cp kong.conf.default /tmp/build/usr/local/lib/luarocks/rock*/kong/$ROCKSPEC_VERSION/ diff --git a/install-lyaml.sh b/install-lyaml.sh deleted file mode 100755 index eea8f2e52597..000000000000 --- a/install-lyaml.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -ROCKS_CONFIG=$(mktemp) -echo " -rocks_trees = { - { name = [[system]], root = [[/tmp/build/usr/local]] } -} -" > $ROCKS_CONFIG - -export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -export LUAROCKS_CONFIG=$ROCKS_CONFIG -export LUA_PATH="/tmp/build/usr/local/share/lua/5.1/?.lua;/tmp/build/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;;" -export PATH=$PATH:/tmp/build/usr/local/openresty/luajit/bin - -/tmp/build/usr/local/bin/luarocks install lyaml $LYAML_VERSION \ - YAML_LIBDIR=/tmp/build/usr/local/kong/lib \ - YAML_INCDIR=/tmp/yaml-${LIBYAML_VERSION} \ - CFLAGS="-L/tmp/build/usr/local/kong/lib -Wl,-rpath,/usr/local/kong/lib -O2 -fPIC" -