Skip to content

Commit

Permalink
Enable arm again
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Mar 22, 2019
1 parent ec81605 commit 6da28d6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ KUBECTL_CONTEXT = $(shell kubectl config current-context)

GOBUILD_FLAGS :=

ALL_ARCH = amd64 arm64
ALL_ARCH = amd64 arm arm64

QEMUVERSION = v3.0.0

Expand Down
7 changes: 5 additions & 2 deletions images/nginx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# limitations under the License.

# 0.0.0 shouldn't clobber any released builds
TAG ?= 0.82
TAG ?= 0.83
REGISTRY ?= quay.io/kubernetes-ingress-controller
ARCH ?= $(shell go env GOARCH)
DOCKER ?= docker

ALL_ARCH = amd64 arm64
ALL_ARCH = arm amd64 arm64
SED_I?=sed -i
GOHOSTOS ?= $(shell go env GOHOSTOS)

Expand All @@ -35,6 +35,9 @@ MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
# Set default base image dynamically for each arch
BASEIMAGE?=quay.io/kubernetes-ingress-controller/debian-base-$(ARCH):0.1

ifeq ($(ARCH),arm)
QEMUARCH=arm
endif
ifeq ($(ARCH),arm64)
QEMUARCH=aarch64
endif
Expand Down
24 changes: 24 additions & 0 deletions images/nginx/rootfs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ set -o errexit
set -o nounset
set -o pipefail

function finish {
sleep 3600
}
trap finish EXIT

export NGINX_VERSION=1.15.9
export NDK_VERSION=0.3.1rc1
export SETMISC_VERSION=0.32
Expand All @@ -43,6 +48,8 @@ export LUAJIT_VERSION=2.1-20190228

export BUILD_PATH=/tmp/build

export DEBIAN_FRONTEND=noninteractive

ARCH=$(uname -m)

get_src()
Expand Down Expand Up @@ -98,11 +105,23 @@ clean-install \
bc \
|| exit 1

# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1667178.html
if [[ ${ARCH} == "armv7l" ]]; then
echo "Fixing ca-certificates"
touch /etc/ssl/certs/ca-certificates.crt
c_rehash
fi

if [[ ${ARCH} == "x86_64" ]]; then
ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/x86_64-linux-gnu /usr/lib/lua-platform-path
fi

if [[ ${ARCH} == "armv7l" ]]; then
ln -s /usr/lib/arm-linux-gnueabihf/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/arm-linux-gnueabihf /usr/lib/lua-platform-path
fi

if [[ ${ARCH} == "aarch64" ]]; then
ln -s /usr/lib/aarch64-linux-gnu/liblua5.1.so /usr/lib/liblua.so
ln -s /usr/lib/aarch64-linux-gnu /usr/lib/lua-platform-path
Expand Down Expand Up @@ -244,6 +263,10 @@ if [[ ${ARCH} == "x86_64" ]]; then
export PCRE_DIR=/usr/lib/x86_64-linux-gnu
fi

if [[ ${ARCH} == "armv7l" ]]; then
export PCRE_DIR=/usr/lib/arm-linux-gnueabihf
fi

if [[ ${ARCH} == "aarch64" ]]; then
export PCRE_DIR=/usr/lib/aarch64-linux-gnu
fi
Expand Down Expand Up @@ -314,6 +337,7 @@ make install

# build jaeger lib
cd "$BUILD_PATH/jaeger-client-cpp-$JAEGER_VERSION"
patch < /patches/jaeger-client-cpp.patch
sed -i 's/-Werror/-Wno-psabi/' CMakeLists.txt

cat <<EOF > export.map
Expand Down
3 changes: 0 additions & 3 deletions images/nginx/rootfs/install_lua_resty_waf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ ARCH=$(uname -m)
if [[ ${ARCH} != "x86_64" ]]; then
# replace CFLAGS
sed -i 's/CFLAGS = -msse2 -msse3 -msse4.1 -O3/CFLAGS = -O3/' lua-aho-corasick/Makefile
# export PCRE lib directory
export PCRE_LIBDIR=$(find /usr/lib -name libpcre*.so* | head -1 | xargs dirname)
luarocks install lrexlib-pcre 2.7.2-1 PCRE_LIBDIR=${PCRE_LIBDIR}
fi

curl -o 96b0a04ce62dd01b6c6c8a8c97df7ce9916d173e.patch -sSL https://github.com/p0pr0ck5/lua-resty-waf/commit/96b0a04ce62dd01b6c6c8a8c97df7ce9916d173e.patch
Expand Down
13 changes: 13 additions & 0 deletions images/nginx/rootfs/patches/jaeger-client-cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- CMakeLists.txt 2019-03-05 11:47:19.000000000 +0000
+++ CMakeLists.txt 2019-03-05 11:48:29.000000000 +0000
@@ -12,8 +12,8 @@
include(CMakeDependentOption)
include(HunterGate)
HunterGate(
- URL "https://github.com/ruslo/hunter/archive/v0.23.5.tar.gz"
- SHA1 "2c5c6fc1cf609d0856695d60f147594daf4e6b3e"
+ URL "https://github.com/ruslo/hunter/archive/v0.23.142.tar.gz"
+ SHA1 "1d841ca74150c92054896a7f6d88a123dd9e615d"
)

project(jaegertracing VERSION 0.5.0)

0 comments on commit 6da28d6

Please sign in to comment.