diff --git a/dockerfiles/aarch64-centos-7.dockerfile b/dockerfiles/aarch64-centos-7.dockerfile new file mode 100644 index 00000000..772df2ed --- /dev/null +++ b/dockerfiles/aarch64-centos-7.dockerfile @@ -0,0 +1,52 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base CentOS image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM centos:7 +LABEL maintainer="MariaDB Buildbot maintainers" + +RUN sed '33s,baseurl=http://vault.centos.org/altarch/$releasever/extras/Source/,baseurl=http://mirror.centos.org/altarch/$releasever/extras/aarch64,g' -i /etc/yum.repos.d/CentOS-Sources.repo + +# Install updates and required packages +RUN yum -y --enablerepo=extras install epel-release && \ + yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion \ + python3-devel libffi-devel openssl-devel \ + python3-pip redhat-rpm-config curl wget && \ + # install MariaDB dependencies + yum-builddep -y mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip3 install -U pip virtualenv && \ + pip3 install --upgrade setuptools && \ + pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm https://cbs.centos.org/kojifiles/packages/dumb-init/1.1.3/17.el7/aarch64/dumb-init-1.1.3-17.el7.aarch64.rpm && yum -y localinstall /tmp/dumb.rpm + +RUN yum -y install cmake3 + +RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \ +--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \ +--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \ +--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \ +--family cmake + +RUN yum -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons +RUN yum -y install gnutls-devel systemd-devel +RUN yum -y install Judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel gcc gcc-c++ git glibc-common glibc-devel groff-base java-1.8.0-openjdk-devel java-1.8.0-openjdk java-1.8.0-openjdk-headless krb5-devel libaio-devel libcurl-devel libevent-devel libxml2 libxml2-devel libzstd-devel make ncurses-devel openssl-devel pam-devel pcre2-devel pkgconfig policycoreutils-python readline-devel ruby snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC unixODBC-devel xz-devel zlib-devel lz4-devel which +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-debian-10-download.dockerfile b/dockerfiles/aarch64-debian-10-download.dockerfile new file mode 100644 index 00000000..961b6106 --- /dev/null +++ b/dockerfiles/aarch64-debian-10-download.dockerfile @@ -0,0 +1 @@ +FROM quay.io/mariadb-foundation/bb-worker:debian10 diff --git a/dockerfiles/aarch64-debian-10.dockerfile b/dockerfiles/aarch64-debian-10.dockerfile new file mode 100644 index 00000000..33842ef4 --- /dev/null +++ b/dockerfiles/aarch64-debian-10.dockerfile @@ -0,0 +1,52 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:10 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libboost-all-dev check scons libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-debian-11.dockerfile b/dockerfiles/aarch64-debian-11.dockerfile new file mode 100644 index 00000000..73a8a696 --- /dev/null +++ b/dockerfiles/aarch64-debian-11.dockerfile @@ -0,0 +1,52 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:bullseye +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libboost-all-dev check scons libboost-program-options-dev liburing-dev libpmem-dev +RUN apt-get update && apt-get -y install flex +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-debian-9-download.dockerfile b/dockerfiles/aarch64-debian-9-download.dockerfile new file mode 100644 index 00000000..62bfc617 --- /dev/null +++ b/dockerfiles/aarch64-debian-9-download.dockerfile @@ -0,0 +1 @@ +FROM quay.io/mariadb-foundation/bb-worker:debian9 diff --git a/dockerfiles/aarch64-debian-9.dockerfile b/dockerfiles/aarch64-debian-9.dockerfile new file mode 100644 index 00000000..e104e309 --- /dev/null +++ b/dockerfiles/aarch64-debian-9.dockerfile @@ -0,0 +1,55 @@ +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:9 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install incremental +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]==19.2.1' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init + +RUN apt-get -y install gnutls-dev +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get update && apt-get install -y flex + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-debian-sid.dockerfile b/dockerfiles/aarch64-debian-sid.dockerfile new file mode 100644 index 00000000..b58b9ef0 --- /dev/null +++ b/dockerfiles/aarch64-debian-sid.dockerfile @@ -0,0 +1,55 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:sid +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd libffi-dev \ + liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get update && apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get install -y liburing-dev libpmem-dev +RUN apt-get update && apt-get -y install flex + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-fedora-33.dockerfile b/dockerfiles/aarch64-fedora-33.dockerfile new file mode 100644 index 00000000..3f914435 --- /dev/null +++ b/dockerfiles/aarch64-fedora-33.dockerfile @@ -0,0 +1,42 @@ +# Buildbot worker for building MariaDB +# +# Provides a base Fedora image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM fedora:33 +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN dnf -y upgrade && \ + dnf -y install @development-tools git wget ccache \ + subversion python-devel libffi-devel \ + openssl-devel python-pip redhat-rpm-config \ + dnf-plugins-core rpm-build liburing-devel && \ + # install MariaDB dependencies + dnf -y builddep mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +# easy_install pip && \ +# pip install -U pip virtualenv && \ +# pip install --upgrade setuptools && \ +RUN pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm http://rpmfind.net/linux/fedora/linux/releases/32/Everything/aarch64/os/Packages/d/dumb-init-1.2.2-6.fc32.aarch64.rpm && dnf -y localinstall /tmp/dumb.rpm + +RUN dnf -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons +RUN dnf -y install Judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ git-core glibc-common glibc-devel groff-base java-latest-openjdk-devel java-latest-openjdk java-latest-openjdk-headless krb5-devel libaio-devel libcurl-devel libedit-devel libevent-devel libxcrypt-devel libxml2 libxml2-devel libzstd-devel lz4-devel make ncurses-devel openssl-devel pam-devel pcre2-devel pkgconf-pkg-config policycoreutils readline-devel rubypick snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC unixODBC-devel xz-devel zlib-devel which python +RUN dnf -y install liburing-devel gdb bzip2 lzo bzip2-libs bzip2-devel lzo-devel + +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-fedora-34.dockerfile b/dockerfiles/aarch64-fedora-34.dockerfile new file mode 100644 index 00000000..90571c88 --- /dev/null +++ b/dockerfiles/aarch64-fedora-34.dockerfile @@ -0,0 +1,42 @@ +# Buildbot worker for building MariaDB +# +# Provides a base Fedora image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM fedora:34 +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN dnf -y upgrade && \ + dnf -y install @development-tools git wget ccache \ + subversion python-devel libffi-devel \ + openssl-devel python-pip redhat-rpm-config \ + dnf-plugins-core rpm-build liburing-devel && \ + # install MariaDB dependencies + dnf -y builddep mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +# easy_install pip && \ +# pip install -U pip virtualenv && \ +# pip install --upgrade setuptools && \ +RUN pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm http://rpmfind.net/linux/fedora/linux/releases/32/Everything/aarch64/os/Packages/d/dumb-init-1.2.2-6.fc32.aarch64.rpm && dnf -y localinstall /tmp/dumb.rpm + +RUN dnf -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons +RUN dnf -y install Judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ git-core glibc-common glibc-devel groff-base java-latest-openjdk-devel java-latest-openjdk java-latest-openjdk-headless krb5-devel libaio-devel libcurl-devel libedit-devel libevent-devel libxcrypt-devel libxml2 libxml2-devel libzstd-devel lz4-devel make ncurses-devel openssl-devel pam-devel pcre2-devel pkgconf-pkg-config policycoreutils readline-devel rubypick snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC unixODBC-devel xz-devel zlib-devel which python +RUN dnf -y install liburing-devel gdb bzip2 lzo bzip2-libs bzip2-devel lzo-devel + +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-rhel-7-download.dockerfile b/dockerfiles/aarch64-rhel-7-download.dockerfile new file mode 100644 index 00000000..596582c9 --- /dev/null +++ b/dockerfiles/aarch64-rhel-7-download.dockerfile @@ -0,0 +1,3 @@ +FROM vladbogo/sles:rhel-7-aarch64 +LABEL maintainer="MariaDB Buildbot maintainers" + diff --git a/dockerfiles/aarch64-rhel-7.dockerfile b/dockerfiles/aarch64-rhel-7.dockerfile new file mode 100644 index 00000000..ae4ba131 --- /dev/null +++ b/dockerfiles/aarch64-rhel-7.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base RHEL-7 image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.access.redhat.com/rhel7-aarch64 +LABEL maintainer="MariaDB Buildbot maintainers" + +RUN subscription-manager register --username %s --password %s --auto-attach + +RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +# Install updates and required packages +RUN yum -y install epel-release && \ + yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion \ + python-devel libffi-devel openssl-devel \ + python-pip redhat-rpm-config curl wget && \ + # install MariaDB dependencies + yum-builddep -y mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm https://cbs.centos.org/kojifiles/packages/dumb-init/1.1.3/17.el7/aarch64/dumb-init-1.1.3-17.el7.aarch64.rpm && yum -y localinstall /tmp/dumb.rpm + +ENV CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 + +RUN wget https://cmake.org/files/v3.19/cmake-3.19.3-Linux-aarch64.sh +RUN mkdir -p /opt/cmake +RUN sh cmake-3.19.3-Linux-aarch64.sh --prefix=/opt/cmake --skip-license +RUN ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake + +RUN yum -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons +RUN yum -y install Judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ git-core glibc-common glibc-devel groff-base java-latest-openjdk java-latest-openjdk-headless krb5-devel libaio-devel libcurl-devel libedit-devel libevent-devel libxcrypt-devel libxml2 libxml2-devel libzstd-devel lz4-devel make ncurses-devel openssl-devel pam-devel pcre2-devel pkgconfig policycoreutils readline-devel ruby snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC unixODBC-devel xz-devel zlib-devel which python + + +RUN subscription-manager unregister + +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-rhel-8-download.dockerfile b/dockerfiles/aarch64-rhel-8-download.dockerfile new file mode 100644 index 00000000..1b76b3a9 --- /dev/null +++ b/dockerfiles/aarch64-rhel-8-download.dockerfile @@ -0,0 +1 @@ +FROM vladbogo/sles:rhel-8-aarch64 diff --git a/dockerfiles/aarch64-ubuntu-1804.dockerfile b/dockerfiles/aarch64-ubuntu-1804.dockerfile new file mode 100644 index 00000000..46abf9f8 --- /dev/null +++ b/dockerfiles/aarch64-ubuntu-1804.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(arch).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install dumb-init +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-ubuntu-2004.dockerfile b/dockerfiles/aarch64-ubuntu-2004.dockerfile new file mode 100644 index 00000000..3b01168e --- /dev/null +++ b/dockerfiles/aarch64-ubuntu-2004.dockerfile @@ -0,0 +1,57 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(arch).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install dumb-init +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/aarch64-ubuntu-2104.dockerfile b/dockerfiles/aarch64-ubuntu-2104.dockerfile new file mode 100644 index 00000000..c2f59194 --- /dev/null +++ b/dockerfiles/aarch64-ubuntu-2104.dockerfile @@ -0,0 +1,57 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:21.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(arch).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install dumb-init +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get install -y liburing-dev libpmem-dev gdb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/buildbot.tac b/dockerfiles/buildbot.tac new file mode 100644 index 00000000..7bfce797 --- /dev/null +++ b/dockerfiles/buildbot.tac @@ -0,0 +1,39 @@ +import fnmatch +import os +import sys + +from twisted.application import service +from twisted.python.log import FileLogObserver +from twisted.python.log import ILogObserver + +from buildbot_worker.bot import Worker + +# setup worker +basedir = os.path.abspath(os.path.dirname(__file__)) +application = service.Application('buildbot-worker') + + +application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit) +# and worker on the same process! +buildmaster_host = os.environ.get("BUILDMASTER", 'localhost') +port = int(os.environ.get("BUILDMASTER_PORT", 9989)) +workername = os.environ.get("WORKERNAME", 'docker') +passwd = os.environ.get("WORKERPASS") + +# delete the password from the environ so that it is not leaked in the log +blacklist = os.environ.get("WORKER_ENVIRONMENT_BLACKLIST", "WORKERPASS").split() +for name in list(os.environ.keys()): + for toremove in blacklist: + if fnmatch.fnmatch(name, toremove): + del os.environ[name] + +keepalive = 600 +umask = None +maxdelay = 300 +allow_shutdown = None +maxretries = 10 + +s = Worker(buildmaster_host, port, workername, passwd, basedir, + keepalive, umask=umask, maxdelay=maxdelay, + allow_shutdown=allow_shutdown, maxRetries=maxretries, unicode_encoding='utf-8') +s.setServiceParent(application) diff --git a/dockerfiles/centos-7.dockerfile b/dockerfiles/centos-7.dockerfile new file mode 100644 index 00000000..07569b23 --- /dev/null +++ b/dockerfiles/centos-7.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base CentOS image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM centos:7 +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN yum -y --enablerepo=extras install epel-release +RUN sed -i '/baseurl/s/^#//g' /etc/yum.repos.d/epel.repo +RUN sed -i '/metalink/s/^/#/g' /etc/yum.repos.d/epel.repo +RUN yum clean all && yum -y update + +RUN yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion \ + python3 libffi-devel openssl-devel \ + python3-pip redhat-rpm-config curl wget systemd-devel && \ + # install MariaDB dependencies + yum-builddep -y mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip3 install -U pip virtualenv && \ + pip3 install --upgrade setuptools && \ + pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \ + chmod +x /usr/local/bin/dumb-init + +RUN yum -y install cmake3 + +RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \ +--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \ +--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \ +--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \ +--family cmake + +RUN yum -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons +RUN yum -y install which Judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ git glibc-common glibc-devel groff-base java-1.8.0-openjdk-devel java-1.8.0-openjdk java-1.8.0-openjdk-headless krb5-devel libaio-devel libcurl-devel libevent-devel libxml2 libxml2-devel libzstd-devel make ncurses-devel openssl-devel pam-devel pcre2-devel pkgconfig policycoreutils-python readline-devel ruby snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC unixODBC-devel xz-devel zlib-devel which jemalloc-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/clang-ubuntu-1804.dockerfile b/dockerfiles/clang-ubuntu-1804.dockerfile new file mode 100644 index 00000000..6072d681 --- /dev/null +++ b/dockerfiles/clang-ubuntu-1804.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev clang-6.0 gnutls-dev + +RUN wget -O clang-10.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz +RUN tar xvf clang* +RUN cd clang* && cp -R * /usr/local/ +RUN cd .. && rm -r clang* + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac + +WORKDIR /buildbot +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/clang-ubuntu-2004.dockerfile b/dockerfiles/clang-ubuntu-2004.dockerfile new file mode 100644 index 00000000..2378397a --- /dev/null +++ b/dockerfiles/clang-ubuntu-2004.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev gnutls-dev + +RUN wget -O clang-11.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0-rc2/clang+llvm-11.0.0-rc2-x86_64-linux-gnu-ubuntu-20.04.tar.xz +RUN tar xvf clang* +RUN cd clang* && cp -R * /usr/local/ +RUN cd .. && rm -r clang* + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac + +WORKDIR /buildbot +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/debian-10.dockerfile b/dockerfiles/debian-10.dockerfile new file mode 100644 index 00000000..d38d3ffd --- /dev/null +++ b/dockerfiles/debian-10.dockerfile @@ -0,0 +1,58 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:10 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping + +RUN apt-get -y install dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev \ + libboost-filesystem-dev libboost-regex-dev \ + libboost-system-dev libboost-thread-dev \ + libedit-dev libpcre2-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/debian-11.dockerfile b/dockerfiles/debian-11.dockerfile new file mode 100644 index 00000000..8412824f --- /dev/null +++ b/dockerfiles/debian-11.dockerfile @@ -0,0 +1,58 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:bullseye +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping + +RUN apt-get -y install dh-exec flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev \ + libboost-filesystem-dev libboost-regex-dev \ + libboost-system-dev libboost-thread-dev \ + libedit-dev libpcre2-dev liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/debian-9-download.dockerfile b/dockerfiles/debian-9-download.dockerfile new file mode 100644 index 00000000..62bfc617 --- /dev/null +++ b/dockerfiles/debian-9-download.dockerfile @@ -0,0 +1 @@ +FROM quay.io/mariadb-foundation/bb-worker:debian9 diff --git a/dockerfiles/debian-9.dockerfile b/dockerfiles/debian-9.dockerfile new file mode 100644 index 00000000..901098a4 --- /dev/null +++ b/dockerfiles/debian-9.dockerfile @@ -0,0 +1,58 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:9 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping + +RUN apt-get install -y flex libboost-atomic-dev libboost-chrono-dev \ + libboost-date-time-dev libboost-filesystem-dev libboost-regex-dev \ + libboost-system-dev libboost-thread-dev libedit-dev liblz4-dev \ + libpcre2-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +RUN apt-get install -y gnutls-dev +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/debian-sid-i386.dockerfile b/dockerfiles/debian-sid-i386.dockerfile new file mode 100644 index 00000000..08095c3c --- /dev/null +++ b/dockerfiles/debian-sid-i386.dockerfile @@ -0,0 +1,58 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM i386/debian:sid +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping liburing-dev + +RUN apt-get -y install dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + libreadline-gplv2-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_i386.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get install -y dumb-init +RUN apt-get update && apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get install -y liburing-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/debian-sid.dockerfile b/dockerfiles/debian-sid.dockerfile new file mode 100644 index 00000000..c00b8942 --- /dev/null +++ b/dockerfiles/debian-sid.dockerfile @@ -0,0 +1,56 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:sid +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping liburing-dev + +RUN apt-get -y install dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get update && apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get install -y liburing-dev libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/eco-mysqljs-nodejs15-buster.dockerfile b/dockerfiles/eco-mysqljs-nodejs15-buster.dockerfile new file mode 100644 index 00000000..963c656b --- /dev/null +++ b/dockerfiles/eco-mysqljs-nodejs15-buster.dockerfile @@ -0,0 +1,41 @@ +# Buildbot worker for building and running nodejs against MariaDB server +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and nodejs build dependencies + +FROM node:17-buster-slim +LABEL maintainer="Anel Husakovic anel@mariadb.org" + +ARG DEBIAN_FRONTEND=noninteractive + +# Install updates and required packages +RUN apt-get update -y && \ + apt-get install -y \ + curl \ + gcc \ + git \ + python3-pip \ + libsnappy1v5 libnuma1 libpmem1 \ + libaio1 libreadline5 libncurses6 liblzo2-2 libtinfo5 libncurses5 && \ + rm -rf /var/lib/apt/lists/* + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir -p /buildbot /data && \ + chown -R buildbot /buildbot /data /usr/local && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/buildbot/main/dockerfiles/buildbot.tac + +WORKDIR /buildbot + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(dpkg --print-architecture).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] + diff --git a/dockerfiles/eco-php-ubuntu-2004.dockerfile b/dockerfiles/eco-php-ubuntu-2004.dockerfile new file mode 100644 index 00000000..64968de1 --- /dev/null +++ b/dockerfiles/eco-php-ubuntu-2004.dockerfile @@ -0,0 +1,72 @@ +# +# Buildbot worker for building and running PHP against mariadb server +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and PHP build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +ARG DEBIAN_FRONTEND=noninteractive + +# libaio1, snappy/numa is for the mariadb tarball +# libreadline5 for mariadb client +# curl, git used in intialization, rest are +# for php. +RUN apt-get update -y && \ + apt-get install -y \ + libaio1 \ + liblzo2-2 liblzma5 libbz2-1.0 \ + libsnappy1v5 libnuma1 libreadline5 libpmem1 \ + python3 python3-pip \ + curl \ + language-pack-de \ + libgmp-dev \ + libicu-dev \ + libtidy-dev \ + libenchant-dev \ + libaspell-dev \ + libpspell-dev \ + librecode-dev \ + libsasl2-dev \ + libxpm-dev \ + libzip-dev \ + git \ + pkg-config \ + build-essential \ + autoconf \ + bison \ + re2c \ + libxml2-dev \ + libsqlite3-dev \ + libmysqlclient-dev && \ + rm -rf /var/lib/apt/lists/* + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir -p /buildbot /data && \ + chown -R buildbot /buildbot /data /usr/local && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/buildbot/main/dockerfiles/buildbot.tac + +# pam tests +RUN for t in auth account; do echo "$t required pam_unix.so audit"; done >> /etc/pam.d/mysql +# password: pamtest, but needed to be passed in crypt format otherwise silently ignored +RUN useradd -m pamtest --password '$6$HGAoutbdknZeXJOb$1sQ5xzaCC0KUmc10FeVUFZSS1LbhoI/1hEEhaqe7zLLINGfnq7tz1lqjbXenIiNwe5m9TKGs4Lx68tQ/lrO9A1' + +# Hope to eventualy move away from needing sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +WORKDIR /buildbot + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(dpkg --print-architecture).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/eco-pymysql-python-3-9-slim-buster.dockerfile b/dockerfiles/eco-pymysql-python-3-9-slim-buster.dockerfile new file mode 100644 index 00000000..ad12db63 --- /dev/null +++ b/dockerfiles/eco-pymysql-python-3-9-slim-buster.dockerfile @@ -0,0 +1,49 @@ +# +# Buildbot worker for building and running pymysql against mariadb server +# + +FROM python:3.9-slim-buster +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Install updates and required packages +RUN apt-get update -y && \ + apt-get install -y \ + curl \ + gcc \ + git \ + libsnappy1v5 libnuma1 libpmem1 \ + libaio1 libreadline5 libncurses6 liblzo2-2 libtinfo5 libncurses5 && \ + rm -rf /var/lib/apt/lists/* + +# Source code +VOLUME /code + +# no /build required + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir -p /buildbot /data && \ + chown -R buildbot /buildbot /data /usr/local && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/buildbot/main/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' \ + cryptography \ + 'PyNaCl>=1.4.0' \ + pytest unittest2 + +# https://github.com/PyMySQL/PyMySQL/blob/master/requirements-dev.txt + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(dpkg --print-architecture).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ecofiles/installdb.sh b/dockerfiles/ecofiles/installdb.sh new file mode 100755 index 00000000..f5a78114 --- /dev/null +++ b/dockerfiles/ecofiles/installdb.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -xeuvo pipefail + +if [ $# -eq 0 ] +then + echo 'Error - URL of tarball required as argument' + exit 1 +fi + +curl "$1" | tar -zxvf - -C /usr/local --exclude '*/include/mysql/server' --exclude '*/mysql-test' --exclude '*/sql-bench' --exclude '*/man' --exclude '*/support-files' +shift +mkdir -p /data +cd /usr/local/mariadb-* +ln -s $PWD /usr/local/mariadb +# for server plugins +ln -s $PWD /usr/local/mysql +./scripts/mysql_install_db --basedir=$PWD --datadir=/data --user=buildbot +bin/mysqld_safe --datadir=/data --user=buildbot --local-infile --plugin-maturity=unknown "$@" & + +countdown=5 +while [ ! -S /tmp/mysql.sock ] && [ $countdown -gt 0 ] +do + echo waiting 3 seconds + sleep 3 + countdown=$(( $countdown - 1 )) +done + +if [ ! -S /tmp/mysql.sock ] +then + cat /data/*err + exit 1 +fi + +/usr/local/mariadb/bin/mysql -e 'create user if not exists root; + set password for root = password("") ; + grant all on *.* TO root with grant option; + drop user if exists ""@localhost; + execute immediate concat("drop user if exists \"\"@",@@hostname); + show create user root; + show grants for root; + drop user if exists root@localhost' diff --git a/dockerfiles/ecofiles/test-mysqljs.sh b/dockerfiles/ecofiles/test-mysqljs.sh new file mode 100644 index 00000000..621798a3 --- /dev/null +++ b/dockerfiles/ecofiles/test-mysqljs.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +set -xeuvo pipefail + +cd /code +[ -d mysql ] || git clone https://github.com/mysqljs/mysql +cd mysql +id +ls -la +chmod -R go-w . +chown -R root: . +git clean -dfx +git pull --tags +if [ $# -gt 0 ] +then + if [ ! -d ../"$1" ] + then + git worktree add ../"$1" "$1" + fi + cd ../"$1" + chmod -R go-w . + chown -R root: . + # this is right for tags, not for branches yet + git checkout "$1" +fi +git checkout -- . + + +# Unit tests + +# fix for ERR_SSL_EE_KEY_TOO_SMALL (1024 bit test/fixtures/server.key) +rm -f test/unit/connection/test-connection-ssl-reject.js \ + test/unit/connection/test-connection-ssl-ignore.js \ + test/unit/connection/test-connection-ssl-ciphers.js \ + test/unit/connection/test-connection-ssl.js \ + test/unit/connection/test-connection-ssl-max-version-accept.js \ + test/unit/connection/test-connection-ssl-max-version-reject.js \ + test/unit/connection/test-connection-ssl-min-version-accept.js \ + test/unit/connection/test-connection-ssl-min-version-reject.js + +#npm install -g npm@8.5.5 +npm install +# Run the unit tests (probably should be controlled with worker variable) +# If unit==1 run unit test else run integration test +cd ./test +FILTER=unit npm test + +cd .. + +# Integration tests + +VERSION=$(/usr/local/mariadb/bin/mysql -u root --column-names=0 -B -e "SELECT VERSION()") + +if [[ ! $VERSION =~ 10\.4\.* ]]; then +# awaiting fix https://github.com/mysqljs/mysql/pull/2442 + sed -i -e '/flush_tables/d' test/integration/connection/test-statistics.js +# From https://github.com/mysqljs/mysql/pull/2442/files#diff-5979044946698d18a2cdc979898085cdddf5f9911974e8e7a4476efd25c07d82R35 +# ER_LOAD_INFILE_CAPABILITY_DISABLED + sed -i -e "s/err.code, 'ER_NOT_ALLOWED_COMMAND'/err.errno, 4166/" test/integration/connection/test-load-data-infile-disable.js + sed -i -e 's/PROTOCOL_CONNECTION_LOST/ECONNRESET/g' test/integration/connection/test-server-timeout-disconnect.js +fi + +cd ./test +# Run integration test - we are more interested in this! +/usr/local/mariadb/bin/mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test" +MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_DATABASE=node_mysql_test MYSQL_USER=root MYSQL_PASSWORD='' FILTER=integration npm test + diff --git a/dockerfiles/ecofiles/test-php.sh b/dockerfiles/ecofiles/test-php.sh new file mode 100755 index 00000000..2b6f596d --- /dev/null +++ b/dockerfiles/ecofiles/test-php.sh @@ -0,0 +1,213 @@ +#!/bin/bash +# curl url | bash -s [branch] [buildopt] [additional build options...] + +set -xeuvo pipefail + +declare -A buildopts=( + [mysqlnd]='--enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd' + [mariadbclient]='--with-mysqli --with-pdo-mysql=/usr/local/mariadb' +) + +branch=${1:-master} +shift || echo "Using default branch '$branch'" +opt=${1:-mysqlnd} +shift || echo "Using default option '$opt'" + +if [ -z "${buildopts[$opt]}" ]; then + echo "Unsupported build option $opt" + exit 1 +fi + +# variable needed to make mysqli_expire_password test pass +# only exists on 10.4+ +/usr/local/mariadb/bin/mysql -u root -e '/*M!100403 set global disconnect_on_expired_password=1 */' \ + || : +# pam test - https://github.com/php/php-src/pull/6667 +/usr/local/mariadb/bin/mysql -u root -e "INSTALL SONAME 'auth_pam'" \ + || : + + +export MYSQL_TEST_DB=test +export MYSQL_TEST_HOST=localhost +export MYSQL_TEST_PORT=3306 +export MYSQL_TEST_SOCKET=/tmp/mysql.sock +export MYSQL_TEST_USER=root +export MYSQL_TEST_PASSWD=letmein + +/usr/local/mariadb/bin/mysql -u root -e "set password=password('$MYSQL_TEST_PASSWD')" \ + || : +# Controlling Environment variables from ./ext/mysqli/tests/connect.inc +# MYSQL_TEST_{HOST,PORT,USER,PASSWD,DB +# ENGINE,SOCKET +# CONNECT_FLAGS - integer for mysqli_real_connect + +export PDO_MYSQL_TEST_HOST="${MYSQL_TEST_HOST}" +export PDO_MYSQL_TEST_USER="${MYSQL_TEST_USER}" +export PDO_MYSQL_TEST_PASS="${MYSQL_TEST_PASSWD}" +export PDO_MYSQL_TEST_SOCKET="${MYSQL_TEST_SOCKET}" +export PDO_MYSQL_TEST_DSN="mysql:host=${PDO_MYSQL_TEST_HOST};dbname=${MYSQL_TEST_DB};socket=${PDO_MYSQL_TEST_SOCKET}" +# +# ./ext/pdo_mysql/tests/mysql_pdo_test.inc +# PDO_MYSQL_TEST_DSN, = mysql:host=localhost;dbname=test +# PDO_MYSQL_TEST_USER +# PDO_MYSQL_TEST_PASS +# PDOTEST_ATTR +# PDO_MYSQL_TEST_ENGINE + + +cd /code + +chown -R root: . + +# https://stackoverflow.com/questions/3258243/check-if-pull-needed-in-git +UPSTREAM='@{u}' +git_update_refs() +{ + LOCAL=$(git rev-parse @) + REMOTE=$(git rev-parse "$UPSTREAM") + BASE=$(git merge-base @ "$UPSTREAM") + if [ $LOCAL = $REMOTE ]; then + git checkout -f HEAD + echo "Up-to-date" + elif [ $LOCAL = $BASE ]; then + echo "Need to pull" + git clean -dfX + git clean -dfx + git pull + ./buildconf + elif [ $REMOTE = $BASE ]; then + echo "Need to push" + else + echo "Diverged" + fi +} + +if [ -d master ] +then + cd master + git remote update +else + git clone https://github.com/php/php-src.git master + cd master +fi +git_update_refs + +codedir=/code/$branch + +if [ "$branch" != "master" ] +then + if [ -d "$codedir" ] + then + ( cd "$codedir"; git_update_refs ) + else + mkdir -p "$codedir" + git worktree add "$codedir" "$branch" + ( cd "$codedir"; ./buildconf ) + fi +fi + +echo +echo "BRANCH: $branch" +echo "BUILD: $opt" + +builddir="/build/${branch}-${opt}" +mkdir -p "$builddir" +cd "$builddir" + +configure() +{ + # word splitting needed on buildopts + # shellcheck disable=SC2086 + "$codedir"/configure --enable-debug \ + ${buildopts[$opt]} "$@" \ + --with-mysql-sock=/tmp/mysql.sock || cat config.log +} + +if [ "$codedir"/configure -nt config.log ] +then + configure "$@" +fi + +# Looking for error make: *** No rule to make target '/code/master/Zend/zend_rc_debug.h', needed by 'ext/opcache/ZendAccelerator.lo'. Stop. +# This can occur during some dependency changes not fully undertood by make. Clear it out and do a full rebuild. +if ! make -j "$(nproc)"; then + echo clear and retry + rm -rf -- * + configure "$@" + make -j "$(nproc)" +fi + +echo +echo Testing... +echo + +declare -a mysqlifailtests +declare -a pdofailtests + +case "${branch}" in + PHP-7\.[12]) + mysqlifailtests+=( mysqli_get_client_stats ) # 7.3 fixed + mysqlifailtests+=( 057 ) + mysqlifailtests+=( mysqli_pconn_max_links ) + mysqlifailtests+=( mysqli_stmt_bind_param_many_columns ) + mysqlifailtests+=( mysqli_report ) + mysqlifailtests+=( bug34810 ) + mysqlifailtests+=( mysqli_class_mysqli_interface ) + mysqlifailtests+=( mysqli_reap_async_query ) + mysqlifailtests+=( mysqli_character_set ) # 001+ [008 + utf8mb3] [2019] Invalid characterset or character set not supported + mysqlifailtests+=( mysqli_options ) # 013+ [009] Setting charset name 'utf8mb3' has failed + mysqlifailtests+=( mysqli_set_charset ) # 001+ [017] Cannot set character set to 'utf8mb3', [2019] Invalid characterset or character set not supported \n002+ + ;& + PHP-7\.3) + mysqlifailtests+=( mysqli_stmt_get_result_metadata_fetch_field ) # https://github.com/php/php-src/pull/6484 - fixed 7.4 + ;& + PHP-7\.4) + mysqlifailtests+=( 063 ) # fixed in 8.0 at least + mysqlifailtests+=( mysqli_change_user_new ) # at least 8.0 (not 7.4) + ;& + PHP-8\.0) + pdofailtests+=( bug_38546 bug76815 ) + ;& + PHP-8\.1) + mysqlifailtests+=( mysqli_real_connect mysqli_real_connect_pconn mysqli_connect_oo mysqli_report ) # https://github.com/php/php-src/commit/b6b4a628a5009024f9abca664f6a25d64b6f64d6 + ;& + master) + mysqlifailtests+=( mysqli_reap_async_query_error mysqli_execute_query.phpt ) # https://github.com/php/php-src/pull/10029 + mysqlifailtests+=( mysqli_connect ) # Using Password - like b6b4a628a5009024f9 + mysqlifailtests+=( gh8978 ) # 11.4 Warning: mysqli_real_connect(): This stream does not support SSL/crypto in + # <11.4 - requires TLS setup on server maybe to get right result + #mysqlifailtests+=( mysqli_change_user ) # will below 3 - fail on 7.1, not mdb-10.2. TODO + #mysqlifailtests+=( mysqli_change_user_old ) # TODO + #mysqlifailtests+=( mysqli_change_user_oo ) # TODO + #mysqlifailtests+=( mysqli_class_mysqli_properties_no_conn ) # TODO + #pdofailtests+=( pdo_mysql_prepare_load_data ) # 8.0, not 7.4 TODO investigate + #pdofailtests+=( pdo_mysql_attr_oracle_nulls ) # 8.0, not 7.4. TODO investigate + #mysqlifailtests+=( mysqli_debug ) + #mysqlifailtests+=( mysqli_debug_append ) + #mysqlifailtests+=( mysqli_debug_control_string ) + #mysqlifailtests+=( mysqli_debug_mysqlnd_control_string ) + #mysqlifailtests+=( mysqli_debug_mysqlnd_only ) + #mysqlifailtests+=( mysqli_class_mysqli_interface ) # 8.0, not 7.1 + #mysqlifailtests+=( mysqli_auth_pam ) # Access denied for user 'pamtest'@'localhost' (using password: NO) - but password is. + +esac + +GLOBIGNORE= + +for f in "${mysqlifailtests[@]}" +do + GLOBIGNORE="$GLOBIGNORE:$codedir/ext/mysqli/tests/$f.phpt" +done +for f in "${pdofailtests[@]}" +do + GLOBIGNORE="$GLOBIGNORE:$codedir/ext/pdo_mysql/tests/$f.phpt" +done +echo $GLOBIGNORE + +mkdir -p /tmp/s /tmp/t + +# -j$(nproc) not in 7.3 - didn't significantly parallize anyway +TEST_PHP_EXECUTABLE=./sapi/cli/php ./sapi/cli/php "$codedir"/run-tests.php \ + --temp-source /tmp/s --temp-target /tmp/t --show-diff \ + "$codedir"/ext/mysqli/tests/*phpt \ + "$codedir"/ext/pdo_mysql/tests/*phpt diff --git a/dockerfiles/ecofiles/test-pymysql.sh b/dockerfiles/ecofiles/test-pymysql.sh new file mode 100755 index 00000000..86f6e242 --- /dev/null +++ b/dockerfiles/ecofiles/test-pymysql.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +set -xeuvo pipefail + +trap "cat /data/*.err" EXIT + +cd /code +[ -d PyMySQL ] || git clone https://github.com/PyMySQL/PyMySQL.git +cd PyMySQL +git clean -dfx +git checkout main +git pull --tags +if [ $# -gt 0 ] +then + if [ ! -d ../"$1" ] + then + git worktree add ../"$1" "$1" + fi + cd ../"$1" + # this is right for tags, not for branches yet + git checkout "$1" + + /usr/local/mariadb/bin/mysql --comments -u root < pymysql/tests/databases.json <> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init + +ENV ACL_BOARD_VENDOR_PATH='/opt/Intel/OpenCLFPGA/oneAPI/Boards' +ENV ADVISOR_2021_DIR='/opt/intel/oneapi/advisor/2021.4.0' +ENV APM='/opt/intel/oneapi/advisor/2021.4.0/perfmodels' +ENV CCL_CONFIGURATION='cpu_gpu_dpcpp' +ENV CCL_ROOT='/opt/intel/oneapi/ccl/2021.4.0' +ENV CLASSPATH='/opt/intel/oneapi/mpi/2021.4.0//lib/mpi.jar:/opt/intel/oneapi/dal/2021.4.0/lib/onedal.jar' +ENV CLCK_ROOT='/opt/intel/oneapi/clck/2021.4.0' +ENV CMAKE_PREFIX_PATH='/opt/intel/oneapi/vpl/2021.6.0:/opt/intel/oneapi/tbb/2021.4.0/env/..:/opt/intel/oneapi/dal/2021.4.0' +ENV CMPLR_ROOT='/opt/intel/oneapi/compiler/2021.4.0' +ENV CONDA_DEFAULT_ENV='intelpython-python3.7' +ENV CONDA_EXE='/opt/intel/oneapi/intelpython/latest/bin/conda' +ENV CONDA_PREFIX='/opt/intel/oneapi/intelpython/latest' +ENV CONDA_PROMPT_MODIFIER='(intelpython-python3.7) ' +ENV CONDA_PYTHON_EXE='/opt/intel/oneapi/intelpython/latest/bin/python' +ENV CONDA_SHLVL='1' +ENV CPATH='/opt/intel/oneapi/vpl/2021.6.0/include:/opt/intel/oneapi/tbb/2021.4.0/env/../include:/opt/intel/oneapi/mpi/2021.4.0//include:/opt/intel/oneapi/mkl/2021.4.0/include:/opt/intel/oneapi/ippcp/2021.4.0/include:/opt/intel/oneapi/ipp/2021.4.0/include:/opt/intel/oneapi/dpl/2021.5.0/linux/include:/opt/intel/oneapi/dnnl/2021.4.0/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/oneapi/dev-utilities/2021.4.0/include:/opt/intel/oneapi/dal/2021.4.0/include:/opt/intel/oneapi/compiler/2021.4.0/linux/include:/opt/intel/oneapi/ccl/2021.4.0/include/cpu_gpu_dpcpp' +ENV CPLUS_INCLUDE_PATH='/opt/intel/oneapi/clck/2021.4.0/include' +ENV DAALROOT='/opt/intel/oneapi/dal/2021.4.0' +ENV DALROOT='/opt/intel/oneapi/dal/2021.4.0' +ENV DAL_MAJOR_BINARY='1' +ENV DAL_MINOR_BINARY='1' +ENV DNNLROOT='/opt/intel/oneapi/dnnl/2021.4.0/cpu_dpcpp_gpu_dpcpp' +ENV DPL_ROOT='/opt/intel/oneapi/dpl/2021.5.0' +ENV FI_PROVIDER_PATH='/opt/intel/oneapi/mpi/2021.4.0//libfabric/lib/prov:/usr/lib64/libfabric' +ENV FPGA_VARS_ARGS='' +ENV FPGA_VARS_DIR='/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga' +ENV GDB_INFO='/opt/intel/oneapi/debugger/10.2.4/documentation/info/' +ENV INFOPATH='/opt/intel/oneapi/debugger/10.2.4/gdb/intel64/lib' +ENV INSPECTOR_2021_DIR='/opt/intel/oneapi/inspector/2021.4.0' +ENV INTELFPGAOCLSDKROOT='/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga' +ENV INTEL_LICENSE_FILE='/opt/intel/licenses:/root/intel/licenses:/opt/intel/oneapi/clck/2021.4.0/licensing:/opt/intel/licenses:/root/intel/licenses:/Users/Shared/Library/Application Support/Intel/Licenses' +ENV INTEL_PYTHONHOME='/opt/intel/oneapi/debugger/10.2.4/dep' +ENV IPPCP_TARGET_ARCH='intel64' +ENV IPPCRYPTOROOT='/opt/intel/oneapi/ippcp/2021.4.0' +ENV IPPROOT='/opt/intel/oneapi/ipp/2021.4.0' +ENV IPP_TARGET_ARCH='intel64' +ENV I_MPI_ROOT='/opt/intel/oneapi/mpi/2021.4.0' +ENV LD_LIBRARY_PATH='/opt/intel/oneapi/vpl/2021.6.0/lib:/opt/intel/oneapi/tbb/2021.4.0/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/2021.4.0//libfabric/lib:/opt/intel/oneapi/mpi/2021.4.0//lib/release:/opt/intel/oneapi/mpi/2021.4.0//lib:/opt/intel/oneapi/mkl/2021.4.0/lib/intel64:/opt/intel/oneapi/itac/2021.4.0/slib:/opt/intel/oneapi/ippcp/2021.4.0/lib/intel64:/opt/intel/oneapi/ipp/2021.4.0/lib/intel64:/opt/intel/oneapi/dnnl/2021.4.0/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/oneapi/debugger/10.2.4/gdb/intel64/lib:/opt/intel/oneapi/debugger/10.2.4/libipt/intel64/lib:/opt/intel/oneapi/debugger/10.2.4/dep/lib:/opt/intel/oneapi/dal/2021.4.0/lib/intel64:/opt/intel/oneapi/compiler/2021.4.0/linux/lib:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/x64:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/emu:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga/host/linux64/lib:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga/linux64/lib:/opt/intel/oneapi/compiler/2021.4.0/linux/compiler/lib/intel64_lin:/opt/intel/oneapi/ccl/2021.4.0/lib/cpu_gpu_dpcpp' +ENV LIBRARY_PATH='/opt/intel/oneapi/vpl/2021.6.0/lib:/opt/intel/oneapi/tbb/2021.4.0/env/../lib/intel64/gcc4.8:/opt/intel/oneapi/mpi/2021.4.0//libfabric/lib:/opt/intel/oneapi/mpi/2021.4.0//lib/release:/opt/intel/oneapi/mpi/2021.4.0//lib:/opt/intel/oneapi/mkl/2021.4.0/lib/intel64:/opt/intel/oneapi/ippcp/2021.4.0/lib/intel64:/opt/intel/oneapi/ipp/2021.4.0/lib/intel64:/opt/intel/oneapi/dnnl/2021.4.0/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/oneapi/dal/2021.4.0/lib/intel64:/opt/intel/oneapi/compiler/2021.4.0/linux/compiler/lib/intel64_lin:/opt/intel/oneapi/compiler/2021.4.0/linux/lib:/opt/intel/oneapi/clck/2021.4.0/lib/intel64:/opt/intel/oneapi/ccl/2021.4.0/lib/cpu_gpu_dpcpp' +ENV MANPATH='/opt/intel/oneapi/mpi/2021.4.0/man:/opt/intel/oneapi/itac/2021.4.0/man:/opt/intel/oneapi/debugger/10.2.4/documentation/man:/opt/intel/oneapi/compiler/2021.4.0/documentation/en/man/common:/opt/intel/oneapi/clck/2021.4.0/man::' +ENV MKLROOT='/opt/intel/oneapi/mkl/2021.4.0' +ENV NLSPATH='/opt/intel/oneapi/mkl/2021.4.0/lib/intel64/locale/%l_%t/%N' +ENV OCL_ICD_FILENAMES='libintelocl_emu.so:libalteracl.so:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/x64/libintelocl.so' +ENV ONEAPI_ROOT='/opt/intel/oneapi' +ENV PATH='/opt/intel/oneapi/vtune/2021.7.1/bin64:/opt/intel/oneapi/vpl/2021.6.0/bin:/opt/intel/oneapi/mpi/2021.4.0//libfabric/bin:/opt/intel/oneapi/mpi/2021.4.0//bin:/opt/intel/oneapi/mkl/2021.4.0/bin/intel64:/opt/intel/oneapi/itac/2021.4.0/bin:/opt/intel/oneapi/intelpython/latest/bin:/opt/intel/oneapi/intelpython/latest/condabin:/opt/intel/oneapi/inspector/2021.4.0/bin64:/opt/intel/oneapi/dev-utilities/2021.4.0/bin:/opt/intel/oneapi/debugger/10.2.4/gdb/intel64/bin:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga/llvm/aocl-bin:/opt/intel/oneapi/compiler/2021.4.0/linux/lib/oclfpga/bin:/opt/intel/oneapi/compiler/2021.4.0/linux/bin/intel64:/opt/intel/oneapi/compiler/2021.4.0/linux/bin:/opt/intel/oneapi/clck/2021.4.0/bin/intel64:/opt/intel/oneapi/advisor/2021.4.0/bin64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' +ENV PKG_CONFIG_PATH='/opt/intel/oneapi/vtune/2021.7.1/include/pkgconfig/lib64:/opt/intel/oneapi/vpl/2021.6.0/lib/pkgconfig:/opt/intel/oneapi/tbb/2021.4.0/env/../lib/pkgconfig:/opt/intel/oneapi/mpi/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/mkl/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/ippcp/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/inspector/2021.4.0/include/pkgconfig/lib64:/opt/intel/oneapi/dpl/2021.5.0/lib/pkgconfig:/opt/intel/oneapi/dal/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/compiler/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/ccl/2021.4.0/lib/pkgconfig:/opt/intel/oneapi/advisor/2021.4.0/include/pkgconfig/lib64:' +ENV PYTHONPATH='/opt/intel/oneapi/advisor/2021.4.0/pythonapi' +ENV SETVARS_COMPLETED='1' +ENV SETVARS_VARS_PATH='/opt/intel/oneapi/vtune/latest/env/vars.sh' +ENV TBBROOT='/opt/intel/oneapi/tbb/2021.4.0/env/..' +ENV VTUNE_PROFILER_2021_DIR='/opt/intel/oneapi/vtune/2021.7.1' +ENV VT_ADD_LIBS='-ldwarf -lelf -lvtunwind -lm -lpthread' +ENV VT_LIB_DIR='/opt/intel/oneapi/itac/2021.4.0/lib' +ENV VT_MPI='impi4' +ENV VT_ROOT='/opt/intel/oneapi/itac/2021.4.0' +ENV VT_SLIB_DIR='/opt/intel/oneapi/itac/2021.4.0/slib' +ENV _CE_CONDA='' +ENV _CE_M='' + +USER buildbot +ENTRYPOINT ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/icc-ubuntu-2004-download.dockerfile b/dockerfiles/icc-ubuntu-2004-download.dockerfile new file mode 100644 index 00000000..91b8f261 --- /dev/null +++ b/dockerfiles/icc-ubuntu-2004-download.dockerfile @@ -0,0 +1,2 @@ +FROM vladbogo/sles:icc-ubuntu-2004 +LABEL maintainer="MariaDB Buildbot maintainers" diff --git a/dockerfiles/icc-ubuntu-2004.dockerfile b/dockerfiles/icc-ubuntu-2004.dockerfile new file mode 100644 index 00000000..4899f4cb --- /dev/null +++ b/dockerfiles/icc-ubuntu-2004.dockerfile @@ -0,0 +1,67 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +COPY sw_dev_tools /tmp/intel + +USER root +WORKDIR /tmp/intel +RUN apt-get install -y cpio +RUN ./install.sh --silent=silent.cfg + +RUN ln -s /opt/intel/sw_dev_tools/bin/* /usr/local/bin/ + +WORKDIR /buildbot + +ENV LD_LIBRARY_PATH=/opt/intel/sw_dev_tools/lib/intel64_lin/ + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/msan-clang-ubuntu-1804.dockerfile b/dockerfiles/msan-clang-ubuntu-1804.dockerfile new file mode 100644 index 00000000..3a52fe06 --- /dev/null +++ b/dockerfiles/msan-clang-ubuntu-1804.dockerfile @@ -0,0 +1,72 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +RUN apt-get update && \ + apt-get -y install wget gnupg + +RUN echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list +RUN echo "deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list + +RUN wget -O key https://apt.llvm.org/llvm-snapshot.gpg.key && apt-key add key + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + gnutls-dev valgrind libc++-10-dev libc++abi-10-dev + +RUN apt-get -y install clang-10 + +WORKDIR /mariadb + +RUN apt source libc++-10-dev +RUN mv llvm-toolchain-10-10.0.1* llvm-toolchain-10-10.0.1 + +WORKDIR /mariadb/llvm-toolchain-10-10.0.1/libc++msan + +RUN cmake ../libcxx -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 + +RUN make -j10 + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac + +WORKDIR /buildbot +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/opensuse-15.dockerfile b/dockerfiles/opensuse-15.dockerfile new file mode 100644 index 00000000..54c10d43 --- /dev/null +++ b/dockerfiles/opensuse-15.dockerfile @@ -0,0 +1,46 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base OpenSUSE image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM opensuse/leap +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN zypper update -y && \ + zypper install -y -t pattern devel_basis && \ + zypper install -y git ccache subversion \ + python-devel libffi-devel openssl-devel glibc-locale\ + python-pip curl wget && \ + # install MariaDB dependencies + #zypper mr -er repo-source + zypper -n si -d mariadb + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \ + chmod +x /usr/local/bin/dumb-init + +RUN zypper install -y policycoreutils rpm-build + +RUN zypper install -y boost-devel libboost_program_options1_66_0-devel libcurl-devel cracklib-devel libxml2-devel snappy-devel scons check-devel liblz4-devel +RUN zypper install -y binutils bison checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ gcc7 git-core glibc glibc-devel groff java-1_8_0-openjdk java-1_8_0-openjdk-devel java-1_8_0-openjdk-headless judy-devel krb5-devel libaio-devel libboost_atomic1_66_0-devel libboost_chrono1_66_0-devel libboost_date_time1_66_0-devel libboost_filesystem1_66_0-devel libboost_headers1_66_0-devel libboost_regex1_66_0-devel libboost_system1_66_0-devel libboost_thread1_66_0-devel libbz2-devel libcurl-devel libevent-devel libfl-devel libopenssl-1_1-devel libxml2-devel libxml2-tools libzstd-devel lzo-devel make ncurses-devel pam-devel pcre2-devel pkg-config policycoreutils readline-devel snappy-devel systemd-devel tar unixODBC unixODBC-devel xz-devel zlib-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel flex gawk gcc gcc-c++ git-core glibc glibc-devel groff java-1_8_0-openjdk java-1_8_0-openjdk-devel krb5-devel libaio-devel libbz2-devel libcurl-devel libevent-devel libopenssl-devel libxml2-devel libxml2-tools lzo-devel make ncurses-devel pam-devel pkg-config policycoreutils readline-devel ruby snappy-devel systemd-devel tar unixODBC unixODBC-devel xz-devel zlib-devel which +RUN zypper install -y libpmem-devel jemalloc-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/opensuse-42.dockerfile b/dockerfiles/opensuse-42.dockerfile new file mode 100644 index 00000000..417266a7 --- /dev/null +++ b/dockerfiles/opensuse-42.dockerfile @@ -0,0 +1,49 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base OpenSUSE image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM opensuse/leap:42.3 +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN zypper update -y && \ + zypper install -y -t pattern devel_basis && \ + zypper install -y git ccache subversion \ + python-devel libffi-devel openssl-devel glibc-locale\ + python-pip curl wget && \ + # install MariaDB dependencies + #zypper mr -er repo-source + zypper -n si -d mariadb + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \ + chmod +x /usr/local/bin/dumb-init + +RUN zypper install -y policycoreutils rpm-build + +RUN wget https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.sh +RUN mkdir -p /opt/cmake +RUN sh cmake-3.19.0-Linux-x86_64.sh --prefix=/opt/cmake --skip-license +RUN ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake + +RUN zypper install -y boost-devel libcurl-devel cracklib-devel libxml2-devel snappy-devel scons check-devel liblz4-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-centos-7.dockerfile b/dockerfiles/ppc-centos-7.dockerfile new file mode 100644 index 00000000..624bde42 --- /dev/null +++ b/dockerfiles/ppc-centos-7.dockerfile @@ -0,0 +1,56 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base CentOS image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM centos:7 +LABEL maintainer="MariaDB Buildbot maintainers" + +# Install updates and required packages +RUN yum -y --enablerepo=extras install epel-release +RUN sed -i '/baseurl/s/^#//g' /etc/yum.repos.d/epel.repo +RUN sed -i '/metalink/s/^/#/g' /etc/yum.repos.d/epel.repo +RUN yum clean all && yum -y update + +RUN yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion \ + python3 libffi-devel openssl-devel \ + python3-pip redhat-rpm-config curl wget systemd-devel && \ + # install MariaDB dependencies + yum-builddep -y mariadb-server + +RUN yum -y install python36-devel + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip3 install -U pip virtualenv && \ + pip3 install --upgrade setuptools && \ + pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_ppc64le && \ + chmod +x /usr/local/bin/dumb-init + +RUN yum -y install cmake3 + +RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \ +--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \ +--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \ +--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \ +--family cmake + +RUN yum -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-clang-ubuntu-2004.dockerfile b/dockerfiles/ppc-clang-ubuntu-2004.dockerfile new file mode 100644 index 00000000..0ed14230 --- /dev/null +++ b/dockerfiles/ppc-clang-ubuntu-2004.dockerfile @@ -0,0 +1,52 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping clang libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac + +WORKDIR /buildbot +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +RUN pip install cryptography==3.4.8 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_ppc64el.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-debian-10.dockerfile b/dockerfiles/ppc-debian-10.dockerfile new file mode 100644 index 00000000..8d5f7357 --- /dev/null +++ b/dockerfiles/ppc-debian-10.dockerfile @@ -0,0 +1,54 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:10 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +RUN pip3 install cryptography==3.4.8 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-debian-11.dockerfile b/dockerfiles/ppc-debian-11.dockerfile new file mode 100644 index 00000000..492ed888 --- /dev/null +++ b/dockerfiles/ppc-debian-11.dockerfile @@ -0,0 +1,55 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:bullseye +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +RUN pip3 install cryptography==3.4.8 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libboost-all-dev check scons libboost-program-options-dev liburing-dev libpmem-dev +RUN apt-get update && apt-get -y install flex + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-debian-9-download.dockerfile b/dockerfiles/ppc-debian-9-download.dockerfile new file mode 100644 index 00000000..62bfc617 --- /dev/null +++ b/dockerfiles/ppc-debian-9-download.dockerfile @@ -0,0 +1 @@ +FROM quay.io/mariadb-foundation/bb-worker:debian9 diff --git a/dockerfiles/ppc-debian-9.dockerfile b/dockerfiles/ppc-debian-9.dockerfile new file mode 100644 index 00000000..de00048b --- /dev/null +++ b/dockerfiles/ppc-debian-9.dockerfile @@ -0,0 +1,54 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ppc64le/debian:9 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init + +RUN apt-get -y install gnutls-dev +RUN apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-debian-sid.dockerfile b/dockerfiles/ppc-debian-sid.dockerfile new file mode 100644 index 00000000..06e83e52 --- /dev/null +++ b/dockerfiles/ppc-debian-sid.dockerfile @@ -0,0 +1,57 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Debian image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM debian:sid +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN cat /etc/apt/sources.list | sed 's/^deb /deb-src /g' >> /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd libffi-dev \ + liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +RUN pip3 install cryptography==3.4.8 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN apt-get -y install dumb-init +RUN apt-get update && apt-get -y install debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-all-dev check scons libboost-program-options-dev +RUN apt-get -y install liburing-dev libpmem-dev +RUN apt-get update && apt-get -y install flex + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-rhel-7-download.dockerfile b/dockerfiles/ppc-rhel-7-download.dockerfile new file mode 100644 index 00000000..d3f39b3a --- /dev/null +++ b/dockerfiles/ppc-rhel-7-download.dockerfile @@ -0,0 +1,3 @@ +FROM vladbogo/sles:rhel-7-ppc64le +LABEL maintainer="MariaDB Buildbot maintainers" + diff --git a/dockerfiles/ppc-rhel-8-download.dockerfile b/dockerfiles/ppc-rhel-8-download.dockerfile new file mode 100644 index 00000000..860604be --- /dev/null +++ b/dockerfiles/ppc-rhel-8-download.dockerfile @@ -0,0 +1,3 @@ +FROM vladbogo/sles:rhel-8-ppc64le +LABEL maintainer="MariaDB Buildbot maintainers" + diff --git a/dockerfiles/ppc-ubuntu-1804.dockerfile b/dockerfiles/ppc-ubuntu-1804.dockerfile new file mode 100644 index 00000000..9e42768f --- /dev/null +++ b/dockerfiles/ppc-ubuntu-1804.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_ppc64el.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-ubuntu-2004.dockerfile b/dockerfiles/ppc-ubuntu-2004.dockerfile new file mode 100644 index 00000000..9737093e --- /dev/null +++ b/dockerfiles/ppc-ubuntu-2004.dockerfile @@ -0,0 +1,58 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 libffi-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(arch).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install dumb-init +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ppc-ubuntu-2104.dockerfile b/dockerfiles/ppc-ubuntu-2104.dockerfile new file mode 100644 index 00000000..48d85fdd --- /dev/null +++ b/dockerfiles/ppc-ubuntu-2104.dockerfile @@ -0,0 +1,58 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ppc64le/ubuntu:21.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 libffi-dev liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +#RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_$(arch).deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install dumb-init +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get install -y liburing-dev libpmem-dev gdb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/rhel-7-download.dockerfile b/dockerfiles/rhel-7-download.dockerfile new file mode 100644 index 00000000..28ddec0e --- /dev/null +++ b/dockerfiles/rhel-7-download.dockerfile @@ -0,0 +1,3 @@ +FROM vladbogo/sles:rhel-7 +LABEL maintainer="MariaDB Buildbot maintainers" + diff --git a/dockerfiles/rhel-7.dockerfile b/dockerfiles/rhel-7.dockerfile new file mode 100644 index 00000000..5965c561 --- /dev/null +++ b/dockerfiles/rhel-7.dockerfile @@ -0,0 +1,59 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base RHEL-7 image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.access.redhat.com/rhel7 +LABEL maintainer="MariaDB Buildbot maintainers" + +RUN subscription-manager register --username %s --password %s --auto-attach + +RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + +RUN subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" + +RUN sed -i '/baseurl/s/^#//g' /etc/yum.repos.d/epel.repo +RUN sed -i '/metalink/s/^/#/g' /etc/yum.repos.d/epel.repo + +# Install updates and required packages +RUN yum -y install epel-release && \ + yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion \ + python-devel libffi-devel openssl-devel jemalloc-devel \ + python-pip redhat-rpm-config curl wget && \ + # install MariaDB dependencies + yum-builddep -y mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm https://cbs.centos.org/kojifiles/packages/dumb-init/1.1.3/17.el7/x86_64/dumb-init-1.1.3-17.el7.x86_64.rpm && yum -y localinstall /tmp/dumb.rpm + +ENV CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 + +RUN wget https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.sh +RUN mkdir -p /opt/cmake +RUN sh cmake-3.19.0-Linux-x86_64.sh --prefix=/opt/cmake --skip-license +RUN ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake + +RUN yum -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel scons + +RUN subscription-manager unregister + +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/rhel-8.dockerfile b/dockerfiles/rhel-8.dockerfile new file mode 100644 index 00000000..2a468e4d --- /dev/null +++ b/dockerfiles/rhel-8.dockerfile @@ -0,0 +1,57 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base RHEL-8 image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.access.redhat.com/ubi8/ubi +LABEL maintainer="MariaDB Buildbot maintainers" + +RUN subscription-manager register --username %s --password %s --auto-attach + +RUN subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms" + +RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + +# Install updates and required packages +RUN yum -y install epel-release && \ + yum -y upgrade && \ + yum -y groupinstall 'Development Tools' && \ + yum -y install git ccache subversion yum-utils \ + python3-devel libffi-devel openssl-devel \ + python3-pip redhat-rpm-config curl wget + +# install MariaDB dependencies +RUN dnf -y install https://kojipkgs.fedoraproject.org//packages/Judy/1.0.5/24.fc33/$(arch)/Judy-1.0.5-24.fc33.$(arch).rpm +RUN dnf -y install https://kojipkgs.fedoraproject.org//packages/Judy/1.0.5/24.fc33/$(arch)/Judy-devel-1.0.5-24.fc33.$(arch).rpm +RUN yum-builddep -y mariadb-server + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip3 install -U pip virtualenv && \ + pip3 install --upgrade setuptools && \ + pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /tmp/dumb.rpm https://cbs.centos.org/kojifiles/packages/dumb-init/1.2.2/6.el8/$(arch)/dumb-init-1.2.2-6.el8.$(arch).rpm && yum -y localinstall /tmp/dumb.rpm + +RUN dnf -y install cracklib cracklib-dicts cracklib-devel boost-devel curl-devel libxml2-devel lz4-devel snappy-devel check-devel python3-scons \ + judy-devel binutils bison boost-devel checkpolicy coreutils cracklib-devel gcc gcc-c++ git glibc-common glibc-devel groff-base java-1.8.0-openjdk \ + java-1.8.0-openjdk-headless krb5-devel libaio-devel libcurl-devel libevent-devel libxml2 libxml2-devel libzstd-devel make ncurses-devel \ + openssl-devel pam-devel pcre2-devel pkgconfig policycoreutils readline-devel ruby snappy-devel systemd-devel systemtap-sdt-devel tar unixODBC \ + unixODBC-devel xz-devel zlib-devel which python3 gdb jemalloc-devel --allowerasing && dnf clean all +RUN dnf -y install bzip2 lzo bzip2-libs bzip2-devel lzo-devel + +RUN subscription-manager unregister + +USER buildbot +CMD ["dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/s390x-sles-15.dockerfile b/dockerfiles/s390x-sles-15.dockerfile new file mode 100644 index 00000000..b273ad65 --- /dev/null +++ b/dockerfiles/s390x-sles-15.dockerfile @@ -0,0 +1,62 @@ +# Buildbot worker for building MariaDB +# +# Provides a base OpenSUSE image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.suse.com/suse/sle15:15.2 +LABEL maintainer="MariaDB Buildbot maintainers" + +ADD http://lxslsmt.marist.edu/smt.crt /etc/pki/trust/anchors/smt.crt +RUN update-ca-certificates + +ENV ADDITIONAL_MODULES sle-module-development-tools,PackageHub + +RUN zypper --gpg-auto-import-keys ref -s + +#ADD *.repo /etc/zypp/repos.d/ +#ADD *.service /etc/zypp/services.d/ +#RUN zypper -n --no-gpg-checks refs && zypper -n --no-gpg-checks refresh + +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/devel:tools:building/SLE_12/devel:tools:building.repo +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/server:monitoring/SLE_12_SP4/server:monitoring.repo +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/Cloud:Tools/SLE_12_SP4/Cloud:Tools.repo + +RUN zypper --non-interactive --no-gpg-checks refresh + +# Install updates and required packages +RUN zypper update -y && \ + #zypper install -y -t pattern Basis_devel && \ + zypper install -y git-core ccache \ + python3 python3-devel libffi-devel openssl-devel glibc-locale\ + python3-pip curl wget && \ + # install MariaDB dependencies + #zypper mr -er repo-source + zypper -n si -d mariadb + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1 +RUN pip install cryptography==3.4.8 +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_s390x && \ + chmod +x /usr/local/bin/dumb-init + +RUN zypper install -y policycoreutils rpm-build + +RUN zypper install -y boost-devel libcurl-devel cracklib-devel libxml2-devel snappy-devel scons check-devel liblz4-devel jemalloc-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/s390x-ubuntu-2004.dockerfile b/dockerfiles/s390x-ubuntu-2004.dockerfile new file mode 100644 index 00000000..0d1a8809 --- /dev/null +++ b/dockerfiles/s390x-ubuntu-2004.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 rustc + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_s390x.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/sles-12-download.dockerfile b/dockerfiles/sles-12-download.dockerfile new file mode 100644 index 00000000..aae70ecb --- /dev/null +++ b/dockerfiles/sles-12-download.dockerfile @@ -0,0 +1,3 @@ +FROM vladbogo/sles:sles-12SP5 +LABEL maintainer="MariaDB Buildbot maintainers" + diff --git a/dockerfiles/sles-12.dockerfile b/dockerfiles/sles-12.dockerfile new file mode 100644 index 00000000..ff0e2278 --- /dev/null +++ b/dockerfiles/sles-12.dockerfile @@ -0,0 +1,62 @@ +# Buildbot worker for building MariaDB +# +# Provides a base OpenSUSE image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.suse.com/suse/sles12sp5 +LABEL maintainer="MariaDB Buildbot maintainers" + +ENV ADDITIONAL_MODULES sle-module-development-tools,PackageHub,sle-sdk + +RUN zypper --gpg-auto-import-keys ref -s + +#ADD *.repo /etc/zypp/repos.d/ +#ADD *.service /etc/zypp/services.d/ +#RUN zypper -n --no-gpg-checks refs && zypper -n --no-gpg-checks refresh + +RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/devel:tools:building/SLE_12/devel:tools:building.repo +RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/server:monitoring/SLE_12_SP4/server:monitoring.repo +RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/Cloud:Tools/SLE_12_SP4/Cloud:Tools.repo + +RUN zypper --non-interactive --no-gpg-checks refresh + +# Install updates and required packages +RUN zypper update -y && \ + #zypper install -y -t pattern Basis_devel && \ + zypper install -y git-core ccache \ + python-devel libffi-devel openssl-devel glibc-locale\ + python-pip curl wget && \ + # install MariaDB dependencies + #zypper mr -er repo-source + zypper -n si -d mariadb + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \ + chmod +x /usr/local/bin/dumb-init + +RUN zypper install -y policycoreutils rpm-build + +RUN wget https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.sh +RUN mkdir -p /opt/cmake +RUN sh cmake-3.19.0-Linux-x86_64.sh --prefix=/opt/cmake --skip-license +RUN ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake + +RUN zypper install -y boost-devel libcurl-devel cracklib-devel libxml2-devel snappy-devel scons check-devel liblz4-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/sles-15-download.dockerfile b/dockerfiles/sles-15-download.dockerfile new file mode 100644 index 00000000..600febc2 --- /dev/null +++ b/dockerfiles/sles-15-download.dockerfile @@ -0,0 +1,2 @@ +FROM vladbogo/sles:sles-15SP2 +LABEL maintainer="MariaDB Buildbot maintainers" diff --git a/dockerfiles/sles-15.dockerfile b/dockerfiles/sles-15.dockerfile new file mode 100644 index 00000000..a915326b --- /dev/null +++ b/dockerfiles/sles-15.dockerfile @@ -0,0 +1,57 @@ +# Buildbot worker for building MariaDB +# +# Provides a base OpenSUSE image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM registry.suse.com/suse/sle15:15.2 +LABEL maintainer="MariaDB Buildbot maintainers" + +ENV ADDITIONAL_MODULES sle-module-development-tools,PackageHub + +RUN zypper --gpg-auto-import-keys ref -s + +#ADD *.repo /etc/zypp/repos.d/ +#ADD *.service /etc/zypp/services.d/ +#RUN zypper -n --no-gpg-checks refs && zypper -n --no-gpg-checks refresh + +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/devel:tools:building/SLE_12/devel:tools:building.repo +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/server:monitoring/SLE_12_SP4/server:monitoring.repo +#RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/Cloud:Tools/SLE_12_SP4/Cloud:Tools.repo + +RUN zypper --non-interactive --no-gpg-checks refresh + +# Install updates and required packages +RUN zypper update -y && \ + #zypper install -y -t pattern Basis_devel && \ + zypper install -y git-core ccache \ + python3 libffi-devel openssl-devel glibc-locale\ + python3-pip curl wget && \ + # install MariaDB dependencies + #zypper mr -er repo-source + zypper -n si -d mariadb + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# upgrade pip and install buildbot +RUN pip install -U pip virtualenv && \ + pip install --upgrade setuptools && \ + pip install buildbot-worker && \ + pip --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 && \ + chmod +x /usr/local/bin/dumb-init + +RUN zypper install -y policycoreutils rpm-build + +RUN zypper install -y boost-devel libcurl-devel cracklib-devel libxml2-devel snappy-devel scons check-devel liblz4-devel jemalloc-devel + +USER buildbot +CMD ["/usr/local/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ubuntu-1804.dockerfile b/dockerfiles/ubuntu-1804.dockerfile new file mode 100644 index 00000000..8c6574fb --- /dev/null +++ b/dockerfiles/ubuntu-1804.dockerfile @@ -0,0 +1,55 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ubuntu-2004.dockerfile b/dockerfiles/ubuntu-2004.dockerfile new file mode 100644 index 00000000..16bfbab3 --- /dev/null +++ b/dockerfiles/ubuntu-2004.dockerfile @@ -0,0 +1,56 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:20.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev dh-systemd flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get -y install libpmem-dev + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/ubuntu-2104.dockerfile b/dockerfiles/ubuntu-2104.dockerfile new file mode 100644 index 00000000..802cf0ac --- /dev/null +++ b/dockerfiles/ubuntu-2104.dockerfile @@ -0,0 +1,56 @@ +# +# Buildbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:21.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev flex \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev flex libboost-atomic-dev \ + libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev \ + libboost-regex-dev libboost-system-dev libboost-thread-dev \ + gcc-10 g++-10 liburing-dev + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb +RUN apt-get -y install libboost-all-dev scons check debhelper libbz2-dev liblzma-dev liblzo2-dev libasio-dev libboost-program-options-dev +RUN apt-get install -y liburing-dev libpmem-dev gdb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/valgrind-ubuntu-1804.dockerfile b/dockerfiles/valgrind-ubuntu-1804.dockerfile new file mode 100644 index 00000000..e452e9ad --- /dev/null +++ b/dockerfiles/valgrind-ubuntu-1804.dockerfile @@ -0,0 +1,51 @@ +# +# Builbot worker for building MariaDB +# +# Provides a base Ubuntu image with latest buildbot worker installed +# and MariaDB build dependencies + +FROM ubuntu:18.04 +LABEL maintainer="MariaDB Buildbot maintainers" + +# This will make apt-get install without question +ARG DEBIAN_FRONTEND=noninteractive + +# Enable apt sources +RUN sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list + +# Install updates and required packages +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y build-dep -q mariadb-server && \ + apt-get -y install -q \ + apt-utils build-essential python-dev sudo git \ + devscripts equivs libcurl4-openssl-dev \ + ccache python3 python3-pip curl wget libssl-dev libzstd-dev \ + libevent-dev dpatch gawk gdb libboost-dev libcrack2-dev \ + libjudy-dev libnuma-dev libsnappy-dev libxml2-dev \ + unixodbc-dev uuid-dev fakeroot iputils-ping dh-exec libpcre2-dev \ + libarchive-dev libedit-dev liblz4-dev gnutls-dev valgrind + +# Create buildbot user +RUN useradd -ms /bin/bash buildbot && \ + mkdir /buildbot && \ + chown -R buildbot /buildbot && \ + curl -o /buildbot/buildbot.tac https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac +WORKDIR /buildbot + +# autobake-deb will need sudo rights +RUN usermod -a -G sudo buildbot +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Upgrade pip and install packages +RUN pip3 install -U pip virtualenv +RUN pip3 install buildbot-worker && \ + pip3 --no-cache-dir install 'twisted[tls]' + +# Test runs produce a great quantity of dead grandchild processes. In a +# non-docker environment, these are automatically reaped by init (process 1), +# so we need to simulate that here. See https://github.com/Yelp/dumb-init +RUN curl https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb -Lo /tmp/init.deb && dpkg -i /tmp/init.deb + +USER buildbot +CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"] diff --git a/dockerfiles/windows-download.dockerfile b/dockerfiles/windows-download.dockerfile new file mode 100644 index 00000000..ace36a8b --- /dev/null +++ b/dockerfiles/windows-download.dockerfile @@ -0,0 +1,2 @@ +FROM vladbogo/sles:windows +LABEL maintainer="MariaDB Buildbot maintainers" diff --git a/dockerfiles/windows.dockerfile b/dockerfiles/windows.dockerfile new file mode 100644 index 00000000..40fccc43 --- /dev/null +++ b/dockerfiles/windows.dockerfile @@ -0,0 +1,49 @@ +#escape=` + +# Use the latest Windows Server Core image with .NET Framework 3.5 +FROM mcr.microsoft.com/dotnet/framework/sdk:3.5-windowsservercore-ltsc2019 + +# Restore the default Windows shell for correct batch processing. +SHELL ["cmd", "/S", "/C"] + +# Download the Build Tools bootstrapper. +ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe + +# Install Build Tools with the Microsoft.VisualStudio.Workload.VCTools workload etc. +RUN C:\TEMP\vs_buildtools.exe --quiet --wait ` + --norestart --nocache --installPath C:\VCTools ` + --add Microsoft.VisualStudio.Workload.VCTools ` + --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Redist.MSM ` + || IF "%ERRORLEVEL%"=="3010" EXIT 0 + +RUN powershell -Command ` + iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); ` + choco feature disable --name showDownloadProgress + +RUN choco install -y git.install --params /NoAutoCrlf +RUN choco install -y strawberryperl winflexbison +RUN setx PATH "%PATH%;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\winflexbison\tools;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64" +RUN git.exe config --global core.autocrlf input +RUN choco install -y wixtoolset + +RUN choco install -y diffutils +RUN choco install -y python --version 3.8 + +RUN net user Buildbot /add +SHELL ["cmd.exe", "/s", "/c"] +RUN C:\VCTools\Common7\Tools\VsDevCmd.bat -arch=x64 && ` + python -m pip install --upgrade incremental +RUN python -m pip install wheel --no-cache-dir +RUN python -m pip install twisted --no-cache-dir +RUN python -m pip install buildbot-worker +RUN python -m pip install pypiwin32 + +RUN mkdir C:\Buildbot +WORKDIR C:\\Buildbot +SHELL ["powershell", "-command"] +RUN Start-BitsTransfer -Source 'https://raw.githubusercontent.com/MariaDB/mariadb.org-tools/master/buildbot.mariadb.org/dockerfiles/buildbot.tac' -Destination buildbot.tac + +RUN New-SelfSignedCertificate -DNSName "mariadb.org" -CertStoreLocation Cert:\CurrentUser\My -Type CodeSigningCert -Subject "MariaDB" + +SHELL ["cmd.exe", "/s", "/c"] +CMD C:\\Python38\\Scripts\\twistd.exe -noy C:\\Buildbot\\buildbot.tac