File NetworkManager.spec of Package NetworkManager
474
1
#
2
# spec file for package NetworkManager
3
#
4
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
19
# Toggle this whenever enabling/disabling the nm-probe-radius-server-cert.patch patch (as we export additional symbols)
20
# Like this, g-c-c and NM-applet, which consume this symbol, will block updating NM if we have to disable the patch until
21
# they are touched too
22
%define with_cacert_patch 0
23
%define _udevdir %(pkg-config --variable udevdir udev)
24
Name: NetworkManager
25
Version: 1.10.6
26
Release: 0
27
Summary: Network Link Manager and User Applications
28
License: GPL-2.0-or-later
29
Group: Productivity/Networking/System
30
URL: http://www.gnome.org/projects/NetworkManager/
31
Source0: http://download.gnome.org/sources/NetworkManager/1.10/%{name}-%{version}.tar.xz
32
Source1: nfs
33
Source2: NetworkManager.conf
34
Source3: baselibs.conf
35
Source99: NetworkManager-rpmlintrc
36
# PATCH-FEATURE-OPENSUSE systemd-network-config.patch -- don't try to start NM under systemd if it is disabled in system configuration
37
Patch0: systemd-network-config.patch
38
# PATCH-FIX-UPSTREAM nm-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- Probe the RADIUS server certificate
39
Patch1: nm-probe-radius-server-cert.patch
40
# PATCH-FIX-OPENSUSE networkmanager-checks-po.patch tchvatal@suse.com -- fix translation validation error caused by our patch systemd-network-config.patch
41
Patch2: networkmanager-checks-po.patch
42
# PATCH-FIX-OPENSUSE networkmanager-obs-net.patch tchvatal@suse.com -- disable tests that are by design broken on OBS workers
43
Patch3: networkmanager-obs-net.patch
44
# 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.
45
Patch4: nm-dont-overwrite-resolv-conf.patch
46
# PATCH-FIX-UPSTREAM NM-look-at-all-rp-filter-value.patch bsc#1084336 bgo#794689 sckang@suse.com -- device: look at 'all' rp_filter value too to determine actual value
47
Patch5: NM-look-at-all-rp-filter-value.patch
48
# PATCH-FIX-UPSTREAM NM-add-wifi-scan-polkit-rule.patch bsc#1122262, glfo#NetworkManager/NetworkManager!68 sckang@suse.com -- Adding a new polkit action "org.freedesktop.NetworkManager.wifi-scan" so that distributions can add specific rule to allow Wi-Fi scans.
49
Patch6: NM-add-wifi-scan-polkit-rule.patch
50
# PATCH-FIX-UPSTREAM 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch boo#1103678
51
Patch7: 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch
52
# PATCH-FIX-UPSTREAM 0001-Update-connectivity-value-on-device-removal.patch boo#1103678
53
Patch8: 0001-Update-connectivity-value-on-device-removal.patch
54
# PATCH-FIX-UPSTREAM NetworkManager-make-nm-wait-online-follow-nm-service.patch boo#1130355 gh#NetworkManager/NetworkManager#76 sckang@suse.com -- make enablement of n-m-wait-online.service follow n-m.service
55
Patch9: NetworkManager-make-nm-wait-online-follow-nm-service.patch
56
# PATCH-FIX-UPSTREAM NetworkManager-CVE-2018-1000135.patch bsc#1086263 bgo#746422 sckang@suse.com -- Fixes CVE-2018-1000135.
57
Patch10: NetworkManager-CVE-2018-1000135.patch
58
# 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
59
Patch11: nm-add-CAP_SYS_ADMIN-permission.patch
60
61
BuildRequires: dnsmasq
62
BuildRequires: fdupes
63
BuildRequires: intltool
64
BuildRequires: iptables
65
BuildRequires: libtool
66
BuildRequires: ncurses-devel
67
BuildRequires: pkgconfig
68
BuildRequires: ppp-devel
69
# Required for tests
70
BuildRequires: python3-dbus-python
71
BuildRequires: python3-gobject
72
BuildRequires: readline-devel
73
BuildRequires: rp-pppoe
74
# Do not use suse-release, it's very late in build chain and not needed
75
# all it does is netconfig and ifconfig enablement
76
#BuildRequires: suse-release
77
# for /sbin/netconfig: integration with netconfig is required
78
BuildRequires: sysconfig-netconfig
79
BuildRequires: translation-update-upstream
80
BuildRequires: wireless-tools
81
BuildRequires: perl(YAML)
82
BuildRequires: pkgconfig(bluez) >= 5
83
BuildRequires: pkgconfig(dbus-1)
84
BuildRequires: pkgconfig(dbus-glib-1) >= 0.94
85
BuildRequires: pkgconfig(glib-2.0) >= 2.32
86
BuildRequires: pkgconfig(gobject-introspection-1.0)
87
BuildRequires: pkgconfig(gtk-doc)
88
BuildRequires: pkgconfig(jansson)
89
BuildRequires: pkgconfig(libcurl)
90
BuildRequires: pkgconfig(libndp)
91
BuildRequires: pkgconfig(libnewt) >= 0.52.15
92
BuildRequires: pkgconfig(libnl-3.0) >= 3.2.8
93
BuildRequires: pkgconfig(libnl-genl-3.0)
94
BuildRequires: pkgconfig(libnl-route-3.0)
95
BuildRequires: pkgconfig(libpsl) >= 0.1
96
BuildRequires: pkgconfig(libsystemd) >= 209
97
BuildRequires: pkgconfig(libteam)
98
BuildRequires: pkgconfig(libudev) >= 175
99
BuildRequires: pkgconfig(mm-glib) >= 0.7.991
100
BuildRequires: pkgconfig(nss)
101
BuildRequires: pkgconfig(polkit-agent-1) >= 0.97
102
BuildRequires: pkgconfig(udev)
103
BuildRequires: pkgconfig(uuid)
104
BuildRequires: pkgconfig(vapigen)
105
Requires: NetworkManager-branding
106
Requires: dhcp-client
107
Requires: iproute2
108
Requires: iputils
109
Requires: mozilla-nss
110
Requires: sysconfig-netconfig >= 0.80.5
111
Requires: wpa_supplicant >= 0.6.4
112
%requires_eq ppp
113
Recommends: %{name}-lang
114
Recommends: NetworkManager-client
115
Recommends: dnsmasq
116
Recommends: iptables
117
Recommends: org.freedesktop.ModemManager
118
# Recommend the rp-pppoe binary for PPP over Ethernet (common for ADSL) connections.
119
Recommends: rp-pppoe
120
Provides: dhcdbd = 1.14
121
Obsoletes: dhcdbd < 1.14
122
%{?systemd_requires}
123
124
%description
125
NetworkManager attempts to keep an active network connection available
126
at all times. The point of NetworkManager is to make networking
127
configuration and setup as painless and automatic as possible. If
128
using DHCP, NetworkManager is intended to replace default routes,
129
obtain IP addresses from a DHCP server, and change name servers
130
whenever it sees fit.
131
132
%package devel
133
Summary: Libraries and headers for adding NetworkManager support to applications
134
Group: Development/Libraries/Other
135
Requires: %{name} = %{version}
136
Requires: libnm-glib-vpn1 = %{version}
137
Requires: libnm-glib4 = %{version}
138
Requires: libnm-util2 = %{version}
139
Requires: libnm0 = %{version}
140
Requires: typelib-1_0-NM-1_0 = %{version}
141
Requires: typelib-1_0-NMClient-1_0 = %{version}
142
Requires: typelib-1_0-NetworkManager-1_0 = %{version}
143
Provides: %{name}-doc = %{version}
144
Obsoletes: %{name}-doc < %{version}
145
146
%description devel
147
This package contains various headers accessing some NetworkManager
148
functionality from applications.
149
150
%package -n libnm0
151
Summary: Convenience library for clients of NetworkManager
152
Group: System/Libraries
153
154
%description -n libnm0
155
This package contains the libraries that make it easier to use some
156
Network Manager functionality from applications that use glib.
157
158
%package -n libnm-util2
159
Summary: Convenience library for clients of NetworkManager
160
Group: System/Libraries
161
%if %{with_cacert_patch}
162
Provides: NetworkManager(cacert-patch)
163
%endif
164
165
%description -n libnm-util2
166
This package contains the libraries that make it easier to use some
167
Network Manager functionality from applications that use glib.
168
169
%package -n libnm-glib4
170
Summary: Convenience library for clients of NetworkManager
171
Group: System/Libraries
172
Provides: %{name}-glib = %{version}
173
Obsoletes: %{name}-glib < %{version}
174
175
%description -n libnm-glib4
176
This package contains the libraries that make it easier to use some
177
Network Manager functionality from applications that use glib.
178
179
%package -n libnm-glib-vpn1
180
Summary: Convenience library for NetworkManager VPN plugins
181
Group: System/Libraries
182
183
%description -n libnm-glib-vpn1
184
This package contains the libraries that make it easier to use some
185
Network Manager functionality from applications that use glib.
186
187
%package -n typelib-1_0-NetworkManager-1_0
188
Summary: Convenience library for clients of NetworkManager -- Introspection bindings
189
Group: System/Libraries
190
191
%description -n typelib-1_0-NetworkManager-1_0
192
This package contains the gi-bindings that make it easier to use some
193
Network Manager functionality from applications that use glib.
194
195
This package provides the GObject Introspection bindings for the
196
NetworkManager library.
197
198
%package -n typelib-1_0-NM-1_0
199
Summary: Convenience library for clients of NetworkManager -- Introspection bindings
200
Group: System/Libraries
201
202
%description -n typelib-1_0-NM-1_0
203
This package contains the gi-bindings that make it easier to use some
204
Network Manager functionality from applications that use glib.
205
206
This package provides the GObject Introspection bindings for the
207
NetworkManager library.
208
209
%package -n typelib-1_0-NMClient-1_0
210
Summary: Convenience library for clients of NetworkManager -- Introspection bindings
211
Group: System/Libraries
212
213
%description -n typelib-1_0-NMClient-1_0
214
This package contains the gi-bindings that make it easier to use some
215
Network Manager functionality from applications that use glib.
216
217
This package provides the GObject Introspection bindings for the
218
NetworkManager library.
219
220
%package branding-upstream
221
Summary: Default upstream configuration for %{_sysconfdir}/NetworkManager/NetworkManager.conf
222
Group: Productivity/Networking/System
223
Requires: NetworkManager = %{version}
224
Supplements: packageand(NetworkManager:branding-upstream)
225
Conflicts: NetworkManager-branding
226
Provides: NetworkManager-branding = %{version}
227
BuildArch: noarch
228
229
%description branding-upstream
230
This package provides the default upstream configuration for
231
%{_sysconfdir}/NetworkManager/NetworkManager.conf. Specifically,
232
it is not configured for connection checking against
233
http://conncheck.opensuse.org. For, the version with connection
234
checking, install %{name}-branding-openSUSE.
235
236
%lang_package
237
238
%prep
239
%setup -q
240
translation-update-upstream
241
%patch0 -p1
242
%if %{with_cacert_patch}
243
%patch1 -p1
244
%endif
245
%patch2 -p1
246
%patch3 -p1
247
%patch4 -p1
248
%patch5 -p1
249
%patch6 -p1
250
%patch7 -p1
251
%patch8 -p1
252
%patch9 -p1
253
%patch10 -p1
254
%patch11 -p1
255
256
%build
257
NOCONFIGURE=1 ./autogen.sh
258
pppddir=`ls -1d %{_libdir}/pppd/2*`
259
test -n "$pppddir" || exit 1
260
export CFLAGS="%{optflags} -fno-strict-aliasing"
261
export PYTHON=%{_bindir}/python3
262
%configure \
263
--disable-silent-rules \
264
--with-hostname-persist=suse \
265
--enable-ld-gc \
266
--disable-static \
267
--with-crypto=nss \
268
--enable-gtk-doc \
269
--enable-json-validation \
270
--with-tests=yes \
271
--with-netconfig=yes \
272
--with-config-dns-rc-manager-default=netconfig \
273
--enable-more-warnings=no \
274
--with-pppd-plugin-dir=$pppddir \
275
--with-dhclient=/sbin/dhclient \
276
--with-dhcpcd=no \
277
--with-udev-dir=%{_udevdir} \
278
--with-modem-manager-1 \
279
--enable-concheck \
280
--enable-wifi=yes \
281
--with-nmtui \
282
--with-session-tracking=systemd \
283
--with-suspend-resume=systemd
284
# Fail if netconfig was not detected. Avoids future occurences of bnc#817592
285
if grep "with_netconfig='no'" config.log; then
286
print netconfig support was not found -- BUILD ABORTED
287
false
288
fi
289
make %{?_smp_mflags} nmrundir="/run/%{name}"
290
291
%check
292
make %{?_smp_mflags} check
293
294
%install
295
%make_install nmrundir="/run/%{name}"
296
find %{buildroot} -type f -name "*.la" -delete -print
297
%find_lang %{name}
298
%fdupes %{buildroot}%{_datadir}/gtk-doc/
299
mkdir -p %{buildroot}%{_bindir}
300
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/VPN
301
mkdir -p %{buildroot}%{_localstatedir}/log/
302
mkdir -p %{buildroot}%{_localstatedir}/lib/NetworkManager
303
touch %{buildroot}%{_localstatedir}/log/NetworkManager
304
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/system-connections
305
install -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/
306
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/NetworkManager/
307
# We package this one as %%doc in the default location.
308
rm %{buildroot}%{_datadir}/doc/NetworkManager/examples/server.conf
309
310
# drop on demand activation, it is handled as a system service
311
rm -f %{buildroot}%{_datadir}/dbus-1/system-services/org.freedesktop.NetworkManager.service
312
313
%pre
314
%service_add_pre NetworkManager.service
315
%service_add_pre NetworkManager-dispatcher.service
316
317
%post
318
%service_add_post NetworkManager.service
319
%service_add_post NetworkManager-dispatcher.service
320
# enable NetworkManager-dispatcher, it's a DBus enabled service
321
systemctl enable NetworkManager-dispatcher.service
322
# bnc#803058:
323
# sysconfig creates this file while update from openSUSE < 12.3,
324
# which were using the NETWORKMANAGER=yes/no sysconfig variable.
325
# When it exists and NETWORKMANAGER were enabled, force enable to
326
# ensure, the network.service alias link exists points to us.
327
if [ -f /dev/.sysconfig/network/migrate_nm_variable ] ; then
328
. /dev/.sysconfig/network/migrate_nm_variable
329
if [ "X$NETWORKMANAGER" = "Xyes" ] ; then
330
# In running system "--force enable" is sufficient to
331
# create the network.service alias link regardless if
332
# the network.service is masked or not.
333
# While 12.2 -> 12.3 dist update, enable seems to be
334
# unable to create the alias... no idea why. Kick it
335
rm -f %{_sysconfdir}/systemd/system/network.service
336
%{_bindir}/systemctl --system daemon-reload || :
337
%{_bindir}/systemctl --force enable NetworkManager.service || :
338
# and create the alias when enable failed to make it.
339
if [ ! -e %{_sysconfdir}/systemd/system/network.service ] ; then
340
ln -sf %{_unitdir}/NetworkManager.service \
341
%{_sysconfdir}/systemd/system/network.service
342
fi
343
%{_bindir}/systemctl --system daemon-reload || :
344
fi
345
rm -f /dev/.sysconfig/network/migrate_nm_variable
346
fi
347
348
%preun
349
%service_del_preun NetworkManager.service
350
%service_del_preun NetworkManager-dispatcher.service
351
352
%postun
353
%service_del_postun NetworkManager.service
354
%service_del_postun NetworkManager-dispatcher.service
355
356
%post -n libnm-util2 -p /sbin/ldconfig
357
%postun -n libnm-util2 -p /sbin/ldconfig
358
%post -n libnm-glib4 -p /sbin/ldconfig
359
%postun -n libnm-glib4 -p /sbin/ldconfig
360
%post -n libnm-glib-vpn1 -p /sbin/ldconfig
361
%postun -n libnm-glib-vpn1 -p /sbin/ldconfig
362
%post -n libnm0 -p /sbin/ldconfig
363
%postun -n libnm0 -p /sbin/ldconfig
364
365
%files
366
%license COPYING
367
%doc ChangeLog NEWS AUTHORS README CONTRIBUTING TODO data/server.conf
368
%{_bindir}/nm-online
369
%{_bindir}/nmcli
370
%{_bindir}/nmtui*
371
%{_datadir}/bash-completion/completions/nmcli
372
%{_sbindir}/NetworkManager
373
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
374
%{_datadir}/dbus-1/interfaces/org.freedesktop.NetworkManager.*
375
%{_datadir}/polkit-1/actions/org.freedesktop.NetworkManager.policy
376
%attr(0700,root,root) %{_localstatedir}/lib/NetworkManager
377
%{_mandir}/man1/nm-online.1%{ext_man}
378
%{_mandir}/man1/nmcli.1%{ext_man}
379
%{_mandir}/man1/nmtui.1%{?ext_man}
380
%{_mandir}/man1/nmtui-connect.1%{?ext_man}
381
%{_mandir}/man1/nmtui-edit.1%{?ext_man}
382
%{_mandir}/man1/nmtui-hostname.1%{?ext_man}
383
%{_mandir}/man5/nm-settings-keyfile.5%{?ext_man}
384
%{_mandir}/man5/NetworkManager.conf.5%{?ext_man}
385
%{_mandir}/man5/nm-settings.5%{?ext_man}
386
%{_mandir}/man5/nm-system-settings.conf.5%{?ext_man}
387
%{_mandir}/man7/nm-openvswitch.7%{?ext_man}
388
%{_mandir}/man7/nmcli-examples.7%{?ext_man}
389
%{_mandir}/man8/NetworkManager.8%{ext_man}
390
%dir %{_libdir}/NetworkManager/
391
%{_libdir}/NetworkManager/libnm-device-plugin-adsl.so
392
%{_libdir}/NetworkManager/libnm-device-plugin-bluetooth.so
393
%{_libdir}/NetworkManager/libnm-device-plugin-ovs.so
394
%{_libdir}/NetworkManager/libnm-device-plugin-wifi.so
395
%{_libdir}/NetworkManager/libnm-device-plugin-wwan.so
396
%{_libdir}/NetworkManager/libnm-device-plugin-team.so
397
%{_libdir}/NetworkManager/libnm-ppp-plugin.so
398
%{_libdir}/NetworkManager/libnm-settings-plugin-ibft.so
399
%{_libdir}/NetworkManager/libnm-wwan.so
400
%dir %{_libdir}/pppd/2.*
401
%{_libdir}/pppd/2.*/nm-pppd-plugin.*
402
%{_libexecdir}/nm-dhcp-helper
403
%{_libexecdir}/nm-dispatcher
404
%{_libexecdir}/nm-iface-helper
405
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.NetworkManager.conf
406
%config %{_sysconfdir}/dbus-1/system.d/nm-dispatcher.conf
407
%dir %{_sysconfdir}/NetworkManager
408
%dir %{_sysconfdir}/NetworkManager/VPN
409
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
410
%dir %{_sysconfdir}/NetworkManager/system-connections
411
%attr(0755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/nfs
412
%{_unitdir}/NetworkManager.service
413
%{_unitdir}/NetworkManager-dispatcher.service
414
%{_unitdir}/NetworkManager-wait-online.service
415
%dir %{_unitdir}/NetworkManager.service.d
416
%{_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf
417
%{_udevdir}/rules.d/84-nm-drivers.rules
418
%{_udevdir}/rules.d/85-nm-unmanaged.rules
419
%ghost %config(noreplace) %{_localstatedir}/log/NetworkManager
420
421
%files devel
422
%{_includedir}/NetworkManager/
423
%{_includedir}/libnm/
424
%{_includedir}/libnm-glib/
425
%{_datadir}/gir-1.0/*.gir
426
%dir %{_datadir}/vala/vapi
427
%{_datadir}/vala/vapi/libnm.deps
428
%{_datadir}/vala/vapi/libnm.vapi
429
%{_datadir}/vala/vapi/libnm-glib.deps
430
%{_datadir}/vala/vapi/libnm-glib.vapi
431
%{_datadir}/vala/vapi/libnm-util.deps
432
%{_datadir}/vala/vapi/libnm-util.vapi
433
%{_libdir}/libnm.so
434
%{_libdir}/libnm-util.so
435
%{_libdir}/libnm-glib.so
436
%{_libdir}/libnm-glib-vpn.so
437
%{_libdir}/pkgconfig/NetworkManager.pc
438
%{_libdir}/pkgconfig/libnm.pc
439
%{_libdir}/pkgconfig/libnm-util.pc
440
%{_libdir}/pkgconfig/libnm-glib.pc
441
%{_libdir}/pkgconfig/libnm-glib-vpn.pc
442
%doc %{_datadir}/gtk-doc/html/NetworkManager/
443
%doc %{_datadir}/gtk-doc/html/libnm/
444
%doc %{_datadir}/gtk-doc/html/libnm-glib/
445
%doc %{_datadir}/gtk-doc/html/libnm-util/
446
447
%files -n libnm0
448
%{_libdir}/libnm.so.*
449
450
%files -n libnm-util2
451
%{_libdir}/libnm-util.so.*
452
453
%files -n libnm-glib4
454
%{_libdir}/libnm-glib.so.*
455
456
%files -n libnm-glib-vpn1
457
%{_libdir}/libnm-glib-vpn.so.*
458
459
%files -n typelib-1_0-NetworkManager-1_0
460
%{_libdir}/girepository-1.0/NetworkManager-1.0.typelib
461
462
%files -n typelib-1_0-NM-1_0
463
%{_libdir}/girepository-1.0/NM-1.0.typelib
464
465
%files -n typelib-1_0-NMClient-1_0
466
%{_libdir}/girepository-1.0/NMClient-1.0.typelib
467
468
%files lang -f %{name}.lang
469
470
%files branding-upstream
471
%config(noreplace) %{_sysconfdir}/NetworkManager/NetworkManager.conf
472
473
%changelog
474