[NetworkManager-fortisslvpn/lr/no-libnm-glib: 4/5] all: drop libnm-glib version




commit 78153764464f8214a374cb7ffa9bcb90f78d7a91
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                              |  4 --
 Makefile.am                                 | 60 +----------------------------
 configure.ac                                | 26 -------------
 properties/libnm-fortisslvpn-properties.ver |  6 ---
 properties/nm-fortisslvpn-editor-plugin.c   | 10 -----
 properties/nm-fortisslvpn-editor.c          |  3 --
 shared/nm-default.h                         | 44 ---------------------
 7 files changed, 1 insertion(+), 152 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f4fea58..38f81b6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,6 @@
     - cd NetworkManager-fortisslvpn-*/
     - ./configure
       --disable-silent-rules
-      --without-libnm-glib
     - make -j
     - make -j check
     - make -j install
@@ -53,9 +52,6 @@ fedora28_dist:
     - dnf -y install
       /usr/bin/autopoint
       autoconf automake make
-      NetworkManager-devel
-      NetworkManager-glib-devel
-      libnm-gtk-devel
     - sh autogen.sh
     - make -j dist
   artifacts:
diff --git a/Makefile.am b/Makefile.am
index b2e5533..c1aff77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -295,49 +295,9 @@ properties_libnm_gtk4_vpn_plugin_fortisslvpn_editor_la_LDFLAGS = \
 
 ###############################################################################
 
-if WITH_LIBNM_GLIB
-noinst_LTLIBRARIES += properties/libnm-fortisslvpn-properties-core.la
-endif
-
-nodist_properties_libnm_fortisslvpn_properties_core_la_SOURCES = \
-       properties/resources.h \
-       properties/resources.c
-
-properties_libnm_fortisslvpn_properties_core_la_SOURCES = \
-       $(shared_sources) \
-       $(plugin_sources) \
-       $(editor_sources)
-
-properties_libnm_fortisslvpn_properties_core_la_CPPFLAGS = \
-       -DNM_VPN_OLD \
-       -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
-       $(properties_cppflags) \
-       $(GTK_CFLAGS) \
-       $(LIBNM_GLIB_CFLAGS) \
-       $(LIBNM_GTK_CFLAGS)
-
-properties_libnm_fortisslvpn_properties_core_la_LIBADD = \
-       $(GLIB_LIBS) \
-       $(GTK_LIBS) \
-       $(LIBNM_GLIB_LIBS) \
-       $(LIBNM_GTK_LIBS)
-
-
-if WITH_LIBNM_GLIB
-plugin_LTLIBRARIES += properties/libnm-fortisslvpn-properties.la
-endif
-
-properties_libnm_fortisslvpn_properties_la_SOURCES =
-properties_libnm_fortisslvpn_properties_la_LIBADD = \
-       properties/libnm-fortisslvpn-properties-core.la
-properties_libnm_fortisslvpn_properties_la_LDFLAGS = \
-       -avoid-version \
-       -Wl,--version-script=$(srcdir)/properties/libnm-fortisslvpn-properties.ver
-
 EXTRA_DIST += \
        properties/libnm-vpn-plugin-fortisslvpn.ver \
        properties/libnm-vpn-plugin-fortisslvpn-editor.ver \
-       properties/libnm-fortisslvpn-properties.ver \
        properties/nm-fortisslvpn-dialog.ui
 
 ###############################################################################
@@ -365,25 +325,7 @@ auth_dialog_nm_fortisslvpn_auth_dialog_LDADD = \
 
 ###############################################################################
 
-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-compat-name-file:
-       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-fortisslvpn-service.name.in \
-           >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-fortisslvpn-service.name
-
-uninstall-hook:
-        rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-fortisslvpn-service.name
-else
-install-compat-name-file:
-       @:
-endif
-
-install-data-hook: install-compat-name-file
+install-data-hook:
        $(mkinstalldirs) -m 0700 $(DESTDIR)$(fortisslvpn_statedir)
 
 appdatadir = $(datadir)/metainfo
diff --git a/configure.ac b/configure.ac
index f103cca..526761f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,12 +74,6 @@ dnl GNOME support
 dnl
 AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-fortisslvpn without GNOME 
support, e.g. vpn service only]), [], [with_gnome_specified=no])
 AC_ARG_WITH(gtk4, AS_HELP_STRING([--with-gtk4], [Build NetworkManager-fortisslvpn with libnma-gtk4 
support]), [], [with_gtk4_specified=no])
-AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--with-libnm-glib], [Build NetworkManager-fortisslvpn with 
libnm-glib comatibility (depreacted)]), [], [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
@@ -89,15 +83,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)]))
 
@@ -128,18 +115,6 @@ if test x"$with_gnome" != xno; then
        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.8.33)
-
-       if test x"$with_libnm_glib" != xno; then
-               PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.2.0)
-
-               PKG_CHECK_MODULES(LIBNM_GLIB,
-                               NetworkManager >= 1.2.0
-                               libnm-util >= 1.2.0
-                               libnm-glib >= 1.2.0
-                               libnm-glib-vpn >= 1.2.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
@@ -187,7 +162,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 "  --with-pppd-plugin-dir=$PPPD_PLUGIN_DIR"
 echo "  --enable-absolute-paths=$enable_absolute_paths"
 echo "  --enable-more-warnings=$set_more_warnings"
diff --git a/properties/nm-fortisslvpn-editor-plugin.c b/properties/nm-fortisslvpn-editor-plugin.c
index 26e1f59..fc012e0 100644
--- a/properties/nm-fortisslvpn-editor-plugin.c
+++ b/properties/nm-fortisslvpn-editor-plugin.c
@@ -29,11 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef NM_VPN_OLD
-#include "nm-fortisslvpn-editor.h"
-#else
 #include "nm-utils/nm-vpn-plugin-utils.h"
-#endif
 
 #define FORTISSLVPN_PLUGIN_NAME    _("Fortinet SSLVPN")
 #define FORTISSLVPN_PLUGIN_DESC    _("Compatible with Fortinet SSLVPN servers.")
@@ -62,7 +58,6 @@ get_capabilities (NMVpnEditorPlugin *iface)
        return NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE;
 }
 
-#ifndef NM_VPN_OLD
 static NMVpnEditor *
 _call_editor_factory (gpointer factory,
                       NMVpnEditorPlugin *editor_plugin,
@@ -74,7 +69,6 @@ _call_editor_factory (gpointer factory,
                                               connection,
                                               error);
 }
-#endif
 
 static NMVpnEditor *
 get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
@@ -97,9 +91,6 @@ get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
                editor = "libnm-gtk4-vpn-plugin-fortisslvpn-editor.so";
        }
 
-#ifdef NM_VPN_OLD
-       return nm_fortisslvpn_editor_new (connection, error);
-#else
        return nm_vpn_plugin_utils_load_editor (editor,
                                                "nm_vpn_editor_factory_fortisslvpn",
                                                _call_editor_factory,
@@ -107,7 +98,6 @@ get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
                                                connection,
                                                NULL,
                                                error);
-#endif
 }
 
 static void
diff --git a/properties/nm-fortisslvpn-editor.c b/properties/nm-fortisslvpn-editor.c
index ca76856..5fa72bd 100644
--- a/properties/nm-fortisslvpn-editor.c
+++ b/properties/nm-fortisslvpn-editor.c
@@ -546,8 +546,6 @@ fortisslvpn_editor_interface_init (NMVpnEditorInterface *iface_class)
 
 /*****************************************************************************/
 
-#ifndef NM_VPN_OLD
-
 #include "nm-fortisslvpn-editor-plugin.h"
 
 G_MODULE_EXPORT NMVpnEditor *
@@ -559,4 +557,3 @@ nm_vpn_editor_factory_fortisslvpn (NMVpnEditorPlugin *editor_plugin,
 
        return nm_fortisslvpn_editor_new (connection, error);
 }
-#endif
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 64bd85a..cfb0d06 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -68,44 +68,6 @@
 
 /*****************************************************************************/
 
-#ifdef NM_VPN_OLD
-
-#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 NMSettingIPConfig NMSettingIP4Config
-
-#define nm_setting_ip_config_get_num_routes         nm_setting_ip4_config_get_num_routes
-#define nm_setting_ip_config_add_route              nm_setting_ip4_config_add_route
-#define nm_setting_ip_config_get_route              nm_setting_ip4_config_get_route
-#define nm_setting_ip_config_get_num_addresses      nm_setting_ip4_config_get_num_addresses
-#define nm_setting_ip_config_get_num_dns_searches   nm_setting_ip4_config_get_num_dns_searches
-#define nm_setting_ip_config_get_never_default      nm_setting_ip4_config_get_never_default
-#define nm_setting_ip_config_get_dhcp_hostname      nm_setting_ip4_config_get_dhcp_hostname
-#define nm_setting_ip_config_get_method             nm_setting_ip4_config_get_method
-#define nm_setting_ip_config_get_dhcp_hostname      nm_setting_ip4_config_get_dhcp_hostname
-#define nm_setting_ip_config_get_num_dns            nm_setting_ip4_config_get_num_dns
-#define NM_SETTING_IP_CONFIG_NEVER_DEFAULT          NM_SETTING_IP4_CONFIG_NEVER_DEFAULT
-
-#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
-
-#else /* !NM_VPN_OLD */
-
 #include <NetworkManager.h>
 
 #define NMV_EDITOR_PLUGIN_ERROR                     NM_CONNECTION_ERROR
@@ -116,17 +78,11 @@
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_CONNECTION_ERROR_FAILED
 #define NMV_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_CONNECTION_ERROR_FAILED
 
-#endif /* NM_VPN_OLD */
-
 /*****************************************************************************/
 
 #if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR
 
-#ifdef NM_VPN_OLD
-#include <nm-ui-utils.h>
-#else /* NM_VPN_OLD */
 #include <nma-ui-utils.h>
-#endif /* NM_VPN_OLD */
 
 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR */
 


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