[systemd/f15] Pick lots of fixes from upstream up to v36.

Michal Schmidt michich at fedoraproject.org
Sun Sep 25 23:00:58 UTC 2011


commit a1c89c5e78061ea5684bea51e80d06c8d438bfcc
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Sun Sep 25 22:40:30 2011 +0200

    Pick lots of fixes from upstream up to v36.
    
    A few features added too:
    - support more types of virtual serial consoles in getty-generator
    - log control via RT signals
    - support for LANGUAGE in environment
    - show fsck progress on the console
    Fixes: BZ#735013, BZ#722803, BZ#736360, BZ#698198, BZ#710487
    Fixes: fdo39957, fdo39818, fdo40510

 ...w-a-warning-message-in-non-enforcing-mode.patch |   34 ++
 ...ix-reversed-tests-if-path-does-not-exist-.patch |   26 ++
 ...pt-out-of-proc-cmdline-parsing-only-when-.patch |   26 ++
 ...ty-fix-a-couple-of-bugs-found-by-coverity.patch |  108 +++++++
 0001-cryptsetup-accept-none-option.patch           |   25 ++
 ...generator-block-boot-when-querying-passph.patch |   28 ++
 ...t-fail-if-random-files-are-stored-in-.wan.patch |   59 ++++
 ...xecute-fix-bus-serialization-for-commands.patch |   44 +++
 ...-fsck-show-progress-while-fscking-at-boot.patch |  333 ++++++++++++++++++++
 ...atically-add-getty-on-hvsi0-virtualizer-c.patch |  151 +++++++++
 ...enerator-ignore-if-symlinks-already-exist.patch |   56 ++++
 0001-getty-simplify-things-a-bit.patch             |  108 +++++++
 ...onverting-a-job-from-restart-to-start-rea.patch |   40 +++
 ...alyze-fix-some-bugs-found-by-llvm-analyze.patch |   32 ++
 0001-locale-support-LANGUAGE-too.patch             |  101 ++++++
 0001-manager-add-log-control-via-RT-signals.patch  |  117 +++++++
 0001-manager-fix-job-mode-for-SIGRTMIN-1-2.patch   |   29 ++
 0001-modules-load-filter-out-double-modules.patch  |   24 ++
 0001-mount-fix-parsing-of-prio-value.patch         |   26 ++
 ...in-quota-tools-from-fstab-lines-with-quot.patch |   33 ++
 ...-up-std-output-error-before-we-add-depend.patch |   35 ++
 ...dle-forking-services-that-move-to-a-new-P.patch |   59 ++++
 ...StandardInput-socket-and-StandardOutput-i.patch |   74 +++++
 ...or-change-in-service_load_pid_file-return.patch |   39 +++
 0001-specifier-drop-misplaced-assert.patch         |   24 ++
 ...ge-set-facility-of-messages-with-no-facil.patch |   29 ++
 ...og-bridge-properly-handle-overly-long-log.patch |   69 ++++
 0001-strv-fix-counting-in-strv_env_delete.patch    |   68 ++++
 ...f-we-managed-to-reexec-the-init-system-vi.patch |   28 ++
 ...move-X11-lock-files-for-displays-10-and-h.patch |   23 ++
 ...recheck-conditions-when-a-unit-is-already.patch |   44 +++
 ...mplementing-of-requirement-deps-with-Afte.patch |   33 ++
 ...ect-stdout-stderr-of-rescue-shells-to-tty.patch |   60 ++++
 ...its-fix-rescue.service-race-with-plymouth.patch |   33 ++
 systemd.spec                                       |   82 +++++-
 35 files changed, 2099 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-show-a-warning-message-in-non-enforcing-mode.patch b/0001-Don-t-show-a-warning-message-in-non-enforcing-mode.patch
new file mode 100644
index 0000000..138c308
--- /dev/null
+++ b/0001-Don-t-show-a-warning-message-in-non-enforcing-mode.patch
@@ -0,0 +1,34 @@
+From 25bafad67f6f161921c498a7b77f118920bec971 Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl at debian.org>
+Date: Fri, 1 Jul 2011 05:55:57 +0200
+Subject: [PATCH] Don't show a warning message in non-enforcing mode.
+
+If we fail to load the SELinux policy only log an error message in
+enforcing mode.
+---
+ src/selinux-setup.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/selinux-setup.c b/src/selinux-setup.c
+index 620c49e..bc36e76 100644
+--- a/src/selinux-setup.c
++++ b/src/selinux-setup.c
+@@ -72,12 +72,13 @@ int selinux_setup(char *const argv[]) {
+                return -errno;
+ 
+        } else {
+-               log_full(enforce > 0 ? LOG_ERR : LOG_WARNING, "Failed to load SELinux policy.");
+ 
+                unlink("/dev/.systemd-relabel-run-dev");
+ 
+-               if (enforce > 0)
++               if (enforce > 0) {
++                       log_full(LOG_ERR, "Failed to load SELinux policy.");
+                        return -EIO;
++               }
+        }
+ #endif
+ 
+-- 
+1.7.4.4
+
diff --git a/0001-condition-fix-reversed-tests-if-path-does-not-exist-.patch b/0001-condition-fix-reversed-tests-if-path-does-not-exist-.patch
new file mode 100644
index 0000000..5bdfe77
--- /dev/null
+++ b/0001-condition-fix-reversed-tests-if-path-does-not-exist-.patch
@@ -0,0 +1,26 @@
+From 1f8fef5a44e6ce711808665bca6eb43d604fe279 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Fri, 23 Sep 2011 02:10:00 +0200
+Subject: [PATCH] condition: fix reversed tests if path does not exist at all
+
+CONDITION_PATH_IS_DIRECTORY, CONDITION_PATH_IS_SYMBOLIC_LINK and
+CONDITION_FILE_IS_EXECUTABLE gave reversed results when the path
+did not exist at all.
+
+[ in F15 there's only CONDITION_PATH_IS_DIRECTORY  -- michich ]
+
+---
+
+Index: systemd-26/src/condition.c
+===================================================================
+--- systemd-26.orig/src/condition.c
++++ systemd-26/src/condition.c
+@@ -152,7 +152,7 @@ bool condition_test(Condition *c) {
+                 struct stat st;
+ 
+                 if (lstat(c->parameter, &st) < 0)
+-                        return !c->negate;
++                        return c->negate;
+                 return S_ISDIR(st.st_mode) == !c->negate;
+         }
+ 
diff --git a/0001-condition-opt-out-of-proc-cmdline-parsing-only-when-.patch b/0001-condition-opt-out-of-proc-cmdline-parsing-only-when-.patch
new file mode 100644
index 0000000..3a3fd65
--- /dev/null
+++ b/0001-condition-opt-out-of-proc-cmdline-parsing-only-when-.patch
@@ -0,0 +1,26 @@
+From a373b0e7bc24b8fffe0ba69e8b92eebf2740332e Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Mon, 19 Sep 2011 23:51:15 +0200
+Subject: [PATCH] condition: opt out of /proc/cmdline parsing only when
+ running in a container, not in a VM
+
+---
+ src/condition.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/condition.c b/src/condition.c
+index f9202f6..8c08be4 100644
+--- a/src/condition.c
++++ b/src/condition.c
+@@ -75,7 +75,7 @@ static bool test_kernel_command_line(const char *parameter) {
+ 
+         assert(parameter);
+ 
+-        if (detect_virtualization(NULL) > 0)
++        if (detect_container(NULL) > 0)
+                 return false;
+ 
+         if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
+-- 
+1.7.4.4
+
diff --git a/0001-coverity-fix-a-couple-of-bugs-found-by-coverity.patch b/0001-coverity-fix-a-couple-of-bugs-found-by-coverity.patch
new file mode 100644
index 0000000..070d876
--- /dev/null
+++ b/0001-coverity-fix-a-couple-of-bugs-found-by-coverity.patch
@@ -0,0 +1,108 @@
+From 8ea913b2eaadbd92e069ea6b71cc5f5df409decf Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Fri, 23 Sep 2011 01:43:28 +0200
+Subject: [PATCH] coverity: fix a couple of bugs found by coverity
+
+---
+
+[ removed hunks for code which does not exist in F15 -- michich ]
+
+Index: systemd-26/src/binfmt.c
+===================================================================
+--- systemd-26.orig/src/binfmt.c
++++ systemd-26/src/binfmt.c
+@@ -33,7 +33,7 @@
+ #include "util.h"
+ 
+ static int delete_rule(const char *rule) {
+-        char *x, *fn, *e;
++        char *x, *fn = NULL, *e;
+         int r;
+ 
+         assert(rule[0]);
+Index: systemd-26/src/conf-parser.c
+===================================================================
+--- systemd-26.orig/src/conf-parser.c
++++ systemd-26/src/conf-parser.c
+@@ -194,9 +194,12 @@ int config_parse(const char *filename, F
+ 
+                         if (c)
+                                 continuation = c;
+-                        else if (!(continuation = strdup(l))) {
+-                                r = -ENOMEM;
+-                                goto finish;
++                        else {
++                                continuation = strdup(l);
++                                if (!continuation) {
++                                        r = -ENOMEM;
++                                        goto finish;
++                                }
+                         }
+ 
+                         continue;
+Index: systemd-26/src/load-fragment.c
+===================================================================
+--- systemd-26.orig/src/load-fragment.c
++++ systemd-26/src/load-fragment.c
+@@ -498,6 +498,7 @@ static int config_parse_exec(
+                 if (!n[0]) {
+                         log_error("[%s:%u] Invalid command line, ignoring: %s", filename, line, rvalue);
+                         strv_free(n);
++                        free(path);
+                         return 0;
+                 }
+ 
+Index: systemd-26/src/modules-load.c
+===================================================================
+--- systemd-26.orig/src/modules-load.c
++++ systemd-26/src/modules-load.c
+@@ -73,7 +73,6 @@ int main(int argc, char *argv[]) {
+                                 continue;
+ 
+                         log_error("Failed to open %s: %m", *fn);
+-                        free(fn);
+                         r = EXIT_FAILURE;
+                         continue;
+                 }
+Index: systemd-26/src/path.c
+===================================================================
+--- systemd-26.orig/src/path.c
++++ systemd-26/src/path.c
+@@ -558,7 +558,7 @@ static void path_fd_event(Unit *u, int f
+         assert(l > 0);
+ 
+         if (!(buf = malloc(l))) {
+-                log_error("Failed to allocate buffer: %s", strerror(-ENOMEM));
++                log_error("Failed to allocate buffer: %s", strerror(ENOMEM));
+                 goto fail;
+         }
+ 
+Index: systemd-26/src/strv.c
+===================================================================
+--- systemd-26.orig/src/strv.c
++++ systemd-26/src/strv.c
+@@ -202,12 +202,19 @@ char **strv_merge_concat(char **a, char 
+         if (!(r = new(char*, strv_length(a)+strv_length(b)+1)))
+                 return NULL;
+ 
+-        for (k = r; *a; k++, a++)
+-                if (!(*k = strdup(*a)))
+-                        goto fail;
+-        for (; *b; k++, b++)
+-                if (!(*k = strappend(*b, suffix)))
++        k = r;
++        if (a)
++                for (; *a; k++, a++) {
++                        *k = strdup(*a);
++                        if (!*k)
++                                goto fail;
++                }
++
++        for (; *b; k++, b++) {
++                *k = strappend(*b, suffix);
++                if (!*k)
+                         goto fail;
++        }
+ 
+         *k = NULL;
+         return r;
diff --git a/0001-cryptsetup-accept-none-option.patch b/0001-cryptsetup-accept-none-option.patch
new file mode 100644
index 0000000..fdec3d4
--- /dev/null
+++ b/0001-cryptsetup-accept-none-option.patch
@@ -0,0 +1,25 @@
+From 41e6f28acc906960f21658c94ac79652705ded0c Mon Sep 17 00:00:00 2001
+From: Frederic Crozat <fcrozat at suse.com>
+Date: Thu, 4 Aug 2011 16:04:43 +0200
+Subject: [PATCH] cryptsetup: accept "none" option
+
+---
+ src/cryptsetup.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/cryptsetup.c b/src/cryptsetup.c
+index cf288de..ac7b6d6 100644
+--- a/src/cryptsetup.c
++++ b/src/cryptsetup.c
+@@ -110,7 +110,7 @@ static int parse_one_option(const char *option) {
+                         return 0;
+                 }
+ 
+-        } else
++        } else if (!streq(option, "none"))
+                 log_error("Encountered unknown /etc/crypttab option '%s', ignoring.", option);
+ 
+         return 0;
+-- 
+1.7.4.4
+
diff --git a/0001-cryptsetup-generator-block-boot-when-querying-passph.patch b/0001-cryptsetup-generator-block-boot-when-querying-passph.patch
new file mode 100644
index 0000000..a376663
--- /dev/null
+++ b/0001-cryptsetup-generator-block-boot-when-querying-passph.patch
@@ -0,0 +1,28 @@
+From 1c5224b33630a1f95952796b2cb582be052e0c27 Mon Sep 17 00:00:00 2001
+From: Frederic Crozat <fcrozat at suse.com>
+Date: Thu, 4 Aug 2011 16:46:33 +0200
+Subject: [PATCH] cryptsetup-generator: block boot when querying passphrase.
+
+Ensure we wait for passphrase before starting tty1 or graphical display.
+Needed when not using plymouth.
+---
+ src/cryptsetup-generator.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c
+index a340218..6f3aa78 100644
+--- a/src/cryptsetup-generator.c
++++ b/src/cryptsetup-generator.c
+@@ -112,7 +112,8 @@ static int create_disk(
+                 "DefaultDependencies=no\n"
+                 "BindTo=%s dev-mapper-%%i.device\n"
+                 "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n"
+-                "Before=umount.target\n",
++                "Before=umount.target\n"
++                "Before=local-fs.target\n",
+                 d, d);
+ 
+         if (!nofail)
+-- 
+1.7.4.4
+
diff --git a/0001-dropin-don-t-fail-if-random-files-are-stored-in-.wan.patch b/0001-dropin-don-t-fail-if-random-files-are-stored-in-.wan.patch
new file mode 100644
index 0000000..56bb027
--- /dev/null
+++ b/0001-dropin-don-t-fail-if-random-files-are-stored-in-.wan.patch
@@ -0,0 +1,59 @@
+From f917c3e5e189ea062adbad8432c16ea2408d3368 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 03:55:38 +0200
+Subject: [PATCH] dropin: don't fail if random files are stored in .wants
+ directories
+
+https://bugs.freedesktop.org/show_bug.cgi?id=39957
+---
+
+[rediffed with quilt to unfuzz -- michich]
+
+Index: systemd-26/src/load-dropin.c
+===================================================================
+--- systemd-26.orig/src/load-dropin.c
++++ systemd-26/src/load-dropin.c
+@@ -36,7 +36,8 @@ static int iterate_dir(Unit *u, const ch
+         assert(u);
+         assert(path);
+ 
+-        if (!(d = opendir(path))) {
++        d = opendir(path);
++        if (!d) {
+ 
+                 if (errno == ENOENT)
+                         return 0;
+@@ -59,7 +60,7 @@ static int iterate_dir(Unit *u, const ch
+                 free(f);
+ 
+                 if (r < 0)
+-                        goto finish;
++                        log_error("Cannot add dependency %s to %s, ignoring: %s", de->d_name, u->meta.id, strerror(-r));
+         }
+ 
+         r = 0;
+@@ -95,7 +96,8 @@ static int process_dir(Unit *u, const ch
+                 char *template;
+                 /* Also try the template dir */
+ 
+-                if (!(template = unit_name_template(name)))
++                template = unit_name_template(name);
++                if (!template)
+                         return -ENOMEM;
+ 
+                 r = asprintf(&path, "%s/%s%s", unit_path, template, suffix);
+@@ -132,10 +134,12 @@ int unit_load_dropin(Unit *u) {
+                 STRV_FOREACH(p, u->meta.manager->lookup_paths.unit_path) {
+                         int r;
+ 
+-                        if ((r = process_dir(u, *p, t, ".wants", UNIT_WANTS)) < 0)
++                        r = process_dir(u, *p, t, ".wants", UNIT_WANTS);
++                        if (r < 0)
+                                 return r;
+ 
+-                        if ((r = process_dir(u, *p, t, ".requires", UNIT_REQUIRES)) < 0)
++                        r = process_dir(u, *p, t, ".requires", UNIT_REQUIRES);
++                        if (r < 0)
+                                 return r;
+                 }
+         }
diff --git a/0001-execute-fix-bus-serialization-for-commands.patch b/0001-execute-fix-bus-serialization-for-commands.patch
new file mode 100644
index 0000000..91f0580
--- /dev/null
+++ b/0001-execute-fix-bus-serialization-for-commands.patch
@@ -0,0 +1,44 @@
+From 7daa9e6e29b546275566084512ea4e547bc79b91 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Mon, 29 Aug 2011 19:44:52 +0200
+Subject: [PATCH] execute: fix bus serialization for commands
+
+---
+ src/dbus-execute.c |    7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/dbus-execute.c b/src/dbus-execute.c
+index 6ceffc5..201f6b5 100644
+--- a/src/dbus-execute.c
++++ b/src/dbus-execute.c
+@@ -308,13 +308,14 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
+         assert(i);
+         assert(property);
+ 
+-        if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttuii)", &sub))
++        if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttttuii)", &sub))
+                 return -ENOMEM;
+ 
+         LIST_FOREACH(command, c, c) {
+                 char **l;
+                 uint32_t pid;
+                 int32_t code, status;
++                dbus_bool_t b;
+ 
+                 if (!c->path)
+                         continue;
+@@ -332,8 +333,10 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
+                 code = (int32_t) c->exec_status.code;
+                 status = (int32_t) c->exec_status.status;
+ 
++                b = !!c->ignore;
++
+                 if (!dbus_message_iter_close_container(&sub2, &sub3) ||
+-                    !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &c->ignore) ||
++                    !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &b) ||
+                     !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.realtime) ||
+                     !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.monotonic) ||
+                     !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.exit_timestamp.realtime) ||
+-- 
+1.7.4.4
+
diff --git a/0001-fsck-show-progress-while-fscking-at-boot.patch b/0001-fsck-show-progress-while-fscking-at-boot.patch
new file mode 100644
index 0000000..6d2a5e2
--- /dev/null
+++ b/0001-fsck-show-progress-while-fscking-at-boot.patch
@@ -0,0 +1,333 @@
+From 27d340c772fb1b251085dba7bd5420484f7c5892 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 1 Sep 2011 21:05:06 +0200
+Subject: [PATCH] fsck: show progress while fscking at boot
+
+---
+
+[fixed up a small reject -- michich]
+
+Index: systemd-26/src/fsck.c
+===================================================================
+--- systemd-26.orig/src/fsck.c
++++ systemd-26/src/fsck.c
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <sys/file.h>
+ 
+ #include <libudev.h>
+ #include <dbus/dbus.h>
+@@ -36,6 +37,7 @@
+ 
+ static bool arg_skip = false;
+ static bool arg_force = false;
++static bool arg_show_progress = false;
+ 
+ static void start_target(const char *target, bool isolate) {
+         DBusMessage *m = NULL, *reply = NULL;
+@@ -142,10 +144,103 @@ static void test_files(void) {
+ 
+         if (access("/forcefsck", F_OK) >= 0)
+                 arg_force = true;
++
++        if (access("/run/systemd/show-status", F_OK) >= 0 || plymouth_running())
++                arg_show_progress = true;
++}
++
++static double percent(int pass, unsigned long cur, unsigned long max) {
++        /* Values stolen from e2fsck */
++
++        static const int pass_table[] = {
++                0, 70, 90, 92, 95, 100
++        };
++
++        if (pass <= 0)
++                return 0.0;
++
++        if ((unsigned) pass >= ELEMENTSOF(pass_table) || max == 0)
++                return 100.0;
++
++        return (double) pass_table[pass-1] +
++                ((double) pass_table[pass] - (double) pass_table[pass-1]) *
++                (double) cur / (double) max;
++}
++
++static int process_progress(int fd) {
++        FILE *f, *console;
++        usec_t last = 0;
++        bool locked = false;
++        int clear = 0;
++
++        f = fdopen(fd, "r");
++        if (!f) {
++                close_nointr_nofail(fd);
++                return -errno;
++        }
++
++        console = fopen("/dev/console", "w");
++        if (!console) {
++                fclose(f);
++                return -ENOMEM;
++        }
++
++        while (!feof(f)) {
++                int pass, m;
++                unsigned long cur, max;
++                char *device;
++                double p;
++                usec_t t;
++
++                if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
++                        break;
++
++                /* Only show one progress counter at max */
++                if (!locked) {
++                        if (flock(fileno(console), LOCK_EX|LOCK_NB) < 0) {
++                                free(device);
++                                continue;
++                        }
++
++                        locked = true;
++                }
++
++                /* Only update once every 50ms */
++                t = now(CLOCK_MONOTONIC);
++                if (last + 50 * USEC_PER_MSEC > t)  {
++                        free(device);
++                        continue;
++                }
++
++                last = t;
++
++                p = percent(pass, cur, max);
++                fprintf(console, "\r%s: fsck %3.1f%% complete...\r%n", device, p, &m);
++                fflush(console);
++
++                free(device);
++
++                if (m > clear)
++                        clear = m;
++        }
++
++        if (clear > 0) {
++                unsigned j;
++
++                fputc('\r', console);
++                for (j = 0; j < (unsigned) clear; j++)
++                        fputc(' ', console);
++                fputc('\r', console);
++                fflush(console);
++        }
++
++        fclose(f);
++        fclose(console);
++        return 0;
+ }
+ 
+ int main(int argc, char *argv[]) {
+-        const char *cmdline[8];
++        const char *cmdline[9];
+         int i = 0, r = EXIT_FAILURE, q;
+         pid_t pid;
+         siginfo_t status;
+@@ -153,13 +248,15 @@ int main(int argc, char *argv[]) {
+         struct udev_device *udev_device = NULL;
+         const char *device;
+         bool root_directory;
++        int progress_pipe[2] = { -1, -1 };
++        char dash_c[2+10+1];
+ 
+         if (argc > 2) {
+                 log_error("This program expects one or no arguments.");
+                 return EXIT_FAILURE;
+         }
+ 
+-        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
++        log_set_target(LOG_TARGET_AUTO);
+         log_parse_environment();
+         log_open();
+ 
+@@ -213,6 +310,12 @@ int main(int argc, char *argv[]) {
+                 root_directory = true;
+         }
+ 
++        if (arg_show_progress)
++                if (pipe(progress_pipe) < 0) {
++                        log_error("pipe(): %m");
++                        goto finish;
++                }
++
+         cmdline[i++] = "/sbin/fsck";
+         cmdline[i++] = "-a";
+         cmdline[i++] = "-T";
+@@ -224,19 +327,39 @@ int main(int argc, char *argv[]) {
+         if (arg_force)
+                 cmdline[i++] = "-f";
+ 
++        if (progress_pipe[1] >= 0) {
++                snprintf(dash_c, sizeof(dash_c), "-C%i", progress_pipe[1]);
++                char_array_0(dash_c);
++                cmdline[i++] = dash_c;
++        }
++
+         cmdline[i++] = device;
+         cmdline[i++] = NULL;
+ 
+-        if ((pid = fork()) < 0) {
++        pid = fork();
++        if (pid < 0) {
+                 log_error("fork(): %m");
+                 goto finish;
+         } else if (pid == 0) {
+                 /* Child */
++                if (progress_pipe[0] >= 0)
++                        close_nointr_nofail(progress_pipe[0]);
+                 execv(cmdline[0], (char**) cmdline);
+                 _exit(8); /* Operational error */
+         }
+ 
+-        if ((q = wait_for_terminate(pid, &status)) < 0) {
++        if (progress_pipe[1] >= 0) {
++                close_nointr_nofail(progress_pipe[1]);
++                progress_pipe[1] = -1;
++        }
++
++        if (progress_pipe[0] >= 0) {
++                process_progress(progress_pipe[0]);
++                progress_pipe[0] = -1;
++        }
++
++        q = wait_for_terminate(pid, &status);
++        if (q < 0) {
+                 log_error("waitid(): %s", strerror(-q));
+                 goto finish;
+         }
+@@ -274,5 +397,7 @@ finish:
+         if (udev)
+                 udev_unref(udev);
+ 
++        close_pipe(progress_pipe);
++
+         return r;
+ }
+Index: systemd-26/src/main.c
+===================================================================
+--- systemd-26.orig/src/main.c
++++ systemd-26/src/main.c
+@@ -1194,7 +1194,6 @@ int main(int argc, char *argv[]) {
+         }
+ 
+         m->confirm_spawn = arg_confirm_spawn;
+-        m->show_status = arg_show_status;
+ #ifdef HAVE_SYSV_COMPAT
+         m->sysv_console = arg_sysv_console;
+ #endif
+@@ -1209,6 +1208,8 @@ int main(int argc, char *argv[]) {
+         if (arg_default_controllers)
+                 manager_set_default_controllers(m, arg_default_controllers);
+ 
++        manager_set_show_status(m, arg_show_status);
++
+         if ((r = manager_startup(m, serialization, fds)) < 0)
+                 log_error("Failed to fully start up daemon: %s", strerror(-r));
+ 
+Index: systemd-26/src/manager.c
+===================================================================
+--- systemd-26.orig/src/manager.c
++++ systemd-26/src/manager.c
+@@ -2241,12 +2241,12 @@ static int manager_process_signal_fd(Man
+ 
+                         case 20:
+                                 log_debug("Enabling showing of status.");
+-                                m->show_status = true;
++                                manager_set_show_status(m, true);
+                                 break;
+ 
+                         case 21:
+                                 log_debug("Disabling showing of status.");
+-                                m->show_status = false;
++                                manager_set_show_status(m, false);
+                                 break;
+ 
+                         case 22:
+@@ -2897,7 +2897,8 @@ bool manager_is_booting_or_shutting_down
+                 return true;
+ 
+         /* Is there a job for the shutdown target? */
+-        if (((u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET))))
++        u = manager_get_unit(m, SPECIAL_SHUTDOWN_TARGET);
++        if (u)
+                 return !!u->meta.job;
+ 
+         return false;
+@@ -3114,6 +3115,35 @@ void manager_recheck_syslog(Manager *m) 
+         log_open();
+ }
+ 
++void manager_set_show_status(Manager *m, bool b) {
++        assert(m);
++
++        if (m->running_as != MANAGER_SYSTEM)
++                return;
++
++        m->show_status = b;
++
++        if (b)
++                touch("/run/systemd/show-status");
++        else
++                unlink("/run/systemd/show-status");
++}
++
++bool manager_get_show_status(Manager *m) {
++        assert(m);
++
++        if (m->running_as != MANAGER_SYSTEM)
++                return false;
++
++        if (m->show_status)
++                return true;
++
++        /* If Plymouth is running make sure we show the status, so
++         * that there's something nice to see when people press Esc */
++
++        return plymouth_running();
++}
++
+ static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {
+         [MANAGER_SYSTEM] = "system",
+         [MANAGER_USER] = "user"
+Index: systemd-26/src/manager.h
+===================================================================
+--- systemd-26.orig/src/manager.h
++++ systemd-26/src/manager.h
+@@ -290,6 +290,9 @@ void manager_undo_generators(Manager *m)
+ 
+ void manager_recheck_syslog(Manager *m);
+ 
++void manager_set_show_status(Manager *m, bool b);
++bool manager_get_show_status(Manager *m);
++
+ const char *manager_running_as_to_string(ManagerRunningAs i);
+ ManagerRunningAs manager_running_as_from_string(const char *s);
+ 
+Index: systemd-26/src/unit.c
+===================================================================
+--- systemd-26.orig/src/unit.c
++++ systemd-26/src/unit.c
+@@ -2285,13 +2285,7 @@ void unit_status_printf(Unit *u, const c
+         if (!UNIT_VTABLE(u)->show_status)
+                 return;
+ 
+-        if (u->meta.manager->running_as != MANAGER_SYSTEM)
+-                return;
+-
+-        /* If Plymouth is running make sure we show the status, so
+-         * that there's something nice to see when people press Esc */
+-
+-        if (!u->meta.manager->show_status && !plymouth_running())
++        if (!manager_get_show_status(u->meta.manager))
+                 return;
+ 
+         if (!manager_is_booting_or_shutting_down(u->meta.manager))
diff --git a/0001-getty-automatically-add-getty-on-hvsi0-virtualizer-c.patch b/0001-getty-automatically-add-getty-on-hvsi0-virtualizer-c.patch
new file mode 100644
index 0000000..769dbdd
--- /dev/null
+++ b/0001-getty-automatically-add-getty-on-hvsi0-virtualizer-c.patch
@@ -0,0 +1,151 @@
+From 3c20189a722e6f2eec12c57c3bf3567533073c66 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 04:15:42 +0200
+Subject: [PATCH] getty: automatically add getty on hvsi0 virtualizer console
+
+https://bugs.freedesktop.org/show_bug.cgi?id=39818
+---
+
+[Fixed rejects and applied pieces of trivial patches that were skipped -- michich]
+
+Index: systemd-26/src/99-systemd.rules
+===================================================================
+--- systemd-26.orig/src/99-systemd.rules
++++ systemd-26/src/99-systemd.rules
+@@ -8,7 +8,7 @@
+ ACTION!="add|change", GOTO="systemd_end"
+ 
+ SUBSYSTEM=="tty", KERNEL=="tty[0-9]|tty1[0-2]", TAG+="systemd"
+-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*", TAG+="systemd"
++SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
+ 
+ SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
+ SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
+Index: systemd-26/src/getty-generator.c
+===================================================================
+--- systemd-26.orig/src/getty-generator.c
++++ systemd-26/src/getty-generator.c
+@@ -47,7 +47,7 @@ static int add_symlink(const char *fserv
+         r = symlink(from, to);
+         if (r < 0) {
+                 if (errno == EEXIST)
+-                        /* In case console=hvc is passed this will very likely result in EEXIST */
++                        /* In case console=hvc0 is passed this will very likely result in EEXIST */
+                         r = 0;
+                 else {
+                         log_error("Failed to create symlink from %s to %s: %m", from, to);
+@@ -64,21 +64,30 @@ finish:
+ }
+ 
+ int main(int argc, char *argv[]) {
++
++        static const char virtualization_consoles[] =
++                "hvc0\0"
++                "xvc0\0"
++                "hvsi0\0";
++
+         int r = EXIT_SUCCESS;
+         char *active;
++        const char *j;
+ 
+         if (argc > 2) {
+                 log_error("This program takes one or no arguments.");
+                 return EXIT_FAILURE;
+         }
+ 
+-        if (argc > 1)
+-            arg_dest = argv[1];
+-
+         log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
+         log_parse_environment();
+         log_open();
+ 
++        umask(0022);
++
++        if (argc > 1)
++            arg_dest = argv[1];
++
+         if (detect_container(NULL) > 0) {
+                 log_debug("Automatic adding console shell.");
+ 
+@@ -100,8 +109,11 @@ int main(int argc, char *argv[]) {
+ 
+                 /* Automatically add in a serial getty on the kernel
+                  * console */
+-                if (!tty_is_vc(tty)) {
++                if (tty_is_vc(tty))
++                        free(active);
++                else {
+                         char *n;
++                        int k;
+ 
+                         /* We assume that gettys on virtual terminals are
+                          * started via manual configuration and do this magic
+@@ -110,30 +122,57 @@ int main(int argc, char *argv[]) {
+                         log_debug("Automatically adding serial getty for /dev/%s.", tty);
+ 
+                         n = unit_name_replace_instance("serial-getty at .service", tty);
+-                        if (!n || add_symlink("serial-getty at .service", n) < 0)
++                        free(active);
++
++                        if (!n) {
++                                log_error("Out of memory");
+                                 r = EXIT_FAILURE;
++                                goto finish;
++                        }
+ 
++                        k = add_symlink("serial-getty at .service", n);
+                         free(n);
++                        if (k < 0) {
++                                r = EXIT_FAILURE;
++                                goto finish;
++                        }
+                 }
+-
+-                free(active);
+         }
+ 
+         /* Automatically add in a serial getty on the first
+          * virtualizer console */
+-        if (access("/sys/class/tty/hvc0", F_OK) == 0) {
+-                log_debug("Automatic adding serial getty for hvc0.");
++        NULSTR_FOREACH(j, virtualization_consoles) {
++                char *n, *p;
++                int k;
+ 
+-                if (add_symlink("serial-getty at .service", "serial-getty at hvc0.service") < 0)
++                if (asprintf(&p, "/sys/class/tty/%s", j) < 0) {
++                        log_error("Out of memory");
+                         r = EXIT_FAILURE;
++                        goto finish;
++                }
+ 
+-        }
++                k = access(p, F_OK);
++                free(p);
++
++                if (k < 0)
++                        continue;
+ 
+-        if (access("/sys/class/tty/xvc0", F_OK) == 0) {
+-                log_debug("Automatic adding serial getty for xvc0.");
++                log_debug("Automatically adding serial getty for /dev/%s.", j);
+ 
+-                if (add_symlink("serial-getty at .service", "serial-getty at xvc0.service") < 0)
++                n = unit_name_replace_instance("serial-getty at .service", j);
++                if (!n) {
++                        log_error("Out of memory");
+                         r = EXIT_FAILURE;
++                        goto finish;
++                }
++
++                k = add_symlink("serial-getty at .service", n);
++                free(n);
++
++                if (k < 0) {
++                        r = EXIT_FAILURE;
++                        goto finish;
++                }
+         }
+ 
+ finish:
diff --git a/0001-getty-generator-ignore-if-symlinks-already-exist.patch b/0001-getty-generator-ignore-if-symlinks-already-exist.patch
new file mode 100644
index 0000000..b9a6f53
--- /dev/null
+++ b/0001-getty-generator-ignore-if-symlinks-already-exist.patch
@@ -0,0 +1,56 @@
+From a17b785b5fa57fba8cd658fdf710d5987413d9c2 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 01:30:57 +0200
+Subject: [PATCH] getty-generator: ignore if symlinks already exist
+
+---
+ src/getty-generator.c |   19 +++++++++++++------
+ 1 files changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/src/getty-generator.c b/src/getty-generator.c
+index 7cce76f..14cceb4 100644
+--- a/src/getty-generator.c
++++ b/src/getty-generator.c
+@@ -44,9 +44,15 @@ static int add_symlink(const char *fservice, const char *tservice) {
+ 
+         mkdir_parents(to, 0755);
+ 
+-        if ((r = symlink(from, to)) < 0) {
+-                log_error("Failed to create symlink from %s to %s: %m", from, to);
+-                r = -errno;
++        r = symlink(from, to);
++        if (r < 0) {
++                if (errno == EEXIST)
++                        /* In case console=hvc is passed this will very likely result in EEXIST */
++                        r = 0;
++                else {
++                        log_error("Failed to create symlink from %s to %s: %m", from, to);
++                        r = -errno;
++                }
+         }
+ 
+ finish:
+@@ -88,7 +94,8 @@ int main(int argc, char *argv[]) {
+         if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
+                 const char *tty;
+ 
+-                if ((tty = strrchr(active, ' ')))
++                tty = strrchr(active, ' ');
++                if (tty)
+                         tty ++;
+                 else
+                         tty = active;
+@@ -104,8 +111,8 @@ int main(int argc, char *argv[]) {
+ 
+                         log_debug("Automatically adding serial getty for /dev/%s.", tty);
+ 
+-                        if (!(n = unit_name_replace_instance("serial-getty at .service", tty)) ||
+-                            add_symlink("serial-getty at .service", n) < 0)
++                        n = unit_name_replace_instance("serial-getty at .service", tty);
++                        if (!n || add_symlink("serial-getty at .service", n) < 0)
+                                 r = EXIT_FAILURE;
+ 
+                         free(n);
+-- 
+1.7.4.4
+
diff --git a/0001-getty-simplify-things-a-bit.patch b/0001-getty-simplify-things-a-bit.patch
new file mode 100644
index 0000000..ea81eb1
--- /dev/null
+++ b/0001-getty-simplify-things-a-bit.patch
@@ -0,0 +1,108 @@
+From 4dc380d16dfbead78de9caaf5104dbc00bac6d75 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 04:22:41 +0200
+Subject: [PATCH] getty: simplify things a bit
+
+https://bugs.freedesktop.org/show_bug.cgi?id=39818
+---
+
+[Fixed a reject -- michich]
+
+Index: systemd-26/src/getty-generator.c
+===================================================================
+--- systemd-26.orig/src/getty-generator.c
++++ systemd-26/src/getty-generator.c
+@@ -33,6 +33,9 @@ static int add_symlink(const char *fserv
+         char *from = NULL, *to = NULL;
+         int r;
+ 
++        assert(fservice);
++        assert(tservice);
++
+         asprintf(&from, SYSTEM_DATA_UNIT_PATH "/%s", fservice);
+         asprintf(&to, "%s/getty.target.wants/%s", arg_dest, tservice);
+ 
+@@ -63,6 +66,26 @@ finish:
+         return r;
+ }
+ 
++static int add_serial_getty(const char *tty) {
++        char *n;
++        int r;
++
++        assert(tty);
++
++        log_debug("Automatically adding serial getty for /dev/%s.", tty);
++
++        n = unit_name_replace_instance("serial-getty at .service", tty);
++        if (!n) {
++                log_error("Out of memory");
++                return -ENOMEM;
++        }
++
++        r = add_symlink("serial-getty at .service", n);
++        free(n);
++
++        return r;
++}
++
+ int main(int argc, char *argv[]) {
+ 
+         static const char virtualization_consoles[] =
+@@ -112,26 +135,15 @@ int main(int argc, char *argv[]) {
+                 if (tty_is_vc(tty))
+                         free(active);
+                 else {
+-                        char *n;
+                         int k;
+ 
+                         /* We assume that gettys on virtual terminals are
+                          * started via manual configuration and do this magic
+                          * only for non-VC terminals. */
+ 
+-                        log_debug("Automatically adding serial getty for /dev/%s.", tty);
+-
+-                        n = unit_name_replace_instance("serial-getty at .service", tty);
++                        k = add_serial_getty(tty);
+                         free(active);
+ 
+-                        if (!n) {
+-                                log_error("Out of memory");
+-                                r = EXIT_FAILURE;
+-                                goto finish;
+-                        }
+-
+-                        k = add_symlink("serial-getty at .service", n);
+-                        free(n);
+                         if (k < 0) {
+                                 r = EXIT_FAILURE;
+                                 goto finish;
+@@ -142,7 +154,7 @@ int main(int argc, char *argv[]) {
+         /* Automatically add in a serial getty on the first
+          * virtualizer console */
+         NULSTR_FOREACH(j, virtualization_consoles) {
+-                char *n, *p;
++                char *p;
+                 int k;
+ 
+                 if (asprintf(&p, "/sys/class/tty/%s", j) < 0) {
+@@ -157,18 +169,7 @@ int main(int argc, char *argv[]) {
+                 if (k < 0)
+                         continue;
+ 
+-                log_debug("Automatically adding serial getty for /dev/%s.", j);
+-
+-                n = unit_name_replace_instance("serial-getty at .service", j);
+-                if (!n) {
+-                        log_error("Out of memory");
+-                        r = EXIT_FAILURE;
+-                        goto finish;
+-                }
+-
+-                k = add_symlink("serial-getty at .service", n);
+-                free(n);
+-
++                k = add_serial_getty(j);
+                 if (k < 0) {
+                         r = EXIT_FAILURE;
+                         goto finish;
diff --git a/0001-job-after-converting-a-job-from-restart-to-start-rea.patch b/0001-job-after-converting-a-job-from-restart-to-start-rea.patch
new file mode 100644
index 0000000..6f0d35b
--- /dev/null
+++ b/0001-job-after-converting-a-job-from-restart-to-start-rea.patch
@@ -0,0 +1,40 @@
+From 57981b98123a6504c68981c7e3cd43f7cc1668f7 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 21 Sep 2011 19:56:15 +0200
+Subject: [PATCH] job: after converting a job from restart to start readd it
+ to run queue
+
+When we converted a restart job it's time to look again whether any of
+its dependencies are now runnable.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=735013
+---
+ src/job.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/src/job.c b/src/job.c
+index 26e1a7c..5c0913b 100644
+--- a/src/job.c
++++ b/src/job.c
+@@ -544,7 +544,9 @@ int job_finish_and_invalidate(Job *j, JobResult result) {
+                 j->type = JOB_START;
+ 
+                 job_add_to_run_queue(j);
+-                return 0;
++
++                u = j->unit;
++                goto finish;
+         }
+ 
+         j->result = result;
+@@ -613,6 +615,7 @@ int job_finish_and_invalidate(Job *j, JobResult result) {
+                 unit_trigger_on_failure(u);
+         }
+ 
++finish:
+         /* Try to start the next jobs that can be started */
+         SET_FOREACH(other, u->meta.dependencies[UNIT_AFTER], i)
+                 if (other->meta.job)
+-- 
+1.7.4.4
+
diff --git a/0001-llvm-analyze-fix-some-bugs-found-by-llvm-analyze.patch b/0001-llvm-analyze-fix-some-bugs-found-by-llvm-analyze.patch
new file mode 100644
index 0000000..d719853
--- /dev/null
+++ b/0001-llvm-analyze-fix-some-bugs-found-by-llvm-analyze.patch
@@ -0,0 +1,32 @@
+From de3756ab9916551f3f4f1f360aee59aeed238b5b Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Fri, 23 Sep 2011 02:39:28 +0200
+Subject: [PATCH] llvm-analyze: fix some bugs found by llvm-analyze
+
+---
+
+[ removed hunks for code not present in F15 -- michich ]
+
+ src/socket.c   |    6 ++++++
+ 3 files changed, 30 insertions(+), 20 deletions(-)
+
+diff --git a/src/socket.c b/src/socket.c
+index a1b451e..7ddf326 100644
+--- a/src/socket.c
++++ b/src/socket.c
+@@ -1962,6 +1962,12 @@ int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds) {
+                 if (p->fd >= 0)
+                         rn_fds++;
+ 
++        if (rn_fds <= 0) {
++                *fds = NULL;
++                *n_fds = 0;
++                return 0;
++        }
++
+         if (!(rfds = new(int, rn_fds)))
+                 return -ENOMEM;
+ 
+-- 
+1.7.4.4
+
diff --git a/0001-locale-support-LANGUAGE-too.patch b/0001-locale-support-LANGUAGE-too.patch
new file mode 100644
index 0000000..6dd9573
--- /dev/null
+++ b/0001-locale-support-LANGUAGE-too.patch
@@ -0,0 +1,101 @@
+From 07bceef2a9c520e24da427c7ce500ad36ad37571 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 14:09:14 +0200
+Subject: [PATCH] locale: support $LANGUAGE too
+
+$LANGUAGE is a GNU extension that is probably worth supporting, since it
+allows specifiying an order of languages.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=40510
+---
+
+[removed the localed.c patch -- michich]
+
+ man/locale.conf.xml     |    2 ++
+ src/locale-setup.c      |    8 ++++++--
+ units/getty at .service.m4 |    2 +-
+ 4 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/man/locale.conf.xml b/man/locale.conf.xml
+index 742c5eb..3723997 100644
+--- a/man/locale.conf.xml
++++ b/man/locale.conf.xml
+@@ -69,6 +69,7 @@
+ 
+                 <para>Note that the kernel command line options
+                 <varname>locale.LANG=</varname>,
++                <varname>locale.LANGUAGE=</varname>,
+                 <varname>locale.LC_CTYPE=</varname>,
+                 <varname>locale.LC_NUMERIC=</varname>,
+                 <varname>locale.LC_TIME=</varname>,
+@@ -101,6 +102,7 @@
+                 <para>The following locale settings may be set using
+                 <filename>/etc/locale.conf</filename>:
+                 <varname>LANG=</varname>,
++                <varname>LANGUAGE=</varname>,
+                 <varname>LC_CTYPE=</varname>,
+                 <varname>LC_NUMERIC=</varname>,
+                 <varname>LC_TIME=</varname>,
+diff --git a/src/locale-setup.c b/src/locale-setup.c
+index 33111da..41eb50b 100644
+--- a/src/locale-setup.c
++++ b/src/locale-setup.c
+@@ -32,6 +32,7 @@ enum {
+          * using LANG instead. */
+ 
+         VARIABLE_LANG,
++        VARIABLE_LANGUAGE,
+         VARIABLE_LC_CTYPE,
+         VARIABLE_LC_NUMERIC,
+         VARIABLE_LC_TIME,
+@@ -49,6 +50,7 @@ enum {
+ 
+ static const char * const variable_names[_VARIABLE_MAX] = {
+         [VARIABLE_LANG] = "LANG",
++        [VARIABLE_LANGUAGE] = "LANGUAGE",
+         [VARIABLE_LC_CTYPE] = "LC_CTYPE",
+         [VARIABLE_LC_NUMERIC] = "LC_NUMERIC",
+         [VARIABLE_LC_TIME] = "LC_TIME",
+@@ -75,6 +77,7 @@ int locale_setup(void) {
+                                         "LANG",                     &variables[VARIABLE_LANG],
+ #endif
+                                         "locale.LANG",              &variables[VARIABLE_LANG],
++                                        "locale.LANGUAGE",          &variables[VARIABLE_LANGUAGE],
+                                         "locale.LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
+                                         "locale.LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
+                                         "locale.LC_TIME",           &variables[VARIABLE_LC_TIME],
+@@ -98,6 +101,7 @@ int locale_setup(void) {
+         if (r <= 0 &&
+             (r = parse_env_file("/etc/locale.conf", NEWLINE,
+                                "LANG",              &variables[VARIABLE_LANG],
++                               "LANGUAGE",          &variables[VARIABLE_LANGUAGE],
+                                "LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
+                                "LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
+                                "LC_TIME",           &variables[VARIABLE_LC_TIME],
+@@ -212,8 +216,8 @@ int locale_setup(void) {
+                                 "LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
+                                 NULL)) < 0) {
+ 
+-		if (r != -ENOENT)
+-			log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
++                if (r != -ENOENT)
++                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
+         }
+ 
+ #endif
+diff --git a/units/getty at .service.m4 b/units/getty at .service.m4
+index b111567..14d8187 100644
+--- a/units/getty at .service.m4
++++ b/units/getty at .service.m4
+@@ -44,7 +44,7 @@ KillMode=process
+ 
+ # Unset locale for the console getty since the console has problems
+ # displaying some internationalized messages.
+-Environment=LANG= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
++Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+ 
+ # Some login implementations ignore SIGTERM, so we send SIGHUP
+ # instead, to ensure that login terminates cleanly.
+-- 
+1.7.4.4
+
diff --git a/0001-manager-add-log-control-via-RT-signals.patch b/0001-manager-add-log-control-via-RT-signals.patch
new file mode 100644
index 0000000..bc0f0bd
--- /dev/null
+++ b/0001-manager-add-log-control-via-RT-signals.patch
@@ -0,0 +1,117 @@
+From 253ee27a0c7a410d27d490bb79ea97caed6a2b68 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Sat, 23 Jul 2011 04:15:38 +0200
+Subject: [PATCH] manager: add log control via RT signals
+
+
+---
+[hand-edited to remove unrelated TODO edits -- michich]
+
+diff --git a/man/systemd.xml b/man/systemd.xml
+index 142c1d6..5129fbb 100644
+--- a/man/systemd.xml
++++ b/man/systemd.xml
+@@ -800,6 +800,44 @@
+                                 on the kernel command
+                                 line.</para></listitem>
+                         </varlistentry>
++
++                        <varlistentry>
++                                <term>SIGRTMIN+22</term>
++                                <term>SIGRTMIN+23</term>
++
++                                <listitem><para>Sets the log level to
++                                <literal>debug</literal>
++                                (resp. <literal>info</literal> on
++                                <literal>SIGRTMIN+32</literal>), as
++                                controlled via
++                                <varname>systemd.log_level=debug</varname>
++                                (resp. <varname>systemd.log_level=info</varname>
++                                on <literal>SIGRTMIN+23</literal>) on
++                                the kernel command
++                                line.</para></listitem>
++                        </varlistentry>
++
++                        <varlistentry>
++                                <term>SIGRTMIN+27</term>
++                                <term>SIGRTMIN+28</term>
++                                <term>SIGRTMIN+29</term>
++
++                                <listitem><para>Sets the log level to
++                                <literal>console</literal>
++                                (resp. <literal>kmsg</literal> on
++                                <literal>SIGRTMIN+28</literal>;
++                                resp.<literal>syslog-or-kmsg</literal>
++                                on <literal>SIGRTMIN+29</literal>), as
++                                controlled via
++                                <varname>systemd.log_target=console</varname>
++                                (resp. <varname>systemd.log_target=kmsg</varname>
++                                on <literal>SIGRTMIN+28</literal>;
++                                resp
++                                <varname>systemd.log_target=syslog-or-kmsg</varname>
++                                on <literal>SIGRTMIN+29</literal>) on
++                                the kernel command
++                                line.</para></listitem>
++                        </varlistentry>
+                 </variablelist>
+         </refsect1>
+ 
+diff --git a/src/manager.c b/src/manager.c
+index c1242ae..cdd618e 100644
+--- a/src/manager.c
++++ b/src/manager.c
+@@ -186,6 +186,11 @@ static int manager_setup_signals(Manager *m) {
+                         SIGRTMIN+16, /* systemd: Immediate kexec */
+                         SIGRTMIN+20, /* systemd: enable status messages */
+                         SIGRTMIN+21, /* systemd: disable status messages */
++                        SIGRTMIN+22, /* systemd: set log level to LOG_DEBUG */
++                        SIGRTMIN+23, /* systemd: set log level to LOG_INFO */
++                        SIGRTMIN+27, /* systemd: set log target to console */
++                        SIGRTMIN+28, /* systemd: set log target to kmsg */
++                        SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg */
+                         -1);
+         assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);
+ 
+@@ -2200,6 +2205,7 @@ static int manager_process_signal_fd(Manager *m) {
+                         break;
+ 
+                 default: {
++
+                         /* Starting SIGRTMIN+0 */
+                         static const char * const target_table[] = {
+                                 [0] = SPECIAL_DEFAULT_TARGET,
+@@ -2244,6 +2250,31 @@ static int manager_process_signal_fd(Manager *m) {
+                                 m->show_status = false;
+                                 break;
+ 
++                        case 22:
++                                log_set_max_level(LOG_DEBUG);
++                                log_notice("Setting log level to debug.");
++                                break;
++
++                        case 23:
++                                log_set_max_level(LOG_INFO);
++                                log_notice("Setting log level to info.");
++                                break;
++
++                        case 27:
++                                log_set_target(LOG_TARGET_CONSOLE);
++                                log_notice("Setting log target to console.");
++                                break;
++
++                        case 28:
++                                log_set_target(LOG_TARGET_KMSG);
++                                log_notice("Setting log target to kmsg.");
++                                break;
++
++                        case 29:
++                                log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
++                                log_notice("Setting log target to syslog-or-kmsg.");
++                                break;
++
+                         default:
+                                 log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo)));
+                         }
+-- 
+1.7.4.4
+
diff --git a/0001-manager-fix-job-mode-for-SIGRTMIN-1-2.patch b/0001-manager-fix-job-mode-for-SIGRTMIN-1-2.patch
new file mode 100644
index 0000000..d926880
--- /dev/null
+++ b/0001-manager-fix-job-mode-for-SIGRTMIN-1-2.patch
@@ -0,0 +1,29 @@
+From 764e9b5f073e1d5216de150045ec85475835fe3c Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Fri, 23 Sep 2011 09:37:45 +0200
+Subject: [PATCH] manager: fix job mode for SIGRTMIN+1, +2
+
+The test did not work as intended and always resulted in JOB_REPLACE.
+---
+ src/manager.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/manager.c b/src/manager.c
+index 6311c10..cf308ac 100644
+--- a/src/manager.c
++++ b/src/manager.c
+@@ -2233,8 +2233,9 @@ static int manager_process_signal_fd(Manager *m) {
+ 
+                         if ((int) sfsi.ssi_signo >= SIGRTMIN+0 &&
+                             (int) sfsi.ssi_signo < SIGRTMIN+(int) ELEMENTSOF(target_table)) {
+-                                manager_start_target(m, target_table[sfsi.ssi_signo - SIGRTMIN],
+-                                                     (sfsi.ssi_signo == 1 || sfsi.ssi_signo == 2) ? JOB_ISOLATE : JOB_REPLACE);
++                                int idx = (int) sfsi.ssi_signo - SIGRTMIN;
++                                manager_start_target(m, target_table[idx],
++                                                     (idx == 1 || idx == 2) ? JOB_ISOLATE : JOB_REPLACE);
+                                 break;
+                         }
+ 
+-- 
+1.7.4.4
+
diff --git a/0001-modules-load-filter-out-double-modules.patch b/0001-modules-load-filter-out-double-modules.patch
new file mode 100644
index 0000000..8e11c89
--- /dev/null
+++ b/0001-modules-load-filter-out-double-modules.patch
@@ -0,0 +1,24 @@
+From c72dcc54315a5bb854849e17a34c6ad8a3f9dfaa Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 21 Sep 2011 02:57:02 +0200
+Subject: [PATCH] modules-load: filter out double modules
+
+---
+ src/modules-load.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/modules-load.c b/src/modules-load.c
+index 4b3b121..17b5e0b 100644
+--- a/src/modules-load.c
++++ b/src/modules-load.c
+@@ -131,6 +131,7 @@ finish:
+ 
+         if (n_arguments > 3) {
+                 arguments[n_arguments] = NULL;
++                strv_uniq(arguments);
+                 execv("/sbin/modprobe", arguments);
+ 
+                 log_error("Failed to execute /sbin/modprobe: %m");
+-- 
+1.7.4.4
+
diff --git a/0001-mount-fix-parsing-of-prio-value.patch b/0001-mount-fix-parsing-of-prio-value.patch
new file mode 100644
index 0000000..baa0d1c
--- /dev/null
+++ b/0001-mount-fix-parsing-of-prio-value.patch
@@ -0,0 +1,26 @@
+From 3a34ae3a4d211d9236ca77d9a162aa27ac11f5f9 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 01:46:38 +0200
+Subject: [PATCH] mount: fix parsing of prio value
+
+https://bugzilla.redhat.com/show_bug.cgi?id=722803
+---
+ src/mount.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/mount.c b/src/mount.c
+index bd1612f..829c2cc 100644
+--- a/src/mount.c
++++ b/src/mount.c
+@@ -1474,7 +1474,7 @@ static int mount_find_pri(char *options) {
+         char *end, *pri;
+         unsigned long r;
+ 
+-        if (!(pri = mount_test_option(options, "pri=")))
++        if (!(pri = mount_test_option(options, "pri")))
+                 return 0;
+ 
+         pri += 4;
+-- 
+1.7.4.4
+
diff --git a/0001-mount-pull-in-quota-tools-from-fstab-lines-with-quot.patch b/0001-mount-pull-in-quota-tools-from-fstab-lines-with-quot.patch
new file mode 100644
index 0000000..780601b
--- /dev/null
+++ b/0001-mount-pull-in-quota-tools-from-fstab-lines-with-quot.patch
@@ -0,0 +1,33 @@
+From d3354f66c23aa29b3a15a4c5903fb2edcc8acfda Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 21 Sep 2011 20:19:43 +0200
+Subject: [PATCH] mount: pull in quota tools from fstab lines with 'quota'
+ option, too
+
+https://bugzilla.redhat.com/show_bug.cgi?id=736360
+---
+
+[ dropped TODO hunk -- michich ]
+
+ src/mount.c |    5 ++++-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/src/mount.c b/src/mount.c
+index 829c2cc..2fc799a 100644
+--- a/src/mount.c
++++ b/src/mount.c
+@@ -320,7 +320,10 @@ static bool needs_quota(MountParameters *p) {
+                 return false;
+ 
+         return mount_test_option(p->options, "usrquota") ||
+-                mount_test_option(p->options, "grpquota");
++                mount_test_option(p->options, "grpquota") ||
++                mount_test_option(p->options, "quota") ||
++                mount_test_option(p->options, "usrjquota") ||
++                mount_test_option(p->options, "grpjquota");
+ }
+ 
+ static int mount_add_fstab_links(Mount *m) {
+-- 
+1.7.4.4
+
diff --git a/0001-service-fix-up-std-output-error-before-we-add-depend.patch b/0001-service-fix-up-std-output-error-before-we-add-depend.patch
new file mode 100644
index 0000000..d0392cc
--- /dev/null
+++ b/0001-service-fix-up-std-output-error-before-we-add-depend.patch
@@ -0,0 +1,35 @@
+From 4e2b0f9b149e6fc1adb5ce49a6adaeed130577be Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Fri, 23 Sep 2011 17:42:21 +0200
+Subject: [PATCH] service: fix up std output/error before we add dependencies
+ to the bridge socket
+
+---
+ src/service.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/service.c b/src/service.c
+index 2ae8785..c2053ce 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -1145,6 +1145,8 @@ static int service_load(Unit *u) {
+ 
+         /* This is a new unit? Then let's add in some extras */
+         if (u->meta.load_state == UNIT_LOADED) {
++                service_fix_output(s);
++
+                 if ((r = unit_add_exec_dependencies(u, &s->exec_context)) < 0)
+                         return r;
+ 
+@@ -1173,8 +1175,6 @@ static int service_load(Unit *u) {
+                 if (s->meta.default_dependencies)
+                         if ((r = service_add_default_dependencies(s)) < 0)
+                                 return r;
+-
+-                service_fix_output(s);
+         }
+ 
+         return service_verify(s);
+-- 
+1.7.4.4
+
diff --git a/0001-service-handle-forking-services-that-move-to-a-new-P.patch b/0001-service-handle-forking-services-that-move-to-a-new-P.patch
new file mode 100644
index 0000000..d660d3d
--- /dev/null
+++ b/0001-service-handle-forking-services-that-move-to-a-new-P.patch
@@ -0,0 +1,59 @@
+From db01f8b3f870611a013b913636bb7fefaab34018 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Tue, 20 Sep 2011 21:43:30 +0200
+Subject: [PATCH] service: handle forking services that move to a new PID
+
+When some forking daemons receive a SIGHUP, they re-execute themselves
+and consequently change to a new main PID. As long as they update the
+PID file in the right order (before exiting the old PID), we can detect
+that and avoid killing them.
+---
+
+[ unfuzzed with quilt -- michich ]
+
+ src/service.c |   18 +++++++++++++++---
+ 1 files changed, 15 insertions(+), 3 deletions(-)
+
+Index: systemd-26/src/service.c
+===================================================================
+--- systemd-26.orig/src/service.c
++++ systemd-26/src/service.c
+@@ -1264,9 +1264,6 @@ static int service_load_pid_file(Service
+ 
+         assert(s);
+ 
+-        if (s->main_pid_known)
+-                return 0;
+-
+         if (!s->pid_file)
+                 return 0;
+ 
+@@ -1285,6 +1282,16 @@ static int service_load_pid_file(Service
+                 return -ESRCH;
+         }
+ 
++        if (s->main_pid_known) {
++                if (pid == s->main_pid)
++                        return 0;
++
++                log_debug("Main PID changing: %lu -> %lu",
++                          (unsigned long) s->main_pid, (unsigned long) pid);
++                service_unwatch_main_pid(s);
++                s->main_pid_known = false;
++        }
++
+         if ((r = service_set_main_pid(s, pid)) < 0)
+                 return r;
+ 
+@@ -2569,6 +2576,11 @@ static void service_sigchld_event(Unit *
+                 success = is_clean_exit(code, status);
+ 
+         if (s->main_pid == pid) {
++                /* Forking services may occasionally move to a new PID.
++                 * As long as they update the PID file before exiting the old
++                 * PID, they're fine. */
++                if (s->pid_file && service_load_pid_file(s) == 0)
++                        return;
+ 
+                 s->main_pid = 0;
+                 exec_status_exit(&s->main_exec_status, pid, code, status, s->exec_context.utmp_id);
diff --git a/0001-service-if-StandardInput-socket-and-StandardOutput-i.patch b/0001-service-if-StandardInput-socket-and-StandardOutput-i.patch
new file mode 100644
index 0000000..4c789e9
--- /dev/null
+++ b/0001-service-if-StandardInput-socket-and-StandardOutput-i.patch
@@ -0,0 +1,74 @@
+From 4dfc092a7176f74102b6be205f11008e1de59bb3 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 22 Sep 2011 03:29:51 +0200
+Subject: [PATCH] service: if StandardInput=socket and StandardOutput=inherit
+ imply socket for output, don't imply default output
+
+This is useful for inetd-style per-connection services, so that they
+again can simply specify StandardOutput=socket to connect all three fds
+to the socket.
+---
+
+[ unfuzzed with quilt -- michich ]
+
+Index: systemd-26/src/service.c
+===================================================================
+--- systemd-26.orig/src/service.c
++++ systemd-26/src/service.c
+@@ -121,8 +121,6 @@ static void service_init(Unit *u) {
+         s->guess_main_pid = true;
+ 
+         exec_context_init(&s->exec_context);
+-        s->exec_context.std_output = u->meta.manager->default_std_output;
+-        s->exec_context.std_error = u->meta.manager->default_std_error;
+ 
+         RATELIMIT_INIT(s->ratelimit, 10*USEC_PER_SEC, 5);
+ 
+@@ -830,9 +828,10 @@ static int service_load_sysv_path(Servic
+         s->type = SERVICE_FORKING;
+         s->remain_after_exit = true;
+         s->restart = SERVICE_RESTART_NO;
+-        s->exec_context.std_output =
+-                (s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
+-                ? EXEC_OUTPUT_TTY : s->meta.manager->default_std_output;
++
++        if (s->meta.manager->sysv_console)
++                s->exec_context.std_output = EXEC_OUTPUT_TTY;
++
+         s->exec_context.kill_mode = KILL_PROCESS;
+ 
+         /* We use the long description only if
+@@ -1095,6 +1094,24 @@ static int service_add_default_dependenc
+         return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ }
+ 
++static void service_fix_output(Service *s) {
++        assert(s);
++
++        /* If nothing has been explicitly configured, patch default
++         * output in. If input is socket/tty we avoid this however,
++         * since in that case we want output to default to the same
++         * place as we read input from. */
++
++        if (s->exec_context.std_error == EXEC_OUTPUT_INHERIT &&
++            s->exec_context.std_output == EXEC_OUTPUT_INHERIT &&
++            s->exec_context.std_input == EXEC_INPUT_NULL)
++                s->exec_context.std_error = s->meta.manager->default_std_error;
++
++        if (s->exec_context.std_output == EXEC_OUTPUT_INHERIT &&
++            s->exec_context.std_input == EXEC_INPUT_NULL)
++                s->exec_context.std_output = s->meta.manager->default_std_output;
++}
++
+ static int service_load(Unit *u) {
+         int r;
+         Service *s = SERVICE(u);
+@@ -1151,6 +1168,8 @@ static int service_load(Unit *u) {
+                 if (s->meta.default_dependencies)
+                         if ((r = service_add_default_dependencies(s)) < 0)
+                                 return r;
++
++                service_fix_output(s);
+         }
+ 
+         return service_verify(s);
diff --git a/0001-service-minor-change-in-service_load_pid_file-return.patch b/0001-service-minor-change-in-service_load_pid_file-return.patch
new file mode 100644
index 0000000..ac7912d
--- /dev/null
+++ b/0001-service-minor-change-in-service_load_pid_file-return.patch
@@ -0,0 +1,39 @@
+From 13230d5d3c89e866f1b9b689d41f0edc90af707a Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Wed, 21 Sep 2011 02:25:17 +0200
+Subject: [PATCH] service: minor change in service_load_pid_file return value
+
+Return 0 only if the PID was really loaded. If no PIDFile= is defined,
+return -ENOENT.
+
+Only one caller cares about the return value of this function and this
+change makes the usage nicer.
+---
+ src/service.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/service.c b/src/service.c
+index 8f827aa..5050bca 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -1270,7 +1270,7 @@ static int service_load_pid_file(Service *s) {
+         assert(s);
+ 
+         if (!s->pid_file)
+-                return 0;
++                return -ENOENT;
+ 
+         if ((r = read_one_line_file(s->pid_file, &k)) < 0)
+                 return r;
+@@ -2585,7 +2585,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
+                 /* Forking services may occasionally move to a new PID.
+                  * As long as they update the PID file before exiting the old
+                  * PID, they're fine. */
+-                if (s->pid_file && service_load_pid_file(s) == 0)
++                if (service_load_pid_file(s) == 0)
+                         return;
+ 
+                 s->main_pid = 0;
+-- 
+1.7.4.4
+
diff --git a/0001-specifier-drop-misplaced-assert.patch b/0001-specifier-drop-misplaced-assert.patch
new file mode 100644
index 0000000..fe9ee93
--- /dev/null
+++ b/0001-specifier-drop-misplaced-assert.patch
@@ -0,0 +1,24 @@
+From 149e180ac35564b6c8bf7757301634b31e3d0054 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Tue, 30 Aug 2011 16:49:17 +0200
+Subject: [PATCH] specifier: drop misplaced assert()
+
+---
+ src/specifier.c |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/src/specifier.c b/src/specifier.c
+index 497d395..a9fff88 100644
+--- a/src/specifier.c
++++ b/src/specifier.c
+@@ -104,7 +104,5 @@ char *specifier_printf(const char *text, const Specifier table[], void *userdata
+ /* Generic handler for simple string replacements */
+ 
+ char* specifier_string(char specifier, void *data, void *userdata) {
+-        assert(data);
+-
+         return strdup(strempty(data));
+ }
+-- 
+1.7.4.4
+
diff --git a/0001-stdout-bridge-set-facility-of-messages-with-no-facil.patch b/0001-stdout-bridge-set-facility-of-messages-with-no-facil.patch
new file mode 100644
index 0000000..6b04c56
--- /dev/null
+++ b/0001-stdout-bridge-set-facility-of-messages-with-no-facil.patch
@@ -0,0 +1,29 @@
+From 43de46ab92e3b343c2e35b42cf0728a9adf48f1c Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 1 Sep 2011 21:15:00 +0200
+Subject: [PATCH] stdout-bridge: set facility of messages with no facility to
+ configured facility instead of LOG_USER
+
+---
+
+[ fixed the filename -- michich ]
+
+diff --git a/src/stdout-syslog-bridge.c b/src/stdout-syslog-bridge.c
+index 48a301f..7358a42 100644
+--- a/src/logger.c
++++ b/src/logger.c
+@@ -111,9 +111,9 @@ static int stream_log(Stream *s, char *p, usec_t ts) {
+         if (*p == 0)
+                 return 0;
+ 
+-        /* Patch in LOG_USER facility if necessary */
++        /* Patch in configured facility if necessary */
+         if ((priority & LOG_FACMASK) == 0)
+-                priority = LOG_USER | LOG_PRI(priority);
++                priority = (s->priority & LOG_FACMASK) | priority;
+ 
+         /*
+          * The format glibc uses to talk to the syslog daemon is:
+-- 
+1.7.4.4
+
diff --git a/0001-stdout-syslog-bridge-properly-handle-overly-long-log.patch b/0001-stdout-syslog-bridge-properly-handle-overly-long-log.patch
new file mode 100644
index 0000000..87d07f9
--- /dev/null
+++ b/0001-stdout-syslog-bridge-properly-handle-overly-long-log.patch
@@ -0,0 +1,69 @@
+From a94e09a5b935a3fb64a4e2c9f22220899ff40294 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Tue, 20 Sep 2011 02:46:04 +0200
+Subject: [PATCH] stdout-syslog-bridge: properly handle overly long log lines
+
+---
+
+[ fixed the file name -- michich ]
+
+diff --git a/src/stdout-syslog-bridge.c b/src/stdout-syslog-bridge.c
+index 7358a42..9a04088 100644
+--- a/src/logger.c
++++ b/src/logger.c
+@@ -88,7 +88,7 @@ struct Stream {
+         bool prefix:1;
+         bool tee_console:1;
+ 
+-        char buffer[LINE_MAX];
++        char buffer[LINE_MAX+1];
+         size_t length;
+ 
+         LIST_FIELDS(Stream, stream);
+@@ -321,16 +321,25 @@ static int stream_scan(Stream *s, usec_t ts) {
+         p = s->buffer;
+         remaining = s->length;
+         for (;;) {
+-                char *newline;
+-
+-                if (!(newline = memchr(p, '\n', remaining)))
+-                        break;
++                char *end;
++                size_t skip;
++
++                end = memchr(p, '\n', remaining);
++                if (!end) {
++                        if (remaining >= LINE_MAX) {
++                                end = p + LINE_MAX;
++                                skip = LINE_MAX;
++                        } else
++                                break;
++                } else
++                        skip = end - p + 1;
+ 
+-                *newline = 0;
++                *end = 0;
+ 
+-                if ((r = stream_line(s, p, ts)) >= 0) {
+-                        remaining -= newline-p+1;
+-                        p = newline+1;
++                r = stream_line(s, p, ts);
++                if (r >= 0) {
++                        remaining -= skip;
++                        p += skip;
+                 }
+         }
+ 
+@@ -347,7 +356,8 @@ static int stream_process(Stream *s, usec_t ts) {
+         int r;
+         assert(s);
+ 
+-        if ((l = read(s->fd, s->buffer+s->length, LINE_MAX-s->length)) < 0) {
++        l = read(s->fd, s->buffer+s->length, LINE_MAX-s->length);
++        if (l < 0) {
+ 
+                 if (errno == EAGAIN)
+                         return 0;
+-- 
+1.7.4.4
+
diff --git a/0001-strv-fix-counting-in-strv_env_delete.patch b/0001-strv-fix-counting-in-strv_env_delete.patch
new file mode 100644
index 0000000..6a1be6a
--- /dev/null
+++ b/0001-strv-fix-counting-in-strv_env_delete.patch
@@ -0,0 +1,68 @@
+From 700de55514bc3137bb90aa87326f2ed80e675dda Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 24 Aug 2011 01:10:13 +0200
+Subject: [PATCH] strv: fix counting in strv_env_delete()
+
+---
+ src/strv.c |   21 +++++++++++++--------
+ 1 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/src/strv.c b/src/strv.c
+index a52440d..92851b2 100644
+--- a/src/strv.c
++++ b/src/strv.c
+@@ -482,8 +482,8 @@ static bool env_match(const char *t, const char *pattern) {
+ }
+ 
+ char **strv_env_delete(char **x, unsigned n_lists, ...) {
+-        size_t n = 0, i = 0;
+-        char **l, **k, **r, **j;
++        size_t n, i = 0;
++        char **k, **r;
+         va_list ap;
+ 
+         /* Deletes every entry from x that is mentioned in the other
+@@ -491,29 +491,34 @@ char **strv_env_delete(char **x, unsigned n_lists, ...) {
+ 
+         n = strv_length(x);
+ 
+-        if (!(r = new(char*, n+1)))
++        r = new(char*, n+1);
++        if (!r)
+                 return NULL;
+ 
+         STRV_FOREACH(k, x) {
++                unsigned v;
++
+                 va_start(ap, n_lists);
++                for (v = 0; v < n_lists; v++) {
++                        char **l, **j;
+ 
+-                for (i = 0; i < n_lists; i++) {
+                         l = va_arg(ap, char**);
+                         STRV_FOREACH(j, l)
+                                 if (env_match(*k, *j))
+-                                        goto delete;
++                                        goto skip;
+                 }
+-
+                 va_end(ap);
+ 
+-                if (!(r[i++] = strdup(*k))) {
++                r[i] = strdup(*k);
++                if (!r[i]) {
+                         strv_free(r);
+                         return NULL;
+                 }
+ 
++                i++;
+                 continue;
+ 
+-        delete:
++        skip:
+                 va_end(ap);
+         }
+ 
+-- 
+1.7.4.4
+
diff --git a/0001-systemctl-if-we-managed-to-reexec-the-init-system-vi.patch b/0001-systemctl-if-we-managed-to-reexec-the-init-system-vi.patch
new file mode 100644
index 0000000..ba2018a
--- /dev/null
+++ b/0001-systemctl-if-we-managed-to-reexec-the-init-system-vi.patch
@@ -0,0 +1,28 @@
+From d76702a7b22c85c40c740a63d727a0f114e177ad Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Wed, 31 Aug 2011 03:31:27 +0200
+Subject: [PATCH] systemctl: if we managed to reexec the init system via the
+ bus don't retry via signal
+
+If we managed to reeexec the init system via the bus this allows us to
+provide synchronous behaviour to callers. This is all lost if we then
+repeat the reexecution via SIGTERM.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=698198
+---
+
+[rediffed with quilt to apply -- michich]
+
+Index: systemd-26/src/systemctl.c
+===================================================================
+--- systemd-26.orig/src/systemctl.c
++++ systemd-26/src/systemctl.c
+@@ -5428,7 +5428,7 @@ static int reload_with_fallback(DBusConn
+ 
+         if (bus) {
+                 /* First, try systemd via D-Bus. */
+-                if (daemon_reload(bus, NULL, 0) > 0)
++                if (daemon_reload(bus, NULL, 0) >= 0)
+                         return 0;
+         }
+ 
diff --git a/0001-tmpfiles-Remove-X11-lock-files-for-displays-10-and-h.patch b/0001-tmpfiles-Remove-X11-lock-files-for-displays-10-and-h.patch
new file mode 100644
index 0000000..cdbd4c0
--- /dev/null
+++ b/0001-tmpfiles-Remove-X11-lock-files-for-displays-10-and-h.patch
@@ -0,0 +1,23 @@
+From 3b09f343fe2414cfb36860f1692f327011c4bc44 Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh at joshtriplett.org>
+Date: Sat, 6 Aug 2011 15:56:39 -0700
+Subject: [PATCH] tmpfiles: Remove X11 lock files for displays :10 and higher
+ too
+
+---
+ tmpfiles.d/x11.conf |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tmpfiles.d/x11.conf b/tmpfiles.d/x11.conf
+index 5072b58..7f81af6 100644
+--- a/tmpfiles.d/x11.conf
++++ b/tmpfiles.d/x11.conf
+@@ -15,4 +15,4 @@ d /tmp/.font-unix 1777 root root 10d
+ d /tmp/.Test-unix 1777 root root 10d
+ 
+ # Unlink the X11 lock files
+-r /tmp/.X[0-9]-lock
++r /tmp/.X[0-9]*-lock
+-- 
+1.7.4.4
+
diff --git a/0001-unit-don-t-recheck-conditions-when-a-unit-is-already.patch b/0001-unit-don-t-recheck-conditions-when-a-unit-is-already.patch
new file mode 100644
index 0000000..5021959
--- /dev/null
+++ b/0001-unit-don-t-recheck-conditions-when-a-unit-is-already.patch
@@ -0,0 +1,44 @@
+From a82e5507a6e03766957d43ca8818112ae9766288 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 22 Sep 2011 21:32:18 +0200
+Subject: [PATCH] unit: don't recheck conditions when a unit is already
+ starting but unit_start() is invoked
+
+---
+ src/unit.c |   16 ++++++++++------
+ 1 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/src/unit.c b/src/unit.c
+index 3ce87ea..0b435cb 100644
+--- a/src/unit.c
++++ b/src/unit.c
+@@ -888,16 +888,20 @@ int unit_start(Unit *u) {
+         if (u->meta.load_state != UNIT_LOADED)
+                 return -EINVAL;
+ 
+-        /* If this is already (being) started, then this will
+-         * succeed. Note that this will even succeed if this unit is
+-         * not startable by the user. This is relied on to detect when
+-         * we need to wait for units and when waiting is finished. */
++        /* If this is already started, then this will succeed. Note
++         * that this will even succeed if this unit is not startable
++         * by the user. This is relied on to detect when we need to
++         * wait for units and when waiting is finished. */
+         state = unit_active_state(u);
+         if (UNIT_IS_ACTIVE_OR_RELOADING(state))
+                 return -EALREADY;
+ 
+-        /* If the conditions failed, don't do anything at all */
+-        if (!unit_condition_test(u)) {
++        /* If the conditions failed, don't do anything at all. If we
++         * already are activating this call might still be useful to
++         * speed up activation in case there is some hold-off time,
++         * but we don't want to recheck the condition in that case. */
++        if (state != UNIT_ACTIVATING &&
++            !unit_condition_test(u)) {
+                 log_debug("Starting of %s requested but condition failed. Ignoring.", u->meta.id);
+                 return -EALREADY;
+         }
+-- 
+1.7.4.4
+
diff --git a/0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch b/0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch
new file mode 100644
index 0000000..7e6b8c4
--- /dev/null
+++ b/0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch
@@ -0,0 +1,33 @@
+From a65cb51f29ee177f6f800c87232b68475216a418 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Fri, 23 Sep 2011 13:58:00 +0200
+Subject: [PATCH] unit: fix complementing of requirement deps with After deps
+ for targets
+
+'man systemd.target' says:
+  Unless DefaultDependencies= is set to false, target units will
+  implicitly complement all configured dependencies of type
+  Wants=, Requires=, RequiresOverridable= with dependencies of type
+  After=  if the units in question also have DefaultDependencies=true.
+
+It did not work because of a forgotten negation.
+---
+ src/unit.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/unit.c b/src/unit.c
+index 0b435cb..903a8e4 100644
+--- a/src/unit.c
++++ b/src/unit.c
+@@ -774,7 +774,7 @@ int unit_add_default_target_dependency(Unit *u, Unit *target) {
+         /* If either side wants no automatic dependencies, then let's
+          * skip this */
+         if (!u->meta.default_dependencies ||
+-            target->meta.default_dependencies)
++            !target->meta.default_dependencies)
+                 return 0;
+ 
+         /* Don't create loops */
+-- 
+1.7.4.4
+
diff --git a/0001-units-direct-stdout-stderr-of-rescue-shells-to-tty.patch b/0001-units-direct-stdout-stderr-of-rescue-shells-to-tty.patch
new file mode 100644
index 0000000..23cf445
--- /dev/null
+++ b/0001-units-direct-stdout-stderr-of-rescue-shells-to-tty.patch
@@ -0,0 +1,60 @@
+From cbe8269481a0272a51d72dc35a54a1fe20c93dfc Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Tue, 20 Sep 2011 12:11:04 +0200
+Subject: [PATCH] units: direct stdout/stderr of rescue shells to tty
+
+With output of services going to syslog by default now, the rescue shell
+units need to direct their output to tty explicitly.
+Specify stderr too, just in case.
+
+[ the default has not changed in F15, but someone might change their config
+  -- michich ]
+
+---
+ units/console-shell.service.m4 |    2 ++
+ units/emergency.service        |    2 ++
+ units/rescue.service.m4        |    2 ++
+ 3 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/units/console-shell.service.m4 b/units/console-shell.service.m4
+index cce2d5a..a4a9108 100644
+--- a/units/console-shell.service.m4
++++ b/units/console-shell.service.m4
+@@ -31,6 +31,8 @@ WorkingDirectory=/root
+ ExecStart=-/sbin/sulogin
+ ExecStopPost=-/bin/systemctl poweroff
+ StandardInput=tty-force
++StandardOutput=inherit
++StandardError=inherit
+ KillMode=process
+ 
+ # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+diff --git a/units/emergency.service b/units/emergency.service
+index eff5261..4847f4f 100644
+--- a/units/emergency.service
++++ b/units/emergency.service
+@@ -21,6 +21,8 @@ ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" or ^
+ ExecStart=-/sbin/sulogin
+ ExecStopPost=/bin/systemctl --fail --no-block default
+ StandardInput=tty-force
++StandardOutput=inherit
++StandardError=inherit
+ KillMode=process
+ 
+ # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+diff --git a/units/rescue.service.m4 b/units/rescue.service.m4
+index d2fd582..5b4ab6e 100644
+--- a/units/rescue.service.m4
++++ b/units/rescue.service.m4
+@@ -31,6 +31,8 @@ m4_ifdef(`TARGET_MEEGO',
+ ExecStart=-/bin/bash -c "exec ${SINGLE}"',)))
+ ExecStopPost=-/bin/systemctl --fail --no-block default
+ StandardInput=tty-force
++StandardOutput=inherit
++StandardError=inherit
+ KillMode=process
+ 
+ # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
+-- 
+1.7.4.4
+
diff --git a/0001-units-fix-rescue.service-race-with-plymouth.patch b/0001-units-fix-rescue.service-race-with-plymouth.patch
new file mode 100644
index 0000000..c5b0195
--- /dev/null
+++ b/0001-units-fix-rescue.service-race-with-plymouth.patch
@@ -0,0 +1,33 @@
+From 0fe9972f3c2e20b649e0e7da0e61945253622128 Mon Sep 17 00:00:00 2001
+From: Michal Schmidt <mschmidt at redhat.com>
+Date: Thu, 22 Sep 2011 23:52:38 +0200
+Subject: [PATCH] units: fix rescue.service race with plymouth
+
+It was possible for the "ExecStartPre=-/bin/plymouth quit" to race
+with plymouth-start.service which is pulled in indirectly by
+basic.target -> sysinit.target.
+
+The race left plymouth running on the terminal, making it unusable for
+rescue purposes.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=710487
+---
+ units/rescue.service.m4 |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/units/rescue.service.m4 b/units/rescue.service.m4
+index 8f29de8..19b30d8 100644
+--- a/units/rescue.service.m4
++++ b/units/rescue.service.m4
+@@ -11,7 +11,7 @@
+ Description=Rescue Shell
+ DefaultDependencies=no
+ Conflicts=shutdown.target
+-After=basic.target
++After=basic.target plymouth-start.service
+ Before=shutdown.target
+ 
+ [Service]
+-- 
+1.7.4.4
+
diff --git a/systemd.spec b/systemd.spec
index c67e9da..728b360 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -2,7 +2,7 @@ Name:           systemd
 Url:            http://www.freedesktop.org/wiki/Software/systemd
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Version:        26
-Release:        9%{?dist}
+Release:        10%{?dist}
 License:        GPLv2+
 Group:          System Environment/Base
 Summary:        A System and Service Manager
@@ -69,6 +69,42 @@ Patch28:        0001-manager-merge-serialization-and-desrialization-count.patch
 Patch29:        0001-execute-properly-enforce-group.patch
 Patch30:        0001-manager-call-generators-with-umask-0022.patch
 Patch31:        0001-getty-automatically-spawn-getty-on-xen-console-xvc0.patch
+Patch32:        0001-manager-add-log-control-via-RT-signals.patch
+Patch33:        0001-Don-t-show-a-warning-message-in-non-enforcing-mode.patch
+Patch34:        0001-strv-fix-counting-in-strv_env_delete.patch
+Patch35:        0001-tmpfiles-Remove-X11-lock-files-for-displays-10-and-h.patch
+Patch36:        0001-cryptsetup-accept-none-option.patch
+# May cause a new dep cycle, related to bz711150
+#Patch37:        0001-cryptsetup-generator-block-boot-when-querying-passph.patch
+Patch38:        0001-execute-fix-bus-serialization-for-commands.patch
+Patch39:        0001-specifier-drop-misplaced-assert.patch
+Patch40:        0001-getty-generator-ignore-if-symlinks-already-exist.patch
+Patch41:        0001-mount-fix-parsing-of-prio-value.patch
+Patch42:        0001-systemctl-if-we-managed-to-reexec-the-init-system-vi.patch
+Patch43:        0001-dropin-don-t-fail-if-random-files-are-stored-in-.wan.patch
+Patch44:        0001-getty-automatically-add-getty-on-hvsi0-virtualizer-c.patch
+Patch45:        0001-getty-simplify-things-a-bit.patch
+Patch46:        0001-locale-support-LANGUAGE-too.patch
+Patch47:        0001-fsck-show-progress-while-fscking-at-boot.patch
+Patch48:        0001-stdout-bridge-set-facility-of-messages-with-no-facil.patch
+Patch49:        0001-condition-opt-out-of-proc-cmdline-parsing-only-when-.patch
+Patch50:        0001-stdout-syslog-bridge-properly-handle-overly-long-log.patch
+Patch51:        0001-units-direct-stdout-stderr-of-rescue-shells-to-tty.patch
+Patch52:        0001-service-handle-forking-services-that-move-to-a-new-P.patch
+Patch53:        0001-service-minor-change-in-service_load_pid_file-return.patch
+Patch54:        0001-modules-load-filter-out-double-modules.patch
+Patch55:        0001-job-after-converting-a-job-from-restart-to-start-rea.patch
+Patch56:        0001-mount-pull-in-quota-tools-from-fstab-lines-with-quot.patch
+Patch57:        0001-service-if-StandardInput-socket-and-StandardOutput-i.patch
+Patch58:        0001-unit-don-t-recheck-conditions-when-a-unit-is-already.patch
+Patch59:        0001-units-fix-rescue.service-race-with-plymouth.patch
+Patch60:        0001-coverity-fix-a-couple-of-bugs-found-by-coverity.patch
+Patch61:        0001-condition-fix-reversed-tests-if-path-does-not-exist-.patch
+Patch62:        0001-manager-fix-job-mode-for-SIGRTMIN-1-2.patch
+Patch63:        0001-llvm-analyze-fix-some-bugs-found-by-llvm-analyze.patch
+# May be risky. See what it caused in F16 in bz741078.
+#Patch64:        0001-unit-fix-complementing-of-requirement-deps-with-Afte.patch
+Patch65:        0001-service-fix-up-std-output-error-before-we-add-depend.patch
 Patch100:       fedora-storage-detect-encrypted-PVs.patch
 
 # For sysvinit tools
@@ -155,6 +191,40 @@ SysV compatibility tools for systemd
 %patch29 -p1
 %patch30 -p1
 %patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+#% patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p1
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+%patch56 -p1
+%patch57 -p1
+%patch58 -p1
+%patch59 -p1
+%patch60 -p1
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+#% patch64 -p1
+%patch65 -p1
 %patch100 -p1
 
 %build
@@ -358,6 +428,16 @@ fi
 %{_bindir}/systemd-sysv-convert
 
 %changelog
+* Sun Sep 25 2011 Michal Schmidt <mschmidt at redhat.com> - 26-10
+- Pick lots of fixes from upstream up to v36.
+- A few features added too:
+  - support more types of virtual serial consoles in getty-generator
+  - log control via RT signals
+  - support for LANGUAGE in environment
+  - show fsck progress on the console
+- Fixes: BZ#735013, BZ#722803, BZ#736360, BZ#698198, BZ#710487
+- Fixes: fdo39957, fdo39818, fdo40510
+
 * Tue Aug 23 2011 Lennart Poettering <lpoetter at redhat.com> - 26-9
 - Fix a couple of bugs (#723892, #726976)
 


More information about the scm-commits mailing list