diff --git a/0001-bash-completion-fix-__get_startable_units.patch b/0001-bash-completion-fix-__get_startable_units.patch new file mode 100644 index 00000000..815e6abd --- /dev/null +++ b/0001-bash-completion-fix-__get_startable_units.patch @@ -0,0 +1,25 @@ +From a163b64c4b08e8a4ad39a9a295acf3d1634024a3 Mon Sep 17 00:00:00 2001 +From: Dan Kilman +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 + diff --git a/0002-sysctl-replaces-some-slashes-with-dots.patch b/0002-sysctl-replaces-some-slashes-with-dots.patch new file mode 100644 index 00000000..d46fd449 --- /dev/null +++ b/0002-sysctl-replaces-some-slashes-with-dots.patch @@ -0,0 +1,97 @@ +From 2e573fcf8754fdfe0db0a783b1631ec1679b063a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 @@ + 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. +- +- Note that both / and . are accepted as label +- separators within sysctl variable +- names. kernel.domainname=foo and +- kernel/domainname=foo hence are +- entirely equivalent. ++ is # or ; are ++ ignored. ++ ++ Note that either / or ++ . 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. kernel.domainname=foo ++ and kernel/domainname=foo are ++ equivalent and will cause foo to ++ be written to ++ /proc/sys/kernel/domainname. ++ Either ++ net.ipv4.conf.enp3s0/200.forwarding ++ or ++ net/ipv4/conf/enp3s0.200/forwarding ++ may be used to refer to ++ /proc/sys/net/ipv4/conf/enp3s0.200/forwarding. ++ + + Each configuration file shall be named in the + style of program.conf. +@@ -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, + net.ipv4.conf.*, + net.ipv6.conf.*, + net.ipv4.neigh.* and net.ipv6.neigh.*) +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 + diff --git a/0003-delta-do-not-use-unicode-chars-in-C-locale.patch b/0003-delta-do-not-use-unicode-chars-in-C-locale.patch new file mode 100644 index 00000000..f7360178 --- /dev/null +++ b/0003-delta-do-not-use-unicode-chars-in-C-locale.patch @@ -0,0 +1,134 @@ +From 00a5cc3a63c125633e822f39efd9c32223169f62 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 + diff --git a/0004-implement-a-union-to-pad-out-file_handle.patch b/0004-implement-a-union-to-pad-out-file_handle.patch new file mode 100644 index 00000000..cbb924cc --- /dev/null +++ b/0004-implement-a-union-to-pad-out-file_handle.patch @@ -0,0 +1,117 @@ +From 370c860f748d149097710dc7952a64f627db9de7 Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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 ++#include + #include + #include + #include +@@ -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 + diff --git a/respect-nfs-bg-option.patch b/respect-nfs-bg-option.patch new file mode 100644 index 00000000..ccf7cea4 --- /dev/null +++ b/respect-nfs-bg-option.patch @@ -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) diff --git a/systemd-mini.changes b/systemd-mini.changes index e9136b75..a3e832f2 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 diff --git a/systemd-mini.spec b/systemd-mini.spec index 1b885e20..ae52d705 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -387,6 +387,16 @@ 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 # UDEV PATCHES # ============ @@ -418,6 +428,7 @@ 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 @@ -765,6 +776,11 @@ cp %{SOURCE7} m4/ %patch196 -p1 %patch197 -p1 %patch198 -p1 +%patch199 -p0 +%patch200 -p0 +%patch201 -p0 +%patch202 -p0 +%patch203 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index e9136b75..a3e832f2 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 diff --git a/systemd.spec b/systemd.spec index e0003bdc..daadf1bd 100644 --- a/systemd.spec +++ b/systemd.spec @@ -382,6 +382,16 @@ 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 # UDEV PATCHES # ============ @@ -413,6 +423,7 @@ 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 @@ -760,6 +771,11 @@ cp %{SOURCE7} m4/ %patch196 -p1 %patch197 -p1 %patch198 -p1 +%patch199 -p0 +%patch200 -p0 +%patch201 -p0 +%patch202 -p0 +%patch203 -p1 # udev patches %patch1001 -p1