update
This commit is contained in:
parent
57bd6b27c1
commit
8bc0c7bd3b
@ -1,82 +0,0 @@
|
||||
From d5ed990caffecec6d1ba8f52c8c3319e1e994137 Mon Sep 17 00:00:00 2001
|
||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||
Date: Tue, 3 Sep 2019 15:11:16 +0200
|
||||
Subject: [PATCH] build: fix errors when building with gtk-doc 1.32
|
||||
|
||||
gtkdoc-scan 1.32 performs stricter checks on structures definitions
|
||||
and so it complains on:
|
||||
|
||||
/build/networkmanager/src/NetworkManager/libnm/./nm-vpn-plugin-old.h:0: warning: partial declaration (struct) : typedef struct {
|
||||
NM_DEPRECATED_IN_1_2
|
||||
GObject parent;
|
||||
} NMVpnPluginOld NM_DEPRECATED_IN_1_2;
|
||||
|
||||
because of the unrecognized token 'NM_DEPRECATED_IN_1_2'.
|
||||
|
||||
Pass all allowed macros to gtkdoc-scan through the --ignore-decorators
|
||||
argument.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gtk-doc/issues/98
|
||||
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/238
|
||||
(cherry picked from commit 2d941dc95a1d94d023ac8f98df2f344dbb1d223e)
|
||||
---
|
||||
docs/libnm/Makefile.am | 4 +++-
|
||||
docs/libnm/meson.build | 4 ++++
|
||||
tools/decorators.sh | 7 +++++++
|
||||
3 files changed, 14 insertions(+), 1 deletion(-)
|
||||
create mode 100755 tools/decorators.sh
|
||||
|
||||
diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am
|
||||
index 7aa9810e81..ded32f8218 100644
|
||||
--- a/docs/libnm/Makefile.am
|
||||
+++ b/docs/libnm/Makefile.am
|
||||
@@ -18,8 +18,10 @@ DOC_SOURCE_DIR= \
|
||||
$(top_srcdir)/libnm \
|
||||
$(top_builddir)/libnm
|
||||
|
||||
+decorators := $(shell $(top_srcdir)/tools/decorators.sh $(top_srcdir)/libnm-core/nm-version.h)
|
||||
+
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
-SCAN_OPTIONS=--rebuild-types --rebuild-sections
|
||||
+SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators "$(decorators)"
|
||||
|
||||
# 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 c031a3176f..3403b339d7 100644
|
||||
--- a/docs/libnm/meson.build
|
||||
+++ b/docs/libnm/meson.build
|
||||
@@ -32,6 +32,9 @@ configure_file(
|
||||
configuration: version_conf,
|
||||
)
|
||||
|
||||
+result = run_command(join_paths(meson.source_root(), 'tools', 'decorators.sh'),
|
||||
+ join_paths(meson.source_root(), 'libnm-core', 'nm-version.h'))
|
||||
+
|
||||
gnome.gtkdoc(
|
||||
doc_module,
|
||||
main_xml: doc_module + '-docs.xml',
|
||||
@@ -43,6 +46,7 @@ gnome.gtkdoc(
|
||||
scan_args: [
|
||||
'--rebuild-types',
|
||||
'--rebuild-sections',
|
||||
+ '--ignore-decorators=' + result.stdout().strip(),
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
scanobjs_args: '--type-init-func="g_type_init();"',
|
||||
diff --git a/tools/decorators.sh b/tools/decorators.sh
|
||||
new file mode 100755
|
||||
index 0000000000..7af7b1e494
|
||||
--- /dev/null
|
||||
+++ b/tools/decorators.sh
|
||||
@@ -0,0 +1,7 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# Extract NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros from a
|
||||
+# header file and output them in a way suitable to be passed to
|
||||
+# 'gtkdoc-scan --ignore-decorators'
|
||||
+
|
||||
+grep -o "NM_DEPRECATED_IN_[0-9]_[0-9]\+$\|NM_AVAILABLE_IN_[0-9]_[0-9]\+$" "$1" | sed ':a;N;$!ba;s/\n/|/g'
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Binary file not shown.
BIN
NetworkManager-1.20.10.tar.xz
Normal file
BIN
NetworkManager-1.20.10.tar.xz
Normal file
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
%global wpa_supplicant_version 1:1.1
|
||||
%global ppp_version %(sed -n 's/^#define\\s*VERSION\\s*"\\([^\\s]*\\)"$/\\1/p' %{_includedir}/pppd/patchlevel.h 2>/dev/null | grep . || echo bad)
|
||||
%global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad)
|
||||
%global real_version 1.16.0
|
||||
%global real_version 1.20.10
|
||||
%global snapshot %{nil}
|
||||
%global git_sha %{nil}
|
||||
%global obsoletes_device_plugins 1:0.9.9.95-1
|
||||
@ -44,9 +44,9 @@
|
||||
%global dhcp_default dhclient
|
||||
|
||||
Name: NetworkManager
|
||||
Version: 1.16.0
|
||||
Version: 1.20.10
|
||||
Epoch: 1
|
||||
Release: 8
|
||||
Release: 1
|
||||
Summary: Network Link Manager and User Applications
|
||||
License: GPLv2+
|
||||
URL: https://www.gnome.org/projects/NetworkManager/
|
||||
@ -54,7 +54,6 @@ Source: https://download.gnome.org/sources/NetworkManager/%{real_versi
|
||||
Source1: NetworkManager.conf
|
||||
Source2: 00-server.conf
|
||||
# PATCH-FEATURE-FIX fix-wants-and-add-requires.patch --fix wants and add requires in the file of NetworkManager.service.in
|
||||
Patch0001: Fix-errors-when-building-with-gtk-doc.patch
|
||||
Patch9000: fix-wants-and-add-requires.patch
|
||||
Patch9001: bugfix-NetworkManager-tui-solve-bond-module.patch
|
||||
Patch9002: bugfix-NetworkManager-tui-bond-page-when-modify.patch
|
||||
@ -395,6 +394,12 @@ fi
|
||||
%{_datadir}/gtk-doc/html/NetworkManager/*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 22 2020 zhujunhao <zhujunhao8@huawei.com> - 1.20.10-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update to 1.20.10
|
||||
|
||||
* Mon Jun 22 2020 yanan li <liyanan032@huawei.com> - 1.16.0-8
|
||||
- Fix errors when building with gtk-doc.
|
||||
|
||||
|
||||
@ -1,105 +1,89 @@
|
||||
From 600ac34d381425f715ceff4cbaead751fae69430 Mon Sep 17 00:00:00 2001
|
||||
From: zhangyao <zhangyao65@huawei.com>
|
||||
Date: Wed, 25 Sep 2019 17:33:40 +0800
|
||||
Subject: [PATCH] NetworkManager-tui: solve bond module
|
||||
|
||||
---
|
||||
.../libnm-core/nm-core-internal.h | 1 +
|
||||
NetworkManager-1.16.0/libnm-core/nm-setting-bond.c | 29 ++++++++++++++++++++--
|
||||
.../libnm-core/tests/test-setting.c | 2 +-
|
||||
3 files changed, 29 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git NetworkManager-1.16.0/libnm-core/nm-core-internal.h NetworkManager-1.16.0/libnm-core/nm-core-internal.h
|
||||
index f2332f7..64d7f65 100644
|
||||
--- NetworkManager-1.16.0/libnm-core/nm-core-internal.h
|
||||
+++ NetworkManager-1.16.0/libnm-core/nm-core-internal.h
|
||||
@@ -461,6 +461,7 @@ typedef enum {
|
||||
diff -Nur NetworkManager-1.20.10.org/libnm-core/nm-core-internal.h NetworkManager-1.20.10/libnm-core/nm-core-internal.h
|
||||
--- NetworkManager-1.20.10.org/libnm-core/nm-core-internal.h 2020-06-12 11:29:24.997178184 +0800
|
||||
+++ NetworkManager-1.20.10/libnm-core/nm-core-internal.h 2020-06-12 14:14:02.965298351 +0800
|
||||
@@ -495,6 +495,7 @@
|
||||
NM_BOND_OPTION_TYPE_IP,
|
||||
NM_BOND_OPTION_TYPE_MAC,
|
||||
NM_BOND_OPTION_TYPE_IFNAME,
|
||||
+ NM_BOND_OPTION_TYPE_PRIMARY_SLAVE,
|
||||
+ NM_BOND_OPTION_TYPE_PRIMARY_SLAVE,
|
||||
} NMBondOptionType;
|
||||
|
||||
NMBondOptionType
|
||||
diff --git NetworkManager-1.16.0/libnm-core/nm-setting-bond.c NetworkManager-1.16.0/libnm-core/nm-setting-bond.c
|
||||
index 51ce2de..5b60435 100644
|
||||
--- NetworkManager-1.16.0/libnm-core/nm-setting-bond.c
|
||||
+++ NetworkManager-1.16.0/libnm-core/nm-setting-bond.c
|
||||
@@ -79,8 +79,8 @@ static const BondDefault defaults[] = {
|
||||
diff -Nur NetworkManager-1.20.10.org/libnm-core/nm-setting-bond.c NetworkManager-1.20.10/libnm-core/nm-setting-bond.c
|
||||
--- NetworkManager-1.20.10.org/libnm-core/nm-setting-bond.c 2020-06-12 11:29:24.997178184 +0800
|
||||
+++ NetworkManager-1.20.10/libnm-core/nm-setting-bond.c 2020-06-12 14:19:44.310508536 +0800
|
||||
@@ -77,7 +77,7 @@
|
||||
{ NM_SETTING_BOND_OPTION_ARP_IP_TARGET, "", NM_BOND_OPTION_TYPE_IP },
|
||||
{ NM_SETTING_BOND_OPTION_ARP_VALIDATE, "none", NM_BOND_OPTION_TYPE_BOTH, 0, 3,
|
||||
{ "none", "active", "backup", "all", NULL } },
|
||||
{ NM_SETTING_BOND_OPTION_ARP_VALIDATE, "none", NM_BOND_OPTION_TYPE_BOTH, 0, 6,
|
||||
{ "none", "active", "backup", "all", "filter", "filter_active", "filter_backup", NULL } },
|
||||
- { NM_SETTING_BOND_OPTION_PRIMARY, "", NM_BOND_OPTION_TYPE_IFNAME },
|
||||
- { NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, "always", NM_BOND_OPTION_TYPE_BOTH, 0, 2,
|
||||
+ { NM_SETTING_BOND_OPTION_PRIMARY, "", NM_BOND_OPTION_TYPE_PRIMARY_SLAVE },
|
||||
+ { NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, "always", NM_BOND_OPTION_TYPE_BOTH, 0, 2,
|
||||
{ NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, "always", NM_BOND_OPTION_TYPE_BOTH, 0, 2,
|
||||
{ "always", "better", "failure", NULL } },
|
||||
{ NM_SETTING_BOND_OPTION_FAIL_OVER_MAC, "none", NM_BOND_OPTION_TYPE_BOTH, 0, 2,
|
||||
{ "none", "active", "follow", NULL } },
|
||||
@@ -234,7 +234,16 @@ validate_ip (const char *name, const char *value)
|
||||
@@ -232,7 +232,16 @@
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
+static gboolean
|
||||
+nm_check_primary_slave (const char *value)
|
||||
+{
|
||||
+ if (!value || !value[0]) {
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (!value || !value[0]){
|
||||
+ return TRUE;
|
||||
+ }
|
||||
|
||||
+ return nm_utils_is_valid_iface_name (value, NULL);
|
||||
+
|
||||
+ return nm_utils_is_valid_iface_name (value, NULL);
|
||||
+}
|
||||
static gboolean
|
||||
validate_ifname (const char *name, const char *value)
|
||||
{
|
||||
@@ -282,6 +291,8 @@ nm_setting_bond_validate_option (const char *name,
|
||||
@@ -280,6 +289,8 @@
|
||||
return nm_utils_hwaddr_valid (value, ETH_ALEN);
|
||||
case NM_BOND_OPTION_TYPE_IFNAME:
|
||||
return validate_ifname (name, value);
|
||||
+ case NM_BOND_OPTION_TYPE_PRIMARY_SLAVE:
|
||||
+ return nm_check_primary_slave (value);
|
||||
+ case NM_BOND_OPTION_TYPE_PRIMARY_SLAVE:
|
||||
+ return nm_check_primary_slave (value);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -335,6 +346,9 @@ nm_setting_bond_add_option (NMSettingBond *setting,
|
||||
@@ -333,6 +344,9 @@
|
||||
const char *value)
|
||||
{
|
||||
NMSettingBondPrivate *priv;
|
||||
+ const char *init_updelay = "0";
|
||||
+ const char *init_downdelay = "0";
|
||||
+ const char *tmp = NULL;
|
||||
+ const char *init_updelay = "0";
|
||||
+ const char *init_downdelay = "0";
|
||||
+ const char *tmp = NULL;
|
||||
|
||||
g_return_val_if_fail (NM_IS_SETTING_BOND (setting), FALSE);
|
||||
|
||||
@@ -350,11 +364,22 @@ nm_setting_bond_add_option (NMSettingBond *setting,
|
||||
@@ -348,11 +362,22 @@
|
||||
&& strcmp (value, "0") != 0) {
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_INTERVAL);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
|
||||
+
|
||||
+ tmp = g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, NM_SETTING_BOND_OPTION_DOWNDELAY);
|
||||
+ if (!tmp) {
|
||||
+ g_hash_table_insert (priv->options, g_strdup (NM_SETTING_BOND_OPTION_DOWNDELAY), g_strdup (init_downdelay));
|
||||
+ }
|
||||
+ tmp = g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, NM_SETTING_BOND_OPTION_UPDELAY);
|
||||
+ if (!tmp) {
|
||||
+ g_hash_table_insert (priv->options, g_strdup (NM_SETTING_BOND_OPTION_UPDELAY), g_strdup (init_updelay));
|
||||
+ }
|
||||
+ tmp = g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options, NM_SETTING_BOND_OPTION_DOWNDELAY);
|
||||
+ if(!tmp){
|
||||
+ g_hash_table_insert (priv->options, g_strdup (NM_SETTING_BOND_OPTION_DOWNDELAY), g_strdup (init_downdelay));
|
||||
+ }
|
||||
+ tmp = g_hash_table_lookup (NM_SETTING_BOND_GET_PRIVATE (setting)->options,NM_SETTING_BOND_OPTION_UPDELAY);
|
||||
+ if(!tmp){
|
||||
+ g_hash_table_insert (priv->options, g_strdup (NM_SETTING_BOND_OPTION_UPDELAY),g_strdup (init_updelay));
|
||||
+ }
|
||||
} else if ( !strcmp (name, NM_SETTING_BOND_OPTION_ARP_INTERVAL)
|
||||
&& strcmp (value, "0") != 0) {
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_MIIMON);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_DOWNDELAY);
|
||||
g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_UPDELAY);
|
||||
+ } else if ( !strcmp (name, NM_SETTING_BOND_OPTION_PRIMARY) && !strcmp (value, "") ) {
|
||||
+ g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_PRIMARY);
|
||||
+ }else if( !strcmp (name, NM_SETTING_BOND_OPTION_PRIMARY) && !strcmp (value, "") ){
|
||||
+ g_hash_table_remove (priv->options, NM_SETTING_BOND_OPTION_PRIMARY);
|
||||
}
|
||||
|
||||
_notify (setting, PROP_OPTIONS);
|
||||
diff --git NetworkManager-1.16.0/libnm-core/tests/test-setting.c NetworkManager-1.16.0/libnm-core/tests/test-setting.c
|
||||
index 2011273..4c72d02 100644
|
||||
--- NetworkManager-1.16.0/libnm-core/tests/test-setting.c
|
||||
+++ NetworkManager-1.16.0/libnm-core/tests/test-setting.c
|
||||
@@ -678,7 +678,7 @@ test_bond_normalize (void)
|
||||
diff -Nur NetworkManager-1.20.10.org/libnm-core/tests/test-setting.c NetworkManager-1.20.10/libnm-core/tests/test-setting.c
|
||||
--- NetworkManager-1.20.10.org/libnm-core/tests/test-setting.c 2020-06-12 11:29:24.993178124 +0800
|
||||
+++ NetworkManager-1.20.10/libnm-core/tests/test-setting.c 2020-06-12 14:08:36.560383748 +0800
|
||||
@@ -688,7 +688,7 @@
|
||||
((const char *[]){ "mode", "802.3ad", "ad_actor_system", "00:02:03:04:05:06", NULL }));
|
||||
test_bond_normalize_options (
|
||||
((const char *[]){ "mode", "1", "miimon", "1", NULL }),
|
||||
@ -108,6 +92,3 @@ index 2011273..4c72d02 100644
|
||||
test_bond_normalize_options (
|
||||
((const char *[]){ "mode", "balance-alb", "tlb_dynamic_lb", "1", NULL }),
|
||||
((const char *[]){ "mode", "balance-alb", NULL }));
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user