From: Anoop C S Date: Thu, 8 May 2025 07:38:13 +0000 (+0530) Subject: source3/wscript: Configure prometheus exporter only with profiling X-Git-Tag: tevent-0.17.0~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b543aa99e24588d8a442cc9be6ab8b81ded7cbd9;p=thirdparty%2Fsamba.git source3/wscript: Configure prometheus exporter only with profiling 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 Reviewed-by: Volker Lendecke --- diff --git a/script/autobuild.py b/script/autobuild.py index 0283ec6754b..85f2d324659 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -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"), diff --git a/source3/wscript b/source3/wscript index dfd11ca3b44..493cef1db23 100644 --- a/source3/wscript +++ b/source3/wscript @@ -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')