Accepting request 232406 from Base:System

- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
  to avoid annyoing messages on failing dual_timestamp_is_set in the
  kernel's message ring buffer

- Update udev-generate-peristent-rule.sh from latest git

- Modify and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to avoid also ANSI escape sequences for busy jobs on s390

- Add or port upstram bugfix patches:
  0001-bash-completion-fix-__get_startable_units.patch
  0002-sysctl-replaces-some-slashes-with-dots.patch
  0003-delta-do-not-use-unicode-chars-in-C-locale.patch
  0004-implement-a-union-to-pad-out-file_handle.patch
- Add patch respect-nfs-bg-option.patch from Thomas Blume:
  System fails to boot if nfs mounts get added to fstab (bnc#874665)

- Do not use runtime PM for some IBM consoles (bnc#868931)
  1013-no-runtime-PM-for-IBM-consoles.patch 

- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
  to avoid annyoing messages on failing dual_timestamp_is_set in the
  kernel's message ring buffer

- Update udev-generate-peristent-rule.sh from latest git

- Modify and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to avoid also ANSI escape sequences for busy jobs on s390

OBS-URL: https://build.opensuse.org/request/show/232406
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=183
This commit is contained in:
Stephan Kulow 2014-05-02 18:51:24 +00:00 committed by Git OBS Bridge
commit 17fe5e6f13
13 changed files with 703 additions and 31 deletions

View File

@ -1,8 +1,9 @@
---
rules/99-systemd.rules.in | 2 -
src/getty-generator/getty-generator.c | 2 -
src/shared/util.c | 62 ++++++++++++++++++++++++++++++++--
3 files changed, 61 insertions(+), 5 deletions(-)
rules/99-systemd.rules.in | 2 -
src/core/manager.c | 24 +++++++++++---
src/shared/util.c | 77 ++++++++++++++++++++++++++++++++++++++++++++--
src/shared/util.h | 1
4 files changed, 95 insertions(+), 9 deletions(-)
--- systemd-208/rules/99-systemd.rules.in
+++ systemd-208/rules/99-systemd.rules.in 2014-02-05 10:34:17.346235540 +0000
@ -15,34 +16,92 @@
KERNEL=="vport*", TAG+="systemd"
--- systemd-208/src/shared/util.c
+++ systemd-208/src/shared/util.c 2014-01-31 11:54:07.222235280 +0000
@@ -2967,6 +2967,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
+ static int cached_on_tty = -1;
--- systemd-210/src/core/manager.c
+++ systemd-210/src/core/manager.c 2014-04-30 10:51:43.398735332 +0000
@@ -110,7 +110,7 @@ static int manager_watch_jobs_in_progres
assert(format);
#define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
@@ -2980,6 +2981,51 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
-static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) {
+static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos, bool ansi_console) {
char *p = buffer;
+ if (_unlikely_(cached_on_tty < 0)) {
+ cached_on_tty = isatty(fd) > 0;
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (e && (strcmp(e, "dumb") == 0 || strcmp(e, "ibm327x") == 0)) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_on_tty = 0;
+ }
assert(buflen >= CYLON_BUFFER_EXTRA + width + 1);
@@ -119,12 +119,14 @@ static void draw_cylon(char buffer[], si
if (pos > 1) {
if (pos > 2)
p = mempset(p, ' ', pos-2);
- p = stpcpy(p, ANSI_RED_ON);
+ if (ansi_console)
+ p = stpcpy(p, ANSI_RED_ON);
*p++ = '*';
}
if (pos > 0 && pos <= width) {
- p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
+ if (ansi_console)
+ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
*p++ = '*';
}
@@ -135,7 +137,8 @@ static void draw_cylon(char buffer[], si
*p++ = '*';
if (pos < width-1)
p = mempset(p, ' ', width-1-pos);
- strcpy(p, ANSI_HIGHLIGHT_OFF);
+ if (ansi_console)
+ strcpy(p, ANSI_HIGHLIGHT_OFF);
}
}
@@ -150,6 +153,7 @@ void manager_flip_auto_status(Manager *m
}
static void manager_print_jobs_in_progress(Manager *m) {
+ static int is_ansi_console = -1;
_cleanup_free_ char *job_of_n = NULL;
Iterator i;
Job *j;
@@ -174,10 +178,20 @@ static void manager_print_jobs_in_progre
assert(counter == print_nr + 1);
assert(j);
+ if (_unlikely_(is_ansi_console < 0)) {
+ int fd = open_terminal("/dev/console", O_RDONLY|O_NOCTTY|O_CLOEXEC);
+ if (fd < 0)
+ is_ansi_console = 0;
+ else {
+ is_ansi_console = (int)ansi_console(fd);
+ close(fd);
+ }
+ }
+
+ if (status && !cached_on_tty) {
cylon_pos = m->jobs_in_progress_iteration % 14;
if (cylon_pos >= 8)
cylon_pos = 14 - cylon_pos;
- draw_cylon(cylon, sizeof(cylon), 6, cylon_pos);
+ draw_cylon(cylon, sizeof(cylon), 6, cylon_pos, (bool)is_ansi_console);
m->jobs_in_progress_iteration++;
--- systemd-210/src/shared/util.c
+++ systemd-210/src/shared/util.c 2014-04-30 10:39:17.154736438 +0000
@@ -2886,6 +2886,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
+ static int is_ansi_console = -1;
assert(format);
@@ -2899,6 +2900,41 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
+ if (_unlikely_(is_ansi_console < 0))
+ is_ansi_console = (int)ansi_console(fd);
+
+ if (status && !is_ansi_console) {
+ const char *esc, *ptr;
+ esc = strchr(status, 0x1B);
+ if (esc && (ptr = strpbrk(esc, "SOFDTI*"))) {
@ -77,14 +136,14 @@
if (ellipse) {
char *e;
size_t emax, sl;
@@ -3002,8 +3048,12 @@ int status_vprintf(const char *status, b
@@ -2921,8 +2957,12 @@ int status_vprintf(const char *status, b
}
}
- if (prev_ephemeral)
- IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ if (prev_ephemeral) {
+ if (cached_on_tty)
+ if (is_ansi_console)
+ IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ else
+ IOVEC_SET_STRING(iovec[n++], "\r");
@ -92,7 +151,7 @@
prev_ephemeral = ephemeral;
if (status) {
@@ -3267,8 +3317,14 @@ void columns_lines_cache_reset(int signu
@@ -3169,12 +3209,43 @@ void columns_lines_cache_reset(int signu
bool on_tty(void) {
static int cached_on_tty = -1;
@ -101,10 +160,49 @@
cached_on_tty = isatty(STDOUT_FILENO) > 0;
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (e && (strcmp(e, "dumb") == 0))
+ cached_on_tty = 0;
+ if (!e)
+ return cached_on_tty;
+ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_on_tty = 0;
+ }
+ }
+ }
return cached_on_tty;
}
+bool ansi_console(int fd) {
+ static int cached_ansi_console = -1;
+
+ if (_unlikely_(cached_ansi_console < 0)) {
+ cached_ansi_console = isatty(fd) > 0;
+ if (cached_ansi_console) {
+ const char *e = getenv("TERM");
+ if (e && (streq(e, "dumb") || strneq(e, "ibm3", 4))) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_ansi_console = 0;
+ }
+ }
+ }
+
+ return cached_ansi_console;
+}
+
int running_in_chroot(void) {
struct stat a = {}, b = {};
--- systemd-210/src/shared/util.h
+++ systemd-210/src/shared/util.h 2014-04-30 10:24:51.134235665 +0000
@@ -418,6 +418,7 @@ unsigned lines(void);
void columns_lines_cache_reset(int _unused_ signum);
bool on_tty(void);
+bool ansi_console(int fd);
static inline const char *ansi_highlight(void) {
return on_tty() ? ANSI_HIGHLIGHT_ON : "";

View File

@ -0,0 +1,25 @@
From a163b64c4b08e8a4ad39a9a295acf3d1634024a3 Mon Sep 17 00:00:00 2001
From: Dan Kilman <dankilman@gmail.com>
Date: Sun, 13 Apr 2014 18:06:13 +0300
Subject: [PATCH] bash completion: fix __get_startable_units
---
shell-completion/bash/systemctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git shell-completion/bash/systemctl shell-completion/bash/systemctl
index 992e52d..e1c8420 100644
--- shell-completion/bash/systemctl
+++ shell-completion/bash/systemctl
@@ -56,7 +56,7 @@ __get_all_units () { __systemctl $1 list-units --all \
__get_active_units () { __systemctl $1 list-units \
| { while read -r a b; do echo " $a"; done; }; }
__get_startable_units () { __systemctl $1 list-units --all -t service,timer,socket,mount,automount,path,snapshot,swap \
- | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed " ]] && echo " $a"; done; }; }
+ | { while read -r a b c d; do [[ $c == "inactive" || $c == "failed" ]] && echo " $a"; done; }; }
__get_failed_units () { __systemctl $1 list-units \
| { while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }; }
__get_enabled_units () { __systemctl $1 list-unit-files \
--
1.7.9.2

View File

@ -0,0 +1,97 @@
From 2e573fcf8754fdfe0db0a783b1631ec1679b063a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Apr 2014 21:33:46 -0400
Subject: [PATCH] sysctl: replaces some slashes with dots
It turns out that plain sysctl understands a.b/c syntax to write to
/proc/sys/a/b.c. Support this for compatibility.
https://bugs.freedesktop.org/show_bug.cgi?id=77466
---
man/sysctl.d.xml | 29 +++++++++++++++++++++--------
src/sysctl/sysctl.c | 18 ++++++++++++++++--
2 files changed, 37 insertions(+), 10 deletions(-)
diff --git man/sysctl.d.xml man/sysctl.d.xml
index 00a857b..db53b49 100644
--- man/sysctl.d.xml
+++ man/sysctl.d.xml
@@ -68,13 +68,26 @@
<para>The configuration files contain a list of
variable assignments, separated by newlines. Empty
lines and lines whose first non-whitespace character
- is # or ; are ignored.</para>
-
- <para>Note that both / and . are accepted as label
- separators within sysctl variable
- names. <literal>kernel.domainname=foo</literal> and
- <literal>kernel/domainname=foo</literal> hence are
- entirely equivalent.</para>
+ is <literal>#</literal> or <literal>;</literal> are
+ ignored.</para>
+
+ <para>Note that either <literal>/</literal> or
+ <literal>.</literal> may be used as separators within
+ sysctl variable names. If the first separator is a
+ slash, remaining slashes and dots are left intact. If
+ the first separator is a dot, dots and slashes are
+ interchanged. <literal>kernel.domainname=foo</literal>
+ and <literal>kernel/domainname=foo</literal> are
+ equivalent and will cause <literal>foo</literal> to
+ be written to
+ <filename>/proc/sys/kernel/domainname</filename>.
+ Either
+ <literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
+ or
+ <literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
+ may be used to refer to
+ <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
+ </para>
<para>Each configuration file shall be named in the
style of <filename><replaceable>program</replaceable>.conf</filename>.
@@ -109,7 +122,7 @@
early on boot. The network interface-specific options
will also be applied individually for each network
interface as it shows up in the system. (More
- specifically, that is
+ specifically,
<filename>net.ipv4.conf.*</filename>,
<filename>net.ipv6.conf.*</filename>,
<filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>)</para>
diff --git src/sysctl/sysctl.c src/sysctl/sysctl.c
index 283eefe..06defa5 100644
--- src/sysctl/sysctl.c
+++ src/sysctl/sysctl.c
@@ -48,12 +48,26 @@ static const char conf_file_dirs[] =
#endif
;
-static char *normalize_sysctl(char *s) {
+static char* normalize_sysctl(char *s) {
char *n;
- for (n = s; *n; n++)
+ n = strpbrk(s, "/.");
+ /* If the first separator is a slash, the path is
+ * assumed to be normalized and slashes remain slashes
+ * and dots remains dots. */
+ if (!n || *n == '/')
+ return s;
+
+ /* Otherwise, dots become slashes and slashes become
+ * dots. Fun. */
+ while (n) {
if (*n == '.')
*n = '/';
+ else
+ *n = '.';
+
+ n = strpbrk(n + 1, "/.");
+ }
return s;
}
--
1.7.9.2

View File

@ -0,0 +1,134 @@
From 00a5cc3a63c125633e822f39efd9c32223169f62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Apr 2014 23:33:41 -0400
Subject: [PATCH] delta: do not use unicode chars in C locale
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
---
src/delta/delta.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git src/delta/delta.c src/delta/delta.c
index 369f8f8..8fc37c5 100644
--- src/delta/delta.c
+++ src/delta/delta.c
@@ -85,6 +85,10 @@ static void pager_open_if_enabled(void) {
pager_open(false);
}
+static inline const char* arrow(void) {
+ return is_locale_utf8() ? "→" : "->";
+}
+
static int equivalent(const char *a, const char *b) {
_cleanup_free_ char *x = NULL, *y = NULL;
@@ -103,8 +107,9 @@ static int notify_override_masked(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_MASKED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_red(), "[MASKED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_red(), "[MASKED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -112,8 +117,9 @@ static int notify_override_equivalent(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EQUIVALENT))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -121,8 +127,9 @@ static int notify_override_redirected(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_REDIRECTED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -130,8 +137,9 @@ static int notify_override_overridden(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_OVERRIDDEN))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -139,8 +147,9 @@ static int notify_override_extended(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EXTENDED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[EXTENDED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[EXTENDED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -241,7 +250,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return -ENOMEM;
d = p + strlen(toppath) + 1;
- log_debug("Adding at top: %s → %s", d, p);
+ log_debug("Adding at top: %s %s %s", d, arrow(), p);
k = hashmap_put(top, d, p);
if (k >= 0) {
p = strdup(p);
@@ -253,7 +262,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return k;
}
- log_debug("Adding at bottom: %s → %s", d, p);
+ log_debug("Adding at bottom: %s %s %s", d, arrow(), p);
free(hashmap_remove(bottom, d));
k = hashmap_put(bottom, d, p);
if (k < 0) {
@@ -276,7 +285,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
if (!p)
return -ENOMEM;
- log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p);
+ log_debug("Adding to drops: %s %s %s %s %s",
+ unit, arrow(), basename(p), arrow(), p);
k = hashmap_put(h, basename(p), p);
if (k < 0) {
free(p);
@@ -328,7 +338,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
if (!p)
return -ENOMEM;
- log_debug("Adding at top: %s → %s", basename(p), p);
+ log_debug("Adding at top: %s %s %s", basename(p), arrow(), p);
k = hashmap_put(top, basename(p), p);
if (k >= 0) {
p = strdup(p);
@@ -339,7 +349,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
return k;
}
- log_debug("Adding at bottom: %s → %s", basename(p), p);
+ log_debug("Adding at bottom: %s %s %s", basename(p), arrow(), p);
free(hashmap_remove(bottom, basename(p)));
k = hashmap_put(bottom, basename(p), p);
if (k < 0) {
--
1.7.9.2

View File

@ -0,0 +1,117 @@
From 370c860f748d149097710dc7952a64f627db9de7 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sat, 19 Apr 2014 13:22:35 -0400
Subject: [PATCH] implement a union to pad out file_handle
Cases where name_to_handle_at is used allocated the full struct to be
MAX_HANDLE_SZ, and assigned this size to handle_bytes. This is wrong
since handle_bytes should describe the length of the flexible array
member and not the whole struct.
Define a union type which includes sufficient padding to allow
assignment of MAX_HANDLE_SZ to be correct.
---
src/libudev/libudev-monitor.c | 6 ++----
src/readahead/readahead-common.c | 6 ++----
src/shared/util.h | 6 ++++++
src/tmpfiles/tmpfiles.c | 11 ++++-------
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git src/libudev/libudev-monitor.c src/libudev/libudev-monitor.c
index 3f7436b..0a2ab82 100644
--- src/libudev/libudev-monitor.c
+++ src/libudev/libudev-monitor.c
@@ -108,15 +108,13 @@ static struct udev_monitor *udev_monitor_new(struct udev *udev)
/* we consider udev running when /dev is on devtmpfs */
static bool udev_has_devtmpfs(struct udev *udev) {
- struct file_handle *h;
+ union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
int mount_id;
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX], *e;
int r;
- h = alloca(MAX_HANDLE_SZ);
- h->handle_bytes = MAX_HANDLE_SZ;
- r = name_to_handle_at(AT_FDCWD, "/dev", h, &mount_id, 0);
+ r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
if (r < 0)
return false;
diff --git src/readahead/readahead-common.c src/readahead/readahead-common.c
index 5ffa88b..49679fc 100644
--- src/readahead/readahead-common.c
+++ src/readahead/readahead-common.c
@@ -75,7 +75,7 @@ int fs_on_ssd(const char *p) {
if (major(st.st_dev) == 0) {
_cleanup_fclose_ FILE *f = NULL;
int mount_id;
- struct file_handle *h;
+ union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
/* Might be btrfs, which exposes "ssd" as mount flag if it is on ssd.
*
@@ -83,9 +83,7 @@ int fs_on_ssd(const char *p) {
* and then lookup the mount ID in mountinfo to find
* the mount options. */
- h = alloca(MAX_HANDLE_SZ);
- h->handle_bytes = MAX_HANDLE_SZ;
- r = name_to_handle_at(AT_FDCWD, p, h, &mount_id, AT_SYMLINK_FOLLOW);
+ r = name_to_handle_at(AT_FDCWD, p, &h.handle, &mount_id, AT_SYMLINK_FOLLOW);
if (r < 0)
return false;
diff --git src/shared/util.h src/shared/util.h
index 900f1cf..891848a 100644
--- src/shared/util.h
+++ src/shared/util.h
@@ -22,6 +22,7 @@
***/
#include <alloca.h>
+#include <fcntl.h>
#include <inttypes.h>
#include <time.h>
#include <sys/time.h>
@@ -883,3 +884,8 @@ int fd_warn_permissions(const char *path
unsigned long personality_from_string(const char *p);
const char *personality_to_string(unsigned long);
+
+union file_handle_union {
+ struct file_handle handle;
+ char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ];
+};
diff --git src/tmpfiles/tmpfiles.c src/tmpfiles/tmpfiles.c
index 33e7cbc..04b472d 100644
--- src/tmpfiles/tmpfiles.c
+++ src/tmpfiles/tmpfiles.c
@@ -217,19 +217,16 @@ static bool unix_socket_alive(const char *fn) {
}
static int dir_is_mount_point(DIR *d, const char *subdir) {
- struct file_handle *h;
+ union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ };
int mount_id_parent, mount_id;
int r_p, r;
- h = alloca(MAX_HANDLE_SZ);
-
- h->handle_bytes = MAX_HANDLE_SZ;
- r_p = name_to_handle_at(dirfd(d), ".", h, &mount_id_parent, 0);
+ r_p = name_to_handle_at(dirfd(d), ".", &h.handle, &mount_id_parent, 0);
if (r_p < 0)
r_p = -errno;
- h->handle_bytes = MAX_HANDLE_SZ;
- r = name_to_handle_at(dirfd(d), subdir, h, &mount_id, 0);
+ h.handle.handle_bytes = MAX_HANDLE_SZ;
+ r = name_to_handle_at(dirfd(d), subdir, &h.handle, &mount_id, 0);
if (r < 0)
r = -errno;
--
1.7.9.2

View File

@ -0,0 +1,11 @@
--- systemd-210/rules/42-usb-hid-pm.rules.old 2014-04-23 10:54:31.694485615 +0200
+++ systemd-210/rules/42-usb-hid-pm.rules 2014-04-23 10:55:21.969423056 +0200
@@ -22,8 +22,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{id
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="413c", ATTR{idProduct}=="0000", TEST=="power/control", ATTR{power/control}="auto"
# IBM remote access
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04b3", ATTR{idProduct}=="4001", TEST=="power/control", ATTR{power/control}="auto"
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04b3", ATTR{idProduct}=="4002", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b3", ATTR{idProduct}=="4012", TEST=="power/control", ATTR{power/control}="auto"
# Raritan Computer, Inc KVM.

View File

@ -0,0 +1,19 @@
--- systemd-210/src/fstab-generator/fstab-generator.c 2014-02-17 15:49:21.070855641 +0100
+++ systemd-210/src/fstab-generator/fstab-generator.c 2014-04-25 16:25:13.256106126 +0200
@@ -255,10 +255,12 @@
"SourcePath=%s\n",
source);
- if (post && !noauto && !nofail && !automount)
- fprintf(f,
- "Before=%s\n",
- post);
+ if (post && !noauto && !nofail && !automount) {
+ if (!streq(type, "nfs") || (streq(type, "nfs") && !strstr(opts, "bg")))
+ fprintf(f,
+ "Before=%s\n",
+ post);
+ }
r = add_fsck(f, what, where, type, passno);
if (r < 0)

View File

@ -0,0 +1,38 @@
Stop flooding the kernel's message ring buffer with useless
messages on dual_timestamp_is_set is failed. This is a backport
from upstream code.
---
src/libsystemd/sd-event/sd-event.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- systemd-210/src/libsystemd/sd-event/sd-event.c
+++ systemd-210/src/libsystemd/sd-event/sd-event.c 2014-05-02 10:01:23.366235185 +0000
@@ -2191,9 +2191,12 @@ _public_ int sd_event_exit(sd_event *e,
_public_ int sd_event_get_now_realtime(sd_event *e, uint64_t *usec) {
assert_return(e, -EINVAL);
assert_return(usec, -EINVAL);
- assert_return(dual_timestamp_is_set(&e->timestamp), -ENODATA);
assert_return(!event_pid_changed(e), -ECHILD);
+ /* If we haven't run yet, just get the actual time */
+ if (!dual_timestamp_is_set(&e->timestamp))
+ return -ENODATA;
+
*usec = e->timestamp.realtime;
return 0;
}
@@ -2201,9 +2204,12 @@ _public_ int sd_event_get_now_realtime(s
_public_ int sd_event_get_now_monotonic(sd_event *e, uint64_t *usec) {
assert_return(e, -EINVAL);
assert_return(usec, -EINVAL);
- assert_return(dual_timestamp_is_set(&e->timestamp), -ENODATA);
assert_return(!event_pid_changed(e), -ECHILD);
+ /* If we haven't run yet, just get the actual time */
+ if (!dual_timestamp_is_set(&e->timestamp))
+ return -ENODATA;
+
*usec = e->timestamp.monotonic;
return 0;
}

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Fri May 2 10:12:26 UTC 2014 - werner@suse.de
- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
to avoid annyoing messages on failing dual_timestamp_is_set in the
kernel's message ring buffer
-------------------------------------------------------------------
Wed Apr 30 12:14:32 UTC 2014 - werner@suse.de
- Update udev-generate-peristent-rule.sh from latest git
-------------------------------------------------------------------
Wed Apr 30 10:55:54 UTC 2014 - werner@suse.de
- Modify and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to avoid also ANSI escape sequences for busy jobs on s390
-------------------------------------------------------------------
Mon Apr 28 09:51:35 UTC 2014 - werner@suse.de
- Add or port upstram bugfix patches:
0001-bash-completion-fix-__get_startable_units.patch
0002-sysctl-replaces-some-slashes-with-dots.patch
0003-delta-do-not-use-unicode-chars-in-C-locale.patch
0004-implement-a-union-to-pad-out-file_handle.patch
- Add patch respect-nfs-bg-option.patch from Thomas Blume:
System fails to boot if nfs mounts get added to fstab (bnc#874665)
-------------------------------------------------------------------
Wed Apr 23 11:46:41 UTC 2014 - oneukum@suse.com
- Do not use runtime PM for some IBM consoles (bnc#868931)
1013-no-runtime-PM-for-IBM-consoles.patch
-------------------------------------------------------------------
Thu Apr 17 13:56:31 UTC 2014 - werner@suse.de

View File

@ -387,6 +387,18 @@ Patch196: systemd-detect-xendom.patch
Patch197: rescue-emergency-target-conflicts.patch
# PATCH-FIX-SUSE Avoid a divide by zero sigtrap
Patch198: avoid-divide-by-zero-sigtrap.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch199: 0001-bash-completion-fix-__get_startable_units.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch200: 0002-sysctl-replaces-some-slashes-with-dots.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch201: 0003-delta-do-not-use-unicode-chars-in-C-locale.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch202: 0004-implement-a-union-to-pad-out-file_handle.patch
# PATCH-FIX-SUSE System fails to boot if nfs mounts get added to fstab (bnc#874665)
Patch203: respect-nfs-bg-option.patch
# PATCH-FIX-UPSTREAM Stop useless messages on dual_timestamp_is_set is failed.
Patch204: shut-up-annoying-assertion-monotonic-clock-message.patch
# UDEV PATCHES
# ============
@ -418,6 +430,8 @@ Patch1010: 1010-udev-increase-result-size-for-programs.patch
Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
# PATCH-FIX-SUSE skip persistent device link creation on mp device (bnc#872929)
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
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -764,6 +778,12 @@ cp %{SOURCE7} m4/
%patch196 -p1
%patch197 -p1
%patch198 -p1
%patch199 -p0
%patch200 -p0
%patch201 -p0
%patch202 -p0
%patch203 -p1
%patch204 -p1
# udev patches
%patch1001 -p1
@ -779,6 +799,7 @@ cp %{SOURCE7} m4/
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch1013 -p1
# ensure generate files are removed
rm -f units/emergency.service

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Fri May 2 10:12:26 UTC 2014 - werner@suse.de
- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
to avoid annyoing messages on failing dual_timestamp_is_set in the
kernel's message ring buffer
-------------------------------------------------------------------
Wed Apr 30 12:14:32 UTC 2014 - werner@suse.de
- Update udev-generate-peristent-rule.sh from latest git
-------------------------------------------------------------------
Wed Apr 30 10:55:54 UTC 2014 - werner@suse.de
- Modify and extend patch
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
to avoid also ANSI escape sequences for busy jobs on s390
-------------------------------------------------------------------
Mon Apr 28 09:51:35 UTC 2014 - werner@suse.de
- Add or port upstram bugfix patches:
0001-bash-completion-fix-__get_startable_units.patch
0002-sysctl-replaces-some-slashes-with-dots.patch
0003-delta-do-not-use-unicode-chars-in-C-locale.patch
0004-implement-a-union-to-pad-out-file_handle.patch
- Add patch respect-nfs-bg-option.patch from Thomas Blume:
System fails to boot if nfs mounts get added to fstab (bnc#874665)
-------------------------------------------------------------------
Wed Apr 23 11:46:41 UTC 2014 - oneukum@suse.com
- Do not use runtime PM for some IBM consoles (bnc#868931)
1013-no-runtime-PM-for-IBM-consoles.patch
-------------------------------------------------------------------
Thu Apr 17 13:56:31 UTC 2014 - werner@suse.de

View File

@ -382,6 +382,18 @@ Patch196: systemd-detect-xendom.patch
Patch197: rescue-emergency-target-conflicts.patch
# PATCH-FIX-SUSE Avoid a divide by zero sigtrap
Patch198: avoid-divide-by-zero-sigtrap.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch199: 0001-bash-completion-fix-__get_startable_units.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch200: 0002-sysctl-replaces-some-slashes-with-dots.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch201: 0003-delta-do-not-use-unicode-chars-in-C-locale.patch
# PATCH-FIX-USTREAM added at 2014/04/28
Patch202: 0004-implement-a-union-to-pad-out-file_handle.patch
# PATCH-FIX-SUSE System fails to boot if nfs mounts get added to fstab (bnc#874665)
Patch203: respect-nfs-bg-option.patch
# PATCH-FIX-UPSTREAM Stop useless messages on dual_timestamp_is_set is failed.
Patch204: shut-up-annoying-assertion-monotonic-clock-message.patch
# UDEV PATCHES
# ============
@ -413,6 +425,8 @@ Patch1010: 1010-udev-increase-result-size-for-programs.patch
Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
# PATCH-FIX-SUSE skip persistent device link creation on mp device (bnc#872929)
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
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -759,6 +773,12 @@ cp %{SOURCE7} m4/
%patch196 -p1
%patch197 -p1
%patch198 -p1
%patch199 -p0
%patch200 -p0
%patch201 -p0
%patch202 -p0
%patch203 -p1
%patch204 -p1
# udev patches
%patch1001 -p1
@ -774,6 +794,7 @@ cp %{SOURCE7} m4/
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch1013 -p1
# ensure generate files are removed
rm -f units/emergency.service

View File

@ -192,6 +192,18 @@ valid_mac()
echo $valid_macaddr
}
valid_dev_type()
{
local dev_type="$1"
case "$dev_type" in
[0-32])
echo "$dev_type" ;;
*)
echo "invalid" ;;
esac
}
generate_comment()
{
local pci_id="$1"
@ -272,6 +284,10 @@ list_adapters()
for _dev in $SYSPATH/*; do
if [ -L "$_dev/device" ]; then
local _dev_type="$(cat $_dev/type 2>/dev/null)"
if [ "$(valid_dev_type $_dev_type)" == "invalid" ]; then
continue;
fi
_dev="$(basename $_dev 2>/dev/null)"
netdev[$count]="$_dev"
count=$((count + 1))
@ -445,6 +461,9 @@ dev_type="$(get_type $path)"
if [ -z "$dev_type" ]; then
log_error "unable to retrieve dev_type for interface $interface."
exit 1
elif [ "$(valid_dev_type $dev_type)" == "invalid" ]; then
log_info "$interface not a supported device."
exit 1
fi
[ "$use_verbose" -eq 1 ] && echo "I: TYPE=$dev_type"