Commit 13885225 authored by Michal Nowak's avatar Michal Nowak
Browse files

Use custom kyua

Kyua has it's own expectations on where to find core file generated by
a broken test. They do not suit us well as the common Linux core
pattern setup places the core alongside the crashed binary with a
'core.PID' pattern.

Following Kyua fork adds the above mentioned expectation to the Kyua
source code.
parent 2ce221b1
......@@ -7,6 +7,7 @@ variables:
DOCKER_TLS_CERTDIR: ""
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images
CENTOS_ISO_MIRROR_URL: http://mirror.oss.ou.edu/centos
KYUA_GIT_COMMIT: 2fc3c21c30f9c52efaacb73f6f8b8dc716cf4bc2
stages:
- images
......@@ -30,7 +31,7 @@ stages:
.docker_image_job: &docker_image_job
<<: *image_job
script:
- VERSIONS="$VERSIONS" DISTROS="$DISTROS" ARCHS="$ARCHS" CI_REGISTRY_IMAGE="$CI_REGISTRY_IMAGE" make $TARGET # -j $(getconf _NPROCESSORS_ONLN)
- VERSIONS="$VERSIONS" DISTROS="$DISTROS" ARCHS="$ARCHS" CI_REGISTRY_IMAGE="$CI_REGISTRY_IMAGE" KYUA_GIT_COMMIT="$KYUA_GIT_COMMIT" make $TARGET # -j $(getconf _NPROCESSORS_ONLN)
.kvm_image_job: &kvm_image_job
<<: *image_job
......@@ -42,7 +43,7 @@ stages:
# Drop the testing repository.
- sed -i '$ d' /etc/apk/repositories
- apk add qemu-system-x86_64 qemu-img
- VERSIONS="${VERSIONS}" ISO_URL="${ISO_URL}" ISO_CHECKSUM="${ISO_CHECKSUM}" make -C packer/
- VERSIONS="${VERSIONS}" ISO_URL="${ISO_URL}" ISO_CHECKSUM="${ISO_CHECKSUM}" KYUA_GIT_COMMIT="$KYUA_GIT_COMMIT" make -C packer/
alpine_3.10_amd64:
stage: images
......
......@@ -81,6 +81,7 @@ $(TARGETS):
-e 's,@UNCRUSTIFY@,$(UNCRUSTIFY),g' \
-e 's,@CLANG@,$(CLANG),g' \
-e 's,@COCCINELLE@,$(COCCINELLE),g' \
-e 's,@KYUA_GIT_COMMIT@,$(KYUA_GIT_COMMIT),g' \
-e 's,@[^@]*@,,g' \
< docker/bind9/$(VENDOR)-template/Dockerfile \
> docker/bind9/$@/Dockerfile
......
FROM @SOURCE_IMAGE@
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
RUN apk update
RUN apk upgrade
RUN apk add \
......@@ -15,7 +16,6 @@ RUN apk add \
git \
json-c-dev \
krb5-dev \
kyua \
libcap-dev \
libmaxminddb-dev \
libtool \
......@@ -36,3 +36,10 @@ RUN apk add \
py3-ply \
python3 \
tzdata
RUN apk add \
atf-dev \
lutok-dev \
lua5.3-libs \
sqlite-dev
RUN mkdir /usr/src && curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
......@@ -6,7 +6,7 @@ ENV DNSPYTHON_VERSION 1.15.0
ENV SQLITE_VERSION 3240000
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
ENV KYUA_VERSION 0.13
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
RUN if [ "@VERSION@" = "centos8" ]; then yum -y install yum-utils && yum config-manager --enable PowerTools; fi
RUN yum -y upgrade
RUN yum -y install epel-release
......@@ -69,8 +69,7 @@ RUN ldconfig
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/lutok-$LUTOK_VERSION && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests /usr/src/lutok-$LUTOK_VERSION
RUN ldconfig
RUN curl -sSL https://github.com/jmmv/kyua/releases/download/kyua-$KYUA_VERSION/kyua-$KYUA_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/kyua-$KYUA_VERSION && sed -i "s|^set(|tree_set(|; s|^\(\s\+\)set<|\1tree_set<|;" model/metadata.cpp && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests /usr/src/kyua-$KYUA_VERSION
RUN curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && sed -i "s|^set(|tree_set(|; s|^\(\s\+\)set<|\1tree_set<|;" model/metadata.cpp && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
RUN ldconfig
RUN mkdir /usr/local/{lib64,share}/perl5 && cpan -fi Net::DNS
RUN if [ "@VERSION@" != "centos8" ]; then yum -y install centos-release-scl && yum -y install devtoolset-7; fi
......@@ -4,7 +4,7 @@ ENV DEBIAN_FRONTEND noninteractive
ENV LIBUV_VERSION 1.33.1
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
ENV KYUA_VERSION 0.13
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install curl
......@@ -120,7 +120,7 @@ RUN if [ "@VERSION@" = "sid" ]; then \
fi
# At least python3-lmdb in Debian sid is too old for respdiff
# (reported as https://bugs.debian.org/951336).
RUN if [ "@VERSION@" = "sid" ]; then \
RUN if [ "@VERSION@" = "sid" ] && [ "@ARCH@" = "amd64" ]; then \
apt-get -y install python3-pip; \
pip3 install -r https://gitlab.labs.nic.cz/knot/respdiff/raw/master/requirements.txt; \
fi
......@@ -137,8 +137,8 @@ RUN ldconfig
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/lutok-$LUTOK_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN ldconfig
RUN curl -sSL https://github.com/jmmv/kyua/releases/download/kyua-$KYUA_VERSION/kyua-$KYUA_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/kyua-$KYUA_VERSION && autoreconf -fi && ./configure --prefix /usr && make && make install
RUN curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && ./configure --prefix /usr && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
RUN ldconfig
# FIXME: This is Debian bug https://bugs.debian.org/952596. Before
# it gets fixed we patch with a Fedora version of the upstream fix
......
FROM @SOURCE_IMAGE@
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
RUN dnf -y upgrade
RUN dnf -y install \
GeoIP-devel \
ccache \
curl \
diffutils \
gcc \
gdb \
GeoIP-devel \
git \
iproute \
json-c-devel \
krb5-devel \
kyua \
libcap-devel \
libcmocka-devel \
libidn2-devel \
libmaxminddb-devel \
libtool \
libtool-ltdl-devel \
libxml2-devel \
libuv-devel \
libxml2-devel \
lmdb-devel \
make \
openldap-devel \
......@@ -33,3 +33,12 @@ RUN dnf -y install \
procps-ng \
python-dns \
python-ply
RUN dnf -y install \
gcc-c++ \
libatf-c++-devel \
libatf-sh-devel \
lutok-devel \
sqlite-devel
RUN curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && CXXFLAGS="-Wno-error=deprecated-declarations" ./configure --prefix /usr --libdir /usr/lib64 && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
RUN ldconfig
......@@ -2,7 +2,7 @@ FROM opensuse/@SOURCE_IMAGE@
MAINTAINER BIND 9 Developers <bind9-dev@isc.org>
ENV ATF_VERSION 0.21
ENV LUTOK_VERSION 0.4
ENV KYUA_VERSION 0.13
ENV KYUA_GIT_COMMIT @KYUA_GIT_COMMIT@
RUN zypper -n dup
RUN zypper -n install \
ccache \
......@@ -45,6 +45,6 @@ RUN ldconfig
RUN curl -sSL https://github.com/jmmv/lutok/releases/download/lutok-$LUTOK_VERSION/lutok-$LUTOK_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/lutok-$LUTOK_VERSION && ./configure --prefix /usr --libdir /usr/lib64 && make && make install && cd .. && rm -rf /usr/tests /usr/src/lutok-$LUTOK_VERSION
RUN ldconfig
RUN curl -sSL https://github.com/jmmv/kyua/releases/download/kyua-$KYUA_VERSION/kyua-$KYUA_VERSION.tar.gz | tar -xz -C /usr/src
RUN cd /usr/src/kyua-$KYUA_VERSION && ./configure --prefix /usr --libdir /usr/lib64 && make && make install && cd .. && rm -rf /usr/tests /usr/src/kyua-$KYUA_VERSION
RUN curl -sSL "https://github.com/Mno-hime/kyua/archive/${KYUA_GIT_COMMIT}.tar.gz" | tar -xz -C /usr/src
RUN cd "/usr/src/kyua-${KYUA_GIT_COMMIT}" && ./configure --prefix /usr --libdir /usr/lib64 && make && make install && cd .. && rm -rf /usr/tests "/usr/src/kyua-${KYUA_GIT_COMMIT}"
RUN ldconfig
KYUA_GIT_COMMIT ?= 2fc3c21c30f9c52efaacb73f6f8b8dc716cf4bc2
QCOW2_IMAGE ?= freebsd-12.1-x86_64
.PHONY: prepare
prepare:
mkdir -p "$(QCOW2_IMAGE)"
cp installerconfig packer.json post-install.sh "$(QCOW2_IMAGE)/"
sed -e 's,@KYUA_GIT_COMMIT@,$(KYUA_GIT_COMMIT),g' < post-install.sh.in > "$(QCOW2_IMAGE)/post-install.sh"
cp installerconfig packer.json "$(QCOW2_IMAGE)/"
......@@ -2,9 +2,11 @@
set -e -v
echo "kern.corefile=core.%P" >> /etc/sysctl.conf
sysrc hostname="freebsd"
ASSUME_ALWAYS_YES=yes pkg install bash cmocka fstrm git json-c kyua libmaxminddb libuv libxml2 p5-Net-DNS pkgconf protobuf-c py37-dnspython py37-ply sudo
ASSUME_ALWAYS_YES=yes pkg install bash cmocka fstrm git json-c libmaxminddb libuv libxml2 p5-Net-DNS pkgconf protobuf-c py37-dnspython py37-ply sudo
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244493
ASSUME_ALWAYS_YES=yes pkg install gmake
......@@ -12,6 +14,13 @@ curl -sSL "https://github.com/LMDB/lmdb/archive/LMDB_0.9.24.tar.gz" | tar -C /us
cd /usr/src/lmdb-LMDB_0.9.24/libraries/liblmdb
gmake CC=clang && gmake install
ASSUME_ALWAYS_YES=yes pkg install automake lutok
curl -sSL "https://github.com/Mno-hime/kyua/archive/@KYUA_GIT_COMMIT@.tar.gz" | tar -C /usr/src -xzf -
cd /usr/src/kyua-@KYUA_GIT_COMMIT@
./configure && make && make install
cd ..
rm -rf /usr/local/tests/kyua /usr/src/kyua-@KYUA_GIT_COMMIT@
pw group add -n gitlab-runner
echo "vagrant" | pw user add -n gitlab-runner -g gitlab-runner -s /usr/local/bin/bash -h 0
mkdir -p /home/gitlab-runner
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment