From baeb08b05b395a798ead78991661b8431b90c26c Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 28 Mar 2024 09:43:04 +0000 Subject: [PATCH] import CS NetworkManager-1.46.0-1.el9 --- .NetworkManager.metadata | 2 +- .gitignore | 2 +- ...for-ipv4.dad-timeout-from-0-to-200ms.patch | 61 +++++++++ ...exported-on-D-Bus-in-aut-rhbz2210271.patch | 54 -------- ...gfault-crash-when-rollback-rhel-1526.patch | 67 --------- SOURCES/22-wifi-mac-addr.conf | 31 +++++ SOURCES/readme-ifcfg-rh-migrated.txt | 84 ++++++++++++ SPECS/NetworkManager.spec | 129 ++++++++++++++---- 8 files changed, 281 insertions(+), 149 deletions(-) create mode 100644 SOURCES/0001-revert-change-default-value-for-ipv4.dad-timeout-from-0-to-200ms.patch delete mode 100644 SOURCES/1001-nm-manager-ensure-device-is-exported-on-D-Bus-in-aut-rhbz2210271.patch delete mode 100644 SOURCES/1002-checkpoint-Fix-segfault-crash-when-rollback-rhel-1526.patch create mode 100644 SOURCES/22-wifi-mac-addr.conf create mode 100644 SOURCES/readme-ifcfg-rh-migrated.txt diff --git a/.NetworkManager.metadata b/.NetworkManager.metadata index dab89c7..51191f7 100644 --- a/.NetworkManager.metadata +++ b/.NetworkManager.metadata @@ -1 +1 @@ -b3d857c8fdfae1dd36d6bd833cd84a85fcf71880 SOURCES/NetworkManager-1.44.0.tar.xz +3c11d700a2e81a7abce285ab94d015ac966f59d3 SOURCES/NetworkManager-1.46.0.tar.xz diff --git a/.gitignore b/.gitignore index 22242f5..32f1f94 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/NetworkManager-1.44.0.tar.xz +SOURCES/NetworkManager-1.46.0.tar.xz diff --git a/SOURCES/0001-revert-change-default-value-for-ipv4.dad-timeout-from-0-to-200ms.patch b/SOURCES/0001-revert-change-default-value-for-ipv4.dad-timeout-from-0-to-200ms.patch new file mode 100644 index 0000000..2eec3bc --- /dev/null +++ b/SOURCES/0001-revert-change-default-value-for-ipv4.dad-timeout-from-0-to-200ms.patch @@ -0,0 +1,61 @@ +diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c +index 16f8e1f261..036233e668 100644 +--- a/src/core/devices/nm-device.c ++++ b/src/core/devices/nm-device.c +@@ -1661,7 +1661,7 @@ _prop_get_ipv4_dad_timeout(NMDevice *self) + self, + 0, + NM_SETTING_IP_CONFIG_DAD_TIMEOUT_MAX, +- 200); ++ 0); + } + + static guint32 +diff --git a/src/libnm-core-impl/nm-setting-ip-config.c b/src/libnm-core-impl/nm-setting-ip-config.c +index bfebe7d13d..de56ed74ea 100644 +--- a/src/libnm-core-impl/nm-setting-ip-config.c ++++ b/src/libnm-core-impl/nm-setting-ip-config.c +@@ -6655,7 +6655,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass) + * + * A zero value means that no duplicate address detection is performed, -1 means + * the default value (either the value configured globally in NetworkManger.conf +- * or 200ms). A value greater than zero is a timeout in milliseconds. Note that ++ * or zero). A value greater than zero is a timeout in milliseconds. Note that + * the time intervals are subject to randomization as per RFC 5227 and so the + * actual duration can be between half and the full time specified in this + * property. +diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in +index 77cde6620e..e42cb74e7f 100644 +--- a/src/libnmc-setting/settings-docs.h.in ++++ b/src/libnmc-setting/settings-docs.h.in +@@ -162,7 +162,7 @@ + #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_TRANSPORT_MODE N_("The IP-over-InfiniBand transport mode. Either \"datagram\" or \"connected\".") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ADDRESSES N_("A list of IPv4 addresses and their prefix length. Multiple addresses can be separated by comma. For example \"192.168.1.5/24, 10.1.0.5/24\". The addresses are listed in decreasing priority, meaning the first address will be the primary address.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_AUTO_ROUTE_EXT_GW N_("VPN connections will default to add the route automatically unless this setting is set to FALSE. For other connection types, adding such an automatic route is currently not supported and setting this to TRUE has no effect.") +-#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DAD_TIMEOUT N_("Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4. A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or 200ms). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.") ++#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DAD_TIMEOUT N_("Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4. A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or zero). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID N_("A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options. When the property is a hex string ('aa:bb:cc') it is interpreted as a binary client ID, in which case the first byte is assumed to be the 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet ARP type and the rest is a MAC address). If the property is not a hex string it is considered as a non-hardware-address client ID and the 'type' field is set to 0. The special values \"mac\" and \"perm-mac\" are supported, which use the current or permanent MAC address of the device to generate a client identifier with type ethernet (01). Currently, these options only work for ethernet type of links. The special value \"ipv6-duid\" uses the DUID from \"ipv6.dhcp-duid\" property as an RFC4361-compliant client identifier. As IAID it uses \"ipv4.dhcp-iaid\" and falls back to \"ipv6.dhcp-iaid\" if unset. The special value \"duid\" generates a RFC4361-compliant client identifier based on \"ipv4.dhcp-iaid\" and uses a DUID generated by hashing /etc/machine-id. The special value \"stable\" is supported to generate a type 0 client identifier based on the stable-id (see connection.stable-id) and a per-host key. If you set the stable-id, you may want to include the \"${DEVICE}\" or \"${MAC}\" specifier to get a per-device key. The special value \"none\" prevents any client identifier from being sent. Note that this is normally not recommended. If unset, a globally configured default from NetworkManager.conf is used. If still unset, the default depends on the DHCP plugin. The internal dhcp client will default to \"mac\" and the dhclient plugin will try to use one from its config file if present, or won't sent any client-id otherwise.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_DSCP N_("Specifies the value for the DSCP field (traffic class) of the IP header. When empty, the global default value is used; if no global default is specified, it is assumed to be \"CS0\". Allowed values are: \"CS0\", \"CS4\" and \"CS6\". The property is currently valid only for IPv4, and it is supported only by the \"internal\" DHCP plugin.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_FQDN N_("If the \"dhcp-send-hostname\" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-hostname\" are mutually exclusive and cannot be set at the same time.") +@@ -192,7 +192,7 @@ + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE N_("Configure method for creating the IPv6 interface identifer of addresses with RFC4862 IPv6 Stateless Address Autoconfiguration and Link Local addresses. The permitted values are: \"eui64\" (0), \"stable-privacy\" (1), \"default\" (3) or \"default-or-eui64\" (2). If the property is set to \"eui64\", the addresses will be generated using the interface token derived from hardware address. This makes the host part of the address to stay constant, making it possible to track the host's presence when it changes networks. The address changes when the interface hardware is replaced. If a duplicate address is detected, there is also no fallback to generate another address. When configured, the \"ipv6.token\" is used instead of the MAC address to generate addresses for stateless autoconfiguration. If the property is set to \"stable-privacy\", the interface identifier is generated as specified by RFC7217. This works by hashing a host specific key (see NetworkManager(8) manual), the interface name, the connection's \"connection.stable-id\" property and the address prefix. This improves privacy by making it harder to use the address to track the host's presence and the address is stable when the network interface hardware is replaced. The special values \"default\" and \"default-or-eui64\" will fallback to the global connection default as documented in the NetworkManager.conf(5) manual. If the global default is not specified, the fallback value is \"stable-privacy\" or \"eui64\", respectively. If not specified, when creating a new profile the default is \"default\". Note that this setting is distinct from the Privacy Extensions as configured by \"ip6-privacy\" property and it does not affect the temporary addresses configured with this option.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ADDRESSES N_("A list of IPv6 addresses and their prefix length. Multiple addresses can be separated by comma. For example \"2001:db8:85a3::8a2e:370:7334/64, 2001:db8:85a3::5/64\". The addresses are listed in decreasing priority, meaning the first address will be the primary address. This can make a difference with IPv6 source address selection (RFC 6724, section 5).") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_AUTO_ROUTE_EXT_GW N_("VPN connections will default to add the route automatically unless this setting is set to FALSE. For other connection types, adding such an automatic route is currently not supported and setting this to TRUE has no effect.") +-#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DAD_TIMEOUT N_("Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4. A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or 200ms). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.") ++#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DAD_TIMEOUT N_("Maximum timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. The property is currently implemented only for IPv4. A zero value means that no duplicate address detection is performed, -1 means the default value (either the value configured globally in NetworkManger.conf or zero). A value greater than zero is a timeout in milliseconds. Note that the time intervals are subject to randomization as per RFC 5227 and so the actual duration can be between half and the full time specified in this property.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_DSCP N_("Specifies the value for the DSCP field (traffic class) of the IP header. When empty, the global default value is used; if no global default is specified, it is assumed to be \"CS0\". Allowed values are: \"CS0\", \"CS4\" and \"CS6\". The property is currently valid only for IPv4, and it is supported only by the \"internal\" DHCP plugin.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_DUID N_("A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried in the Client Identifier option. If the property is a hex string ('aa:bb:cc') it is interpreted as a binary DUID and filled as an opaque value in the Client Identifier option. The special value \"lease\" will retrieve the DUID previously used from the lease file belonging to the connection. If no DUID is found and \"dhclient\" is the configured dhcp client, the DUID is searched in the system-wide dhclient lease file. If still no DUID is found, or another dhcp client is used, a global and permanent DUID-UUID (RFC 6355) will be generated based on the machine-id. The special values \"llt\" and \"ll\" will generate a DUID of type LLT or LL (see RFC 3315) based on the current MAC address of the device. In order to try providing a stable DUID-LLT, the time field will contain a constant timestamp that is used globally (for all profiles) and persisted to disk. The special values \"stable-llt\", \"stable-ll\" and \"stable-uuid\" will generate a DUID of the corresponding type, derived from the connection's stable-id and a per-host unique key. You may want to include the \"${DEVICE}\" or \"${MAC}\" specifier in the stable-id, in case this profile gets activated on multiple devices. So, the link-layer address of \"stable-ll\" and \"stable-llt\" will be a generated address derived from the stable id. The DUID-LLT time value in the \"stable-llt\" option will be picked among a static timespan of three years (the upper bound of the interval is the same constant timestamp used in \"llt\"). When the property is unset, the global value provided for \"ipv6.dhcp-duid\" is used. If no global value is provided, the default \"lease\" value is assumed.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_HOSTNAME N_("If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time.") +diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +index 8806bf2550..09648f3ff8 100644 +--- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in ++++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +@@ -1337,7 +1337,7 @@ + values="-1 - 2147483647" + special-values="default (-1), infinity (2147483647)" /> + diff --git a/SOURCES/1001-nm-manager-ensure-device-is-exported-on-D-Bus-in-aut-rhbz2210271.patch b/SOURCES/1001-nm-manager-ensure-device-is-exported-on-D-Bus-in-aut-rhbz2210271.patch deleted file mode 100644 index 1867761..0000000 --- a/SOURCES/1001-nm-manager-ensure-device-is-exported-on-D-Bus-in-aut-rhbz2210271.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 6302c2ea52c6c28d36b6006b29823c469e171e2a Mon Sep 17 00:00:00 2001 -From: Wen Liang -Date: Thu, 3 Aug 2023 10:16:42 -0400 -Subject: [PATCH] nm-manager: ensure device is exported on D-Bus in - authentication request - -The device authentication request is an async process, it can not know -the answer right away, it is not guarantee that device is still -exported on D-Bus when authentication finishes. Thus, do not return -SUCCESS and abort the authentication request when device is not alive. - -https://bugzilla.redhat.com/show_bug.cgi?id=2210271 -(cherry picked from commit b341161e2a4988403ae4a6ef7653e01567da36a0) -(cherry picked from commit 0e27e84247ed824b27d105292d7bf42dc0341cbb) ---- - src/core/nm-manager.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c -index 9c7212202b..937acbba1e 100644 ---- a/src/core/nm-manager.c -+++ b/src/core/nm-manager.c -@@ -3222,6 +3222,13 @@ device_auth_done_cb(NMAuthChain *chain, GDBusMethodInvocation *context, gpointer - nm_assert(error || (result == NM_AUTH_CALL_RESULT_YES)); - } - -+ if (!error && !nm_dbus_object_is_exported(NM_DBUS_OBJECT(device))) { -+ g_set_error(&error, -+ NM_MANAGER_ERROR, -+ NM_MANAGER_ERROR_UNKNOWN_DEVICE, -+ "device no longer exists"); -+ } -+ - callback(device, context, subject, error, nm_auth_chain_get_data(chain, "user-data")); - } - -@@ -3287,6 +3294,14 @@ nm_manager_device_auth_request(NMManager *self, - &error)) - goto fail_on_idle; - -+ if (!nm_dbus_object_is_exported(NM_DBUS_OBJECT(device))) { -+ g_set_error(&error, -+ NM_MANAGER_ERROR, -+ NM_MANAGER_ERROR_UNKNOWN_DEVICE, -+ "device no longer exists"); -+ goto fail_on_idle; -+ } -+ - chain = nm_auth_chain_new_subject(subject, context, device_auth_done_cb, self); - if (cancellable) - nm_auth_chain_set_cancellable(chain, cancellable); --- -2.41.0 - diff --git a/SOURCES/1002-checkpoint-Fix-segfault-crash-when-rollback-rhel-1526.patch b/SOURCES/1002-checkpoint-Fix-segfault-crash-when-rollback-rhel-1526.patch deleted file mode 100644 index 63671a3..0000000 --- a/SOURCES/1002-checkpoint-Fix-segfault-crash-when-rollback-rhel-1526.patch +++ /dev/null @@ -1,67 +0,0 @@ -From d9b3114b6ef8e0f4d50a8d56d750a698d85fa984 Mon Sep 17 00:00:00 2001 -From: Gris Ge -Date: Tue, 29 Aug 2023 08:25:23 +0800 -Subject: [PATCH] checkpoint: Fix segfault crash when rollback - -When rolling back a checkpoint, NM will crash due to dereference a NULL -pointer of `priv->removed_devices->len`. - -To fix it, we just place a NULL check before that code block. - -Fixes: 1f1b71ad9f8a ('checkpoint: preserve devices that were removed and - readded') - -Reference: https://issues.redhat.com/browse/RHEL-1526 - -Signed-off-by: Gris Ge -(cherry picked from commit 3162507d6ca381cfbe02ceba2d80ba0f3ba3e5f7) -(cherry picked from commit e5600d4c5a33749939b984184f27fbe4159a2b65) ---- - src/core/nm-checkpoint.c | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - -diff --git a/src/core/nm-checkpoint.c b/src/core/nm-checkpoint.c -index 5c4d4e53d6..74adf48477 100644 ---- a/src/core/nm-checkpoint.c -+++ b/src/core/nm-checkpoint.c -@@ -460,24 +460,27 @@ next_dev: - NMDeviceState state; - - nm_manager_for_each_device (priv->manager, device, tmp_lst) { -- gboolean found = FALSE; -- - if (g_hash_table_contains(priv->devices, device)) - continue; - - /* Also ignore devices that were in the checkpoint initially and - * were moved to 'removed_devices' because they got removed from - * the system. */ -- for (i = 0; i < priv->removed_devices->len; i++) { -- dev_checkpoint = priv->removed_devices->pdata[i]; -- if (dev_checkpoint->dev_type == nm_device_get_device_type(device) -- && nm_streq0(dev_checkpoint->original_dev_name, nm_device_get_iface(device))) { -- found = TRUE; -- break; -+ if (priv->removed_devices) { -+ gboolean found = FALSE; -+ -+ for (i = 0; i < priv->removed_devices->len; i++) { -+ dev_checkpoint = priv->removed_devices->pdata[i]; -+ if (dev_checkpoint->dev_type == nm_device_get_device_type(device) -+ && nm_streq0(dev_checkpoint->original_dev_name, -+ nm_device_get_iface(device))) { -+ found = TRUE; -+ break; -+ } - } -+ if (found) -+ continue; - } -- if (found) -- continue; - - state = nm_device_get_state(device); - if (state > NM_DEVICE_STATE_DISCONNECTED && state < NM_DEVICE_STATE_DEACTIVATING) { --- -2.41.0 - diff --git a/SOURCES/22-wifi-mac-addr.conf b/SOURCES/22-wifi-mac-addr.conf new file mode 100644 index 0000000..2e329c8 --- /dev/null +++ b/SOURCES/22-wifi-mac-addr.conf @@ -0,0 +1,31 @@ +# This sets defaults for Wi-Fi profiles to set a generated, stable MAC address. +# +# Do not modify this file. You can hide/overwrite this file by placing a file +# to "/etc/NetworkManager/conf.d/22-wifi-mac-addr.conf". You can also add +# configuration snippets with higher priority that override this setting (see +# `man 5 NetworkManager.conf`). Most importantly, this snippet only sets +# default values for the profile. You can explicitly set the value for each +# profile, so that this default value is not used. +# +# For example, on a particular profile/network set +# +# $ nmcli connection modify "$PROFILE" wifi.cloned-mac-address permanent +# +# to use the hardware MAC address. This prevents the default from this file +# to take effect. +# +# Or +# +# $ nmcli connection modify "$PROFILE" wifi.cloned-mac-address stable connection.stable-id '${NETWORK_SSID}/${BOOT}' +# +# to get a generated MAC address that changes on each boot. Note how setting +# "connection.stable-id" also affects other aspects of the profile. +# +# See `man 5 nm-settings` for "wifi.cloned-mac-address" and "connection.stable-id". + +[connection.22-wifi-mac-addr] +match-device=type:wifi +wifi.cloned-mac-address=stable-ssid + +[.config] +enable=nm-version-min:1.45 diff --git a/SOURCES/readme-ifcfg-rh-migrated.txt b/SOURCES/readme-ifcfg-rh-migrated.txt new file mode 100644 index 0000000..aabbcc8 --- /dev/null +++ b/SOURCES/readme-ifcfg-rh-migrated.txt @@ -0,0 +1,84 @@ +NetworkManager was built to automatically migrate connection profiles in +this directory to equivalent ones in keyfile format in directory +/etc/NetworkManager/system-connections. + +You can check whether the migration is enabled via: + + $ NetworkManager --print-config | grep migrate-ifcfg-rh + +In case it is enabled, all files in this directory are migrated at startup. + +To inspect where your connection files are currently stored use: + + $ nmcli -f name,uuid,filename connection + +Background +========== + +The ifcfg format is deprecated and will be removed in future releases. For +more information see: + +https://lists.freedesktop.org/archives/networkmanager/2023-May/000103.html + +Connection profiles in keyfile format have many benefits. For example, this +format is INI file-based and can easily be parsed and generated. + +Each section in NetworkManager keyfiles corresponds to a NetworkManager +setting name as described in the nm-settings(5) and nm-settings-keyfile(5) +man pages. Each key-value pair in a section is one of the properties listed +in the settings specification of the man page. + +How to keep using ifcfg +======================= + +If you want to keep using connection profiles in ifcfg format, you need to: + + - disable the automatic migration to keyfile by setting + "migrate-ifcfg-rh=false" in the [main] section of NetworkManager + configuration; + + - optionally, set "plugins=ifcfg-rh" in the [main] section of + NetworkManager configuration so that new profiles are created in ifcfg + format. + +At this point, you can migrate all your files back via + + nmcli connection migrate --plugin ifcfg-rh + +Or, if you prefer to migrate only specific connections: + + nmcli connection migrate --plugin ifcfg-rh + +Note that some connection types are not supported by the ifcfg plugin. + +Interface renaming +================== + +Connection profiles stored in ifcfg-rh format support the renaming of +interfaces via udev. This is done via a helper tool +/usr/lib/udev/rename_device that is invoked by udev to parse the files +in /etc/sysconfig/network-scripts; when the HWADDR and DEVICE +variables are set, the interface that matches the MAC address in +HWADDR is renamed to the name specified in DEVICE. + +Connections in keyfile format don't provide the same integration with +udev. The renaming of interfaces must be configured directly in udev, +for example by creating a file: + + /etc/systemd/network/70-rename.link + +with content: + + [Match] + MACAddress=00:11:22:33:44:56 + + [Link] + Name=ethernet1 + +Alternatively, a udev rule can also be used, such as: + + /etc/udev/rules.d/70-interface-names.rules + +with content: + + SUBSYSTEM=="net",ACTION=="add",ATTR{address}=="00:11:22:33:44:56",ATTR{type}=="1",NAME="ethernet1" diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 16f3c36..f9dc0b0 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -4,9 +4,9 @@ %global glib2_version %(pkg-config --modversion glib-2.0 2>/dev/null || echo bad) %global epoch_version 1 -%global real_version 1.44.0 +%global real_version 1.46.0 %global rpm_version %{real_version} -%global release_version 3 +%global release_version 1 %global snapshot %{nil} %global git_sha %{nil} %global bcond_default_debug 0 @@ -155,12 +155,18 @@ %global split_ifcfg_rh 0 %endif -%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 +%if (0%{?fedora} >= 36 && 0%{?fedora} < 39) || 0%{?rhel} >= 9 %global ifcfg_warning 1 %else %global ifcfg_warning 0 %endif +%if 0%{?fedora} >= 39 +%global ifcfg_migrate 1 +%else +%global ifcfg_migrate 0 +%endif + %if 0%{?fedora} # Although eBPF would be available on Fedora's kernel, it seems # we often get SELinux denials (rh#1651654). But even aside them, @@ -185,7 +191,7 @@ Epoch: %{epoch_version} Version: %{rpm_version} Release: %{release_version}%{?snap}%{?dist} Group: System Environment/Base -License: GPLv2+ and LGPLv2+ +License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: https://networkmanager.dev/ Source: https://download.gnome.org/sources/NetworkManager/%{real_version_major}/%{name}-%{real_version}.tar.xz @@ -193,17 +199,19 @@ Source1: NetworkManager.conf Source2: 00-server.conf Source4: 20-connectivity-fedora.conf Source5: 20-connectivity-redhat.conf -Source6: 70-nm-connectivity.conf -Source7: readme-ifcfg-rh.txt +Source6: 22-wifi-mac-addr.conf +Source7: 70-nm-connectivity.conf +Source8: readme-ifcfg-rh.txt +Source9: readme-ifcfg-rh-migrated.txt # RHEL downstream patches that change behavior from upstream. # These are not bugfixes, hence they are also relevant after # the next rebase of the source tarball. # Patch0001: 0001-some.patch +Patch0001: 0001-revert-change-default-value-for-ipv4.dad-timeout-from-0-to-200ms.patch # Bugfixes that are only relevant until next rebase of the package. -Patch1001: 1001-nm-manager-ensure-device-is-exported-on-D-Bus-in-aut-rhbz2210271.patch -Patch1002: 1002-checkpoint-Fix-segfault-crash-when-rollback-rhel-1526.patch +# Patch1001: 1001-some.patch Requires(post): systemd %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -222,7 +230,7 @@ Requires: libndp >= %{libndp_version} %endif Obsoletes: NetworkManager < %{obsoletes_device_plugins} Obsoletes: NetworkManager < %{obsoletes_ppp_plugin} -Obsoletes: NetworkManager-wimax < 1.2 +Obsoletes: NetworkManager-wimax < 1:1.2 %if 0%{?rhel} && 0%{?rhel} == 8 Suggests: NetworkManager-initscripts-updown %endif @@ -293,21 +301,10 @@ BuildRequires: mobile-broadband-provider-info-devel BuildRequires: newt-devel %endif BuildRequires: /usr/bin/dbus-launch -%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 BuildRequires: python3 BuildRequires: python3-gobject-base BuildRequires: python3-dbus BuildRequires: python3-pexpect -%else -BuildRequires: python2 -BuildRequires: pygobject3-base -BuildRequires: dbus-python -BuildRequires: pexpect -%if 0%{?rhel} >= 7 && %{with meson} -BuildRequires: python36-dbus -BuildRequires: python36-gobject -%endif -%endif BuildRequires: libselinux-devel BuildRequires: polkit-devel BuildRequires: jansson-devel @@ -390,7 +387,7 @@ Obsoletes: NetworkManager < %{obsoletes_device_plugins} # Team was split from main NM binary between 0.9.10 and 1.0 # We need this Obsoletes in addition to the one above # (git:3aede801521ef7bff039e6e3f1b3c7b566b4338d). -Obsoletes: NetworkManager < 1.0.0 +Obsoletes: NetworkManager < 1:1.0.0 %endif %description team @@ -478,7 +475,7 @@ This package contains NetworkManager support for PPP. Summary: Libraries for adding NetworkManager support to applications. Group: Development/Libraries Conflicts: NetworkManager-glib < 1:1.31.0 -License: LGPLv2+ +License: LGPL-2.1-or-later %description libnm This package contains the libraries that make it easier to use some @@ -491,7 +488,7 @@ Group: Development/Libraries Requires: %{name}-libnm%{?_isa} = %{epoch}:%{version}-%{release} Requires: glib2-devel Requires: pkgconfig -License: LGPLv2+ +License: LGPL-2.1-or-later %description libnm-devel This package contains the header and pkg-config files for development @@ -740,6 +737,9 @@ Preferably use nmcli instead. -Ddist_version=%{version}-%{release} \ %if %{?config_plugins_default_ifcfg_rh} -Dconfig_plugins_default=ifcfg-rh \ +%endif +%if %{?ifcfg_migrate} + -Dconfig_migrate_ifcfg_rh_default=true \ %endif -Dresolvconf=no \ -Dnetconfig=no \ @@ -885,6 +885,9 @@ autoreconf --install --force --with-dist-version=%{version}-%{release} \ %if %{?config_plugins_default_ifcfg_rh} --with-config-plugins-default=ifcfg-rh \ +%endif +%if %{?ifcfg_migrate} + --with-config-migrate-ifcfg-rh-default=yes \ %endif --with-resolvconf=no \ --with-netconfig=no \ @@ -913,11 +916,18 @@ cp %{SOURCE4} %{buildroot}%{nmlibdir}/conf.d/ %if %{with connectivity_redhat} cp %{SOURCE5} %{buildroot}%{nmlibdir}/conf.d/ mkdir -p %{buildroot}%{_sysctldir} -cp %{SOURCE6} %{buildroot}%{_sysctldir} +cp %{SOURCE7} %{buildroot}%{_sysctldir} +%endif + +%if 0%{?fedora} >= 40 +cp %{SOURCE6} %{buildroot}%{nmlibdir}/conf.d/ %endif %if 0%{?ifcfg_warning} -cp %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts +cp %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts +%endif +%if 0%{?ifcfg_migrate} +cp %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/readme-ifcfg-rh.txt %endif cp examples/dispatcher/10-ifcfg-rh-routes.sh %{buildroot}%{nmlibdir}/dispatcher.d/ @@ -1064,6 +1074,9 @@ fi %dir %{_sysconfdir}/%{name}/dnsmasq-shared.d %dir %{_sysconfdir}/%{name}/system-connections %config(noreplace) %{_sysconfdir}/%{name}/NetworkManager.conf +%if 0%{?fedora} >= 40 +%{nmlibdir}/conf.d/22-wifi-mac-addr.conf +%endif %ghost %{_sysconfdir}/%{name}/VPN %{_bindir}/nm-online %{_libexecdir}/nm-dhcp-helper @@ -1110,7 +1123,7 @@ fi %{_unitdir}/nm-priv-helper.service %dir %{_datadir}/doc/NetworkManager/examples %{_datadir}/doc/NetworkManager/examples/server.conf -%if 0%{?ifcfg_warning} +%if 0%{?ifcfg_warning} || 0%{?ifcfg_migrate} %{_sysconfdir}/sysconfig/network-scripts/readme-ifcfg-rh.txt %endif %doc NEWS AUTHORS README.md CONTRIBUTING.md @@ -1253,6 +1266,70 @@ fi %changelog +* Thu Feb 22 2024 Stanislas FAYE +- Update to 1.46.0 release +- Fix DHCPv4 lease can't be renewed after it expires (RHEL-24127) +- Support the MACsec offload mode (RHEL-24337) +- Support creating generic devices via external "device-handler" dispatcher (RHEL-1567) +- Support changing the eswitch mode (RHEL-1441) + +* Fri Feb 09 2024 Íñigo Huguet - 1.45.91-1 +- Update to 1.45.91 release (release candidate) +- Support changing the DSCP header field for DHCP packets, and set the default to CS0 (RHEL-16040) +- Deprecate connection.autoconnect-slaves in favour of autoconnect-ports (RHEL-17621) +- Don't reset bridge's PVID in reapply if it didn't change (RHEL-21576) + +* Thu Jan 25 2024 Stanislas FAYE - 1.45.90-1 +- Update to 1.45.90 release (release candidate) +- Deprecate and Replace connection.slave-type in libnm-core and libnm (RHEL-17620) +- [RFE] Support assigning IPv4 static route to interface without IPv4 address (RHEL-5098) + +* Mon Jan 15 2024 Stanislas FAYE - 1.45.10-1 +- Update to 1.45.10 (development) +- Deprecate and Replace connection.master in libnm-core and libnm (RHEL-17619) + +* Thu Dec 14 2023 Ján Václav - 1.45.9-1 +- Update to 1.45.9 (development) +- Add support for PRP/HSR interface (RHEL-5852) +- Drop support for the 'slaves-order' option in NetworkManager.conf (RHEL-19437) +- Return error when setting invalid IP addresses or properties via D-Bus (RHEL-19315) +- Fix extra route being created besides ECMP route (RHEL-1682) + +* Wed Nov 29 2023 Beniamino Galvani - 1.45.8-1 +- Update to 1.45.8 (development) +- Introduce "stable-ssid" option for wifi.cloned-mac-address property (RHEL-16470) + +* Thu Nov 16 2023 Íñigo Huguet - 1.45.7-1 +- Update to 1.45.7 release (development) +- Migrate to SPDX license + +* Wed Nov 1 2023 Beniamino Galvani - 1.45.6-1 +- Update to 1.45.6 release (development) +- Fix ovs activation with netdev datapath and cloned MAC (RHEL-5886) + +* Wed Oct 18 2023 Íñigo Huguet - 1.45.5-1 +- Update to 1.45.5 release (development) +- Various fixes to Duplicate Address Detection (DAD) (RHEL-1581, RHEL-1411) +- New option to avoid sending the DHCPv4 client-identifier (RHEL-1469) +- Support setting channels in ethtool options (RHEL-1471) + +* Wed Oct 04 2023 Íñigo Huguet - 1.45.4-1 +- Update to 1.45.4 release (development) +- Add 'dns-change' dispatcher event (RHEL-1671) + +* Fri Sep 22 2023 Beniamino Galvani - 1.45.3-1 +- Update to 1.45.3 release (development) +- Improve explanation of the format and routes properties in keyfile man page (RHEL-1407) +- Improve nm-settings-nmcli manpage to show format and valid values of properties (RHEL-2465) +- Honor the autoactivate priority for port connections (RHEL-2202) +- Properly document valid values for ip-tunnel properties (RHEL-1459) + +* Wed Sep 6 2023 Beniamino Galvani - 1.45.2-1 +- update to 1.45.2 release (development) + +* Mon Sep 04 2023 Gris Ge - 1.44.0-4 +- Rebuild for RHEL 9.4 + * Wed Aug 30 2023 Fernando Fernandez Mancera - 1:1.44.0-3 - checkpoint: Fix segfault crash when rollback (rhel-1526)