merge: branch 'bg/clat-ci'

gitlab-ci: disable CLAT if required libraries are missing

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2362
This commit is contained in:
Beniamino Galvani 2026-02-19 15:00:09 +00:00
commit df2ca8ceec
2 changed files with 12 additions and 2 deletions

View file

@ -55,6 +55,7 @@ _WITH_LIBTEAM="true"
_WITH_DOCS="true"
_WITH_SYSTEMD_LOGIND="true"
_WITH_NBFT="true"
_WITH_CLAT="true"
if [ $IS_ALPINE = 1 ]; then
_WITH_SYSTEMD_LOGIND="false"
fi
@ -63,6 +64,14 @@ if ! pkgconf 'libnvme >= 1.5'; then
_WITH_NBFT="false"
fi
if ! pkgconf 'libndp >= 1.9'; then
_WITH_CLAT="false"
fi
if ! pkgconf 'libbpf >= 1.3'; then
_WITH_CLAT="false"
fi
if [ -z "${NMTST_SEED_RAND+x}" ]; then
NMTST_SEED_RAND="$SRANDOM"
if [ -z "$NMTST_SEED_RAND" ]; then
@ -195,6 +204,7 @@ meson setup build \
-D ifupdown=true \
\
-D nbft=$_WITH_NBFT \
-D clat=$_WITH_CLAT \
\
#end

View file

@ -517,8 +517,8 @@ config_h.set10('HAVE_SELINUX', enable_selinux)
# CLAT support
enable_clat = get_option('clat')
if enable_clat
libbpf = dependency('libbpf', version: '>= 0.1.0', required: false)
assert(libbpf.found(), 'You must have libbpf installed to build. Use -Dclat=false to disable use of it')
libbpf = dependency('libbpf', version: '>= 1.3.0', required: false)
assert(libbpf.found(), 'You must have libbpf >= 1.3.0 installed to build. Use -Dclat=false to disable use of it')
libndp_dep = dependency('libndp', version: '>= 1.9', required: false)
assert(libndp_dep.found(), 'You must have libndp >= 1.9 installed to build with CLAT support. Use -Dclat=false to disable it')
endif