From 58735255ff1dd7b92a7fe9546af5a9c589267838 Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 23 Mar 2023 09:24:58 +0000 Subject: [PATCH] Support per-flavour patchsets --- .gitlab-ci.yml | 8 +++++--- haproxy/Makefile | 2 +- haproxy/{patches => patches-dev}/.gitkeep | 0 haproxy/patches-stable/.gitkeep | 0 4 files changed, 6 insertions(+), 4 deletions(-) rename haproxy/{patches => patches-dev}/.gitkeep (100%) create mode 100644 haproxy/patches-stable/.gitkeep diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 157cd5d..4e71a2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,12 +36,14 @@ variables: &default-variables HAPROXY_VERSION: 2.7-stable # https://git.haproxy.org/?p=haproxy-2.7.git;a=commit;h=8d230219e15295a3c4757f94916aafcf540a7337 HAPROXY_GITREF: "8d230219e15295a3c4757f94916aafcf540a7337" + BUILD_PATCHES_DIR: "patches-stable" .haproxy_dev: &haproxy-dev HAPROXY_GITREPO: "https://git.haproxy.org/?p=haproxy.git" HAPROXY_VERSION: 2.8-dev # https://git.haproxy.org/?p=haproxy.git;a=commit;h=1751db140ab609e38af8218efbd23427115a42aa HAPROXY_GITREF: "1751db140ab609e38af8218efbd23427115a42aa" + BUILD_PATCHES_DIR: "patches-dev" .build-job: &build-job image: registry.gitlab.com/mangadex-pub/debuilder/buster:main @@ -119,7 +121,7 @@ vtest: - mkdir deps/lua/dist && tar -C deps/lua/dist -xf deps/lua/lua-dist.tar.gz - mkdir deps/pcre2/dist && tar -C deps/pcre2/dist -xf deps/pcre2/pcre2-dist.tar.gz - mkdir deps/quictls/dist && tar -C deps/quictls/dist -xf deps/quictls/quictls-dist.tar.gz - - make -C haproxy HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" + - make -C haproxy HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" BUILD_PATCHES_DIR="$BUILD_PATCHES_DIR" needs: *needs-dependencies artifacts: expire_in: 7 days @@ -133,7 +135,7 @@ vtest: - mkdir deps/lua/dist && tar -C deps/lua/dist -xf deps/lua/lua-dist.tar.gz - mkdir deps/pcre2/dist && tar -C deps/pcre2/dist -xf deps/pcre2/pcre2-dist.tar.gz - mkdir deps/quictls/dist && tar -C deps/quictls/dist -xf deps/quictls/quictls-dist.tar.gz - - make -C haproxy HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" build test + - make -C haproxy HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" BUILD_PATCHES_DIR="$BUILD_PATCHES_DIR" build test needs: - *needs-dependencies - job: vtest @@ -148,7 +150,7 @@ vtest: - mkdir deps/pcre2/dist && tar -C deps/pcre2/dist -xf deps/pcre2/pcre2-dist.tar.gz - mkdir deps/quictls/dist && tar -C deps/quictls/dist -xf deps/quictls/quictls-dist.tar.gz - export BUILD_MESSAGE="$CI_COMMIT_MESSAGE" - - make -C haproxy dist-deb HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" + - make -C haproxy dist-deb HAPROXY_GITREPO="$HAPROXY_GITREPO" HAPROXY_VERSION="$HAPROXY_VERSION" HAPROXY_GITREF="$HAPROXY_GITREF" BUILD_PATCHES_DIR="$BUILD_PATCHES_DIR" - | set -euo pipefail diff --git a/haproxy/Makefile b/haproxy/Makefile index 184b35b..18a3853 100644 --- a/haproxy/Makefile +++ b/haproxy/Makefile @@ -19,7 +19,7 @@ DEP_DIST_ROOT_VTEST = $(shell realpath ../deps/vtest/dist) BUILD_VERSION_REPOSHA = $(shell git rev-parse --short HEAD) -BUILD_PATCHES_DIR = $(shell realpath patches) +BUILD_PATCHES_DIR = $(shell realpath patches-stable) BUILD_PATCHES_FILES = $(shell ls -1 $(BUILD_PATCHES_DIR)) DEBIAN_PATCHES_DIR = "$(HAPROXY_BUILDIR)/debian/patches" diff --git a/haproxy/patches/.gitkeep b/haproxy/patches-dev/.gitkeep similarity index 100% rename from haproxy/patches/.gitkeep rename to haproxy/patches-dev/.gitkeep diff --git a/haproxy/patches-stable/.gitkeep b/haproxy/patches-stable/.gitkeep new file mode 100644 index 0000000..e69de29