Projects
Factory:RISC-V:Base
NetworkManager
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 6
View file
_service:tar_scm:NetworkManager.spec
Changed
@@ -50,7 +50,7 @@ Name: NetworkManager Version: 1.32.12 Epoch: 1 -Release: 16 +Release: 18 Summary: Network Link Manager and User Applications License: GPLv2+ URL: https://networkmanager.dev/ @@ -68,6 +68,8 @@ Patch6003: backport-libnm-fix-warning-when-setting-wrong-ethtool-ternary-value.patch Patch6004: fix-minor-written-mistake.patch Patch6005: NetworkManager-Add-sw64-architecture.patch +Patch6006: delete-lease-file-when-connection-deleted.patch +Patch6007: bugfix-correct-info-for-nmcli-device-connect.patch BuildRequires: gcc libtool pkgconfig automake autoconf intltool gettext-devel ppp-devel gnutls-devel BuildRequires: dbus-devel dbus-glib-devel glib2-devel gobject-introspection-devel jansson-devel @@ -488,6 +490,18 @@ %{_datadir}/gtk-doc/html/NetworkManager/* %changelog +* Thu Mar 30 2023 Dongxing Wang <dxwangk@isoftstone.com> - 1:1.32.12-18 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:correct the info for nmcli device connect + +* Mon Mar 20 2023 sunsuwan <sunsuwan3@huawei.com> - 1:1.32.12-17 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:delete lease file when connection deleted + * Wed Dec 7 2022 chendexi <chendexi@kylinos.cn> - 1:1.32.12-16 - Type:bugfix - CVE:NA
View file
_service:tar_scm:bugfix-correct-info-for-nmcli-device-connect.patch
Added
@@ -0,0 +1,25 @@ +From 50ffde33c10ad5c536857bcdfcd815b9a25b9de7 Mon Sep 17 00:00:00 2001 +From: desert-sailor <dxwangk@isoftstone.com> +Date: Thu, 30 Mar 2023 15:24:14 +0800 +Subject: PATCH bugfix for incorrect translations + +--- + po/zh_CN.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/po/zh_CN.po b/po/zh_CN.po +index 6df2d6a..de279f8 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -12456,7 +12456,7 @@ msgstr "错误:超时时间 %d 秒已到。" + #: ../src/nmcli/devices.c:2076 + #, c-format + msgid "Device '%s' successfully activated with '%s'.\n" +-msgstr "成功用 \"%s%s\" 激活了设备 \"\"。\n" ++msgstr "设备 \"%s\" 成功以 \"%s\" 激活。\n" + + #: ../src/nmcli/devices.c:2082 + #, c-format +-- +2.33.0 +
View file
_service:tar_scm:delete-lease-file-when-connection-deleted.patch
Added
@@ -0,0 +1,140 @@ +From 1c42631f72215ce02d8571c6d61ffae481744ce3 Mon Sep 17 00:00:00 2001 +From: gaoxingwang <gaoxingwang1@huawei.com> +Date: Sat, 17 Dec 2022 21:01:26 +0800 +Subject: PATCH delete lease file when connection deleted +Currently, the dhclient-uid-xxx.lease file generated in nmcli add/del mode will + not be deleted, which is unreasonable. In this deletion, only the specified + lease file is deleted in the nmcli del phase. + +Signed-off-by: gaoxingwang <gaoxingwang1@huawei.com> +Signed-off-by: liaichun <liaichun@huawei.com> +--- + src/nmcli/connections.c | 105 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 105 insertions(+) + +diff --git a/src/nmcli/connections.c b/src/nmcli/connections.c +index 9f700ca..8f68c02 100644 +--- a/src/nmcli/connections.c ++++ b/src/nmcli/connections.c +@@ -8989,6 +8989,110 @@ delete_cb(GObject *con, GAsyncResult *result, gpointer user_data) + } + } + ++static const char * ++_addr_family_to_path_part(int addr_family) ++{ ++ nm_assert(NM_IN_SET(addr_family, AF_INET, AF_INET6)); ++ return (addr_family == AF_INET6) ? "6" : ""; ++} ++ ++static gboolean ++nm_dhcp_utils_get_leasefile_path(int addr_family, ++ const char *plugin_name, ++ const char *iface, ++ const char *uuid, ++ char ** out_leasefile_path) ++{ ++ gs_free char *rundir_path = NULL; ++ gs_free char *statedir_path = NULL; ++ ++ rundir_path = g_strdup_printf(NMRUNDIR "/%s%s-%s-%s.lease", ++ plugin_name, ++ _addr_family_to_path_part(addr_family), ++ uuid, ++ iface); ++ ++ if (g_file_test(rundir_path, G_FILE_TEST_EXISTS)) { ++ *out_leasefile_path = g_steal_pointer(&rundir_path); ++ return TRUE; ++ } ++ ++ statedir_path = g_strdup_printf(NMSTATEDIR "/%s%s-%s-%s.lease", ++ plugin_name, ++ _addr_family_to_path_part(addr_family), ++ uuid, ++ iface); ++ ++ if (g_file_test(statedir_path, G_FILE_TEST_EXISTS)) { ++ *out_leasefile_path = g_steal_pointer(&statedir_path); ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++static char * ++get_dhclient_leasefile(int addr_family, const char *iface, const char *uuid, char **out_preferred_path) ++{ ++ gs_free char *path = NULL; ++ ++ if (nm_dhcp_utils_get_leasefile_path(addr_family, "dhclient", iface, uuid, &path)) { ++ NM_SET_OUT(out_preferred_path, g_strdup(path)); ++ return g_steal_pointer(&path); ++ } ++ ++ NM_SET_OUT(out_preferred_path, g_steal_pointer(&path)); ++ ++ /* If the leasefile we're looking for doesn't exist yet in the new location ++ * (eg, /var/lib/NetworkManager) then look in old locations to maintain ++ * backwards compatibility with external tools (like dracut) that put ++ * leasefiles there. ++ */ ++ ++ /* Old Debian, SUSE, and Mandriva location */ ++ g_free(path); ++ path = g_strdup_printf(LOCALSTATEDIR "/lib/dhcp/dhclient%s-%s-%s.lease", ++ _addr_family_to_path_part(addr_family), ++ uuid, ++ iface); ++ if (g_file_test(path, G_FILE_TEST_EXISTS)) ++ return g_steal_pointer(&path); ++ ++ /* Old Red Hat and Fedora location */ ++ g_free(path); ++ path = g_strdup_printf(LOCALSTATEDIR "/lib/dhclient/dhclient%s-%s-%s.lease", ++ _addr_family_to_path_part(addr_family), ++ uuid, ++ iface); ++ if (g_file_test(path, G_FILE_TEST_EXISTS)) ++ return g_steal_pointer(&path); ++ ++ /* Fail */ ++ return NULL; ++} ++ ++static void ++do_lease_file_delete(NMConnection *connection) ++{ ++ gs_free char *ip4_leasefile = NULL; ++ gs_free char *ip6_leasefile = NULL; ++ ip4_leasefile = get_dhclient_leasefile(AF_INET, ++ nm_connection_get_id(connection), ++ nm_connection_get_uuid(connection), ++ NULL); ++ ++ ip6_leasefile = get_dhclient_leasefile(AF_INET6, ++ nm_connection_get_id(connection), ++ nm_connection_get_uuid(connection), ++ NULL); ++ ++ if (ip4_leasefile) { ++ (void) unlink(ip4_leasefile); ++ } ++ if (ip6_leasefile) { ++ (void) unlink(ip6_leasefile); ++ } ++} ++ + static void + do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *argv) + { +@@ -9085,6 +9189,7 @@ do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co + info->cancellable, + delete_cb, + info); ++ do_lease_file_delete(found_cons->pdatai); + } + + finish: +-- +2.27.0 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2