From f78af299c5950e2805c5691eec3f795f514f694c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 23:28:59 +0100 Subject: [PATCH 01/13] setting-8021x: fix "PKCS#11" string in gtk-doc gtk-doc (and perhaps other tools) treat pound sign in comments specially: html/NMSetting8021x.html:1501: warning: no link for: "11" -> (11). --- src/libnm-core-impl/nm-setting-8021x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-8021x.c b/src/libnm-core-impl/nm-setting-8021x.c index e3865270f..1bc4de9d8 100644 --- a/src/libnm-core-impl/nm-setting-8021x.c +++ b/src/libnm-core-impl/nm-setting-8021x.c @@ -1604,7 +1604,7 @@ nm_setting_802_1x_get_phase2_ca_cert_path(NMSetting8021x *setting) * nm_setting_802_1x_get_phase2_ca_cert_blob() and * nm_setting_802_1x_get_phase2_ca_cert_path(). * - * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC * 7512), but may be extended to other schemes in future (such as 'file' URIs * for local files and 'data' URIs for inline certificate data). * @@ -1940,7 +1940,7 @@ nm_setting_802_1x_get_phase2_client_cert_path(NMSetting8021x *setting) * nm_setting_802_1x_get_phase2_ca_cert_blob() and * nm_setting_802_1x_get_phase2_ca_cert_path(). * - * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC * 7512), but may be extended to other schemes in future (such as 'file' URIs * for local files and 'data' URIs for inline certificate data). * @@ -2176,7 +2176,7 @@ nm_setting_802_1x_get_private_key_path(NMSetting8021x *setting) * nm_setting_802_1x_get_private_key_blob() and * nm_setting_802_1x_get_private_key_path(). * - * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC * 7512), but may be extended to other schemes in future (such as 'file' URIs * for local files and 'data' URIs for inline certificate data). * @@ -2379,7 +2379,7 @@ nm_setting_802_1x_get_phase2_private_key_path(NMSetting8021x *setting) * nm_setting_802_1x_get_phase2_private_key_blob() and * nm_setting_802_1x_get_phase2_private_key_path(). * - * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * Currently, it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC * 7512), but may be extended to other schemes in future (such as 'file' URIs * for local files and 'data' URIs for inline certificate data). * From f87bcac297dbd5c5c386019346dc2cae92d5baec Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 23:26:19 +0100 Subject: [PATCH 02/13] setting-ethtool: fix malformed doc comments html/NMSettingEthtool.html:142: warning: no link for: "Returns" -> (Returns). --- src/libnm-core-impl/nm-setting-ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-ethtool.c b/src/libnm-core-impl/nm-setting-ethtool.c index 1db6c3355..d5199823e 100644 --- a/src/libnm-core-impl/nm-setting-ethtool.c +++ b/src/libnm-core-impl/nm-setting-ethtool.c @@ -29,7 +29,7 @@ * * Checks whether @optname is a valid option name for an offload feature. * - * %Returns: %TRUE, if @optname is valid + * Returns: %TRUE, if @optname is valid * * Note that nm_ethtool_optname_is_feature() was first added to the libnm header files * in 1.14.0 but forgot to actually add to the library. This happened belatedly in 1.20.0 and @@ -49,7 +49,7 @@ nm_ethtool_optname_is_feature(const char *optname) * * Checks whether @optname is a valid option name for a coalesce setting. * - * %Returns: %TRUE, if @optname is valid + * Returns: %TRUE, if @optname is valid * * Since: 1.26 */ @@ -65,7 +65,7 @@ nm_ethtool_optname_is_coalesce(const char *optname) * * Checks whether @optname is a valid option name for a ring setting. * - * %Returns: %TRUE, if @optname is valid + * Returns: %TRUE, if @optname is valid * * Since: 1.26 */ @@ -81,7 +81,7 @@ nm_ethtool_optname_is_ring(const char *optname) * * Checks whether @optname is a valid option name for a pause setting. * - * %Returns: %TRUE, if @optname is valid + * Returns: %TRUE, if @optname is valid * * Since: 1.32 */ From 59ac34976b9fb640851fdfca6f374a2f9c105d9a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 23:32:23 +0100 Subject: [PATCH 03/13] dns-manager,client: rename struct NMDnsEntry We got a typedef of the same name, and that causes gtk-doc to generate invalid docbook and complain aloud: ../xml/nm-client.xml:4118: element refsect2: validity error : ID NMDnsEntry already defined Warning: multiple "IDs" for constraint linkend: NMDnsEntry. --- src/libnm-client-impl/nm-dns-manager.c | 2 +- src/libnm-client-public/nm-client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libnm-client-impl/nm-dns-manager.c b/src/libnm-client-impl/nm-dns-manager.c index 1fdcdd9ba..385141772 100644 --- a/src/libnm-client-impl/nm-dns-manager.c +++ b/src/libnm-client-impl/nm-dns-manager.c @@ -20,7 +20,7 @@ G_DEFINE_BOXED_TYPE(NMDnsEntry, nm_dns_entry, nm_dns_entry_dup, nm_dns_entry_unref) -struct NMDnsEntry { +struct _NMDnsEntry { guint refcount; char *interface; diff --git a/src/libnm-client-public/nm-client.h b/src/libnm-client-public/nm-client.h index 8c1c3a3b5..daa5bcb1a 100644 --- a/src/libnm-client-public/nm-client.h +++ b/src/libnm-client-public/nm-client.h @@ -134,7 +134,7 @@ GQuark nm_client_error_quark(void); * * Since: 1.6 */ -typedef struct NMDnsEntry NMDnsEntry; +typedef struct _NMDnsEntry NMDnsEntry; NM_AVAILABLE_IN_1_6 GType nm_dns_entry_get_type(void); From 1330292d057c3dafae847b2de0febd3da9a0647c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 21:56:05 +0100 Subject: [PATCH 04/13] docs/libnm: fix gtkdoc-scan ignore lists These went out of date and now all sorts of useless junk is included in the libnm documentation They contain everything outside *-public/ (perhaps they could be generated, but I'm not doing that) and nm-core-types.h (because that one confuses gtk-doc in an outrageous manner). --- docs/libnm/Makefile.am | 31 ++++++++++--------------------- docs/libnm/meson.build | 29 ++++++++++------------------- 2 files changed, 20 insertions(+), 40 deletions(-) diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am index 17244c122..c5a64a4fc 100644 --- a/docs/libnm/Makefile.am +++ b/docs/libnm/Makefile.am @@ -38,41 +38,30 @@ CFILE_GLOB=$(top_srcdir)/src/libnm-core-impl/*.c $(top_srcdir)/src/libnm-client- # Header files to ignore when scanning. IGNORE_HFILES= \ - common.h \ - nm-core-internal.h \ - nm-core-tests-enum-types.h \ - nm-crypto-impl.h \ - nm-crypto.h \ + nm-core-types.h \ + \ nm-dbus-helpers.h \ - nm-default-libnm-core.h \ + nm-default-libnm.h \ nm-device-private.h \ nm-dhcp4-config.h \ nm-dhcp6-config.h \ nm-dns-manager.h \ nm-ip4-config.h \ nm-ip6-config.h \ - nm-manager.h \ + nm-libnm-utils.h \ nm-object-private.h \ - nm-property-compare.h \ nm-remote-connection-private.h \ + \ + nm-connection-private.h \ + nm-default-libnm-core.h \ + nm-property-compare.h \ nm-setting-private.h \ + nm-team-utils.h \ nm-utils-private.h \ \ + nm-core-tests-enum-types.h \ test-general-enums.h \ \ - nm-keyfile-internal.h \ - nm-keyfile-utils.h \ - \ - nm-auth-subject.h \ - nm-common-macros.h \ - nm-ethtool-base.h \ - nm-libnm-core-utils.h \ - \ - nm-dispatcher-api.h \ - nm-libnm-core-aux.h \ - \ - nm-libnm-aux.h \ - \ $(NULL) # Images to copy into HTML directory. diff --git a/docs/libnm/meson.build b/docs/libnm/meson.build index 5a87b62a7..5d332e504 100644 --- a/docs/libnm/meson.build +++ b/docs/libnm/meson.build @@ -1,38 +1,29 @@ # SPDX-License-Identifier: LGPL-2.1-or-later private_headers = [ - 'common.h', - 'nm-core-internal.h', - 'nm-core-tests-enum-types.h', - 'nm-crypto-impl.h', - 'nm-crypto.h', + 'nm-core-types.h', + 'nm-dbus-helpers.h', - 'nm-default-libnm-core.h', + 'nm-default-libnm.h', 'nm-device-private.h', 'nm-dhcp4-config.h', 'nm-dhcp6-config.h', 'nm-dns-manager.h', 'nm-ip4-config.h', 'nm-ip6-config.h', - 'nm-manager.h', + 'nm-libnm-utils.h', 'nm-object-private.h', - 'nm-property-compare.h', 'nm-remote-connection-private.h', + + 'nm-connection-private.h', + 'nm-default-libnm-core.h', + 'nm-property-compare.h', 'nm-setting-private.h', + 'nm-team-utils.h', 'nm-utils-private.h', + 'nm-core-tests-enum-types.h', 'test-general-enums.h', - - 'nm-keyfile-internal.h', - 'nm-keyfile-utils.h', - - 'nm-auth-subject.h', - 'nm-common-macros.h', - 'nm-ethtool-base.h', - 'nm-libnm-core-utils.h', - - 'nm-dispatcher-api.h', - 'nm-libnm-core-aux.h', ] scan_args = [ From 612c00529bd52e839ec996420b178dc20422d664 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 21:01:35 +0100 Subject: [PATCH 05/13] libnm,docs: ignore NM_DEPRECATED_IN_..._GUARDS gtk-doc gets confused by these, ignore them: common.py:ParseFunctionDeclaration:541:WARNING:Cannot parse args for function in "nm_device_get_hw_address) const char *nm_device_dummy_get_hw_address(NMDeviceDummy *device common.py:ParseFunctionDeclaration:541:WARNING:Cannot parse args for function in "nm_device_get_ports) const GPtrArray *nm_device_ovs_port_get_slaves(NMDeviceOvsPort *device For some reason it's still confused if NM_AVAILABLE_* comes first. I refuse to look into that, just reorder them. --- docs/libnm/Makefile.am | 2 +- docs/libnm/meson.build | 2 +- src/libnm-client-public/nm-device-dummy.h | 2 +- src/libnm-client-public/nm-device-macsec.h | 2 +- src/libnm-client-public/nm-device-macvlan.h | 2 +- src/libnm-client-public/nm-device-tun.h | 2 +- src/libnm-client-public/nm-device-vxlan.h | 2 +- src/libnm-client-public/nm-device-wifi-p2p.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am index c5a64a4fc..928ea5ee1 100644 --- a/docs/libnm/Makefile.am +++ b/docs/libnm/Makefile.am @@ -24,7 +24,7 @@ DOC_SOURCE_DIR= \ $(NULL) # Extra options to supply to gtkdoc-scan. -SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators="NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?" +SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators='NM_AVAILABLE_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+_FOR\(\)' # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode --output-format=xml diff --git a/docs/libnm/meson.build b/docs/libnm/meson.build index 5d332e504..5e742b6c3 100644 --- a/docs/libnm/meson.build +++ b/docs/libnm/meson.build @@ -29,7 +29,7 @@ private_headers = [ scan_args = [ '--rebuild-types', '--rebuild-sections', - '--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?', + '--ignore-decorators=NM_AVAILABLE_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+_FOR\(\)', '--ignore-headers=' + ' '.join(private_headers), ] diff --git a/src/libnm-client-public/nm-device-dummy.h b/src/libnm-client-public/nm-device-dummy.h index 0e6c6fe6c..f869d0f66 100644 --- a/src/libnm-client-public/nm-device-dummy.h +++ b/src/libnm-client-public/nm-device-dummy.h @@ -36,8 +36,8 @@ typedef struct _NMDeviceDummyClass NMDeviceDummyClass; GType nm_device_dummy_get_type(void); -NM_AVAILABLE_IN_1_10 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_10 const char *nm_device_dummy_get_hw_address(NMDeviceDummy *device); G_END_DECLS diff --git a/src/libnm-client-public/nm-device-macsec.h b/src/libnm-client-public/nm-device-macsec.h index 32187b7a4..307233d28 100644 --- a/src/libnm-client-public/nm-device-macsec.h +++ b/src/libnm-client-public/nm-device-macsec.h @@ -53,8 +53,8 @@ GType nm_device_macsec_get_type(void); NM_AVAILABLE_IN_1_42 NMDevice *nm_device_macsec_get_parent(NMDeviceMacsec *device); -NM_AVAILABLE_IN_1_6 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_6 const char *nm_device_macsec_get_hw_address(NMDeviceMacsec *device); NM_AVAILABLE_IN_1_6 diff --git a/src/libnm-client-public/nm-device-macvlan.h b/src/libnm-client-public/nm-device-macvlan.h index 852920692..432a72066 100644 --- a/src/libnm-client-public/nm-device-macvlan.h +++ b/src/libnm-client-public/nm-device-macvlan.h @@ -50,8 +50,8 @@ gboolean nm_device_macvlan_get_no_promisc(NMDeviceMacvlan *device); NM_AVAILABLE_IN_1_2 gboolean nm_device_macvlan_get_tap(NMDeviceMacvlan *device); -NM_AVAILABLE_IN_1_2 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_2 const char *nm_device_macvlan_get_hw_address(NMDeviceMacvlan *device); G_END_DECLS diff --git a/src/libnm-client-public/nm-device-tun.h b/src/libnm-client-public/nm-device-tun.h index 426903588..97b01d5fd 100644 --- a/src/libnm-client-public/nm-device-tun.h +++ b/src/libnm-client-public/nm-device-tun.h @@ -42,8 +42,8 @@ typedef struct _NMDeviceTunClass NMDeviceTunClass; NM_AVAILABLE_IN_1_2 GType nm_device_tun_get_type(void); -NM_AVAILABLE_IN_1_2 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_2 const char *nm_device_tun_get_hw_address(NMDeviceTun *device); NM_AVAILABLE_IN_1_2 diff --git a/src/libnm-client-public/nm-device-vxlan.h b/src/libnm-client-public/nm-device-vxlan.h index 1de1494b0..2024801f6 100644 --- a/src/libnm-client-public/nm-device-vxlan.h +++ b/src/libnm-client-public/nm-device-vxlan.h @@ -54,8 +54,8 @@ typedef struct _NMDeviceVxlanClass NMDeviceVxlanClass; NM_AVAILABLE_IN_1_2 GType nm_device_vxlan_get_type(void); -NM_AVAILABLE_IN_1_2 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_2 const char *nm_device_vxlan_get_hw_address(NMDeviceVxlan *device); NM_AVAILABLE_IN_1_42 diff --git a/src/libnm-client-public/nm-device-wifi-p2p.h b/src/libnm-client-public/nm-device-wifi-p2p.h index ecdb3b557..44b59ccf5 100644 --- a/src/libnm-client-public/nm-device-wifi-p2p.h +++ b/src/libnm-client-public/nm-device-wifi-p2p.h @@ -40,8 +40,8 @@ typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass; NM_AVAILABLE_IN_1_16 GType nm_device_wifi_p2p_get_type(void); -NM_AVAILABLE_IN_1_16 NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) +NM_AVAILABLE_IN_1_16 const char *nm_device_wifi_p2p_get_hw_address(NMDeviceWifiP2P *device); NM_AVAILABLE_IN_1_42 From 938c96135340ab3644630317bd2eb3e6a0b894c7 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 20:02:20 +0100 Subject: [PATCH 06/13] libnm/utils: add some missing deprecation guards Makes gtk-doc grumpy (but it likes getting grumpy too often for us to actually pay attention, it seems): libnm-core-impl/nm-utils.c:4342: warning: nm_utils_is_uuid is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.) libnm-client-impl/nm-device-ovs-bridge.c:36: warning: nm_device_ovs_bridge_get_slaves is deprecated in the inline comments, ... libnm-client-impl/nm-device-ovs-port.c:36: warning: nm_device_ovs_port_get_slaves is deprecated in the inline comments, ... libnm-client-impl/nm-device-team.c:77: warning: nm_device_team_get_slaves is deprecated in the inline comments, ... --- src/libnm-client-public/nm-device-ovs-bridge.h | 1 + src/libnm-client-public/nm-device-ovs-port.h | 1 + src/libnm-client-public/nm-device-team.h | 5 ++++- src/libnm-core-public/nm-utils.h | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libnm-client-public/nm-device-ovs-bridge.h b/src/libnm-client-public/nm-device-ovs-bridge.h index a6c9ff0bd..a2540114d 100644 --- a/src/libnm-client-public/nm-device-ovs-bridge.h +++ b/src/libnm-client-public/nm-device-ovs-bridge.h @@ -38,6 +38,7 @@ typedef struct _NMDeviceOvsBridgeClass NMDeviceOvsBridgeClass; NM_AVAILABLE_IN_1_10 GType nm_device_ovs_bridge_get_type(void); +NM_DEPRECATED_IN_1_34_FOR(nm_device_get_ports) NM_AVAILABLE_IN_1_14 const GPtrArray *nm_device_ovs_bridge_get_slaves(NMDeviceOvsBridge *device); diff --git a/src/libnm-client-public/nm-device-ovs-port.h b/src/libnm-client-public/nm-device-ovs-port.h index 8014ed91c..41c61cfa1 100644 --- a/src/libnm-client-public/nm-device-ovs-port.h +++ b/src/libnm-client-public/nm-device-ovs-port.h @@ -38,6 +38,7 @@ typedef struct _NMDeviceOvsPortClass NMDeviceOvsPortClass; NM_AVAILABLE_IN_1_10 GType nm_device_ovs_port_get_type(void); +NM_DEPRECATED_IN_1_34_FOR(nm_device_get_ports) NM_AVAILABLE_IN_1_14 const GPtrArray *nm_device_ovs_port_get_slaves(NMDeviceOvsPort *device); diff --git a/src/libnm-client-public/nm-device-team.h b/src/libnm-client-public/nm-device-team.h index 406949a10..f3f48ff60 100644 --- a/src/libnm-client-public/nm-device-team.h +++ b/src/libnm-client-public/nm-device-team.h @@ -39,8 +39,11 @@ GType nm_device_team_get_type(void); NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) const char *nm_device_team_get_hw_address(NMDeviceTeam *device); -gboolean nm_device_team_get_carrier(NMDeviceTeam *device); +gboolean nm_device_team_get_carrier(NMDeviceTeam *device); + +NM_DEPRECATED_IN_1_34_FOR(nm_device_get_ports) const GPtrArray *nm_device_team_get_slaves(NMDeviceTeam *device); + NM_AVAILABLE_IN_1_4 const char *nm_device_team_get_config(NMDeviceTeam *device); diff --git a/src/libnm-core-public/nm-utils.h b/src/libnm-core-public/nm-utils.h index 189383616..ca399c4c3 100644 --- a/src/libnm-core-public/nm-utils.h +++ b/src/libnm-core-public/nm-utils.h @@ -172,6 +172,7 @@ gboolean nm_utils_iface_valid_name(const char *name); NM_AVAILABLE_IN_1_6 gboolean nm_utils_is_valid_iface_name(const char *name, GError **error); +NM_DEPRECATED_IN_1_32 gboolean nm_utils_is_uuid(const char *str); /** From c37fbd32ad3f28ef2cc28e1e0014d5bf99bebad1 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 20:11:10 +0100 Subject: [PATCH 07/13] libnm/bond: fix malformed property doc libnm-core-impl/nm-setting-bond.c:602: warning: Parameter description for nm_setting_bond_validate_option::value (allow-none) is not used from source code comment block. --- src/libnm-core-impl/nm-setting-bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnm-core-impl/nm-setting-bond.c b/src/libnm-core-impl/nm-setting-bond.c index 99bcc8fae..a411607bd 100644 --- a/src/libnm-core-impl/nm-setting-bond.c +++ b/src/libnm-core-impl/nm-setting-bond.c @@ -601,7 +601,7 @@ handle_error: /** * nm_setting_bond_validate_option: * @name: the name of the option to validate - * @value (allow-none): the value of the option to validate. + * @value: (allow-none): the value of the option to validate. * * Checks whether @name is a valid bond option and @value is a valid value for * the @name. If @value is %NULL, the function only validates the option name. From b913ccec9c5e3bae4e46b5c6ee03287846133f70 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 19:53:07 +0100 Subject: [PATCH 08/13] libnm: fix a handful of misformatted gtk-doc blocks libnm-core-impl/nm-setting-bond.c:1276: warning: Symbol name not found at the start of the comment block. libnm-core-impl/nm-setting-vpn.c:1135: warning: Symbol name not found at the start of the comment block. libnm-core-impl/nm-setting-vpn.c:1158: warning: Symbol name not found at the start of the comment block. libnm-core-impl/nm-setting-wired.c:1560: warning: Symbol name not found at the start of the comment block. libnm-client-impl/nm-dhcp-config.c:149: warning: Symbol name not found at the start of the comment block. libnm-client-impl/nm-secret-agent-old.c:967: warning: Symbol name not found at the start of the comment block. libnm-client-impl/nm-secret-agent-old.c:1010: warning: Symbol name not found at the start of the comment block. libnm-client-impl/nm-secret-agent-old.c:1037: warning: Symbol name not found at the start of the comment block. --- src/libnm-client-impl/nm-dhcp-config.c | 2 +- src/libnm-client-impl/nm-secret-agent-old.c | 6 +++--- src/libnm-core-impl/nm-setting-bond.c | 2 +- src/libnm-core-impl/nm-setting-vpn.c | 4 ++-- src/libnm-core-impl/nm-setting-wired.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libnm-client-impl/nm-dhcp-config.c b/src/libnm-client-impl/nm-dhcp-config.c index 1f9084910..9730a6499 100644 --- a/src/libnm-client-impl/nm-dhcp-config.c +++ b/src/libnm-client-impl/nm-dhcp-config.c @@ -146,7 +146,7 @@ nm_dhcp_config_class_init(NMDhcpConfigClass *config_class) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); /** - * NMDhcpConfig:options: (type GHashTable(utf8,utf8)): + * NMDhcpConfig:options: (type GHashTable(utf8,utf8)) * * The #GHashTable containing options of the configuration. **/ diff --git a/src/libnm-client-impl/nm-secret-agent-old.c b/src/libnm-client-impl/nm-secret-agent-old.c index 595f78f48..93b6048f9 100644 --- a/src/libnm-client-impl/nm-secret-agent-old.c +++ b/src/libnm-client-impl/nm-secret-agent-old.c @@ -964,7 +964,7 @@ nm_secret_agent_old_unregister_finish(NMSecretAgentOld *self, GAsyncResult *resu /*****************************************************************************/ /** - * nm_secret_agent_old_get_secrets: (virtual get_secrets): + * nm_secret_agent_old_get_secrets: (virtual get_secrets) * @self: a #NMSecretAgentOld * @connection: the #NMConnection for which we're asked secrets * @setting_name: the name of the secret setting @@ -1007,7 +1007,7 @@ nm_secret_agent_old_get_secrets(NMSecretAgentOld *self, } /** - * nm_secret_agent_old_save_secrets: (virtual save_secrets): + * nm_secret_agent_old_save_secrets: (virtual save_secrets) * @self: a #NMSecretAgentOld * @connection: a #NMConnection * @callback: (scope async): a callback, to be invoked when the operation is done @@ -1034,7 +1034,7 @@ nm_secret_agent_old_save_secrets(NMSecretAgentOld *self, } /** - * nm_secret_agent_old_delete_secrets: (virtual delete_secrets): + * nm_secret_agent_old_delete_secrets: (virtual delete_secrets) * @self: a #NMSecretAgentOld * @connection: a #NMConnection * @callback: (scope async): a callback, to be invoked when the operation is done diff --git a/src/libnm-core-impl/nm-setting-bond.c b/src/libnm-core-impl/nm-setting-bond.c index a411607bd..54030e0b4 100644 --- a/src/libnm-core-impl/nm-setting-bond.c +++ b/src/libnm-core-impl/nm-setting-bond.c @@ -1273,7 +1273,7 @@ nm_setting_bond_class_init(NMSettingBondClass *klass) setting_class->verify = verify; /** - * NMSettingBond:options: (type GHashTable(utf8,utf8)): + * NMSettingBond:options: (type GHashTable(utf8,utf8)) * * Dictionary of key/value pairs of bonding options. Both keys and values * must be strings. Option names must contain only alphanumeric characters diff --git a/src/libnm-core-impl/nm-setting-vpn.c b/src/libnm-core-impl/nm-setting-vpn.c index 0c9e337f2..4ff989087 100644 --- a/src/libnm-core-impl/nm-setting-vpn.c +++ b/src/libnm-core-impl/nm-setting-vpn.c @@ -1132,7 +1132,7 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) persistent); /** - * NMSettingVpn:data: (type GHashTable(utf8,utf8)): + * NMSettingVpn:data: (type GHashTable(utf8,utf8)) * * Dictionary of key/value pairs of VPN plugin specific data. Both keys and * values must be strings. @@ -1155,7 +1155,7 @@ nm_setting_vpn_class_init(NMSettingVpnClass *klass) &nm_sett_info_propert_type_strdict); /** - * NMSettingVpn:secrets: (type GHashTable(utf8,utf8)): + * NMSettingVpn:secrets: (type GHashTable(utf8,utf8)) * * Dictionary of key/value pairs of VPN plugin specific secrets like * passwords or private keys. Both keys and values must be strings. diff --git a/src/libnm-core-impl/nm-setting-wired.c b/src/libnm-core-impl/nm-setting-wired.c index 45e8b5062..6381d1be6 100644 --- a/src/libnm-core-impl/nm-setting-wired.c +++ b/src/libnm-core-impl/nm-setting-wired.c @@ -1557,7 +1557,7 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass) s390_nettype); /** - * NMSettingWired:s390-options: (type GHashTable(utf8,utf8)): + * NMSettingWired:s390-options: (type GHashTable(utf8,utf8)) * * Dictionary of key/value pairs of s390-specific device options. Both keys * and values must be strings. Allowed keys include "portno", "layer2", From d4053a83af3dbc6330870a08d2ce6dfbe555b245 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 22:48:10 +0100 Subject: [PATCH 09/13] libnm: move nm-errors.h include away from nm-connection.h Most users included this by accident, by including nm-connection.h. That is not too great, becuase stuff it contains is by no means specific to NMConnection. Anyways, it's not like it would matter too that. I mainly care about it being included in NetworkManager.h, so that there's one less special case in a test that makes sure useful stuff from NetworkManager.h ends up in gtk-doc (a separate commit). --- src/core/nm-default-daemon.h | 1 + src/libnm-client-impl/nm-default-libnm.h | 1 + src/libnm-client-public/NetworkManager.h | 2 ++ src/libnm-core-impl/nm-default-libnm-core.h | 1 + src/libnm-core-public/nm-connection.h | 1 - 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/nm-default-daemon.h b/src/core/nm-default-daemon.h index 57d4c6afd..f8270ef4d 100644 --- a/src/core/nm-default-daemon.h +++ b/src/core/nm-default-daemon.h @@ -18,6 +18,7 @@ #include "nm-version.h" #include "nm-core-types.h" +#include "nm-errors.h" #include "nm-types.h" #include "libnm-log-core/nm-logging.h" diff --git a/src/libnm-client-impl/nm-default-libnm.h b/src/libnm-client-impl/nm-default-libnm.h index 859766a30..b9248e2b5 100644 --- a/src/libnm-client-impl/nm-default-libnm.h +++ b/src/libnm-client-impl/nm-default-libnm.h @@ -27,6 +27,7 @@ #include "nm-client.h" #include "nm-vpn-connection.h" #include "nm-libnm-utils.h" +#include "nm-errors.h" /*****************************************************************************/ diff --git a/src/libnm-client-public/NetworkManager.h b/src/libnm-client-public/NetworkManager.h index 1cd94d111..87954ae91 100644 --- a/src/libnm-client-public/NetworkManager.h +++ b/src/libnm-client-public/NetworkManager.h @@ -15,6 +15,8 @@ #include "nm-core-enum-types.h" +#include "nm-errors.h" + #include "nm-connection.h" #include "nm-simple-connection.h" #include "nm-keyfile.h" diff --git a/src/libnm-core-impl/nm-default-libnm-core.h b/src/libnm-core-impl/nm-default-libnm-core.h index 0f27f82d5..013df67d6 100644 --- a/src/libnm-core-impl/nm-default-libnm-core.h +++ b/src/libnm-core-impl/nm-default-libnm-core.h @@ -16,6 +16,7 @@ /*****************************************************************************/ #include "nm-version.h" +#include "nm-errors.h" /*****************************************************************************/ diff --git a/src/libnm-core-public/nm-connection.h b/src/libnm-core-public/nm-connection.h index 47004ce80..ff3e0f924 100644 --- a/src/libnm-core-public/nm-connection.h +++ b/src/libnm-core-public/nm-connection.h @@ -13,7 +13,6 @@ #include "nm-core-types.h" #include "nm-setting.h" -#include "nm-errors.h" G_BEGIN_DECLS From 07d06c196ef2db39b0aee9ce4eccbcfc9e3cbbd5 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 22:48:15 +0100 Subject: [PATCH 10/13] libnm: include device-vrf.h in NetworkManager.h Fixes: commit 667568d1b2be ('core,libnm: add VRF support') --- src/libnm-client-public/NetworkManager.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libnm-client-public/NetworkManager.h b/src/libnm-client-public/NetworkManager.h index 87954ae91..cae859666 100644 --- a/src/libnm-client-public/NetworkManager.h +++ b/src/libnm-client-public/NetworkManager.h @@ -122,6 +122,7 @@ #include "nm-device-tun.h" #include "nm-device-veth.h" #include "nm-device-vlan.h" +#include "nm-device-vrf.h" #include "nm-device-vxlan.h" #include "nm-device-wifi.h" #include "nm-device-wifi-p2p.h" From 422c9a44285bb915091f662e3a685a78f6aece0a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 22:48:24 +0100 Subject: [PATCH 11/13] libnm/conn-utils: include a documentation string This makes the index entry look nice. --- src/libnm-client-impl/nm-conn-utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libnm-client-impl/nm-conn-utils.c b/src/libnm-client-impl/nm-conn-utils.c index 5cfa26b83..223c18e62 100644 --- a/src/libnm-client-impl/nm-conn-utils.c +++ b/src/libnm-client-impl/nm-conn-utils.c @@ -14,6 +14,13 @@ #include "libnm-glib-aux/nm-secret-utils.h" #include "nm-simple-connection.h" +/** + * SECTION:nm-conn-utils + * @short_description: Connection utilities + * + * Extra connection functionality. + */ + static gboolean _wg_complete_peer(GPtrArray **p_peers, NMWireGuardPeer *peer_take, From 4c6b00d696e17e4b8e3ad90414caf3a1d3d739a8 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 22:48:41 +0100 Subject: [PATCH 12/13] docs/libnm: include a couple more files generated from headers These are part of the public API. Not including them makes links from API index dead (and sad). --- docs/libnm/libnm-docs.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/libnm/libnm-docs.xml b/docs/libnm/libnm-docs.xml index 11a1b7301..441a89e75 100644 --- a/docs/libnm/libnm-docs.xml +++ b/docs/libnm/libnm-docs.xml @@ -301,6 +301,7 @@ print ("NetworkManager version " + client.get_version())]]> + @@ -414,7 +415,10 @@ print ("NetworkManager version " + client.get_version())]]>Utility API Reference + + + From 03813a530a28c3f51a3a446e1bf9f4236be9869d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 13 Nov 2022 22:51:00 +0100 Subject: [PATCH 13/13] tools/check-docs: more checks for missing includes We get this wrong *very* often. --- tools/check-docs.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tools/check-docs.sh b/tools/check-docs.sh index c2e6761d0..ecf42d038 100755 --- a/tools/check-docs.sh +++ b/tools/check-docs.sh @@ -69,12 +69,35 @@ F2="$(grep -l "$(sed -n 's/^[\t ]*\(.*_get_type\);/\1/p' "$SOURCEDIR/src/libnm-c F2_EXTRA=" annotation-glossary api-index-full +nm-conn-utils nm-dbus-interface nm-errors +nm-ethtool-utils nm-keyfile nm-utils nm-version +nm-version-macros +nm-vpn-dbus-interface " if ! same_lines "$F1"$'\n'"$F1_EXTRA" "$F2"$'\n'"$F2_EXTRA"; then die "*** Error: libnm classes not included in docs/libnm/libnm-docs.xml ***" fi + +F1="$(sed -n 's/^#include "\(nm-.*\).h"$/xml\/\1.xml/p' "$SOURCEDIR/src/libnm-client-public/NetworkManager.h")" +F1_EXTRA=" +xml/annotation-glossary.xml +xml/api-index-full.xml +xml/nm-setting-ovs-external-ids.xml +xml/nm-version-macros.xml +xml/nm-secret-agent-old.xml +xml/nm-vpn-plugin-old.xml +" +F2="$(sed -n 's/.*