Accepting request 233680 from Base:System
- Add patch log-target-null-instead-kmsg.patch from Thomas Blume to enable the kernel developers to see a clean kmsg ring buffer without any systemd/udev messages included (bnc#877021) - Add upstram patches for backlight 0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch 0002-backlight-do-nothing-if-max_brightness-is-0.patch 0003-backlight-unify-error-messages.patch 0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch 0005-backlight-handle-saved-brightness-exceeding-max-brig.patch - Add upstream patches 0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch 0002-udev-warn-when-name_to_handle_at-is-not-implemented.patch 0003-analyze-fix-plot-with-bad-y-size.patch 0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch 0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch - Drop upstream-net_id-changes.patch and replace them with the correct patches from upstream and their commits: add: 1014-udev-update-net_id-comments.patch add: 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch - Add patch log-target-null-instead-kmsg.patch from Thomas Blume to enable the kernel developers to see a clean kmsg ring buffer without any systemd/udev messages included (bnc#877021) - Add upstram patches for backlight 0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch 0002-backlight-do-nothing-if-max_brightness-is-0.patch OBS-URL: https://build.opensuse.org/request/show/233680 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=186
This commit is contained in:
parent
e0b301714e
commit
88094f2bbb
@ -0,0 +1,79 @@
|
||||
From 7b909d7407965c03caaba30daae7aee113627a83 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Triplett <josh@joshtriplett.org>
|
||||
Date: Tue, 11 Mar 2014 21:16:33 -0700
|
||||
Subject: [PATCH] backlight: Avoid restoring brightness to an unreadably dim
|
||||
level
|
||||
|
||||
Some systems turn the backlight all the way off at the lowest levels.
|
||||
Clamp saved brightness to at least 1 or 5% of max_brightness. This
|
||||
avoids preserving an unreadably dim screen, which would otherwise force
|
||||
the user to disable state restoration.
|
||||
---
|
||||
src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 44 insertions(+)
|
||||
|
||||
diff --git src/backlight/backlight.c src/backlight/backlight.c
|
||||
index 81470b3..abf8bcf 100644
|
||||
--- src/backlight/backlight.c
|
||||
+++ src/backlight/backlight.c
|
||||
@@ -192,6 +192,48 @@ static bool validate_device(struct udev *udev, struct udev_device *device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+/* Some systems turn the backlight all the way off at the lowest levels.
|
||||
+ * clamp_brightness clamps the saved brightness to at least 1 or 5% of
|
||||
+ * max_brightness. This avoids preserving an unreadably dim screen, which
|
||||
+ * would otherwise force the user to disable state restoration. */
|
||||
+static void clamp_brightness(struct udev_device *device, char **value) {
|
||||
+ int r;
|
||||
+ const char *max_brightness_str;
|
||||
+ unsigned brightness, max_brightness, new_brightness;
|
||||
+
|
||||
+ max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
|
||||
+ if (!max_brightness_str) {
|
||||
+ log_warning("Failed to read max_brightness attribute; not checking saved brightness");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ r = safe_atou(*value, &brightness);
|
||||
+ if (r < 0) {
|
||||
+ log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ r = safe_atou(max_brightness_str, &max_brightness);
|
||||
+ if (r < 0) {
|
||||
+ log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ new_brightness = MAX3(brightness, 1U, max_brightness/20);
|
||||
+ if (new_brightness != brightness) {
|
||||
+ char *old_value = *value;
|
||||
+
|
||||
+ r = asprintf(value, "%u", new_brightness);
|
||||
+ if (r < 0) {
|
||||
+ log_oom();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ log_debug("Saved brightness %s too low; increasing to %s.", old_value, *value);
|
||||
+ free(old_value);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int main(int argc, char *argv[]) {
|
||||
_cleanup_udev_unref_ struct udev *udev = NULL;
|
||||
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
|
||||
@@ -306,6 +348,8 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
+ clamp_brightness(device, &value);
|
||||
+
|
||||
r = udev_device_set_sysattr_value(device, "brightness", value);
|
||||
if (r < 0) {
|
||||
log_error("Failed to write system attribute: %s", strerror(-r));
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,30 @@
|
||||
Based on 0d522a7a0547982eae9ab1b5971e4bed9c2fbc7c Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 24 Apr 2014 08:11:39 +0200
|
||||
Subject: [PATCH] errno: make sure to handle the 3 errnos that are aliases for
|
||||
others properly
|
||||
|
||||
---
|
||||
Makefile.am | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- Makefile.am
|
||||
+++ Makefile.am 2014-05-12 00:00:00.000000000 +0000
|
||||
@@ -1078,7 +1078,7 @@ BUILT_SOURCES += \
|
||||
|
||||
src/shared/errno-list.txt:
|
||||
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
||||
- $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }' > $@
|
||||
+ $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' > $@
|
||||
|
||||
src/shared/errno-from-name.gperf: src/shared/errno-list.txt
|
||||
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
||||
@@ -1090,7 +1090,7 @@ src/shared/errno-from-name.h: src/shared
|
||||
|
||||
src/shared/errno-to-name.h: src/shared/errno-list.txt
|
||||
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
||||
- $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
|
||||
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
systemd_SOURCES = \
|
108
0002-backlight-do-nothing-if-max_brightness-is-0.patch
Normal file
108
0002-backlight-do-nothing-if-max_brightness-is-0.patch
Normal file
@ -0,0 +1,108 @@
|
||||
From 3cadce7d33e263ec7a6a83c00c11144930258b22 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
|
||||
Date: Thu, 27 Mar 2014 23:41:59 +0100
|
||||
Subject: [PATCH] backlight: do nothing if max_brightness is 0
|
||||
|
||||
On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
|
||||
It exposes a backlight device despite the lack of any physical backlight
|
||||
devices. This fake backlight device has max_brightness set to 0. Since
|
||||
the introduction of the clamp_brightness function, systemd-backlight
|
||||
tries to write '1' to brightness and fails.
|
||||
|
||||
This patch changes systemd-backlight to exit gracefully when
|
||||
max_brightness is 0 before performing any action. This affects
|
||||
both the load and save actions.
|
||||
---
|
||||
src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 30 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git src/backlight/backlight.c src/backlight/backlight.c
|
||||
index abf8bcf..ce0385b 100644
|
||||
--- src/backlight/backlight.c
|
||||
+++ src/backlight/backlight.c
|
||||
@@ -192,30 +192,37 @@ static bool validate_device(struct udev *udev, struct udev_device *device) {
|
||||
return true;
|
||||
}
|
||||
|
||||
-/* Some systems turn the backlight all the way off at the lowest levels.
|
||||
- * clamp_brightness clamps the saved brightness to at least 1 or 5% of
|
||||
- * max_brightness. This avoids preserving an unreadably dim screen, which
|
||||
- * would otherwise force the user to disable state restoration. */
|
||||
-static void clamp_brightness(struct udev_device *device, char **value) {
|
||||
+static unsigned get_max_brightness(struct udev_device *device) {
|
||||
int r;
|
||||
const char *max_brightness_str;
|
||||
- unsigned brightness, max_brightness, new_brightness;
|
||||
+ unsigned max_brightness;
|
||||
|
||||
max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
|
||||
if (!max_brightness_str) {
|
||||
- log_warning("Failed to read max_brightness attribute; not checking saved brightness");
|
||||
- return;
|
||||
+ log_warning("Failed to read max_brightness attribute");
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- r = safe_atou(*value, &brightness);
|
||||
+ r = safe_atou(max_brightness_str, &max_brightness);
|
||||
if (r < 0) {
|
||||
- log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
|
||||
- return;
|
||||
+ log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- r = safe_atou(max_brightness_str, &max_brightness);
|
||||
+ return max_brightness;
|
||||
+}
|
||||
+
|
||||
+/* Some systems turn the backlight all the way off at the lowest levels.
|
||||
+ * clamp_brightness clamps the saved brightness to at least 1 or 5% of
|
||||
+ * max_brightness. This avoids preserving an unreadably dim screen, which
|
||||
+ * would otherwise force the user to disable state restoration. */
|
||||
+static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) {
|
||||
+ int r;
|
||||
+ unsigned brightness, new_brightness;
|
||||
+
|
||||
+ r = safe_atou(*value, &brightness);
|
||||
if (r < 0) {
|
||||
- log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
|
||||
+ log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,6 +246,7 @@ int main(int argc, char *argv[]) {
|
||||
_cleanup_udev_device_unref_ struct udev_device *device = NULL;
|
||||
_cleanup_free_ char *saved = NULL, *ss = NULL, *escaped_ss = NULL, *escaped_sysname = NULL, *escaped_path_id = NULL;
|
||||
const char *sysname, *path_id;
|
||||
+ unsigned max_brightness;
|
||||
int r;
|
||||
|
||||
if (argc != 3) {
|
||||
@@ -294,6 +302,14 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
+ /* If max_brightness is 0, then there is no actual backlight
|
||||
+ * device. This happens on desktops with Asus mainboards
|
||||
+ * that load the eeepc-wmi module.
|
||||
+ */
|
||||
+ max_brightness = get_max_brightness(device);
|
||||
+ if (max_brightness == 0)
|
||||
+ return EXIT_SUCCESS;
|
||||
+
|
||||
escaped_ss = cescape(ss);
|
||||
if (!escaped_ss) {
|
||||
log_oom();
|
||||
@@ -348,7 +364,7 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
- clamp_brightness(device, &value);
|
||||
+ clamp_brightness(device, &value, max_brightness);
|
||||
|
||||
r = udev_device_set_sysattr_value(device, "brightness", value);
|
||||
if (r < 0) {
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,30 @@
|
||||
Based on e6c474723dc66cd4765fd09453d6b48bd5905ba4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 20 Apr 2014 13:57:26 -0400
|
||||
Subject: [PATCH] udev: warn when name_to_handle_at is not implemented
|
||||
|
||||
We have a bunch of reports from people who have a custom kernel and
|
||||
are confused why udev is not running. Issue a warning on
|
||||
error. Barring an error in the code, the only error that is possible
|
||||
is ENOSYS.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1072966
|
||||
---
|
||||
src/libudev/libudev-monitor.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- src/libudev/libudev-monitor.c
|
||||
+++ src/libudev/libudev-monitor.c 2014-05-12 00:00:00.000000000 +0000
|
||||
@@ -115,8 +115,11 @@ static bool udev_has_devtmpfs(struct ude
|
||||
int r;
|
||||
|
||||
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
|
||||
- if (r < 0)
|
||||
+ if (r < 0) {
|
||||
+ if (errno != EOPNOTSUPP)
|
||||
+ udev_err(udev, "name_to_handle_at on /dev: %m\n");
|
||||
return false;
|
||||
+ }
|
||||
|
||||
|
||||
f = fopen("/proc/self/mountinfo", "re");
|
31
0003-analyze-fix-plot-with-bad-y-size.patch
Normal file
31
0003-analyze-fix-plot-with-bad-y-size.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From a213b7e977221ca96bbc1b19a5a879c912ba2488 Mon Sep 17 00:00:00 2001
|
||||
From: Jeffrey Clark <h0tw1r3@gmail.com>
|
||||
Date: Wed, 23 Apr 2014 22:37:43 +0200
|
||||
Subject: [PATCH] analyze: fix plot with bad y size
|
||||
|
||||
systemd-analyze plot > test.svg produces output with all y and height
|
||||
element attributes equal to zero. This of course causes the resulting
|
||||
svg to appear blank (zero height). Bug does not affect x86. Looks like
|
||||
a compiler optimization may be the culprit.
|
||||
|
||||
https://github.com/archlinuxarm/PKGBUILDs/issues/815
|
||||
---
|
||||
src/analyze/analyze.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git src/analyze/analyze.c src/analyze/analyze.c
|
||||
index ba236d9..ebaa9d0 100644
|
||||
--- src/analyze/analyze.c
|
||||
+++ src/analyze/analyze.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "pager.h"
|
||||
|
||||
#define SCALE_X (0.1 / 1000.0) /* pixels per us */
|
||||
-#define SCALE_Y 20.0
|
||||
+#define SCALE_Y (20.0)
|
||||
|
||||
#define compare(a, b) (((a) > (b))? 1 : (((b) > (a))? -1 : 0))
|
||||
|
||||
--
|
||||
1.7.9.2
|
||||
|
115
0003-backlight-unify-error-messages.patch
Normal file
115
0003-backlight-unify-error-messages.patch
Normal file
@ -0,0 +1,115 @@
|
||||
Based on 938d2699d2e818bd996614e89ea3d668200ad2a8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 7 Apr 2014 20:57:22 -0400
|
||||
Subject: [PATCH] backlight: unify error messages
|
||||
|
||||
---
|
||||
src/backlight/backlight.c | 29 +++++++++++++++++++----------
|
||||
1 file changed, 19 insertions(+), 10 deletions(-)
|
||||
|
||||
--- src/backlight/backlight.c
|
||||
+++ src/backlight/backlight.c 2014-05-12 13:31:50.502235843 +0000
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "fileio.h"
|
||||
#include "libudev.h"
|
||||
#include "udev-util.h"
|
||||
+#include "def.h"
|
||||
|
||||
static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) {
|
||||
struct udev_device *parent;
|
||||
@@ -50,7 +51,7 @@ static struct udev_device *find_pci_or_p
|
||||
if (!c)
|
||||
return NULL;
|
||||
|
||||
- c += strspn(c, "0123456789");
|
||||
+ c += strspn(c, DIGITS);
|
||||
if (*c == '-') {
|
||||
/* A connector DRM device, let's ignore all but LVDS and eDP! */
|
||||
|
||||
@@ -67,7 +68,8 @@ static struct udev_device *find_pci_or_p
|
||||
unsigned long class = 0;
|
||||
|
||||
if (safe_atolu(value, &class) < 0) {
|
||||
- log_warning("Cannot parse PCI class %s of device %s:%s.", value, subsystem, sysname);
|
||||
+ log_warning("Cannot parse PCI class %s of device %s:%s.",
|
||||
+ value, subsystem, sysname);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -175,7 +177,9 @@ static bool validate_device(struct udev
|
||||
if (same_device(parent, other_parent)) {
|
||||
/* Both have the same PCI parent, that means
|
||||
* we are out. */
|
||||
- log_debug("Skipping backlight device %s, since backlight device %s is on same PCI device and, takes precedence.", udev_device_get_sysname(device), udev_device_get_sysname(other));
|
||||
+ log_debug("Skipping backlight device %s, since device %s is on same PCI device and takes precedence.",
|
||||
+ udev_device_get_sysname(device),
|
||||
+ udev_device_get_sysname(other));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -184,7 +188,9 @@ static bool validate_device(struct udev
|
||||
/* The other is connected to the platform bus
|
||||
* and we are a PCI device, that also means we
|
||||
* are out. */
|
||||
- log_debug("Skipping backlight device %s, since backlight device %s is a platform device and takes precedence.", udev_device_get_sysname(device), udev_device_get_sysname(other));
|
||||
+ log_debug("Skipping backlight device %s, since device %s is a platform device and takes precedence.",
|
||||
+ udev_device_get_sysname(device),
|
||||
+ udev_device_get_sysname(other));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -199,13 +205,14 @@ static unsigned get_max_brightness(struc
|
||||
|
||||
max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
|
||||
if (!max_brightness_str) {
|
||||
- log_warning("Failed to read max_brightness attribute");
|
||||
+ log_warning("Failed to read 'max_brightness' attribute");
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = safe_atou(max_brightness_str, &max_brightness);
|
||||
if (r < 0) {
|
||||
- log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
|
||||
+ log_warning("Failed to parse 'max_brightness' \"%s\": %s",
|
||||
+ max_brightness_str, strerror(-r));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -262,7 +269,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = mkdir_p("/var/lib/systemd/backlight", 0755);
|
||||
if (r < 0) {
|
||||
- log_error("Failed to create backlight directory: %s", strerror(-r));
|
||||
+ log_error("Failed to create backlight directory /var/lib/systemd/backlight: %s",
|
||||
+ strerror(-r));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -274,7 +282,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
sysname = strchr(argv[2], ':');
|
||||
if (!sysname) {
|
||||
- log_error("Requires pair of subsystem and sysname for specifying backlight device.");
|
||||
+ log_error("Requires a subsystem and sysname pair specifying a backlight device.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -368,7 +376,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = udev_device_set_sysattr_value(device, "brightness", value);
|
||||
if (r < 0) {
|
||||
- log_error("Failed to write system attribute: %s", strerror(-r));
|
||||
+ log_error("Failed to write system 'brightness' attribute: %s",
|
||||
+ strerror(-r));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -382,7 +391,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
value = udev_device_get_sysattr_value(device, "brightness");
|
||||
if (!value) {
|
||||
- log_error("Failed to read system attribute: %s", strerror(-r));
|
||||
+ log_error("Failed to read system 'brightness' attribute: %s", strerror(-r));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -0,0 +1,40 @@
|
||||
From c7fdf44d08e1217d40dc092fb90a65978a0f541f Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 23 Apr 2014 06:55:54 +0200
|
||||
Subject: [PATCH] backlight: warn if kernel exposes backlight device with
|
||||
bogus max_brightness
|
||||
|
||||
We shouldn't silently tape over broken kernel drivers.
|
||||
---
|
||||
src/backlight/backlight.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git src/backlight/backlight.c src/backlight/backlight.c
|
||||
index 754a646..c708391 100644
|
||||
--- src/backlight/backlight.c
|
||||
+++ src/backlight/backlight.c
|
||||
@@ -205,14 +205,18 @@ static unsigned get_max_brightness(struct udev_device *device) {
|
||||
|
||||
max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
|
||||
if (!max_brightness_str) {
|
||||
- log_warning("Failed to read 'max_brightness' attribute");
|
||||
+ log_warning("Failed to read 'max_brightness' attribute.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = safe_atou(max_brightness_str, &max_brightness);
|
||||
if (r < 0) {
|
||||
- log_warning("Failed to parse 'max_brightness' \"%s\": %s",
|
||||
- max_brightness_str, strerror(-r));
|
||||
+ log_warning("Failed to parse 'max_brightness' \"%s\": %s", max_brightness_str, strerror(-r));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (max_brightness <= 0) {
|
||||
+ log_warning("Maximum brightness is 0, ignoring device.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,30 @@
|
||||
Based on 20a83d7bf4542875f8033b68682a4da4993010e8 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Philips <brandon@ifup.co>
|
||||
Date: Fri, 25 Apr 2014 09:31:59 -0600
|
||||
Subject: [PATCH] job: add waiting jobs to run queue in unit_coldplug
|
||||
|
||||
When we have job installed and added to run queue for service which is
|
||||
still in dead state and systemd initiates reload then after reload we
|
||||
never add deserialized job to the run queue again. This is caused by
|
||||
check in service_coldplug() where we check if deserialized state is
|
||||
something else than dead state, which is not the case thus we never call
|
||||
service_set_state() and finally unit_notify() where we would have added
|
||||
job to the run queue.
|
||||
|
||||
Thanks to Michal Sekletar <msekleta@redhat.com> for the original patch.
|
||||
---
|
||||
src/core/job.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- src/core/job.c
|
||||
+++ src/core/job.c 2014-05-12 12:58:30.354235531 +0000
|
||||
@@ -1057,6 +1057,9 @@ int job_coldplug(Job *j) {
|
||||
if (j->timer_event_source)
|
||||
j->timer_event_source = sd_event_source_unref(j->timer_event_source);
|
||||
|
||||
+ if (j->state == JOB_WAITING)
|
||||
+ job_add_to_run_queue(j);
|
||||
+
|
||||
r = sd_event_add_monotonic(j->manager->event, &j->timer_event_source, j->begin_usec + j->unit->job_timeout, 0, job_dispatch_timer, j);
|
||||
if (r < 0)
|
||||
log_debug("Failed to restart timeout for job: %s", strerror(-r));
|
@ -0,0 +1,64 @@
|
||||
From 0c9d8f1d4b5018199cb5a9b57580dc1480a7f915 Mon Sep 17 00:00:00 2001
|
||||
From: Jani Nikula <jani.nikula@intel.com>
|
||||
Date: Wed, 7 May 2014 12:01:01 +0300
|
||||
Subject: [PATCH] backlight: handle saved brightness exceeding max brightness
|
||||
|
||||
If too high a brightness value has been saved (e.g. due to kernel
|
||||
mechanism changing from one kernel version to another, or booting the
|
||||
userspace on another system), the brightness update fails and the
|
||||
process exits.
|
||||
|
||||
Clamp saved brightness between the policy minimum introduced in
|
||||
|
||||
commit 7b909d7407965c03caaba30daae7aee113627a83
|
||||
Author: Josh Triplett <josh@joshtriplett.org>
|
||||
Date: Tue Mar 11 21:16:33 2014 -0700
|
||||
|
||||
backlight: Avoid restoring brightness to an unreadably dim level
|
||||
|
||||
and the absolute maximum.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=78200
|
||||
---
|
||||
src/backlight/backlight.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git src/backlight/backlight.c src/backlight/backlight.c
|
||||
index c708391..691472c 100644
|
||||
--- src/backlight/backlight.c
|
||||
+++ src/backlight/backlight.c
|
||||
@@ -229,7 +229,7 @@ static unsigned get_max_brightness(struct udev_device *device) {
|
||||
* would otherwise force the user to disable state restoration. */
|
||||
static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) {
|
||||
int r;
|
||||
- unsigned brightness, new_brightness;
|
||||
+ unsigned brightness, new_brightness, min_brightness;
|
||||
|
||||
r = safe_atou(*value, &brightness);
|
||||
if (r < 0) {
|
||||
@@ -237,7 +237,8 @@ static void clamp_brightness(struct udev_device *device, char **value, unsigned
|
||||
return;
|
||||
}
|
||||
|
||||
- new_brightness = MAX3(brightness, 1U, max_brightness/20);
|
||||
+ min_brightness = MAX(1U, max_brightness/20);
|
||||
+ new_brightness = CLAMP(brightness, min_brightness, max_brightness);
|
||||
if (new_brightness != brightness) {
|
||||
char *old_value = *value;
|
||||
|
||||
@@ -247,7 +248,11 @@ static void clamp_brightness(struct udev_device *device, char **value, unsigned
|
||||
return;
|
||||
}
|
||||
|
||||
- log_debug("Saved brightness %s too low; increasing to %s.", old_value, *value);
|
||||
+ log_info("Saved brightness %s %s to %s.", old_value,
|
||||
+ new_brightness > brightness ?
|
||||
+ "too low; increasing" : "too high; decreasing",
|
||||
+ *value);
|
||||
+
|
||||
free(old_value);
|
||||
}
|
||||
}
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,34 @@
|
||||
Based on 1727a595225132eb73ec134b6979d9c713b42e8c Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
Date: Mon, 12 May 2014 09:26:16 +0200
|
||||
Subject: [PATCH] job: always add waiting jobs to run queue during coldplug
|
||||
|
||||
commit 20a83d7bf was not equivalent to the original bug fix proposed by
|
||||
Michal Sekletar <msekleta@redhat.com>. The committed version only added
|
||||
the job to the run queue if the job had a timeout, which most jobs do
|
||||
not have. Just re-ordering the code gets us the intended functionality
|
||||
---
|
||||
src/core/job.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- src/core/job.c
|
||||
+++ src/core/job.c 2014-05-12 13:11:24.918735646 +0000
|
||||
@@ -1051,15 +1051,15 @@ int job_coldplug(Job *j) {
|
||||
|
||||
assert(j);
|
||||
|
||||
+ if (j->state == JOB_WAITING)
|
||||
+ job_add_to_run_queue(j);
|
||||
+
|
||||
if (j->begin_usec == 0 || j->unit->job_timeout == 0)
|
||||
return 0;
|
||||
|
||||
if (j->timer_event_source)
|
||||
j->timer_event_source = sd_event_source_unref(j->timer_event_source);
|
||||
|
||||
- if (j->state == JOB_WAITING)
|
||||
- job_add_to_run_queue(j);
|
||||
-
|
||||
r = sd_event_add_monotonic(j->manager->event, &j->timer_event_source, j->begin_usec + j->unit->job_timeout, 0, job_dispatch_timer, j);
|
||||
if (r < 0)
|
||||
log_debug("Failed to restart timeout for job: %s", strerror(-r));
|
102
1014-udev-update-net_id-comments.patch
Normal file
102
1014-udev-update-net_id-comments.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From d4b687c96adf207f0878aebf3ce3371f6160687f Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Thu, 27 Mar 2014 15:30:09 +0100
|
||||
Subject: [PATCH] udev: update net_id comments
|
||||
|
||||
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
||||
---
|
||||
src/udev/udev-builtin-net_id.c | 31 +++++++++++++++----------------
|
||||
1 file changed, 15 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
|
||||
index 4f2b2c1..9ac07de 100644
|
||||
--- a/src/udev/udev-builtin-net_id.c
|
||||
+++ b/src/udev/udev-builtin-net_id.c
|
||||
@@ -33,8 +33,11 @@
|
||||
* ww -- wwan
|
||||
*
|
||||
* Type of names:
|
||||
+ * b<number> -- BCMA bus core number
|
||||
+ * ccw<name> -- CCW bus group name
|
||||
* o<index> -- on-board device index number
|
||||
* s<slot>[f<function>][d<dev_id>] -- hotplug slot index number
|
||||
+ * v<number> -- virtio number
|
||||
* x<MAC> -- MAC address
|
||||
* [P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]
|
||||
* -- PCI geographical location
|
||||
@@ -119,12 +122,9 @@ struct netnames {
|
||||
const char *pci_onboard_label;
|
||||
|
||||
char usb_ports[IFNAMSIZ];
|
||||
-
|
||||
char bcma_core[IFNAMSIZ];
|
||||
-
|
||||
- char virtio_core[IFNAMSIZ];
|
||||
-
|
||||
- char ccw_core[IFNAMSIZ];
|
||||
+ char virtio[IFNAMSIZ];
|
||||
+ char ccw_group[IFNAMSIZ];
|
||||
};
|
||||
|
||||
/* retrieve on-board index number and label from firmware */
|
||||
@@ -353,18 +353,17 @@ static int names_bcma(struct udev_device *dev, struct netnames *names) {
|
||||
|
||||
static int names_virtio(struct udev_device *dev, struct netnames *names) {
|
||||
struct udev_device *virtdev;
|
||||
- unsigned int core;
|
||||
+ unsigned int num;
|
||||
|
||||
virtdev = udev_device_get_parent_with_subsystem_devtype(dev, "virtio", NULL);
|
||||
if (!virtdev)
|
||||
return -ENOENT;
|
||||
|
||||
- /* core num */
|
||||
- if (sscanf(udev_device_get_sysname(virtdev), "virtio%u", &core) != 1)
|
||||
+ if (sscanf(udev_device_get_sysname(virtdev), "virtio%u", &num) != 1)
|
||||
return -EINVAL;
|
||||
- /* suppress the common core == 0 */
|
||||
- if (core > 0)
|
||||
- snprintf(names->virtio_core, sizeof(names->virtio_core), "v%u", core);
|
||||
+ /* suppress the common num == 0 */
|
||||
+ if (num > 0)
|
||||
+ snprintf(names->virtio, sizeof(names->virtio), "v%u", num);
|
||||
|
||||
names->type = NET_VIRTIO;
|
||||
return 0;
|
||||
@@ -402,8 +401,8 @@ static int names_ccw(struct udev_device *dev, struct netnames *names) {
|
||||
return -EINVAL;
|
||||
|
||||
/* Store the CCW bus-ID for use as network device name */
|
||||
- rc = snprintf(names->ccw_core, sizeof(names->ccw_core), "ccw%s", bus_id);
|
||||
- if (rc >= 0 && rc < (int)sizeof(names->ccw_core))
|
||||
+ rc = snprintf(names->ccw_group, sizeof(names->ccw_group), "ccw%s", bus_id);
|
||||
+ if (rc >= 0 && rc < (int)sizeof(names->ccw_group))
|
||||
names->type = NET_CCWGROUP;
|
||||
return 0;
|
||||
}
|
||||
@@ -517,7 +516,7 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
|
||||
if (err >= 0 && names.type == NET_CCWGROUP) {
|
||||
char str[IFNAMSIZ];
|
||||
|
||||
- if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_core) < (int)sizeof(str))
|
||||
+ if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_group) < (int)sizeof(str))
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
|
||||
goto out;
|
||||
}
|
||||
@@ -585,11 +584,11 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
|
||||
char str[IFNAMSIZ];
|
||||
|
||||
if (names.pci_path[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.virtio_core) < (int)sizeof(str))
|
||||
+ if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.virtio) < (int)sizeof(str))
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
|
||||
|
||||
if (names.pci_slot[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.virtio_core) < (int)sizeof(str))
|
||||
+ if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.virtio) < (int)sizeof(str))
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
|
||||
goto out;
|
||||
}
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,99 @@
|
||||
From bf81e792f3c0aed54edf004c1c95cc6f6d81d0ee Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Thu, 27 Mar 2014 21:47:14 +0100
|
||||
Subject: [PATCH] udev: persistent naming - we cannot use virtio numbers as
|
||||
they are not stable
|
||||
|
||||
This reverts commit 8741f2defaf26aafe5ee0fd29954cfdf84ee519c: 'Add virtio-blk support to path_id' and
|
||||
commit e3d563346c4237af23335cc6904e0662efdf62ad: 'udev: net_id - handle virtio buses'.
|
||||
|
||||
Distros may want to take note of this, as it changes behavior.
|
||||
|
||||
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
||||
---
|
||||
src/udev/udev-builtin-net_id.c | 36 ------------------------------------
|
||||
src/udev/udev-builtin-path_id.c | 3 ---
|
||||
2 files changed, 39 deletions(-)
|
||||
|
||||
Index: systemd-210/src/udev/udev-builtin-net_id.c
|
||||
===================================================================
|
||||
--- systemd-210.orig/src/udev/udev-builtin-net_id.c
|
||||
+++ systemd-210/src/udev/udev-builtin-net_id.c
|
||||
@@ -37,7 +37,6 @@
|
||||
* ccw<name> -- CCW bus group name
|
||||
* o<index> -- on-board device index number
|
||||
* s<slot>[f<function>][d<dev_id>] -- hotplug slot index number
|
||||
- * v<number> -- virtio number
|
||||
* x<MAC> -- MAC address
|
||||
* [P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]
|
||||
* -- PCI geographical location
|
||||
@@ -123,7 +122,6 @@ struct netnames {
|
||||
|
||||
char usb_ports[IFNAMSIZ];
|
||||
char bcma_core[IFNAMSIZ];
|
||||
- char virtio[IFNAMSIZ];
|
||||
char ccw_group[IFNAMSIZ];
|
||||
};
|
||||
|
||||
@@ -351,24 +349,6 @@ static int names_bcma(struct udev_device
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int names_virtio(struct udev_device *dev, struct netnames *names) {
|
||||
- struct udev_device *virtdev;
|
||||
- unsigned int num;
|
||||
-
|
||||
- virtdev = udev_device_get_parent_with_subsystem_devtype(dev, "virtio", NULL);
|
||||
- if (!virtdev)
|
||||
- return -ENOENT;
|
||||
-
|
||||
- if (sscanf(udev_device_get_sysname(virtdev), "virtio%u", &num) != 1)
|
||||
- return -EINVAL;
|
||||
- /* suppress the common num == 0 */
|
||||
- if (num > 0)
|
||||
- snprintf(names->virtio, sizeof(names->virtio), "v%u", num);
|
||||
-
|
||||
- names->type = NET_VIRTIO;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int names_ccw(struct udev_device *dev, struct netnames *names) {
|
||||
struct udev_device *cdev;
|
||||
const char *bus_id;
|
||||
@@ -577,22 +557,6 @@ static int builtin_net_id(struct udev_de
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
|
||||
goto out;
|
||||
}
|
||||
-
|
||||
- /* virtio bus */
|
||||
- err = names_virtio(dev, &names);
|
||||
- if (err >= 0 && names.type == NET_VIRTIO) {
|
||||
- char str[IFNAMSIZ];
|
||||
-
|
||||
- if (names.pci_path[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.virtio) < (int)sizeof(str))
|
||||
- udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
|
||||
-
|
||||
- if (names.pci_slot[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.virtio) < (int)sizeof(str))
|
||||
- udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
out:
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Index: systemd-210/src/udev/udev-builtin-path_id.c
|
||||
===================================================================
|
||||
--- systemd-210.orig/src/udev/udev-builtin-path_id.c
|
||||
+++ systemd-210/src/udev/udev-builtin-path_id.c
|
||||
@@ -571,9 +571,6 @@ static int builtin_path_id(struct udev_d
|
||||
} else if (streq(subsys, "xen")) {
|
||||
path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
|
||||
parent = skip_subsystem(parent, "xen");
|
||||
- } else if (streq(subsys, "virtio")) {
|
||||
- path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
|
||||
- parent = skip_subsystem(parent, "virtio");
|
||||
} else if (streq(subsys, "scm")) {
|
||||
path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
|
||||
parent = skip_subsystem(parent, "scm");
|
114
log-target-null-instead-kmsg.patch
Normal file
114
log-target-null-instead-kmsg.patch
Normal file
@ -0,0 +1,114 @@
|
||||
---
|
||||
src/journal/journald-kmsg.c | 16 +++++++++++++++-
|
||||
src/libudev/libudev-util.c | 16 +++++++++++++++-
|
||||
src/shared/log.c | 16 +++++++++++++++-
|
||||
src/shared/util.c | 6 +++++-
|
||||
4 files changed, 50 insertions(+), 4 deletions(-)
|
||||
|
||||
--- systemd-210/src/journal/journald-kmsg.c
|
||||
+++ systemd-210/src/journal/journald-kmsg.c 2014-05-09 07:35:02.880122386 +0000
|
||||
@@ -391,12 +391,26 @@
|
||||
return server_read_dev_kmsg(s);
|
||||
}
|
||||
|
||||
+static int parse_proc_cmdline_word(const char *word) {
|
||||
+ int r;
|
||||
+
|
||||
+ if (streq(word, "systemd.log_target=null"))
|
||||
+ return -115;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int server_open_dev_kmsg(Server *s) {
|
||||
int r;
|
||||
|
||||
assert(s);
|
||||
|
||||
- s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
|
||||
+ if (parse_proc_cmdline(parse_proc_cmdline_word) == -115) {
|
||||
+ s->dev_kmsg_fd = open("/dev/null", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
|
||||
+ } else {
|
||||
+ s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
|
||||
+ }
|
||||
+
|
||||
if (s->dev_kmsg_fd < 0) {
|
||||
log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
|
||||
"Failed to open /dev/kmsg, ignoring: %m");
|
||||
--- systemd-210/src/libudev/libudev-util.c
|
||||
+++ systemd-210/src/libudev/libudev-util.c 2014-05-09 07:35:28.304122530 +0000
|
||||
@@ -416,6 +416,15 @@
|
||||
return bits;
|
||||
}
|
||||
|
||||
+static int parse_proc_cmdline_word(const char *word) {
|
||||
+ int r;
|
||||
+
|
||||
+ if (streq(word, "systemd.log_target=null"))
|
||||
+ return -115;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
ssize_t print_kmsg(const char *fmt, ...)
|
||||
{
|
||||
_cleanup_close_ int fd = -1;
|
||||
@@ -424,7 +433,12 @@
|
||||
ssize_t len;
|
||||
ssize_t ret;
|
||||
|
||||
- fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ if (parse_proc_cmdline(parse_proc_cmdline_word) == -115) {
|
||||
+ fd = open("/dev/null", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ } else {
|
||||
+ fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ }
|
||||
+
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
--- systemd-210/src/shared/log.c
|
||||
+++ systemd-210/src/shared/log.c 2014-05-09 07:35:52.900122669 +0000
|
||||
@@ -92,12 +92,26 @@
|
||||
kmsg_fd = -1;
|
||||
}
|
||||
|
||||
+static int parse_proc_cmdline_word(const char *word) {
|
||||
+ int r;
|
||||
+
|
||||
+ if (streq(word, "systemd.log_target=null"))
|
||||
+ return -115;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int log_open_kmsg(void) {
|
||||
|
||||
if (kmsg_fd >= 0)
|
||||
return 0;
|
||||
|
||||
- kmsg_fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ if (parse_proc_cmdline(parse_proc_cmdline_word) == -115) {
|
||||
+ kmsg_fd = open("/dev/null", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ } else {
|
||||
+ kmsg_fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||
+ }
|
||||
+
|
||||
if (kmsg_fd < 0)
|
||||
return -errno;
|
||||
|
||||
--- systemd-210/src/shared/util.c
|
||||
+++ systemd-210/src/shared/util.c 2014-05-09 08:51:55.436148462 +0000
|
||||
@@ -5975,7 +5975,11 @@
|
||||
|
||||
r = parse_word(word);
|
||||
if (r < 0) {
|
||||
- log_error("Failed on cmdline argument %s: %s", word, strerror(-r));
|
||||
+ if (r == -115) {
|
||||
+ log_error("Warning: %s set, redirecting messages to /dev/null.", word);
|
||||
+ } else {
|
||||
+ log_error("Failed on cmdline argument %s: %s", word, strerror(-r));
|
||||
+ }
|
||||
return r;
|
||||
}
|
||||
}
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 13 08:28:05 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add patch log-target-null-instead-kmsg.patch from Thomas Blume
|
||||
to enable the kernel developers to see a clean kmsg ring buffer
|
||||
without any systemd/udev messages included (bnc#877021)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 13:35:25 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstram patches for backlight
|
||||
0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch
|
||||
0002-backlight-do-nothing-if-max_brightness-is-0.patch
|
||||
0003-backlight-unify-error-messages.patch
|
||||
0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch
|
||||
0005-backlight-handle-saved-brightness-exceeding-max-brig.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 13:28:20 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch
|
||||
0002-udev-warn-when-name_to_handle_at-is-not-implemented.patch
|
||||
0003-analyze-fix-plot-with-bad-y-size.patch
|
||||
0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch
|
||||
0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 12:25:13 UTC 2014 - rmilasan@suse.com
|
||||
|
||||
- Drop upstream-net_id-changes.patch and replace them with the correct
|
||||
patches from upstream and their commits:
|
||||
add: 1014-udev-update-net_id-comments.patch
|
||||
add: 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 10:42:27 UTC 2014 - werner@suse.de
|
||||
|
||||
|
@ -407,6 +407,28 @@ Patch206: 0001-sd-rtnl-message-append-fix-uninitialized-memory.patch
|
||||
Patch207: 0001-tmpfiles-fix-permissions-on-new-journal-files.patch
|
||||
# PATCH-FIX-SUSE Do not ignores option 'noauto' in /etc/crypttab (bnc#742774)
|
||||
Patch208: parse-crypttab-for-noauto-option.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch209: 0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch210: 0002-udev-warn-when-name_to_handle_at-is-not-implemented.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch211: 0003-analyze-fix-plot-with-bad-y-size.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch212: 0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch213: 0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch214: 0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch215: 0002-backlight-do-nothing-if-max_brightness-is-0.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch216: 0003-backlight-unify-error-messages.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch217: 0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch218: 0005-backlight-handle-saved-brightness-exceeding-max-brig.patch
|
||||
# PATCH-FIX-SUSE Do not poison kmsg ring buffer with systemd/udev messages (bnc#877021)
|
||||
Patch219: log-target-null-instead-kmsg.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -440,8 +462,10 @@ Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
|
||||
Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch
|
||||
# PATCH-FIX-SUSE Do not use runtime PM for some IBM consoles (bnc#868931)
|
||||
Patch1013: 1013-no-runtime-PM-for-IBM-consoles.patch
|
||||
# PATCH-FIX-UPSTREAM Move forward to git Head for net_id
|
||||
Patch1014: upstream-net_id-changes.patch
|
||||
# PATCH-FIX-USTREAM 1014-udev-update-net_id-comments.patch
|
||||
Patch1014: 1014-udev-update-net_id-comments.patch
|
||||
# PATCH-FIX-USTREAM 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
Patch1015: 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -798,6 +822,17 @@ cp %{SOURCE7} m4/
|
||||
%patch206 -p0
|
||||
%patch207 -p0
|
||||
%patch208 -p1
|
||||
%patch209 -p0
|
||||
%patch210 -p0
|
||||
%patch211 -p0
|
||||
%patch212 -p0
|
||||
%patch213 -p0
|
||||
%patch214 -p0
|
||||
%patch215 -p0
|
||||
%patch216 -p0
|
||||
%patch217 -p0
|
||||
%patch218 -p0
|
||||
%patch219 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -814,9 +849,8 @@ cp %{SOURCE7} m4/
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%if 0%{?suse_version} > 1310
|
||||
%patch1014 -p0
|
||||
%endif
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 13 08:28:05 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add patch log-target-null-instead-kmsg.patch from Thomas Blume
|
||||
to enable the kernel developers to see a clean kmsg ring buffer
|
||||
without any systemd/udev messages included (bnc#877021)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 13:35:25 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstram patches for backlight
|
||||
0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch
|
||||
0002-backlight-do-nothing-if-max_brightness-is-0.patch
|
||||
0003-backlight-unify-error-messages.patch
|
||||
0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch
|
||||
0005-backlight-handle-saved-brightness-exceeding-max-brig.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 13:28:20 UTC 2014 - werner@suse.de
|
||||
|
||||
- Add upstream patches
|
||||
0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch
|
||||
0002-udev-warn-when-name_to_handle_at-is-not-implemented.patch
|
||||
0003-analyze-fix-plot-with-bad-y-size.patch
|
||||
0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch
|
||||
0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 12:25:13 UTC 2014 - rmilasan@suse.com
|
||||
|
||||
- Drop upstream-net_id-changes.patch and replace them with the correct
|
||||
patches from upstream and their commits:
|
||||
add: 1014-udev-update-net_id-comments.patch
|
||||
add: 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 10:42:27 UTC 2014 - werner@suse.de
|
||||
|
||||
|
44
systemd.spec
44
systemd.spec
@ -402,6 +402,28 @@ Patch206: 0001-sd-rtnl-message-append-fix-uninitialized-memory.patch
|
||||
Patch207: 0001-tmpfiles-fix-permissions-on-new-journal-files.patch
|
||||
# PATCH-FIX-SUSE Do not ignores option 'noauto' in /etc/crypttab (bnc#742774)
|
||||
Patch208: parse-crypttab-for-noauto-option.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch209: 0001-errno-make-sure-to-handle-the-3-errnos-that-are-alia.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch210: 0002-udev-warn-when-name_to_handle_at-is-not-implemented.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch211: 0003-analyze-fix-plot-with-bad-y-size.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch212: 0004-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch213: 0005-job-always-add-waiting-jobs-to-run-queue-during-cold.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch214: 0001-backlight-Avoid-restoring-brightness-to-an-unreadabl.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch215: 0002-backlight-do-nothing-if-max_brightness-is-0.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch216: 0003-backlight-unify-error-messages.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch217: 0004-backlight-warn-if-kernel-exposes-backlight-device-wi.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/05/12
|
||||
Patch218: 0005-backlight-handle-saved-brightness-exceeding-max-brig.patch
|
||||
# PATCH-FIX-SUSE Do not poison kmsg ring buffer with systemd/udev messages (bnc#877021)
|
||||
Patch219: log-target-null-instead-kmsg.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -435,8 +457,10 @@ Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
|
||||
Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch
|
||||
# PATCH-FIX-SUSE Do not use runtime PM for some IBM consoles (bnc#868931)
|
||||
Patch1013: 1013-no-runtime-PM-for-IBM-consoles.patch
|
||||
# PATCH-FIX-UPSTREAM Move forward to git Head for net_id
|
||||
Patch1014: upstream-net_id-changes.patch
|
||||
# PATCH-FIX-USTREAM 1014-udev-update-net_id-comments.patch
|
||||
Patch1014: 1014-udev-update-net_id-comments.patch
|
||||
# PATCH-FIX-USTREAM 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
Patch1015: 1015-udev-persistent-naming-we-cannot-use-virtio-numbers-.patch
|
||||
|
||||
%description
|
||||
Systemd is a system and service manager, compatible with SysV and LSB
|
||||
@ -793,6 +817,17 @@ cp %{SOURCE7} m4/
|
||||
%patch206 -p0
|
||||
%patch207 -p0
|
||||
%patch208 -p1
|
||||
%patch209 -p0
|
||||
%patch210 -p0
|
||||
%patch211 -p0
|
||||
%patch212 -p0
|
||||
%patch213 -p0
|
||||
%patch214 -p0
|
||||
%patch215 -p0
|
||||
%patch216 -p0
|
||||
%patch217 -p0
|
||||
%patch218 -p0
|
||||
%patch219 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
@ -809,9 +844,8 @@ cp %{SOURCE7} m4/
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%if 0%{?suse_version} > 1310
|
||||
%patch1014 -p0
|
||||
%endif
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
|
||||
# ensure generate files are removed
|
||||
rm -f units/emergency.service
|
||||
|
@ -1,135 +0,0 @@
|
||||
This the diff between systemd-210 and 19aa72f74e41045510b4af3f1415b419d42ff20b
|
||||
But we do not remove the ATA support as in HEAD
|
||||
|
||||
---
|
||||
src/udev/udev-builtin-net_id.c | 54 ++++++----------------------------------
|
||||
src/udev/udev-builtin-path_id.c | 3 --
|
||||
2 files changed, 9 insertions(+), 48 deletions(-)
|
||||
|
||||
--- src/udev/udev-builtin-net_id.c
|
||||
+++ src/udev/udev-builtin-net_id.c 2014-04-08 07:16:45.094235605 +0000
|
||||
@@ -33,6 +33,8 @@
|
||||
* ww -- wwan
|
||||
*
|
||||
* Type of names:
|
||||
+ * b<number> -- BCMA bus core number
|
||||
+ * ccw<name> -- CCW bus group name
|
||||
* o<index> -- on-board device index number
|
||||
* s<slot>[f<function>][d<dev_id>] -- hotplug slot index number
|
||||
* x<MAC> -- MAC address
|
||||
@@ -92,6 +94,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <net/if.h>
|
||||
+#include <net/if_arp.h>
|
||||
#include <linux/pci_regs.h>
|
||||
|
||||
#include "udev.h"
|
||||
@@ -119,12 +122,8 @@ struct netnames {
|
||||
const char *pci_onboard_label;
|
||||
|
||||
char usb_ports[IFNAMSIZ];
|
||||
-
|
||||
char bcma_core[IFNAMSIZ];
|
||||
-
|
||||
- char virtio_core[IFNAMSIZ];
|
||||
-
|
||||
- char ccw_core[IFNAMSIZ];
|
||||
+ char ccw_group[IFNAMSIZ];
|
||||
};
|
||||
|
||||
/* retrieve on-board index number and label from firmware */
|
||||
@@ -351,25 +350,6 @@ static int names_bcma(struct udev_device
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int names_virtio(struct udev_device *dev, struct netnames *names) {
|
||||
- struct udev_device *virtdev;
|
||||
- unsigned int core;
|
||||
-
|
||||
- virtdev = udev_device_get_parent_with_subsystem_devtype(dev, "virtio", NULL);
|
||||
- if (!virtdev)
|
||||
- return -ENOENT;
|
||||
-
|
||||
- /* core num */
|
||||
- if (sscanf(udev_device_get_sysname(virtdev), "virtio%u", &core) != 1)
|
||||
- return -EINVAL;
|
||||
- /* suppress the common core == 0 */
|
||||
- if (core > 0)
|
||||
- snprintf(names->virtio_core, sizeof(names->virtio_core), "v%u", core);
|
||||
-
|
||||
- names->type = NET_VIRTIO;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int names_ccw(struct udev_device *dev, struct netnames *names) {
|
||||
struct udev_device *cdev;
|
||||
const char *bus_id;
|
||||
@@ -402,8 +382,8 @@ static int names_ccw(struct udev_device
|
||||
return -EINVAL;
|
||||
|
||||
/* Store the CCW bus-ID for use as network device name */
|
||||
- rc = snprintf(names->ccw_core, sizeof(names->ccw_core), "ccw%s", bus_id);
|
||||
- if (rc >= 0 && rc < (int)sizeof(names->ccw_core))
|
||||
+ rc = snprintf(names->ccw_group, sizeof(names->ccw_group), "ccw%s", bus_id);
|
||||
+ if (rc >= 0 && rc < (int)sizeof(names->ccw_group))
|
||||
names->type = NET_CCWGROUP;
|
||||
return 0;
|
||||
}
|
||||
@@ -472,10 +452,10 @@ static int builtin_net_id(struct udev_de
|
||||
return EXIT_FAILURE;
|
||||
i = strtoul(s, NULL, 0);
|
||||
switch (i) {
|
||||
- case 1: /* ARPHRD_ETHER */
|
||||
+ case ARPHRD_ETHER:
|
||||
prefix = "en";
|
||||
break;
|
||||
- case 256: /* ARPHRD_SLIP */
|
||||
+ case ARPHRD_SLIP:
|
||||
prefix = "sl";
|
||||
break;
|
||||
default:
|
||||
@@ -517,7 +497,7 @@ static int builtin_net_id(struct udev_de
|
||||
if (err >= 0 && names.type == NET_CCWGROUP) {
|
||||
char str[IFNAMSIZ];
|
||||
|
||||
- if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_core) < (int)sizeof(str))
|
||||
+ if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_group) < (int)sizeof(str))
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
|
||||
goto out;
|
||||
}
|
||||
@@ -578,22 +558,6 @@ static int builtin_net_id(struct udev_de
|
||||
udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
|
||||
goto out;
|
||||
}
|
||||
-
|
||||
- /* virtio bus */
|
||||
- err = names_virtio(dev, &names);
|
||||
- if (err >= 0 && names.type == NET_VIRTIO) {
|
||||
- char str[IFNAMSIZ];
|
||||
-
|
||||
- if (names.pci_path[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.virtio_core) < (int)sizeof(str))
|
||||
- udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
|
||||
-
|
||||
- if (names.pci_slot[0])
|
||||
- if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.virtio_core) < (int)sizeof(str))
|
||||
- udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
out:
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
--- src/udev/udev-builtin-path_id.c
|
||||
+++ src/udev/udev-builtin-path_id.c 2014-03-28 09:27:20.402735390 +0000
|
||||
@@ -571,9 +571,6 @@ static int builtin_path_id(struct udev_d
|
||||
} else if (streq(subsys, "xen")) {
|
||||
path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
|
||||
parent = skip_subsystem(parent, "xen");
|
||||
- } else if (streq(subsys, "virtio")) {
|
||||
- path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
|
||||
- parent = skip_subsystem(parent, "virtio");
|
||||
} else if (streq(subsys, "scm")) {
|
||||
path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
|
||||
parent = skip_subsystem(parent, "scm");
|
Loading…
Reference in New Issue
Block a user