]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
source3/wscript: Configure prometheus exporter only with profiling
authorAnoop C S <anoopcs@samba.org>
Thu, 8 May 2025 07:38:13 +0000 (13:08 +0530)
committerAnoop C S <anoopcs@samba.org>
Fri, 9 May 2025 11:03:37 +0000 (11:03 +0000)
Prometheus endpoint is only built when profiling is enabled during
configure step. Therefore bail out early if this is not the case.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
script/autobuild.py
source3/wscript

index 0283ec6754bbde40e62a152aa2b43f4c6dba790f..85f2d3246591e98ad6a04aab0bf4813800ca57f7 100755 (executable)
@@ -879,6 +879,7 @@ tasks = {
          "./configure.developer ${PREFIX} "
          "--with-selftest-prefix=./bin/ab "
          "--with-cluster-support "
+         "--with-profiling-data "
          "--with-prometheus-exporter "
          "--bundled-libraries=!tdb"),
             ("samba-make", "make"),
@@ -1040,7 +1041,7 @@ tasks = {
         "sequence": [
         # build the fuzzers (static) via the oss-fuzz script
             ("fuzzers-mkdir-prefix", "mkdir -p ${PREFIX_DIR}"),
-            ("fuzzers-build", "OUT=${PREFIX_DIR} LIB_FUZZING_ENGINE= SANITIZER=address CXX= CFLAGS= ADDITIONAL_LDFLAGS='-fuse-ld=bfd' ./lib/fuzzing/oss-fuzz/build_samba.sh --enable-afl-fuzzer --with-prometheus-exporter"),
+            ("fuzzers-build", "OUT=${PREFIX_DIR} LIB_FUZZING_ENGINE= SANITIZER=address CXX= CFLAGS= ADDITIONAL_LDFLAGS='-fuse-ld=bfd' ./lib/fuzzing/oss-fuzz/build_samba.sh --enable-afl-fuzzer --with-profiling-data --with-prometheus-exporter"),
         ],
     },
 
@@ -1119,7 +1120,7 @@ tasks = {
         "sequence": [
             ("random-sleep", random_sleep(300, 900)),
 
-            ("configure", "./configure.developer ${ENABLE_COVERAGE} ${PREFIX} --with-profiling-data --disable-python --without-ad-dc --with-prometheus-exporter"),
+            ("configure", "./configure.developer " + samba_configure_params + " --disable-python --without-ad-dc"),
             ("make", "make -j"),
             ("find-python", "script/find_python.sh ${PREFIX}"),
             ("test", "make test-nopython"),
index dfd11ca3b44ac6e1d35a6aeb2b1f3fa2a3798998..493cef1db2379f83a350845f336de0db187a4b42 100644 (file)
@@ -208,6 +208,9 @@ long ret = splice(0,0,1,0,400,SPLICE_F_MOVE);
     # check for libevent, needed for prometheus http endpoint
     conf.SET_TARGET_TYPE('event', 'EMPTY')
     if Options.options.with_prometheus_exporter is True:
+        if not Options.options.with_profiling_data:
+            conf.fatal("Building --with-prometheus-exporter also require "
+                       "building --with-profiling-data.")
         Logs.info("Checking for libevent existence")
         if conf.CHECK_HEADERS('event2/http.h') and conf.CHECK_LIB('event', shlib=True):
             conf.CHECK_FUNCS_IN('evhttp_new', 'event')