build: remove autotools leftovers

This commit is contained in:
Beniamino Galvani 2025-09-03 14:23:41 +02:00 committed by Íñigo Huguet
parent 7c0510ba0b
commit fcf9b60cc2
15 changed files with 17 additions and 127 deletions

View file

@ -60,11 +60,11 @@ variables:
# #
# This is done by running `ci-fairy generate-template` and possibly bumping # This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag". # ".default_tag".
ALPINE_TAG: 'tag-da1ae96102c6' ALPINE_TAG: 'tag-e577866dbb86'
CENTOS_TAG: 'tag-c8df7d2b249f' CENTOS_TAG: 'tag-1c40a0cf2c4c'
DEBIAN_TAG: 'tag-e68f538711ec' DEBIAN_TAG: 'tag-0a55ae70d83b'
FEDORA_TAG: 'tag-c8df7d2b249f' FEDORA_TAG: 'tag-1c40a0cf2c4c'
UBUNTU_TAG: 'tag-e68f538711ec' UBUNTU_TAG: 'tag-0a55ae70d83b'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'

View file

@ -29,7 +29,6 @@ apk add \
'libpsl-dev' \ 'libpsl-dev' \
'libsoup-dev' \ 'libsoup-dev' \
'libteam-dev' \ 'libteam-dev' \
'libtool' \
'linux-headers' \ 'linux-headers' \
'meson' \ 'meson' \
'mobile-broadband-provider-info' \ 'mobile-broadband-provider-info' \

View file

@ -62,7 +62,6 @@ install \
libreadline-dev \ libreadline-dev \
libsystemd-dev \ libsystemd-dev \
libteam-dev \ libteam-dev \
libtool \
libudev-dev \ libudev-dev \
locales \ locales \
meson \ meson \

View file

@ -68,7 +68,6 @@ install \
libndp-devel \ libndp-devel \
libnvme-devel \ libnvme-devel \
libselinux-devel \ libselinux-devel \
libtool \
libuuid-devel \ libuuid-devel \
meson \ meson \
mobile-broadband-provider-info-devel \ mobile-broadband-provider-info-devel \

View file

@ -254,7 +254,6 @@ Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3
%endif %endif
BuildRequires: gcc BuildRequires: gcc
BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: meson BuildRequires: meson
BuildRequires: gettext-devel >= 0.19.8 BuildRequires: gettext-devel >= 0.19.8

View file

@ -915,7 +915,6 @@ endif
test_args = [ test_args = [
'--called-from-make', '--called-from-make',
build_root, build_root,
'',
enable_valgrind ? valgrind_path : '', enable_valgrind ? valgrind_path : '',
enable_valgrind ? valgrind_suppressions_path : '', enable_valgrind ? valgrind_suppressions_path : '',
'--launch-dbus=auto', '--launch-dbus=auto',

View file

@ -339,7 +339,7 @@ main(int argc, char *argv[])
char *path, *slash; char *path, *slash;
int g; int g;
/* exe is <basedir>/src/.libs/lt-NetworkManager, so chop off /* exe is <builddir>/src/core/NetworkManager, so chop off
* the last three components */ * the last three components */
path = realpath("/proc/self/exe", NULL); path = realpath("/proc/self/exe", NULL);
g_assert(path != NULL); g_assert(path != NULL);

View file

@ -10,9 +10,6 @@ test(
'--', '--',
'TestNmcli', 'TestNmcli',
], ],
env: [
'LIBTOOL=',
],
timeout: 120, timeout: 120,
) )
@ -27,9 +24,6 @@ if enable_nm_cloud_setup
'--', '--',
'TestNmCloudSetup', 'TestNmCloudSetup',
], ],
env: [
'LIBTOOL=',
],
timeout: 120, timeout: 120,
) )
endif endif

View file

@ -97,8 +97,6 @@ ENV_NM_TEST_UBSAN_OPTIONS = "NM_TEST_UBSAN_OPTIONS"
# Valgrind is always disabled, if NM_TEST_REGENERATE is enabled. # Valgrind is always disabled, if NM_TEST_REGENERATE is enabled.
ENV_NM_TEST_VALGRIND = "NM_TEST_VALGRIND" ENV_NM_TEST_VALGRIND = "NM_TEST_VALGRIND"
ENV_LIBTOOL = "LIBTOOL"
############################################################################### ###############################################################################
import collections import collections
@ -678,9 +676,6 @@ class Util:
"--log-file=" + valgrind_log[1], "--log-file=" + valgrind_log[1],
cmd, cmd,
] ]
libtool = conf.get(ENV_LIBTOOL)
if libtool:
argv = list(libtool) + ["--mode=execute"] + argv
else: else:
argv = [cmd] argv = [cmd]
@ -784,21 +779,6 @@ class Configuration:
v = "print_stacktrace=1:halt_on_error=1" v = "print_stacktrace=1:halt_on_error=1"
else: else:
assert False assert False
elif name == ENV_LIBTOOL:
v = os.environ.get(name, None)
if v is None:
v = os.path.abspath(
os.path.dirname(self.get("ENV_NM_TEST_CLIENT_NMCLI_UNCHECKED_PATH"))
+ "/../../libtool"
)
if not os.path.isfile(v):
v = None
else:
v = [v]
elif not v:
v = None
else:
v = shlex.split(v)
else: else:
raise Exception() raise Exception()
self._values[name] = v self._values[name] = v

View file

@ -72,12 +72,10 @@ fi
test -d "$BUILDDIR" || die "BUILDDIR \"$BUILDDIR\" does not exist?" test -d "$BUILDDIR" || die "BUILDDIR \"$BUILDDIR\" does not exist?"
test -d "$SRCDIR" || die "SRCDIR \"$SRCDIR\" does not exist?" test -d "$SRCDIR" || die "SRCDIR \"$SRCDIR\" does not exist?"
if test -f "$BUILDDIR/src/libnm-client-impl/.libs/libnm.so" ; then if test -f "$BUILDDIR/src/libnm-client-impl/libnm.so" ; then
LIBDIR="$BUILDDIR/src/libnm-client-impl/.libs"
elif test -f "$BUILDDIR/src/libnm-client-impl/libnm.so" ; then
LIBDIR="$BUILDDIR/src/libnm-client-impl" LIBDIR="$BUILDDIR/src/libnm-client-impl"
else else
die "libnm.so does not exist under expected paths in \"$BUILDDIR/src/libnm-client-impl/{.,.libs}/\"" die "libnm.so does not exist under expected paths in \"$BUILDDIR/src/libnm-client-impl/\""
fi fi
mkdir -p "$BUILDDIR/src/tests/client/" || die "failure to create build output directory \"$BUILDDIR/src/tests/client/\"" mkdir -p "$BUILDDIR/src/tests/client/" || die "failure to create build output directory \"$BUILDDIR/src/tests/client/\""
@ -88,12 +86,6 @@ export GI_TYPELIB_PATH="$BUILDDIR/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_T
export LD_LIBRARY_PATH="$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export NM_TEST_CLIENT_BUILDDIR="$BUILDDIR" export NM_TEST_CLIENT_BUILDDIR="$BUILDDIR"
# Run nmcli at least once. With libtool, nmcli is a shell script and with LTO
# this seems to perform some slow setup during the first run. If we do that
# during the test, it will timeout and fail.
"$NM_TEST_CLIENT_NMCLI_PATH" --version &>/dev/null || :
"$NM_TEST_CLIENT_CLOUD_SETUP_PATH" --invalid &>/dev/null || :
# we first collect all the output in "test-client.log" and print it at once # we first collect all the output in "test-client.log" and print it at once
# afterwards. The only reason is that when you run with `make -j` that the # afterwards. The only reason is that when you run with `make -j` that the
# test output is grouped together. # test output is grouped together.

View file

@ -18,14 +18,8 @@ _sort() {
} }
call_nm() { call_nm() {
if [ -n "$from_meson" ]; then
"${NM:-nm}" -D "$1" | "${NM:-nm}" -D "$1" |
sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p' sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p'
else
libtool=(${LIBTOOL:-libtool})
${libtool[@]} --mode=execute "${NM:-nm}" "$1" |
sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p'
fi
} }
get_symbols_nm () { get_symbols_nm () {
@ -42,9 +36,9 @@ EOF
} }
get_symbols_missing() { get_symbols_missing() {
(for f in $(find ./src/core/settings/plugins/*/${libs} \ (for f in $(find ./src/core/settings/plugins/*/ \
./src/core/devices/*/${libs} \ ./src/core/devices/*/ \
./src/core/ppp/${libs} -name '*.so' 2>/dev/null); do ./src/core/ppp/ -name '*.so' 2>/dev/null); do
call_nm "$f" | call_nm "$f" |
sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|nmtst_\|c_siphash_\|c_list_\).*\)$/\2/p' sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|nmtst_\|c_siphash_\|c_list_\).*\)$/\2/p'
done) | done) |
@ -61,14 +55,6 @@ do_update() {
do_generate > ./src/core/NetworkManager.ver do_generate > ./src/core/NetworkManager.ver
} }
if [ -f "build.ninja" ]; then
from_meson=1
libs=
else
from_meson=
libs=.libs/
fi
SYMBOLS_MISSING="$(get_symbols_missing | pretty)" SYMBOLS_MISSING="$(get_symbols_missing | pretty)"
SYMBOLS_EXPLICIT="$(get_symbols_explicit | pretty)" SYMBOLS_EXPLICIT="$(get_symbols_explicit | pretty)"
@ -86,7 +72,7 @@ local:
EOF EOF
} }
test -f ./src/core/${libs}libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree" test -f ./src/core/libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree"
case "$1" in case "$1" in
--called-from-build) --called-from-build)

View file

@ -227,7 +227,6 @@ RUN dnf install -y \\
libnvme-devel \\ libnvme-devel \\
libpsl-devel \\ libpsl-devel \\
libselinux-devel \\ libselinux-devel \\
libtool \\
libubsan \\ libubsan \\
libuuid-devel \\ libuuid-devel \\
meson \\ meson \\

View file

@ -34,8 +34,6 @@ usage() {
echo " depending on a hard-coded list of tests that require it. This flag overwrites" echo " depending on a hard-coded list of tests that require it. This flag overwrites"
echo " the automatism to always launch a D-Bus session" echo " the automatism to always launch a D-Bus session"
echo " --no-launch-dbus|-D: prevent launching a D-Bus session" echo " --no-launch-dbus|-D: prevent launching a D-Bus session"
echo " --no-libtool: when running with valgrind, the script tries automatically to"
echo " use libtool as necessary. This disables libtool usage"
echo " --valgrind|-v: run under valgrind" echo " --valgrind|-v: run under valgrind"
echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)" echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)"
echo " -d: set NMTST_DEBUG=d" echo " -d: set NMTST_DEBUG=d"
@ -50,7 +48,6 @@ usage() {
echo "" echo ""
echo " The following environment variables are honored:" echo " The following environment variables are honored:"
echo " NMTST_USE_VALGRIND=0|1: enable/disable valgrind" echo " NMTST_USE_VALGRIND=0|1: enable/disable valgrind"
echo " NMTST_LIBTOOL=: libtool path (or disable)"
echo " NMTST_LAUNCH_DBUS=0|1: whether to lounch a D-Bus session" echo " NMTST_LAUNCH_DBUS=0|1: whether to lounch a D-Bus session"
echo " NMTST_SET_DEBUG=0|1: saet NMTST_DEBUG=d" echo " NMTST_SET_DEBUG=0|1: saet NMTST_DEBUG=d"
echo "" echo ""
@ -75,12 +72,6 @@ BUILDDIR=
if [ "$CALLED_FROM_MAKE" == 1 ]; then if [ "$CALLED_FROM_MAKE" == 1 ]; then
BUILDDIR="$1" BUILDDIR="$1"
shift shift
if [ -n "$1" ]; then
NMTST_LIBTOOL=($1 --mode=execute);
else
NMTST_LIBTOOL=()
fi
shift
NMTST_VALGRIND_ARG="$1"; shift NMTST_VALGRIND_ARG="$1"; shift
if [[ "$NMTST_VALGRIND_ARG" == no ]]; then if [[ "$NMTST_VALGRIND_ARG" == no ]]; then
NMTST_VALGRIND_ARG= NMTST_VALGRIND_ARG=
@ -130,14 +121,6 @@ else
# by default, disable valgrind checks. # by default, disable valgrind checks.
NMTST_USE_VALGRIND=0 NMTST_USE_VALGRIND=0
fi fi
if [ -n "$NMTST_LIBTOOL" ] ; then
NMTST_LIBTOOL=("$NMTST_LIBTOOL" "--mode=execute")
elif [ -z "${NMTST_LIBTOOL+x}" -a -f "$SCRIPT_PATH/../libtool" ]; then
NMTST_LIBTOOL=(sh "$SCRIPT_PATH/../libtool" "--mode=execute")
else
NMTST_LIBTOOL=()
fi
TEST_ARGV=() TEST_ARGV=()
unset TEST unset TEST
while test $# -gt 0; do while test $# -gt 0; do
@ -154,10 +137,6 @@ else
NMTST_LAUNCH_DBUS=0 NMTST_LAUNCH_DBUS=0
shift shift
;; ;;
"--no-libtool")
NMTST_LIBTOOL=()
shift
;;
"--valgrind"|-v) "--valgrind"|-v)
NMTST_USE_VALGRIND=1 NMTST_USE_VALGRIND=1
shift; shift;
@ -209,7 +188,6 @@ else
BUILDDIR="$(dirname "$BUILDDIR")" BUILDDIR="$(dirname "$BUILDDIR")"
[[ "$BUILDDIR" == / ]] && BUILDDIR= [[ "$BUILDDIR" == / ]] && BUILDDIR=
[[ -z "$BUILDDIR" ]] && break [[ -z "$BUILDDIR" ]] && break
[[ -e "$BUILDDIR/src/libnm-client-impl/.libs/libnm.so" ]] && break
[[ -e "$BUILDDIR/src/libnm-client-impl/libnm.so" ]] && break [[ -e "$BUILDDIR/src/libnm-client-impl/libnm.so" ]] && break
done done
fi fi
@ -257,12 +235,8 @@ fi
if [[ -n "$BUILDDIR" ]]; then if [[ -n "$BUILDDIR" ]]; then
if [[ -d "$BUILDDIR/src/libnm-client-impl" ]]; then if [[ -d "$BUILDDIR/src/libnm-client-impl" ]]; then
export GI_TYPELIB_PATH="$BUILDDIR/src/libnm-client-impl/${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}" export GI_TYPELIB_PATH="$BUILDDIR/src/libnm-client-impl/${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
if [[ -d "$BUILDDIR/src/libnm-client-impl/.libs" ]]; then
export LD_LIBRARY_PATH="$BUILDDIR/src/libnm-client-impl/.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="$BUILDDIR/src/libnm-client-impl${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$BUILDDIR/src/libnm-client-impl${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
fi fi
fi
fi fi
export ASAN_OPTIONS="$NM_TEST_ASAN_OPTIONS" export ASAN_OPTIONS="$NM_TEST_ASAN_OPTIONS"
@ -304,7 +278,6 @@ export G_SLICE=always-malloc
export G_DEBUG=gc-friendly export G_DEBUG=gc-friendly
export NM_TEST_UNDER_VALGRIND=1 export NM_TEST_UNDER_VALGRIND=1
"${NMTST_DBUS_RUN_SESSION[@]}" \ "${NMTST_DBUS_RUN_SESSION[@]}" \
"${NMTST_LIBTOOL[@]}" \
"$NMTST_VALGRIND" \ "$NMTST_VALGRIND" \
--quiet \ --quiet \
--error-exitcode=$VALGRIND_ERROR \ --error-exitcode=$VALGRIND_ERROR \

View file

@ -3,25 +3,13 @@
CMD="$1" CMD="$1"
shift; shift;
# convert the libtool internal path
resolve_cmd() {
local C="$1"
local C2="$(echo "$C" | sed 's#^\(.*/\)\.libs/lt-\([^/]\+\)$#\1\2#')"
if [[ "$C2" != "$C" && ! -x "$C2" ]]; then
# such a file does not exist... back to $C
C2="$C"
fi
echo "$C2"
}
if [[ $UID == 0 ]]; then if [[ $UID == 0 ]]; then
# we are already root. Execute directly. # we are already root. Execute directly.
exec "$(resolve_cmd "$CMD")" "$@" exec "$CMD" "$@"
elif [[ "$NMTST_SUDO_NO_CALL_SELF" != "" ]]; then elif [[ "$NMTST_SUDO_NO_CALL_SELF" != "" ]]; then
# when setting $NMTST_SUDO_NO_CALL_SELF, pass the (resolved) command # when setting $NMTST_SUDO_NO_CALL_SELF, pass the (resolved) command
# directly to sudo. # directly to sudo.
exec sudo "$(resolve_cmd "$CMD")" "$@" exec sudo "$CMD" "$@"
else else
# by default, call self again with sudo. # by default, call self again with sudo.
exec sudo -E "$0" "$CMD" "$@" exec sudo -E "$0" "$CMD" "$@"

View file

@ -107,23 +107,6 @@
fun:_dl_init fun:_dl_init
obj:/*/ld-*.so obj:/*/ld-*.so
} }
{
# added on Fedora 22
# This happens when setting LD_LIBRARY_PATH and the linker is searching the libraries to load.
# for example:
# LD_LIBRARY_PATH=./././././././././././././././././libnm/.libs:./libnm-util/.libs:./libnm-glib/.libs
_dl_expand_dynamic_string_token
Memcheck:Cond
fun:index
fun:expand_dynamic_string_token
...
fun:dl_main
fun:_dl_sysdep_start
fun:_dl_start_final
fun:_dl_start
obj:/*/ld-*.so
...
}
{ {
all_gobject_init_ctor all_gobject_init_ctor
Memcheck:Leak Memcheck:Leak