[NetworkManager-openvpn/lr/no-libnm-glib: 1/5] all: drop libnm-glib version




commit 57af29e8d3c1e805415b4045e09e7de40a68bf70
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Jun 27 16:15:03 2022 +0200

    all: drop libnm-glib version
    
    libnm is there since 2014 and libnm-glib has been removed in 2019.
    Drop support for libnm-glib.

 .gitlab-ci.yml                          |  6 ---
 Makefile.am                             | 78 -------------------------------
 configure.ac                            | 27 -----------
 properties/import-export.c              | 50 +++-----------------
 properties/libnm-openvpn-properties.ver |  6 ---
 properties/nm-openvpn-editor-plugin.c   | 10 ----
 properties/nm-openvpn-editor.c          |  4 --
 properties/tests/test-import-export.c   | 82 +++++++++------------------------
 shared/nm-default.h                     | 40 ----------------
 shared/nm-utils/nm-test-utils.h         |  8 ----
 10 files changed, 28 insertions(+), 283 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65112ab..b664d0e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,7 +55,6 @@ fedora_dist:
     paths:
       - "*.xz"
 
-# This one has libnm-glib
 fedora28_from_dist:
   <<: *dist
   <<: *fedora_deps
@@ -65,13 +64,8 @@ fedora28_from_dist:
     # Sometimes the CI builder clocks are skewed.
     # Make sure the dst files are not from future.
     - find |xargs touch
-    - dnf -y install
-      NetworkManager-devel
-      NetworkManager-glib-devel
-      libnm-gtk-devel
     - ./configure
       --disable-silent-rules
-      --with-libnm-glib
     - make -j
     - make -j check
     - make -j install
diff --git a/Makefile.am b/Makefile.am
index 72bb8f3..12ddb7e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -241,48 +241,9 @@ properties_libnm_gtk4_vpn_plugin_openvpn_editor_la_LDFLAGS = \
 
 ###############################################################################
 
-if WITH_LIBNM_GLIB
-noinst_LTLIBRARIES += properties/libnm-openvpn-properties-core.la
-endif
-
-properties_libnm_openvpn_properties_core_la_SOURCES = \
-       $(shared_sources) \
-       $(plugin_sources) \
-       $(editor_sources)
-
-nodist_properties_libnm_openvpn_properties_core_la_SOURCES = \
-       properties/resources.c \
-       properties/resources.h
-
-properties_libnm_openvpn_properties_core_la_CPPFLAGS = \
-       
-DNETWORKMANAGER_COMPILATION='NM_NETWORKMANAGER_COMPILATION_LIB|NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL'
 \
-       $(properties_cppflags) \
-       $(GTK_CFLAGS) \
-       $(LIBNM_GLIB_CFLAGS) \
-       $(LIBNM_GTK_CFLAGS)
-
-properties_libnm_openvpn_properties_core_la_LIBADD = \
-       $(GLIB_LIBS) \
-       $(GTK_LIBS) \
-       $(LIBNM_GLIB_LIBS) \
-       $(LIBNM_GTK_LIBS)
-
-
-if WITH_LIBNM_GLIB
-plugin_LTLIBRARIES += properties/libnm-openvpn-properties.la
-endif
-
-properties_libnm_openvpn_properties_la_SOURCES =
-properties_libnm_openvpn_properties_la_LIBADD = \
-       properties/libnm-openvpn-properties-core.la
-properties_libnm_openvpn_properties_la_LDFLAGS = \
-       -avoid-version \
-       -Wl,--version-script=$(srcdir)/properties/libnm-openvpn-properties.ver
-
 EXTRA_DIST += \
        properties/libnm-vpn-plugin-openvpn.ver \
        properties/libnm-vpn-plugin-openvpn-editor.ver \
-       properties/libnm-openvpn-properties.ver \
        properties/nm-openvpn-dialog.ui
 
 ###############################################################################
@@ -295,7 +256,6 @@ properties_tests_cppflags = \
        -I$(srcdir)/properties \
        $(GLIB_CFLAGS)
 
-
 check_programs += properties/tests/test-import-export
 
 properties_tests_test_import_export_SOURCES = \
@@ -313,29 +273,6 @@ properties_tests_test_import_export_LDADD = \
        $(LIBNM_LIBS) \
        $(LIBNMA_LIBS)
 
-
-if WITH_LIBNM_GLIB
-check_programs += properties/tests/test-import-export-glib
-endif
-
-properties_tests_test_import_export_glib_SOURCES = \
-       properties/tests/test-import-export.c
-
-properties_tests_test_import_export_glib_CPPFLAGS = \
-       
-DNETWORKMANAGER_COMPILATION='NM_NETWORKMANAGER_COMPILATION_DEFAULT|NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL'
 \
-       $(properties_tests_cppflags) \
-       $(GTK_CFLAGS) \
-       $(LIBNM_GLIB_CFLAGS) \
-       $(LIBNM_GTK_CFLAGS)
-
-properties_tests_test_import_export_glib_LDADD = \
-       properties/libnm-openvpn-properties-core.la \
-       $(GLIB_LIBS) \
-       $(GTK_LIBS) \
-       $(LIBNM_GLIB_LIBS) \
-       $(LIBNM_GTK_LIBS)
-
-
 EXTRA_DIST += \
        properties/tests/conf/compress.ovpn \
        properties/tests/conf/iso885915.ovpn \
@@ -417,21 +354,6 @@ EXTRA_auth_dialog_nm_openvpn_auth_dialog_DEPENDENCIES = \
 
 ###############################################################################
 
-if WITH_LIBNM_GLIB
-# Install a file with full path to plugins for an old gnome-shell
-# https://bugzilla.gnome.org/show_bug.cgi?id=693590
-install-data-hook:
-       mkdir -p $(DESTDIR)$(sysconfdir)/NetworkManager/VPN
-       sed -e "1s|^|# This file is obsoleted by a file in $(NM_VPN_SERVICE_DIR)\n\n|" \
-           -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
-           -e 's|[@]PLUGINDIR[@]|@NM_PLUGIN_DIR@|g' \
-           <$(srcdir)/nm-openvpn-service.name.in \
-           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openvpn-service.name
-
-uninstall-hook:
-        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-openvpn-service.name
-endif
-
 appdatadir = $(datadir)/metainfo
 appdata_files = $(appdata_in_files:.xml.in=.xml)
 if WITH_GNOME
diff --git a/configure.ac b/configure.ac
index c15d3ca..91a0dd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,12 +76,6 @@ dnl GNOME support
 dnl
 AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-openvpn without GNOME support, 
e.g. vpn service only]), [], [with_gnome_specified=no])
 AC_ARG_WITH(gtk4, AS_HELP_STRING([--with-gtk4], [Build NetworkManager-openvpn with libnma-gtk4 support]), 
[], [with_gtk4_specified=no])
-AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--with-libnm-glib], [Build NetworkManager-openvpn with libnm-glib 
compatibility (deprecated)]), [], [with_libnm_glib_specified=no])
-if test "$with_libnm_glib_specified" != no -a "$with_libnm_glib" != no; then
-       if test "$with_gnome_specified" != no -a "$with_gnome" == no; then
-               AC_MSG_ERROR(Building --with-libnm-glib conflicts with --without-gnome)
-       fi
-fi
 if test "$with_gnome" != no; then
        with_gnome=yes
 fi
@@ -91,15 +85,8 @@ fi
 if test "$with_gtk4" != yes; then
        with_gtk4=no
 fi
-if test "$with_libnm_glib_specified" == no; then
-       with_libnm_glib=no
-fi
-if test "$with_libnm_glib" != yes; then
-       with_libnm_glib=no
-fi
 AM_CONDITIONAL(WITH_GNOME, test "$with_gnome" != no)
 AM_CONDITIONAL(WITH_GTK4, test "$with_gtk4" != no)
-AM_CONDITIONAL(WITH_LIBNM_GLIB, test "$with_libnm_glib" != no)
 
 AC_ARG_ENABLE(absolute-paths, AS_HELP_STRING([--enable-absolute-paths], [Use absolute paths to in .name 
files. Useful for development. (default is no)]))
 
@@ -122,20 +109,7 @@ if test x"$with_gnome" != xno; then
        PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
        GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4"
        GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4"
-
        PKG_CHECK_MODULES(LIBNMA, libnma >= 1.7.0)
-
-       if test x"$with_libnm_glib" != xno; then
-               PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.7.0)
-               PKG_CHECK_MODULES(LIBNM_GLIB,
-                       NetworkManager >= 1.7.0
-                       libnm-util >= 1.7.0
-                       libnm-glib >= 1.7.0
-                       libnm-glib-vpn >= 1.7.0);
-
-               LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
-               LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
-       fi
 fi
 
 if test x"$with_gtk4" != xno; then
@@ -185,7 +159,6 @@ echo "Build configuration: "
 echo "  --with-dist-version=$ac_distver"
 echo "  --with-gnome=$with_gnome"
 echo "  --with-gtk4=$with_gtk4"
-echo "  --with-libnm-glib=$with_libnm_glib"
 echo "  --enable-absolute-paths=$enable_absolute_paths"
 echo "  --enable-more-warnings=$set_more_warnings"
 echo "  --enable-lto=$enable_lto"
diff --git a/properties/import-export.c b/properties/import-export.c
index 51049de..7c51a20 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -1455,6 +1455,7 @@ do_import (const char *path, const char *contents, gsize contents_len, GError **
                        in_addr_t gateway = 0;
                        guint32 prefix = 32;
                        gint64 metric = -1;
+                       NMIPRoute *route;
 
                        if (!args_params_check_nargs_minmax (params, 1, 4, &line_error))
                                goto handle_line_error;
@@ -1490,26 +1491,9 @@ do_import (const char *path, const char *contents, gsize contents_len, GError **
                                continue;
                        }
 
-                       {
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-                               NMIP4Route *route;
-
-                               route = nm_ip4_route_new ();
-                               nm_ip4_route_set_dest (route, network);
-                               nm_ip4_route_set_prefix (route, prefix);
-                               nm_ip4_route_set_next_hop (route, gateway);
-                               if (metric >= 0)
-                                       nm_ip4_route_set_metric (route, metric);
-                               nm_setting_ip4_config_add_route (s_ip4, route);
-                               nm_ip4_route_unref (route);
-#else
-                               NMIPRoute *route;
-
-                               route = nm_ip_route_new_binary (AF_INET, &network, prefix, params[3] ? 
&gateway : NULL, metric, NULL);
-                               nm_setting_ip_config_add_route (s_ip4, route);
-                               nm_ip_route_unref (route);
-#endif
-                       }
+                       route = nm_ip_route_new_binary (AF_INET, &network, prefix, params[3] ? &gateway : 
NULL, metric, NULL);
+                       nm_setting_ip_config_add_route (s_ip4, route);
+                       nm_ip_route_unref (route);
                }
 
                if (params[0][0] == '<' && params[0][strlen (params[0]) - 1] == '>') {
@@ -2302,11 +2286,7 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
 
        s_ip4 = nm_connection_get_setting_ip4_config (connection);
        if (s_ip4) {
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-               num = nm_setting_ip4_config_get_num_routes (s_ip4);
-#else
                num = nm_setting_ip_config_get_num_routes (s_ip4);
-#endif
                for (i = 0; i < num; i++) {
                        char netmask_str[INET_ADDRSTRLEN] = { 0 };
                        const char *next_hop_str, *dest_str;
@@ -2314,31 +2294,13 @@ do_export_create (NMConnection *connection, const char *path, GError **error)
                        guint prefix;
                        guint64 metric;
                        char metric_buf[50];
+                       NMIPRoute *route;
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-                       char next_hop_str_buf[INET_ADDRSTRLEN] = { 0 };
-                       char dest_str_buf[INET_ADDRSTRLEN] = { 0 };
-                       in_addr_t dest, next_hop;
-                       NMIP4Route *route = nm_setting_ip4_config_get_route (s_ip4, i);
-
-                       dest = nm_ip4_route_get_dest (route);
-                       inet_ntop (AF_INET, (const void *) &dest, dest_str_buf, sizeof (dest_str_buf));
-                       dest_str = dest_str_buf;
-
-                       next_hop = nm_ip4_route_get_next_hop (route);
-                       inet_ntop (AF_INET, (const void *) &next_hop, next_hop_str_buf, sizeof 
(next_hop_str_buf));
-                       next_hop_str = next_hop_str_buf;
-
-                       prefix = nm_ip4_route_get_prefix (route);
-                       metric = nm_ip4_route_get_metric (route);
-#else
-                       NMIPRoute *route = nm_setting_ip_config_get_route (s_ip4, i);
-
+                       route = nm_setting_ip_config_get_route (s_ip4, i);
                        dest_str = nm_ip_route_get_dest (route);
                        next_hop_str = nm_ip_route_get_next_hop (route) ? : "0.0.0.0",
                        prefix = nm_ip_route_get_prefix (route);
                        metric = nm_ip_route_get_metric (route);
-#endif
                        netmask = nm_utils_ip4_prefix_to_netmask (prefix);
                        inet_ntop (AF_INET, (const void *) &netmask, netmask_str, sizeof (netmask_str));
 
diff --git a/properties/nm-openvpn-editor-plugin.c b/properties/nm-openvpn-editor-plugin.c
index 1d627e9..14bd32f 100644
--- a/properties/nm-openvpn-editor-plugin.c
+++ b/properties/nm-openvpn-editor-plugin.c
@@ -31,11 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-#include "nm-openvpn-editor.h"
-#else
 #include "nm-utils/nm-vpn-plugin-utils.h"
-#endif
 
 #include "import-export.h"
 
@@ -109,7 +105,6 @@ get_capabilities (NMVpnEditorPlugin *iface)
                NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6);
 }
 
-#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
 static NMVpnEditor *
 _call_editor_factory (gpointer factory,
                       NMVpnEditorPlugin *editor_plugin,
@@ -121,7 +116,6 @@ _call_editor_factory (gpointer factory,
                                               connection,
                                               error);
 }
-#endif
 
 static NMVpnEditor *
 get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
@@ -144,9 +138,6 @@ get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
                editor = "libnm-gtk4-vpn-plugin-openvpn-editor.so";
        }
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-       return openvpn_editor_new (connection, error);
-#else
        return nm_vpn_plugin_utils_load_editor (editor,
                                                "nm_vpn_editor_factory_openvpn",
                                                _call_editor_factory,
@@ -154,7 +145,6 @@ get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
                                                connection,
                                                NULL,
                                                error);
-#endif
 }
 
 /*****************************************************************************/
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index 4c3b7a0..274b823 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -2930,8 +2930,6 @@ openvpn_editor_plugin_widget_class_init (OpenvpnEditorClass *req_class)
 
 /*****************************************************************************/
 
-#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-
 #include "nm-openvpn-editor-plugin.h"
 
 G_MODULE_EXPORT NMVpnEditor *
@@ -2942,5 +2940,3 @@ nm_vpn_editor_factory_openvpn (NMVpnEditorPlugin *editor_plugin,
        g_type_ensure (NMA_TYPE_CERT_CHOOSER);
        return openvpn_editor_new (connection, error);
 }
-#endif
-
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index cefb2b1..9db42d0 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -35,12 +35,7 @@
 #include "nm-utils/nm-test-utils.h"
 
 #define SRCDIR TEST_SRCDIR"/conf"
-
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-#define TMPDIR TEST_BUILDDIR"/conf-tmp-old"
-#else
-#define TMPDIR TEST_BUILDDIR"/conf-tmp-new"
-#endif
+#define TMPDIR TEST_BUILDDIR"/conf-tmp"
 
 /*****************************************************************************/
 
@@ -994,6 +989,7 @@ test_route_import (void)
        gs_unref_object NMConnection *connection = NULL;
        NMSettingIPConfig *s_ip4;
        NMSettingVpn *s_vpn;
+       NMIPRoute *route;
        int num_routes;
        const char *expected_dest1 = "1.2.3.0";
        guint32 expected_prefix1   = 24;
@@ -1015,60 +1011,26 @@ test_route_import (void)
 
        s_ip4 = _get_setting_ip4_config (connection);
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-       {
-               NMIP4Route *route;
-               const char *expected_nh2   = "0.0.0.0";
-
-#define METR(metr) ((metr) == -1 ? 0 : ((guint32) (metr)))
-
-               num_routes = nm_setting_ip4_config_get_num_routes (s_ip4);
-               g_assert_cmpint (num_routes, ==, 3);
-
-               route = nm_setting_ip4_config_get_route (s_ip4, 0);
-               g_assert_cmpint (nm_ip4_route_get_dest (route), ==, nmtst_inet4_from_string (expected_dest1));
-               g_assert_cmpint (nm_ip4_route_get_prefix (route), ==, expected_prefix1);
-               g_assert_cmpint (nm_ip4_route_get_next_hop (route), ==, nmtst_inet4_from_string 
(expected_nh1));
-               g_assert_cmpint (nm_ip4_route_get_metric (route), ==, METR (expected_metric1));
-
-               route = nm_setting_ip4_config_get_route (s_ip4, 1);
-               g_assert_cmpint (nm_ip4_route_get_dest (route), ==, nmtst_inet4_from_string (expected_dest2));
-               g_assert_cmpint (nm_ip4_route_get_prefix (route), ==, expected_prefix2);
-               g_assert_cmpint (nm_ip4_route_get_next_hop (route), ==, nmtst_inet4_from_string 
(expected_nh2));
-               g_assert_cmpint (nm_ip4_route_get_metric (route), ==, METR (expected_metric2));
-
-               route = nm_setting_ip4_config_get_route (s_ip4, 2);
-               g_assert_cmpint (nm_ip4_route_get_dest (route), ==, nmtst_inet4_from_string (expected_dest3));
-               g_assert_cmpint (nm_ip4_route_get_prefix (route), ==, expected_prefix3);
-               g_assert_cmpint (nm_ip4_route_get_next_hop (route), ==, nmtst_inet4_from_string 
(expected_nh3));
-               g_assert_cmpint (nm_ip4_route_get_metric (route), ==, METR (expected_metric3));
-       }
-#else
-       {
-               NMIPRoute *route;
-
-               num_routes = nm_setting_ip_config_get_num_routes (s_ip4);
-               g_assert_cmpint (num_routes, ==, 3);
-
-               route = nm_setting_ip_config_get_route (s_ip4, 0);
-               g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest1);
-               g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix1);
-               g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, expected_nh1);
-               g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric1);
-
-               route = nm_setting_ip_config_get_route (s_ip4, 1);
-               g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest2);
-               g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix2);
-               g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, NULL);
-               g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric2);
-
-               route = nm_setting_ip_config_get_route (s_ip4, 2);
-               g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest3);
-               g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix3);
-               g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, expected_nh3);
-               g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric3);
-       }
-#endif
+       num_routes = nm_setting_ip_config_get_num_routes (s_ip4);
+       g_assert_cmpint (num_routes, ==, 3);
+
+       route = nm_setting_ip_config_get_route (s_ip4, 0);
+       g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest1);
+       g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix1);
+       g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, expected_nh1);
+       g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric1);
+
+       route = nm_setting_ip_config_get_route (s_ip4, 1);
+       g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest2);
+       g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix2);
+       g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, NULL);
+       g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric2);
+
+       route = nm_setting_ip_config_get_route (s_ip4, 2);
+       g_assert_cmpstr (nm_ip_route_get_dest (route), ==, expected_dest3);
+       g_assert_cmpint (nm_ip_route_get_prefix (route), ==, expected_prefix3);
+       g_assert_cmpstr (nm_ip_route_get_next_hop (route), ==, expected_nh3);
+       g_assert_cmpint (nm_ip_route_get_metric (route), ==, expected_metric3);
 }
 
 static void
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 663b4fd..28941f9 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -29,10 +29,6 @@
 #define NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR          0x0004
 #define NM_NETWORKMANAGER_COMPILATION_LIB                 (0x0002 | 0x0004)
 
-/* special flag, to indicate that we build a legacy library. That is, we link against
- * deprecated libnm-util/libnm-glib instead against libnm. */
-#define NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL     0x0010
-
 /*****************************************************************************/
 
 #include <config.h>
@@ -58,35 +54,6 @@
 
 /*****************************************************************************/
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-
-#define NM_VPN_LIBNM_COMPAT
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-8021x.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-vpn.h>
-#include <nm-utils.h>
-#include <nm-vpn-plugin-ui-interface.h>
-
-#define nm_simple_connection_new nm_connection_new
-#define NM_SETTING_IP_CONFIG NM_SETTING_IP4_CONFIG
-#define NM_SETTING_IP_CONFIG_METHOD NM_SETTING_IP4_CONFIG_METHOD
-#define NM_SETTING_IP_CONFIG_NEVER_DEFAULT NM_SETTING_IP4_CONFIG_NEVER_DEFAULT
-#define NMSettingIPConfig NMSettingIP4Config
-
-#define NMV_EDITOR_PLUGIN_ERROR                     NM_SETTING_VPN_ERROR
-#define NMV_EDITOR_PLUGIN_ERROR_FAILED              NM_SETTING_VPN_ERROR_UNKNOWN
-#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY    NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-#define NMV_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY    NM_SETTING_VPN_ERROR_MISSING_PROPERTY
-#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_VPN        NM_SETTING_VPN_ERROR_UNKNOWN
-#define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_SETTING_VPN_ERROR_UNKNOWN
-#define NMV_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_SETTING_VPN_ERROR_UNKNOWN
-
-#define _nm_utils_is_valid_iface_name(n)            nm_utils_iface_valid_name(n)
-
-#else /* NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL */
-
 #include <NetworkManager.h>
 
 #define NMV_EDITOR_PLUGIN_ERROR                     NM_CONNECTION_ERROR
@@ -99,19 +66,12 @@
 
 #define _nm_utils_is_valid_iface_name(n)            nm_utils_is_valid_iface_name(n, NULL)
 
-#endif /* NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL */
-
 /*****************************************************************************/
 
 #if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR
 
-#if ((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL)
-#include <nm-ui-utils.h>
-#include <nm-cert-chooser.h>
-#else
 #include <nma-ui-utils.h>
 #include <nma-cert-chooser.h>
-#endif
 
 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR */
 
diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
index 0218b23..6072da2 100644
--- a/shared/nm-utils/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -684,17 +684,9 @@ nmtst_test_quick (void)
 
 #define NMTST_EXPECT(domain, level, msg)        g_test_expect_message (domain, level, msg)
 
-#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_UTIL
-#define NMTST_EXPECT_LIBNM_U(level, msg)        NMTST_EXPECT ("libnm-util", level, msg)
-#define NMTST_EXPECT_LIBNM_G(level, msg)        NMTST_EXPECT ("libnm-glib", level, msg)
-
-#define NMTST_EXPECT_LIBNM_U_CRITICAL(msg)      NMTST_EXPECT_LIBNM_U (G_LOG_LEVEL_CRITICAL, msg)
-#define NMTST_EXPECT_LIBNM_G_CRITICAL(msg)      NMTST_EXPECT_LIBNM_G (G_LOG_LEVEL_CRITICAL, msg)
-#else
 #define NMTST_EXPECT_LIBNM(level, msg)          NMTST_EXPECT ("libnm", level, msg)
 
 #define NMTST_EXPECT_LIBNM_CRITICAL(msg)        NMTST_EXPECT_LIBNM (G_LOG_LEVEL_CRITICAL, msg)
-#endif
 
 /*****************************************************************************/
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]