From 23252d3de63e436c44af274dea1ade361f27b437 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 11 Sep 2024 13:45:59 +0200 Subject: [PATCH] buildmaster: build gdbuspp during openvpn3-linux build Otherwise this is just too unreliable since we have no way to detect when we need a newer version of gdbuspp. Signed-off-by: Frank Lichtenheld --- .../buildbot-worker-alpine-3/Dockerfile.base | 1 - .../buildbot-worker-arch/Dockerfile.base | 1 - .../buildbot-worker-debian-11/Dockerfile.base | 1 - .../buildbot-worker-debian-12/Dockerfile.base | 1 - .../Dockerfile.base | 1 - .../buildbot-worker-fedora-39/Dockerfile.base | 1 - .../buildbot-worker-fedora-40/Dockerfile.base | 1 - .../Dockerfile.base | 1 - .../Dockerfile.base | 1 - .../Dockerfile.base | 1 - .../Dockerfile.base | 1 - .../Dockerfile.base | 1 - buildbot-host/buildmaster/master.cfg | 4 +- .../openvpn3-linux/common_linux_steps.cfg | 1 + .../openvpn3-linux/gdbuspp_steps.cfg | 52 +++++++++++++++++++ buildbot-host/scripts/install-gdbuspp.sh | 16 ------ buildbot-host/snippets/Dockerfile.common | 8 --- 17 files changed, 56 insertions(+), 37 deletions(-) create mode 100644 buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg delete mode 100755 buildbot-host/scripts/install-gdbuspp.sh diff --git a/buildbot-host/buildbot-worker-alpine-3/Dockerfile.base b/buildbot-host/buildbot-worker-alpine-3/Dockerfile.base index 8d999e3..c6f2c75 100644 --- a/buildbot-host/buildbot-worker-alpine-3/Dockerfile.base +++ b/buildbot-host/buildbot-worker-alpine-3/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=alpine:3.18.4 ARG DEPS_SH=install-openvpn-build-deps-alpine.sh ARG MY_NAME="buildbot-worker-alpine-3" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-arch/Dockerfile.base b/buildbot-host/buildbot-worker-arch/Dockerfile.base index ad678cc..edfc604 100644 --- a/buildbot-host/buildbot-worker-arch/Dockerfile.base +++ b/buildbot-host/buildbot-worker-arch/Dockerfile.base @@ -3,4 +3,3 @@ ARG DEPS_SH=install-openvpn-build-deps-arch.sh ARG MY_NAME="buildbot-worker-arch" ARG PIP_INSTALL_OPTS="--break-system-packages" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-debian-11/Dockerfile.base b/buildbot-host/buildbot-worker-debian-11/Dockerfile.base index 3094411..d68e53d 100644 --- a/buildbot-host/buildbot-worker-debian-11/Dockerfile.base +++ b/buildbot-host/buildbot-worker-debian-11/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=debian:11 ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-debian-11" ARG MY_VERSION="v1.0.3" -ARG INSTALL_GDBUSPP="no" diff --git a/buildbot-host/buildbot-worker-debian-12/Dockerfile.base b/buildbot-host/buildbot-worker-debian-12/Dockerfile.base index 6a9bd7b..52aaed7 100644 --- a/buildbot-host/buildbot-worker-debian-12/Dockerfile.base +++ b/buildbot-host/buildbot-worker-debian-12/Dockerfile.base @@ -3,4 +3,3 @@ ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-debian-12" ARG PIP_INSTALL_OPTS="--break-system-packages" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-debian-unstable/Dockerfile.base b/buildbot-host/buildbot-worker-debian-unstable/Dockerfile.base index ddc62fa..d2a99f8 100644 --- a/buildbot-host/buildbot-worker-debian-unstable/Dockerfile.base +++ b/buildbot-host/buildbot-worker-debian-unstable/Dockerfile.base @@ -3,4 +3,3 @@ ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-debian-unstable" ARG PIP_INSTALL_OPTS="--break-system-packages" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-fedora-39/Dockerfile.base b/buildbot-host/buildbot-worker-fedora-39/Dockerfile.base index 17d317b..8700716 100644 --- a/buildbot-host/buildbot-worker-fedora-39/Dockerfile.base +++ b/buildbot-host/buildbot-worker-fedora-39/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=fedora:39 ARG DEPS_SH=install-openvpn-build-deps-fedora.sh ARG MY_NAME="buildbot-worker-fedora-39" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-fedora-40/Dockerfile.base b/buildbot-host/buildbot-worker-fedora-40/Dockerfile.base index 50267f0..fcff921 100644 --- a/buildbot-host/buildbot-worker-fedora-40/Dockerfile.base +++ b/buildbot-host/buildbot-worker-fedora-40/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=fedora:40 ARG DEPS_SH=install-openvpn-build-deps-fedora.sh ARG MY_NAME="buildbot-worker-fedora-40" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-fedora-rawhide/Dockerfile.base b/buildbot-host/buildbot-worker-fedora-rawhide/Dockerfile.base index 45879b6..bf7886d 100644 --- a/buildbot-host/buildbot-worker-fedora-rawhide/Dockerfile.base +++ b/buildbot-host/buildbot-worker-fedora-rawhide/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=fedora:rawhide ARG DEPS_SH=install-openvpn-build-deps-fedora.sh ARG MY_NAME="buildbot-worker-fedora-rawhide" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-opensuse-leap-15/Dockerfile.base b/buildbot-host/buildbot-worker-opensuse-leap-15/Dockerfile.base index 64e61a8..1f596b8 100644 --- a/buildbot-host/buildbot-worker-opensuse-leap-15/Dockerfile.base +++ b/buildbot-host/buildbot-worker-opensuse-leap-15/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=opensuse/leap:15 ARG DEPS_SH=install-openvpn-build-deps-opensuse-leap.sh ARG MY_NAME="buildbot-worker-opensuse-leap-15" ARG MY_VERSION="v1.0.3" -ARG INSTALL_GDBUSPP="no" diff --git a/buildbot-host/buildbot-worker-ubuntu-2004/Dockerfile.base b/buildbot-host/buildbot-worker-ubuntu-2004/Dockerfile.base index 330b120..f6f968c 100644 --- a/buildbot-host/buildbot-worker-ubuntu-2004/Dockerfile.base +++ b/buildbot-host/buildbot-worker-ubuntu-2004/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=ubuntu:20.04 ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-ubuntu-2004" ARG MY_VERSION="v1.0.3" -ARG INSTALL_GDBUSPP="no" diff --git a/buildbot-host/buildbot-worker-ubuntu-2204/Dockerfile.base b/buildbot-host/buildbot-worker-ubuntu-2204/Dockerfile.base index 73ef641..9941c06 100644 --- a/buildbot-host/buildbot-worker-ubuntu-2204/Dockerfile.base +++ b/buildbot-host/buildbot-worker-ubuntu-2204/Dockerfile.base @@ -2,4 +2,3 @@ ARG IMAGE=ubuntu:22.04 ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-ubuntu-2204" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildbot-worker-ubuntu-2404/Dockerfile.base b/buildbot-host/buildbot-worker-ubuntu-2404/Dockerfile.base index 2237b7a..7325cbd 100644 --- a/buildbot-host/buildbot-worker-ubuntu-2404/Dockerfile.base +++ b/buildbot-host/buildbot-worker-ubuntu-2404/Dockerfile.base @@ -3,4 +3,3 @@ ARG DEPS_SH=install-openvpn-build-deps-ubuntu.sh ARG MY_NAME="buildbot-worker-ubuntu-2404" ARG PIP_INSTALL_OPTS="--break-system-packages" ARG MY_VERSION="v1.1.0" -ARG INSTALL_GDBUSPP="yes" diff --git a/buildbot-host/buildmaster/master.cfg b/buildbot-host/buildmaster/master.cfg index 6e99d8c..f1822d3 100755 --- a/buildbot-host/buildmaster/master.cfg +++ b/buildbot-host/buildmaster/master.cfg @@ -464,7 +464,7 @@ for steps_file in ["common_linux_steps.cfg"]: ) # OpenVPN 3 linux build steps -for steps_file in ["common_linux_steps.cfg"]: +for steps_file in ["common_linux_steps.cfg", "gdbuspp_steps.cfg"]: exec( compile( source=open(os.path.join("openvpn3-linux", steps_file)).read(), @@ -651,6 +651,7 @@ del factory # OpenSSL openvpn3-linux smoketest builds factory = util.BuildFactory() +factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory) factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory) factory_name = "openvpn3-linux-openssl-smoketest" factories.update( @@ -667,6 +668,7 @@ del factory # OpenSSL openvpn3-linux builds factory = util.BuildFactory() +factory = openvpn3LinuxAddGdbusppStepsToBuildFactory(factory) factory = openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory) factory_name = "openvpn3-linux-openssl" factories.update( diff --git a/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg b/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg index 6450677..0590439 100644 --- a/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg +++ b/buildbot-host/buildmaster/openvpn3-linux/common_linux_steps.cfg @@ -8,6 +8,7 @@ def openvpn3LinuxAddCommonLinuxStepsToBuildFactory(factory): name="clone", description="cloning", descriptionDone="cloning", + submodules=True, ) ) diff --git a/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg b/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg new file mode 100644 index 0000000..9b1dee6 --- /dev/null +++ b/buildbot-host/buildmaster/openvpn3-linux/gdbuspp_steps.cfg @@ -0,0 +1,52 @@ +# -*- python -*- +# ex: set filetype=python: +def openvpn3LinuxAddGdbusppStepsToBuildFactory(factory): + factory.addStep( + steps.Git( + repourl="https://codeberg.org/OpenVPN/gdbuspp.git", + mode="incremental", + name="clone", + description="cloning", + descriptionDone="cloning", + descriptionSuffix="gdbuspp", + alwaysUseLatest=True, + workdir="gdbuspp", + ) + ) + + factory.addStep( + steps.ShellCommand( + command=["meson", "setup", "--prefix=/usr", "_builddir"], + name="configure", + description="configuring", + descriptionDone="configuring", + descriptionSuffix="gdbuspp", + workdir="gdbuspp", + haltOnFailure=True, + ) + ) + + factory.addStep( + steps.ShellCommand( + command=["meson", "compile", "-C", "_builddir", "--jobs=1"], + name="building", + description="building", + descriptionDone="building", + descriptionSuffix="gdbuspp", + workdir="gdbuspp", + haltOnFailure=True, + ) + ) + + factory.addStep( + steps.ShellCommand( + command=["meson", "install", "-C", "_builddir"], + name="installing", + description="installing", + descriptionDone="installing", + descriptionSuffix="gdbuspp", + workdir="gdbuspp", + ) + ) + + return factory diff --git a/buildbot-host/scripts/install-gdbuspp.sh b/buildbot-host/scripts/install-gdbuspp.sh deleted file mode 100755 index e449451..0000000 --- a/buildbot-host/scripts/install-gdbuspp.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# Install GDBus++ :: glib2 D-Bus C++ interface -# -# This is a prerequisite for building openvpn3-linux. We don't use "set -e" here -# because meson exit code may be non-zero (e.g. 130) even if all went well. -# -if [ "${INSTALL_GDBUSPP}" = "yes" ]; then - git clone https://codeberg.org/OpenVPN/gdbuspp.git - cd gdbuspp - meson setup --prefix=/usr _builddir - cd _builddir - meson compile - meson install - ldconfig -fi diff --git a/buildbot-host/snippets/Dockerfile.common b/buildbot-host/snippets/Dockerfile.common index d36bbef..0ccdc46 100644 --- a/buildbot-host/snippets/Dockerfile.common +++ b/buildbot-host/snippets/Dockerfile.common @@ -11,14 +11,6 @@ RUN set -ex; \ /buildbot/${DEPS_SH}; \ rm -f ${DEPS_SH} -# Install gdbuspp, which is a dependency of openvpn3-linux -ARG INSTALL_GDBUSPP -COPY scripts/install-gdbuspp.sh /buildbot/ -RUN set -x; \ - /buildbot/install-gdbuspp.sh; \ - rm -f install-gdbuspp.sh; \ - rm -rf /buildbot/gdbuspp - # Install buildbot ARG MY_NAME ARG PIP_INSTALL_OPTS