Sync from SUSE:ALP:Source:Standard:1.0 NetworkManager revision df120b0fcaa32357dea4772796ccf911
This commit is contained in:
commit
2a13e9f631
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
@ -0,0 +1,28 @@
|
||||
From 3e53521b50b7150118fbb729def0a2a1364c5aae Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Larrosa <antonio.larrosa@gmail.com>
|
||||
Date: Thu, 21 Mar 2019 11:08:36 +0100
|
||||
Subject: [PATCH] Coerce connectivity "LIMITED" to "NONE" when device is
|
||||
disconnected
|
||||
|
||||
If the device is disconnected it can't have any connectivity, so we can
|
||||
set it to NONE instead of LIMITED.
|
||||
|
||||
Fixes #138
|
||||
---
|
||||
src/devices/nm-device.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: NetworkManager-1.42.2/src/core/devices/nm-device.c
|
||||
===================================================================
|
||||
--- NetworkManager-1.42.2.orig/src/core/devices/nm-device.c
|
||||
+++ NetworkManager-1.42.2/src/core/devices/nm-device.c
|
||||
@@ -5758,7 +5758,8 @@ concheck_update_state(NMDevice
|
||||
state = NM_CONNECTIVITY_LIMITED;
|
||||
} else
|
||||
state = NM_CONNECTIVITY_NONE;
|
||||
- }
|
||||
+ } else if (state == NM_CONNECTIVITY_LIMITED && priv->state <= NM_DEVICE_STATE_DISCONNECTED)
|
||||
+ state = NM_CONNECTIVITY_NONE;
|
||||
|
||||
if (priv->concheck_x[IS_IPv4].state == state) {
|
||||
/* we got a connectivity update, but the state didn't change. If we were probing,
|
19
NetworkManager-1.10.6-netconfig.patch
Normal file
19
NetworkManager-1.10.6-netconfig.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Index: NetworkManager-1.40.0/src/core/dns/nm-dns-manager.c
|
||||
===================================================================
|
||||
--- NetworkManager-1.40.0.orig/src/core/dns/nm-dns-manager.c
|
||||
+++ NetworkManager-1.40.0/src/core/dns/nm-dns-manager.c
|
||||
@@ -698,6 +698,14 @@ dispatch_netconfig(NMDnsManager *se
|
||||
gssize l;
|
||||
nm_auto_free_gstring GString *str = NULL;
|
||||
|
||||
+ if (!g_file_test (NETCONFIG_PATH, G_FILE_TEST_IS_EXECUTABLE)) {
|
||||
+ g_set_error_literal (error,
|
||||
+ NM_MANAGER_ERROR,
|
||||
+ NM_MANAGER_ERROR_FAILED,
|
||||
+ NETCONFIG_PATH " is not executable");
|
||||
+ return SR_NOTFOUND;
|
||||
+ }
|
||||
+
|
||||
pid = run_netconfig(self, error, &fd);
|
||||
if (pid <= 0)
|
||||
return SR_NOTFOUND;
|
BIN
NetworkManager-1.42.6.tar.xz
(Stored with Git LFS)
Normal file
BIN
NetworkManager-1.42.6.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
11
NetworkManager-rpmlintrc
Normal file
11
NetworkManager-rpmlintrc
Normal file
@ -0,0 +1,11 @@
|
||||
# We have an unversioned branding-requires-unversioned
|
||||
# NetworkManager-branding on purpose, hence filter it out.
|
||||
addFilter("branding-requires-unversioned*");
|
||||
|
||||
# Filter out warning about missing systemd-service-without-service
|
||||
# post/pre/postun/preun, we do not want to enable this service by
|
||||
# default.
|
||||
addFilter("systemd-service-without-service_add_post NetworkManager-wait-online.service");
|
||||
addFilter("systemd-service-without-service_add_pre NetworkManager-wait-online.service");
|
||||
addFilter("systemd-service-without-service_del_postun NetworkManager-wait-online.service");
|
||||
addFilter("systemd-service-without-service_del_preun NetworkManager-wait-online.service");
|
5520
NetworkManager.changes
Normal file
5520
NetworkManager.changes
Normal file
File diff suppressed because it is too large
Load Diff
52
NetworkManager.conf
Normal file
52
NetworkManager.conf
Normal file
@ -0,0 +1,52 @@
|
||||
# Configuration file for NetworkManager.
|
||||
#
|
||||
# See "man 5 NetworkManager.conf" for details.
|
||||
#
|
||||
# The directories /usr/lib/NetworkManager/conf.d/ and /run/NetworkManager/conf.d/
|
||||
# can contain additional .conf snippets installed by packages. These files are
|
||||
# read before NetworkManager.conf and have thus lowest priority.
|
||||
# The directory /etc/NetworkManager/conf.d/ can contain additional .conf
|
||||
# snippets. Those snippets are merged last and overwrite the settings from this main
|
||||
# file.
|
||||
#
|
||||
# The files within one conf.d/ directory are read in asciibetical order.
|
||||
#
|
||||
# You can prevent loading a file /usr/lib/NetworkManager/conf.d/NAME.conf
|
||||
# by having a file NAME.conf in either /run/NetworkManager/conf.d/ or /etc/NetworkManager/conf.d/.
|
||||
# Likewise, snippets from /run can be prevented from loading by placing
|
||||
# a file with the same name in /etc/NetworkManager/conf.d/.
|
||||
#
|
||||
# If two files define the same key, the one that is read afterwards will overwrite
|
||||
# the previous one.
|
||||
|
||||
[main]
|
||||
#plugins=keyfile
|
||||
|
||||
|
||||
[logging]
|
||||
# When debugging NetworkManager, enabling debug logging is of great help.
|
||||
#
|
||||
# Logfiles contain no passwords and little sensitive information. But please
|
||||
# check before posting the file online. You can also personally hand over the
|
||||
# logfile to a NM developer to treat it confidential. Meet us on #nm on Libera.Chat.
|
||||
#
|
||||
# You can also change the log-level at runtime via
|
||||
# $ nmcli general logging level TRACE domains ALL
|
||||
# However, usually it's cleaner to enable debug logging
|
||||
# in the configuration and restart NetworkManager so that
|
||||
# debug logging is enabled from the start.
|
||||
#
|
||||
# You will find the logfiles in syslog, for example via
|
||||
# $ journalctl -u NetworkManager
|
||||
#
|
||||
# Please post full logfiles for bug reports without pre-filtering or truncation.
|
||||
# Also, for debugging the entire `journalctl` output can be interesting. Don't
|
||||
# limit unnecessarily with `journalctl -u`. Exceptions are if you are worried
|
||||
# about private data. Check before posting logfiles!
|
||||
#
|
||||
# Note that debug logging of NetworkManager can be quite verbose. Some messages
|
||||
# might be rate-limited by the logging daemon (see RateLimitIntervalSec, RateLimitBurst
|
||||
# in man journald.conf). Please disable rate-limiting before collecting debug logs!
|
||||
#
|
||||
#level=TRACE
|
||||
#domains=ALL
|
519
NetworkManager.spec
Normal file
519
NetworkManager.spec
Normal file
@ -0,0 +1,519 @@
|
||||
#
|
||||
# spec file for package NetworkManager
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Toggle this whenever enabling/disabling the nm-probe-radius-server-cert.patch patch (as we export additional symbols)
|
||||
# Like this, g-c-c and NM-applet, which consume this symbol, will block updating NM if we have to disable the patch until
|
||||
# they are touched too
|
||||
%define with_cacert_patch 0
|
||||
%global _udevdir %(pkg-config --variable udevdir udev)
|
||||
%global _pppddir %(ls -d %{_libdir}/pppd/2.?.?)
|
||||
%global _dbusconfdir %{_datadir}/dbus-1/system.d
|
||||
|
||||
### Handy switches for easy testing of experimental features:
|
||||
# (Remember that _with = OFF and _without = ON)
|
||||
|
||||
# FIXME: We should find out how to run specific tests and avoid
|
||||
# tests that are doomed to fail in OBS.
|
||||
# From "test-client.py --help":
|
||||
# test-client.py MyTestCase.testSomething - run MyTestCase.testSomething
|
||||
# Summary of Failures:
|
||||
#07/74 check-local-exports-libnm FAIL 0.11s exit status 1
|
||||
#08/74 platform/test-address-linux FAIL 0.03s killed by signal 6 SIGABRT
|
||||
#10/74 platform/test-cleanup-linux FAIL 0.03s killed by signal 6 SIGABRT
|
||||
#12/74 platform/test-link-linux FAIL 0.03s killed by signal 6 SIGABRT
|
||||
#16/74 platform/test-route-linux FAIL 0.03s killed by signal 6 SIGABRT
|
||||
#17/74 platform/test-tc-linux FAIL 0.03s killed by signal 6 SIGABRT
|
||||
#24/74 test-l3cfg FAIL 0.10s killed by signal 6 SIGABRT
|
||||
#38/74 devices/test-acd FAIL 0.04s killed by signal 6 SIGABRT
|
||||
%bcond_with TESTS
|
||||
%if %{with TESTS}
|
||||
%define tests_meson_opt yes
|
||||
%else
|
||||
%define tests_meson_opt no
|
||||
%endif
|
||||
|
||||
# NetworkManager uses netconfig in SLES products only.
|
||||
%if 0%{?suse_version} > 1500
|
||||
%define with_netconfig 0
|
||||
%else
|
||||
%define with_netconfig 1
|
||||
%endif
|
||||
|
||||
# Libaudit: yes-disabled-by-default enables support, but disables
|
||||
# it unless explicitly configured via NetworkManager.conf
|
||||
%bcond_without LIBAUDIT
|
||||
%if %{with LIBAUDIT}
|
||||
%define libaudit_meson_opt yes-disabled-by-default
|
||||
%else
|
||||
%define libaudit_meson_opt no
|
||||
%endif
|
||||
|
||||
Name: NetworkManager
|
||||
Version: 1.42.6
|
||||
Release: 0
|
||||
Summary: Network Link Manager and user applications for it
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
Group: Productivity/Networking/System
|
||||
URL: https://www.gnome.org/projects/NetworkManager/
|
||||
Source0: https://download.gnome.org/sources/NetworkManager/1.42/%{name}-%{version}.tar.xz
|
||||
Source1: nfs
|
||||
Source2: NetworkManager.conf
|
||||
Source3: baselibs.conf
|
||||
Source4: conncheck-disabled.conf
|
||||
Source98: macros.NetworkManager
|
||||
Source99: NetworkManager-rpmlintrc
|
||||
|
||||
# PATCH-FEATURE-OPENSUSE systemd-network-config.patch -- don't try to start NM under systemd if it is disabled in system configuration
|
||||
Patch0: systemd-network-config.patch
|
||||
# PATCH-FIX-UPSTREAM nm-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- Probe the RADIUS server certificate
|
||||
Patch1: nm-probe-radius-server-cert.patch
|
||||
# PATCH-FIX-OPENSUSE nm-dont-overwrite-resolv-conf.patch bsc#1021665, bsc#960153 sckang@suse.com -- NetworkManager spawns netconfig to update DNS settings, and terminates netconfig after 1s. But 1s isn't quite long enough for netconfig to complete the task. Adjust it to 0 seconds(don't send SIGKILL) to avoid NM overwriting /etc/resolv.conf.
|
||||
Patch4: nm-dont-overwrite-resolv-conf.patch
|
||||
# PATCH-FIX-OPENSUSE NetworkManager-1.10.6-netconfig.patch boo#1092352 -- Don't return SR_NOTFOUND if netconfig fails to launch
|
||||
Patch5: NetworkManager-1.10.6-netconfig.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch boo#1103678
|
||||
Patch6: 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch
|
||||
# PATCH-FIX-OPENSUSE nm-add-CAP_SYS_ADMIN-permission.patch bsc#1129587 sckang@suse.com -- Add CAP_SYS_ADMIN which netconfig needs to call setdomainname
|
||||
Patch7: nm-add-CAP_SYS_ADMIN-permission.patch
|
||||
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: dnsmasq
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: meson
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: ppp-devel
|
||||
BuildRequires: python3-dbus-python
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: rp-pppoe
|
||||
BuildRequires: wireless-tools
|
||||
BuildRequires: perl(YAML)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(dbus-glib-1) >= 0.94
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(gtk-doc)
|
||||
BuildRequires: pkgconfig(jansson) >= 2.7
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libndp)
|
||||
BuildRequires: pkgconfig(libnewt) >= 0.52.15
|
||||
BuildRequires: pkgconfig(libnl-3.0) >= 3.2.8
|
||||
BuildRequires: pkgconfig(libnl-genl-3.0)
|
||||
BuildRequires: pkgconfig(libnl-route-3.0)
|
||||
BuildRequires: pkgconfig(libpsl) >= 0.1
|
||||
BuildRequires: pkgconfig(libselinux)
|
||||
BuildRequires: pkgconfig(libsystemd) >= 209
|
||||
BuildRequires: pkgconfig(libudev) >= 175
|
||||
BuildRequires: pkgconfig(mm-glib) >= 0.7.991
|
||||
BuildRequires: pkgconfig(mobile-broadband-provider-info)
|
||||
BuildRequires: pkgconfig(nss)
|
||||
BuildRequires: pkgconfig(polkit-gobject-1)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
BuildRequires: pkgconfig(vapigen)
|
||||
### Conditional BRs
|
||||
%if %{with LIBAUDIT}
|
||||
BuildRequires: pkgconfig(audit)
|
||||
%endif
|
||||
## Required for tests
|
||||
%if %{with TESTS}
|
||||
#BuildRequires: python3-gobject
|
||||
%endif
|
||||
##
|
||||
Requires: NetworkManager-branding
|
||||
Requires: mozilla-nss
|
||||
%if %{with_netconfig}
|
||||
Requires: sysconfig-netconfig >= 0.80.5
|
||||
%endif
|
||||
Requires: wpa_supplicant >= 0.6.4
|
||||
Recommends: dnsmasq
|
||||
Recommends: iproute2
|
||||
Recommends: iputils
|
||||
Recommends: nftables
|
||||
Recommends: org.freedesktop.ModemManager
|
||||
# Provides required by sysconfig. The latter is used by older versions.
|
||||
Provides: dhcdbd = 1.14
|
||||
Provides: service(network)
|
||||
Provides: sysvinit(network)
|
||||
Obsoletes: dhcdbd < 1.14
|
||||
Obsoletes: libnm-glib-vpn1 < 1.32
|
||||
Obsoletes: libnm-glib4 < 1.32
|
||||
Obsoletes: libnm-util2 < 1.32
|
||||
# NetworkManager-wifi was folded back into the main package
|
||||
# The dep chain is not really different and it causes too many
|
||||
# problems for users having that split. Not worth the pain
|
||||
Provides: NetworkManager-wifi = %{version}
|
||||
Obsoletes: NetworkManager-wifi < %{version}
|
||||
|
||||
%{?systemd_ordering}
|
||||
|
||||
%description
|
||||
NetworkManager attempts to keep an active network connection available
|
||||
at all times. The point of NetworkManager is to make networking
|
||||
configuration and setup as painless and automatic as possible. If
|
||||
using DHCP, NetworkManager is intended to replace default routes,
|
||||
obtain IP addresses from a DHCP server, and change name servers
|
||||
whenever it sees fit.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries and headers for adding NetworkManager support to applications
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libnm0 = %{version}
|
||||
Requires: typelib-1_0-NM-1_0 = %{version}
|
||||
Provides: %{name}-doc = %{version}
|
||||
Obsoletes: %{name}-doc < 0.9.1
|
||||
|
||||
%description devel
|
||||
This package contains various headers accessing some NetworkManager
|
||||
functionality from applications.
|
||||
|
||||
%package -n libnm0
|
||||
Summary: Convenience library for clients of NetworkManager
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libnm0
|
||||
This package contains the libraries that make it easier to use some
|
||||
Network Manager functionality from applications that use glib.
|
||||
|
||||
%package -n typelib-1_0-NM-1_0
|
||||
Summary: Introspection bindings for the NetworkManager client convenience library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n typelib-1_0-NM-1_0
|
||||
This package contains the gi-bindings that make it easier to use some
|
||||
Network Manager functionality from applications that use glib.
|
||||
|
||||
This package provides the GObject Introspection bindings for the
|
||||
NetworkManager library.
|
||||
|
||||
%package branding-upstream
|
||||
Summary: Default upstream configuration for NetworkManager
|
||||
Group: Productivity/Networking/System
|
||||
Requires: NetworkManager = %{version}
|
||||
Supplements: (NetworkManager and branding-upstream)
|
||||
Conflicts: NetworkManager-branding
|
||||
Provides: NetworkManager-branding = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description branding-upstream
|
||||
This package provides the default upstream configuration for
|
||||
NetworkManager. Specifically,
|
||||
it is not configured for connection checking against
|
||||
http://conncheck.opensuse.org. For, the version with connection
|
||||
checking, install %{name}-branding-openSUSE.
|
||||
|
||||
%package pppoe
|
||||
Summary: NetworkManager plugin for ADSL connections
|
||||
Group: Productivity/Networking/System
|
||||
Requires: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
Supplements: (%{name} and rp-pppoe)
|
||||
Requires: rp-pppoe
|
||||
%requires_eq ppp
|
||||
|
||||
%description pppoe
|
||||
NetworkManager plugin for ADSL connections.
|
||||
|
||||
This package is needed to configure PPPoE interfaces
|
||||
|
||||
%package bluetooth
|
||||
Summary: Bluetooth device plugin for NetworkManager
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}
|
||||
Requires: NetworkManager-wwan = %{version}
|
||||
BuildRequires: pkgconfig(bluez) >= 5
|
||||
Supplements: (NetworkManager and bluez)
|
||||
|
||||
%description bluetooth
|
||||
This package contains NetworkManager support for Bluetooth devices.
|
||||
|
||||
%package wwan
|
||||
Summary: Mobile broadband device plugin for NetworkManager
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}
|
||||
Requires: ModemManager
|
||||
|
||||
%description wwan
|
||||
This package contains NetworkManager support for mobile broadband (WWAN)
|
||||
devices.
|
||||
|
||||
%package ovs
|
||||
Summary: Open vSwitch device plugin for NetworkManager
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}
|
||||
Requires: openvswitch
|
||||
Supplements: (NetworkManager and openvswitch)
|
||||
|
||||
%description ovs
|
||||
This package contains NetworkManager support for Open vSwitch bridges.
|
||||
|
||||
%package tui
|
||||
Summary: NetworkManager curses-based UI
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libnm0 = %{version}
|
||||
Supplements: (patterns-base-enhanced_base and NetworkManager)
|
||||
|
||||
%description tui
|
||||
This adds a curses-based "TUI" (Text User Interface) to
|
||||
NetworkManager, to allow performing some of the operations supported
|
||||
by nm-connection-editor and nm-applet in a non-graphical environment.
|
||||
|
||||
%package cloud-setup
|
||||
Summary: Automatically configure NetworkManager in cloud
|
||||
Group: System Environment/Base
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libnm0 = %{version}
|
||||
|
||||
%description cloud-setup
|
||||
Installs a nm-cloud-setup tool that can automatically configure
|
||||
NetworkManager in cloud setups. Currently only EC2 is supported.
|
||||
This tool is still experimental.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%if %{with_cacert_patch}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
# Fix server.conf's location, to end up in %%{_defaultdocdir}/%%{name},
|
||||
# rather then %%{_datadir}/doc/%%{name}/examples:
|
||||
sed -i -r "/install_dir: join_paths/s/(nm_datadir, 'doc)\
|
||||
(', nm_name), 'examples'/\1\/packages\2/" data/meson.build
|
||||
|
||||
%build
|
||||
%define _lto_cflags %{nil}
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing -fcommon"
|
||||
export PYTHON=%{_bindir}/python3
|
||||
%meson \
|
||||
-Dsystemdsystemunitdir=%{_unitdir} \
|
||||
-Dudev_dir=%{_udevdir} \
|
||||
-Ddbus_conf_dir=%{_dbusconfdir} \
|
||||
-Ddnsmasq=%{_sbindir}/dnsmasq \
|
||||
-Ddist_version=%{version} \
|
||||
-Dpolkit_agent_helper_1=%{_libexecdir}/polkit-1/polkit-agent-helper-1 \
|
||||
-Dhostname_persist=suse \
|
||||
-Dlibaudit=%{libaudit_meson_opt} \
|
||||
-Diwd=true \
|
||||
-Dpppd=%{_sbindir}/pppd \
|
||||
-Dpppd_plugin_dir=%{_pppddir} \
|
||||
-Dnm_cloud_setup=true \
|
||||
-Dbluez5_dun=true \
|
||||
%if %{suse_version} >= 1550
|
||||
-Dnetconfig=%{_sbindir}/netconfig \
|
||||
%else
|
||||
-Dnetconfig=/sbin/netconfig \
|
||||
%endif
|
||||
-Dconfig_dhcp_default=internal \
|
||||
-Ddhcpcanon=no \
|
||||
-Ddhcpcd=no \
|
||||
-Ddhclient=%{_sbindir}/dhclient \
|
||||
-Ddocs=true \
|
||||
-Dtests=%{tests_meson_opt} \
|
||||
-Dmore_asserts=0 \
|
||||
-Dmore_logging=false \
|
||||
-Dqt=false \
|
||||
-Db_lto=true \
|
||||
-Dsession_tracking=systemd \
|
||||
-Dsession_tracking_consolekit=false \
|
||||
%{nil}
|
||||
%meson_build
|
||||
|
||||
%if %{with TESTS}
|
||||
%check
|
||||
%meson_test
|
||||
%endif
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
%find_lang %{name}
|
||||
%fdupes %{buildroot}%{_datadir}/gtk-doc/
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/{VPN,conf.d}
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/NetworkManager/dispatcher.d
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/NetworkManager/VPN
|
||||
touch %{buildroot}%{_localstatedir}/log/NetworkManager
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/system-connections
|
||||
install -m 0755 %{SOURCE1} %{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d/
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/NetworkManager/
|
||||
chmod 0644 %{buildroot}%{_prefix}/lib/NetworkManager/NetworkManager.conf
|
||||
install -m 0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/NetworkManager/conf.d
|
||||
# Install RPM macros to be consumed by plugins
|
||||
mkdir -p %{buildroot}%{_rpmmacrodir}
|
||||
install -m 0644 %{SOURCE98} %{buildroot}%{_rpmmacrodir}/
|
||||
|
||||
# drop on demand activation, it is handled as a system service
|
||||
rm -f %{buildroot}%{_datadir}/dbus-1/system-services/org.freedesktop.NetworkManager.service
|
||||
|
||||
%pre
|
||||
%service_add_pre NetworkManager.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%post
|
||||
%service_add_post NetworkManager.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%preun
|
||||
%service_del_preun NetworkManager.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%postun
|
||||
%service_del_postun NetworkManager.service NetworkManager-dispatcher.service nm-priv-helper.service
|
||||
|
||||
%pre cloud-setup
|
||||
%service_add_pre nm-cloud-setup.service
|
||||
|
||||
%post cloud-setup
|
||||
%service_add_post nm-cloud-setup.service
|
||||
|
||||
%preun cloud-setup
|
||||
%service_del_preun nm-cloud-setup.service
|
||||
|
||||
%postun cloud-setup
|
||||
%service_del_postun nm-cloud-setup.service
|
||||
|
||||
%post -n libnm0 -p /sbin/ldconfig
|
||||
%postun -n libnm0 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc ChangeLog NEWS AUTHORS TODO
|
||||
%{_bindir}/nm-online
|
||||
%{_bindir}/nmcli
|
||||
%{_datadir}/bash-completion/completions/nmcli
|
||||
%{_sbindir}/NetworkManager
|
||||
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.NetworkManager.*
|
||||
%{_datadir}/polkit-1/actions/org.freedesktop.NetworkManager.policy
|
||||
%attr(0700,root,root) %{_localstatedir}/lib/NetworkManager
|
||||
%{_mandir}/man1/nm-online.1%{?ext_man}
|
||||
%{_mandir}/man1/nmcli.1%{?ext_man}
|
||||
%{_mandir}/man5/nm-settings-keyfile.5%{?ext_man}
|
||||
%{_mandir}/man5/NetworkManager.conf.5%{?ext_man}
|
||||
%{_mandir}/man5/nm-settings.5%{?ext_man}
|
||||
%{_mandir}/man5/nm-system-settings.conf.5%{?ext_man}
|
||||
%{_mandir}/man5/nm-settings-dbus.5%{?ext_man}
|
||||
%{_mandir}/man5/nm-settings-nmcli.5%{?ext_man}
|
||||
%{_mandir}/man7/nmcli-examples.7%{?ext_man}
|
||||
%{_mandir}/man8/NetworkManager-dispatcher.8%{?ext_man}
|
||||
%{_mandir}/man8/NetworkManager-wait-online.service.8%{?ext_man}
|
||||
%{_mandir}/man8/NetworkManager.8%{?ext_man}
|
||||
%{_mandir}/man8/nm-initrd-generator.8%{?ext_man}
|
||||
%dir %{_libdir}/NetworkManager
|
||||
%dir %{_libdir}/NetworkManager/%{version}
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-device-plugin-wifi.so
|
||||
%{_libexecdir}/nm-daemon-helper
|
||||
%{_libexecdir}/nm-dhcp-helper
|
||||
%{_libexecdir}/nm-dispatcher
|
||||
%{_libexecdir}/nm-initrd-generator
|
||||
%{_libexecdir}/nm-priv-helper
|
||||
%dir %{_sysconfdir}/NetworkManager
|
||||
%dir %{_sysconfdir}/NetworkManager/VPN
|
||||
%dir %{_sysconfdir}/NetworkManager/conf.d
|
||||
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
|
||||
%dir %{_sysconfdir}/NetworkManager/system-connections
|
||||
%attr(0755,root,root) %{_prefix}/lib/NetworkManager/dispatcher.d/nfs
|
||||
%{_unitdir}/NetworkManager.service
|
||||
%{_unitdir}/NetworkManager-dispatcher.service
|
||||
%{_unitdir}/NetworkManager-wait-online.service
|
||||
%dir %{_unitdir}/NetworkManager.service.d
|
||||
%{_udevdir}/rules.d/84-nm-drivers.rules
|
||||
%{_udevdir}/rules.d/85-nm-unmanaged.rules
|
||||
%{_udevdir}/rules.d/90-nm-thunderbolt.rules
|
||||
%{_unitdir}/nm-priv-helper.service
|
||||
%ghost %config(noreplace) %{_localstatedir}/log/NetworkManager
|
||||
%dir %{_prefix}/lib/NetworkManager
|
||||
%{_prefix}/lib/NetworkManager/NetworkManager.conf
|
||||
%dir %{_prefix}/lib/NetworkManager/conf.d
|
||||
%dir %{_prefix}/lib/NetworkManager/dispatcher.d
|
||||
%dir %{_prefix}/lib/NetworkManager/dispatcher.d/no-wait.d
|
||||
%dir %{_prefix}/lib/NetworkManager/dispatcher.d/pre-up.d
|
||||
%dir %{_prefix}/lib/NetworkManager/dispatcher.d/pre-down.d
|
||||
%dir %{_prefix}/lib/NetworkManager/VPN
|
||||
%dir %{_prefix}/lib/firewalld
|
||||
%dir %{_prefix}/lib/firewalld/zones
|
||||
%{_prefix}/lib/firewalld/zones/nm-shared.xml
|
||||
%{_dbusconfdir}/nm-dispatcher.conf
|
||||
%{_dbusconfdir}/org.freedesktop.NetworkManager.conf
|
||||
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_priv_helper.service
|
||||
%{_dbusconfdir}/nm-priv-helper.conf
|
||||
%{_defaultdocdir}/NetworkManager/server.conf
|
||||
|
||||
%files devel
|
||||
%{_includedir}/libnm/
|
||||
%{_datadir}/gir-1.0/*.gir
|
||||
%dir %{_datadir}/vala/vapi
|
||||
%{_datadir}/vala/vapi/libnm.deps
|
||||
%{_datadir}/vala/vapi/libnm.vapi
|
||||
%{_libdir}/libnm.so
|
||||
%{_libdir}/pkgconfig/libnm.pc
|
||||
%doc %{_datadir}/gtk-doc/html/NetworkManager/
|
||||
%doc %{_datadir}/gtk-doc/html/libnm/
|
||||
%{_rpmmacrodir}/macros.NetworkManager
|
||||
|
||||
%files -n libnm0
|
||||
%{_libdir}/libnm.so.*
|
||||
|
||||
%files -n typelib-1_0-NM-1_0
|
||||
%{_libdir}/girepository-1.0/NM-1.0.typelib
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
|
||||
%files branding-upstream
|
||||
%{_prefix}/lib/NetworkManager/conf.d/conncheck-disabled.conf
|
||||
|
||||
%files pppoe
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-device-plugin-adsl.so
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-ppp-plugin.so
|
||||
%dir %{_libdir}/pppd/2.*
|
||||
%{_libdir}/pppd/2.*/nm-pppd-plugin.*
|
||||
|
||||
%files bluetooth
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-device-plugin-bluetooth.so
|
||||
|
||||
%files wwan
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-device-plugin-wwan.so
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-wwan.so
|
||||
|
||||
%files ovs
|
||||
%{_libdir}/NetworkManager/%{version}/libnm-device-plugin-ovs.so
|
||||
%{_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf
|
||||
%{_mandir}/man7/nm-openvswitch.7%{?ext_man}
|
||||
|
||||
%files tui
|
||||
%{_bindir}/nmtui*
|
||||
%{_mandir}/man1/nmtui.1%{?ext_man}
|
||||
%{_mandir}/man1/nmtui-connect.1%{?ext_man}
|
||||
%{_mandir}/man1/nmtui-edit.1%{?ext_man}
|
||||
%{_mandir}/man1/nmtui-hostname.1%{?ext_man}
|
||||
|
||||
%files cloud-setup
|
||||
%{_libexecdir}/nm-cloud-setup
|
||||
%{_unitdir}/nm-cloud-setup.service
|
||||
%{_unitdir}/nm-cloud-setup.timer
|
||||
%{_prefix}/lib/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh
|
||||
%{_prefix}/lib/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh
|
||||
%{_mandir}/man8/nm-cloud-setup.8%{?ext_man}
|
||||
|
||||
%changelog
|
3
baselibs.conf
Normal file
3
baselibs.conf
Normal file
@ -0,0 +1,3 @@
|
||||
libnm0
|
||||
NetworkManager-devel
|
||||
requires -NetworkManager-<targettype>
|
7
conncheck-disabled.conf
Normal file
7
conncheck-disabled.conf
Normal file
@ -0,0 +1,7 @@
|
||||
# Disable connectivity checking for NetworkManager.
|
||||
# See `man NetworkManager.conf`.
|
||||
#
|
||||
# Note that connectivity checking works badly with rp_filter set to
|
||||
# strict. Check "/proc/sys/net/ipv4/conf/*/rp_filter".
|
||||
[connectivity]
|
||||
enabled=false
|
8
macros.NetworkManager
Normal file
8
macros.NetworkManager
Normal file
@ -0,0 +1,8 @@
|
||||
# RPM macros for packages Paths declared by NetworkManager
|
||||
#
|
||||
###
|
||||
#
|
||||
###
|
||||
|
||||
# To be consumed by NetworkManager-[VPN] modules
|
||||
%_vpnservicedir %(pkg-config --define-variable prefix='%{_prefix}' --variable vpnservicedir libnm)
|
97
nfs
Normal file
97
nfs
Normal file
@ -0,0 +1,97 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# nfs - start NFS in response to interface change
|
||||
#
|
||||
# Bastian Senst <bholst@lusku.de>
|
||||
|
||||
function net_umount {
|
||||
umount -l -f $1 &>/dev/null
|
||||
}
|
||||
|
||||
function net_mount {
|
||||
mountpoint -q $1 || mount $1
|
||||
}
|
||||
|
||||
function test_reach {
|
||||
if [ "$(ip link show up $1)" = "" ]; then
|
||||
return 1
|
||||
else
|
||||
ping -n -c1 -w2 -I "$1" "$2" 2>&1 > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
DEVICE="$1"
|
||||
COMMAND="$2"
|
||||
|
||||
function test_other_reaches {
|
||||
for other in $(ls /sys/class/net); do
|
||||
if [[ "$other" != "$DEVICE" ]]; then
|
||||
if test_reach "$other" "$1"; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
declare -A reaches
|
||||
|
||||
function other_reaches {
|
||||
if [[ "${reaches[$1]-}" == "yes" ]]; then
|
||||
return 0
|
||||
elif [[ "${reaches[$1]-}" == "no" ]]; then
|
||||
return 1
|
||||
else
|
||||
if test_other_reaches $1; then
|
||||
reaches[$1]="yes"
|
||||
return 0
|
||||
else
|
||||
reaches[$1]="no"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
NET_MOUNTS=$(sed -e '/^.*#/d' -e '/^.*:/!d' -e 's/\t/ /g' -e '/x-systemd.automount/d' /etc/fstab | tr -s " ")$'\n'
|
||||
|
||||
case "$COMMAND" in
|
||||
up|dhcp4-change|dhcp6-change)
|
||||
# Check with systemd if nfs service is enabled
|
||||
if /usr/bin/systemctl is-enabled nfs-client.target >/dev/null 2>&1; then
|
||||
printf %s "$NET_MOUNTS" | while IFS= read -r line; do
|
||||
MOUNT_OPTIONS=$(echo $line | cut -f4 -d" ")
|
||||
MOUNT_POINT=$(echo $line | cut -f2 -d" ")
|
||||
FS_TYPE=$(echo $line | cut -f3 -d" ")
|
||||
# Only mount it if not "noauto "set in options
|
||||
case ",${MOUNT_OPTIONS}," in
|
||||
*,noauto,*) continue ;;
|
||||
esac
|
||||
# Only mount it when the type is nfs or nfs4
|
||||
if [ "$FS_TYPE" == "nfs" -o "$FS_TYPE" == "nfs4" ]; then
|
||||
net_mount "$MOUNT_POINT"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
pre-down|down|vpn-pre-down)
|
||||
printf %s "$NET_MOUNTS" | while IFS= read -r line; do
|
||||
[[ $line ]] || continue
|
||||
MOUNT_POINT=$(echo $line | cut -f2 -d" ")
|
||||
FS_TYPE=$(echo $line | cut -f3 -d" ")
|
||||
HOST=$(echo $line | cut -f1 -d":")
|
||||
if other_reaches $HOST; then
|
||||
echo >&2 "Other network interfaces reach $HOST for $MOUNT_POINT."
|
||||
else
|
||||
# Only unmount it when the type is nfs or nfs4
|
||||
if [ "$FS_TYPE" == "nfs" -o "$FS_TYPE" == "nfs4" ]; then
|
||||
net_umount "$MOUNT_POINT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
11
nm-add-CAP_SYS_ADMIN-permission.patch
Normal file
11
nm-add-CAP_SYS_ADMIN-permission.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- NetworkManager-1.32.0-orig/data/NetworkManager.service.in 2021-06-10 22:26:13.000000000 +0200
|
||||
+++ NetworkManager-1.32.0/data/NetworkManager.service.in 2021-06-16 21:57:08.635254606 +0200
|
||||
@@ -16,7 +16,7 @@
|
||||
KillMode=process
|
||||
|
||||
# CAP_DAC_OVERRIDE: required to open /run/openvswitch/db.sock socket.
|
||||
-CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT
|
||||
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT CAP_SYS_ADMIN
|
||||
|
||||
ProtectSystem=true
|
||||
ProtectHome=read-only
|
13
nm-dont-overwrite-resolv-conf.patch
Normal file
13
nm-dont-overwrite-resolv-conf.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: NetworkManager-1.40.0/src/core/dns/nm-dns-manager.c
|
||||
===================================================================
|
||||
--- NetworkManager-1.40.0.orig/src/core/dns/nm-dns-manager.c
|
||||
+++ NetworkManager-1.40.0/src/core/dns/nm-dns-manager.c
|
||||
@@ -725,7 +725,7 @@ again:
|
||||
/* FIXME: don't write to netconfig synchronously. */
|
||||
|
||||
/* Wait until the process exits */
|
||||
- if (!nm_utils_kill_child_sync(pid, 0, LOGD_DNS, "netconfig", &status, 1000, 0)) {
|
||||
+ if (!nm_utils_kill_child_sync(pid, 0, LOGD_DNS, "netconfig", &status, 0, 0)) {
|
||||
errsv = errno;
|
||||
g_set_error(error,
|
||||
NM_MANAGER_ERROR,
|
1393
nm-probe-radius-server-cert.patch
Normal file
1393
nm-probe-radius-server-cert.patch
Normal file
File diff suppressed because it is too large
Load Diff
36
systemd-network-config.patch
Normal file
36
systemd-network-config.patch
Normal file
@ -0,0 +1,36 @@
|
||||
Index: NetworkManager-1.32.0/data/NetworkManager.service.in
|
||||
===================================================================
|
||||
--- NetworkManager-1.32.0.orig/data/NetworkManager.service.in
|
||||
+++ NetworkManager-1.32.0/data/NetworkManager.service.in
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=Network Manager
|
||||
Documentation=man:NetworkManager(8)
|
||||
-Wants=network.target
|
||||
+Wants=remote-fs.target network.target
|
||||
After=network-pre.target dbus.service
|
||||
Before=network.target @DISTRO_NETWORK_SERVICE@
|
||||
|
||||
@@ -27,6 +27,7 @@ LimitNOFILE=65536
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+Alias=network.service
|
||||
Also=NetworkManager-dispatcher.service
|
||||
|
||||
# We want to enable NetworkManager-wait-online.service whenever this service
|
||||
Index: NetworkManager-1.32.0/data/NetworkManager-wait-online.service.in
|
||||
===================================================================
|
||||
--- NetworkManager-1.32.0.orig/data/NetworkManager-wait-online.service.in
|
||||
+++ NetworkManager-1.32.0/data/NetworkManager-wait-online.service.in
|
||||
@@ -16,7 +16,9 @@ Before=network-online.target
|
||||
# time.
|
||||
|
||||
Type=oneshot
|
||||
-ExecStart=@bindir@/nm-online -s -q
|
||||
+Environment=NM_ONLINE_TIMEOUT=0
|
||||
+EnvironmentFile=-/etc/sysconfig/network/config
|
||||
+ExecStart=/bin/bash -c "if [ ${NM_ONLINE_TIMEOUT} -gt 0 ]; then @bindir@/nm-online -s -q --timeout=${NM_ONLINE_TIMEOUT} ; else /bin/true ; fi"
|
||||
RemainAfterExit=yes
|
||||
|
||||
# Set $NM_ONLINE_TIMEOUT variable for timeout in seconds.
|
Loading…
Reference in New Issue
Block a user