Dr. Werner Fink 2014-02-28 17:10:52 +00:00 committed by Git OBS Bridge
parent 00c99ce8e8
commit 1168adcbed
94 changed files with 1326 additions and 5075 deletions

View File

@ -1,35 +0,0 @@
From a0551d26ab5c6e0d5089b42a6319baef0e28ad92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 14 Oct 2013 19:15:24 -0400
Subject: [PATCH] Fix bad assert in show_pid_array
This function should get the same treatment as other qsort uses
did in 7ff7394 "Never call qsort on potentially NULL arrays".
Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
---
src/shared/cgroup-show.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: systemd-208/src/shared/cgroup-show.c
===================================================================
--- systemd-208.orig/src/shared/cgroup-show.c
+++ systemd-208/src/shared/cgroup-show.c
@@ -44,8 +44,6 @@ static void show_pid_array(int pids[], u
unsigned i, m, pid_width;
pid_t biggest = 0;
- assert(n_pids > 0);
-
/* Filter duplicates */
m = 0;
for (i = 0; i < n_pids; i++) {
@@ -65,7 +63,7 @@ static void show_pid_array(int pids[], u
pid_width = DECIMAL_STR_WIDTH(biggest);
/* And sort */
- qsort(pids, n_pids, sizeof(pid_t), compare);
+ qsort_safe(pids, n_pids, sizeof(pid_t), compare);
if(flags & OUTPUT_FULL_WIDTH)
n_columns = 0;

View File

@ -1,385 +0,0 @@
From 7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:13 -0400
Subject: [PATCH] Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.
---
src/analyze/systemd-analyze.c | 2 +-
src/cgtop/cgtop.c | 2 +-
src/core/namespace.c | 38 ++++++++++++++++++++------------------
src/journal/catalog.c | 2 +-
src/journal/journal-file.c | 2 +-
src/journal/journal-vacuum.c | 3 +--
src/journal/journalctl.c | 2 +-
src/libsystemd-bus/bus-match.c | 2 +-
src/libudev/libudev-enumerate.c | 2 +-
src/nss-myhostname/netlink.c | 3 ++-
src/readahead/readahead-collect.c | 39 ++++++++++++++++++++++-----------------
src/shared/cgroup-show.c | 2 ++
src/shared/conf-files.c | 2 +-
src/shared/efivars.c | 3 +--
src/shared/fileio.c | 1 +
src/shared/util.h | 12 ++++++++++++
src/systemctl/systemctl.c | 10 +++++-----
17 files changed, 74 insertions(+), 53 deletions(-)
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index 27d063c..a4f15eb 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -768,7 +768,7 @@ static int list_dependencies_one(DBusConnection *bus, const char *name, unsigned
if (r < 0)
return r;
- qsort(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
+ qsort_safe(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
r = acquire_boot_times(bus, &boot);
if (r < 0)
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index cacf705..293a211 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -461,7 +461,7 @@ static int display(Hashmap *a) {
if (g->n_tasks_valid || g->cpu_valid || g->memory_valid || g->io_valid)
array[n++] = g;
- qsort(array, n, sizeof(Group*), group_compare);
+ qsort_safe(array, n, sizeof(Group*), group_compare);
/* Find the longest names in one run */
for (j = 0; j < n; j++) {
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 16b132b..936f368 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -222,7 +222,7 @@ int setup_namespace(char** read_write_dirs,
strv_length(read_only_dirs) +
strv_length(inaccessible_dirs) +
(private_tmp ? 2 : 0);
- BindMount *m, *mounts;
+ BindMount *m, *mounts = NULL;
int r = 0;
if (!mount_flags)
@@ -231,27 +231,29 @@ int setup_namespace(char** read_write_dirs,
if (unshare(CLONE_NEWNS) < 0)
return -errno;
- m = mounts = (BindMount *) alloca(n * sizeof(BindMount));
- if ((r = append_mounts(&m, read_write_dirs, READWRITE)) < 0 ||
- (r = append_mounts(&m, read_only_dirs, READONLY)) < 0 ||
- (r = append_mounts(&m, inaccessible_dirs, INACCESSIBLE)) < 0)
- return r;
+ if (n) {
+ m = mounts = (BindMount *) alloca(n * sizeof(BindMount));
+ if ((r = append_mounts(&m, read_write_dirs, READWRITE)) < 0 ||
+ (r = append_mounts(&m, read_only_dirs, READONLY)) < 0 ||
+ (r = append_mounts(&m, inaccessible_dirs, INACCESSIBLE)) < 0)
+ return r;
+
+ if (private_tmp) {
+ m->path = "/tmp";
+ m->mode = PRIVATE_TMP;
+ m++;
+
+ m->path = "/var/tmp";
+ m->mode = PRIVATE_VAR_TMP;
+ m++;
+ }
- if (private_tmp) {
- m->path = "/tmp";
- m->mode = PRIVATE_TMP;
- m++;
+ assert(mounts + n == m);
- m->path = "/var/tmp";
- m->mode = PRIVATE_VAR_TMP;
- m++;
+ qsort(mounts, n, sizeof(BindMount), mount_path_compare);
+ drop_duplicates(mounts, &n);
}
- assert(mounts + n == m);
-
- qsort(mounts, n, sizeof(BindMount), mount_path_compare);
- drop_duplicates(mounts, &n);
-
/* Remount / as SLAVE so that nothing now mounted in the namespace
shows up in the parent */
if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0)
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
index 7738d24..90ca008 100644
--- a/src/journal/catalog.c
+++ b/src/journal/catalog.c
@@ -399,7 +399,7 @@ int catalog_update(const char* database, const char* root, const char* const* di
}
assert(n == hashmap_size(h));
- qsort(items, n, sizeof(CatalogItem), catalog_compare_func);
+ qsort_safe(items, n, sizeof(CatalogItem), catalog_compare_func);
r = write_catalog(database, h, sb, items, n);
if (r < 0)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 78b937b..901e71b 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1344,7 +1344,7 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st
/* Order by the position on disk, in order to improve seek
* times for rotating media. */
- qsort(items, n_iovec, sizeof(EntryItem), entry_item_cmp);
+ qsort_safe(items, n_iovec, sizeof(EntryItem), entry_item_cmp);
r = journal_file_append_entry_internal(f, ts, xor_hash, items, n_iovec, seqnum, ret, offset);
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index 8d5effb..d4a1c6c 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -299,8 +299,7 @@ int journal_directory_vacuum(
n_list ++;
}
- if (n_list > 0)
- qsort(list, n_list, sizeof(struct vacuum_info), vacuum_compare);
+ qsort_safe(list, n_list, sizeof(struct vacuum_info), vacuum_compare);
for (i = 0; i < n_list; i++) {
struct statvfs ss;
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 2f8be1b..275458c 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -761,7 +761,7 @@ static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative
sd_journal_flush_matches(j);
}
- qsort(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
+ qsort_safe(all_ids, count, sizeof(boot_id_t), boot_id_cmp);
if (sd_id128_equal(*boot_id, SD_ID128_NULL)) {
if (relative > (int) count || relative <= -(int)count)
diff --git a/src/libsystemd-bus/bus-match.c b/src/libsystemd-bus/bus-match.c
index 1411167..916682a 100644
--- a/src/libsystemd-bus/bus-match.c
+++ b/src/libsystemd-bus/bus-match.c
@@ -768,7 +768,7 @@ int bus_match_parse(
}
/* Order the whole thing, so that we always generate the same tree */
- qsort(components, n_components, sizeof(struct bus_match_component), match_component_compare);
+ qsort_safe(components, n_components, sizeof(struct bus_match_component), match_component_compare);
/* Check for duplicates */
for (i = 0; i+1 < n_components; i++)
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index 8146f27..e71d766 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -276,7 +276,7 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume
size_t move_later_prefix = 0;
udev_list_cleanup(&udev_enumerate->devices_list);
- qsort(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp);
+ qsort_safe(udev_enumerate->devices, udev_enumerate->devices_cur, sizeof(struct syspath), syspath_cmp);
max = udev_enumerate->devices_cur;
for (i = 0; i < max; i++) {
diff --git a/src/nss-myhostname/netlink.c b/src/nss-myhostname/netlink.c
index b1ef912..47a41f5 100644
--- a/src/nss-myhostname/netlink.c
+++ b/src/nss-myhostname/netlink.c
@@ -197,7 +197,8 @@ finish:
return r;
}
- qsort(list, n_list, sizeof(struct address), address_compare);
+ if (n_list)
+ qsort(list, n_list, sizeof(struct address), address_compare);
*_list = list;
*_n_list = n_list;
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index 32888ad..6b74866 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -536,8 +536,7 @@ done:
HASHMAP_FOREACH_KEY(q, p, files, i)
pack_file(pack, p, on_btrfs);
} else {
- struct item *ordered, *j;
- unsigned k, n;
+ unsigned n;
/* On rotating media, order things by the block
* numbers */
@@ -545,25 +544,31 @@ done:
log_debug("Ordering...");
n = hashmap_size(files);
- if (!(ordered = new(struct item, n))) {
- r = log_oom();
- goto finish;
- }
-
- j = ordered;
- HASHMAP_FOREACH_KEY(q, p, files, i) {
- memcpy(j, q, sizeof(struct item));
- j++;
- }
+ if (n) {
+ _cleanup_free_ struct item *ordered;
+ struct item *j;
+ unsigned k;
+
+ ordered = new(struct item, n);
+ if (!ordered) {
+ r = log_oom();
+ goto finish;
+ }
- assert(ordered + n == j);
+ j = ordered;
+ HASHMAP_FOREACH_KEY(q, p, files, i) {
+ memcpy(j, q, sizeof(struct item));
+ j++;
+ }
- qsort(ordered, n, sizeof(struct item), qsort_compare);
+ assert(ordered + n == j);
- for (k = 0; k < n; k++)
- pack_file(pack, ordered[k].path, on_btrfs);
+ qsort(ordered, n, sizeof(struct item), qsort_compare);
- free(ordered);
+ for (k = 0; k < n; k++)
+ pack_file(pack, ordered[k].path, on_btrfs);
+ } else
+ log_warning("No pack files");
}
log_debug("Finalizing...");
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index e971f36..cc44ab4 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -44,6 +44,8 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
unsigned i, m, pid_width;
pid_t biggest = 0;
+ assert(n_pids > 0);
+
/* Filter duplicates */
m = 0;
for (i = 0; i < n_pids; i++) {
diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c
index 6d99739..ed4070c 100644
--- a/src/shared/conf-files.c
+++ b/src/shared/conf-files.c
@@ -127,7 +127,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const
return -ENOMEM;
}
- qsort(files, hashmap_size(fh), sizeof(char *), base_cmp);
+ qsort_safe(files, hashmap_size(fh), sizeof(char *), base_cmp);
*strv = files;
hashmap_free(fh);
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index c015b16..f3eb6a6 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -384,8 +384,7 @@ int efi_get_boot_options(uint16_t **options) {
list[count ++] = id;
}
- if (list)
- qsort(list, count, sizeof(uint16_t), cmp_uint16);
+ qsort_safe(list, count, sizeof(uint16_t), cmp_uint16);
*options = list;
return count;
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index 603a1c7..733b320 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -662,6 +662,7 @@ int get_status_field(const char *filename, const char *pattern, char **field) {
int r;
assert(filename);
+ assert(pattern);
assert(field);
r = read_full_file(filename, &status, NULL);
diff --git a/src/shared/util.h b/src/shared/util.h
index 26af5b3..09e556d 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -772,3 +772,15 @@ bool id128_is_valid(const char *s) _pure_;
void parse_user_at_host(char *arg, char **user, char **host);
int split_pair(const char *s, const char *sep, char **l, char **r);
+
+/**
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+static inline void qsort_safe(void *base, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *)) {
+ if (nmemb) {
+ assert(base);
+ qsort(base, nmemb, size, compar);
+ }
+}
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d75281f..036828b 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -471,7 +471,7 @@ static int list_units(DBusConnection *bus, char **args) {
if (r < 0)
return r;
- qsort(unit_infos, c, sizeof(struct unit_info), compare_unit_info);
+ qsort_safe(unit_infos, c, sizeof(struct unit_info), compare_unit_info);
output_units_list(unit_infos, c);
@@ -733,8 +733,8 @@ static int list_sockets(DBusConnection *bus, char **args) {
listen = triggered = NULL; /* avoid cleanup */
}
- qsort(socket_infos, cs, sizeof(struct socket_info),
- (__compar_fn_t) socket_info_compare);
+ qsort_safe(socket_infos, cs, sizeof(struct socket_info),
+ (__compar_fn_t) socket_info_compare);
output_sockets_list(socket_infos, cs);
@@ -1108,7 +1108,7 @@ static int list_dependencies_one(DBusConnection *bus, const char *name, int leve
if (r < 0)
return r;
- qsort(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
+ qsort_safe(deps, strv_length(deps), sizeof (char*), list_dependencies_compare);
STRV_FOREACH(c, deps) {
if (strv_contains(u, *c)) {
@@ -3532,7 +3532,7 @@ static int show_all(const char* verb,
if (r < 0)
return r;
- qsort(unit_infos, c, sizeof(struct unit_info), compare_unit_info);
+ qsort_safe(unit_infos, c, sizeof(struct unit_info), compare_unit_info);
for (u = unit_infos; u < unit_infos + c; u++) {
_cleanup_free_ char *p = NULL;
--
1.8.4

View File

@ -10,7 +10,7 @@
ACTION=="remove", GOTO="systemd_end"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd"
@ -108,16 +108,3 @@
return cached_on_tty;
}
--- systemd-208/src/getty-generator/getty-generator.c
+++ systemd-208/src/getty-generator/getty-generator.c 2014-02-05 10:41:29.502245927 +0000
@@ -149,9 +149,9 @@ int main(int argc, char *argv[]) {
* only for non-VC terminals. */
k = add_serial_getty(tty);
+ free(tty);
if (k < 0) {
- free(tty);
free(active);
r = EXIT_FAILURE;
goto finish;

View File

@ -1,25 +0,0 @@
From 7e326fb5b2c1a839bbe7f879c7efa2af2ed33420 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Wed, 2 Oct 2013 13:39:49 +0200
Subject: [PATCH 01/15] acpi-fptd: fix memory leak in acpi_get_boot_usec
---
src/shared/acpi-fpdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
index b094f34..a7c83ed 100644
--- a/src/shared/acpi-fpdt.c
+++ b/src/shared/acpi-fpdt.c
@@ -81,7 +81,7 @@ struct acpi_fpdt_boot {
};
int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
- char *buf;
+ _cleanup_free_ char *buf;
struct acpi_table_header *tbl;
size_t l;
struct acpi_fpdt_header *rec;
--
1.8.4

View File

@ -5,65 +5,57 @@ use the system halt as gfallback if poweroff fails for both the direct poweroff
systemctl command as well as for the systemd-shutdown utility.
---
Makefile.am | 2
Makefile.in | 7
src/core/shutdown.c | 8 -
src/shared/hdflush.c | 365 ++++++++++++++++++++++++++++++++++++++++++++++
src/shared/hdflush.h | 25 +++
Makefile.am | 11 +
src/core/hdflush.c | 365 ++++++++++++++++++++++++++++++++++++++++++++++
src/core/hdflush.h | 25 +++
src/core/shutdown.c | 12 +
src/systemctl/systemctl.c | 25 ++-
6 files changed, 424 insertions(+), 8 deletions(-)
5 files changed, 429 insertions(+), 9 deletions(-)
--- systemd-208/Makefile.am
+++ systemd-208/Makefile.am 2014-01-28 11:06:56.000000000 +0000
@@ -680,6 +680,8 @@ libsystemd_shared_la_SOURCES = \
src/shared/strbuf.h \
src/shared/strxcpyx.c \
src/shared/strxcpyx.h \
+ src/shared/hdflush.c \
+ src/shared/hdflush.h \
src/shared/conf-parser.c \
src/shared/conf-parser.h \
src/shared/log.c \
--- systemd-208/Makefile.in
+++ systemd-208/Makefile.in 2014-01-28 11:06:34.000000000 +0000
@@ -1509,7 +1509,7 @@ am_libsystemd_shared_la_OBJECTS = src/sh
src/shared/hashmap.lo src/shared/set.lo src/shared/fdset.lo \
src/shared/prioq.lo src/shared/sleep-config.lo \
src/shared/strv.lo src/shared/env-util.lo src/shared/strbuf.lo \
- src/shared/strxcpyx.lo src/shared/conf-parser.lo \
+ src/shared/strxcpyx.lo src/shared/hdflush.lo src/shared/conf-parser.lo \
src/shared/log.lo src/shared/ratelimit.lo \
src/shared/exit-status.lo src/shared/utf8.lo \
src/shared/pager.lo src/shared/socket-util.lo \
@@ -4137,6 +4137,8 @@ libsystemd_shared_la_SOURCES = \
src/shared/strbuf.h \
src/shared/strxcpyx.c \
src/shared/strxcpyx.h \
+ src/shared/hdflush.c \
+ src/shared/hdflush.h \
src/shared/conf-parser.c \
src/shared/conf-parser.h \
src/shared/log.c \
@@ -7073,6 +7075,8 @@ src/shared/strbuf.lo: src/shared/$(am__d
src/shared/$(DEPDIR)/$(am__dirstamp)
src/shared/strxcpyx.lo: src/shared/$(am__dirstamp) \
src/shared/$(DEPDIR)/$(am__dirstamp)
+src/shared/hdflush.lo: src/shared/$(am__dirstamp) \
+ src/shared/$(DEPDIR)/$(am__dirstamp)
src/shared/conf-parser.lo: src/shared/$(am__dirstamp) \
src/shared/$(DEPDIR)/$(am__dirstamp)
src/shared/log.lo: src/shared/$(am__dirstamp) \
@@ -9236,6 +9240,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/strbuf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/strv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/strxcpyx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/hdflush.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/time-dst.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/time-util.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/shared/$(DEPDIR)/unit-name.Plo@am__quote@
--- systemd-208/src/shared/hdflush.c
+++ systemd-208/src/shared/hdflush.c 2014-01-28 10:58:56.000000000 +0000
@@ -0,0 +1,365 @@
--- systemd-209/Makefile.am
+++ systemd-209/Makefile.am 2014-01-28 11:06:56.000000000 +0000
@@ -1004,7 +1004,9 @@ libsystemd_core_la_SOURCES = \
src/core/audit-fd.c \
src/core/audit-fd.h \
src/core/async.c \
- src/core/async.h
+ src/core/async.h \
+ src/core/hdflush.c \
+ src/core/hdflush.h
if HAVE_KMOD
libsystemd_core_la_SOURCES += \
@@ -1522,6 +1524,8 @@ systemd_shutdown_SOURCES = \
src/core/shutdown.c \
src/core/mount-setup.c \
src/core/mount-setup.h \
+ src/core/hdflush.c \
+ src/core/hdflush.h \
src/core/killall.h \
src/core/killall.c
@@ -1818,7 +1822,9 @@ systemd_cgroups_agent_LDADD = \
# ------------------------------------------------------------------------------
systemctl_SOURCES = \
- src/systemctl/systemctl.c
+ src/systemctl/systemctl.c \
+ src/core/hdflush.c \
+ src/core/hdflush.h
systemctl_LDADD = \
libsystemd-units.la \
@@ -1826,6 +1832,7 @@ systemctl_LDADD = \
libsystemd-internal.la \
libsystemd-logs.la \
libsystemd-journal-internal.la \
+ libudev-internal.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
--- systemd-209/src/core/hdflush.c
+++ systemd-209/src/core/hdflush.c 2014-01-28 10:58:56.000000000 +0000
@@ -0,0 +1,367 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
@ -111,6 +103,8 @@ systemctl command as well as for the systemd-shutdown utility.
+# include <byteswap.h>
+#endif
+
+#include "hdflush.h"
+
+/* Used in flush_cache_ext(), compare with <linux/hdreg.h> */
+#define IDBYTES 512
+#define MASK_EXT 0xE000 /* Bit 15 shall be zero, bit 14 shall be one, bit 13 flush cache ext */
@ -429,8 +423,8 @@ systemctl command as well as for the systemd-shutdown utility.
+ close_sysfs(sysfs);
+}
+#endif
--- systemd-208/src/shared/hdflush.h
+++ systemd-208/src/shared/hdflush.h 2014-01-28 11:00:08.000000000 +0000
--- systemd-209/src/core/hdflush.h
+++ systemd-209/src/core/hdflush.h 2014-01-28 11:00:08.000000000 +0000
@@ -0,0 +1,25 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@ -457,8 +451,8 @@ systemctl command as well as for the systemd-shutdown utility.
+
+void hdflush(void);
+void hddown(void);
--- systemd-208/src/core/shutdown.c
+++ systemd-208/src/core/shutdown.c 2014-01-28 11:14:16.000000000 +0000
--- systemd-209/src/core/shutdown.c
+++ systemd-209/src/core/shutdown.c 2014-02-28 11:17:22.000000000 +0000
@@ -40,6 +40,7 @@
#include "missing.h"
#include "log.h"
@ -467,7 +461,17 @@ systemctl command as well as for the systemd-shutdown utility.
#include "umount.h"
#include "util.h"
#include "mkdir.h"
@@ -302,8 +303,13 @@ int main(int argc, char *argv[]) {
@@ -225,7 +226,8 @@ int main(int argc, char *argv[]) {
_cleanup_free_ char *cgroup = NULL;
char *arguments[3];
unsigned retries;
- int cmd, r;
+ unsigned cmd;
+ int r;
log_parse_environment();
r = parse_argv(argc, argv);
@@ -388,8 +390,13 @@ int main(int argc, char *argv[]) {
* on reboot(), but the file systems need to be synce'd
* explicitly in advance. So let's do this here, but not
* needlessly slow down containers. */
@ -480,11 +484,30 @@ systemctl command as well as for the systemd-shutdown utility.
+ hdflush();
+ }
if (cmd == LINUX_REBOOT_CMD_KEXEC) {
switch (cmd) {
--- systemd-208/src/systemctl/systemctl.c
+++ systemd-208/src/systemctl/systemctl.c 2014-02-20 11:53:11.350234762 +0000
@@ -87,6 +87,7 @@ static bool arg_no_pager = false;
@@ -449,6 +456,10 @@ int main(int argc, char *argv[]) {
}
reboot(cmd);
+
+ if (cmd == RB_POWER_OFF)
+ reboot(RB_HALT_SYSTEM);
+
if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked
* CAP_SYS_BOOT just exit, this will kill our
--- systemd-209/src/systemctl/systemctl.c
+++ systemd-209/src/systemctl/systemctl.c 2014-02-28 11:19:35.000000000 +0000
@@ -67,6 +67,7 @@
#include "logs-show.h"
#include "socket-util.h"
#include "fileio.h"
+#include "hdflush.h"
#include "env-util.h"
#include "bus-util.h"
#include "bus-message.h"
@@ -93,6 +94,7 @@ static bool arg_no_pager = false;
static bool arg_no_wtmp = false;
static bool arg_no_wall = false;
static bool arg_no_reload = false;
@ -492,15 +515,15 @@ systemctl command as well as for the systemd-shutdown utility.
static bool arg_show_types = false;
static bool arg_ignore_inhibitors = false;
static bool arg_dry = false;
@@ -5272,6 +5273,7 @@ static int halt_parse_argv(int argc, cha
@@ -5566,6 +5568,7 @@ static int halt_parse_argv(int argc, cha
{ "reboot", no_argument, NULL, ARG_REBOOT },
{ "force", no_argument, NULL, 'f' },
{ "wtmp-only", no_argument, NULL, 'w' },
+ { "no-sync", no_argument, NULL, 'n' },
{ "no-wtmp", no_argument, NULL, 'd' },
{ "no-wall", no_argument, NULL, ARG_NO_WALL },
{ NULL, 0, NULL, 0 }
@@ -5324,10 +5326,13 @@ static int halt_parse_argv(int argc, cha
{}
@@ -5617,10 +5620,13 @@ static int halt_parse_argv(int argc, cha
case 'i':
case 'h':
@ -515,7 +538,7 @@ systemctl command as well as for the systemd-shutdown utility.
case '?':
return -EINVAL;
@@ -5979,16 +5984,24 @@ static int halt_now(enum action a) {
@@ -6266,16 +6272,24 @@ static int halt_now(enum action a) {
* point on... */
reboot(RB_ENABLE_CAD);
@ -544,4 +567,4 @@ systemctl command as well as for the systemd-shutdown utility.
+ reboot(RB_HALT_SYSTEM);
return -errno;
case ACTION_REBOOT:
case ACTION_REBOOT: {

View File

@ -7,13 +7,13 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
Makefile.am | 2
src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++
src/core/mount-iface.h | 25 +++++++
src/core/mount.c | 34 ++++++++-
src/core/mount.c | 34 +++++++++
src/shared/util.c | 1
5 files changed, 232 insertions(+), 3 deletions(-)
5 files changed, 233 insertions(+), 2 deletions(-)
--- systemd-208/Makefile.am
+++ systemd-208/Makefile.am 2014-02-26 13:44:19.816148628 +0100
@@ -959,6 +959,8 @@ libsystemd_core_la_SOURCES = \
--- systemd-209/Makefile.am
+++ systemd-209/Makefile.am 2014-02-26 12:44:20.000000000 +0000
@@ -987,6 +987,8 @@ libsystemd_core_la_SOURCES = \
src/core/machine-id-setup.h \
src/core/mount-setup.c \
src/core/mount-setup.h \
@ -22,8 +22,8 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
src/core/loopback-setup.h \
src/core/loopback-setup.c \
src/core/condition.c \
--- systemd-208/src/core/mount-iface.c
+++ systemd-208/src/core/mount-iface.c 2014-02-26 11:18:36.350742718 +0100
--- systemd-209/src/core/mount-iface.c
+++ systemd-209/src/core/mount-iface.c 2014-02-26 10:18:36.000000000 +0000
@@ -0,0 +1,173 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@ -198,8 +198,8 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
+ freeifaddrs(ifa_list);
+ ifa_list = NULL;
+}
--- systemd-208/src/core/mount-iface.h
+++ systemd-208/src/core/mount-iface.h 2014-02-26 11:08:19.797906189 +0100
--- systemd-209/src/core/mount-iface.h
+++ systemd-209/src/core/mount-iface.h 2014-02-26 10:08:20.000000000 +0000
@@ -0,0 +1,25 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
@ -226,8 +226,8 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
+
+char *host2iface(const char *ip);
+void freeroutes(void);
--- systemd-208/src/core/mount.c
+++ systemd-208/src/core/mount.c 2014-02-26 12:20:00.883799034 +0100
--- systemd-209/src/core/mount.c
+++ systemd-209/src/core/mount.c 2014-02-28 13:01:00.000000000 +0000
@@ -36,6 +36,7 @@
#include "mkdir.h"
#include "path-util.h"
@ -236,16 +236,18 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
#include "unit-name.h"
#include "dbus-mount.h"
#include "special.h"
@@ -1420,7 +1421,7 @@ static int mount_add_one(
bool set_flags) {
int r;
Unit *u;
@@ -1388,8 +1389,9 @@ static int mount_add_one(
_cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL;
bool load_extras = false;
MountParameters *p;
- bool delete;
+ bool delete, isnetwork;
char *e, *w = NULL, *o = NULL, *f = NULL;
MountParameters *p;
bool load_extras = false;
@@ -1447,10 +1448,11 @@ static int mount_add_one(
Unit *u;
+ char *c;
int r;
assert(m);
@@ -1414,6 +1416,8 @@ static int mount_add_one(
if (!e)
return -ENOMEM;
@ -253,19 +255,25 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
+
u = manager_get_unit(m, e);
if (!u) {
- const char* const target =
- fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
+ const char* const target = isnetwork ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
delete = true;
@@ -1442,7 +1446,7 @@ static int mount_add_one(
if (m->running_as == SYSTEMD_SYSTEM) {
const char* target;
@@ -1544,6 +1546,31 @@ static int mount_add_one(
- target = fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
+ target = isnetwork ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
if (r < 0)
@@ -1511,6 +1515,32 @@ static int mount_add_one(
goto fail;
}
+ if (isnetwork && (e = strrchr(p->what, ':')) && *(e+1) == '/' && (e = strdup(p->options))) {
+ char *addr = strstr(e, ",addr=");
+ if (addr) {
+ if (isnetwork && (c = strrchr(p->what, ':')) && *(c+1) == '/') {
+ _cleanup_free_ char *opt = strdup(p->options);
+ char *addr;
+
+ if (opt && (addr = strstr(opt, ",addr="))) {
+ char *colon, *iface;
+
+ addr += 6;
@ -274,7 +282,7 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
+
+ iface = host2iface(addr);
+ if (iface) {
+ char* target;
+ _cleanup_free_ char* target = NULL;
+ if (asprintf(&target, "sys-subsystem-net-devices-%s.device", iface) < 0)
+ log_oom();
+ else {
@ -285,13 +293,12 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
+ }
+ }
+ }
+ free(e);
+ }
+
unit_add_to_dbus_queue(u);
return 0;
@@ -1611,6 +1638,7 @@ static int mount_load_proc_self_mountinf
@@ -1574,6 +1604,7 @@ static int mount_load_proc_self_mountinf
if (k < 0)
r = k;
}
@ -299,9 +306,9 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
return r;
}
--- systemd-208/src/shared/util.c
+++ systemd-208/src/shared/util.c 2014-02-24 16:17:41.682298917 +0100
@@ -1593,6 +1593,7 @@ bool fstype_is_network(const char *fstyp
--- systemd-209/src/shared/util.c
+++ systemd-209/src/shared/util.c 2014-02-24 15:17:42.000000000 +0000
@@ -1502,6 +1502,7 @@ bool fstype_is_network(const char *fstyp
"ncp\0"
"nfs\0"
"nfs4\0"

View File

@ -1,90 +0,0 @@
From 95168f7d55181475946ad93db30255c4d709df03 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Fri, 01 Nov 2013 21:57:47 +0000
Subject: analyze: plot: place the text on the side with most space
Set the width of the svg to always fit the longest string
while taking its starting position into consideration.
Place the text on the right while the starting point is
in the first half of the screen. After that we put it on
the left to save the svg from being wider that it has to.
---
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 6bfe13d..8730723 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -509,7 +509,7 @@ static int analyze_plot(sd_bus *bus) {
m++;
for (u = times; u < times + n; u++) {
- double len;
+ double text_start, text_width;
if (u->ixt < boot->userspace_time ||
u->ixt > boot->finish_time) {
@@ -517,10 +517,14 @@ static int analyze_plot(sd_bus *bus) {
u->name = NULL;
continue;
}
- len = ((boot->firmware_time + u->ixt) * SCALE_X)
- + (10.0 * strlen(u->name));
- if (len > width)
- width = len;
+
+ /* If the text cannot fit on the left side then
+ * increase the svg width so it fits on the right.
+ * TODO: calculate the text width more accurately */
+ text_width = 8.0 * strlen(u->name);
+ text_start = (boot->firmware_time + u->ixt) * SCALE_X;
+ if (text_width > text_start && text_width + text_start > width)
+ width = text_width + text_start;
if (u->iet > u->ixt && u->iet <= boot->finish_time
&& u->aet == 0 && u->axt == 0)
@@ -608,7 +612,7 @@ static int analyze_plot(sd_bus *bus) {
svg_bar("active", boot->userspace_time, boot->finish_time, y);
svg_bar("generators", boot->generators_start_time, boot->generators_finish_time, y);
svg_bar("unitsload", boot->unitsload_start_time, boot->unitsload_finish_time, y);
- svg_text("left", boot->userspace_time, y, "systemd");
+ svg_text(true, boot->userspace_time, y, "systemd");
y++;
for (u = times; u < times + n; u++) {
@@ -622,7 +626,8 @@ static int analyze_plot(sd_bus *bus) {
svg_bar("active", u->aet, u->axt, y);
svg_bar("deactivating", u->axt, u->iet, y);
- b = u->ixt * SCALE_X > width * 2 / 3;
+ /* place the text on the left if we have passed the half of the svg width */
+ b = u->ixt * SCALE_X < width / 2;
if (u->time)
svg_text(b, u->ixt, y, "%s (%s)",
u->name, format_timespan(ts, sizeof(ts), u->time, USEC_PER_MSEC));
@@ -634,19 +639,19 @@ static int analyze_plot(sd_bus *bus) {
/* Legend */
y++;
svg_bar("activating", 0, 300000, y);
- svg_text("right", 400000, y, "Activating");
+ svg_text(true, 400000, y, "Activating");
y++;
svg_bar("active", 0, 300000, y);
- svg_text("right", 400000, y, "Active");
+ svg_text(true, 400000, y, "Active");
y++;
svg_bar("deactivating", 0, 300000, y);
- svg_text("right", 400000, y, "Deactivating");
+ svg_text(true, 400000, y, "Deactivating");
y++;
svg_bar("generators", 0, 300000, y);
- svg_text("right", 400000, y, "Generators");
+ svg_text(true, 400000, y, "Generators");
y++;
svg_bar("unitsload", 0, 300000, y);
- svg_text("right", 400000, y, "Loading unit files");
+ svg_text(true, 400000, y, "Loading unit files");
y++;
svg("</g>\n\n");
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,32 +0,0 @@
From 418e37506e6a419a808a82081ca1616caa03a206 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Mon, 21 Oct 2013 19:29:23 +0000
Subject: analyze: set white backgound
In programs like eog and gimp the transparant background did not
look very good.
https://bugs.freedesktop.org/show_bug.cgi?id=70720
---
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index 26769d6..0cc4de7 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -507,6 +507,7 @@ static int analyze_plot(DBusConnection *bus) {
/* style sheet */
svg("<defs>\n <style type=\"text/css\">\n <![CDATA[\n"
" rect { stroke-width: 1; stroke-opacity: 0; }\n"
+ " rect.background { fill: rgb(255,255,255); }\n"
" rect.activating { fill: rgb(255,0,0); fill-opacity: 0.7; }\n"
" rect.active { fill: rgb(200,150,150); fill-opacity: 0.7; }\n"
" rect.deactivating { fill: rgb(150,100,100); fill-opacity: 0.7; }\n"
@@ -528,6 +529,7 @@ static int analyze_plot(DBusConnection *bus) {
" text.sec { font-size: 10px; }\n"
" ]]>\n </style>\n</defs>\n\n");
+ svg("<rect class=\"background\" width=\"100%%\" height=\"100%%\" />\n");
svg("<text x=\"20\" y=\"50\">%s</text>", pretty_times);
svg("<text x=\"20\" y=\"30\">%s %s (%s %s) %s</text>",
isempty(osname) ? "Linux" : osname,
--
cgit v0.9.0.2-2-gbebe

View File

@ -0,0 +1,15 @@
--- systemd-209/src/login/logind-session.c
+++ systemd-209/src/login/logind-session.c 2014-02-28 12:12:14.762736079 +0000
@@ -525,6 +525,12 @@ int session_start(Session *s) {
if (r < 0)
return r;
+ if (!s->user->slice) {
+ if (errno)
+ return -errno;
+ return -ESTALE;
+ }
+
/* Create cgroup */
r = session_start_scope(s);
if (r < 0)

View File

@ -1,225 +0,0 @@
From 6fa7e1a944a2dbb89e794ad0f9da5d0fda5dc4a9 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 29 Jan 2014 13:38:55 +0100
Subject: [PATCH 1/3] core: introduce new KillMode=mixed which sends SIGTERM
only to the main process, but SIGKILL to all daemon processes
This should fix some race with terminating systemd --user, where the
system systemd instance might race against the user systemd instance
when sending SIGTERM.
---
man/systemd.kill.xml | 77 +++++++++++++++++++++++++++++++++-----------------
src/core/kill.c | 1 +
src/core/kill.h | 1 +
src/core/unit.c | 3 +-
units/user@.service.in | 1 +
5 files changed, 56 insertions(+), 27 deletions(-)
diff --git a/man/systemd.kill.xml b/man/systemd.kill.xml
index 1b10fba..a4009aa 100644
--- a/man/systemd.kill.xml
+++ b/man/systemd.kill.xml
@@ -44,39 +44,44 @@
<refnamediv>
<refname>systemd.kill</refname>
- <refpurpose>Kill environment configuration</refpurpose>
+ <refpurpose>Process killing procedure
+ configuration</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename><replaceable>service</replaceable>.service</filename>,
<filename><replaceable>socket</replaceable>.socket</filename>,
<filename><replaceable>mount</replaceable>.mount</filename>,
- <filename><replaceable>swap</replaceable>.swap</filename></para>
+ <filename><replaceable>swap</replaceable>.swap</filename>,
+ <filename><replaceable>scope</replaceable>.scope</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>Unit configuration files for services, sockets,
- mount points and swap devices share a subset of
- configuration options which define the process killing
- parameters of spawned processes.</para>
+ mount points, swap devices and scopes share a subset
+ of configuration options which define the
+ killing procedure of processes belonging to the unit.</para>
<para>This man page lists the configuration options
- shared by these four unit types. See
+ shared by these five unit types. See
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for the common options of all unit configuration
- files, and
+ for the common options shared by all unit
+ configuration files, and
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- and
+ <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for more information on the specific unit
- configuration files. The execution specific
+ and
+ <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for more information on the configuration file options
+ specific to each unit type.</para>
+
+ <para>The kill procedure
configuration options are configured in the [Service],
- [Socket], [Mount], or [Swap] section, depending on the unit
- type.</para>
+ [Socket], [Mount] or [Swap] section, depending on the
+ unit type.</para>
</refsect1>
<refsect1>
@@ -87,32 +92,40 @@
<varlistentry>
<term><varname>KillMode=</varname></term>
<listitem><para>Specifies how
- processes of this service shall be
+ processes of this unit shall be
killed. One of
<option>control-group</option>,
<option>process</option>,
+ <option>mixed</option>,
<option>none</option>.</para>
<para>If set to
<option>control-group</option>, all
remaining processes in the control
- group of this unit will be terminated
- on unit stop (for services: after the
+ group of this unit will be killed on
+ unit stop (for services: after the
stop command is executed, as
configured with
<varname>ExecStop=</varname>). If set
to <option>process</option>, only the
main process itself is killed. If set
- to <option>none</option>, no process is
+ to <option>mixed</option> the
+ <constant>SIGTERM</constant> signal
+ (see below) is sent to the main
+ process while the subsequent
+ <constant>SIGKILL</constant> signal
+ (see below) is sent to all remaining
+ processes of the unit's control
+ group. If set to
+ <option>none</option>, no process is
killed. In this case only the stop
- command will be executed on unit
- stop, but no process be killed
+ command will be executed on unit stop,
+ but no process be killed
otherwise. Processes remaining alive
after stop are left in their control
group and the control group continues
to exist after stop unless it is
- empty. Defaults to
- <option>control-group</option>.</para>
+ empty.</para>
<para>Processes will first be
terminated via
@@ -133,14 +146,24 @@
option). See
<citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>
for more
- information.</para></listitem>
+ information.</para>
+
+ <para>Defaults to
+ <option>control-group</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>KillSignal=</varname></term>
<listitem><para>Specifies which signal
- to use when killing a
- service. Defaults to <constant>SIGTERM</constant>.
+ to use when killing a service. This
+ controls the signal that is sent as
+ first step of shutting down a unit
+ (see above), and is usually followed
+ by <constant>SIGKILL</constant> (see
+ above and below). For a list of valid
+ signals, see
+ <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Defaults
+ to <constant>SIGTERM</constant>.
</para></listitem>
</varlistentry>
@@ -184,7 +207,9 @@
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/src/core/kill.c b/src/core/kill.c
index ea947c2..4271346 100644
--- a/src/core/kill.c
+++ b/src/core/kill.c
@@ -52,6 +52,7 @@ void kill_context_dump(KillContext *c, FILE *f, const char *prefix) {
static const char* const kill_mode_table[_KILL_MODE_MAX] = {
[KILL_CONTROL_GROUP] = "control-group",
[KILL_PROCESS] = "process",
+ [KILL_MIXED] = "mixed",
[KILL_NONE] = "none"
};
diff --git a/src/core/kill.h b/src/core/kill.h
index 41773f0..d5f125f 100644
--- a/src/core/kill.h
+++ b/src/core/kill.h
@@ -32,6 +32,7 @@ typedef enum KillMode {
/* The kill mode is a property of a unit. */
KILL_CONTROL_GROUP = 0,
KILL_PROCESS,
+ KILL_MIXED,
KILL_NONE,
_KILL_MODE_MAX,
_KILL_MODE_INVALID = -1
diff --git a/src/core/unit.c b/src/core/unit.c
index 4b97710..0b10e57 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3007,7 +3007,7 @@ int unit_kill_context(
}
}
- if (c->kill_mode == KILL_CONTROL_GROUP && u->cgroup_path) {
+ if ((c->kill_mode == KILL_CONTROL_GROUP || (c->kill_mode == KILL_MIXED && sigkill)) && u->cgroup_path) {
_cleanup_set_free_ Set *pid_set = NULL;
/* Exclude the main/control pids from being killed via the cgroup */
@@ -3021,6 +3021,7 @@ int unit_kill_context(
log_warning_unit(u->id, "Failed to kill control group: %s", strerror(-r));
} else if (r > 0) {
wait_for_exit = true;
+
if (c->send_sighup) {
set_free(pid_set);
diff --git a/units/user@.service.in b/units/user@.service.in
index 3718a57..3bb8696 100644
--- a/units/user@.service.in
+++ b/units/user@.service.in
@@ -17,3 +17,4 @@ Environment=SHELL=%s
ExecStart=-@rootlibexecdir@/systemd --user
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
Slice=user-%i.slice
+KillMode=mixed
--
1.8.4

View File

@ -1,329 +0,0 @@
From d420282b28f50720e233ccb1c02547c562195653 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 26 Nov 2013 01:39:53 +0100
Subject: [PATCH] core: replace OnFailureIsolate= setting by a more generic
OnFailureJobMode= setting and make use of it where applicable
---
man/systemd.unit.xml | 40 +++++++++++++++++++++++++----------
src/core/dbus-unit.c | 3 ++-
src/core/job.h | 3 +--
src/core/load-fragment-gperf.gperf.m4 | 3 ++-
src/core/load-fragment.c | 31 +++++++++++++++++++++++++++
src/core/load-fragment.h | 2 ++
src/core/unit.c | 11 +++++-----
src/core/unit.h | 4 ++--
units/initrd-cleanup.service.in | 1 +
units/initrd-fs.target | 2 +-
units/initrd-parse-etc.service.in | 1 +
units/initrd-root-fs.target | 2 +-
units/initrd-switch-root.service.in | 1 +
units/initrd.target | 2 +-
units/local-fs.target | 2 +-
15 files changed, 82 insertions(+), 26 deletions(-)
Index: systemd-208/man/systemd.unit.xml
===================================================================
--- systemd-208.orig/man/systemd.unit.xml
+++ systemd-208/man/systemd.unit.xml
@@ -669,19 +669,37 @@
</varlistentry>
<varlistentry>
- <term><varname>OnFailureIsolate=</varname></term>
+ <term><varname>OnFailureJobMode=</varname></term>
- <listitem><para>Takes a boolean
- argument. If <option>true</option>, the
- unit listed in
+ <listitem><para>Takes a value of
+ <literal>fail</literal>,
+ <literal>replace</literal>,
+ <literal>replace-irreversibly</literal>
+ or
+ <literal>isolate</literal>. Defaults
+ to
+ <literal>replace</literal>. Specifies
+ how the units listed in
<varname>OnFailure=</varname> will be
- enqueued in isolation mode, i.e. all
- units that are not its dependency will
- be stopped. If this is set, only a
+ enqueued. If set to
+ <literal>fail</literal> and
+ contradicting jobs are already queued,
+ cause the activation to fail. If set
+ to <literal>replace</literal> and
+ contradicting jobs area already
+ queued, replace
+ those. <literal>replace-irreversibly</literal>
+ is similar to
+ <literal>replace</literal>, however,
+ creates jobs that cannot be reversed
+ unless they finished or are explicitly
+ canceled. <literal>isolate</literal>
+ may be used to terminate all other
+ units but the specified one. If
+ this is set to
+ <literal>isolate</literal>, only a
single unit may be listed in
- <varname>OnFailure=</varname>. Defaults
- to
- <option>false</option>.</para></listitem>
+ <varname>OnFailure=</varname>..</para></listitem>
</varlistentry>
<varlistentry>
Index: systemd-208/src/core/dbus-unit.c
===================================================================
--- systemd-208.orig/src/core/dbus-unit.c
+++ systemd-208/src/core/dbus-unit.c
@@ -133,6 +133,7 @@ static int bus_unit_append_description(D
}
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_unit_append_load_state, unit_load_state, UnitLoadState);
+static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_unit_append_job_mode, job_mode, JobMode);
static int bus_unit_append_active_state(DBusMessageIter *i, const char *property, void *data) {
Unit *u = data;
@@ -1079,7 +1080,7 @@ const BusProperty bus_unit_properties[]
{ "RefuseManualStop", bus_property_append_bool, "b", offsetof(Unit, refuse_manual_stop) },
{ "AllowIsolate", bus_property_append_bool, "b", offsetof(Unit, allow_isolate) },
{ "DefaultDependencies", bus_property_append_bool, "b", offsetof(Unit, default_dependencies) },
- { "OnFailureIsolate", bus_property_append_bool, "b", offsetof(Unit, on_failure_isolate) },
+ { "OnFailureJobMode", bus_unit_append_job_mode, "s", offsetof(Unit, on_failure_job_mode) },
{ "IgnoreOnIsolate", bus_property_append_bool, "b", offsetof(Unit, ignore_on_isolate) },
{ "IgnoreOnSnapshot", bus_property_append_bool, "b", offsetof(Unit, ignore_on_snapshot) },
{ "NeedDaemonReload", bus_unit_append_need_daemon_reload, "b", 0 },
Index: systemd-208/src/core/job.h
===================================================================
--- systemd-208.orig/src/core/job.h
+++ systemd-208/src/core/job.h
@@ -83,7 +83,7 @@ enum JobState {
enum JobMode {
JOB_FAIL, /* Fail if a conflicting job is already queued */
JOB_REPLACE, /* Replace an existing conflicting job */
- JOB_REPLACE_IRREVERSIBLY, /* Like JOB_REPLACE + produce irreversible jobs */
+ JOB_REPLACE_IRREVERSIBLY,/* Like JOB_REPLACE + produce irreversible jobs */
JOB_ISOLATE, /* Start a unit, and stop all others */
JOB_IGNORE_DEPENDENCIES, /* Ignore both requirement and ordering dependencies */
JOB_IGNORE_REQUIREMENTS, /* Ignore requirement dependencies */
Index: systemd-208/src/core/load-fragment-gperf.gperf.m4
===================================================================
--- systemd-208.orig/src/core/load-fragment-gperf.gperf.m4
+++ systemd-208/src/core/load-fragment-gperf.gperf.m4
@@ -122,7 +122,8 @@ Unit.RefuseManualStart, config_
Unit.RefuseManualStop, config_parse_bool, 0, offsetof(Unit, refuse_manual_stop)
Unit.AllowIsolate, config_parse_bool, 0, offsetof(Unit, allow_isolate)
Unit.DefaultDependencies, config_parse_bool, 0, offsetof(Unit, default_dependencies)
-Unit.OnFailureIsolate, config_parse_bool, 0, offsetof(Unit, on_failure_isolate)
+Unit.OnFailureJobMode, config_parse_job_mode, 0, offsetof(Unit, on_failure_job_mode)
+Unit.OnFailureIsolate, config_parse_job_mode_isolate, 0, offsetof(Unit, on_failure_job_mode)
Unit.IgnoreOnIsolate, config_parse_bool, 0, offsetof(Unit, ignore_on_isolate)
Unit.IgnoreOnSnapshot, config_parse_bool, 0, offsetof(Unit, ignore_on_snapshot)
Unit.JobTimeoutSec, config_parse_sec, 0, offsetof(Unit, job_timeout)
Index: systemd-208/src/core/load-fragment.c
===================================================================
--- systemd-208.orig/src/core/load-fragment.c
+++ systemd-208/src/core/load-fragment.c
@@ -2314,6 +2314,36 @@ int config_parse_blockio_bandwidth(
return 0;
}
+DEFINE_CONFIG_PARSE_ENUM(config_parse_job_mode, job_mode, JobMode, "Failed to parse job mode");
+
+int config_parse_job_mode_isolate(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
+ JobMode *m = data;
+ int r;
+
+ assert(filename);
+ assert(lvalue);
+ assert(rvalue);
+
+ r = parse_boolean(rvalue);
+ if (r < 0) {
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse boolean, ignoring: %s", rvalue);
+ return 0;
+ }
+
+ *m = r ? JOB_ISOLATE : JOB_REPLACE;
+ return 0;
+}
+
#define FOLLOW_MAX 8
static int open_follow(char **filename, FILE **_f, Set *names, char **_final) {
Index: systemd-208/src/core/load-fragment.h
===================================================================
--- systemd-208.orig/src/core/load-fragment.h
+++ systemd-208/src/core/load-fragment.h
@@ -83,6 +83,8 @@ int config_parse_device_allow(const char
int config_parse_blockio_weight(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_blockio_device_weight(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_blockio_bandwidth(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_job_mode(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_job_mode_isolate(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
/* gperf prototypes */
const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
Index: systemd-208/src/core/unit.c
===================================================================
--- systemd-208.orig/src/core/unit.c
+++ systemd-208/src/core/unit.c
@@ -85,6 +85,7 @@ Unit *unit_new(Manager *m, size_t size)
u->deserialized_job = _JOB_TYPE_INVALID;
u->default_dependencies = true;
u->unit_file_state = _UNIT_FILE_STATE_INVALID;
+ u->on_failure_job_mode = JOB_REPLACE;
return u;
}
@@ -807,14 +808,14 @@ void unit_dump(Unit *u, FILE *f, const c
"%s\tRefuseManualStart: %s\n"
"%s\tRefuseManualStop: %s\n"
"%s\tDefaultDependencies: %s\n"
- "%s\tOnFailureIsolate: %s\n"
+ "%s\tOnFailureJobMode: %s\n"
"%s\tIgnoreOnIsolate: %s\n"
"%s\tIgnoreOnSnapshot: %s\n",
prefix, yes_no(u->stop_when_unneeded),
prefix, yes_no(u->refuse_manual_start),
prefix, yes_no(u->refuse_manual_stop),
prefix, yes_no(u->default_dependencies),
- prefix, yes_no(u->on_failure_isolate),
+ prefix, job_mode_to_string(u->on_failure_job_mode),
prefix, yes_no(u->ignore_on_isolate),
prefix, yes_no(u->ignore_on_snapshot));
@@ -985,11 +986,11 @@ int unit_load(Unit *u) {
if (r < 0)
goto fail;
- if (u->on_failure_isolate &&
+ if (u->on_failure_job_mode == JOB_ISOLATE &&
set_size(u->dependencies[UNIT_ON_FAILURE]) > 1) {
log_error_unit(u->id,
- "More than one OnFailure= dependencies specified for %s but OnFailureIsolate= enabled. Refusing.", u->id);
+ "More than one OnFailure= dependencies specified for %s but OnFailureJobMode=isolate set. Refusing.", u->id);
r = -EINVAL;
goto fail;
@@ -1394,7 +1395,7 @@ void unit_start_on_failure(Unit *u) {
SET_FOREACH(other, u->dependencies[UNIT_ON_FAILURE], i) {
int r;
- r = manager_add_job(u->manager, JOB_START, other, u->on_failure_isolate ? JOB_ISOLATE : JOB_REPLACE, true, NULL, NULL);
+ r = manager_add_job(u->manager, JOB_START, other, u->on_failure_job_mode, true, NULL, NULL);
if (r < 0)
log_error_unit(u->id, "Failed to enqueue OnFailure= job: %s", strerror(-r));
}
Index: systemd-208/src/core/unit.h
===================================================================
--- systemd-208.orig/src/core/unit.h
+++ systemd-208/src/core/unit.h
@@ -228,8 +228,8 @@ struct Unit {
/* Allow isolation requests */
bool allow_isolate;
- /* Isolate OnFailure unit */
- bool on_failure_isolate;
+ /* How to start OnFailure units */
+ JobMode on_failure_job_mode;
/* Ignore this unit when isolating */
bool ignore_on_isolate;
Index: systemd-208/units/initrd-cleanup.service.in
===================================================================
--- systemd-208.orig/units/initrd-cleanup.service.in
+++ systemd-208/units/initrd-cleanup.service.in
@@ -10,6 +10,7 @@ Description=Cleaning Up and Shutting Dow
DefaultDependencies=no
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.target
+OnFailureJobMode=replace-irreversibly
After=initrd-root-fs.target initrd-fs.target initrd.target
[Service]
Index: systemd-208/units/initrd-fs.target
===================================================================
--- systemd-208.orig/units/initrd-fs.target
+++ systemd-208/units/initrd-fs.target
@@ -9,7 +9,7 @@
Description=Initrd File Systems
Documentation=man:systemd.special(7)
OnFailure=emergency.target
-OnFailureIsolate=yes
+OnFailureJobMode=replace-irreversibly
ConditionPathExists=/etc/initrd-release
After=initrd-parse-etc.service
DefaultDependencies=no
Index: systemd-208/units/initrd-parse-etc.service.in
===================================================================
--- systemd-208.orig/units/initrd-parse-etc.service.in
+++ systemd-208/units/initrd-parse-etc.service.in
@@ -11,6 +11,7 @@ DefaultDependencies=no
Requires=initrd-root-fs.target
After=initrd-root-fs.target
OnFailure=emergency.target
+OnFailureJobMode=replace-irreversibly
ConditionPathExists=/etc/initrd-release
[Service]
Index: systemd-208/units/initrd-root-fs.target
===================================================================
--- systemd-208.orig/units/initrd-root-fs.target
+++ systemd-208/units/initrd-root-fs.target
@@ -10,6 +10,6 @@ Description=Initrd Root File System
Documentation=man:systemd.special(7)
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.target
-OnFailureIsolate=yes
+OnFailureJobMode=replace-irreversibly
DefaultDependencies=no
Conflicts=shutdown.target
Index: systemd-208/units/initrd-switch-root.service.in
===================================================================
--- systemd-208.orig/units/initrd-switch-root.service.in
+++ systemd-208/units/initrd-switch-root.service.in
@@ -10,6 +10,7 @@ Description=Switch Root
DefaultDependencies=no
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.target
+OnFailureJobMode=replace-irreversibly
AllowIsolate=yes
[Service]
Index: systemd-208/units/initrd.target
===================================================================
--- systemd-208.orig/units/initrd.target
+++ systemd-208/units/initrd.target
@@ -9,7 +9,7 @@
Description=Initrd Default Target
Documentation=man:systemd.special(7)
OnFailure=emergency.target
-OnFailureIsolate=yes
+OnFailureJobMode=replace-irreversibly
ConditionPathExists=/etc/initrd-release
Requires=basic.target
Wants=initrd-root-fs.target initrd-fs.target initrd-parse-etc.service
Index: systemd-208/units/local-fs.target
===================================================================
--- systemd-208.orig/units/local-fs.target
+++ systemd-208/units/local-fs.target
@@ -12,4 +12,4 @@ After=local-fs-pre.target
DefaultDependencies=no
Conflicts=shutdown.target
OnFailure=emergency.target
-OnFailureIsolate=no
+OnFailureJobMode=replace-irreversibly

View File

@ -1,40 +0,0 @@
From 8d1a28020409ee4afea6ef8c1c4d3522a209284e Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Oct 2013 00:13:55 +0200
Subject: [PATCH] core: unify the way we denote serialization attributes
---
src/core/service.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/service.c b/src/core/service.c
index 98b1599..96ed2d3 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2652,7 +2652,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
if (s->forbid_restart)
- unit_serialize_item(u, f, "forbid_restart", yes_no(s->forbid_restart));
+ unit_serialize_item(u, f, "forbid-restart", yes_no(s->forbid_restart));
return 0;
}
@@ -2790,12 +2790,12 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
return log_oom();
s->exec_context.var_tmp_dir = t;
- } else if (streq(key, "forbid_restart")) {
+ } else if (streq(key, "forbid-restart")) {
int b;
b = parse_boolean(value);
if (b < 0)
- log_debug_unit(u->id, "Failed to parse forbid_restart value %s", value);
+ log_debug_unit(u->id, "Failed to parse forbid-restart value %s", value);
else
s->forbid_restart = b;
} else
--
1.8.4

View File

@ -1,71 +0,0 @@
From 74dcc2df7b2a340c3e1fe9e61e5c8deb324c83d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:20 -0400
Subject: [PATCH] dbus-common: avoid leak in error path
src/shared/dbus-common.c:968:33: warning: Potential leak of memory pointed to by 'l'
return -EINVAL;
^~~~~~
---
src/shared/dbus-common.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
index c727cae..3ba2d87 100644
--- a/src/shared/dbus-common.c
+++ b/src/shared/dbus-common.c
@@ -934,7 +934,7 @@ int bus_parse_strv_iter(DBusMessageIter *iter, char ***_l) {
int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
DBusMessageIter sub, sub2;
unsigned n = 0, i = 0;
- char **l;
+ _cleanup_strv_free_ char **l = NULL;
assert(iter);
assert(_l);
@@ -953,6 +953,7 @@ int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
l = new(char*, n*2+1);
if (!l)
return -ENOMEM;
+ l[0] = NULL; /* make sure that l is properly terminated at all times */
dbus_message_iter_recurse(iter, &sub);
@@ -968,26 +969,25 @@ int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l) {
return -EINVAL;
l[i] = strdup(a);
- if (!l[i]) {
- strv_free(l);
+ if (!l[i])
return -ENOMEM;
- }
+ i++;
- l[++i] = strdup(b);
- if (!l[i]) {
- strv_free(l);
+ l[i] = strdup(b);
+ if (!l[i])
return -ENOMEM;
- }
-
i++;
+
dbus_message_iter_next(&sub);
}
assert(i == n*2);
l[i] = NULL;
- if (_l)
+ if (_l) {
*_l = l;
+ l = NULL; /* avoid freeing */
+ }
return 0;
}
--
1.8.4

View File

@ -1,33 +0,0 @@
From 6c7980093c4e39d07bf06484f96f489e236c7c29 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 10 Oct 2013 01:38:11 +0200
Subject: [PATCH] do not accept "garbage" from acpi firmware performance data
(FPDT)
00000000 46 42 50 54 38 00 00 00 02 00 30 02 00 00 00 00 |FBPT8.....0.....|
00000010 23 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |#E..............|
00000020 f5 6a 51 00 00 00 00 00 00 00 00 00 00 00 00 00 |.jQ.............|
00000030 00 00 00 00 00 00 00 00 70 74 61 6c 58 00 00 00 |........ptalX...|
---
src/shared/acpi-fpdt.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
index af58c7c..75648b4 100644
--- a/src/shared/acpi-fpdt.c
+++ b/src/shared/acpi-fpdt.c
@@ -146,6 +146,11 @@ int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
if (brec.type != ACPI_FPDT_BOOT_REC)
return -EINVAL;
+ if (brec.startup_start == 0 || brec.exit_services_exit < brec.startup_start)
+ return -EINVAL;
+ if (brec.exit_services_exit > NSEC_PER_HOUR)
+ return -EINVAL;
+
if (loader_start)
*loader_start = brec.startup_start / 1000;
if (loader_exit)
--
1.8.4

View File

@ -1,29 +0,0 @@
From 6891529fe1176c046ece579807ff48e3191692f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Oct 2013 19:33:36 -0400
Subject: [PATCH] drop-ins: check return value
If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.
---
src/core/unit.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/core/unit.c b/src/core/unit.c
index 4b97710..1db7d06 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2908,6 +2908,9 @@ int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name) {
return 0;
r = drop_in_file(u, mode, name, &p, &q);
+ if (r < 0)
+ return r;
+
if (unlink(q) < 0)
r = errno == ENOENT ? 0 : -errno;
else
--
1.8.4

View File

@ -1,40 +0,0 @@
From 9a5cb1371b6d8b0a04bd08665bcf9b06cb40c64c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 3 Oct 2013 22:13:01 -0400
Subject: [PATCH] gpt-auto-generator: exit immediately if in container
Otherwise we get an ugly warning when running systemd in
a container.
---
src/gpt-auto-generator/gpt-auto-generator.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index ca54925..d2b4213 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -38,6 +38,7 @@
#include "libudev.h"
#include "special.h"
#include "unit-name.h"
+#include "virt.h"
/* TODO:
*
@@ -481,6 +482,13 @@ int main(int argc, char *argv[]) {
umask(0022);
if (in_initrd()) {
+ log_debug("In initrd, exiting.");
+ r = 0;
+ goto finish;
+ }
+
+ if (detect_container(NULL) > 0) {
+ log_debug("In a container, exiting.");
r = 0;
goto finish;
}
--
1.8.4

View File

@ -1,25 +0,0 @@
From 2ee0591d12b9e725c4585502285fd91cde682d9b Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 9 Oct 2013 04:03:45 +0200
Subject: [PATCH] journald: fix minor memory leak
---
src/journal/journal-vacuum.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index c73ad8f..8d5effb 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -278,6 +278,8 @@ int journal_directory_vacuum(
} else if (errno != ENOENT)
log_warning("Failed to delete %s/%s: %m", directory, p);
+ free(p);
+
continue;
}
--
1.8.4

View File

@ -1,39 +0,0 @@
From 2b98f75a63e6022bf74a7d678c47faa5208c794f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 9 Oct 2013 22:13:13 -0400
Subject: [PATCH] journald: remove rotated file from hashmap when rotation
fails
Before, when the user journal file was rotated, journal_file_rotate
could close the old file and fail to open the new file. In that
case, we would leave the old (deallocated) file in the hashmap.
On subsequent accesses, we could retrieve this stale entry, leading
to a segfault.
When journal_file_rotate fails with the file pointer set to 0,
old file is certainly gone, and cannot be used anymore.
https://bugzilla.redhat.com/show_bug.cgi?id=890463
---
src/journal/journald-server.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 4f47eb1..e03e413 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -321,8 +321,10 @@ void server_rotate(Server *s) {
if (r < 0)
if (f)
log_error("Failed to rotate %s: %s", f->path, strerror(-r));
- else
+ else {
log_error("Failed to create user journal: %s", strerror(-r));
+ hashmap_remove(s->user_journals, k);
+ }
else {
hashmap_replace(s->user_journals, k, f);
server_fix_perms(s, f, PTR_TO_UINT32(k));
--
1.8.4

View File

@ -1,27 +0,0 @@
From 3f4fee033bf0f623de74f3e8a14c42b8ff81c36e Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 10 Oct 2013 13:09:37 +0200
Subject: [PATCH] login: fix invalid free() in sd_session_get_vt()
We need to clear variables markes as _cleanup_free_. Otherwise, our
error-paths might corrupt random memory.
---
src/login/sd-login.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index 71d8c29..6c27dfe 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -350,7 +350,7 @@ _public_ int sd_session_get_tty(const char *session, char **tty) {
}
_public_ int sd_session_get_vt(const char *session, unsigned *vtnr) {
- _cleanup_free_ char *vtnr_string;
+ _cleanup_free_ char *vtnr_string = NULL;
unsigned u;
int r;
--
1.8.4

View File

@ -1,27 +0,0 @@
From 0581dac2c146cef0f55841a4c136dc48409c8eaa Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 10 Oct 2013 13:11:27 +0200
Subject: [PATCH] login: make sd_session_get_vt() actually work
We use VTNR, not VTNr as key. Until now sd_session_get_vt() just returns
an error.
---
src/login/sd-login.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index 6c27dfe..7e25041 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -354,7 +354,7 @@ _public_ int sd_session_get_vt(const char *session, unsigned *vtnr) {
unsigned u;
int r;
- r = session_get_string(session, "VTNr", &vtnr_string);
+ r = session_get_string(session, "VTNR", &vtnr_string);
if (r < 0)
return r;
--
1.8.4

View File

@ -1,25 +0,0 @@
From 660ea9620f7b8f99d08a2770d4e81acfd8aea02e Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Oct 2013 21:16:40 +0200
Subject: [PATCH] logind: fix bus introspection data for TakeControl()
---
src/login/logind-session-dbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 5f6bafb..be4e01c 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -41,7 +41,7 @@
" <arg name=\"who\" type=\"s\"/>\n" \
" <arg name=\"signal\" type=\"s\"/>\n" \
" </method>\n" \
- " <method name=\"TakeControl\"/>\n" \
+ " <method name=\"TakeControl\">\n" \
" <arg name=\"force\" type=\"b\"/>\n" \
" </method>\n" \
" <method name=\"ReleaseControl\"/>\n" \
--
1.8.4

View File

@ -1,28 +0,0 @@
From 63966da86d8e71b1f3f2b57d5448770d526421f9 Mon Sep 17 00:00:00 2001
From: Thomas Bächler <thomas@archlinux.org>
Date: Sun, 15 Dec 2013 11:06:37 +0000
Subject: login: Don't stop a running user manager from garbage-collecting the user.
With the current logic, a user will never be garbage-collected, since its
manager will always be around. Change the logic such that a user is
garbage-collected when it has no sessions and linger is disabled.
---
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 6ba8d98..441e086 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -629,12 +629,6 @@ int user_check_gc(User *u, bool drop_not
if (u->slice_job || u->service_job)
return 1;
- if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0)
- return 1;
-
- if (u->service && manager_unit_is_active(u->manager, u->service) != 0)
- return 1;
-
return 0;
}
--
cgit v0.9.0.2-2-gbebe

View File

@ -0,0 +1,8 @@
--- systemd-209/units/kmod-static-nodes.service.in
+++ systemd-209/units/kmod-static-nodes.service.in 2014-02-27 15:04:30.378236539 +0000
@@ -15,4 +15,5 @@ ConditionPathExists=/lib/modules/%v/modu
[Service]
Type=oneshot
RemainAfterExit=yes
+ExecStartPre=@MKDIR_P@ /run/tmpfiles.d
ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf

View File

@ -0,0 +1,55 @@
--- systemd-209/src/libsystemd/sd-bus/sd-bus.c
+++ systemd-209/src/libsystemd/sd-bus/sd-bus.c 2014-02-28 11:08:21.354235373 +0000
@@ -2548,7 +2548,7 @@ static int bus_poll(sd_bus *bus, bool ne
n = 2;
}
- r = ppoll(p, n, m == (uint64_t) -1 ? NULL : timespec_store(&ts, m), NULL);
+ r = __ppoll_alias(p, n, m == (uint64_t) -1 ? NULL : timespec_store(&ts, m), NULL);
if (r < 0)
return -errno;
--- systemd-209/src/core/hostname-setup.c
+++ systemd-209/src/core/hostname-setup.c 2014-02-28 11:14:51.594832792 +0000
@@ -50,8 +50,8 @@ static int read_and_strip_hostname(const
}
/* strip any leftover of a domain name */
- if (domain = strchr(s, '.')) {
- *domain = NULL;
+ if ((domain = strchr(s, '.'))) {
+ *domain = '\0';
}
*hn = s;
--- systemd-209/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ systemd-209/src/tty-ask-password-agent/tty-ask-password-agent.c 2014-02-28 11:41:42.254735820 +0000
@@ -142,7 +142,7 @@ static int ask_password_plymouth(
goto finish;
}
- if ((j = poll(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
+ if ((j = __poll_alias(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
if (errno == EINTR)
continue;
@@ -595,7 +595,7 @@ static int watch_passwords(void) {
if ((r = show_passwords()) < 0)
log_error("Failed to show password: %s", strerror(-r));
- if (poll(pollfd, _FD_MAX, -1) < 0) {
+ if (__poll_alias(pollfd, _FD_MAX, -1) < 0) {
if (errno == EINTR)
continue;
--- systemd-209/src/shared/ask-password-api.c
+++ systemd-209/src/shared/ask-password-api.c 2014-02-28 11:47:21.754234675 +0000
@@ -138,7 +138,7 @@ int ask_password_tty(
goto finish;
}
- if ((k = poll(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
+ if ((k = __poll_alias(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
if (errno == EINTR)
continue;

View File

@ -0,0 +1,180 @@
--- systemd-209/Makefile.am
+++ systemd-209/Makefile.am 2014-02-28 10:24:53.634235909 +0000
@@ -1091,6 +1091,12 @@ systemd_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+systemd_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
dist_pkgsysconf_DATA += \
src/core/system.conf \
src/core/user.conf
@@ -1187,6 +1193,12 @@ test_engine_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_engine_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_job_type_SOURCES = \
src/test/test-job-type.c
@@ -1194,18 +1206,36 @@ test_job_type_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_job_type_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_ns_SOURCES = \
src/test/test-ns.c
test_ns_LDADD = \
libsystemd-core.la
+if HAVE_SECCOMP
+test_ns_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_loopback_SOURCES = \
src/test/test-loopback.c
test_loopback_LDADD = \
libsystemd-core.la
+if HAVE_SECCOMP
+test_loopback_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_hostname_SOURCES = \
src/test/test-hostname.c
@@ -1230,6 +1260,12 @@ test_unit_name_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_unit_name_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_unit_file_SOURCES = \
src/test/test-unit-file.c
@@ -1237,12 +1273,24 @@ test_unit_file_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_unit_file_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_utf8_SOURCES = \
src/test/test-utf8.c
test_utf8_LDADD = \
libsystemd-shared.la
+if HAVE_SECCOMP
+test_utf8_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_util_SOURCES = \
src/test/test-util.c
@@ -1255,6 +1303,12 @@ test_tmpfiles_SOURCES = \
test_tmpfiles_LDADD = \
libsystemd-shared.la
+if HAVE_SECCOMP
+test_tmpfiles_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_namespace_SOURCES = \
src/test/test-namespace.c
@@ -1289,6 +1343,12 @@ test_tables_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_tables_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_prioq_SOURCES = \
src/test/test-prioq.c
@@ -1374,6 +1434,12 @@ test_cgroup_mask_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_cgroup_mask_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_cgroup_util_SOURCES = \
src/test/test-cgroup-util.c
@@ -1388,12 +1454,24 @@ test_env_replace_SOURCES = \
test_env_replace_LDADD = \
libsystemd-shared.la
+if HAVE_SECCOMP
+test_env_replace_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_strbuf_SOURCES = \
src/test/test-strbuf.c
test_strbuf_LDADD = \
libsystemd-shared.la
+if HAVE_SECCOMP
+test_strbuf_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
test_strv_SOURCES = \
src/test/test-strv.c
@@ -1440,6 +1518,12 @@ test_sched_prio_LDADD = \
libsystemd-core.la \
$(RT_LIBS)
+if HAVE_SECCOMP
+test_sched_prio_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+endif
+
# ------------------------------------------------------------------------------
## .PHONY so it always rebuilds it
.PHONY: coverage lcov-run lcov-report coverage-sync

View File

@ -1,45 +0,0 @@
From a316932f5a627c1ef78f568fd5dfa579f12e76b2 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 4 Oct 2013 17:01:37 +0200
Subject: [PATCH] manager: when verifying whether clients may change
environment using selinux check for "reload" rather "reboot"
This appears to be a copy/paste error.
---
src/core/dbus-manager.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 676a07f..8f4d017 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1397,7 +1397,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
_cleanup_strv_free_ char **l = NULL;
char **e = NULL;
- SELINUX_ACCESS_CHECK(connection, message, "reboot");
+ SELINUX_ACCESS_CHECK(connection, message, "reload");
r = bus_parse_strv(message, &l);
if (r == -ENOMEM)
@@ -1424,7 +1424,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
_cleanup_strv_free_ char **l = NULL;
char **e = NULL;
- SELINUX_ACCESS_CHECK(connection, message, "reboot");
+ SELINUX_ACCESS_CHECK(connection, message, "reload");
r = bus_parse_strv(message, &l);
if (r == -ENOMEM)
@@ -1452,7 +1452,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
char **f = NULL;
DBusMessageIter iter;
- SELINUX_ACCESS_CHECK(connection, message, "reboot");
+ SELINUX_ACCESS_CHECK(connection, message, "reload");
if (!dbus_message_iter_init(message, &iter))
goto oom;
--
1.8.4

View File

@ -1,29 +0,0 @@
From 9c03872bc8fb2a381eafe7301ef9811b641686dd Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Fri, 4 Oct 2013 18:22:40 -0400
Subject: [PATCH] mount: check for NULL before reading pm->what
Since a57f7e2c828b85, a mount unit with garbage in it would cause
systemd to crash on loading it.
ref: https://bugs.freedesktop.org/show_bug.cgi?id=70148
---
src/core/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 93bfa99..db055f0 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -182,7 +182,7 @@ static int mount_add_mount_links(Mount *m) {
* for the source path (if this is a bind mount) to be
* available. */
pm = get_mount_parameters_fragment(m);
- if (pm && path_is_absolute(pm->what)) {
+ if (pm && pm->what && path_is_absolute(pm->what)) {
r = unit_require_mounts_for(UNIT(m), pm->what);
if (r < 0)
return r;
--
1.8.4

View File

@ -0,0 +1,41 @@
From: Werner Fink <werner@suse.de>
Date: Wed Feb 26 14:36:27 UTC 2014
Subject: Do not clobber XDG_RUNTIME_DIR if su command preserve environment
Make sure that even if a su command without option -l or with option -m
is used, the XDG_RUNTIME_DIR will not be clobbered by the new uid.
This belongs to BNC#852015 and also to BNC#855160
---
pam-module.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- systemd-209/src/login/pam-module.c
+++ systemd-209/src/login/pam-module.c 2014-02-26 14:31:30.158235525 +0000
@@ -447,6 +447,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess
r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path);
if (r != PAM_SUCCESS)
return r;
+ } else if (getenv("XDG_RUNTIME_DIR")) {
+ _cleanup_free_ char *p = NULL;
+
+ /* Make sure that after running YaST2 or the xdg-su scripts
+ * the runtime directory is not clobbered. Even a normal su
+ * command without -l or with -m may clobber. */
+
+ if ((r = asprintf(&p, "/run/user/%lu", (unsigned long)pw->pw_uid)) < 0)
+ return PAM_BUF_ERR;
+
+ r = pam_misc_setenv(handle, "XDG_RUNTIME_DIR", p, 0);
+ if (r != PAM_SUCCESS) {
+ pam_syslog(handle, LOG_ERR, "Failed to set runtime dir.");
+ return r;
+ }
+
+ r = export_legacy_dbus_address(handle, pw->pw_uid, p);
+ if (r != PAM_SUCCESS)
+ return r;
}
if (!isempty(seat)) {

View File

@ -1,28 +0,0 @@
From a8ccacf5344c4434b1d5ff3837307acb8fcf93d2 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 14 Oct 2013 08:15:51 +0200
Subject: [PATCH] shared/util: Fix glob_extend() argument
glob_extend() would completely fail to work, or return incorrect
data if it wasn't being passed the current getopt "optarg" variable
as it used the global variable, instead of the passed parameters.
---
src/shared/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 54dbace..1822770 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4461,7 +4461,7 @@ int glob_extend(char ***strv, const char *path) {
char **p;
errno = 0;
- k = glob(optarg, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
+ k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
if (k == GLOB_NOMATCH)
return -ENOENT;
--
1.8.4

View File

@ -1,50 +0,0 @@
From 1d5989fd803d2019de0f6aaaf3cfb1cb2bbc3cdb Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 6 Oct 2013 18:26:23 -0400
Subject: [PATCH] shared/util: fix off-by-one error in tag_to_udev_node
Triggered false negatives when encoding a string which needed every
character to be escaped, e.g. "LABEL=/".
---
src/shared/util.c | 2 +-
src/test/test-device-nodes.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 82f4221..31cea79 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3527,7 +3527,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
if (u == NULL)
return NULL;
- enc_len = strlen(u) * 4;
+ enc_len = strlen(u) * 4 + 1;
t = new(char, enc_len);
if (t == NULL)
return NULL;
diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c
index 2f3dedb..59ba4be 100644
--- a/src/test/test-device-nodes.c
+++ b/src/test/test-device-nodes.c
@@ -26,7 +26,7 @@
/* helpers for test_encode_devnode_name */
static char *do_encode_string(const char *in) {
- size_t out_len = strlen(in) * 4;
+ size_t out_len = strlen(in) * 4 + 1;
char *out = malloc(out_len);
assert_se(out);
@@ -46,6 +46,8 @@ static void test_encode_devnode_name(void) {
assert_se(expect_encoded_as("pinkiepie", "pinkiepie"));
assert_se(expect_encoded_as("valíd\\ųtf8", "valíd\\x5cųtf8"));
assert_se(expect_encoded_as("s/ash/ng", "s\\x2fash\\x2fng"));
+ assert_se(expect_encoded_as("/", "\\x2f"));
+ assert_se(expect_encoded_as("!", "\\x21"));
}
int main(int argc, char *argv[]) {
--
1.8.4

View File

@ -0,0 +1,42 @@
Process 1 (aka init) needs to be started with an empty signal mask. That
includes the process 1 that's started after the initrd is finished. When the
initrd is using systemd (as it does with dracut based initrds) then it is
systemd that calls the real init. Normally this is systemd again, except
when the user uses for instance "init=/bin/bash" on the kernel command line.
---
main.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- src/core/main.c
+++ src/core/main.c 2014-02-27 13:54:21.922236495 +0000
@@ -1780,6 +1780,7 @@ finish:
if (reexecute) {
const char **args;
unsigned i, args_size;
+ sigset_t ss, o_ss;
/* Close and disarm the watchdog, so that the new
* instance can reinitialize it, but doesn't get
@@ -1863,6 +1864,11 @@ finish:
args[i++] = NULL;
assert(i <= args_size);
+ /* reenable any blocked signals, especially important
+ * if we switch from initial ramdisk to init=... */
+ sigemptyset(&ss);
+ sigprocmask(SIG_SETMASK,&ss,&o_ss);
+
if (switch_root_init) {
args[0] = switch_root_init;
execv(args[0], (char* const*) args);
@@ -1881,6 +1887,9 @@ finish:
log_error("Failed to execute /bin/sh, giving up: %m");
} else
log_warning("Failed to execute /sbin/init, giving up: %m");
+
+ /* back to saved state if reexec failed */
+ sigprocmask(SIG_SETMASK,&o_ss,NULL);
}
if (arg_serialization) {

View File

@ -1,41 +0,0 @@
From 77009452cfd25208509b14ea985e81fdf9f7d40e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 3 Oct 2013 22:15:08 -0400
Subject: [PATCH] systemd: order remote mounts from mountinfo before
remote-fs.target
Usually the network is stopped before filesystems are umounted.
Ordering network filesystems before remote-fs.target means that their
unmounting will be performed earlier, and can terminate sucessfully.
https://bugs.freedesktop.org/show_bug.cgi?id=70002
---
src/core/mount.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 3d46557..93bfa99 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1440,6 +1440,9 @@ static int mount_add_one(
u = manager_get_unit(m, e);
if (!u) {
+ const char* const target =
+ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
+
delete = true;
u = unit_new(m, sizeof(Mount));
@@ -1466,7 +1469,7 @@ static int mount_add_one(
goto fail;
}
- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
+ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
if (r < 0)
goto fail;
--
1.8.4

View File

@ -1,51 +0,0 @@
From 6aca9a587d4ad40b1c044f99e3714022201b9fd4 Mon Sep 17 00:00:00 2001
From: Sylvia Else <sylviabz1@cryogenic.net>
Date: Sun, 6 Oct 2013 23:06:35 -0400
Subject: [PATCH] systemd: serialize/deserialize forbid_restart value
The Service type's forbid_restart field was not preserved by
serialization/deserialization, so the fact that the service should not
be restarted after stopping was lost.
If a systemctl stop foo command has been given, but the foo service
has not yet stopped, and then the systemctl --system daemon-reload was
given, then when the foo service eventually stopped, systemd would
restart it.
https://bugs.freedesktop.org/show_bug.cgi?id=69800
---
src/core/service.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/core/service.c b/src/core/service.c
index 6792024..98b1599 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2651,6 +2651,9 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
if (s->exec_context.var_tmp_dir)
unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
+ if (s->forbid_restart)
+ unit_serialize_item(u, f, "forbid_restart", yes_no(s->forbid_restart));
+
return 0;
}
@@ -2787,6 +2790,14 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
return log_oom();
s->exec_context.var_tmp_dir = t;
+ } else if (streq(key, "forbid_restart")) {
+ int b;
+
+ b = parse_boolean(value);
+ if (b < 0)
+ log_debug_unit(u->id, "Failed to parse forbid_restart value %s", value);
+ else
+ s->forbid_restart = b;
} else
log_debug_unit(u->id, "Unknown serialization key '%s'", key);
--
1.8.4

View File

@ -0,0 +1,27 @@
From 7143555ce8f94b002d06b9b058d7d90c3a4901a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 24 Feb 2014 08:02:28 -0500
Subject: [PATCH] units/serial-getty@.service: add [Install] section
This makes it easier to manually enable and disable
specific gettys, and also mirrors getty@.service.
http://lists.freedesktop.org/archives/systemd-devel/2014-February/017329.html
---
units/serial-getty@.service.m4 | 3 +++
1 file changed, 3 insertions(+)
diff --git units/serial-getty@.service.m4 units/serial-getty@.service.m4
index 0e612bb..e94cdb4 100644
--- systemd-209/units/serial-getty@.service.m4
+++ systemd-209/units/serial-getty@.service.m4
@@ -33,3 +33,6 @@ TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
+
+[Install]
+WantedBy=getty.target
--
1.7.9.2

View File

@ -1,85 +0,0 @@
--- systemd-208/src/core/shutdown.c
+++ systemd-208/src/core/shutdown.c 2014-01-27 11:31:38.486235816 +0000
@@ -329,6 +329,9 @@ int main(int argc, char *argv[]) {
reboot(cmd);
+ if (cmd == RB_POWER_OFF)
+ reboot(RB_HALT_SYSTEM);
+
if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked
* CAP_SYS_BOOT just exit, this will kill our
--- systemd-208/src/systemctl/systemctl.c
+++ systemd-208/src/systemctl/systemctl.c 2014-01-27 11:05:18.298236035 +0000
@@ -138,7 +138,7 @@ static bool arg_plain = false;
static bool private_bus = false;
static int daemon_reload(DBusConnection *bus, char **args);
-static void halt_now(enum action a);
+static int halt_now(enum action a);
static void pager_open_if_enabled(void) {
@@ -2227,7 +2227,7 @@ static int start_special(DBusConnection
(a == ACTION_HALT ||
a == ACTION_POWEROFF ||
a == ACTION_REBOOT))
- halt_now(a);
+ return halt_now(a);
if (arg_force >= 1 &&
(a == ACTION_HALT ||
@@ -5973,7 +5973,7 @@ done:
return 0;
}
-static _noreturn_ void halt_now(enum action a) {
+static int halt_now(enum action a) {
/* Make sure C-A-D is handled by the kernel from this
* point on... */
@@ -5984,23 +5984,22 @@ static _noreturn_ void halt_now(enum act
case ACTION_HALT:
log_info("Halting.");
reboot(RB_HALT_SYSTEM);
- break;
+ return -errno;
case ACTION_POWEROFF:
log_info("Powering off.");
reboot(RB_POWER_OFF);
- break;
+ return -errno;
case ACTION_REBOOT:
log_info("Rebooting.");
reboot(RB_AUTOBOOT);
- break;
+ return -errno;
default:
- assert_not_reached("Unknown halt action.");
+ assert_not_reached("Unknown action.");
+ return -ENOSYS;
}
-
- assert_not_reached("Uh? This shouldn't happen.");
}
static int halt_main(DBusConnection *bus) {
@@ -6069,9 +6068,10 @@ static int halt_main(DBusConnection *bus
if (arg_dry)
return 0;
- halt_now(arg_action);
- /* We should never reach this. */
- return -ENOSYS;
+ r = halt_now(arg_action);
+ log_error("Failed to reboot: %s", strerror(-r));
+
+ return r;
}
static int runlevel_main(void) {

View File

@ -1,55 +0,0 @@
From 6c8c92fef72cf6a7ef7109a424ef82dbdc4f6952 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 2 Oct 2013 07:46:24 -0400
Subject: [PATCH 02/15] fix lingering references to
/var/lib/{backlight,random-seed}
This should have been part of ef5bfcf668e6029faa78534dfe.
---
man/systemd-backlight@.service.xml | 2 +-
man/systemd-random-seed.service.xml | 2 +-
units/systemd-backlight@.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/systemd-backlight@.service.xml b/man/systemd-backlight@.service.xml
index 2b73625..4318964 100644
--- a/man/systemd-backlight@.service.xml
+++ b/man/systemd-backlight@.service.xml
@@ -58,7 +58,7 @@
is a service that restores the display backlight
brightness at early-boot and saves it at shutdown. On
disk, the backlight brightness is stored in
- <filename>/var/lib/backlight/</filename>. Note that by
+ <filename>/var/lib/systemd/backlight/</filename>. Note that by
default, only firmware backlight devices are
saved/restored.</para>
</refsect1>
diff --git a/man/systemd-random-seed.service.xml b/man/systemd-random-seed.service.xml
index 8cd14b7..e5cd037 100644
--- a/man/systemd-random-seed.service.xml
+++ b/man/systemd-random-seed.service.xml
@@ -61,7 +61,7 @@
for details. Saving/restoring the random seed across
boots increases the amount of available entropy early
at boot. On disk the random seed is stored in
- <filename>/var/lib/random-seed</filename>.</para>
+ <filename>/var/lib/systemd/random-seed</filename>.</para>
</refsect1>
<refsect1>
diff --git a/units/systemd-backlight@.service.in b/units/systemd-backlight@.service.in
index b0e75db..5caa5d5 100644
--- a/units/systemd-backlight@.service.in
+++ b/units/systemd-backlight@.service.in
@@ -9,7 +9,7 @@
Description=Load/Save Screen Backlight Brightness of %I
Documentation=man:systemd-backlight@.service(8)
DefaultDependencies=no
-RequiresMountsFor=/var/lib/backlight
+RequiresMountsFor=/var/lib/systemd/backlight
Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
Before=sysinit.target shutdown.target
--
1.8.4

View File

@ -1,62 +0,0 @@
From 95d57e7b631a2d78b9b5d841125194052895470f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 29 Jan 2014 13:49:54 +0100
Subject: [PATCH 2/3] service: allow KillMode=mixed in conjunction with
PAMName=
---
src/core/service.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/src/core/service.c b/src/core/service.c
index 6792024..e7f03e1 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1105,37 +1105,31 @@ static int service_verify(Service *s) {
return 0;
if (!s->exec_command[SERVICE_EXEC_START]) {
- log_error_unit(UNIT(s)->id,
- "%s lacks ExecStart setting. Refusing.", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id, "%s lacks ExecStart setting. Refusing.", UNIT(s)->id);
return -EINVAL;
}
if (s->type != SERVICE_ONESHOT &&
s->exec_command[SERVICE_EXEC_START]->command_next) {
- log_error_unit(UNIT(s)->id,
- "%s has more than one ExecStart setting, which is only allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id, "%s has more than one ExecStart setting, which is only allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
return -EINVAL;
}
if (s->type == SERVICE_ONESHOT && s->restart != SERVICE_RESTART_NO) {
- log_error_unit(UNIT(s)->id,
- "%s has Restart setting other than no, which isn't allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id, "%s has Restart setting other than no, which isn't allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
return -EINVAL;
}
if (s->type == SERVICE_DBUS && !s->bus_name) {
- log_error_unit(UNIT(s)->id,
- "%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id, "%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->id);
return -EINVAL;
}
if (s->bus_name && s->type != SERVICE_DBUS)
- log_warning_unit(UNIT(s)->id,
- "%s has a D-Bus service name specified, but is not of type dbus. Ignoring.", UNIT(s)->id);
+ log_warning_unit(UNIT(s)->id, "%s has a D-Bus service name specified, but is not of type dbus. Ignoring.", UNIT(s)->id);
- if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP) {
- log_error_unit(UNIT(s)->id,
- "%s has PAM enabled. Kill mode must be set to 'control-group'. Refusing.", UNIT(s)->id);
+ if (s->exec_context.pam_name && !(s->kill_context.kill_mode == KILL_CONTROL_GROUP || s->kill_context.kill_mode == KILL_MIXED)) {
+ log_error_unit(UNIT(s)->id, "%s has PAM enabled. Kill mode must be set to 'control-group' or 'mixed'. Refusing.", UNIT(s)->id);
return -EINVAL;
}
--
1.8.4

View File

@ -1,25 +0,0 @@
From 2c64a8d0caf84254e38f2e76528f2034d37da520 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 14:03:56 +0200
Subject: [PATCH 03/15] acpi: make sure we never free an uninitialized pointer
---
src/shared/acpi-fpdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
index a7c83ed..af58c7c 100644
--- a/src/shared/acpi-fpdt.c
+++ b/src/shared/acpi-fpdt.c
@@ -81,7 +81,7 @@ struct acpi_fpdt_boot {
};
int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
- _cleanup_free_ char *buf;
+ _cleanup_free_ char *buf = NULL;
struct acpi_table_header *tbl;
size_t l;
struct acpi_fpdt_header *rec;
--
1.8.4

View File

@ -1,128 +0,0 @@
From b2ffdc8da536cd88a305f97517f356e2c5383a52 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 29 Jan 2014 14:58:04 +0100
Subject: [PATCH 3/3] core: make sure to always go through both SIGTERM and
SIGKILL states of units
Given that we now have KillMode=mixed where SIGTERM might kill a smaller
set than SIGKILL we need to make sure to always go explicitly throught
the SIGKILL state to get the right end result.
---
src/core/mount.c | 8 +++++++-
src/core/scope.c | 4 +++-
src/core/service.c | 10 +++++++---
src/core/socket.c | 6 +++++-
src/core/swap.c | 6 +++++-
5 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 3d46557..e418d09 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -854,8 +854,14 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) {
goto fail;
mount_set_state(m, state);
- } else if (state == MOUNT_REMOUNTING_SIGTERM || state == MOUNT_REMOUNTING_SIGKILL)
+ } else if (state == MOUNT_REMOUNTING_SIGTERM)
+ mount_enter_signal(m, MOUNT_REMOUNTING_SIGKILL, MOUNT_SUCCESS);
+ else if (state == MOUNT_REMOUNTING_SIGKILL)
mount_enter_mounted(m, MOUNT_SUCCESS);
+ else if (state == MOUNT_MOUNTING_SIGTERM)
+ mount_enter_signal(m, MOUNT_MOUNTING_SIGKILL, MOUNT_SUCCESS);
+ else if (state == MOUNT_UNMOUNTING_SIGTERM)
+ mount_enter_signal(m, MOUNT_UNMOUNTING_SIGKILL, MOUNT_SUCCESS);
else
mount_enter_dead(m, MOUNT_SUCCESS);
diff --git a/src/core/scope.c b/src/core/scope.c
index 50e5dba..3a5c95e 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -221,7 +221,9 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) {
}
scope_set_state(s, state);
- } else
+ } else if (state == SCOPE_STOP_SIGTERM)
+ scope_enter_signal(s, SCOPE_STOP_SIGKILL, SCOPE_SUCCESS);
+ else
scope_enter_dead(s, SCOPE_SUCCESS);
return;
diff --git a/src/core/service.c b/src/core/service.c
index e7f03e1..4b481c2 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1964,10 +1964,9 @@ static void service_enter_stop_post(Service *s, ServiceResult f) {
if (r < 0)
goto fail;
-
service_set_state(s, SERVICE_STOP_POST);
} else
- service_enter_dead(s, SERVICE_SUCCESS, true);
+ service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_SUCCESS);
return;
@@ -1993,6 +1992,7 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
s->main_pid,
s->control_pid,
s->main_pid_alien);
+
if (r < 0)
goto fail;
@@ -2005,8 +2005,12 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
}
service_set_state(s, state);
- } else if (state == SERVICE_STOP_SIGTERM || state == SERVICE_STOP_SIGKILL)
+ } else if (state == SERVICE_STOP_SIGTERM)
+ service_enter_signal(s, SERVICE_STOP_SIGKILL, SERVICE_SUCCESS);
+ else if (state == SERVICE_STOP_SIGKILL)
service_enter_stop_post(s, SERVICE_SUCCESS);
+ else if (state == SERVICE_FINAL_SIGTERM)
+ service_enter_signal(s, SERVICE_FINAL_SIGKILL, SERVICE_SUCCESS);
else
service_enter_dead(s, SERVICE_SUCCESS, true);
diff --git a/src/core/socket.c b/src/core/socket.c
index 6c0ac1a..831876f 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1298,8 +1298,12 @@ static void socket_enter_signal(Socket *s, SocketState state, SocketResult f) {
goto fail;
socket_set_state(s, state);
- } else if (state == SOCKET_STOP_PRE_SIGTERM || state == SOCKET_STOP_PRE_SIGKILL)
+ } else if (state == SOCKET_STOP_PRE_SIGTERM)
+ socket_enter_signal(s, SOCKET_STOP_PRE_SIGKILL, SOCKET_SUCCESS);
+ else if (state == SOCKET_STOP_PRE_SIGKILL)
socket_enter_stop_post(s, SOCKET_SUCCESS);
+ else if (state == SOCKET_FINAL_SIGTERM)
+ socket_enter_signal(s, SOCKET_FINAL_SIGKILL, SOCKET_SUCCESS);
else
socket_enter_dead(s, SOCKET_SUCCESS);
diff --git a/src/core/swap.c b/src/core/swap.c
index a68ab7c..8886fe8 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -655,7 +655,11 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) {
goto fail;
swap_set_state(s, state);
- } else
+ } else if (state == SWAP_ACTIVATING_SIGTERM)
+ swap_enter_signal(s, SWAP_ACTIVATING_SIGKILL, SWAP_SUCCESS);
+ else if (state == SWAP_DEACTIVATING_SIGTERM)
+ swap_enter_signal(s, SWAP_DEACTIVATING_SIGKILL, SWAP_SUCCESS);
+ else
swap_enter_dead(s, SWAP_SUCCESS);
return;
--
1.8.4

View File

@ -1,134 +0,0 @@
From cbb13b2a538ece1c7ec3b210e2b36b47df2a13ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= <vpavlin@redhat.com>
Date: Wed, 2 Oct 2013 16:42:42 +0200
Subject: [PATCH 04/15] systemctl: fix name mangling for sysv units
---
src/systemctl/systemctl.c | 45 ++++++++++++++++++---------------------------
1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index bb7ada9..d75281f 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4218,11 +4218,10 @@ static int set_environment(DBusConnection *bus, char **args) {
return 0;
}
-static int enable_sysv_units(char **args) {
+static int enable_sysv_units(const char *verb, char **args) {
int r = 0;
#if defined(HAVE_SYSV_COMPAT) && defined(HAVE_CHKCONFIG)
- const char *verb = args[0];
unsigned f = 1, t = 1;
LookupPaths paths = {};
@@ -4242,7 +4241,7 @@ static int enable_sysv_units(char **args) {
return r;
r = 0;
- for (f = 1; args[f]; f++) {
+ for (f = 0; args[f]; f++) {
const char *name;
_cleanup_free_ char *p = NULL, *q = NULL;
bool found_native = false, found_sysv;
@@ -4365,7 +4364,7 @@ finish:
lookup_paths_free(&paths);
/* Drop all SysV units */
- for (f = 1, t = 1; args[f]; f++) {
+ for (f = 0, t = 0; args[f]; f++) {
if (isempty(args[f]))
continue;
@@ -4423,16 +4422,16 @@ static int enable_unit(DBusConnection *bus, char **args) {
dbus_error_init(&error);
- r = enable_sysv_units(args);
- if (r < 0)
- return r;
-
if (!args[1])
return 0;
r = mangle_names(args+1, &mangled_names);
if (r < 0)
- goto finish;
+ return r;
+
+ r = enable_sysv_units(verb, mangled_names);
+ if (r < 0)
+ return r;
if (!bus || avoid_bus()) {
if (streq(verb, "enable")) {
@@ -4624,11 +4623,15 @@ static int unit_is_enabled(DBusConnection *bus, char **args) {
_cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
bool enabled;
char **name;
- char *n;
+ _cleanup_strv_free_ char **mangled_names = NULL;
dbus_error_init(&error);
- r = enable_sysv_units(args);
+ r = mangle_names(args+1, &mangled_names);
+ if (r < 0)
+ return r;
+
+ r = enable_sysv_units(args[0], mangled_names);
if (r < 0)
return r;
@@ -4636,16 +4639,10 @@ static int unit_is_enabled(DBusConnection *bus, char **args) {
if (!bus || avoid_bus()) {
- STRV_FOREACH(name, args+1) {
+ STRV_FOREACH(name, mangled_names) {
UnitFileState state;
- n = unit_name_mangle(*name);
- if (!n)
- return log_oom();
-
- state = unit_file_get_state(arg_scope, arg_root, n);
-
- free(n);
+ state = unit_file_get_state(arg_scope, arg_root, *name);
if (state < 0)
return state;
@@ -4660,13 +4657,9 @@ static int unit_is_enabled(DBusConnection *bus, char **args) {
}
} else {
- STRV_FOREACH(name, args+1) {
+ STRV_FOREACH(name, mangled_names) {
const char *s;
- n = unit_name_mangle(*name);
- if (!n)
- return log_oom();
-
r = bus_method_call_with_reply (
bus,
"org.freedesktop.systemd1",
@@ -4675,11 +4668,9 @@ static int unit_is_enabled(DBusConnection *bus, char **args) {
"GetUnitFileState",
&reply,
NULL,
- DBUS_TYPE_STRING, &n,
+ DBUS_TYPE_STRING, name,
DBUS_TYPE_INVALID);
- free(n);
-
if (r)
return r;
--
1.8.4

View File

@ -1,48 +0,0 @@
From 4b93637fd7dddb0a1518f35171998b2c7cd5c5bd Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:36:28 +0200
Subject: [PATCH 05/15] cryptsetup: fix OOM handling when parsing mount options
---
src/cryptsetup/cryptsetup.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 22b5eea..769c3e4 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -74,7 +74,7 @@ static int parse_one_option(const char *option) {
t = strdup(option+7);
if (!t)
- return -ENOMEM;
+ return log_oom();
free(opt_cipher);
opt_cipher = t;
@@ -89,9 +89,10 @@ static int parse_one_option(const char *option) {
} else if (startswith(option, "tcrypt-keyfile=")) {
opt_type = CRYPT_TCRYPT;
- if (path_is_absolute(option+15))
- opt_tcrypt_keyfiles = strv_append(opt_tcrypt_keyfiles, strdup(option+15));
- else
+ if (path_is_absolute(option+15)) {
+ if (strv_extend(&opt_tcrypt_keyfiles, option + 15) < 0)
+ return log_oom();
+ } else
log_error("Key file path '%s' is not absolute. Ignoring.", option+15);
} else if (startswith(option, "keyfile-size=")) {
@@ -113,7 +114,7 @@ static int parse_one_option(const char *option) {
t = strdup(option+5);
if (!t)
- return -ENOMEM;
+ return log_oom();
free(opt_hash);
opt_hash = t;
--
1.8.4

View File

@ -1,25 +0,0 @@
From 8c92d4bbc7a538ada11d7e85016cce141beb0e6c Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:36:43 +0200
Subject: [PATCH 06/15] journald: add missing error check
---
src/journal/journal-file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 1236403..81c344f 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -907,6 +907,8 @@ static int journal_file_append_field(
osize = offsetof(Object, field.payload) + size;
r = journal_file_append_object(f, OBJECT_FIELD, osize, &o, &p);
+ if (r < 0)
+ return r;
o->field.hash = htole64(hash);
memcpy(o->field.payload, field, size);
--
1.8.4

View File

@ -1,34 +0,0 @@
From f5f6e41a9ee008e1632f79ab3fa20beef7c2b613 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:11 +0200
Subject: [PATCH 07/15] bus: fix potentially uninitialized memory access
---
src/libsystemd-bus/bus-internal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c
index 0e66f3d..cac948e 100644
--- a/src/libsystemd-bus/bus-internal.c
+++ b/src/libsystemd-bus/bus-internal.c
@@ -63,7 +63,7 @@ bool object_path_is_valid(const char *p) {
bool interface_name_is_valid(const char *p) {
const char *q;
- bool dot, found_dot;
+ bool dot, found_dot = false;
if (isempty(p))
return false;
@@ -103,7 +103,7 @@ bool interface_name_is_valid(const char *p) {
bool service_name_is_valid(const char *p) {
const char *q;
- bool dot, found_dot, unique;
+ bool dot, found_dot = false, unique;
if (isempty(p))
return false;
--
1.8.4

View File

@ -1,30 +0,0 @@
From 2e8d788c2f90d062f208f8c57a97e7b33cb29f7d Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:30 +0200
Subject: [PATCH 08/15] dbus: fix return value of dispatch_rqueue()
---
src/libsystemd-bus/sd-bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 3f766fb..db0880f 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1215,11 +1215,11 @@ static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
if (r == 0)
return ret;
- r = 1;
+ ret = 1;
} while (!z);
*m = z;
- return 1;
+ return ret;
}
int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) {
--
1.8.4

View File

@ -1,27 +0,0 @@
From b857193b1def5172e3641ca1d5bc9e08ae81aac4 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:37:44 +0200
Subject: [PATCH 09/15] modules-load: fix error handling
---
src/modules-load/modules-load.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 7b19ee0..49ee420 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -302,8 +302,8 @@ int main(int argc, char *argv[]) {
STRV_FOREACH(i, arg_proc_cmdline_modules) {
k = load_module(ctx, *i);
- if (k < 0)
- r = EXIT_FAILURE;
+ if (k < 0 && r == 0)
+ r = k;
}
r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
--
1.8.4

View File

@ -1,26 +0,0 @@
From 62678deda2dcd43954bf02f783da01e48c7f8fce Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:09 +0200
Subject: [PATCH 10/15] efi: never call qsort on potentially NULL arrays
---
src/shared/efivars.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index 1d5b6f9..c015b16 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -384,7 +384,8 @@ int efi_get_boot_options(uint16_t **options) {
list[count ++] = id;
}
- qsort(list, count, sizeof(uint16_t), cmp_uint16);
+ if (list)
+ qsort(list, count, sizeof(uint16_t), cmp_uint16);
*options = list;
return count;
--
1.8.4

View File

@ -1,27 +0,0 @@
From 5b4fb02d890d5c9777e9a6e798e0b8922a8a9fd8 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:28 +0200
Subject: [PATCH 11/15] strv: don't access potentially NULL string arrays
---
src/shared/env-util.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index 5e29629..7976881 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -405,7 +405,9 @@ char **strv_env_clean_log(char **e, const char *message) {
e[k++] = *p;
}
- e[k] = NULL;
+ if (e)
+ e[k] = NULL;
+
return e;
}
--
1.8.4

View File

@ -1,26 +0,0 @@
From 69c2b6be8fc607412a13cd0ea03a629b4965c816 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:52 +0200
Subject: [PATCH 12/15] mkdir: pass a proper function pointer to
mkdir_safe_internal
---
src/shared/mkdir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c
index b7e5c6e..43c6ea6 100644
--- a/src/shared/mkdir.c
+++ b/src/shared/mkdir.c
@@ -53,7 +53,7 @@ int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkd
}
int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) {
- return mkdir_safe_internal(path, mode, uid, gid, false);
+ return mkdir_safe_internal(path, mode, uid, gid, mkdir);
}
static int is_dir(const char* path) {
--
1.8.4

View File

@ -1,26 +0,0 @@
From 7074fecf6747c9a6ad872cc87701481e8bece8b0 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Wed, 2 Oct 2013 15:35:16 -0400
Subject: [PATCH 14/15] tmpfiles.d: include setgid perms for /run/log/journal
4608af4333d0f7f5 set permissions for journal storage on persistent disk
but not the volatile storage.
ref: https://bugs.archlinux.org/task/37170
---
tmpfiles.d/systemd.conf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
index b630440..a05c657 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf
@@ -26,3 +26,5 @@ F /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
m /var/log/journal 2755 root systemd-journal - -
m /var/log/journal/%m 2755 root systemd-journal - -
+m /run/log/journal 2755 root systemd-journal - -
+m /run/log/journal/%m 2755 root systemd-journal - -
--
1.8.4

View File

@ -1,181 +0,0 @@
From fc676b00a7545743429e0c9b12a0f0707b1059aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 5 Oct 2013 13:09:43 -0400
Subject: [PATCH] core: do not add "what" to RequiresMountsFor for network
mounts
For cifs mount like //server/share, we would get
RequiresMountsFor=/server/share, which probably isn't
harmful, but quite confusing.
Unfortunately a bunch of static functions had to be moved
up, but patch is really one line.
---
src/core/mount.c | 137 ++++++++++++++++++++++++++++--------------------------
1 file changed, 70 insertions(+), 67 deletions(-)
diff --git src/core/mount.c src/core/mount.c
index db055f0..70cd372 100644
--- src/core/mount.c
+++ src/core/mount.c
@@ -59,6 +59,72 @@ static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
[MOUNT_FAILED] = UNIT_FAILED
};
+static char* mount_test_option(const char *haystack, const char *needle) {
+ struct mntent me = { .mnt_opts = (char*) haystack };
+
+ assert(needle);
+
+ /* Like glibc's hasmntopt(), but works on a string, not a
+ * struct mntent */
+
+ if (!haystack)
+ return NULL;
+
+ return hasmntopt(&me, needle);
+}
+
+static bool mount_is_network(MountParameters *p) {
+ assert(p);
+
+ if (mount_test_option(p->options, "_netdev"))
+ return true;
+
+ if (p->fstype && fstype_is_network(p->fstype))
+ return true;
+
+ return false;
+}
+
+static bool mount_is_bind(MountParameters *p) {
+ assert(p);
+
+ if (mount_test_option(p->options, "bind"))
+ return true;
+
+ if (p->fstype && streq(p->fstype, "bind"))
+ return true;
+
+ if (mount_test_option(p->options, "rbind"))
+ return true;
+
+ if (p->fstype && streq(p->fstype, "rbind"))
+ return true;
+
+ return false;
+}
+
+static bool mount_is_auto(MountParameters *p) {
+ assert(p);
+
+ return !mount_test_option(p->options, "noauto");
+}
+
+static bool needs_quota(MountParameters *p) {
+ assert(p);
+
+ if (mount_is_network(p))
+ return false;
+
+ if (mount_is_bind(p))
+ return false;
+
+ return mount_test_option(p->options, "usrquota") ||
+ 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 void mount_init(Unit *u) {
Mount *m = MOUNT(u);
@@ -182,7 +248,10 @@ static int mount_add_mount_links(Mount *m) {
* for the source path (if this is a bind mount) to be
* available. */
pm = get_mount_parameters_fragment(m);
- if (pm && pm->what && path_is_absolute(pm->what)) {
+ if (pm && pm->what &&
+ path_is_absolute(pm->what) &&
+ !mount_is_network(pm)) {
+
r = unit_require_mounts_for(UNIT(m), pm->what);
if (r < 0)
return r;
@@ -214,72 +283,6 @@ static int mount_add_mount_links(Mount *m) {
return 0;
}
-static char* mount_test_option(const char *haystack, const char *needle) {
- struct mntent me = { .mnt_opts = (char*) haystack };
-
- assert(needle);
-
- /* Like glibc's hasmntopt(), but works on a string, not a
- * struct mntent */
-
- if (!haystack)
- return NULL;
-
- return hasmntopt(&me, needle);
-}
-
-static bool mount_is_network(MountParameters *p) {
- assert(p);
-
- if (mount_test_option(p->options, "_netdev"))
- return true;
-
- if (p->fstype && fstype_is_network(p->fstype))
- return true;
-
- return false;
-}
-
-static bool mount_is_bind(MountParameters *p) {
- assert(p);
-
- if (mount_test_option(p->options, "bind"))
- return true;
-
- if (p->fstype && streq(p->fstype, "bind"))
- return true;
-
- if (mount_test_option(p->options, "rbind"))
- return true;
-
- if (p->fstype && streq(p->fstype, "rbind"))
- return true;
-
- return false;
-}
-
-static bool mount_is_auto(MountParameters *p) {
- assert(p);
-
- return !mount_test_option(p->options, "noauto");
-}
-
-static bool needs_quota(MountParameters *p) {
- assert(p);
-
- if (mount_is_network(p))
- return false;
-
- if (mount_is_bind(p))
- return false;
-
- return mount_test_option(p->options, "usrquota") ||
- 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_device_links(Mount *m) {
MountParameters *p;
bool device_wants_mount = false;
--
1.7.9.2

View File

@ -1,34 +0,0 @@
From 14a9283eb38a93ec384c322ccbe06352c86a25f8 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 13 Oct 2013 17:42:51 -0400
Subject: [PATCH] udevadm.xml: document --resolve-names option for test
And remove documentation of the --subsystem flag which doesn't actually
exist.
---
man/udevadm.xml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git man/udevadm.xml man/udevadm.xml
index d0b257d..b959216 100644
--- man/udevadm.xml
+++ man/udevadm.xml
@@ -462,9 +462,13 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--subsystem=<replaceable>string</replaceable></option></term>
+ <term><option>--resolve-names=<replaceable>early|late|never</replaceable></option></term>
<listitem>
- <para>The subsystem string.</para>
+ <para>Specify when udevadm should resolve names of users and groups.
+ When set to early (the default) names will be resolved when the
+ rules are parsed. When set to late names will be resolved for
+ every event. When set to never names will never be resolved and
+ all devices will be owned by root.</para>
</listitem>
</varlistentry>
<varlistentry>
--
1.7.9.2

View File

@ -1,34 +0,0 @@
From 306e6650221d88b29831bcdcef94447afb65df5c Mon Sep 17 00:00:00 2001
From: Igor Zhbanov <i.zhbanov@samsung.com>
Date: Tue, 15 Oct 2013 14:35:13 +0400
Subject: [PATCH] Fix for SIGSEGV in systemd-bootchart on short-living
processes
The function svg_ps_bars() dereferencess NULL pointer in the line
endtime = ps->last->sampledata->sampletime;
because of partially initialized ps_struct (ps->last == NULL).
If some process terminates between scaning /proc directory in the log_sample()
function and reading additional information from /proc/PID/... files,
the files couldn't be read, the loop will be continued and partially
initialized structure returned.
---
src/bootchart/store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/bootchart/store.c src/bootchart/store.c
index f8c97c2..7f86cfe 100644
--- src/bootchart/store.c
+++ src/bootchart/store.c
@@ -275,7 +275,7 @@ schedstat_next:
pscount++;
/* mark our first sample */
- ps->first = ps->sample;
+ ps->first = ps->last = ps->sample;
ps->sample->runtime = atoll(rt);
ps->sample->waittime = atoll(wt);
--
1.7.9.2

View File

@ -1,37 +0,0 @@
From 775657712d0f6d14b70a0fe947a95a9ecc212440 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 15 Oct 2013 08:58:50 +0200
Subject: [PATCH] man: document the -b special boot option
---
man/kernel-command-line.xml | 1 +
man/systemd.xml | 1 +
2 files changed, 2 insertions(+)
diff --git man/kernel-command-line.xml man/kernel-command-line.xml
index cc267a3..abe68e5 100644
--- man/kernel-command-line.xml
+++ man/kernel-command-line.xml
@@ -123,6 +123,7 @@
</varlistentry>
<varlistentry>
+ <term><varname>-b</varname></term>
<term><varname>emergency</varname></term>
<term><varname>single</varname></term>
<term><varname>s</varname></term>
diff --git man/systemd.xml man/systemd.xml
index fe6e331..85c06d3 100644
--- man/systemd.xml
+++ man/systemd.xml
@@ -1149,6 +1149,7 @@
</varlistentry>
<varlistentry>
+ <term><varname>-b</varname></term>
<term><varname>emergency</varname></term>
<listitem><para>Boot into emergency
--
1.7.9.2

View File

@ -1,81 +0,0 @@
Patch based on
From e0d856dd48d640f3d95efe7b769edec02373cc74 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 16 Oct 2013 02:51:24 +0200
Subject: [PATCH] rules: don't limit some of the rules to the "add" action
Devices should show up in systemd regardless whether the user invoked
"udevadm trigger" or not. Before this change some devices might have
suddenly disappeared due issuing that command.
and also on
From 1a0464230c08506c3fd715ff7cc56660df3a85ca Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Oct 2013 07:45:32 +0000
Subject: Add support for saving/restoring keyboard backlights
Piggy-backing on the display backlight code, this saves and restores
keyboard backlights on supported devices.
The detection code matches that of UPower:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173
https://bugs.freedesktop.org/show_bug.cgi?id=70367
[tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"]
---
rules/99-systemd.rules.in | 10 ++++++----
src/backlight/backlight.c | 7 +++++--
2 files changed, 11 insertions(+), 6 deletions(-)
--- rules/99-systemd.rules.in
+++ rules/99-systemd.rules.in 2014-02-14 14:46:48.358235397 +0000
@@ -51,14 +51,16 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_dev
ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
-# Pull in backlight save/restore for all firmware backlight devices
+# Pull in backlight save/restore for all backlight devices and
+# keyboard backlights
-ACTION=="add", SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service"
+SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
+SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"
# Asynchronously mount file systems implemented by these modules as
# soon as they are loaded.
-SUBSYSTEM=="module", KERNEL=="fuse", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount"
-SUBSYSTEM=="module", KERNEL=="configfs", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount"
+SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount"
+SUBSYSTEM=="module", KERNEL=="configfs", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount"
LABEL="systemd_end"
--- src/backlight/backlight.c
+++ src/backlight/backlight.c 2014-02-14 15:20:47.534298128 +0000
@@ -56,9 +56,11 @@ int main(int argc, char *argv[]) {
errno = 0;
device = udev_device_new_from_subsystem_sysname(udev, "backlight", argv[2]);
+ if (!device)
+ device = udev_device_new_from_subsystem_sysname(udev, "leds", argv[2]);
if (!device) {
if (errno != 0) {
- log_error("Failed to get backlight device: %m");
+ log_error("Failed to get backlight device '%s': %m", argv[2]);
r = -errno;
} else
r = log_oom();
@@ -66,7 +68,8 @@ int main(int argc, char *argv[]) {
goto finish;
}
- if (!streq_ptr(udev_device_get_subsystem(device), "backlight")) {
+ if (!streq_ptr(udev_device_get_subsystem(device), "backlight") &&
+ !streq_ptr(udev_device_get_subsystem(device), "leds")) {
log_error("Not a backlight device: %s", argv[2]);
r = -ENODEV;
goto finish;

View File

@ -1,37 +0,0 @@
From ca2f4176fee7dd5f5664429988e7059163fddb2d Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 17 Oct 2013 03:20:46 +0200
Subject: [PATCH] tmpfiles: log unaccessible FUSE mount points only as debug
message
---
src/tmpfiles/tmpfiles.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git src/tmpfiles/tmpfiles.c src/tmpfiles/tmpfiles.c
index 3cc831a..e23847b 100644
--- src/tmpfiles/tmpfiles.c
+++ src/tmpfiles/tmpfiles.c
@@ -275,12 +275,15 @@ static int dir_cleanup(
continue;
if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
+ if (errno == ENOENT)
+ continue;
- if (errno != ENOENT) {
+ /* FUSE, NFS mounts, SELinux might return EACCES */
+ if (errno == EACCES)
+ log_debug("stat(%s/%s) failed: %m", p, dent->d_name);
+ else
log_error("stat(%s/%s) failed: %m", p, dent->d_name);
- r = -errno;
- }
-
+ r = -errno;
continue;
}
--
1.7.9.2

View File

@ -1,26 +0,0 @@
From a23873387a6e722b711092c89a08ab3f3d19361c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 11 Nov 2013 19:53:59 -0500
Subject: [PATCH] systemd-python: fix booted() and add two functions to docs
For some reason sphinx doesn't want to show inherited C functions.
---
src/python-systemd/_daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/python-systemd/_daemon.c src/python-systemd/_daemon.c
index 6b84fb8..f0ab16f 100644
--- src/python-systemd/_daemon.c
+++ src/python-systemd/_daemon.c
@@ -51,7 +51,7 @@ static PyObject* booted(PyObject *self, PyObject *args) {
assert(args == NULL);
r = sd_booted();
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
--
1.7.9.2

View File

@ -1,25 +0,0 @@
From df49ccafc0d57c731a3da3014ad55d5bb9ed3e1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com>
Date: Wed, 13 Nov 2013 13:36:17 +0200
Subject: [PATCH] activate: mention -E in the help text
---
src/activate/activate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git src/activate/activate.c src/activate/activate.c
index 07e46b9..537626d 100644
--- src/activate/activate.c
+++ src/activate/activate.c
@@ -289,6 +289,8 @@ static int help(void) {
" -l --listen=ADDR Listen for raw connections at ADDR\n"
" -a --accept Spawn separate child for each connection\n"
" -h --help Show this help and exit\n"
+ " -E --environment=NAME[=VALUE]\n"
+ " Pass an environment variable to children\n"
" --version Print version string and exit\n"
"\n"
"Note: file descriptors from sd_listen_fds() will be passed through.\n"
--
1.7.9.2

View File

@ -1,26 +0,0 @@
From ed6556920c1a6cdfe0bb04e806bc1f54ea191545 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com>
Date: Wed, 13 Nov 2013 13:36:16 +0200
Subject: [PATCH] activate: fix crash when -s is passed
getopt_long() was told to accept -s which was never implemented.
---
src/activate/activate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/activate/activate.c src/activate/activate.c
index 537626d..2639d1c 100644
--- src/activate/activate.c
+++ src/activate/activate.c
@@ -344,7 +344,7 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "+hl:saE:", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "+hl:aE:", options, NULL)) >= 0)
switch(c) {
case 'h':
help();
--
1.7.9.2

View File

@ -1,43 +0,0 @@
From 87267de89ddce9b1b812b720e1fc9a6cb554236e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 16 Nov 2013 17:29:28 -0500
Subject: [PATCH] tmpfiles: adjust excludes for the new per-service private
dirs
In d8c9d3a (systemd: use unit name in PrivateTmp directories)
I forgot to update the tmpfiles config.
---
tmpfiles.d/tmp.conf | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git tmpfiles.d/tmp.conf tmpfiles.d/tmp.conf
index 3b534a1..f0312ef 100644
--- tmpfiles.d/tmp.conf
+++ tmpfiles.d/tmp.conf
@@ -12,6 +12,23 @@ d /tmp 1777 root root 10d
d /var/tmp 1777 root root -
# Exclude namespace mountpoints created with PrivateTmp=yes
+x /tmp/systemd-*.service-*
+x /var/tmp/systemd-*.service-*
+X /tmp/systemd-*.service-*/tmp
+X /var/tmp/systemd-*.service-*/tmp
+x /tmp/systemd-*.socket-*
+x /var/tmp/systemd-*.socket-*
+X /tmp/systemd-*.socket-*/tmp
+X /var/tmp/systemd-*.socket-*/tmp
+x /tmp/systemd-*.mount-*
+x /var/tmp/systemd-*.mount-*
+X /tmp/systemd-*.mount-*/tmp
+X /var/tmp/systemd-*.mount-*/tmp
+x /tmp/systemd-*.swap-*
+x /var/tmp/systemd-*.swap-*
+X /tmp/systemd-*.swap-*/tmp
+X /var/tmp/systemd-*.swap-*/tmp
+# keep those for compatibility during upgrades
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
--
1.7.9.2

View File

@ -1,38 +0,0 @@
From f0511bd7e3d591383485a36ddcb764abe74b1939 Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawn@churchofgit.com>
Date: Sat, 16 Nov 2013 13:18:13 -0800
Subject: [PATCH] core/socket: fix SO_REUSEPORT
---
src/core/load-fragment-gperf.gperf.m4 | 1 +
src/core/socket.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git src/core/load-fragment-gperf.gperf.m4 src/core/load-fragment-gperf.gperf.m4
index e3025d2..b64fdc9 100644
--- src/core/load-fragment-gperf.gperf.m4
+++ src/core/load-fragment-gperf.gperf.m4
@@ -210,6 +210,7 @@ Socket.Broadcast, config_parse_bool, 0,
Socket.PassCredentials, config_parse_bool, 0, offsetof(Socket, pass_cred)
Socket.PassSecurity, config_parse_bool, 0, offsetof(Socket, pass_sec)
Socket.TCPCongestion, config_parse_string, 0, offsetof(Socket, tcp_congestion)
+Socket.ReusePort, config_parse_bool, 0, offsetof(Socket, reuseport)
Socket.MessageQueueMaxMessages, config_parse_long, 0, offsetof(Socket, mq_maxmsg)
Socket.MessageQueueMessageSize, config_parse_long, 0, offsetof(Socket, mq_msgsize)
Socket.Service, config_parse_socket_service, 0, 0
diff --git src/core/socket.c src/core/socket.c
index f505e4f..751f20b 100644
--- src/core/socket.c
+++ src/core/socket.c
@@ -771,7 +771,7 @@ static void socket_apply_socket_options(Socket *s, int fd) {
if (s->reuseport) {
int b = s->reuseport;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &b, sizeof(b)))
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &b, sizeof(b)) < 0)
log_warning_unit(UNIT(s)->id, "SO_REUSEPORT failed: %m");
}
--
1.7.9.2

View File

@ -1,80 +0,0 @@
From a676e66535e12458ea6d366a653f8dd60f982504 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 26 Nov 2013 18:39:42 +0100
Subject: [PATCH] journal: when appending to journal file, allocate larger
blocks at once
---
src/journal/journal-file.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git src/journal/journal-file.c src/journal/journal-file.c
index bc72fca..d606ada 100644
--- src/journal/journal-file.c
+++ src/journal/journal-file.c
@@ -68,6 +68,9 @@
/* How many entries to keep in the entry array chain cache at max */
#define CHAIN_CACHE_MAX 20
+/* How much to increase the journal file size at once each time we allocate something new. */
+#define FILE_SIZE_INCREASE (8ULL*1024ULL*1024ULL) /* 8MB */
+
int journal_file_set_online(JournalFile *f) {
assert(f);
@@ -218,8 +221,7 @@ static int journal_file_refresh_header(JournalFile *f) {
journal_file_set_online(f);
/* Sync the online state to disk */
- msync(f->header, PAGE_ALIGN(sizeof(Header)), MS_SYNC);
- fdatasync(f->fd);
+ fsync(f->fd);
return 0;
}
@@ -313,7 +315,7 @@ static int journal_file_verify_header(JournalFile *f) {
}
static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
- uint64_t old_size, new_size;
+ uint64_t old_size, new_size, file_size;
int r;
assert(f);
@@ -333,12 +335,10 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
if (new_size <= old_size)
return 0;
- if (f->metrics.max_size > 0 &&
- new_size > f->metrics.max_size)
+ if (f->metrics.max_size > 0 && new_size > f->metrics.max_size)
return -E2BIG;
- if (new_size > f->metrics.min_size &&
- f->metrics.keep_free > 0) {
+ if (new_size > f->metrics.min_size && f->metrics.keep_free > 0) {
struct statvfs svfs;
if (fstatvfs(f->fd, &svfs) >= 0) {
@@ -363,8 +363,16 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
if (r != 0)
return -r;
- if (fstat(f->fd, &f->last_stat) < 0)
- return -errno;
+ /* Increase the file size a bit further than this, so that we
+ * we can create larger memory maps to cache */
+ file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
+ if (file_size > (uint64_t) f->last_stat.st_size) {
+ if (file_size > new_size)
+ ftruncate(f->fd, file_size);
+
+ if (fstat(f->fd, &f->last_stat) < 0)
+ return -errno;
+ }
f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
--
1.7.9.2

View File

@ -1,247 +0,0 @@
From f268980d2cee694fa4118a71402a47c316af0425 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 26 Nov 2013 20:37:53 +0100
Subject: [PATCH] journal: optimize bisection logic a bit by caching the last
position
This way we can do a quick restart limiting a bit how wildly we need to
jump around during the bisection process.
---
src/journal/journal-file.c | 134 ++++++++++++++++++++++++++++++++------------
1 file changed, 99 insertions(+), 35 deletions(-)
diff --git src/journal/journal-file.c src/journal/journal-file.c
index 481c242..27cd16f 100644
--- src/journal/journal-file.c
+++ src/journal/journal-file.c
@@ -1366,6 +1366,7 @@ typedef struct ChainCacheItem {
uint64_t array; /* the cached array */
uint64_t begin; /* the first item in the cached array */
uint64_t total; /* the total number of items in all arrays before this one in the chain */
+ uint64_t last_index; /* the last index we looked at, to optimize locality when bisecting */
} ChainCacheItem;
static void chain_cache_put(
@@ -1374,7 +1375,8 @@ static void chain_cache_put(
uint64_t first,
uint64_t array,
uint64_t begin,
- uint64_t total) {
+ uint64_t total,
+ uint64_t last_index) {
if (!ci) {
/* If the chain item to cache for this chain is the
@@ -1402,12 +1404,14 @@ static void chain_cache_put(
ci->array = array;
ci->begin = begin;
ci->total = total;
+ ci->last_index = last_index;
}
-static int generic_array_get(JournalFile *f,
- uint64_t first,
- uint64_t i,
- Object **ret, uint64_t *offset) {
+static int generic_array_get(
+ JournalFile *f,
+ uint64_t first,
+ uint64_t i,
+ Object **ret, uint64_t *offset) {
Object *o;
uint64_t p = 0, a, t = 0;
@@ -1448,7 +1452,7 @@ static int generic_array_get(JournalFile *f,
found:
/* Let's cache this item for the next invocation */
- chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t);
+ chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t, i);
r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
if (r < 0)
@@ -1463,11 +1467,12 @@ found:
return 1;
}
-static int generic_array_get_plus_one(JournalFile *f,
- uint64_t extra,
- uint64_t first,
- uint64_t i,
- Object **ret, uint64_t *offset) {
+static int generic_array_get_plus_one(
+ JournalFile *f,
+ uint64_t extra,
+ uint64_t first,
+ uint64_t i,
+ Object **ret, uint64_t *offset) {
Object *o;
@@ -1498,17 +1503,18 @@ enum {
TEST_RIGHT
};
-static int generic_array_bisect(JournalFile *f,
- uint64_t first,
- uint64_t n,
- uint64_t needle,
- int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
- direction_t direction,
- Object **ret,
- uint64_t *offset,
- uint64_t *idx) {
-
- uint64_t a, p, t = 0, i = 0, last_p = 0;
+static int generic_array_bisect(
+ JournalFile *f,
+ uint64_t first,
+ uint64_t n,
+ uint64_t needle,
+ int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
+ direction_t direction,
+ Object **ret,
+ uint64_t *offset,
+ uint64_t *idx) {
+
+ uint64_t a, p, t = 0, i = 0, last_p = 0, last_index = (uint64_t) -1;
bool subtract_one = false;
Object *o, *array = NULL;
int r;
@@ -1533,7 +1539,7 @@ static int generic_array_bisect(JournalFile *f,
return r;
if (r == TEST_LEFT) {
- /* OK, what we are looking for is right of th
+ /* OK, what we are looking for is right of the
* begin of this EntryArray, so let's jump
* straight to previously cached array in the
* chain */
@@ -1541,6 +1547,7 @@ static int generic_array_bisect(JournalFile *f,
a = ci->array;
n -= ci->total;
t = ci->total;
+ last_index = ci->last_index;
}
}
@@ -1571,6 +1578,60 @@ static int generic_array_bisect(JournalFile *f,
if (r == TEST_RIGHT) {
left = 0;
right -= 1;
+
+ if (last_index != (uint64_t) -1) {
+ assert(last_index <= right);
+
+ /* If we cached the last index we
+ * looked at, let's try to not to jump
+ * too wildly around and see if we can
+ * limit the range to look at early to
+ * the immediate neighbors of the last
+ * index we looked at. */
+
+ if (last_index > 0) {
+ uint64_t x = last_index - 1;
+
+ p = le64toh(array->entry_array.items[x]);
+ if (p <= 0)
+ return -EBADMSG;
+
+ r = test_object(f, p, needle);
+ if (r < 0)
+ return r;
+
+ if (r == TEST_FOUND)
+ r = direction == DIRECTION_DOWN ? TEST_RIGHT : TEST_LEFT;
+
+ if (r == TEST_RIGHT)
+ right = x;
+ else
+ left = x + 1;
+ }
+
+ if (last_index < right) {
+ uint64_t y = last_index + 1;
+
+ p = le64toh(array->entry_array.items[y]);
+ if (p <= 0)
+ return -EBADMSG;
+
+ r = test_object(f, p, needle);
+ if (r < 0)
+ return r;
+
+ if (r == TEST_FOUND)
+ r = direction == DIRECTION_DOWN ? TEST_RIGHT : TEST_LEFT;
+
+ if (r == TEST_RIGHT)
+ right = y;
+ else
+ left = y + 1;
+ }
+
+ last_index = (uint64_t) -1;
+ }
+
for (;;) {
if (left == right) {
if (direction == DIRECTION_UP)
@@ -1581,8 +1642,8 @@ static int generic_array_bisect(JournalFile *f,
}
assert(left < right);
-
i = (left + right) / 2;
+
p = le64toh(array->entry_array.items[i]);
if (p <= 0)
return -EBADMSG;
@@ -1615,6 +1676,7 @@ static int generic_array_bisect(JournalFile *f,
n -= k;
t += k;
+ last_index = (uint64_t) -1;
a = le64toh(array->entry_array.next_entry_array_offset);
}
@@ -1625,7 +1687,7 @@ found:
return 0;
/* Let's cache this item for the next invocation */
- chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t);
+ chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, i + (subtract_one ? -1 : 0));
if (subtract_one && i == 0)
p = last_p;
@@ -1650,16 +1712,18 @@ found:
return 1;
}
-static int generic_array_bisect_plus_one(JournalFile *f,
- uint64_t extra,
- uint64_t first,
- uint64_t n,
- uint64_t needle,
- int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
- direction_t direction,
- Object **ret,
- uint64_t *offset,
- uint64_t *idx) {
+
+static int generic_array_bisect_plus_one(
+ JournalFile *f,
+ uint64_t extra,
+ uint64_t first,
+ uint64_t n,
+ uint64_t needle,
+ int (*test_object)(JournalFile *f, uint64_t p, uint64_t needle),
+ direction_t direction,
+ Object **ret,
+ uint64_t *offset,
+ uint64_t *idx) {
int r;
bool step_back = false;
--
1.7.9.2

View File

@ -1,26 +0,0 @@
From e5462cd80e5328a769137c261c93931ea0c27bab Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 00:58:39 +0100
Subject: [PATCH] journal: fix iteration when we go backwards from the
beginning of an array chain element
---
src/journal/journal-file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/journal/journal-file.c src/journal/journal-file.c
index 27cd16f..409be76 100644
--- src/journal/journal-file.c
+++ src/journal/journal-file.c
@@ -1687,7 +1687,7 @@ found:
return 0;
/* Let's cache this item for the next invocation */
- chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, i + (subtract_one ? -1 : 0));
+ chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i);
if (subtract_one && i == 0)
p = last_p;
--
1.7.9.2

View File

@ -1,28 +0,0 @@
From 248c78c79c5cca9b981800d816a77591e504066a Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 00:59:07 +0100
Subject: [PATCH] journal: allow journal_file_copy_entry() to work on
non-local files
---
src/journal/journal-file.c | 4 ----
1 file changed, 4 deletions(-)
diff --git src/journal/journal-file.c src/journal/journal-file.c
index 409be76..14eae8f 100644
--- src/journal/journal-file.c
+++ src/journal/journal-file.c
@@ -2732,10 +2732,6 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
ts.monotonic = le64toh(o->entry.monotonic);
ts.realtime = le64toh(o->entry.realtime);
- if (to->tail_entry_monotonic_valid &&
- ts.monotonic < le64toh(to->header->tail_entry_monotonic))
- return -EINVAL;
-
n = journal_file_entry_n_items(o);
items = alloca(sizeof(EntryItem) * n);
--
1.7.9.2

View File

@ -1,61 +0,0 @@
From eda4b58b50509dc8ad0428a46e20f6c5cf516d58 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 01:44:52 +0100
Subject: [PATCH] journal: simplify pre-allocation logic
let's just do a single fallocate() as far as possible, and don't
distuingish between allocated space and file size.
This way we can save a syscall for each append, which makes quite some
benefits.
---
src/journal/journal-file.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git src/journal/journal-file.c src/journal/journal-file.c
index 14eae8f..4009b29 100644
--- src/journal/journal-file.c
+++ src/journal/journal-file.c
@@ -315,7 +315,7 @@ static int journal_file_verify_header(JournalFile *f) {
}
static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
- uint64_t old_size, new_size, file_size;
+ uint64_t old_size, new_size;
int r;
assert(f);
@@ -356,6 +356,11 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
}
}
+ /* Increase by larger blocks at once */
+ new_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
+ if (f->metrics.max_size > 0 && new_size > f->metrics.max_size)
+ new_size = f->metrics.max_size;
+
/* Note that the glibc fallocate() fallback is very
inefficient, hence we try to minimize the allocation area
as we can. */
@@ -363,16 +368,8 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
if (r != 0)
return -r;
- /* Increase the file size a bit further than this, so that we
- * we can create larger memory maps to cache */
- file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;
- if (file_size > (uint64_t) f->last_stat.st_size) {
- if (file_size > new_size)
- ftruncate(f->fd, file_size);
-
- if (fstat(f->fd, &f->last_stat) < 0)
- return -errno;
- }
+ if (fstat(f->fd, &f->last_stat) < 0)
+ return -errno;
f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
--
1.7.9.2

View File

@ -1,58 +0,0 @@
From fbb634117d0b0ebd5b105e65b141e75ae9af7f8f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 27 Nov 2013 01:54:25 +0100
Subject: [PATCH] journald: mention how long we needed to flush to /var in the
logs
---
src/journal/journald-server.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git src/journal/journald-server.c src/journal/journald-server.c
index ce419d4..01e75b6 100644
--- src/journal/journald-server.c
+++ src/journal/journald-server.c
@@ -970,9 +970,12 @@ static int system_journal_open(Server *s) {
}
int server_flush_to_var(Server *s) {
- int r;
sd_id128_t machine;
sd_journal *j = NULL;
+ char ts[FORMAT_TIMESPAN_MAX];
+ usec_t start;
+ unsigned n = 0;
+ int r;
assert(s);
@@ -990,6 +993,8 @@ int server_flush_to_var(Server *s) {
log_debug("Flushing to /var...");
+ start = now(CLOCK_MONOTONIC);
+
r = sd_id128_get_machine(&machine);
if (r < 0)
return r;
@@ -1009,6 +1014,8 @@ int server_flush_to_var(Server *s) {
f = j->current_file;
assert(f && f->current_offset > 0);
+ n++;
+
r = journal_file_move_to_object(f, OBJECT_ENTRY, f->current_offset, &o);
if (r < 0) {
log_error("Can't read entry: %s", strerror(-r));
@@ -1052,6 +1059,8 @@ finish:
sd_journal_close(j);
+ server_driver_message(s, SD_ID128_NULL, "Time spent on flushing to /var is %s for %u entries.", format_timespan(ts, sizeof(ts), now(CLOCK_MONOTONIC) - start, 0), n);
+
return r;
}
--
1.7.9.2

View File

@ -1,31 +0,0 @@
From 27373e442747010dfc195296c0705f67e905a611 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Sat, 30 Nov 2013 23:45:31 +0100
Subject: [PATCH] util.c: check if return value from ttyname_r is > 0 instead
of != 0
We must return a negative error code from getttyname_malloc but
that would not be the case if ttyname_r returned a negative value.
ttyname_r should only return EBADF, ENOTTY, or ERANGE so it should
be safe to change.
---
src/shared/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/shared/util.c src/shared/util.c
index 38134ae..206fc80 100644
--- src/shared/util.c
+++ src/shared/util.c
@@ -2501,7 +2501,7 @@ int getttyname_malloc(int fd, char **r) {
assert(r);
k = ttyname_r(fd, path, sizeof(path));
- if (k != 0)
+ if (k > 0)
return -k;
char_array_0(path);
--
1.7.9.2

View File

@ -1,41 +0,0 @@
From 572ce4f7832ffa7a91a582c4098f18cec5662666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 30 Nov 2013 20:27:54 -0500
Subject: [PATCH] docs: remove unneeded the's in gudev docs
https://bugs.freedesktop.org/show_bug.cgi?id=72164
---
src/libudev/libudev-device.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git src/libudev/libudev-device.c src/libudev/libudev-device.c
index 059a590..9558ac3 100644
--- src/libudev/libudev-device.c
+++ src/libudev/libudev-device.c
@@ -982,9 +982,8 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic
* Find the next parent device, and fill in information from the sys
* device and the udev database entry.
*
- * The returned the device is not referenced. It is attached to the
- * child device, and will be cleaned up when the child device
- * is cleaned up.
+ * Returned device is not referenced. It is attached to the child
+ * device, and will be cleaned up when the child device is cleaned up.
*
* It is not necessarily just the upper level directory, empty or not
* recognized sys directories are ignored.
@@ -1018,9 +1017,8 @@ _public_ struct udev_device *udev_device_get_parent(struct udev_device *udev_dev
* If devtype is #NULL, only subsystem is checked, and any devtype will
* match.
*
- * The returned the device is not referenced. It is attached to the
- * child device, and will be cleaned up when the child device
- * is cleaned up.
+ * Returned device is not referenced. It is attached to the child
+ * device, and will be cleaned up when the child device is cleaned up.
*
* It can be called as many times as needed, without caring about
* references.
--
1.7.9.2

View File

@ -1,238 +0,0 @@
From 6a44e50f4c0938b0ba355fff21add6c067cd9837 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 30 Nov 2013 21:23:01 -0500
Subject: [PATCH] man: explicitly say when multiple units can be specified
itistoday> how do you specify multiple dependencies in a unit file? i've been
googling and can't find this basic thing :-\
itistoday> do you use a comma, or use multiple After= statements?
---
man/systemd.unit.xml | 128 +++++++++++++++++++++++++++-----------------------
1 file changed, 70 insertions(+), 58 deletions(-)
diff --git man/systemd.unit.xml man/systemd.unit.xml
index 4dc427c..35dd4c7 100644
--- man/systemd.unit.xml
+++ man/systemd.unit.xml
@@ -410,10 +410,12 @@
of the other units gets deactivated or
its activation fails, this unit will
be deactivated. This option may be
- specified more than once, in which
- case requirement dependencies for all
- listed names are created. Note that
- requirement dependencies do not
+ specified more than once or multiple
+ space-separated units may be specified
+ in one option in which case
+ requirement dependencies for all
+ listed names will be created. Note
+ that requirement dependencies do not
influence the order in which services
are started or stopped. This has to be
configured independently with the
@@ -476,22 +478,23 @@
<term><varname>RequisiteOverridable=</varname></term>
<listitem><para>Similar to
- <varname>Requires=</varname>
- and <varname>RequiresOverridable=</varname>, respectively. However,
- if a unit listed here is not started
- already it will not be started and the
- transaction fails
- immediately.</para></listitem>
+ <varname>Requires=</varname> and
+ <varname>RequiresOverridable=</varname>,
+ respectively. However, if the units
+ listed here are not started already
+ they will not be started and the
+ transaction will fail immediately.
+ </para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Wants=</varname></term>
<listitem><para>A weaker version of
- <varname>Requires=</varname>. A unit
+ <varname>Requires=</varname>. Units
listed in this option will be started
if the configuring unit is. However,
- if the listed unit fails to start up
+ if the listed units fail to start
or cannot be added to the transaction
this has no impact on the validity of
the transaction as a whole. This is
@@ -501,8 +504,8 @@
<para>Note that dependencies of this
type may also be configured outside of
- the unit configuration file by
- adding a symlink to a
+ the unit configuration file by adding
+ symlinks to a
<filename>.wants/</filename> directory
accompanying the unit file. For
details see above.</para></listitem>
@@ -534,7 +537,7 @@
of units. When systemd stops or restarts
the units listed here, the action is
propagated to this unit.
- Note that this is a one way dependency -
+ Note that this is a one way dependency —
changes to this unit do not affect the
listed units.
</para></listitem>
@@ -543,12 +546,12 @@
<varlistentry>
<term><varname>Conflicts=</varname></term>
- <listitem><para>Configures negative
+ <listitem><para>A space-separated list
+ of unit names. Configures negative
requirement dependencies. If a unit
- has a
- <varname>Conflicts=</varname> setting
- on another unit, starting the former
- will stop the latter and vice
+ has a <varname>Conflicts=</varname>
+ setting on another unit, starting the
+ former will stop the latter and vice
versa. Note that this setting is
independent of and orthogonal to the
<varname>After=</varname> and
@@ -575,7 +578,8 @@
<term><varname>Before=</varname></term>
<term><varname>After=</varname></term>
- <listitem><para>Configures ordering
+ <listitem><para>A space-separated list
+ of unit names. Configures ordering
dependencies between units. If a unit
<filename>foo.service</filename>
contains a setting
@@ -624,18 +628,18 @@
type <varname>After=</varname> or
<varname>Before=</varname>. If two
units have no ordering dependencies
- between them, they are shut down
- or started up simultaneously, and
- no ordering takes
+ between them, they are shut down or
+ started up simultaneously, and no
+ ordering takes
place. </para></listitem>
</varlistentry>
<varlistentry>
<term><varname>OnFailure=</varname></term>
- <listitem><para>Lists one or more
- units that are activated when this
- unit enters the
+ <listitem><para>A space-separated list
+ of one or more units that are
+ activated when this unit enters the
<literal>failed</literal>
state.</para></listitem>
</varlistentry>
@@ -644,16 +648,17 @@
<term><varname>PropagatesReloadTo=</varname></term>
<term><varname>ReloadPropagatedFrom=</varname></term>
- <listitem><para>Lists one or more
- units where reload requests on the
- unit will be propagated to/on the
- other unit will be propagated
- from. Issuing a reload request on a
- unit will automatically also enqueue a
- reload request on all units that the
- reload request shall be propagated to
- via these two
- settings.</para></listitem>
+ <listitem><para>A space-separated list
+ of one or more units where reload
+ requests on this unit will be
+ propagated to, or reload requests on
+ the other unit will be propagated to
+ this unit, respectively. Issuing a
+ reload request on a unit will
+ automatically also enqueue a reload
+ request on all units that the reload
+ request shall be propagated to via
+ these two settings.</para></listitem>
</varlistentry>
<varlistentry>
@@ -1130,32 +1135,34 @@
<varlistentry>
<term><varname>Alias=</varname></term>
- <listitem><para>Additional names this
- unit shall be installed under. The
- names listed here must have the same
- suffix (i.e. type) as the unit file
- name. This option may be specified
- more than once, in which case all
- listed names are used. At installation
- time,
- <command>systemctl enable</command>
- will create symlinks from these names
- to the unit filename.</para></listitem>
+ <listitem><para>A space-seperated list
+ of additional names this unit shall be
+ installed under. The names listed here
+ must have the same suffix (i.e. type)
+ as the unit file name. This option may
+ be specified more than once, in which
+ case all listed names are used. At
+ installation time, <command>systemctl
+ enable</command> will create symlinks
+ from these names to the unit
+ filename.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>WantedBy=</varname></term>
<term><varname>RequiredBy=</varname></term>
- <listitem><para>A symbolic link is
- created in the
- <filename>.wants/</filename> or
- <filename>.requires/</filename> directory
- of the listed unit when this unit is
- activated by <command>systemctl
- enable</command>. This has the effect
- that a dependency of type
- <varname>Wants=</varname> or
+ <listitem><para>This option may be
+ used more than once, or a
+ space-separated list of unit names may
+ be given. A symbolic link is created
+ in the <filename>.wants/</filename> or
+ <filename>.requires/</filename>
+ directory of each of the listed units
+ when this unit is installed by
+ <command>systemctl enable</command>.
+ This has the effect that a dependency
+ of type <varname>Wants=</varname> or
<varname>Requires=</varname> is added
from the listed unit to the current
unit. The primary result is that the
@@ -1201,7 +1208,12 @@
and <command>systemctl
disable</command> will automatically
install/uninstall units listed in this option as
- well.</para></listitem>
+ well.</para>
+
+ <para>This option may be used more
+ than once, or a space-separated list
+ of unit names may be
+ given.</para></listitem>
</varlistentry>
</variablelist>
--
1.7.9.2

View File

@ -1,93 +0,0 @@
From 6a371e23ee0e47827fb4e3aa469ed84da2599304 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 2 Dec 2013 21:52:51 -0500
Subject: [PATCH] systemd: treat reload failure as failure
systemctl reload "suceeded" on stopped units, but it is documented
to fail in this case.
https://bugzilla.redhat.com/show_bug.cgi?id=1036845
---
src/core/job.c | 11 +++++++----
src/core/job.h | 3 ++-
src/core/unit.c | 5 ++++-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git src/core/job.c src/core/job.c
index 557917a..ce97263 100644
--- src/core/job.c
+++ src/core/job.c
@@ -508,7 +508,7 @@ int job_run_and_invalidate(Job *j) {
else if (t == UNIT_ACTIVATING)
r = -EAGAIN;
else
- r = -ENOEXEC;
+ r = -EBADR;
break;
}
@@ -537,8 +537,10 @@ int job_run_and_invalidate(Job *j) {
if (j) {
if (r == -EALREADY)
r = job_finish_and_invalidate(j, JOB_DONE, true);
- else if (r == -ENOEXEC)
+ else if (r == -EBADR)
r = job_finish_and_invalidate(j, JOB_SKIPPED, true);
+ else if (r == -ENOEXEC)
+ r = job_finish_and_invalidate(j, JOB_INVALID, true);
else if (r == -EAGAIN) {
j->state = JOB_WAITING;
m->n_running_jobs--;
@@ -764,7 +766,7 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive) {
goto finish;
}
- if (result == JOB_FAILED)
+ if (result == JOB_FAILED || result == JOB_INVALID)
j->manager->n_failed_jobs ++;
job_uninstall(j);
@@ -1119,7 +1121,8 @@ static const char* const job_result_table[_JOB_RESULT_MAX] = {
[JOB_TIMEOUT] = "timeout",
[JOB_FAILED] = "failed",
[JOB_DEPENDENCY] = "dependency",
- [JOB_SKIPPED] = "skipped"
+ [JOB_SKIPPED] = "skipped",
+ [JOB_INVALID] = "invalid",
};
DEFINE_STRING_TABLE_LOOKUP(job_result, JobResult);
diff --git src/core/job.h src/core/job.h
index c23a380..0500e12 100644
--- src/core/job.h
+++ src/core/job.h
@@ -97,7 +97,8 @@ enum JobResult {
JOB_TIMEOUT, /* JobTimeout elapsed */
JOB_FAILED, /* Job failed */
JOB_DEPENDENCY, /* A required dependency job did not result in JOB_DONE */
- JOB_SKIPPED, /* JOB_RELOAD of inactive unit; negative result of JOB_VERIFY_ACTIVE */
+ JOB_SKIPPED, /* Negative result of JOB_VERIFY_ACTIVE */
+ JOB_INVALID, /* JOB_RELOAD of inactive unit */
_JOB_RESULT_MAX,
_JOB_RESULT_INVALID = -1
};
diff --git src/core/unit.c src/core/unit.c
index 50db86c..81d2162 100644
--- src/core/unit.c
+++ src/core/unit.c
@@ -1239,8 +1239,11 @@ int unit_reload(Unit *u) {
if (state == UNIT_RELOADING)
return -EALREADY;
- if (state != UNIT_ACTIVE)
+ if (state != UNIT_ACTIVE) {
+ log_warning_unit(u->id, "Unit %s cannot be reloaded because it is inactive.",
+ u->id);
return -ENOEXEC;
+ }
if ((following = unit_following(u))) {
log_debug_unit(u->id, "Redirecting reload request from %s to %s.",
--
1.7.9.2

View File

@ -1,31 +0,0 @@
From 524147c1ef991edf4432aac51c880b363b4402df Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Thu, 31 Oct 2013 15:55:07 +0200
Subject: [PATCH] logind: use correct "who" enum values with KillUnit.
---
src/login/logind-dbus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index bb85c7d..583d62e 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2799,7 +2799,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
assert(manager);
assert(unit);
- w = who == KILL_LEADER ? "process" : "cgroup";
+ w = who == KILL_LEADER ? "control" : "all";
assert_cc(sizeof(signo) == sizeof(int32_t));
r = bus_method_call_with_reply(
@@ -2815,7 +2815,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
DBUS_TYPE_INT32, &signo,
DBUS_TYPE_INVALID);
if (r < 0) {
- log_error("Failed to stop unit %s: %s", unit, bus_error(error, r));
+ log_error("Failed to kill unit %s: %s", unit, bus_error(error, r));
return r;
}

View File

@ -1,75 +0,0 @@
From: Robert Milasan <rmilasan@suse.com>
Date: Thu, 28 Mar 2013 09:24:43 +0000
Subject: udev always rename network
udev: ensure that the network interfaces are renamed even if they exist
(bnc#809843).
---
src/udev/udev-event.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
--- systemd-206.orig/src/udev/udev-event.c
+++ systemd-206/src/udev/udev-event.c
@@ -750,6 +750,7 @@ static int rename_netif(struct udev_even
struct udev_device *dev = event->dev;
int sk;
struct ifreq ifr;
+ int loop;
int err;
log_debug("changing net interface name from '%s' to '%s'\n",
@@ -766,12 +767,51 @@ static int rename_netif(struct udev_even
strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev));
strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
err = ioctl(sk, SIOCSIFNAME, &ifr);
- if (err >= 0) {
+ if (err == 0) {
print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
- } else {
+ goto out;
+ }
+
+ /* keep trying if the destination interface name already exists */
+ err = -errno;
+ if (err != -EEXIST) {
+ goto out;
+ }
+
+ /* free our own name, another process may wait for us */
+ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
+ err = ioctl(sk, SIOCSIFNAME, &ifr);
+ if (err < 0) {
err = -errno;
- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
+ goto out;
}
+
+ /* log temporary name */
+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
+
+ /* wait a maximum of 90 seconds for our target to become available */
+ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname);
+ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
+ loop = 90 * 20;
+ while (loop--) {
+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 };
+
+ log_debug("wait for netif '%s' to become free, loop=%i\n", event->name, (90 * 20) - loop);
+ nanosleep(&duration, NULL);
+
+ err = ioctl(sk, SIOCSIFNAME, &ifr);
+ if (err == 0) {
+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
+ break;
+ }
+ err = -errno;
+ if (err != -EEXIST)
+ break;
+ }
+
+out:
+ if (err < 0)
+ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
close(sk);
return err;
}

View File

@ -1,62 +0,0 @@
From: Werner Fink <werner@suse.de>
Date: Thu, 21 Nov 2013 11:50:32 +0000
Subject: [PATCH] Avoid busy systemd-journald
Avoid a busy systemd-journald due polling a broken /dec/kmsg in lxc
environments.
---
journald-kmsg.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
Index: systemd-208/src/journal/journald-kmsg.c
===================================================================
--- systemd-208/src/journal/journald-kmsg.c
+++ systemd-208/src/journal/journald-kmsg.c 2013-12-20 11:34:39.762236175 +0000
@@ -377,15 +377,18 @@ int server_flush_dev_kmsg(Server *s) {
int server_open_dev_kmsg(Server *s) {
struct epoll_event ev;
+ int r;
assert(s);
s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
if (s->dev_kmsg_fd < 0) {
- log_warning("Failed to open /dev/kmsg, ignoring: %m");
+ log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+ "Failed to open /dev/kmsg, ignoring: %m");
return 0;
}
+ r = 0;
zero(ev);
ev.events = EPOLLIN;
ev.data.fd = s->dev_kmsg_fd;
@@ -394,15 +397,24 @@ int server_open_dev_kmsg(Server *s) {
/* This will fail with EPERM on older kernels where
* /dev/kmsg is not readable. */
if (errno == EPERM)
- return 0;
+ goto fail;
log_error("Failed to add /dev/kmsg fd to epoll object: %m");
- return -errno;
+ r = -errno;
+ goto fail;
}
s->dev_kmsg_readable = true;
return 0;
+
+fail:
+ if (s->dev_kmsg_fd >= 0) {
+ close_nointr_nofail(s->dev_kmsg_fd);
+ s->dev_kmsg_fd = -1;
+ }
+
+ return r;
}
int server_open_kernel_seqnum(Server *s) {

View File

@ -1,168 +0,0 @@
Based on upstream baae0358f349870544884e405e82e4be7d8add9f
| From: Lennart Poettering <lennart@poettering.net>
| Date: Tue, 26 Nov 2013 04:05:00 +0000
| Subject: pam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is not the same as the newly logged in one
| It's better not to set any XDG_RUNTIME_DIR at all rather than one of a
| different user. So let's do this.
--- systemd-208/src/login/logind-dbus.c
+++ systemd-208/src/login/logind-dbus.c 2013-11-26 13:37:05.730735774 +0000
@@ -523,6 +523,7 @@ static int bus_manager_create_session(Ma
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_STRING, &session->user->runtime_path,
DBUS_TYPE_UNIX_FD, &fifo_fd,
+ DBUS_TYPE_UINT32, &session->user->uid,
DBUS_TYPE_STRING, &cseat,
DBUS_TYPE_UINT32, &vtnr,
DBUS_TYPE_BOOLEAN, &exists,
--- systemd-208/src/login/logind-session-dbus.c
+++ systemd-208/src/login/logind-session-dbus.c 2013-11-26 13:36:07.478236401 +0000
@@ -755,6 +755,7 @@ int session_send_create_reply(Session *s
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_STRING, &s->user->runtime_path,
DBUS_TYPE_UNIX_FD, &fifo_fd,
+ DBUS_TYPE_UINT32, &s->user->uid,
DBUS_TYPE_STRING, &cseat,
DBUS_TYPE_UINT32, &vtnr,
DBUS_TYPE_BOOLEAN, &exists,
--- systemd-208/src/login/pam-module.c
+++ systemd-208/src/login/pam-module.c 2013-11-26 14:32:20.194235777 +0000
@@ -93,24 +93,18 @@ static int get_user_data(
assert(ret_username);
assert(ret_pw);
- r = audit_loginuid_from_pid(0, &uid);
- if (r >= 0)
- pw = pam_modutil_getpwuid(handle, uid);
- else {
- r = pam_get_user(handle, &username, NULL);
- if (r != PAM_SUCCESS) {
- pam_syslog(handle, LOG_ERR, "Failed to get user name.");
- return r;
- }
-
- if (isempty(username)) {
- pam_syslog(handle, LOG_ERR, "User name not valid.");
- return PAM_AUTH_ERR;
- }
+ r = pam_get_user(handle, &username, NULL);
+ if (r != PAM_SUCCESS) {
+ pam_syslog(handle, LOG_ERR, "Failed to get user name.");
+ return r;
+ }
- pw = pam_modutil_getpwnam(handle, username);
+ if (isempty(username)) {
+ pam_syslog(handle, LOG_ERR, "User name not valid.");
+ return PAM_AUTH_ERR;
}
+ pw = pam_modutil_getpwnam(handle, username);
if (!pw) {
pam_syslog(handle, LOG_ERR, "Failed to get user data.");
return PAM_USER_UNKNOWN;
@@ -123,16 +117,14 @@ static int get_user_data(
}
static int get_seat_from_display(const char *display, const char **seat, uint32_t *vtnr) {
- _cleanup_free_ char *p = NULL;
- int r;
- _cleanup_close_ int fd = -1;
union sockaddr_union sa = {
.un.sun_family = AF_UNIX,
};
+ _cleanup_free_ char *p = NULL, *tty = NULL;
+ _cleanup_close_ int fd = -1;
struct ucred ucred;
socklen_t l;
- _cleanup_free_ char *tty = NULL;
- int v;
+ int v, r;
assert(display);
assert(vtnr);
@@ -194,13 +186,12 @@ _public_ PAM_EXTERN int pam_sm_open_sess
dbus_bool_t remote, existing;
int r;
uint32_t vtnr = 0;
+ uid_t original_uid;
assert(handle);
dbus_error_init(&error);
- /* pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); */
-
/* Make this a NOP on non-logind systems */
if (!logind_running())
return PAM_SUCCESS;
@@ -213,6 +204,9 @@ _public_ PAM_EXTERN int pam_sm_open_sess
goto finish;
}
+ if (debug)
+ pam_syslog(handle, LOG_INFO, "pam-systemd initializing");
+
r = get_user_data(handle, &username, &pw);
if (r != PAM_SUCCESS)
goto finish;
@@ -374,7 +368,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess
if (debug)
pam_syslog(handle, LOG_DEBUG, "Asking logind to create session: "
"uid=%u pid=%u service=%s type=%s class=%s seat=%s vtnr=%u tty=%s display=%s remote=%s remote_user=%s remote_host=%s",
- uid, pid, service, type, class, seat, vtnr, tty, display, yes_no(remote), remote_user, remote_host);
+ pw->pw_uid, pid,
+ strempty(service),
+ type, class,
+ seat, vtnr, tty, display,
+ yes_no(remote), remote_user, remote_host);
reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
if (!reply) {
@@ -388,6 +386,7 @@ _public_ PAM_EXTERN int pam_sm_open_sess
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_STRING, &runtime_path,
DBUS_TYPE_UNIX_FD, &session_fd,
+ DBUS_TYPE_UINT32, &original_uid,
DBUS_TYPE_STRING, &seat,
DBUS_TYPE_UINT32, &vtnr,
DBUS_TYPE_BOOLEAN, &existing,
@@ -399,8 +398,8 @@ _public_ PAM_EXTERN int pam_sm_open_sess
if (debug)
pam_syslog(handle, LOG_DEBUG, "Reply from logind: "
- "id=%s object_path=%s runtime_path=%s session_fd=%d seat=%s vtnr=%u",
- id, object_path, runtime_path, session_fd, seat, vtnr);
+ "id=%s object_path=%s runtime_path=%s session_fd=%d seat=%s vtnr=%u original_uid=%u",
+ id, object_path, runtime_path, session_fd, seat, vtnr, original_uid);
r = pam_misc_setenv(handle, "XDG_SESSION_ID", id, 0);
if (r != PAM_SUCCESS) {
@@ -408,10 +407,24 @@ _public_ PAM_EXTERN int pam_sm_open_sess
goto finish;
}
- r = pam_misc_setenv(handle, "XDG_RUNTIME_DIR", runtime_path, 0);
- if (r != PAM_SUCCESS) {
- pam_syslog(handle, LOG_ERR, "Failed to set runtime dir.");
- goto finish;
+ if (original_uid == pw->pw_uid) {
+ /* Don't set $XDG_RUNTIME_DIR if the user we now
+ * authenticated for does not match the original user
+ * of the session. We do this in order not to result
+ * in privileged apps clobbering the runtime directory
+ * unnecessarily. */
+
+ r = pam_misc_setenv(handle, "XDG_RUNTIME_DIR", runtime_path, 0);
+ if (r != PAM_SUCCESS) {
+ pam_syslog(handle, LOG_ERR, "Failed to set runtime dir.");
+ goto finish;
+ }
+ } else if (getenv("XDG_RUNTIME_DIR")) {
+ r = pam_putenv(handle, "XDG_RUNTIME_DIR");
+ if (r != PAM_SUCCESS && r != PAM_BAD_ITEM) {
+ pam_syslog(handle, LOG_ERR, "Failed to unset runtime dir.");
+ }
+ (void) unsetenv("XDG_RUNTIME_DIR");
}
if (!isempty(seat)) {

View File

@ -1,20 +0,0 @@
For bnc#818044
Based on http://cgit.freedesktop.org/systemd/systemd/patch/?id=67d6621059085963a2a908a3ea99ced3b0ca789e
---
systemctl.c | 5 +++++
1 file changed, 5 insertions(+)
--- systemd-208/src/systemctl/systemctl.c
+++ systemd-208/src/systemctl/systemctl.c 2014-01-21 13:00:52.910736187 +0000
@@ -4453,6 +4453,11 @@ static int enable_unit(DBusConnection *b
if (r < 0)
return r;
+ /* If the operation was fully executed by the SysV compat,
+ * let's finish early */
+ if (strv_isempty(mangled_names))
+ return 0;
+
if (!bus || avoid_bus()) {
if (streq(verb, "enable")) {
r = unit_file_enable(arg_scope, arg_runtime, arg_root, mangled_names, arg_force, &changes, &n_changes);

View File

@ -136,7 +136,7 @@
+
_init_completion || return
for ((i=0; $i <= $COMP_CWORD; i++)); do
for ((i=0; i < COMP_CWORD; i++)); do
@@ -83,4 +87,4 @@ _systemd_analyze() {
return 0
}
@ -225,7 +225,7 @@
+ return 0
+ fi
+
for ((i=0; i <= COMP_CWORD; i++)); do
for ((i=0; i < COMP_CWORD; i++)); do
if __contains_word "${COMP_WORDS[i]}" "${verbs[@]}" &&
! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
@@ -94,4 +98,4 @@ _udevadm() {

View File

@ -37,13 +37,13 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
return r;
}
@@ -90,6 +90,8 @@ static int execute(char **modes, char **
FILE *f;
_cleanup_fclose_ FILE *f = NULL;
const char* note = strappenda("SLEEP=", arg_verb);
+ if (!delegate_to_pmutils) {
+
/* This file is opened first, so that if we hit an error,
* we can abort before modyfing any state. */
* we can abort before modifying any state. */
f = fopen("/sys/power/state", "we");
@@ -102,6 +104,7 @@ static int execute(char **modes, char **
r = write_mode(modes);
@ -59,7 +59,7 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
NULL);
-
+ if (!delegate_to_pmutils)
r = write_state(f, states);
r = write_state(&f, states);
+ else
+ r = -system(pmtools);
if (r < 0)

View File

@ -1,26 +0,0 @@
From 3fdb2494c1e24c0a020f5b54022d2c751fd26f50 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 28 Nov 2013 09:52:18 +0000
Subject: login: revert lazy session-activation on non-VT seats
Existing applications like gdm already depend on new sessions to get
immediately activated on seats without VTs. Fixes a bug reported as:
[systemd-devel] systemd 208:trouble with inactive user sessions at non-seat0 seats
This patch restores the original behavior. We either need to add a new
flag for session-creation or some other heuristic to avoid activating new
sessions in the future.
---
--- a/src/login/logind-seat.c 2013-11-28 11:30:49.624623090 -0200
+++ b/src/login/logind-seat.c 2013-11-28 11:31:46.668792391 -0200
@@ -420,8 +420,8 @@
seat_send_changed(s, "Sessions\0");
/* On seats with VTs, the VT logic defines which session is active. On
- * seats without VTs, we automatically activate the first session. */
- if (!seat_has_vts(s) && !s->active)
+ * seats without VTs, we automatically activate new sessions. */
+ if (!seat_has_vts(s))
seat_set_active(s, session);
return 0;

View File

@ -1,35 +0,0 @@
From da6de8a55784115451582051c8da620056994a05 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Mon, 20 Jan 2014 11:05:22 +0100
Subject: [PATCH] analyze: fix crash in command line parsing
Ensure DBusError is set before it can possibly be freed on return.
Fix crash when calling set-log-level without any parameter.
Fix https://bugzilla.novell.com/show_bug.cgi?id=859365
---
src/analyze/systemd-analyze.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
index 27d063c..cdfae93 100644
--- a/src/analyze/systemd-analyze.c
+++ b/src/analyze/systemd-analyze.c
@@ -1226,13 +1226,13 @@ static int set_log_level(DBusConnection *bus, char **args) {
assert(bus);
assert(args);
+ dbus_error_init(&error);
if (strv_length(args) != 1) {
log_error("This command expects one argument only.");
return -E2BIG;
}
value = args[0];
- dbus_error_init(&error);
m = dbus_message_new_method_call("org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
--
1.8.4

View File

@ -1,60 +0,0 @@
From bd441fa27a22b7c6e11d9330560e0622fb69f297 Mon Sep 17 00:00:00 2001
From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date: Thu, 28 Nov 2013 17:07:29 +0000
Subject: build-sys: make multi-seat-x optional
At some point it should become disabled by default.
http://lists.freedesktop.org/archives/systemd-devel/2013-November/014869.html
---
diff --git a/Makefile.am b/Makefile.am
index 90874df..3598edd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4141,6 +4141,8 @@ MULTI_USER_TARGET_WANTS += \
SYSTEM_UNIT_ALIASES += \
systemd-logind.service dbus-org.freedesktop.login1.service
+if ENABLE_MULTI_SEAT_X
+
systemd_multi_seat_x_SOURCES = \
src/login/multi-seat-x.c
@@ -4151,6 +4153,8 @@ systemd_multi_seat_x_LDADD = \
rootlibexec_PROGRAMS += \
systemd-multi-seat-x
+endif
+
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/configure.ac b/configure.ac
index f1b00c5..ab24266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -794,6 +794,14 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
+have_multi_seat_x=no
+AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
+if test "x$enable_multi_seat_x" != "xno"; then
+ have_multi_seat_x=yes
+fi
+AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
+
+# ------------------------------------------------------------------------------
AC_ARG_WITH(rc-local-script-path-start,
AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
[Path to /etc/rc.local]),
@@ -1077,6 +1085,7 @@ AC_MSG_RESULT([
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
gintrospection: ${enable_introspection}
+ multi-seat-x: ${have_multi_seat_x}
Python: ${have_python}
Python Headers: ${have_python_devel}
man pages: ${have_manpages}
--
cgit v0.9.0.2-2-gbebe

View File

@ -21,14 +21,25 @@ Index: systemd-208/src/cryptsetup/cryptsetup-generator.c
Index: systemd-208/units/systemd-fsck@.service.in
===================================================================
--- systemd-208.orig/units/systemd-fsck@.service.in
+++ systemd-208/units/systemd-fsck@.service.in
@@ -10,7 +10,7 @@ Description=File System Check on %f
--- systemd-280.orig/units/systemd-fsck@.service.in
+++ systemd-280/units/systemd-fsck@.service.in
@@ -10,7 +10,7 @@
Documentation=man:systemd-fsck@.service(8)
DefaultDependencies=no
BindsTo=%i.device
-After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device
+After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device md.service dmraid.service
-After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service
+After=systemd-readahead-collect.service systemd-readahead-replay.service %i.device systemd-fsck-root.service md.service dmraid.service
Before=shutdown.target
[Service]
--- systemd-280.orig/units/systemd-fsck-root.service.in
+++ systemd-280/units/systemd-fsck-root.service.in
@@ -9,7 +9,7 @@
Description=File System Check on Root Device
Documentation=man:systemd-fsck-root.service(8)
DefaultDependencies=no
-After=systemd-readahead-collect.service systemd-readahead-replay.service
+After=systemd-readahead-collect.service systemd-readahead-replay.service md.service dmraid.service
Before=local-fs.target shutdown.target
ConditionPathIsReadWrite=!/

View File

@ -10,7 +10,7 @@ ensure btmp is owned only by root (bnc#777405).
--- systemd-206_git201308300826.orig/tmpfiles.d/systemd.conf
+++ systemd-206_git201308300826/tmpfiles.d/systemd.conf
@@ -11,7 +11,7 @@ d /run/user 0755 root root ~10d
F /run/utmp 0664 root utmp -
F! /run/utmp 0664 root utmp -
f /var/log/wtmp 0664 root utmp -
-f /var/log/btmp 0600 root utmp -

View File

@ -38,5 +38,5 @@ Index: systemd-208/src/systemctl/systemctl.c
+ }
+
r = parse_argv(argc, argv);
if (r < 0)
if (r <= 0)
goto finish;

View File

@ -4,11 +4,11 @@ Subject: handle /etc/HOSTNAME
(bnc#803653)
---
src/core/hostname-setup.c | 22 +++++++++++++++++-----
src/hostname/hostnamed.c | 12 +++++++++++-
src/core/hostname-setup.c | 22 +++++++++++++++++-----
src/hostname/hostnamed.c | 12 +++++++++++-
2 files changed, 28 insertions(+), 6 deletions(-)
--- systemd-206.orig/src/core/hostname-setup.c
--- systemd-206/src/core/hostname-setup.c
+++ systemd-206/src/core/hostname-setup.c
@@ -61,12 +61,24 @@ int hostname_setup(void) {
@ -40,38 +40,38 @@ Subject: handle /etc/HOSTNAME
} else
hn = b;
--- systemd-206.orig/src/hostname/hostnamed.c
+++ systemd-206/src/hostname/hostnamed.c
@@ -129,6 +129,10 @@ static int read_data(void) {
--- systemd-209/src/hostname/hostnamed.c
+++ systemd-209/src/hostname/hostnamed.c 2014-02-28 11:36:30.594735241 +0000
@@ -89,6 +89,10 @@ static int context_read_data(Context *c)
if (r < 0 && r != -ENOENT)
return r;
+ r = read_one_line_file("/etc/HOSTNAME", &data[PROP_STATIC_HOSTNAME]);
+ r = read_one_line_file("/etc/HOSTNAME", &c->data[PROP_STATIC_HOSTNAME]);
+ if (r < 0 && r != -ENOENT)
+ return r;
+
return 0;
}
@@ -283,6 +287,7 @@ static int write_data_hostname(void) {
static int write_data_static_hostname(void) {
@@ -246,6 +250,7 @@ static int context_write_data_hostname(C
}
static int context_write_data_static_hostname(Context *c) {
+ int r;
if (isempty(data[PROP_STATIC_HOSTNAME])) {
if (unlink("/etc/hostname") < 0)
@@ -290,7 +295,12 @@ static int write_data_static_hostname(vo
assert(c);
@@ -256,7 +261,12 @@ static int context_write_data_static_hos
return 0;
}
- return write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
- return write_string_file_atomic_label("/etc/hostname", c->data[PROP_STATIC_HOSTNAME]);
+
+ r = write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
+ r = write_string_file_atomic_label("/etc/hostname", c->data[PROP_STATIC_HOSTNAME]);
+ if (!r) {
+ r = symlink_atomic("/etc/hostname", "/etc/HOSTNAME");
+ }
+ return r;
}
static int write_data_other(void) {
static int context_write_data_other(Context *c) {

View File

@ -18,14 +18,14 @@ Index: systemd-208/Makefile.am
--- systemd-208.orig/Makefile.am
+++ systemd-208/Makefile.am
@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \
systemd-sleep
systemd-socket-proxyd
systemgenerator_PROGRAMS = \
+ systemd-insserv-generator \
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator
@@ -1682,6 +1683,14 @@ systemd_delta_LDADD = \
@@ -1658,6 +1659,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@ -241,7 +241,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c
+ if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) {
+ _cleanup_free_ char *unit = NULL;
+ /* insert also a Wants dependency from remote-fs-pre on remote-fs */
+ unit = strjoin(arg_dest, "/remote-fs.target.d/50-",path_get_file_name(filename),".conf", NULL);
+ unit = strjoin(arg_dest, "/remote-fs.target.d/50-",basename(filename),".conf", NULL);
+ if (!unit)
+ return log_oom();
+
@ -274,7 +274,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c
+ if ((sysv_translate_facility(name, NULL, &dep) < 0) || !dep)
+ continue;
+
+ unit = strjoin(arg_dest, "/", dep, ".d/50-",path_get_file_name(filename),"-",parsed[0],".conf", NULL);
+ unit = strjoin(arg_dest, "/", dep, ".d/50-",basename(filename),"-",parsed[0],".conf", NULL);
+ if (!unit)
+ return log_oom();
+
@ -305,7 +305,7 @@ Index: systemd-208/src/insserv-generator/insserv-generator.c
+
+ if (*j[0] != '+') {
+ free (unit);
+ unit = strjoin(arg_dest, "/", facility, ".d/50-hard-dependency-",path_get_file_name(filename),"-",parsed[0],".conf", NULL);
+ unit = strjoin(arg_dest, "/", facility, ".d/50-hard-dependency-",basename(filename),"-",parsed[0],".conf", NULL);
+ if (!unit)
+ return log_oom();
+

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa64fa864466fd5727005c55d61c092828b94b4f857272c0b503695022146390
size 2382904

3
systemd-209.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4cadef26adcd846e3f2b90502e64f590430baf59aea87491d25aac2e50b23d18
size 2607304

View File

@ -1,11 +1,13 @@
--- systemd-207.orig/src/core/dbus.c
+++ systemd-207/src/core/dbus.c
@@ -50,7 +50,7 @@
#define CONNECTIONS_MAX 512
--- systemd-208.orig/src/libsystemd/sd-bus/sd-bus.c
+++ systemd-208/src/libsystemd/sd-bus/sd-bus.c
@@ -793,8 +793,8 @@
machine = NULL;
/* Well-known address (http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types) */
-#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/run/dbus/system_bus_socket"
/* Only used as a fallback */
#define DBUS_SESSION_BUS_DEFAULT_ADDRESS "autolaunch:"
b->sockaddr.un.sun_family = AF_UNIX;
- strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + sizeof("/var/run/dbus/system_bus_socket") - 1;
+ strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path));
+ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + sizeof("/run/dbus/system_bus_socket") - 1;
return 0;
}

View File

@ -1,3 +1,298 @@
-------------------------------------------------------------------
Fri Feb 28 16:59:25 UTC 2014 - werner@suse.de
- Update to Release v209 on the base of the work of Stefan Brüns
from declined submit request 223602:
+ A new tool "systemd-socket-proxyd" has been added
+ Add a new tool to save/restore rfkill state on
shutdown/boot.
+ Save/restore state of keyboard backlights in addition to
display backlights on shutdown/boot.
+ udev learned a new SECLABEL{} construct to label device
nodes with a specific security label when they appear. For
now, only SECLABEL{selinux} is supported, but the syntax is
prepared for additional security frameworks.
+ When the User= switch is used in a unit file, also
initialize $SHELL= based on the user database entry.
+ systemd no longer depends on libdbus. All communication is
now done with sd-bus, systemd's low-level bus library
implementation.
+ sd-bus: add a light-weight vtable implementation that allows
defining objects on the bus with a simple static const
vtable array of its methods, signals and properties.
+ systemd will not generate or install static dbus
introspection data anymore to /usr/share/dbus-1/interfaces,
as the precise format of these files is unclear, and
nothing makes use of it.
+ A proxy daemon is now provided to proxy clients connecting
via classic D-Bus AF_UNIX sockets to kdbus, to provide full
compatibility with classic D-Bus.
+ A bus driver implementation has been added that supports the
classic D-Bus bus driver calls on kdbus, also for
compatibility purposes.
+ A new API "sd-event.h" has been added that implements a
minimal event loop API built around epoll.
+ A new API "sd-rntl.h" has been added that provides an API
around the route netlink interface of the kernel, similar in
style to "sd-bus.h".
+ A new API "sd-dhcp-client.h" has been added that provides a
small DHCPv4 client-side implementation. This is used by
"systemd-networkd".
+ There is a new kernel command line option
"systemd.restore_state=0|1". When set to "0", none of the
systemd tools will restore saved runtime state to hardware
devices. More specifically, the rfkill and backlight states
are not restored.
+ The FsckPassNo= compatibility option in mount/service units
has been removed. The fstab generator will now add the
necessary dependencies automatically, and does not require
PID1's support for that anymore.
+ journalctl gained a new switch, --list-boots, that lists
recent boots with their times and boot IDs.
+ The various tools like systemctl, loginctl, timedatectl,
busctl, systemd-run, ... have gained a new switch "-M" to
connect to a specific, local OS container (as direct
connection, without requiring SSH).
+ systemd-run and systemd-analyze also gained support for "-H"
to connect to remote hosts via SSH. This is particularly
useful for systemd-run because it enables queuing of jobs
onto remote systems.
+ machinectl gained a new command "login" to open a getty
login in any local container. This works with any container
that is registered with machined (such as those created by
libvirt-lxc or nspawn), and which runs systemd inside.
+ machinectl gained a new "reboot" command that may be used to
trigger a reboot on a specific container that is registered
with machined. This works on any container that runs an init
system of some kind.
+ systemctl gained a new "list-timers" command to print a nice
listing of installed timer units with the times they elapse
next.
+ Alternative reboot() parameters may now be specified on the
"systemctl reboot" command line and are passed to the
reboot() system call.
+ systemctl gained a new --job-mode= switch to configure the
mode to queue a job with. This is a more generic version of
--fail, --irreversible, and --ignore-dependencies, which are
still available but not advertised anymore.
+ /etc/systemd/system.conf gained new settings to configure
various default timeouts of units, as well as the default
start limit interval and burst. These may still be overridden
within each Unit.
+ PID1 will now export on the bus profile data of the security
policy upload process (such as the SELinux policy upload to
the kernel).
+ journald: when forwarding logs to the console, include
timestamps (following the setting in
/sys/module/printk/parameters/time).
+ OnCalendar= in timer units now understands the special
strings "yearly" and "annually". (Both are equivalent)
+ The accuracy of timer units is now configurable with the new
AccuracySec= setting. It defaults to 1min.
+ A new dependency type JoinsNamespaceOf= has been added that
allows running two services within the same /tmp and network
namespace, if PrivateNetwork= or PrivateTmp= are used.
+ A new command "cat" has been added to systemctl. It outputs
the original unit file of a unit, and concatenates the
contents of additional "drop-in" unit file snippets, so that
the full configuration is shown.
+ systemctl now supports globbing on the various "list-xyz"
commands, like "list-units" or "list-sockets", as well as on
those commands which take multiple unit names.
+ journalctl's --unit= switch gained support for globbing.
+ All systemd daemons now make use of the watchdog logic so
that systemd automatically notices when they hang.
+ If the $container_ttys environment variable is set,
getty-generator will automatically spawn a getty for each
listed tty. This is useful for container managers to request
login gettys to be spawned on as many ttys as needed.
+ %h, %s, %U specifier support is not available anymore when
used in unit files for PID 1. This is because NSS calls are
not safe from PID 1. They stay available for --user
instances of systemd, and as special case for the root user.
+ loginctl gained a new "--no-legend" switch to turn off output
of the legend text.
+ The "sd-login.h" API gained three new calls:
sd_session_is_remote(), sd_session_get_remote_user(),
sd_session_get_remote_host() to query information about
remote sessions.
+ The udev hardware database now also carries vendor/product
information of SDIO devices.
+ The "sd-daemon.h" API gained a new sd_watchdog_enabled() to
determine whether watchdog notifications are requested by
the system manager.
+ Socket-activated per-connection services now include a
short description of the connection parameters in the
description.
+ tmpfiles gained a new "--boot" option. When this is not used,
only lines where the command character is not suffixed with
"!" are executed. When this option is specified, those
options are executed too.
+ systemctl gained a new "import-environment" command which
uploads the caller's environment (or parts thereof) into the
service manager so that it is inherited by services started
by the manager. This is useful to upload variables like
$DISPLAY into the user service manager.
+ A new PrivateDevices= switch has been added to service units
which allows running a service with a namespaced /dev
directory that does not contain any device nodes for
physical devices. More specifically, it only includes devices
such as /dev/null, /dev/urandom, and /dev/zero which are API
entry points.
+ logind has been extended to support behaviour like VT
switching on seats that do not support a VT. This makes
multi-session available on seats that are not the first seat
(seat0), and on systems where kernel support for VTs has
been disabled at compile-time.
+ If a process holds a delay lock for system sleep or shutdown
and fails to release it in time, we will now log its
identity. This makes it easier to identify processes that
cause slow suspends or power-offs.
+ When parsing /etc/crypttab, support for a new key-slot=
option as supported by Debian is added. It allows indicating
which LUKS slot to use on disk, speeding up key loading.
+ The sd_journald_sendv() API call has been checked and
officially declared to be async-signal-safe so that it may
be invoked from signal handlers for logging purposes.
+ Boot-time status output is now enabled automatically after a
short timeout if boot does not progress, in order to give
the user an indication what she or he is waiting for.
+ The boot-time output has been improved to show how much time
remains until jobs expire.
+ The KillMode= switch in service units gained a new possible
value "mixed". If set, and the unit is shut down, then the
initial SIGTERM signal is sent only to the main daemon
process, while the following SIGKILL signal is sent to
all remaining processes of the service.
+ logind will now also track a "Desktop" identifier for each
session which encodes the desktop environment of it. This is
useful for desktop environments that want to identify
multiple running sessions of itself easily.
+ A new SELinuxContext= setting for service units has been
added that allows setting a specific SELinux execution
context for a service.
+ Most systemd client tools will now honour $SYSTEMD_LESS for
settings of the "less" pager.
+ systemd's "seccomp" hook-up has been changed to make use of
the libseccomp library instead of using its own
implementation. This has benefits for portability among
other things.
- Dropped systemd patches as those are fixed upstream:
* 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch
* 0002-fix-lingering-references-to-var-lib-backlight-random.patch
* 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch
* 0004-systemctl-fix-name-mangling-for-sysv-units.patch
* 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch
* 0006-journald-add-missing-error-check.patch
* 0007-bus-fix-potentially-uninitialized-memory-access.patch
* 0008-dbus-fix-return-value-of-dispatch_rqueue.patch
* 0009-modules-load-fix-error-handling.patch
* 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch
* 0011-strv-don-t-access-potentially-NULL-string-arrays.patch
* 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch
* 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch
* 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
* 0001-gpt-auto-generator-exit-immediately-if-in-container.patch
* 0001-manager-when-verifying-whether-clients-may-change-en.patch
* 0001-logind-fix-bus-introspection-data-for-TakeControl.patch
* 0001-mount-check-for-NULL-before-reading-pm-what.patch
* 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
* 0001-systemd-serialize-deserialize-forbid_restart-value.patch
* 0001-core-unify-the-way-we-denote-serialization-attribute.patch
* 0001-journald-fix-minor-memory-leak.patch
* 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch
* 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch
* 0001-login-fix-invalid-free-in-sd_session_get_vt.patch
* 0001-login-make-sd_session_get_vt-actually-work.patch
* 0001-Never-call-qsort-on-potentially-NULL-arrays.patch
* 0001-dbus-common-avoid-leak-in-error-path.patch
* 0001-drop-ins-check-return-value.patch
* 0001-shared-util-Fix-glob_extend-argument.patch
* 0001-Fix-bad-assert-in-show_pid_array.patch
* 0001-analyze-set-white-background.patch
* 0001-analyze-set-text-on-side-with-most-space.patch
* analyze-fix-crash-in-command-line-parsing.patch
* 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch
* 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
* 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
* 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
* U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
* build-sys-make-multi-seat-x-optional.patch
* 1017-skip-native-unit-handling-if-sysv-already-handled.patch
* 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch
* 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch
* 0031-man-document-the-b-special-boot-option.patch
* 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch
* 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch
* 0035-activate-mention-E-in-the-help-text.patch
* 0036-activate-fix-crash-when-s-is-passed.patch
* 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch
* 0038-core-socket-fix-SO_REUSEPORT.patch
* 0039-journal-when-appending-to-journal-file-allocate-larg.patch
* 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch
* 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch
* 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch
* 0043-journal-simplify-pre-allocation-logic.patch
* 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch
* 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch
* 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch
* 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch
* 0049-systemd-treat-reload-failure-as-failure.patch
- Dropped backported systemd patches as those are fixed upstream
* 0145-logind-use-correct-who-enum-values-with-KillUnit.patch
* 1011-check-4-valid-kmsg-device.patch
* 0001-logind-garbage-collect-stale-users.patch
- Dropped udev patches as those are fixed fixed upstream:
* 0026-udevadm.xml-document-resolve-names-option-for-test.patch
* 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch
- Modified patches
* 1006-udev-always-rename-network.patch
- Replaced patches
* the patch
1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
is upstream now but has to be replaced by patch
0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
to fix an further issue similar to the upstream patch (bnc#852015)
* the patch
0001-upstream-systemctl-halt-reboot-error-handling.patch
is upstream now, only the part with the halt after a failed poweroff
has been added to the patch
0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
-------------------------------------------------------------------
Thu Feb 27 15:13:09 UTC 2014 - werner@suse.de
- Add patch 0001-make-209-working-on-older-dist.patch to make
it usable on older distributions like 13.1
-------------------------------------------------------------------
Wed Feb 26 12:43:17 UTC 2014 - werner@suse.de
- Add patch 0001-add-network-device-after-NFS-mount-units.patch to
add "After" dependency to all NFS shares to the network interface
device as this ensures at shutdown that the NFS share becomes
unmounted before the interface is down (bnc#861489)
+-------------------------------------------------------------------
Sun Feb 23 23:47:06 UTC 2014 - stefan.bruens@rwth-aachen.de
- enable compat-libs, BuildRequires binutils-gold
("old" ld fails on ifunc magic)
-------------------------------------------------------------------
Sun Feb 23 16:11:22 UTC 2014 - stefan.bruens@rwth-aachen.de
- add network link configuration for udev
-------------------------------------------------------------------
Sun Feb 23 15:44:01 UTC 2014 - stefan.bruens@rwth-aachen.de
- Modify patch 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch,
move to core and link in directly to avoid libudev dep all over
- Disable networkd
- Disable compat-libs, adapt files section
- add and remove some entries in the files section
-------------------------------------------------------------------
Fri Feb 21 16:04:54 UTC 2014 - werner@suse.de

View File

@ -23,10 +23,13 @@
%define udevpkgname udev-mini
%define udev_major 1
%bcond_without bash_completion
%bcond_without compat_libs
%bcond_with networkd
%bcond_with python
Name: systemd-mini
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 208
Version: 209
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
@ -36,6 +39,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: %{real} = %{version}-%{release}
BuildRequires: audit-devel
%if %{with compat_libs}
BuildRequires: binutils-gold
%endif
%if ! 0%{?bootstrap}
BuildRequires: dbus-1
BuildRequires: docbook-xsl-stylesheets
@ -52,6 +58,7 @@ BuildRequires: intltool
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libcap-devel
BuildRequires: libkmod-devel
BuildRequires: libsepol-devel
BuildRequires: libtool
%if ! 0%{?bootstrap}
@ -68,10 +75,17 @@ BuildRequires: pkgconfig(blkid) >= 2.20
BuildRequires: pkgconfig(dbus-1) >= 1.3.2
%if ! 0%{?bootstrap}
BuildRequires: libgcrypt-devel
%if %{with python}
BuildRequires: python
%endif
BuildRequires: pkgconfig(glib-2.0) >= 2.22.0
BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0
%endif
%if 0%{?suse_version} <= 1310
BuildRequires: pkgconfig(libkmod) >= 14
%else
BuildRequires: pkgconfig(libkmod) >= 15
%endif
BuildRequires: pkgconfig(liblzma)
%if ! 0%{?bootstrap}
BuildRequires: pkgconfig(libmicrohttpd)
@ -82,6 +96,9 @@ BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(usbutils) >= 0.82
%endif
%if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(libseccomp)
%endif
BuildRequires: pkgconfig(libselinux) >= 2.1.9
BuildRequires: pkgconfig(libsepol)
%if 0%{?bootstrap}
@ -183,160 +200,42 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run
Patch47: systemd-dbus-system-bus-address.patch
# PATCH-FIX-UPSTREAM 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch fcrozat@suse.com -- fix acpi memleak
Patch48: 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch
# PATCH-FIX-UPSTREAM 0002-fix-lingering-references-to-var-lib-backlight-random.patch fcrozat@suse.com -- fix invalid path in documentation
Patch49: 0002-fix-lingering-references-to-var-lib-backlight-random.patch
# PATCH-FIX-UPSTREAM 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch fcrozat@suse.com -- fix invalid memory free
Patch50: 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch
# PATCH-FIX-UPSTREAM 0004-systemctl-fix-name-mangling-for-sysv-units.patch fcrozat@suse.com -- fix name mangling for sysv units
Patch51: 0004-systemctl-fix-name-mangling-for-sysv-units.patch
# PATCH-FIX-UPSTREAM 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch fcrozat@suse.com -- fix OOM handling
Patch52: 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch
# PATCH-FIX-UPSTREAM 0006-journald-add-missing-error-check.patch fcrozat@suse.com -- add missing error check
Patch53: 0006-journald-add-missing-error-check.patch
# PATCH-FIX-UPSTREAM 0007-bus-fix-potentially-uninitialized-memory-access.patch fcrozat@suse.com -- fix uninitialized memory access
Patch54: 0007-bus-fix-potentially-uninitialized-memory-access.patch
# PATCH-FIX-UPSTREAM 0008-dbus-fix-return-value-of-dispatch_rqueue.patch fcrozat@suse.com -- fix return value
Patch55: 0008-dbus-fix-return-value-of-dispatch_rqueue.patch
# PATCH-FIX-UPSTREAM 0009-modules-load-fix-error-handling.patch fcrozat@suse.com -- fix error handling
Patch56: 0009-modules-load-fix-error-handling.patch
# PATCH-FIX-UPSTREAM 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- fix incorrect memory access
Patch57: 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch
# PATCH-FIX-UPSTREAM 0011-strv-don-t-access-potentially-NULL-string-arrays.patch fcrozat@suse.com -- fix incorrect memory access
Patch58: 0011-strv-don-t-access-potentially-NULL-string-arrays.patch
# PATCH-FIX-UPSTREAM 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch fcrozat@suse.com -- fix invalid pointer
Patch59: 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch
# PATCH-FIX-UPSTREAM 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch fcrozat@suse.com -- fix permission on /run/log/journal
Patch60: 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch
# PATCH-FIX-UPSTREAM 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch fcrozat@suse.com -- order remote mount points properly before remote-fs.target
Patch61: 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
# PATCH-FIX-UPSTREAM 0001-gpt-auto-generator-exit-immediately-if-in-container.patch fcrozat@suse.com -- don't start gpt auto-generator in container
Patch62: 0001-gpt-auto-generator-exit-immediately-if-in-container.patch
# PATCH-FIX-UPSTREAM 0001-manager-when-verifying-whether-clients-may-change-en.patch fcrozat@suse.com -- fix reload check in selinux case
Patch63: 0001-manager-when-verifying-whether-clients-may-change-en.patch
# PATCH-FIX-UPSTREAM 0001-logind-fix-bus-introspection-data-for-TakeControl.patch fcrozat@suse.com -- fix introspection for TakeControl
Patch64: 0001-logind-fix-bus-introspection-data-for-TakeControl.patch
# PATCH-FIX-UPSTREAM 0001-mount-check-for-NULL-before-reading-pm-what.patch fcrozat@suse.com -- fix crash when parsing some incorrect unit
Patch65: 0001-mount-check-for-NULL-before-reading-pm-what.patch
# PATCH-FIX-UPSTREAM 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch fcrozat@suse.com -- Fix udev rules parsing
Patch66: 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
# PATCH-FIX-UPSTREAM 0001-systemd-serialize-deserialize-forbid_restart-value.patch fcrozat@suse.com -- Fix incorrect deserialization for forbid_restart
Patch67: 0001-systemd-serialize-deserialize-forbid_restart-value.patch
# PATCH-FIX-UPSTREAM 0001-core-unify-the-way-we-denote-serialization-attribute.patch fcrozat@suse.com -- Ensure forbid_restart is named like other attributes
Patch68: 0001-core-unify-the-way-we-denote-serialization-attribute.patch
# PATCH-FIX-UPSTREAM 0001-journald-fix-minor-memory-leak.patch fcrozat@suse.com -- fix memleak in journald
Patch69: 0001-journald-fix-minor-memory-leak.patch
# PATCH-FIX-UPSTREAM 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch fcrozat@suse.com -- Improve ACPI firmware performance parsing
Patch70: 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch
# PATCH-FIX-UPSTREAM 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch fcrozat@suse.com -- Fix journal rotation
Patch71: 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch
# PATCH-FIX-UPSTREAM 0001-login-fix-invalid-free-in-sd_session_get_vt.patchfcrozat@suse.com -- Fix memory corruption in sd_session_get_vt
Patch72: 0001-login-fix-invalid-free-in-sd_session_get_vt.patch
# PATCH-FIX-UPSTREAM 0001-login-make-sd_session_get_vt-actually-work.patch fcrozat@suse.com -- Ensure sd_session_get_vt returns correct value
Patch73: 0001-login-make-sd_session_get_vt-actually-work.patch
# PATCH-FIX-UPSTREAM 0001-Never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- Don't call qsort on NULL arrays
Patch74: 0001-Never-call-qsort-on-potentially-NULL-arrays.patch
# PATCH-FIX-UPSTREAM 0001-dbus-common-avoid-leak-in-error-path.patch fcrozat@suse.com -- Fix memleak in dbus-common code
Patch75: 0001-dbus-common-avoid-leak-in-error-path.patch
# PATCH-FIX-UPSTREAM 0001-drop-ins-check-return-value.patch fcrozat@suse.com -- Fix return value for drop-ins checks
Patch76: 0001-drop-ins-check-return-value.patch
# PATCH-FIX-UPSTREAM 0001-shared-util-Fix-glob_extend-argument.patch fcrozat@suse.com -- Fix glob_extend argument
Patch77: 0001-shared-util-Fix-glob_extend-argument.patch
# PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array
Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-white-background.patch werner@suse.com -- Make background of systemd-analyze SVG white
Patch79: 0001-analyze-set-white-background.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-text-on-side-with-most-space.patch werner@suse.com -- Place the text on the side with most space
Patch80: 0001-analyze-set-text-on-side-with-most-space.patch
# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user.
Patch81: 0001-logind-garbage-collect-stale-users.patch
# PATCH-FIX-UPSTREAM analyze-fix-crash-in-command-line-parsing.patch fcrozat@suse.com bnc#859365 -- Fix crash in systemd-analyze
Patch82: analyze-fix-crash-in-command-line-parsing.patch
# PATCH-FIX-UPSTREAM 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch -- Prevent accidental kill of emergency shell (bnc#852021)
Patch83: 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
# PATCH-FIX-UPSTREAM 0001-upstream-systemctl-halt-reboot-error-handling.patch
Patch85: 0001-upstream-systemctl-halt-reboot-error-handling.patch
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
# PATCH-FIX-UPSTREAM 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch -- Allow sending SIGTERM to main PID only (bnc#841544)
Patch87: 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
# PATCH-FIX-UPSTREAM 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch -- Allow using it with PAM enabled services (bnc#841544)
Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
# PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544)
Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
Patch91: plymouth-quit-and-wait-for-emergency-service.patch
# PATCH-FIX-SUSE 0145-logind-use-correct-who-enum-values-with-KillUnit.patch -- Be able to kill sessions (bnc#860574)
Patch92: 0145-logind-use-correct-who-enum-values-with-KillUnit.patch
# PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488)
Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch115: 0001-add-network-device-after-NFS-mount-units.patch
# PATCH-FIX-USTREAM 0001-units-serial-getty-.service-add-Install-section.patch werner@suse.com
Patch116: 0001-units-serial-getty-.service-add-Install-section.patch
# PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com
Patch117: 0001-make-209-working-on-older-dist.patch
# PATCH-FIX-SUSE 0001-make-tests-with-libseccomp-work.patch werner@suse.com
Patch118: 0001-make-tests-with-libseccomp-work.patch
# PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com
Patch119: 0001-make-fortify-happy-with-ppoll.patch
# PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com
Patch120: 0001-avoid-abort-due-timeout-at-user-service.patch
# PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844)
Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
# PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071)
Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch
# PATCH-FIX-OPENSUSE 1011-check-4-valid-kmsg-device.patch -- Avoid busy systemd-journald (bnc#851393)
Patch1011: 1011-check-4-valid-kmsg-device.patch
# PATCH-FIX-UPSTREAM 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-UPSTREAM U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
# PATCH-FIX-SUSE 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch
Patch1014: 1014-journald-with-journaling-FS.patch
# PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch
Patch1015: build-sys-make-multi-seat-x-optional.patch
# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch
Patch1016: 1016-support-powerfail-with-powerstatus.patch
# PATCH-FIX-UPSTREAM 1017-skip-native-unit-handling-if-sysv-already-handled.patch
Patch1017: 1017-skip-native-unit-handling-if-sysv-already-handled.patch
# PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch
Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch
# PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch
Patch1019: 1019-make-completion-smart-to-be-able-to-redirect.patch
# PATCH-FIX-UPSTREAM 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch werner@suse.com
Patch94: 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch
# PATCH-FIX-UPSTREAM 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch werner@suse.com
Patch96: 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch
# PATCH-FIX-UPSTREAM 0031-man-document-the-b-special-boot-option.patch werner@suse.com
Patch97: 0031-man-document-the-b-special-boot-option.patch
# PATCH-FIX-UPSTREAM 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch werner@suse.com
Patch99: 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch
# PATCH-FIX-UPSTREAM 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch werner@suse.com
Patch100: 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch
# PATCH-FIX-UPSTREAM 0035-activate-mention-E-in-the-help-text.patch werner@suse.com
Patch101: 0035-activate-mention-E-in-the-help-text.patch
# PATCH-FIX-UPSTREAM 0036-activate-fix-crash-when-s-is-passed.patch werner@suse.com
Patch102: 0036-activate-fix-crash-when-s-is-passed.patch
# PATCH-FIX-UPSTREAM 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch werner@suse.com
Patch103: 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch
# PATCH-FIX-UPSTREAM 0038-core-socket-fix-SO_REUSEPORT.patch werner@suse.com
Patch104: 0038-core-socket-fix-SO_REUSEPORT.patch
# PATCH-FIX-UPSTREAM 0039-journal-when-appending-to-journal-file-allocate-larg.patch werner@suse.com
Patch105: 0039-journal-when-appending-to-journal-file-allocate-larg.patch
# PATCH-FIX-UPSTREAM 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch werner@suse.com
Patch106: 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch
# PATCH-FIX-UPSTREAM 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch werner@suse.com
Patch107: 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch
# PATCH-FIX-UPSTREAM 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch werner@suse.com
Patch108: 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch
# PATCH-FIX-UPSTREAM 0043-journal-simplify-pre-allocation-logic.patch werner@suse.com
Patch109: 0043-journal-simplify-pre-allocation-logic.patch
# PATCH-FIX-UPSTREAM 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch werner@suse.com
Patch110: 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch
# PATCH-FIX-UPSTREAM 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch werner@suse.com
Patch111: 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch
# PATCH-FIX-UPSTREAM 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch werner@suse.com
Patch112: 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch
# PATCH-FIX-UPSTREAM 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch werner@suse.com
Patch113: 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch
# PATCH-FIX-UPSTREAM 0049-systemd-treat-reload-failure-as-failure.patch werner@suse.com
Patch114: 0049-systemd-treat-reload-failure-as-failure.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch115: 0001-add-network-device-after-NFS-mount-units.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -347,16 +246,10 @@ Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1003: 1003-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 1005-create-default-links-for-primary-cd_dvd-drive.patch
Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch
# PATCH-FIX-OPENSUSE 1006-udev-always-rename-network.patch
Patch1006: 1006-udev-always-rename-network.patch
# PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch
Patch1007: 1007-physical-hotplug-cpu-and-memory.patch
# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch
Patch1008: 1008-add-msft-compability-rules.patch
# PATCH-FIX-UPSTREAM 0026-udevadm.xml-document-resolve-names-option-for-test.patch werner@suse.com
Patch95: 0026-udevadm.xml-document-resolve-names-option-for-test.patch
# PATCH-FIX-UPSTREAM 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch werner@suse.com
Patch98: 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -590,7 +483,9 @@ cp %{SOURCE7} m4/
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch27 -p1
# check if this is still needed, or can be derived from fbdev uaccess rule
# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html
# %patch27 -p1
%patch37 -p1
%ifarch %arm
%patch38 -p1
@ -601,97 +496,38 @@ cp %{SOURCE7} m4/
%patch42 -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
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch79 -p1
%patch80 -p1
%patch81 -p1
%patch82 -p1
%patch83 -p1
%patch84 -p1
%patch85 -p1
%patch86 -p1
%patch87 -p1
%patch88 -p1
%patch89 -p1
%patch90 -p1
%patch91 -p1
%patch92 -p1
%patch93 -p1
%patch115 -p1
%patch116 -p1
%if 0%{?suse_version} <= 1310
%patch117 -p1
%endif
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch1009 -p1
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch1013 -p1
%patch1014 -p1
%patch1015 -p1
%patch1016 -p1
%patch1017 -p1
%patch1018 -p1
%patch1019 -p1
%patch94 -p0
%patch96 -p0
%patch97 -p0
%patch99 -p0
%patch100 -p0
%patch101 -p0
%patch102 -p0
%patch103 -p0
%patch104 -p0
%patch105 -p0
%patch106 -p0
%patch107 -p0
%patch108 -p0
%patch109 -p0
%patch110 -p0
%patch111 -p0
%patch112 -p0
%patch113 -p0
%patch114 -p0
%patch115 -p1
# udev patches
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1005 -p1
%patch1006 -p1
#%patch1006 -p1 -b .xy
# don't apply when bootstrapping to not modify Makefile.am
%if ! 0%{?bootstrap}
%patch1007 -p1
%patch1008 -p1
%endif
%patch95 -p0
%patch98 -p0
# ensure generate files are removed
rm -f units/emergency.service
@ -710,8 +546,14 @@ export V=1
--disable-myhostname \
%else
--enable-manpages \
%if %{with python}
--with-python \
%endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \
%if %{with compat_libs}
--enable-compat-libs \
%endif
%endif
--enable-selinux \
--enable-split-usr \
@ -724,43 +566,52 @@ export V=1
--disable-ima \
%if 0%{?suse_version} > 1310
--disable-multi-seat-x \
%endif
%if %{without networkd}
--disable-networkd \
%endif
CFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
make install DESTDIR="%buildroot"
%if %{without python}
for man in systemd.directives.7 systemd.index.7
do
install -m 0644 man/$man %{buildroot}%{_mandir}/man7/
done
%endif
# move to %{_lib}
%if ! 0%{?bootstrap}
mv $RPM_BUILD_ROOT%{_libdir}/libnss_myhostname.so.2 $RPM_BUILD_ROOT/%{_lib}
mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib}
%endif
mkdir -p $RPM_BUILD_ROOT/{sbin,lib,bin}
ln -sf %{_bindir}/udevadm $RPM_BUILD_ROOT/sbin/udevadm
ln -sf %{_bindir}/systemd-ask-password $RPM_BUILD_ROOT/bin/systemd-ask-password
ln -sf %{_bindir}/systemctl $RPM_BUILD_ROOT/bin/systemctl
ln -sf %{_prefix}/lib/systemd/systemd-udevd $RPM_BUILD_ROOT/sbin/udevd
mkdir -p %{buildroot}/{sbin,lib,bin}
ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm
ln -sf %{_bindir}/systemd-ask-password %{buildroot}/bin/systemd-ask-password
ln -sf %{_bindir}/systemctl %{buildroot}/bin/systemctl
ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd
%if ! 0%{?bootstrap}
ln -sf systemd-udevd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/udevd.8
ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8
%endif
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
ln -sf /lib/firmware %{buildroot}/usr/lib/firmware
%if ! 0%{?bootstrap}
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald
install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config
%endif
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
install -m755 -D %{S:1060} %{buildroot}/etc/init.d/boot.udev
ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
install -m755 -D %{S:1061} %{buildroot}/%{_prefix}/lib/udev/write_dev_root_rule
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants
rm -rf %{buildroot}%{_sysconfdir}/rpm
find %{buildroot} -type f -name '*.la' -delete
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants}
@ -1070,6 +921,7 @@ exit 0
/bin/systemd-ask-password
/bin/systemctl
%{_bindir}/bootctl
%{_bindir}/busctl
%{_bindir}/kernel-install
%{_bindir}/hostnamectl
%{_bindir}/localectl
@ -1094,10 +946,13 @@ exit 0
%{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl
%{_sbindir}/systemd-sysv-convert
%{_libdir}/libsystemd.so.*
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so.*
%{_libdir}/libsystemd-login.so.*
%{_libdir}/libsystemd-id128.so.*
%{_libdir}/libsystemd-journal.so.*
%endif
%{_bindir}/systemd-cgls
%{_bindir}/systemd-cgtop
%{_bindir}/systemd-cat
@ -1115,6 +970,7 @@ exit 0
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service
%exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.*
%{_prefix}/lib/systemd/system/*.automount
%{_prefix}/lib/systemd/system/*.busname
%{_prefix}/lib/systemd/system/*.service
%{_prefix}/lib/systemd/system/*.slice
%{_prefix}/lib/systemd/system/*.target
@ -1131,7 +987,7 @@ exit 0
%{_prefix}/lib/systemd/systemd
%dir %{_prefix}/lib/systemd/catalog
%{_prefix}/lib/systemd/catalog/systemd.catalog
%dir %{_prefix}/lib/systemd/system-shutdown
%{_prefix}/lib/systemd/catalog/systemd.*.catalog
%dir %{_prefix}/lib/systemd/system-shutdown
%dir %{_prefix}/lib/systemd/system-preset
%dir %{_prefix}/lib/systemd/user-preset
@ -1188,10 +1044,6 @@ exit 0
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
%{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
@ -1208,6 +1060,7 @@ exit 0
%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
%exclude %{_datadir}/systemd/gatewayd
%{_datadir}/systemd
%{_datadir}/locale/*/LC_MESSAGES
%if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage
@ -1237,7 +1090,6 @@ exit 0
%if ! 0%{?bootstrap}
%{_prefix}/lib/udev/numlock-on
%endif
%ghost /var/lib/systemd/catalog/database
%if 0%{suse_version} < 1310
%{_sysconfdir}/rpm/macros.systemd
%endif
@ -1266,22 +1118,28 @@ exit 0
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsystemd.so
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so
%{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so
%endif
%dir %{_includedir}/systemd
%{_includedir}/systemd/sd-login.h
%{_includedir}/systemd/sd-daemon.h
%{_includedir}/systemd/sd-id128.h
%{_includedir}/systemd/sd-journal.h
%{_includedir}/systemd/sd-messages.h
%{_includedir}/systemd/sd-shutdown.h
%{_includedir}/systemd/_sd-common.h
%{_datadir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc
%if %{with compat_libs}
%{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc
%endif
%files sysvinit
%defattr(-,root,root,-)
@ -1346,6 +1204,8 @@ exit 0
%{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev*.service
%dir %{_prefix}/lib/systemd/system/sockets.target.wants
%{_prefix}/lib/systemd/system/sockets.target.wants/systemd-udev*.socket
%dir %{_prefix}/lib/systemd/network
%{_prefix}/lib/systemd/network/*.link
%files -n lib%{udevpkgname}%{udev_major}
%defattr(-,root,root)

View File

@ -21,4 +21,4 @@ SUSE policy is to not clean /tmp by default.
+d /var/tmp 1777 root root -
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-private-*
x /tmp/systemd-private-%b-*

View File

@ -1,3 +1,270 @@
-------------------------------------------------------------------
Fri Feb 28 16:59:25 UTC 2014 - werner@suse.de
- Update to Release v209 on the base of the work of Stefan Brüns
from declined submit request 223602:
+ A new tool "systemd-socket-proxyd" has been added
+ Add a new tool to save/restore rfkill state on
shutdown/boot.
+ Save/restore state of keyboard backlights in addition to
display backlights on shutdown/boot.
+ udev learned a new SECLABEL{} construct to label device
nodes with a specific security label when they appear. For
now, only SECLABEL{selinux} is supported, but the syntax is
prepared for additional security frameworks.
+ When the User= switch is used in a unit file, also
initialize $SHELL= based on the user database entry.
+ systemd no longer depends on libdbus. All communication is
now done with sd-bus, systemd's low-level bus library
implementation.
+ sd-bus: add a light-weight vtable implementation that allows
defining objects on the bus with a simple static const
vtable array of its methods, signals and properties.
+ systemd will not generate or install static dbus
introspection data anymore to /usr/share/dbus-1/interfaces,
as the precise format of these files is unclear, and
nothing makes use of it.
+ A proxy daemon is now provided to proxy clients connecting
via classic D-Bus AF_UNIX sockets to kdbus, to provide full
compatibility with classic D-Bus.
+ A bus driver implementation has been added that supports the
classic D-Bus bus driver calls on kdbus, also for
compatibility purposes.
+ A new API "sd-event.h" has been added that implements a
minimal event loop API built around epoll.
+ A new API "sd-rntl.h" has been added that provides an API
around the route netlink interface of the kernel, similar in
style to "sd-bus.h".
+ A new API "sd-dhcp-client.h" has been added that provides a
small DHCPv4 client-side implementation. This is used by
"systemd-networkd".
+ There is a new kernel command line option
"systemd.restore_state=0|1". When set to "0", none of the
systemd tools will restore saved runtime state to hardware
devices. More specifically, the rfkill and backlight states
are not restored.
+ The FsckPassNo= compatibility option in mount/service units
has been removed. The fstab generator will now add the
necessary dependencies automatically, and does not require
PID1's support for that anymore.
+ journalctl gained a new switch, --list-boots, that lists
recent boots with their times and boot IDs.
+ The various tools like systemctl, loginctl, timedatectl,
busctl, systemd-run, ... have gained a new switch "-M" to
connect to a specific, local OS container (as direct
connection, without requiring SSH).
+ systemd-run and systemd-analyze also gained support for "-H"
to connect to remote hosts via SSH. This is particularly
useful for systemd-run because it enables queuing of jobs
onto remote systems.
+ machinectl gained a new command "login" to open a getty
login in any local container. This works with any container
that is registered with machined (such as those created by
libvirt-lxc or nspawn), and which runs systemd inside.
+ machinectl gained a new "reboot" command that may be used to
trigger a reboot on a specific container that is registered
with machined. This works on any container that runs an init
system of some kind.
+ systemctl gained a new "list-timers" command to print a nice
listing of installed timer units with the times they elapse
next.
+ Alternative reboot() parameters may now be specified on the
"systemctl reboot" command line and are passed to the
reboot() system call.
+ systemctl gained a new --job-mode= switch to configure the
mode to queue a job with. This is a more generic version of
--fail, --irreversible, and --ignore-dependencies, which are
still available but not advertised anymore.
+ /etc/systemd/system.conf gained new settings to configure
various default timeouts of units, as well as the default
start limit interval and burst. These may still be overridden
within each Unit.
+ PID1 will now export on the bus profile data of the security
policy upload process (such as the SELinux policy upload to
the kernel).
+ journald: when forwarding logs to the console, include
timestamps (following the setting in
/sys/module/printk/parameters/time).
+ OnCalendar= in timer units now understands the special
strings "yearly" and "annually". (Both are equivalent)
+ The accuracy of timer units is now configurable with the new
AccuracySec= setting. It defaults to 1min.
+ A new dependency type JoinsNamespaceOf= has been added that
allows running two services within the same /tmp and network
namespace, if PrivateNetwork= or PrivateTmp= are used.
+ A new command "cat" has been added to systemctl. It outputs
the original unit file of a unit, and concatenates the
contents of additional "drop-in" unit file snippets, so that
the full configuration is shown.
+ systemctl now supports globbing on the various "list-xyz"
commands, like "list-units" or "list-sockets", as well as on
those commands which take multiple unit names.
+ journalctl's --unit= switch gained support for globbing.
+ All systemd daemons now make use of the watchdog logic so
that systemd automatically notices when they hang.
+ If the $container_ttys environment variable is set,
getty-generator will automatically spawn a getty for each
listed tty. This is useful for container managers to request
login gettys to be spawned on as many ttys as needed.
+ %h, %s, %U specifier support is not available anymore when
used in unit files for PID 1. This is because NSS calls are
not safe from PID 1. They stay available for --user
instances of systemd, and as special case for the root user.
+ loginctl gained a new "--no-legend" switch to turn off output
of the legend text.
+ The "sd-login.h" API gained three new calls:
sd_session_is_remote(), sd_session_get_remote_user(),
sd_session_get_remote_host() to query information about
remote sessions.
+ The udev hardware database now also carries vendor/product
information of SDIO devices.
+ The "sd-daemon.h" API gained a new sd_watchdog_enabled() to
determine whether watchdog notifications are requested by
the system manager.
+ Socket-activated per-connection services now include a
short description of the connection parameters in the
description.
+ tmpfiles gained a new "--boot" option. When this is not used,
only lines where the command character is not suffixed with
"!" are executed. When this option is specified, those
options are executed too.
+ systemctl gained a new "import-environment" command which
uploads the caller's environment (or parts thereof) into the
service manager so that it is inherited by services started
by the manager. This is useful to upload variables like
$DISPLAY into the user service manager.
+ A new PrivateDevices= switch has been added to service units
which allows running a service with a namespaced /dev
directory that does not contain any device nodes for
physical devices. More specifically, it only includes devices
such as /dev/null, /dev/urandom, and /dev/zero which are API
entry points.
+ logind has been extended to support behaviour like VT
switching on seats that do not support a VT. This makes
multi-session available on seats that are not the first seat
(seat0), and on systems where kernel support for VTs has
been disabled at compile-time.
+ If a process holds a delay lock for system sleep or shutdown
and fails to release it in time, we will now log its
identity. This makes it easier to identify processes that
cause slow suspends or power-offs.
+ When parsing /etc/crypttab, support for a new key-slot=
option as supported by Debian is added. It allows indicating
which LUKS slot to use on disk, speeding up key loading.
+ The sd_journald_sendv() API call has been checked and
officially declared to be async-signal-safe so that it may
be invoked from signal handlers for logging purposes.
+ Boot-time status output is now enabled automatically after a
short timeout if boot does not progress, in order to give
the user an indication what she or he is waiting for.
+ The boot-time output has been improved to show how much time
remains until jobs expire.
+ The KillMode= switch in service units gained a new possible
value "mixed". If set, and the unit is shut down, then the
initial SIGTERM signal is sent only to the main daemon
process, while the following SIGKILL signal is sent to
all remaining processes of the service.
+ logind will now also track a "Desktop" identifier for each
session which encodes the desktop environment of it. This is
useful for desktop environments that want to identify
multiple running sessions of itself easily.
+ A new SELinuxContext= setting for service units has been
added that allows setting a specific SELinux execution
context for a service.
+ Most systemd client tools will now honour $SYSTEMD_LESS for
settings of the "less" pager.
+ systemd's "seccomp" hook-up has been changed to make use of
the libseccomp library instead of using its own
implementation. This has benefits for portability among
other things.
- Dropped systemd patches as those are fixed upstream:
* 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch
* 0002-fix-lingering-references-to-var-lib-backlight-random.patch
* 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch
* 0004-systemctl-fix-name-mangling-for-sysv-units.patch
* 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch
* 0006-journald-add-missing-error-check.patch
* 0007-bus-fix-potentially-uninitialized-memory-access.patch
* 0008-dbus-fix-return-value-of-dispatch_rqueue.patch
* 0009-modules-load-fix-error-handling.patch
* 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch
* 0011-strv-don-t-access-potentially-NULL-string-arrays.patch
* 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch
* 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch
* 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
* 0001-gpt-auto-generator-exit-immediately-if-in-container.patch
* 0001-manager-when-verifying-whether-clients-may-change-en.patch
* 0001-logind-fix-bus-introspection-data-for-TakeControl.patch
* 0001-mount-check-for-NULL-before-reading-pm-what.patch
* 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
* 0001-systemd-serialize-deserialize-forbid_restart-value.patch
* 0001-core-unify-the-way-we-denote-serialization-attribute.patch
* 0001-journald-fix-minor-memory-leak.patch
* 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch
* 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch
* 0001-login-fix-invalid-free-in-sd_session_get_vt.patch
* 0001-login-make-sd_session_get_vt-actually-work.patch
* 0001-Never-call-qsort-on-potentially-NULL-arrays.patch
* 0001-dbus-common-avoid-leak-in-error-path.patch
* 0001-drop-ins-check-return-value.patch
* 0001-shared-util-Fix-glob_extend-argument.patch
* 0001-Fix-bad-assert-in-show_pid_array.patch
* 0001-analyze-set-white-background.patch
* 0001-analyze-set-text-on-side-with-most-space.patch
* analyze-fix-crash-in-command-line-parsing.patch
* 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch
* 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
* 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
* 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
* U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
* build-sys-make-multi-seat-x-optional.patch
* 1017-skip-native-unit-handling-if-sysv-already-handled.patch
* 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch
* 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch
* 0031-man-document-the-b-special-boot-option.patch
* 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch
* 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch
* 0035-activate-mention-E-in-the-help-text.patch
* 0036-activate-fix-crash-when-s-is-passed.patch
* 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch
* 0038-core-socket-fix-SO_REUSEPORT.patch
* 0039-journal-when-appending-to-journal-file-allocate-larg.patch
* 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch
* 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch
* 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch
* 0043-journal-simplify-pre-allocation-logic.patch
* 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch
* 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch
* 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch
* 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch
* 0049-systemd-treat-reload-failure-as-failure.patch
- Dropped backported systemd patches as those are fixed upstream
* 0145-logind-use-correct-who-enum-values-with-KillUnit.patch
* 1011-check-4-valid-kmsg-device.patch
* 0001-logind-garbage-collect-stale-users.patch
- Dropped udev patches as those are fixed fixed upstream:
* 0026-udevadm.xml-document-resolve-names-option-for-test.patch
* 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch
- Modified patches
* 1006-udev-always-rename-network.patch
- Replaced patches
* the patch
1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
is upstream now but has to be replaced by patch
0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
to fix an further issue similar to the upstream patch (bnc#852015)
* the patch
0001-upstream-systemctl-halt-reboot-error-handling.patch
is upstream now, only the part with the halt after a failed poweroff
has been added to the patch
0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
-------------------------------------------------------------------
Thu Feb 27 15:13:09 UTC 2014 - werner@suse.de
- Add patch 0001-make-209-working-on-older-dist.patch to make
it usable on older distributions like 13.1
-------------------------------------------------------------------
Wed Feb 26 12:43:17 UTC 2014 - werner@suse.de
@ -6,6 +273,26 @@ Wed Feb 26 12:43:17 UTC 2014 - werner@suse.de
device as this ensures at shutdown that the NFS share becomes
unmounted before the interface is down (bnc#861489)
+-------------------------------------------------------------------
Sun Feb 23 23:47:06 UTC 2014 - stefan.bruens@rwth-aachen.de
- enable compat-libs, BuildRequires binutils-gold
("old" ld fails on ifunc magic)
-------------------------------------------------------------------
Sun Feb 23 16:11:22 UTC 2014 - stefan.bruens@rwth-aachen.de
- add network link configuration for udev
-------------------------------------------------------------------
Sun Feb 23 15:44:01 UTC 2014 - stefan.bruens@rwth-aachen.de
- Modify patch 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch,
move to core and link in directly to avoid libudev dep all over
- Disable networkd
- Disable compat-libs, adapt files section
- add and remove some entries in the files section
-------------------------------------------------------------------
Fri Feb 21 16:04:54 UTC 2014 - werner@suse.de

View File

@ -21,16 +21,22 @@
%define udevpkgname udev
%define udev_major 1
%bcond_without bash_completion
%bcond_without compat_libs
%bcond_with networkd
%bcond_with python
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 208
Version: 209
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
Group: System/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: audit-devel
%if %{with compat_libs}
BuildRequires: binutils-gold
%endif
%if ! 0%{?bootstrap}
BuildRequires: dbus-1
BuildRequires: docbook-xsl-stylesheets
@ -47,6 +53,7 @@ BuildRequires: intltool
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libcap-devel
BuildRequires: libkmod-devel
BuildRequires: libsepol-devel
BuildRequires: libtool
%if ! 0%{?bootstrap}
@ -63,10 +70,17 @@ BuildRequires: pkgconfig(blkid) >= 2.20
BuildRequires: pkgconfig(dbus-1) >= 1.3.2
%if ! 0%{?bootstrap}
BuildRequires: libgcrypt-devel
%if %{with python}
BuildRequires: python
%endif
BuildRequires: pkgconfig(glib-2.0) >= 2.22.0
BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0
%endif
%if 0%{?suse_version} <= 1310
BuildRequires: pkgconfig(libkmod) >= 14
%else
BuildRequires: pkgconfig(libkmod) >= 15
%endif
BuildRequires: pkgconfig(liblzma)
%if ! 0%{?bootstrap}
BuildRequires: pkgconfig(libmicrohttpd)
@ -77,6 +91,9 @@ BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(usbutils) >= 0.82
%endif
%if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(libseccomp)
%endif
BuildRequires: pkgconfig(libselinux) >= 2.1.9
BuildRequires: pkgconfig(libsepol)
%if 0%{?bootstrap}
@ -178,160 +195,42 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run
Patch47: systemd-dbus-system-bus-address.patch
# PATCH-FIX-UPSTREAM 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch fcrozat@suse.com -- fix acpi memleak
Patch48: 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch
# PATCH-FIX-UPSTREAM 0002-fix-lingering-references-to-var-lib-backlight-random.patch fcrozat@suse.com -- fix invalid path in documentation
Patch49: 0002-fix-lingering-references-to-var-lib-backlight-random.patch
# PATCH-FIX-UPSTREAM 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch fcrozat@suse.com -- fix invalid memory free
Patch50: 0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch
# PATCH-FIX-UPSTREAM 0004-systemctl-fix-name-mangling-for-sysv-units.patch fcrozat@suse.com -- fix name mangling for sysv units
Patch51: 0004-systemctl-fix-name-mangling-for-sysv-units.patch
# PATCH-FIX-UPSTREAM 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch fcrozat@suse.com -- fix OOM handling
Patch52: 0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch
# PATCH-FIX-UPSTREAM 0006-journald-add-missing-error-check.patch fcrozat@suse.com -- add missing error check
Patch53: 0006-journald-add-missing-error-check.patch
# PATCH-FIX-UPSTREAM 0007-bus-fix-potentially-uninitialized-memory-access.patch fcrozat@suse.com -- fix uninitialized memory access
Patch54: 0007-bus-fix-potentially-uninitialized-memory-access.patch
# PATCH-FIX-UPSTREAM 0008-dbus-fix-return-value-of-dispatch_rqueue.patch fcrozat@suse.com -- fix return value
Patch55: 0008-dbus-fix-return-value-of-dispatch_rqueue.patch
# PATCH-FIX-UPSTREAM 0009-modules-load-fix-error-handling.patch fcrozat@suse.com -- fix error handling
Patch56: 0009-modules-load-fix-error-handling.patch
# PATCH-FIX-UPSTREAM 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- fix incorrect memory access
Patch57: 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch
# PATCH-FIX-UPSTREAM 0011-strv-don-t-access-potentially-NULL-string-arrays.patch fcrozat@suse.com -- fix incorrect memory access
Patch58: 0011-strv-don-t-access-potentially-NULL-string-arrays.patch
# PATCH-FIX-UPSTREAM 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch fcrozat@suse.com -- fix invalid pointer
Patch59: 0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch
# PATCH-FIX-UPSTREAM 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch fcrozat@suse.com -- fix permission on /run/log/journal
Patch60: 0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch
# PATCH-FIX-UPSTREAM 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch fcrozat@suse.com -- order remote mount points properly before remote-fs.target
Patch61: 0001-systemd-order-remote-mounts-from-mountinfo-before-re.patch
# PATCH-FIX-UPSTREAM 0001-gpt-auto-generator-exit-immediately-if-in-container.patch fcrozat@suse.com -- don't start gpt auto-generator in container
Patch62: 0001-gpt-auto-generator-exit-immediately-if-in-container.patch
# PATCH-FIX-UPSTREAM 0001-manager-when-verifying-whether-clients-may-change-en.patch fcrozat@suse.com -- fix reload check in selinux case
Patch63: 0001-manager-when-verifying-whether-clients-may-change-en.patch
# PATCH-FIX-UPSTREAM 0001-logind-fix-bus-introspection-data-for-TakeControl.patch fcrozat@suse.com -- fix introspection for TakeControl
Patch64: 0001-logind-fix-bus-introspection-data-for-TakeControl.patch
# PATCH-FIX-UPSTREAM 0001-mount-check-for-NULL-before-reading-pm-what.patch fcrozat@suse.com -- fix crash when parsing some incorrect unit
Patch65: 0001-mount-check-for-NULL-before-reading-pm-what.patch
# PATCH-FIX-UPSTREAM 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch fcrozat@suse.com -- Fix udev rules parsing
Patch66: 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch
# PATCH-FIX-UPSTREAM 0001-systemd-serialize-deserialize-forbid_restart-value.patch fcrozat@suse.com -- Fix incorrect deserialization for forbid_restart
Patch67: 0001-systemd-serialize-deserialize-forbid_restart-value.patch
# PATCH-FIX-UPSTREAM 0001-core-unify-the-way-we-denote-serialization-attribute.patch fcrozat@suse.com -- Ensure forbid_restart is named like other attributes
Patch68: 0001-core-unify-the-way-we-denote-serialization-attribute.patch
# PATCH-FIX-UPSTREAM 0001-journald-fix-minor-memory-leak.patch fcrozat@suse.com -- fix memleak in journald
Patch69: 0001-journald-fix-minor-memory-leak.patch
# PATCH-FIX-UPSTREAM 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch fcrozat@suse.com -- Improve ACPI firmware performance parsing
Patch70: 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch
# PATCH-FIX-UPSTREAM 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch fcrozat@suse.com -- Fix journal rotation
Patch71: 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch
# PATCH-FIX-UPSTREAM 0001-login-fix-invalid-free-in-sd_session_get_vt.patchfcrozat@suse.com -- Fix memory corruption in sd_session_get_vt
Patch72: 0001-login-fix-invalid-free-in-sd_session_get_vt.patch
# PATCH-FIX-UPSTREAM 0001-login-make-sd_session_get_vt-actually-work.patch fcrozat@suse.com -- Ensure sd_session_get_vt returns correct value
Patch73: 0001-login-make-sd_session_get_vt-actually-work.patch
# PATCH-FIX-UPSTREAM 0001-Never-call-qsort-on-potentially-NULL-arrays.patch fcrozat@suse.com -- Don't call qsort on NULL arrays
Patch74: 0001-Never-call-qsort-on-potentially-NULL-arrays.patch
# PATCH-FIX-UPSTREAM 0001-dbus-common-avoid-leak-in-error-path.patch fcrozat@suse.com -- Fix memleak in dbus-common code
Patch75: 0001-dbus-common-avoid-leak-in-error-path.patch
# PATCH-FIX-UPSTREAM 0001-drop-ins-check-return-value.patch fcrozat@suse.com -- Fix return value for drop-ins checks
Patch76: 0001-drop-ins-check-return-value.patch
# PATCH-FIX-UPSTREAM 0001-shared-util-Fix-glob_extend-argument.patch fcrozat@suse.com -- Fix glob_extend argument
Patch77: 0001-shared-util-Fix-glob_extend-argument.patch
# PATCH-FIX-UPSTREAM 0001-Fix-bad-assert-in-show_pid_array.patch fcrozat@suse.com -- Fix bad assert in show_pid_array
Patch78: 0001-Fix-bad-assert-in-show_pid_array.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-white-background.patch werner@suse.com -- Make background of systemd-analyze SVG white
Patch79: 0001-analyze-set-white-background.patch
# PATCH-FIX-UPSTREAM 0001-analyze-set-text-on-side-with-most-space.patch werner@suse.com -- Place the text on the side with most space
Patch80: 0001-analyze-set-text-on-side-with-most-space.patch
# PATCH-FIX-UPSTREAM 0001-logind-garbage-collect-stale-users.patch -- Don't stop a running user manager from garbage-collecting the user.
Patch81: 0001-logind-garbage-collect-stale-users.patch
# PATCH-FIX-UPSTREAM analyze-fix-crash-in-command-line-parsing.patch fcrozat@suse.com bnc#859365 -- Fix crash in systemd-analyze
Patch82: analyze-fix-crash-in-command-line-parsing.patch
# PATCH-FIX-UPSTREAM 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch -- Prevent accidental kill of emergency shell (bnc#852021)
Patch83: 0001-core-replace-OnFailureIsolate-setting-by-a-more-gene.patch
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
# PATCH-FIX-UPSTREAM 0001-upstream-systemctl-halt-reboot-error-handling.patch
Patch85: 0001-upstream-systemctl-halt-reboot-error-handling.patch
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
# PATCH-FIX-UPSTREAM 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch -- Allow sending SIGTERM to main PID only (bnc#841544)
Patch87: 0001-core-introduce-new-KillMode-mixed-which-sends-SIGTER.patch
# PATCH-FIX-UPSTREAM 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch -- Allow using it with PAM enabled services (bnc#841544)
Patch88: 0002-service-allow-KillMode-mixed-in-conjunction-with-PAM.patch
# PATCH-FIX-UPSTREAM 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch -- Make sure final SIGKILL actually kills everything (bnc#841544)
Patch89: 0003-core-make-sure-to-always-go-through-both-SIGTERM-and.patch
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
Patch91: plymouth-quit-and-wait-for-emergency-service.patch
# PATCH-FIX-SUSE 0145-logind-use-correct-who-enum-values-with-KillUnit.patch -- Be able to kill sessions (bnc#860574)
Patch92: 0145-logind-use-correct-who-enum-values-with-KillUnit.patch
# PATCH-FIX-SUSE 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch -- Avoid systemd crash on resume (bnc#861488)
Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch115: 0001-add-network-device-after-NFS-mount-units.patch
# PATCH-FIX-USTREAM 0001-units-serial-getty-.service-add-Install-section.patch werner@suse.com
Patch116: 0001-units-serial-getty-.service-add-Install-section.patch
# PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com
Patch117: 0001-make-209-working-on-older-dist.patch
# PATCH-FIX-SUSE 0001-make-tests-with-libseccomp-work.patch werner@suse.com
Patch118: 0001-make-tests-with-libseccomp-work.patch
# PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com
Patch119: 0001-make-fortify-happy-with-ppoll.patch
# PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com
Patch120: 0001-avoid-abort-due-timeout-at-user-service.patch
# PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844)
Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch
# PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071)
Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch
# PATCH-FIX-OPENSUSE 1011-check-4-valid-kmsg-device.patch -- Avoid busy systemd-journald (bnc#851393)
Patch1011: 1011-check-4-valid-kmsg-device.patch
# PATCH-FIX-UPSTREAM 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 1012-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-UPSTREAM U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
Patch1013: U_logind_revert_lazy_session_activation_on_non_vt_seats.patch
# PATCH-FIX-SUSE 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
Patch1012: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch
# PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch
Patch1014: 1014-journald-with-journaling-FS.patch
# PATCH-FIX-UPSTREAM build-sys-make-multi-seat-x-optional.patch
Patch1015: build-sys-make-multi-seat-x-optional.patch
# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch
Patch1016: 1016-support-powerfail-with-powerstatus.patch
# PATCH-FIX-UPSTREAM 1017-skip-native-unit-handling-if-sysv-already-handled.patch
Patch1017: 1017-skip-native-unit-handling-if-sysv-already-handled.patch
# PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch
Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch
# PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch
Patch1019: 1019-make-completion-smart-to-be-able-to-redirect.patch
# PATCH-FIX-UPSTREAM 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch werner@suse.com
Patch94: 0018-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch
# PATCH-FIX-UPSTREAM 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch werner@suse.com
Patch96: 0030-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch
# PATCH-FIX-UPSTREAM 0031-man-document-the-b-special-boot-option.patch werner@suse.com
Patch97: 0031-man-document-the-b-special-boot-option.patch
# PATCH-FIX-UPSTREAM 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch werner@suse.com
Patch99: 0033-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch
# PATCH-FIX-UPSTREAM 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch werner@suse.com
Patch100: 0034-systemd-python-fix-booted-and-add-two-functions-to-d.patch
# PATCH-FIX-UPSTREAM 0035-activate-mention-E-in-the-help-text.patch werner@suse.com
Patch101: 0035-activate-mention-E-in-the-help-text.patch
# PATCH-FIX-UPSTREAM 0036-activate-fix-crash-when-s-is-passed.patch werner@suse.com
Patch102: 0036-activate-fix-crash-when-s-is-passed.patch
# PATCH-FIX-UPSTREAM 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch werner@suse.com
Patch103: 0037-tmpfiles-adjust-excludes-for-the-new-per-service-pri.patch
# PATCH-FIX-UPSTREAM 0038-core-socket-fix-SO_REUSEPORT.patch werner@suse.com
Patch104: 0038-core-socket-fix-SO_REUSEPORT.patch
# PATCH-FIX-UPSTREAM 0039-journal-when-appending-to-journal-file-allocate-larg.patch werner@suse.com
Patch105: 0039-journal-when-appending-to-journal-file-allocate-larg.patch
# PATCH-FIX-UPSTREAM 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch werner@suse.com
Patch106: 0040-journal-optimize-bisection-logic-a-bit-by-caching-th.patch
# PATCH-FIX-UPSTREAM 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch werner@suse.com
Patch107: 0041-journal-fix-iteration-when-we-go-backwards-from-the-.patch
# PATCH-FIX-UPSTREAM 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch werner@suse.com
Patch108: 0042-journal-allow-journal_file_copy_entry-to-work-on-non.patch
# PATCH-FIX-UPSTREAM 0043-journal-simplify-pre-allocation-logic.patch werner@suse.com
Patch109: 0043-journal-simplify-pre-allocation-logic.patch
# PATCH-FIX-UPSTREAM 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch werner@suse.com
Patch110: 0044-journald-mention-how-long-we-needed-to-flush-to-var-.patch
# PATCH-FIX-UPSTREAM 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch werner@suse.com
Patch111: 0046-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch
# PATCH-FIX-UPSTREAM 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch werner@suse.com
Patch112: 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch
# PATCH-FIX-UPSTREAM 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch werner@suse.com
Patch113: 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch
# PATCH-FIX-UPSTREAM 0049-systemd-treat-reload-failure-as-failure.patch werner@suse.com
Patch114: 0049-systemd-treat-reload-failure-as-failure.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch115: 0001-add-network-device-after-NFS-mount-units.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -342,16 +241,10 @@ Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
Patch1003: 1003-udev-netlink-null-rules.patch
# PATCH-FIX-OPENSUSE 1005-create-default-links-for-primary-cd_dvd-drive.patch
Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch
# PATCH-FIX-OPENSUSE 1006-udev-always-rename-network.patch
Patch1006: 1006-udev-always-rename-network.patch
# PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch
Patch1007: 1007-physical-hotplug-cpu-and-memory.patch
# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch
Patch1008: 1008-add-msft-compability-rules.patch
# PATCH-FIX-UPSTREAM 0026-udevadm.xml-document-resolve-names-option-for-test.patch werner@suse.com
Patch95: 0026-udevadm.xml-document-resolve-names-option-for-test.patch
# PATCH-FIX-UPSTREAM 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch werner@suse.com
Patch98: 0032-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -585,7 +478,9 @@ cp %{SOURCE7} m4/
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch27 -p1
# check if this is still needed, or can be derived from fbdev uaccess rule
# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html
# %patch27 -p1
%patch37 -p1
%ifarch %arm
%patch38 -p1
@ -596,97 +491,38 @@ cp %{SOURCE7} m4/
%patch42 -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
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch79 -p1
%patch80 -p1
%patch81 -p1
%patch82 -p1
%patch83 -p1
%patch84 -p1
%patch85 -p1
%patch86 -p1
%patch87 -p1
%patch88 -p1
%patch89 -p1
%patch90 -p1
%patch91 -p1
%patch92 -p1
%patch93 -p1
%patch115 -p1
%patch116 -p1
%if 0%{?suse_version} <= 1310
%patch117 -p1
%endif
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch1009 -p1
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch1013 -p1
%patch1014 -p1
%patch1015 -p1
%patch1016 -p1
%patch1017 -p1
%patch1018 -p1
%patch1019 -p1
%patch94 -p0
%patch96 -p0
%patch97 -p0
%patch99 -p0
%patch100 -p0
%patch101 -p0
%patch102 -p0
%patch103 -p0
%patch104 -p0
%patch105 -p0
%patch106 -p0
%patch107 -p0
%patch108 -p0
%patch109 -p0
%patch110 -p0
%patch111 -p0
%patch112 -p0
%patch113 -p0
%patch114 -p0
%patch115 -p1
# udev patches
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1005 -p1
%patch1006 -p1
#%patch1006 -p1 -b .xy
# don't apply when bootstrapping to not modify Makefile.am
%if ! 0%{?bootstrap}
%patch1007 -p1
%patch1008 -p1
%endif
%patch95 -p0
%patch98 -p0
# ensure generate files are removed
rm -f units/emergency.service
@ -705,8 +541,14 @@ export V=1
--disable-myhostname \
%else
--enable-manpages \
%if %{with python}
--with-python \
%endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \
%if %{with compat_libs}
--enable-compat-libs \
%endif
%endif
--enable-selinux \
--enable-split-usr \
@ -719,43 +561,52 @@ export V=1
--disable-ima \
%if 0%{?suse_version} > 1310
--disable-multi-seat-x \
%endif
%if %{without networkd}
--disable-networkd \
%endif
CFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
make install DESTDIR="%buildroot"
%if %{without python}
for man in systemd.directives.7 systemd.index.7
do
install -m 0644 man/$man %{buildroot}%{_mandir}/man7/
done
%endif
# move to %{_lib}
%if ! 0%{?bootstrap}
mv $RPM_BUILD_ROOT%{_libdir}/libnss_myhostname.so.2 $RPM_BUILD_ROOT/%{_lib}
mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib}
%endif
mkdir -p $RPM_BUILD_ROOT/{sbin,lib,bin}
ln -sf %{_bindir}/udevadm $RPM_BUILD_ROOT/sbin/udevadm
ln -sf %{_bindir}/systemd-ask-password $RPM_BUILD_ROOT/bin/systemd-ask-password
ln -sf %{_bindir}/systemctl $RPM_BUILD_ROOT/bin/systemctl
ln -sf %{_prefix}/lib/systemd/systemd-udevd $RPM_BUILD_ROOT/sbin/udevd
mkdir -p %{buildroot}/{sbin,lib,bin}
ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm
ln -sf %{_bindir}/systemd-ask-password %{buildroot}/bin/systemd-ask-password
ln -sf %{_bindir}/systemctl %{buildroot}/bin/systemctl
ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd
%if ! 0%{?bootstrap}
ln -sf systemd-udevd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/udevd.8
ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8
%endif
ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
ln -sf /lib/firmware %{buildroot}/usr/lib/firmware
%if ! 0%{?bootstrap}
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
install -m755 -D %{S:8} %{buildroot}/etc/init.d/systemd-journald
install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config
%endif
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
install -m755 -D %{S:1060} %{buildroot}/etc/init.d/boot.udev
ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule
install -m755 -D %{S:1061} %{buildroot}/%{_prefix}/lib/udev/write_dev_root_rule
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062}
install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants
install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service
mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants
ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants
rm -rf %{buildroot}%{_sysconfdir}/rpm
find %{buildroot} -type f -name '*.la' -delete
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants}
@ -1065,6 +916,7 @@ exit 0
/bin/systemd-ask-password
/bin/systemctl
%{_bindir}/bootctl
%{_bindir}/busctl
%{_bindir}/kernel-install
%{_bindir}/hostnamectl
%{_bindir}/localectl
@ -1089,10 +941,13 @@ exit 0
%{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl
%{_sbindir}/systemd-sysv-convert
%{_libdir}/libsystemd.so.*
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so.*
%{_libdir}/libsystemd-login.so.*
%{_libdir}/libsystemd-id128.so.*
%{_libdir}/libsystemd-journal.so.*
%endif
%{_bindir}/systemd-cgls
%{_bindir}/systemd-cgtop
%{_bindir}/systemd-cat
@ -1110,6 +965,7 @@ exit 0
%exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service
%exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.*
%{_prefix}/lib/systemd/system/*.automount
%{_prefix}/lib/systemd/system/*.busname
%{_prefix}/lib/systemd/system/*.service
%{_prefix}/lib/systemd/system/*.slice
%{_prefix}/lib/systemd/system/*.target
@ -1126,7 +982,7 @@ exit 0
%{_prefix}/lib/systemd/systemd
%dir %{_prefix}/lib/systemd/catalog
%{_prefix}/lib/systemd/catalog/systemd.catalog
%dir %{_prefix}/lib/systemd/system-shutdown
%{_prefix}/lib/systemd/catalog/systemd.*.catalog
%dir %{_prefix}/lib/systemd/system-shutdown
%dir %{_prefix}/lib/systemd/system-preset
%dir %{_prefix}/lib/systemd/user-preset
@ -1183,10 +1039,6 @@ exit 0
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
%{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
@ -1203,6 +1055,7 @@ exit 0
%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
%exclude %{_datadir}/systemd/gatewayd
%{_datadir}/systemd
%{_datadir}/locale/*/LC_MESSAGES
%if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage
@ -1232,7 +1085,6 @@ exit 0
%if ! 0%{?bootstrap}
%{_prefix}/lib/udev/numlock-on
%endif
%ghost /var/lib/systemd/catalog/database
%if 0%{suse_version} < 1310
%{_sysconfdir}/rpm/macros.systemd
%endif
@ -1261,22 +1113,28 @@ exit 0
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsystemd.so
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so
%{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so
%endif
%dir %{_includedir}/systemd
%{_includedir}/systemd/sd-login.h
%{_includedir}/systemd/sd-daemon.h
%{_includedir}/systemd/sd-id128.h
%{_includedir}/systemd/sd-journal.h
%{_includedir}/systemd/sd-messages.h
%{_includedir}/systemd/sd-shutdown.h
%{_includedir}/systemd/_sd-common.h
%{_datadir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc
%if %{with compat_libs}
%{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc
%endif
%files sysvinit
%defattr(-,root,root,-)
@ -1341,6 +1199,8 @@ exit 0
%{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev*.service
%dir %{_prefix}/lib/systemd/system/sockets.target.wants
%{_prefix}/lib/systemd/system/sockets.target.wants/systemd-udev*.socket
%dir %{_prefix}/lib/systemd/network
%{_prefix}/lib/systemd/network/*.link
%files -n lib%{udevpkgname}%{udev_major}
%defattr(-,root,root)

View File

@ -14,11 +14,11 @@ Subject: timedate: add support for openSUSE version of /etc/sysconfig/clock
}
+#ifdef HAVE_SYSV_COMPAT
+ r = parse_env_file("/etc/sysconfig/clock", NEWLINE,
+ "TIMEZONE", &tz.zone,
+ "TIMEZONE", &c->zone,
+ NULL);
+ if (r < 0 && r != -ENOENT)
+ log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r));
+#endif
have_timezone:
if (isempty(tz.zone)) {
if (isempty(c->zone)) {