[packages/systemd] - restore net-rename-revert patch - removed outdated cosmetics pacthes
baggins
baggins at pld-linux.org
Mon May 25 20:21:47 CEST 2015
commit d3c9da06eba8b63d949cdc02abae2710e96e63f5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon May 25 20:21:19 2015 +0200
- restore net-rename-revert patch
- removed outdated cosmetics pacthes
dont-hash-null-keys.patch | 16 ------
net-rename-revert.patch | 134 +++++++++++++++++-----------------------------
shut-sysv-up.patch | 19 -------
systemd.spec | 12 ++---
4 files changed, 53 insertions(+), 128 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index e082ee5..2326396 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -55,7 +55,6 @@ Source120: udev.blacklist
Source121: fbdev.blacklist
Patch0: target-pld.patch
Patch1: config-pld.patch
-Patch2: shut-sysv-up.patch
Patch3: pld-sysv-network.patch
Patch4: tmpfiles-not-fatal.patch
Patch8: udev-ploop-rules.patch
@@ -63,7 +62,6 @@ Patch9: udevadm-in-sbin.patch
Patch10: net-rename-revert.patch
Patch11: nss-in-rootlib.patch
Patch12: proc-hidepid.patch
-Patch14: dont-hash-null-keys.patch
Patch16: systemd-configfs.patch
Patch17: pld-boot_efi_mount.patch
Patch18: optional-tmp-on-tmpfs.patch
@@ -668,23 +666,23 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
%setup -q
%patch0 -p1
%patch1 -p1
-#patch2 -p1
%patch3 -p1
%patch4 -p1
%patch8 -p1
%patch9 -p1
-# rejected upstream
-#patch10 -p1
+# rejected upstream (do not disable!)
+%patch10 -p1
%patch11 -p1
%patch12 -p1
-# possible cause of infinite loop inside systemd-login
-#patch14 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
cp -p %{SOURCE2} src/systemd_booted.c
+# this file is autogenerated
+%{__rm} src/udev/keyboard-keys-from-name.gperf
+
%build
%{__gtkdocize}
%{__libtoolize}
diff --git a/dont-hash-null-keys.patch b/dont-hash-null-keys.patch
deleted file mode 100644
index b50931a..0000000
--- a/dont-hash-null-keys.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- systemd-206/src/shared/hashmap.c~ 2013-07-22 00:43:28.172182934 +0200
-+++ systemd-206/src/shared/hashmap.c 2013-08-16 17:28:17.374796716 +0200
-@@ -272,9 +272,11 @@
- assert(h);
- assert(e);
-
-- hash = h->hash_func(e->key) % NBUCKETS;
-+ if (e->key) {
-+ hash = h->hash_func(e->key) % NBUCKETS;
-
-- unlink_entry(h, e, hash);
-+ unlink_entry(h, e, hash);
-+ }
-
- if (h->from_pool)
- deallocate_tile(&first_entry_tile, e);
diff --git a/net-rename-revert.patch b/net-rename-revert.patch
index c7c59ce..6446261 100644
--- a/net-rename-revert.patch
+++ b/net-rename-revert.patch
@@ -1,116 +1,78 @@
-https://bugs.freedesktop.org/show_bug.cgi?id=53837
+From: Michael Biebl <biebl at debian.org>
+Date: Thu, 18 Jul 2013 01:04:07 +0200
+Subject: Revert "udev: network device renaming - immediately give up if the
+ target name isn't available"
-Kay Sievers <kay at vrfy.org> changed:
+This reverts commit 97595710b77aa162ca5e20da57d0a1ed7355eaad.
- What |Removed |Added
-----------------------------------------------------------------------------
- Status|NEW |RESOLVED
- Resolution| |WONTFIX
+Since we are keeping the old persistent network interface naming for
+now, and make the new naming scheme [1] explictly opt-in [2], re-apply
+this old hack to make the renaming less likely to fail.
---- Comment #1 from Kay Sievers <kay at vrfy.org> 2012-08-20 12:12:56 UTC ---
-Please use biosdevname or name the devices other than ethX.
-
-We do not try to race against the kernel anymore, and therefore do not
-support swapping names around in the kernel namespace.
-
-In short: Devices can no longer be renamed to ethX.
-
-============================================================================
-
-Revert 97595710b77aa162ca5e20da57d0a1ed7355eaad
-
-From: Kay Sievers <kay at vrfy.org>
-Date: Thu, 05 Jul 2012 15:40:50 +0000
-Subject: udev: network device renaming - immediately give up if the target name isn't available
+[1] http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+[2] d5051f7666e25ecf2b32c7076ce18c1de969d01b
+---
+ src/udev/udev-event.c | 41 ++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
-index 2ade0ab..aff1487 100644
+index bc115f1..a673f51 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
-@@ -745,11 +745,32 @@ out:
- return err;
- }
-
-+static void rename_netif_kernel_log(struct ifreq ifr)
-+{
-+ int klog;
-+ FILE *f;
-+
-+ klog = open("/dev/kmsg", O_WRONLY|O_CLOEXEC);
-+ if (klog < 0)
-+ return;
-+
-+ f = fdopen(klog, "w");
-+ if (f == NULL) {
-+ close(klog);
-+ return;
-+ }
-+
-+ fprintf(f, "<30>udevd[%u]: renamed network interface %s to %s\n",
-+ getpid(), ifr.ifr_name, ifr.ifr_newname);
-+ fclose(f);
-+}
-+
- static int rename_netif(struct udev_event *event)
- {
- struct udev_device *dev = event->dev;
- int sk;
- struct ifreq ifr;
+@@ -769,18 +769,53 @@ static int rename_netif(struct udev_event *event) {
+ char name[IFNAMSIZ];
+ const char *oldname;
+ int r;
+ int loop;
- int err;
- log_debug("changing net interface name from '%s' to '%s'\n",
-@@ -766,12 +787,49 @@ static int rename_netif(struct udev_event *event)
- strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev));
- strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
- err = ioctl(sk, SIOCSIFNAME, &ifr);
-- if (err >= 0) {
-- print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
-- } else {
-+ if (err == 0) {
-+ rename_netif_kernel_log(ifr);
+ oldname = udev_device_get_sysname(dev);
+
+ strscpy(name, IFNAMSIZ, event->name);
+
+ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
++ if (r >= 0) {
++ log_debug("renamed network interface %s to %s\n", oldname, name);
+ goto out;
+ }
+
+ /* keep trying if the destination interface name already exists */
-+ err = -errno;
-+ if (err != -EEXIST)
++ if (r != -EEXIST)
+ goto out;
+
+ /* free our own name, another process may wait for us */
-+ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
-+ err = ioctl(sk, SIOCSIFNAME, &ifr);
-+ if (err < 0) {
- err = -errno;
-- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
-+ goto out;
-+ }
-+
++ snprintf(name, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
++ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
+ if (r < 0)
+- return log_error_errno(r, "Error changing net interface name '%s' to '%s': %m", oldname, name);
++ goto out;
+
+- log_debug("renamed network interface '%s' to '%s'", oldname, name);
+ /* log temporary name */
-+ rename_netif_kernel_log(ifr);
-+
++ log_debug("renamed network interface %s to %s\n", oldname, name);
+
+- return 0;
+ /* wait a maximum of 90 seconds for our target to become available */
-+ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname);
-+ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
++ strscpy(name, IFNAMSIZ, event->name);
+ loop = 90 * 20;
+ while (loop--) {
+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 };
+
+ nanosleep(&duration, NULL);
+
-+ err = ioctl(sk, SIOCSIFNAME, &ifr);
-+ if (err == 0) {
-+ rename_netif_kernel_log(ifr);
++ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name);
++ if (r >= 0) {
++ log_debug("renamed network interface %s to %s\n", oldname, name);
+ break;
+ }
-+ err = -errno;
-+ if (err != -EEXIST)
++ if (r != -EEXIST)
+ break;
- }
++ }
+
+out:
-+ if (err < 0)
-+ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
- close(sk);
- return err;
++ if (r < 0)
++ log_error("error changing net interface name '%s' to '%s': %s",
++ oldname, name, strerror(-r));
++ return r;
}
+
+ void udev_event_execute_rules(struct udev_event *event,
diff --git a/shut-sysv-up.patch b/shut-sysv-up.patch
deleted file mode 100644
index b9a6b29..0000000
--- a/shut-sysv-up.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -urNp systemd-37.orig/src/unit.c systemd-37/src/unit.c
---- systemd-37.orig/src/unit.c 2011-09-23 16:28:27.000000000 +0200
-+++ systemd-37/src/unit.c 2011-12-05 21:37:15.000000000 +0100
-@@ -2432,7 +2432,14 @@ void unit_status_printf(Unit *u, const c
- assert(u);
- assert(format);
-
-- if (!UNIT_VTABLE(u)->show_status)
-+ if (!UNIT_VTABLE(u)->show_status
-+ || (u->manager->sysv_console
-+ && (u->description != NULL
-+ && (startswith(u->description, "SYSV: ")
-+ || startswith(u->description, "LSB: ")))
-+ && (u->job == NULL || u->job->result == JOB_DONE)
-+ && UNIT_VTABLE(u)->active_state(u) != UNIT_FAILED
-+ && LOG_PRI(log_get_max_level()) <= LOG_INFO))
- return;
-
- if (!manager_get_show_status(u->manager))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/d3c9da06eba8b63d949cdc02abae2710e96e63f5
More information about the pld-cvs-commit
mailing list