From 3dfadc7ae71fe8b05409ff9845ecca0e4ba39bc2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Apr 2021 15:35:19 +0200 Subject: [PATCH] CONTRIB: move prometheus-exporter to addons/promex Let's start to better organize the addons by moving promex there (and with an easier directory name). The makefile and maintainers files were updated, as well as the CI's build matrix. --- .github/matrix.py | 4 ++-- MAINTAINERS | 2 +- Makefile | 5 +++-- {contrib/prometheus-exporter => addons/promex}/README | 0 .../promex}/service-prometheus.c | 0 5 files changed, 6 insertions(+), 5 deletions(-) rename {contrib/prometheus-exporter => addons/promex}/README (100%) rename {contrib/prometheus-exporter => addons/promex}/service-prometheus.c (100%) diff --git a/.github/matrix.py b/.github/matrix.py index 28b697f4f..e31d8edd4 100644 --- a/.github/matrix.py +++ b/.github/matrix.py @@ -81,7 +81,7 @@ for CC in ["gcc", "clang"]: "WURFL_LIB=contrib/wurfl", "USE_DEVICEATLAS=1", "DEVICEATLAS_SRC=contrib/deviceatlas", - "EXTRA_OBJS=contrib/prometheus-exporter/service-prometheus.o", + "USE_PROMEX=1", "USE_51DEGREES=1", "51DEGREES_SRC=contrib/51d/src/pattern", ], @@ -147,7 +147,7 @@ matrix.append( "WURFL_LIB=contrib/wurfl", "USE_DEVICEATLAS=1", "DEVICEATLAS_SRC=contrib/deviceatlas", - "EXTRA_OBJS=contrib/prometheus-exporter/service-prometheus.o", + "USE_PROMEX=1", "USE_51DEGREES=1", "51DEGREES_SRC=contrib/51d/src/pattern", ], diff --git a/MAINTAINERS b/MAINTAINERS index 2497a3681..7f4881d38 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -119,7 +119,7 @@ Files: src/peers.c, include/haproxy/peers*.h Prometheus Exporter Maintainer: Christopher Faulet Maintainer: William Dauchy -Files: contrib/prometheus-exporter +Files: addons/promex Note: William is the referent regarding Prometheus. He should be consulted for all additions and modifications of features. Christopher is the referent for the code itself. He should be consulted for questions regarding the diff --git a/Makefile b/Makefile index 2e15ed6f6..3a295c72e 100644 --- a/Makefile +++ b/Makefile @@ -617,7 +617,7 @@ OPTIONS_OBJS += src/hlua.o src/hlua_fcn.o endif ifneq ($(USE_PROMEX),) -OPTIONS_OBJS += contrib/prometheus-exporter/service-prometheus.o +OPTIONS_OBJS += addons/promex/service-prometheus.o endif ifneq ($(USE_DEVICEATLAS),) @@ -999,10 +999,11 @@ uninstall: clean: $(Q)rm -f *.[oas] src/*.[oas] haproxy test .build_opts .build_opts.new - $(Q)for dir in . src dev/* admin/* include/* doc; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done + $(Q)for dir in . src dev/* admin/* addons/* include/* doc; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done $(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION).tar.gz $(Q)rm -f haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION) nohup.out gmon.out $(Q)rm -f {admin,dev,contrib}/*/*.[oas] {admin,dev,contrib}/*/*/*.[oas] {admin,dev,contrib}/*/*/*/*.[oas] + $(Q)rm -f addons/promex/*.[oas] $(Q)rm -f admin/iprange/iprange admin/iprange/ip6range admin/halog/halog $(Q)rm -f dev/flags/flags dev/poll/poll dev/tcploop/tcploop $(Q)rm -f dev/hpack/decode dev/hpack/gen-enc dev/hpack/gen-rht diff --git a/contrib/prometheus-exporter/README b/addons/promex/README similarity index 100% rename from contrib/prometheus-exporter/README rename to addons/promex/README diff --git a/contrib/prometheus-exporter/service-prometheus.c b/addons/promex/service-prometheus.c similarity index 100% rename from contrib/prometheus-exporter/service-prometheus.c rename to addons/promex/service-prometheus.c