systemd: let NM-w-o.service require NetworkManager service (rh #1452866)

- systemd: let NM-w-o.service require NetworkManager service (rh #1452866)
  Related to rh #1455704.
  See also: https://github.com/systemd/systemd/pull/6065

- platform: really treat dsa devices as regular wired ethernet (rh #1371289)
  actually apply patch.

- in spec file, explicitly set dhclient as default (resync with upstream
  spec file).
This commit is contained in:
Thomas Haller 2017-11-02 15:41:09 +01:00
parent 7a812558d6
commit 44c7179885
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From e9bdc531b64c5603b0c3a5a6e784122b8be1e8ef Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Thu, 2 Nov 2017 15:14:18 +0100
Subject: [PATCH 1/1] systemd: let "NetworkManager-wait-online.service" require
"NetworkManager.service"
`systemctl start network-online.target` should suffice to start
"NetworkManager.service".
That would work because
- "network-online.target" has "Wants=NetworkManager-wait-online.service"
- "NetworkManager-wait-online.service" has "Require=NetworkManager.service".
But previously, "NetworkManager-wait-online.service" would just
fail with missing dependency.
See also https://github.com/systemd/systemd/pull/6065 which does the
same for networkd's wait-online serice, and see rh#1452866 for a
use-case.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1452866
(cherry picked from commit 28b97f02f64ecf94e22c8929dfd0ba64151bd9d3)
(cherry picked from commit eeedf51f087d1cd6c5c4b79f7299b6060d28024f)
---
data/NetworkManager-wait-online.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/NetworkManager-wait-online.service.in b/data/NetworkManager-wait-online.service.in
index 1753d2039..896324685 100644
--- a/data/NetworkManager-wait-online.service.in
+++ b/data/NetworkManager-wait-online.service.in
@@ -1,7 +1,7 @@
[Unit]
Description=Network Manager Wait Online
Documentation=man:nm-online(1)
-Requisite=NetworkManager.service
+Requires=NetworkManager.service
After=NetworkManager.service
Before=network-online.target
--
2.13.6

View File

@ -9,7 +9,7 @@
%global epoch_version 1
%global rpm_version 1.8.4
%global real_version 1.8.4
%global release_version 5
%global release_version 6
%global snapshot %{nil}
%global git_sha %{nil}
@ -92,6 +92,7 @@ Patch4: 0004-device-fix-delay-startup-complete-for-unrealized-dev.patch
Patch5: 0005-device-fix-frozen-notify-signals-on-unrealize-error-.patch
Patch6: 0006-keyfile-route-metric-zero-fix.patch
Patch7: 0007-platform-treat-dsa-devices-as-regular-wired-ethernet.patch
Patch8: 0008-systemd-let-NetworkManager-wait-online.service-requi.patch
Requires(post): systemd
Requires(preun): systemd
@ -353,6 +354,8 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
%if %{with regen_docs}
@ -364,6 +367,7 @@ intltoolize --automake --copy --force
--disable-static \
--with-dhclient=yes \
--with-dhcpcd=no \
--with-config-dhcp-default=dhclient \
--with-crypto=nss \
%if %{with test}
--enable-more-warnings=error \
@ -681,6 +685,10 @@ fi
%endif
%changelog
* Mon Nov 2 2017 Thomas Haller <thaller@redhat.com> - 1:1.8.4-6
- systemd: let NM-w-o.service require NetworkManager service (rh #1452866)
- platform: really treat dsa devices as regular wired ethernet (rh #1371289)
* Mon Oct 8 2017 Lubomir Rintel <lkundrak@v3.sk> - 1:1.8.4-5
- platform: treat dsa devices as regular wired ethernet (rh #1371289)