Commit 1de8383a authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

all: goodbye libnm-glib

This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
The it has been replaced with libnm since NetworkManager 1.0, disabled
by default since 1.12 and no up-to-date distributions ship it for years
now.

Removing the libraries allows us to:

* Remove the horrible hacks that were in place to deal with accidental use
  of both the new and old library in a single process.
* Relief the translators of maintenance burden of similar yet different
  strings.
* Get rid of known bad code without chances of ever getting fixed
  (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
* Generally lower the footprint of the releases and our workspace

If there are some really really legacy users; they can just build
libnm-glib and friends from the NetworkManager-1.16 distribution. The
D-Bus API is stable and old libnm-glib will keep working forever.

https://github.com/NetworkManager/NetworkManager/pull/308
parent 32e0bf14
...@@ -12,7 +12,6 @@ addons: ...@@ -12,7 +12,6 @@ addons:
- libtool - libtool
- pkg-config - pkg-config
- intltool - intltool
- libdbus-glib-1-dev
- libdbus-1-dev - libdbus-1-dev
- libiw-dev - libiw-dev
- libglib2.0-dev - libglib2.0-dev
......
This diff is collapsed.
...@@ -8,6 +8,9 @@ The API is subject to change and not guaranteed to be compatible ...@@ -8,6 +8,9 @@ The API is subject to change and not guaranteed to be compatible
with the later release. with the later release.
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
* The libnm-glib library, deprecated in favor of libnm since NetworkManager 1.0,
and disabled by default since NetworkManager 1.12 has now been removed.
============================================= =============================================
NetworkManager-1.16 NetworkManager-1.16
Overview of changes since NetworkManager-1.14 Overview of changes since NetworkManager-1.14
......
...@@ -28,5 +28,5 @@ AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose ...@@ -28,5 +28,5 @@ AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
cd $olddir cd $olddir
if test -z "$NOCONFIGURE"; then if test -z "$NOCONFIGURE"; then
exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection --with-libnm-glib "$@" exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection "$@"
fi fi
...@@ -197,9 +197,6 @@ ...@@ -197,9 +197,6 @@
/* Define if you have dhcpcd */ /* Define if you have dhcpcd */
#mesondefine WITH_DHCPCD #mesondefine WITH_DHCPCD
/* Define for libnm to prevent GIR from loading libnm-glib */
#mesondefine WITH_FAKE_TYPELIBS
/* Define if JANSSON is enabled */ /* Define if JANSSON is enabled */
#mesondefine WITH_JANSSON #mesondefine WITH_JANSSON
......
...@@ -256,34 +256,6 @@ AC_SUBST(GLIB_LIBS) ...@@ -256,34 +256,6 @@ AC_SUBST(GLIB_LIBS)
GOBJECT_INTROSPECTION_CHECK([0.9.6]) GOBJECT_INTROSPECTION_CHECK([0.9.6])
AC_ARG_WITH(libnm-glib,
AS_HELP_STRING([--with-libnm-glib],
[build legacy libraries]))
fake_typelibs=no
if test "$with_libnm_glib" == "yes"; then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94, :,
[AC_MSG_FAILURE([$DBUS_PKG_ERRORS
Configure with --without-libnm-glib if you do not need the legacy libraries])
])
if test "${found_introspection}" = "yes"; then
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
if ! test x"$GLIB_COMPILE_RESOURCES" = x""; then
fake_typelibs=yes
fi
fi
else
with_libnm_glib=no
fi
AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" == "yes")
if test "$fake_typelibs" = "yes"; then
AC_DEFINE(WITH_FAKE_TYPELIBS, 1, [Define for libnm to prevent GIR from loading libnm-glib])
else
AC_DEFINE(WITH_FAKE_TYPELIBS, 0, [Define for libnm to prevent GIR from loading libnm-glib])
fi
AM_CONDITIONAL(WITH_FAKE_TYPELIBS, test "${fake_typelibs}" = "yes")
PKG_CHECK_MODULES([LIBUDEV], [libudev >= 175]) PKG_CHECK_MODULES([LIBUDEV], [libudev >= 175])
# Qt4 # Qt4
...@@ -1274,17 +1246,10 @@ AC_CONFIG_FILES([ ...@@ -1274,17 +1246,10 @@ AC_CONFIG_FILES([
Makefile Makefile
shared/nm-version-macros.h shared/nm-version-macros.h
libnm/libnm.pc libnm/libnm.pc
libnm-util/libnm-util.pc
libnm-glib/libnm-glib.pc
libnm-glib/libnm-glib-vpn.pc
po/Makefile.in po/Makefile.in
data/org.freedesktop.NetworkManager.policy.in data/org.freedesktop.NetworkManager.policy.in
docs/api/Makefile docs/api/Makefile
docs/api/version.xml docs/api/version.xml
docs/libnm-glib/Makefile
docs/libnm-glib/version.xml
docs/libnm-util/Makefile
docs/libnm-util/version.xml
docs/libnm/Makefile docs/libnm/Makefile
docs/libnm/version.xml docs/libnm/version.xml
NetworkManager.pc NetworkManager.pc
...@@ -1333,7 +1298,6 @@ echo " ofono: $with_ofono" ...@@ -1333,7 +1298,6 @@ echo " ofono: $with_ofono"
echo " concheck: $enable_concheck" echo " concheck: $enable_concheck"
echo " libteamdctl: $enable_teamdctl" echo " libteamdctl: $enable_teamdctl"
echo " ovs: $enable_ovs" echo " ovs: $enable_ovs"
echo " libnm-glib: $with_libnm_glib"
echo " nmcli: $build_nmcli" echo " nmcli: $build_nmcli"
echo " nmtui: $build_nmtui" echo " nmtui: $build_nmtui"
echo " iwd: $ac_with_iwd" echo " iwd: $ac_with_iwd"
......
...@@ -28,7 +28,6 @@ install \ ...@@ -28,7 +28,6 @@ install \
bzip2 \ bzip2 \
cscope \ cscope \
dbus-devel \ dbus-devel \
dbus-glib-devel \
dbus-python \ dbus-python \
dbus-x11 \ dbus-x11 \
dhclient \ dhclient \
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
# Note that it contains __PLACEHOLDERS__ that will be replaced by the accompanying 'build.sh' script. # Note that it contains __PLACEHOLDERS__ that will be replaced by the accompanying 'build.sh' script.
%global dbus_glib_version 0.100
%global wireless_tools_version 1:28-0pre9 %global wireless_tools_version 1:28-0pre9
%global wpa_supplicant_version 1:1.1 %global wpa_supplicant_version 1:1.1
...@@ -60,11 +58,6 @@ ...@@ -60,11 +58,6 @@
%bcond_with test %bcond_with test
%bcond_with lto %bcond_with lto
%bcond_with sanitizer %bcond_with sanitizer
%if 0%{?fedora} > 28 || 0%{?rhel} > 7
%bcond_with libnm_glib
%else
%bcond_without libnm_glib
%endif
%if 0%{?fedora} %if 0%{?fedora}
%bcond_without connectivity_fedora %bcond_without connectivity_fedora
%else %else
...@@ -156,7 +149,6 @@ BuildRequires: intltool ...@@ -156,7 +149,6 @@ BuildRequires: intltool
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: dbus-devel >= %{dbus_version} BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
%if 0%{?fedora} %if 0%{?fedora}
BuildRequires: wireless-tools-devel >= %{wireless_tools_version} BuildRequires: wireless-tools-devel >= %{wireless_tools_version}
%endif %endif
...@@ -344,37 +336,6 @@ This package contains NetworkManager support for PPP. ...@@ -344,37 +336,6 @@ This package contains NetworkManager support for PPP.
%endif %endif
%package glib
Summary: Libraries for adding NetworkManager support to applications (old API).
Group: Development/Libraries
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Conflicts: NetworkManager-libnm < %{epoch}:%{version}-%{release}
%description glib
This package contains the libraries that make it easier to use some
NetworkManager functionality from applications that use glib. This is
the older NetworkManager API. See also NetworkManager-libnm.
%package glib-devel
Summary: Header files for adding NetworkManager support to applications (old API).
Group: Development/Libraries
Requires: %{name}-glib%{?_isa} = %{epoch}:%{version}-%{release}
Requires: glib2-devel
Requires: pkgconfig
Requires: dbus-glib-devel >= %{dbus_glib_version}
Provides: %{name}-devel = %{epoch}:%{version}-%{release}
Provides: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-devel < %{epoch}:%{version}-%{release}
%description glib-devel
This package contains the header and pkg-config files for development
applications using NetworkManager functionality from applications that
use glib.
This is the older NetworkManager API. See also NetworkManager-libnm-devel.
%package libnm %package libnm
Summary: Libraries for adding NetworkManager support to applications (new API). Summary: Libraries for adding NetworkManager support to applications (new API).
Group: Development/Libraries Group: Development/Libraries
...@@ -566,12 +527,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. ...@@ -566,12 +527,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
-Dconfig_plugins_default='ifcfg-rh' \ -Dconfig_plugins_default='ifcfg-rh' \
-Dconfig_dns_rc_manager_default=symlink \ -Dconfig_dns_rc_manager_default=symlink \
-Dconfig_logging_backend_default=journal \ -Dconfig_logging_backend_default=journal \
-Djson_validation=true \ -Djson_validation=true
%if %{with libnm_glib}
-Dlibnm_glib=true
%else
-Dlibnm_glib=false
%endif
%meson_build %meson_build
...@@ -687,12 +643,7 @@ intltoolize --automake --copy --force ...@@ -687,12 +643,7 @@ intltoolize --automake --copy --force
--with-config-plugins-default='ifcfg-rh' \ --with-config-plugins-default='ifcfg-rh' \
--with-config-dns-rc-manager-default=symlink \ --with-config-dns-rc-manager-default=symlink \
--with-config-logging-backend-default=journal \ --with-config-logging-backend-default=journal \
--enable-json-validation \ --enable-json-validation
%if %{with libnm_glib}
--with-libnm-glib
%else
--without-libnm-glib
%endif
make %{?_smp_mflags} make %{?_smp_mflags}
...@@ -802,9 +753,6 @@ fi ...@@ -802,9 +753,6 @@ fi
%if 0%{?fedora} < 28 %if 0%{?fedora} < 28
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%post libnm -p /sbin/ldconfig %post libnm -p /sbin/ldconfig
%postun libnm -p /sbin/ldconfig %postun libnm -p /sbin/ldconfig
%endif %endif
...@@ -913,47 +861,6 @@ fi ...@@ -913,47 +861,6 @@ fi
%endif %endif
%if %{with libnm_glib}
%files glib -f %{name}.lang
%{_libdir}/libnm-glib.so.*
%{_libdir}/libnm-glib-vpn.so.*
%{_libdir}/libnm-util.so.*
%{_libdir}/girepository-1.0/NetworkManager-1.0.typelib
%{_libdir}/girepository-1.0/NMClient-1.0.typelib
%endif
%if %{with libnm_glib}
%files glib-devel
%dir %{_includedir}/libnm-glib
%dir %{_includedir}/%{name}
%{_includedir}/libnm-glib/*.h
%{_includedir}/%{name}/%{name}.h
%{_includedir}/%{name}/NetworkManagerVPN.h
%{_includedir}/%{name}/nm-setting*.h
%{_includedir}/%{name}/nm-connection.h
%{_includedir}/%{name}/nm-utils-enum-types.h
%{_includedir}/%{name}/nm-utils.h
%{_includedir}/%{name}/nm-version.h
%{_includedir}/%{name}/nm-version-macros.h
%{_libdir}/pkgconfig/libnm-glib.pc
%{_libdir}/pkgconfig/libnm-glib-vpn.pc
%{_libdir}/pkgconfig/libnm-util.pc
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/libnm-glib.so
%{_libdir}/libnm-glib-vpn.so
%{_libdir}/libnm-util.so
%{_datadir}/gir-1.0/NetworkManager-1.0.gir
%{_datadir}/gir-1.0/NMClient-1.0.gir
%dir %{_datadir}/gtk-doc/html/libnm-glib
%{_datadir}/gtk-doc/html/libnm-glib/*
%dir %{_datadir}/gtk-doc/html/libnm-util
%{_datadir}/gtk-doc/html/libnm-util/*
%{_datadir}/vala/vapi/libnm-*.deps
%{_datadir}/vala/vapi/libnm-*.vapi
%endif
%files libnm -f %{name}.lang %files libnm -f %{name}.lang
%{_libdir}/libnm.so.* %{_libdir}/libnm.so.*
%{_libdir}/girepository-1.0/NM-1.0.typelib %{_libdir}/girepository-1.0/NM-1.0.typelib
......
...@@ -98,7 +98,6 @@ run_autotools() { ...@@ -98,7 +98,6 @@ run_autotools() {
--enable-tests=yes \ --enable-tests=yes \
--with-crypto=$_WITH_CRYPTO \ --with-crypto=$_WITH_CRYPTO \
\ \
--with-libnm-glib=yes \
--with-iwd=yes \ --with-iwd=yes \
--with-ofono=yes \ --with-ofono=yes \
--enable-teamdctl=$_WITH_LIBTEAM \ --enable-teamdctl=$_WITH_LIBTEAM \
...@@ -167,7 +166,6 @@ run_meson() { ...@@ -167,7 +166,6 @@ run_meson() {
-D crypto=$_WITH_CRYPTO \ -D crypto=$_WITH_CRYPTO \
-D docs=$_WITH_DOCS \ -D docs=$_WITH_DOCS \
\ \
-D libnm_glib=true \
-D iwd=true \ -D iwd=true \
-D ofono=true \ -D ofono=true \
-D teamdctl=$_WITH_LIBTEAM \ -D teamdctl=$_WITH_LIBTEAM \
......
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.6
# The name of the module
DOC_MODULE=libnm-glib
# The top-level SGML file.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# The directory containing the source code. Relative to $(srcdir).
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting functions and macros.
DOC_SOURCE_DIR=$(top_srcdir)/libnm-glib
# Extra options to supply to gtkdoc-scan.
SCAN_OPTIONS=
# Extra options to supply to gtkdoc-mkdb.
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-fixref.
FIXXREF_OPTIONS=
# Used for dependencies.
HFILE_GLOB=$(top_srcdir)/libnm-glib/*.h
CFILE_GLOB=$(top_srcdir)/libnm-glib/*.c
# Header files to ignore when scanning.
IGNORE_HFILES= \
common.h \
nm-dbus-helpers-private.h \
nm-device-private.h \
nm-object-cache.h \
nm-object-private.h \
nm-remote-connection-private.h \
nm-types-private.h \
nm-secret-agent-glue.h \
nm-vpn-plugin-glue.h
# Images to copy into HTML directory.
HTML_IMAGES = libnm-glib.png
# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
content_files = version.xml
# Other files to distribute.
extra_files = libnm-glib.png
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
GTKDOC_CFLAGS = \
-I$(top_srcdir)/shared \
-I$(top_builddir)/shared \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(top_builddir)/libnm-glib \
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
GTKDOC_LIBS = \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(GLIB_LIBS)
# include common portion ...
include $(top_srcdir)/gtk-doc.make
EXTRA_DIST += version.xml.in meson.build
CLEANFILES += \
libnm-glib-sections.txt \
libnm-glib-overrides.txt \
html/* \
tmpl/* \
xml/*
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>libnm-glib Reference Manual</title>
<releaseinfo>
for libnm-glib &version;
The latest version of this documentation can be found on-line at
<ulink url="https://developer.gnome.org/libnm-glib/stable/">https://developer.gnome.org/libnm-glib/stable/</ulink>.
</releaseinfo>
<copyright>
<year>2012</year>
<year>2013</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>The NetworkManager Authors</holder>
</copyright>
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the <citetitle>GNU Free
Documentation License</citetitle>, Version 1.1 or any later
version published by the Free Software Foundation with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. You may obtain a copy of the <citetitle>GNU Free
Documentation License</citetitle> from the Free Software
Foundation by visiting <ulink type="http"
url="http://www.fsf.org">their Web site</ulink> or by writing
to:
<address>
The Free Software Foundation, Inc.,
<street>51 Franklin Street</street> - Fifth Floor,
<city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>,
<country>USA</country>
</address>
</para>
</legalnotice>
</bookinfo>
<chapter id="ref-overview">
<title>Object Overview</title>
<para>
libnm-glib maps closely to the actual D-Bus API that NetworkManager
provides, simply wrapping the remote D-Bus objects as native GObjects,
mapping D-Bus signals and properties to GObject signals and properties,
and providing helpful accessor and utility functions. As such, objects
in the libnm-glib API have the same properties, behavior, signals, and
semantics as the NM D-Bus API.
</para>
<para>
The following is a rough overview of the libnm-glib object structure and
how to use the various parts of it:
<mediaobject id="libnm-glib-overview">
<imageobject>
<imagedata fileref="libnm-glib.png" format="PNG"/>
</imageobject>
</mediaobject>
</para>
</chapter>
<chapter>
<title>libnm-glib API Reference</title>
<xi:include href="xml/nm-client.xml"/>
<xi:include href="xml/nm-active-connection.xml"/>
<xi:include href="xml/nm-device.xml"/>
<xi:include href="xml/nm-device-ethernet.xml"/>
<xi:include href="xml/nm-device-wifi.xml"/>
<xi:include href="xml/nm-device-modem.xml"/>
<xi:include href="xml/nm-device-bt.xml"/>
<xi:include href="xml/nm-device-wimax.xml"/>
<xi:include href="xml/nm-device-adsl.xml"/>
<xi:include href="xml/nm-device-bond.xml"/>
<xi:include href="xml/nm-device-bridge.xml"/>
<xi:include href="xml/nm-device-team.xml"/>
<xi:include href="xml/nm-device-generic.xml"/>
<xi:include href="xml/nm-device-infiniband.xml"/>
<xi:include href="xml/nm-device-vlan.xml"/>
<xi:include href="xml/nm-device-olpc-mesh.xml"/>
<xi:include href="xml/nm-wimax-nsp.xml"/>
<xi:include href="xml/nm-access-point.xml"/>
<xi:include href="xml/nm-ip4-config.xml"/>
<xi:include href="xml/nm-ip6-config.xml"/>
<xi:include href="xml/nm-dhcp4-config.xml"/>
<xi:include href="xml/nm-dhcp6-config.xml"/>
<xi:include href="xml/nm-object.xml"/>
<xi:include href="xml/nm-remote-connection.xml"/>
<xi:include href="xml/nm-remote-settings.xml"/>
<xi:include href="xml/nm-types.xml"/>
<xi:include href="xml/nm-secret-agent.xml"/>
<xi:include href="xml/nm-vpn-connection.xml"/>
<xi:include href="xml/nm-vpn-plugin.xml"/>
<xi:include href="xml/nm-vpn-plugin-ui-interface.xml"/>
<xi:include href="xml/nm-vpn-plugin-utils.xml"/>
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
</book>
This diff is collapsed.
#include "nm-client.h"
#include "nm-object.h"
#include "nm-device.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-device-modem.h"
#include "nm-device-bt.h"
#include "nm-device-wimax.h"
#include "nm-device-olpc-mesh.h"
#include "nm-device-adsl.h"
#include "nm-device-infiniband.h"
#include "nm-device-bond.h"
#include "nm-device-bridge.h"
#include "nm-device-team.h"
#include "nm-device-generic.h"
#include "nm-device-vlan.h"
#include "nm-access-point.h"
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-active-connection.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-remote-settings.h"
#include "nm-remote-connection.h"
#include "nm-secret-agent.h"
#include "nm-vpn-connection.h"
nm_client_get_type
nm_object_get_type
nm_device_get_type
nm_device_ethernet_get_type
nm_device_wifi_get_type
nm_device_modem_get_type
nm_device_bt_get_type
nm_device_wimax_get_type
nm_device_olpc_mesh_get_type
nm_device_adsl_get_type
nm_device_infiniband_get_type
nm_device_bond_get_type
nm_device_bridge_get_type
nm_device_team_get_type
nm_device_generic_get_type
nm_device_vlan_get_type
nm_wimax_nsp_get_type
nm_access_point_get_type
nm_ip4_config_get_type
nm_ip6_config_get_type
nm_active_connection_get_type
nm_dhcp4_config_get_type
nm_dhcp6_config_get_type
nm_remote_settings_get_type
nm_remote_connection_get_type
nm_secret_agent_get_type
nm_vpn_connection_get_type
doc_module = libnm_glib_name
private_headers = [
'common.h',
'nm-dbus-helpers-private.h',
'nm-device-private.h',
'nm-object-cache.h',
'nm-object-private.h', </