Commit b027723e authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

Revert "all: goodbye libnm-glib"

We need this for a little little longer :(

This reverts commit 1de8383a.
parent 61aad8cd
Pipeline #28022 failed with stages
in 37 minutes and 39 seconds
......@@ -12,6 +12,7 @@ addons:
- libtool
- pkg-config
- intltool
- libdbus-glib-1-dev
- libdbus-1-dev
- libiw-dev
- libglib2.0-dev
......
This diff is collapsed.
......@@ -8,9 +8,6 @@ The API is subject to change and not guaranteed to be compatible
with the later release.
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
Overview of changes since NetworkManager-1.14
......
......@@ -28,5 +28,5 @@ AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
cd $olddir
if test -z "$NOCONFIGURE"; then
exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection "$@"
exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error --enable-gtk-doc --enable-introspection --with-libnm-glib "$@"
fi
......@@ -197,6 +197,9 @@
/* Define if you have dhcpcd */
#mesondefine WITH_DHCPCD
/* Define for libnm to prevent GIR from loading libnm-glib */
#mesondefine WITH_FAKE_TYPELIBS
/* Define if JANSSON is enabled */
#mesondefine WITH_JANSSON
......
......@@ -257,6 +257,34 @@ AC_SUBST(GLIB_LIBS)
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])
# Qt4
......@@ -1247,10 +1275,17 @@ AC_CONFIG_FILES([
Makefile
shared/nm-version-macros.h
libnm/libnm.pc
libnm-util/libnm-util.pc
libnm-glib/libnm-glib.pc
libnm-glib/libnm-glib-vpn.pc
po/Makefile.in
data/org.freedesktop.NetworkManager.policy.in
docs/api/Makefile
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/version.xml
NetworkManager.pc
......@@ -1299,6 +1334,7 @@ echo " ofono: $with_ofono"
echo " concheck: $enable_concheck"
echo " libteamdctl: $enable_teamdctl"
echo " ovs: $enable_ovs"
echo " libnm-glib: $with_libnm_glib"
echo " nmcli: $build_nmcli"
echo " nmtui: $build_nmtui"
echo " iwd: $ac_with_iwd"
......
......@@ -28,6 +28,7 @@ install \
bzip2 \
cscope \
dbus-devel \
dbus-glib-devel \
dbus-python \
dbus-x11 \
dhclient \
......
......@@ -7,6 +7,8 @@
# 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 wpa_supplicant_version 1:1.1
......@@ -58,6 +60,11 @@
%bcond_with test
%bcond_with lto
%bcond_with sanitizer
%if 0%{?fedora} > 28 || 0%{?rhel} > 7
%bcond_with libnm_glib
%else
%bcond_without libnm_glib
%endif
%if 0%{?fedora}
%bcond_without connectivity_fedora
%else
......@@ -149,6 +156,7 @@ BuildRequires: intltool
BuildRequires: gettext-devel
BuildRequires: dbus-devel >= %{dbus_version}
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
%if 0%{?fedora}
BuildRequires: wireless-tools-devel >= %{wireless_tools_version}
%endif
......@@ -336,6 +344,37 @@ This package contains NetworkManager support for PPP.
%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
Summary: Libraries for adding NetworkManager support to applications (new API).
Group: Development/Libraries
......@@ -527,7 +566,12 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
-Dconfig_plugins_default='ifcfg-rh' \
-Dconfig_dns_rc_manager_default=symlink \
-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
......@@ -643,7 +687,12 @@ intltoolize --automake --copy --force
--with-config-plugins-default='ifcfg-rh' \
--with-config-dns-rc-manager-default=symlink \
--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}
......@@ -753,6 +802,9 @@ fi
%if 0%{?fedora} < 28
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
%post libnm -p /sbin/ldconfig
%postun libnm -p /sbin/ldconfig
%endif
......@@ -861,6 +913,47 @@ fi
%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
%{_libdir}/libnm.so.*
%{_libdir}/girepository-1.0/NM-1.0.typelib
......
......@@ -98,6 +98,7 @@ run_autotools() {
--enable-tests=yes \
--with-crypto=$_WITH_CRYPTO \
\
--with-libnm-glib=yes \
--with-iwd=yes \
--with-ofono=yes \
--enable-teamdctl=$_WITH_LIBTEAM \
......@@ -166,6 +167,7 @@ run_meson() {
-D crypto=$_WITH_CRYPTO \
-D docs=$_WITH_DOCS \
\
-D libnm_glib=true \
-D iwd=true \
-D ofono=true \
-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',
'nm-remote-connection-private.h',
'nm-types-private.h',
'nm-secret-agent-glue.h',
'nm-vpn-plugin-glue.h',
]
configure_file(
input: version_xml + '.in',
output: version_xml,
configuration: version_conf,
)
gnome.gtkdoc(
doc_module,
main_xml: doc_module + '-docs.xml',
src_dir: join_paths(meson.source_root(), 'libnm-glib'),
dependencies: [
libnm_glib_dep,
libnm_glib_vpn_dep,
],
scan_args: [
'--rebuild-types',
'--rebuild-sections',
'--ignore-headers=' + ' '.join(private_headers),
],
scanobjs_args: '--type-init-func="g_type_init();"',
fixxref_args: '--html-dir=' + join_paths(nm_prefix, gnome.gtkdoc_html_dir(doc_module)),
gobject_typesfile: doc_module + '.types',
html_assets: doc_module + '.png',
install: true,
)
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.6
# The name of the module
DOC_MODULE=libnm-util
# The top-level SGML file.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# 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_builddir)/libnm-util \
$(top_srcdir)/libnm-util
# Extra options to supply to gtkdoc-scan.
SCAN_OPTIONS=--rebuild-types --rebuild-sections
# 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-util/*.h
CFILE_GLOB=$(top_srcdir)/libnm-util/*.c
# Header files to ignore when scanning.
IGNORE_HFILES= \
crypto.h \
nm-utils-private.h \
nm-setting-private.h \
nm-param-spec-specialized.h \
nm-test-utils.h \
nm-version.h
# Images to copy into HTML directory.
HTML_IMAGES =
# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
content_files = version.xml
# Other files to distribute.
extra_files =
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
GTKDOC_CFLAGS = \
-I$(top_srcdir)/libnm-util \
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
GTKDOC_LIBS = \
$(top_builddir)/libnm-util/libnm-util.la \
$(GLIB_LIBS)
# include common portion ...
include $(top_srcdir)/gtk-doc.make
EXTRA_DIST += version.xml.in meson.build
CLEANFILES += \
libnm-util-sections.txt \
libnm-util-overrides.txt \
html/* \
tmpl/* \
xml/*
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index">
<bookinfo>
<title>libnm-util Reference Manual</title>
<releaseinfo>
for libnm-util &version;
The latest version of this documentation can be found on-line at
<ulink url="https://developer.gnome.org/libnm-util/stable/">https://developer.gnome.org/libnm-util/stable/</ulink>.
</releaseinfo>