From 3ef87bd877cd21a93b703dec032e0879048c75f27e777bf970623c698b7ef3ac Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 4 Mar 2014 10:38:55 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=532 --- 1006-udev-always-rename-network.patch | 63 +++++++++++++++++++++++++++ 1022-systemd-tmpfiles-ownerkeep.patch | 10 +++++ systemd.changes | 12 +++++ systemd.spec | 3 ++ 4 files changed, 88 insertions(+) create mode 100644 1006-udev-always-rename-network.patch create mode 100644 1022-systemd-tmpfiles-ownerkeep.patch diff --git a/1006-udev-always-rename-network.patch b/1006-udev-always-rename-network.patch new file mode 100644 index 00000000..1cbbda78 --- /dev/null +++ b/1006-udev-always-rename-network.patch @@ -0,0 +1,63 @@ +From: Robert Milasan +Cc: Werner Fink +Subject: udev always rename network + +Date: Thu, 28 Mar 2013 09:24:43 +0000 +udev: ensure that the network interfaces are renamed even if they exist (bnc#809843). + +Date: Tue, 4 Mar 2014 10:29:21 +0000 +Port the patch of Robert to systemd v210 and test it out. + +--- + udev-event.c | 40 ++++++++++++++++++++++++++++++++++++---- + 1 file changed, 36 insertions(+), 4 deletions(-) + +--- systemd-210/src/udev/udev-event.c ++++ systemd-210/src/udev/udev-event.c 2014-03-04 11:19:50.583710411 +0100 +@@ -765,10 +765,42 @@ static int rename_netif(struct udev_even + return r; + + r = rtnl_set_link_name(rtnl, udev_device_get_ifindex(dev), name); +- if (r < 0) +- log_error("error changing net interface name %s to %s: %s", +- oldname, name, strerror(-r)); +- else ++ if (r < 0) { ++ char interim[IFNAMSIZ], *ptr = &interim[0]; ++ int loop = 90; ++ ++ /* keep trying if the destination interface name already exists */ ++ if (r != -EEXIST) { ++ log_error("error changing net interface name %s to %s: %s", ++ oldname, name, strerror(-r)); ++ return r; ++ } ++ ++ /* free our own name, another process may wait for us */ ++ strpcpyf(&ptr, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev)); ++ ++ r = rtnl_set_link_name(rtnl, udev_device_get_ifindex(dev), interim); ++ if (r < 0) { ++ log_error("error changing net interface name %s to %s: %s", ++ oldname, name, strerror(-r)); ++ return r; ++ } ++ ++ /* log temporary name */ ++ print_kmsg("renamed network interface %s to %s", oldname, interim); ++ do { ++ r = rtnl_set_link_name(rtnl, udev_device_get_ifindex(dev), name); ++ if (r == 0) { ++ print_kmsg("renamed network interface %s to %s", oldname, name); ++ return r; ++ } ++ if (r != -EEXIST) { ++ log_error("error changing net interface name %s to %s: %s", ++ oldname, name, strerror(-r)); ++ return r; ++ } ++ } while (loop-- > 0); ++ } else + print_kmsg("renamed network interface %s to %s", oldname, name); + + return r; diff --git a/1022-systemd-tmpfiles-ownerkeep.patch b/1022-systemd-tmpfiles-ownerkeep.patch new file mode 100644 index 00000000..c7f3589b --- /dev/null +++ b/1022-systemd-tmpfiles-ownerkeep.patch @@ -0,0 +1,10 @@ +diff -Naur systemd-208/units/systemd-tmpfiles-clean.service.in systemd-208-mod/units/systemd-tmpfiles-clean.service.in +--- systemd-208/units/systemd-tmpfiles-clean.service.in 2013-08-13 20:02:52.826756410 +0000 ++++ systemd-208-mod/units/systemd-tmpfiles-clean.service.in 2014-02-21 13:34:56.456511025 +0000 +@@ -19,5 +19,6 @@ + + [Service] + Type=oneshot ++ExecStart=-@rootbindir@/systemd-tmpfiles-keep + ExecStart=@rootbindir@/systemd-tmpfiles --clean + IOSchedulingClass=idle diff --git a/systemd.changes b/systemd.changes index c95a74e1..43e274e8 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Mar 4 10:37:02 UTC 2014 - werner@suse.de + +- Make patch 1006-udev-always-rename-network.patch work again + and add it again. + +------------------------------------------------------------------- +Mon Mar 3 15:23:57 UTC 2014 - thomas.blume@suse.com + +- address missing owner functionality in systemd-tmpfiles (fate#314974) + 1022-systemd-tmpfiles-ownerkeep.patch + ------------------------------------------------------------------- Mon Mar 3 14:49:48 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 5d0416d4..9bb17147 100644 --- a/systemd.spec +++ b/systemd.spec @@ -261,6 +261,8 @@ Patch1019: 1019-make-completion-smart-to-be-able-to-redirect.patch Patch1020: 0001-add-network-device-after-NFS-mount-units.patch # PATCH-FIX-SUSE systemd-dbus-system-bus-address.patch Patch1021: systemd-dbus-system-bus-address.patch +# PATCH-FIX-SUSE 1022-systemd-tmpfiles-ownerkeep.patch +Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch # PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch Patch1999: systemd-install-compat_pkgconfig-always.patch @@ -557,6 +559,7 @@ cp %{SOURCE7} m4/ %patch1019 -p1 %patch1020 -p1 %patch1021 -p1 +%patch1022 -p1 %patch1999 -p1 # udev patches