diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a90f3e8b39..a74bd96246 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,11 +60,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: 'tag-da1ae96102c6' - CENTOS_TAG: 'tag-c8df7d2b249f' - DEBIAN_TAG: 'tag-e68f538711ec' - FEDORA_TAG: 'tag-c8df7d2b249f' - UBUNTU_TAG: 'tag-e68f538711ec' + ALPINE_TAG: 'tag-e577866dbb86' + CENTOS_TAG: 'tag-1c40a0cf2c4c' + DEBIAN_TAG: 'tag-0a55ae70d83b' + FEDORA_TAG: 'tag-1c40a0cf2c4c' + UBUNTU_TAG: 'tag-0a55ae70d83b' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' diff --git a/contrib/alpine/REQUIRED_PACKAGES b/contrib/alpine/REQUIRED_PACKAGES index 6f0e86fddd..fa9332ba36 100755 --- a/contrib/alpine/REQUIRED_PACKAGES +++ b/contrib/alpine/REQUIRED_PACKAGES @@ -29,7 +29,6 @@ apk add \ 'libpsl-dev' \ 'libsoup-dev' \ 'libteam-dev' \ - 'libtool' \ 'linux-headers' \ 'meson' \ 'mobile-broadband-provider-info' \ diff --git a/contrib/debian/REQUIRED_PACKAGES b/contrib/debian/REQUIRED_PACKAGES index d91e54d274..68f62570cc 100755 --- a/contrib/debian/REQUIRED_PACKAGES +++ b/contrib/debian/REQUIRED_PACKAGES @@ -62,7 +62,6 @@ install \ libreadline-dev \ libsystemd-dev \ libteam-dev \ - libtool \ libudev-dev \ locales \ meson \ diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index 38a2cbbf43..6f70537d40 100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -68,7 +68,6 @@ install \ libndp-devel \ libnvme-devel \ libselinux-devel \ - libtool \ libuuid-devel \ meson \ mobile-broadband-provider-info-devel \ diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index a5b521525d..a4f28f3668 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -254,7 +254,6 @@ Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3 %endif BuildRequires: gcc -BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: meson BuildRequires: gettext-devel >= 0.19.8 diff --git a/meson.build b/meson.build index 89834dd750..0e3852a926 100644 --- a/meson.build +++ b/meson.build @@ -915,7 +915,6 @@ endif test_args = [ '--called-from-make', build_root, - '', enable_valgrind ? valgrind_path : '', enable_valgrind ? valgrind_suppressions_path : '', '--launch-dbus=auto', diff --git a/src/core/main.c b/src/core/main.c index 4c7de6cd37..8d519c00f0 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -339,7 +339,7 @@ main(int argc, char *argv[]) char *path, *slash; int g; - /* exe is /src/.libs/lt-NetworkManager, so chop off + /* exe is /src/core/NetworkManager, so chop off * the last three components */ path = realpath("/proc/self/exe", NULL); g_assert(path != NULL); diff --git a/src/tests/client/meson.build b/src/tests/client/meson.build index 5686a1c174..570a4a2647 100644 --- a/src/tests/client/meson.build +++ b/src/tests/client/meson.build @@ -10,9 +10,6 @@ test( '--', 'TestNmcli', ], - env: [ - 'LIBTOOL=', - ], timeout: 120, ) @@ -27,9 +24,6 @@ if enable_nm_cloud_setup '--', 'TestNmCloudSetup', ], - env: [ - 'LIBTOOL=', - ], timeout: 120, ) endif diff --git a/src/tests/client/test-client.py b/src/tests/client/test-client.py index cc76d37b5e..9598aa0751 100755 --- a/src/tests/client/test-client.py +++ b/src/tests/client/test-client.py @@ -97,8 +97,6 @@ ENV_NM_TEST_UBSAN_OPTIONS = "NM_TEST_UBSAN_OPTIONS" # Valgrind is always disabled, if NM_TEST_REGENERATE is enabled. ENV_NM_TEST_VALGRIND = "NM_TEST_VALGRIND" -ENV_LIBTOOL = "LIBTOOL" - ############################################################################### import collections @@ -678,9 +676,6 @@ class Util: "--log-file=" + valgrind_log[1], cmd, ] - libtool = conf.get(ENV_LIBTOOL) - if libtool: - argv = list(libtool) + ["--mode=execute"] + argv else: argv = [cmd] @@ -784,21 +779,6 @@ class Configuration: v = "print_stacktrace=1:halt_on_error=1" else: 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: raise Exception() self._values[name] = v diff --git a/src/tests/client/test-client.sh b/src/tests/client/test-client.sh index dd08e4d889..ac07dd20a7 100755 --- a/src/tests/client/test-client.sh +++ b/src/tests/client/test-client.sh @@ -72,12 +72,10 @@ fi test -d "$BUILDDIR" || die "BUILDDIR \"$BUILDDIR\" does not exist?" test -d "$SRCDIR" || die "SRCDIR \"$SRCDIR\" does not exist?" -if test -f "$BUILDDIR/src/libnm-client-impl/.libs/libnm.so" ; then - LIBDIR="$BUILDDIR/src/libnm-client-impl/.libs" -elif test -f "$BUILDDIR/src/libnm-client-impl/libnm.so" ; then +if test -f "$BUILDDIR/src/libnm-client-impl/libnm.so" ; then LIBDIR="$BUILDDIR/src/libnm-client-impl" 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 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 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 # afterwards. The only reason is that when you run with `make -j` that the # test output is grouped together. diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh index 08b422a896..e6fc01b9fa 100755 --- a/tools/create-exports-NetworkManager.sh +++ b/tools/create-exports-NetworkManager.sh @@ -18,14 +18,8 @@ _sort() { } call_nm() { - if [ -n "$from_meson" ]; then - "${NM:-nm}" -D "$1" | - sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p' - else - libtool=(${LIBTOOL:-libtool}) - ${libtool[@]} --mode=execute "${NM:-nm}" "$1" | - sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p' - fi + "${NM:-nm}" -D "$1" | + sed -n 's/.* \([^ ]\) \([^ ]*\)$/\1 \2/p' } get_symbols_nm () { @@ -42,9 +36,9 @@ EOF } get_symbols_missing() { - (for f in $(find ./src/core/settings/plugins/*/${libs} \ - ./src/core/devices/*/${libs} \ - ./src/core/ppp/${libs} -name '*.so' 2>/dev/null); do + (for f in $(find ./src/core/settings/plugins/*/ \ + ./src/core/devices/*/ \ + ./src/core/ppp/ -name '*.so' 2>/dev/null); do call_nm "$f" | sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|nmtst_\|c_siphash_\|c_list_\).*\)$/\2/p' done) | @@ -61,14 +55,6 @@ do_update() { 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_EXPLICIT="$(get_symbols_explicit | pretty)" @@ -86,7 +72,7 @@ local: 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 --called-from-build) diff --git a/tools/nm-in-container b/tools/nm-in-container index 5fe122d7af..e4ee8b9431 100755 --- a/tools/nm-in-container +++ b/tools/nm-in-container @@ -227,7 +227,6 @@ RUN dnf install -y \\ libnvme-devel \\ libpsl-devel \\ libselinux-devel \\ - libtool \\ libubsan \\ libuuid-devel \\ meson \\ diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh index 9f0a65319a..fe61f14ba0 100755 --- a/tools/run-nm-test.sh +++ b/tools/run-nm-test.sh @@ -34,8 +34,6 @@ usage() { 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 " --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 " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)" echo " -d: set NMTST_DEBUG=d" @@ -50,7 +48,6 @@ usage() { echo "" echo " The following environment variables are honored:" 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_SET_DEBUG=0|1: saet NMTST_DEBUG=d" echo "" @@ -75,12 +72,6 @@ BUILDDIR= if [ "$CALLED_FROM_MAKE" == 1 ]; then BUILDDIR="$1" shift - if [ -n "$1" ]; then - NMTST_LIBTOOL=($1 --mode=execute); - else - NMTST_LIBTOOL=() - fi - shift NMTST_VALGRIND_ARG="$1"; shift if [[ "$NMTST_VALGRIND_ARG" == no ]]; then NMTST_VALGRIND_ARG= @@ -130,14 +121,6 @@ else # by default, disable valgrind checks. NMTST_USE_VALGRIND=0 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=() unset TEST while test $# -gt 0; do @@ -154,10 +137,6 @@ else NMTST_LAUNCH_DBUS=0 shift ;; - "--no-libtool") - NMTST_LIBTOOL=() - shift - ;; "--valgrind"|-v) NMTST_USE_VALGRIND=1 shift; @@ -209,7 +188,6 @@ else BUILDDIR="$(dirname "$BUILDDIR")" [[ "$BUILDDIR" == / ]] && BUILDDIR= [[ -z "$BUILDDIR" ]] && break - [[ -e "$BUILDDIR/src/libnm-client-impl/.libs/libnm.so" ]] && break [[ -e "$BUILDDIR/src/libnm-client-impl/libnm.so" ]] && break done fi @@ -257,11 +235,7 @@ fi if [[ -n "$BUILDDIR" ]]; then if [[ -d "$BUILDDIR/src/libnm-client-impl" ]]; then 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}" - fi + export LD_LIBRARY_PATH="$BUILDDIR/src/libnm-client-impl${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" fi fi @@ -304,7 +278,6 @@ export G_SLICE=always-malloc export G_DEBUG=gc-friendly export NM_TEST_UNDER_VALGRIND=1 "${NMTST_DBUS_RUN_SESSION[@]}" \ -"${NMTST_LIBTOOL[@]}" \ "$NMTST_VALGRIND" \ --quiet \ --error-exitcode=$VALGRIND_ERROR \ diff --git a/tools/test-sudo-wrapper.sh b/tools/test-sudo-wrapper.sh index b375368e53..a9019bc320 100755 --- a/tools/test-sudo-wrapper.sh +++ b/tools/test-sudo-wrapper.sh @@ -3,25 +3,13 @@ CMD="$1" 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 # we are already root. Execute directly. - exec "$(resolve_cmd "$CMD")" "$@" + exec "$CMD" "$@" elif [[ "$NMTST_SUDO_NO_CALL_SELF" != "" ]]; then # when setting $NMTST_SUDO_NO_CALL_SELF, pass the (resolved) command # directly to sudo. - exec sudo "$(resolve_cmd "$CMD")" "$@" + exec sudo "$CMD" "$@" else # by default, call self again with sudo. exec sudo -E "$0" "$CMD" "$@" diff --git a/valgrind.suppressions b/valgrind.suppressions index 5725ee22f1..9ed3c413b0 100644 --- a/valgrind.suppressions +++ b/valgrind.suppressions @@ -107,23 +107,6 @@ fun:_dl_init 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 Memcheck:Leak