From 65878a77c94ae66605a14f6ac46d3e8e5bbbea42 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 02:14:24 +0000 Subject: import systemd-208-99.atomic.0.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5434520 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/systemd-208.tar.xz diff --git a/.systemd.metadata b/.systemd.metadata new file mode 100644 index 0000000..ddc02ad --- /dev/null +++ b/.systemd.metadata @@ -0,0 +1 @@ +e1a4e213d5d1e3498bca851347f2f07fdb9b4e1f SOURCES/systemd-208.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-core-make-sure-to-serialize-jobs-for-all-units.patch b/SOURCES/0001-core-make-sure-to-serialize-jobs-for-all-units.patch new file mode 100644 index 0000000..bfda215 --- /dev/null +++ b/SOURCES/0001-core-make-sure-to-serialize-jobs-for-all-units.patch @@ -0,0 +1,111 @@ +From 45422dd99a43700b159effe5e234b9013d850738 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 16 May 2014 01:15:03 +0200 +Subject: [PATCH] core: make sure to serialize jobs for all units + +Previously we wouldn't serialize jobs for units that themselves have +nothing to serialize. + +http://lists.freedesktop.org/archives/systemd-devel/2014-May/019051.html + +Conflicts: + src/core/unit.c +--- + src/core/manager.c | 3 --- + src/core/unit.c | 45 +++++++++++++++++++++------------------------ + 2 files changed, 21 insertions(+), 27 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index a2810b4..4ad26e1 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -2169,9 +2169,6 @@ int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool switching_root) { + if (u->id != t) + continue; + +- if (!unit_can_serialize(u)) +- continue; +- + /* Start marker */ + fputs(u->id, f); + fputc('\n', f); +diff --git a/src/core/unit.c b/src/core/unit.c +index 17792d1..855e135 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -2296,24 +2296,10 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { + assert(f); + assert(fds); + +- if (!unit_can_serialize(u)) +- return 0; +- +- r = UNIT_VTABLE(u)->serialize(u, f, fds); +- if (r < 0) +- return r; +- +- +- if (serialize_jobs) { +- if (u->job) { +- fprintf(f, "job\n"); +- job_serialize(u->job, f, fds); +- } +- +- if (u->nop_job) { +- fprintf(f, "job\n"); +- job_serialize(u->nop_job, f, fds); +- } ++ if (unit_can_serialize(u)) { ++ r = UNIT_VTABLE(u)->serialize(u, f, fds); ++ if (r < 0) ++ return r; + } + + dual_timestamp_serialize(f, "inactive-exit-timestamp", &u->inactive_exit_timestamp); +@@ -2330,6 +2316,18 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { + if (u->cgroup_path) + unit_serialize_item(u, f, "cgroup", u->cgroup_path); + ++ if (serialize_jobs) { ++ if (u->job) { ++ fprintf(f, "job\n"); ++ job_serialize(u->job, f, fds); ++ } ++ ++ if (u->nop_job) { ++ fprintf(f, "job\n"); ++ job_serialize(u->nop_job, f, fds); ++ } ++ } ++ + /* End marker */ + fputc('\n', f); + return 0; +@@ -2369,9 +2367,6 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { + assert(f); + assert(fds); + +- if (!unit_can_serialize(u)) +- return 0; +- + for (;;) { + char line[LINE_MAX], *l, *v; + size_t k; +@@ -2484,9 +2479,11 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { + continue; + } + +- r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds); +- if (r < 0) +- return r; ++ if (unit_can_serialize(u)) { ++ r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds); ++ if (r < 0) ++ return r; ++ } + } + } + +-- +1.8.3.1 + diff --git a/SOURCES/0001-systemctl-unbreak-switchroot.patch b/SOURCES/0001-systemctl-unbreak-switchroot.patch new file mode 100644 index 0000000..72f9682 --- /dev/null +++ b/SOURCES/0001-systemctl-unbreak-switchroot.patch @@ -0,0 +1,74 @@ +From fee295c75582ada1c7cfe8a2b69f32d610d92020 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Fri, 12 Sep 2014 13:27:36 +0200 +Subject: [PATCH] systemctl: unbreak switchroot + +rhel-only patch +cad8ec5980d63253586d9f884649c45eed0667a1 backport broke it + +Related: #1138546 +--- + src/systemctl/systemctl.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 90a80bd..544025c 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4147,8 +4147,8 @@ static int show_enviroment(DBusConnection *bus, char **args) { + } + + static int switch_root(DBusConnection *bus, char **args) { +- _cleanup_free_ char *cmdline_init = NULL; +- const char *root, *init; ++ _cleanup_free_ char *init = NULL; ++ const char *root; + unsigned l; + int r; + +@@ -4161,23 +4161,20 @@ static int switch_root(DBusConnection *bus, char **args) { + root = args[1]; + + if (l >= 3) +- init = args[2]; ++ init = strdup(args[2]); + else { + r = parse_env_file("/proc/cmdline", WHITESPACE, +- "init", &cmdline_init, ++ "init", &init, + NULL); + if (r < 0) + log_debug("Failed to parse /proc/cmdline: %s", strerror(-r)); + +- init = cmdline_init; ++ if (!init) ++ init = strdup(""); + } +- if (!init) +- return log_oom(); + +- if (isempty(init)) +- init = NULL; + +- if (init) { ++ if (!isempty(init)) { + const char *root_systemd_path = NULL, *root_init_path = NULL; + + root_systemd_path = strappenda(root, "/" SYSTEMD_BINARY_PATH); +@@ -4186,9 +4183,12 @@ static int switch_root(DBusConnection *bus, char **args) { + /* If the passed init is actually the same as the + * systemd binary, then let's suppress it. */ + if (files_same(root_init_path, root_systemd_path) > 0) +- init = NULL; ++ init = strdup(""); + } + ++ if (!init) ++ return log_oom(); ++ + log_debug("Switching root - root: %s; init: %s", root, strna(init)); + + return bus_method_call_with_reply( +-- +1.8.3.1 + diff --git a/SOURCES/0001-systemd-detect-virt-fix-detect-s390-virtualization.patch b/SOURCES/0001-systemd-detect-virt-fix-detect-s390-virtualization.patch new file mode 100644 index 0000000..666da1c --- /dev/null +++ b/SOURCES/0001-systemd-detect-virt-fix-detect-s390-virtualization.patch @@ -0,0 +1,31 @@ +From 9e1b1d3414528a7cd6182f06c91db8bffe7ee90e Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Fri, 12 Sep 2014 15:23:50 +0200 +Subject: [PATCH] systemd-detect-virt: fix detect s390 virtualization + +rhel-only patch + +Related: #1139149 +--- + src/shared/virt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/shared/virt.c b/src/shared/virt.c +index 5466d97..fca8515 100644 +--- a/src/shared/virt.c ++++ b/src/shared/virt.c +@@ -182,9 +182,9 @@ int detect_vm(const char **id) { + r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t); + if (r >= 0) { + if (streq(t, "z/VM")) +- _id = "zvm"; ++ *id = "zvm"; + else +- _id = "kvm"; ++ *id = "kvm"; + + return 1; + } +-- +1.8.3.1 + diff --git a/SOURCES/0001-units-add-Install-section-to-tmp.mount.patch b/SOURCES/0001-units-add-Install-section-to-tmp.mount.patch new file mode 100644 index 0000000..3bf21ee --- /dev/null +++ b/SOURCES/0001-units-add-Install-section-to-tmp.mount.patch @@ -0,0 +1,23 @@ +From b4aeab33ff172b608930daf77a6f7af47bf2fdc9 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +Date: Fri, 15 Feb 2013 09:07:57 +0100 +Subject: [PATCH] units: add [Install] section to tmp.mount + +Change-Id: I2e6d129de00a9afaf7558006c886866f64394c29 +Related: #908253 +--- + units/tmp.mount | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/units/tmp.mount b/units/tmp.mount +index 99a3ba3..9e4803a 100644 +--- a/units/tmp.mount ++++ b/units/tmp.mount +@@ -18,3 +18,7 @@ What=tmpfs + Where=/tmp + Type=tmpfs + Options=mode=1777,strictatime ++ ++# Make 'systemctl enable tmp.mount' work: ++[Install] ++WantedBy=local-fs.target diff --git a/SOURCES/0002-man-explain-NAME-in-systemctl-man-page.patch b/SOURCES/0002-man-explain-NAME-in-systemctl-man-page.patch new file mode 100644 index 0000000..04990de --- /dev/null +++ b/SOURCES/0002-man-explain-NAME-in-systemctl-man-page.patch @@ -0,0 +1,33 @@ +From bc7d6c8e11a22d29b14b6070117f261961eadb23 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= +Date: Thu, 31 Oct 2013 14:36:41 +0100 +Subject: [PATCH] man: explain NAME in systemctl man page + +--- + man/systemctl.xml | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/man/systemctl.xml b/man/systemctl.xml +index e789d4b..166282c 100644 +--- a/man/systemctl.xml ++++ b/man/systemctl.xml +@@ -63,6 +63,19 @@ along with systemd; If not, see . + introspect and control the state of the + systemd1 + system and service manager. ++ ++ For Unit Commands the NAME represents full name of unit. ++ ++systemctl start foo.service ++ ++ For Unit File Commands the NAME represents full name of the unit file, or absolute path to the unit file. ++ ++systemctl start /path/to/foo.service ++ ++ While working with services/service files, systemctl is able to append .service suffix when it is missing. ++ ++systemctl start foo ++ + + + diff --git a/SOURCES/0003-fix-lingering-references-to-var-lib-backlight-random.patch b/SOURCES/0003-fix-lingering-references-to-var-lib-backlight-random.patch new file mode 100644 index 0000000..2705795 --- /dev/null +++ b/SOURCES/0003-fix-lingering-references-to-var-lib-backlight-random.patch @@ -0,0 +1,51 @@ +From 635ba7207a9afa3fa1b0c4e804c6823d71c04d1c Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Wed, 2 Oct 2013 07:46:24 -0400 +Subject: [PATCH] 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 +- /var/lib/backlight/. Note that by ++ /var/lib/systemd/backlight/. Note that by + default, only firmware backlight devices are + saved/restored. + +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 +- /var/lib/random-seed. ++ /var/lib/systemd/random-seed. + + + +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 diff --git a/SOURCES/0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch b/SOURCES/0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch new file mode 100644 index 0000000..828744c --- /dev/null +++ b/SOURCES/0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch @@ -0,0 +1,45 @@ +From cfb20c251cb79820ddf7507f9f4a54cc3f18b121 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:36:28 +0200 +Subject: [PATCH] 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; diff --git a/SOURCES/0005-journald-add-missing-error-check.patch b/SOURCES/0005-journald-add-missing-error-check.patch new file mode 100644 index 0000000..8d7c1d6 --- /dev/null +++ b/SOURCES/0005-journald-add-missing-error-check.patch @@ -0,0 +1,22 @@ +From dc74e25f66f2aa56b6c6fa2fd51fd1ee02a4b770 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:36:43 +0200 +Subject: [PATCH] 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); diff --git a/SOURCES/0006-bus-fix-potentially-uninitialized-memory-access.patch b/SOURCES/0006-bus-fix-potentially-uninitialized-memory-access.patch new file mode 100644 index 0000000..c7ac468 --- /dev/null +++ b/SOURCES/0006-bus-fix-potentially-uninitialized-memory-access.patch @@ -0,0 +1,31 @@ +From 4b3825ff691103634adc77a4d3ffc7128923fae7 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:37:11 +0200 +Subject: [PATCH] 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; diff --git a/SOURCES/0007-dbus-fix-return-value-of-dispatch_rqueue.patch b/SOURCES/0007-dbus-fix-return-value-of-dispatch_rqueue.patch new file mode 100644 index 0000000..a1d278c --- /dev/null +++ b/SOURCES/0007-dbus-fix-return-value-of-dispatch_rqueue.patch @@ -0,0 +1,27 @@ +From b8e064bd25ccd701a8249a9c9b59049f8c055b93 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:37:30 +0200 +Subject: [PATCH] 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) { diff --git a/SOURCES/0008-modules-load-fix-error-handling.patch b/SOURCES/0008-modules-load-fix-error-handling.patch new file mode 100644 index 0000000..f5347c3 --- /dev/null +++ b/SOURCES/0008-modules-load-fix-error-handling.patch @@ -0,0 +1,24 @@ +From 15010ca4aa6627c7bcfe8106fa45c4408443d5f2 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:37:44 +0200 +Subject: [PATCH] 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); diff --git a/SOURCES/0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch b/SOURCES/0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch new file mode 100644 index 0000000..8cfb22b --- /dev/null +++ b/SOURCES/0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch @@ -0,0 +1,23 @@ +From 650948f16d92ce6b55e01ff2c24ea00766d38474 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:38:09 +0200 +Subject: [PATCH] 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; diff --git a/SOURCES/0010-strv-don-t-access-potentially-NULL-string-arrays.patch b/SOURCES/0010-strv-don-t-access-potentially-NULL-string-arrays.patch new file mode 100644 index 0000000..9fbb5d7 --- /dev/null +++ b/SOURCES/0010-strv-don-t-access-potentially-NULL-string-arrays.patch @@ -0,0 +1,24 @@ +From c6d39712453c53e8c859d6682f65d8129afc35a3 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:38:28 +0200 +Subject: [PATCH] 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; + } + diff --git a/SOURCES/0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch b/SOURCES/0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch new file mode 100644 index 0000000..13d08bf --- /dev/null +++ b/SOURCES/0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch @@ -0,0 +1,22 @@ +From 510cc2c4bc293002629547e1f5826d7a0ad92101 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 19:38:52 +0200 +Subject: [PATCH] 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) { diff --git a/SOURCES/0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch b/SOURCES/0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch new file mode 100644 index 0000000..40c9afd --- /dev/null +++ b/SOURCES/0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch @@ -0,0 +1,23 @@ +From 4092dd8187d9ff8d42d7f05b4a95816b575f67ff Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Wed, 2 Oct 2013 15:35:16 -0400 +Subject: [PATCH] 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 - - diff --git a/SOURCES/0013-gpt-auto-generator-exit-immediately-if-in-container.patch b/SOURCES/0013-gpt-auto-generator-exit-immediately-if-in-container.patch new file mode 100644 index 0000000..fe6a546 --- /dev/null +++ b/SOURCES/0013-gpt-auto-generator-exit-immediately-if-in-container.patch @@ -0,0 +1,37 @@ +From 650b4c3e4e004acfe7c201fd8a3e9d9c87824593 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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; + } diff --git a/SOURCES/0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch b/SOURCES/0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch new file mode 100644 index 0000000..e89d7f2 --- /dev/null +++ b/SOURCES/0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch @@ -0,0 +1,38 @@ +From d41259fcb7dac4f1bb02dbc743d5372827d3c01a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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; + diff --git a/SOURCES/0015-manager-when-verifying-whether-clients-may-change-en.patch b/SOURCES/0015-manager-when-verifying-whether-clients-may-change-en.patch new file mode 100644 index 0000000..20a77f3 --- /dev/null +++ b/SOURCES/0015-manager-when-verifying-whether-clients-may-change-en.patch @@ -0,0 +1,42 @@ +From f4d7751752e7d2d2393078daef342e54368468d7 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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; diff --git a/SOURCES/0016-mount-check-for-NULL-before-reading-pm-what.patch b/SOURCES/0016-mount-check-for-NULL-before-reading-pm-what.patch new file mode 100644 index 0000000..1722a3d --- /dev/null +++ b/SOURCES/0016-mount-check-for-NULL-before-reading-pm-what.patch @@ -0,0 +1,26 @@ +From 172b60ee7366d5e46b240386824682e4c051ad9e Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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; diff --git a/SOURCES/0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch b/SOURCES/0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch new file mode 100644 index 0000000..80c2c54 --- /dev/null +++ b/SOURCES/0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch @@ -0,0 +1,178 @@ +From 980112adcce965de6808390330750aaf11c165ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 a/src/core/mount.c b/src/core/mount.c +index db055f0..70cd372 100644 +--- a/src/core/mount.c ++++ b/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; diff --git a/SOURCES/0018-systemd-serialize-deserialize-forbid_restart-value.patch b/SOURCES/0018-systemd-serialize-deserialize-forbid_restart-value.patch new file mode 100644 index 0000000..b0eceb8 --- /dev/null +++ b/SOURCES/0018-systemd-serialize-deserialize-forbid_restart-value.patch @@ -0,0 +1,48 @@ +From d5a7089608ccde2302b185ec367165c8b5623a12 Mon Sep 17 00:00:00 2001 +From: Sylvia Else +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); + diff --git a/SOURCES/0019-core-unify-the-way-we-denote-serialization-attribute.patch b/SOURCES/0019-core-unify-the-way-we-denote-serialization-attribute.patch new file mode 100644 index 0000000..5624168 --- /dev/null +++ b/SOURCES/0019-core-unify-the-way-we-denote-serialization-attribute.patch @@ -0,0 +1,37 @@ +From e409d591e0d9ae65d351cf32ae7cb79def50f009 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 diff --git a/SOURCES/0020-journald-fix-minor-memory-leak.patch b/SOURCES/0020-journald-fix-minor-memory-leak.patch new file mode 100644 index 0000000..b8f3e4d --- /dev/null +++ b/SOURCES/0020-journald-fix-minor-memory-leak.patch @@ -0,0 +1,22 @@ +From dac4b2528173c73473b0bf6a147e47170fd344d6 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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; + } + diff --git a/SOURCES/0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch b/SOURCES/0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch new file mode 100644 index 0000000..bf5accf --- /dev/null +++ b/SOURCES/0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch @@ -0,0 +1,36 @@ +From c10d51e51388a133d1e0a656f9f69c3d2ca79f09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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)); diff --git a/SOURCES/0022-udevadm.xml-document-resolve-names-option-for-test.patch b/SOURCES/0022-udevadm.xml-document-resolve-names-option-for-test.patch new file mode 100644 index 0000000..213de85 --- /dev/null +++ b/SOURCES/0022-udevadm.xml-document-resolve-names-option-for-test.patch @@ -0,0 +1,31 @@ +From 46ae516340261691a08f64439dfd7aafa43b7467 Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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 a/man/udevadm.xml b/man/udevadm.xml +index d0b257d..b959216 100644 +--- a/man/udevadm.xml ++++ b/man/udevadm.xml +@@ -462,9 +462,13 @@ + + + +- ++ + +- The subsystem string. ++ 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. + + + diff --git a/SOURCES/0023-dbus-common-avoid-leak-in-error-path.patch b/SOURCES/0023-dbus-common-avoid-leak-in-error-path.patch new file mode 100644 index 0000000..04290cb --- /dev/null +++ b/SOURCES/0023-dbus-common-avoid-leak-in-error-path.patch @@ -0,0 +1,68 @@ +From 10725a4ee35e5d1d97c2f9bc72010c5c0210cd6b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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; + } diff --git a/SOURCES/0024-drop-ins-check-return-value.patch b/SOURCES/0024-drop-ins-check-return-value.patch new file mode 100644 index 0000000..60dcd24 --- /dev/null +++ b/SOURCES/0024-drop-ins-check-return-value.patch @@ -0,0 +1,26 @@ +From 0b344626698e0c42a7da558783d70207f8aed05e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 diff --git a/SOURCES/0025-shared-util-Fix-glob_extend-argument.patch b/SOURCES/0025-shared-util-Fix-glob_extend-argument.patch new file mode 100644 index 0000000..de46ffc --- /dev/null +++ b/SOURCES/0025-shared-util-Fix-glob_extend-argument.patch @@ -0,0 +1,25 @@ +From 18f14dc669bfda1131e31f9818eabd962bda631d Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +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 9be6acf..48adc83 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -4391,7 +4391,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; diff --git a/SOURCES/0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch b/SOURCES/0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch new file mode 100644 index 0000000..91939da --- /dev/null +++ b/SOURCES/0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch @@ -0,0 +1,31 @@ +From 63d689541fd7e70e83de425986182ee488e14a0f Mon Sep 17 00:00:00 2001 +From: Igor Zhbanov +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 a/src/bootchart/store.c b/src/bootchart/store.c +index f8c97c2..7f86cfe 100644 +--- a/src/bootchart/store.c ++++ b/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); + diff --git a/SOURCES/0027-man-document-the-b-special-boot-option.patch b/SOURCES/0027-man-document-the-b-special-boot-option.patch new file mode 100644 index 0000000..e036fe1 --- /dev/null +++ b/SOURCES/0027-man-document-the-b-special-boot-option.patch @@ -0,0 +1,34 @@ +From fb31ccf54084efe2264c0960feb5ed2edb5256b3 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +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 a/man/kernel-command-line.xml b/man/kernel-command-line.xml +index cc267a3..abe68e5 100644 +--- a/man/kernel-command-line.xml ++++ b/man/kernel-command-line.xml +@@ -123,6 +123,7 @@ + + + ++ -b + emergency + single + s +diff --git a/man/systemd.xml b/man/systemd.xml +index fe6e331..85c06d3 100644 +--- a/man/systemd.xml ++++ b/man/systemd.xml +@@ -1149,6 +1149,7 @@ + + + ++ -b + emergency + + Boot into emergency diff --git a/SOURCES/0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch b/SOURCES/0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch new file mode 100644 index 0000000..b382add --- /dev/null +++ b/SOURCES/0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch @@ -0,0 +1,34 @@ +From 710be393ae8d15a274f376677aa68c27cd107356 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +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 a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 8122d6a..239e56b 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/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; + } + diff --git a/SOURCES/0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch b/SOURCES/0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch new file mode 100644 index 0000000..4ab2711 --- /dev/null +++ b/SOURCES/0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch @@ -0,0 +1,47 @@ +From 2f7ce3bd875000149a0868b0652d40406c534f8b Mon Sep 17 00:00:00 2001 +From: Dave Reisner +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 48adc83..6c88040 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[]) { diff --git a/SOURCES/0030-Configurable-Timeouts-Restarts-default-values.patch b/SOURCES/0030-Configurable-Timeouts-Restarts-default-values.patch new file mode 100644 index 0000000..01bebfb --- /dev/null +++ b/SOURCES/0030-Configurable-Timeouts-Restarts-default-values.patch @@ -0,0 +1,293 @@ +From cd1c485f2fc5b23c7cdccb0dd852c7228fc79868 Mon Sep 17 00:00:00 2001 +From: Oleksii Shevchuk +Date: Mon, 4 Nov 2013 18:47:43 +0200 +Subject: [PATCH] Configurable Timeouts/Restarts default values + +https://bugs.freedesktop.org/show_bug.cgi?id=71132 + +Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec +configuration options to manager configuration file. +--- + man/systemd-system.conf.xml | 24 +++++++++++++++++++++++- + man/systemd.mount.xml | 4 ++-- + man/systemd.service.xml | 6 ++++-- + man/systemd.socket.xml | 4 ++-- + man/systemd.swap.xml | 4 ++-- + src/core/device.c | 2 +- + src/core/main.c | 9 +++++++++ + src/core/manager.h | 3 +++ + src/core/mount.c | 2 +- + src/core/scope.c | 2 +- + src/core/service.c | 6 +++--- + src/core/socket.c | 2 +- + src/core/swap.c | 2 +- + src/core/system.conf | 3 +++ + src/core/user.conf | 3 +++ + 15 files changed, 59 insertions(+), 17 deletions(-) + +diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml +index e8cf8a9..c1f2648 100644 +--- a/man/systemd-system.conf.xml ++++ b/man/systemd-system.conf.xml +@@ -61,7 +61,6 @@ + otherwise user.conf. These + configuration files contain a few settings controlling + basic manager operations. +- + + + +@@ -95,6 +94,29 @@ + + + ++ DefaultTimeoutStartSec= ++ DefaultTimeoutStopSec= ++ DefaultRestartSec= ++ ++ Configures the default ++ time-outs for starting and stopping of ++ units, as well as the default time to ++ sleep between automatic restarts of a ++ units, as configured per-unit in ++ TimeoutStartSec=, ++ TimeoutStopSec= and ++ RestartSec= (for ++ service units see ++ systemd.service5 ++ for details on the per-unit ++ settings). For non-service units ++ DefaultTimeoutStartSec= ++ sets the default ++ TimeoutSec= value. ++ ++ ++ ++ + CPUAffinity= + + Configures the initial +diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml +index 48af1ca..71a5736 100644 +--- a/man/systemd.mount.xml ++++ b/man/systemd.mount.xml +@@ -260,8 +260,8 @@ + Takes a unit-less value in seconds, or + a time span value such as "5min + 20s". Pass 0 to disable the timeout +- logic. Defaults to +- 90s. ++ logic. Default value is setted up in manager configuration ++ file via DefaultTimeoutStart=. + + + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index 5e1ddf7..df04048 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -524,7 +524,8 @@ + Takes a unit-less value in seconds, or a + time span value such as "5min + 20s". Pass 0 to disable the timeout +- logic. Defaults to 90s, except when ++ logic. Defaults to TimeoutStartSec= in ++ manager configuration file, except when + Type=oneshot is + used in which case the timeout + is disabled by default. +@@ -545,7 +546,8 @@ + Takes a unit-less value in seconds, or a + time span value such as "5min + 20s". Pass 0 to disable the timeout +- logic. Defaults to 90s. ++ logic. Defaults to TimeoutStartSec= in ++ manager configuration file. + + + +diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml +index 8c88d9f..1c78562 100644 +--- a/man/systemd.socket.xml ++++ b/man/systemd.socket.xml +@@ -679,8 +679,8 @@ + Takes a unit-less value in seconds, or + a time span value such as "5min + 20s". Pass 0 to disable the timeout +- logic. Defaults to +- 90s. ++ logic. Defaults to TimeoutStartSec= in ++ manager configuration file. + + + +diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml +index 813ae6c..13f6c84 100644 +--- a/man/systemd.swap.xml ++++ b/man/systemd.swap.xml +@@ -186,8 +186,8 @@ + Takes a unit-less value in seconds, or + a time span value such as "5min + 20s". Pass 0 to disable the timeout +- logic. Defaults to +- 90s. ++ logic. Defaults to TimeoutStartSec= in ++ manager configuration file. + + + +diff --git a/src/core/device.c b/src/core/device.c +index 9fca82a..5397bd6 100644 +--- a/src/core/device.c ++++ b/src/core/device.c +@@ -70,7 +70,7 @@ static void device_init(Unit *u) { + * indefinitely for plugged in devices, something which cannot + * happen for the other units since their operations time out + * anyway. */ +- UNIT(d)->job_timeout = DEFAULT_TIMEOUT_USEC; ++ UNIT(d)->job_timeout = u->manager->default_timeout_start_usec; + + UNIT(d)->ignore_on_isolate = true; + UNIT(d)->ignore_on_snapshot = true; +diff --git a/src/core/main.c b/src/core/main.c +index fe291f8..937994c 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -90,6 +90,9 @@ static bool arg_switched_root = false; + static char ***arg_join_controllers = NULL; + static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL; + static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT; ++static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC; ++static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC; ++static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC; + static usec_t arg_runtime_watchdog = 0; + static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE; + static char **arg_default_environment = NULL; +@@ -636,6 +639,9 @@ static int parse_config_file(void) { + { "Manager", "CPUAffinity", config_parse_cpu_affinity2, 0, NULL }, + { "Manager", "DefaultStandardOutput", config_parse_output, 0, &arg_default_std_output }, + { "Manager", "DefaultStandardError", config_parse_output, 0, &arg_default_std_error }, ++ { "Manager", "DefaultTimeoutStartSec", config_parse_sec, 0, &arg_default_timeout_start_usec }, ++ { "Manager", "DefaultTimeoutStopSec", config_parse_sec, 0, &arg_default_timeout_stop_usec }, ++ { "Manager", "DefaultRestartSec", config_parse_sec, 0, &arg_default_restart_usec }, + { "Manager", "JoinControllers", config_parse_join_controllers, 0, &arg_join_controllers }, + { "Manager", "RuntimeWatchdogSec", config_parse_sec, 0, &arg_runtime_watchdog }, + { "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog }, +@@ -1542,6 +1548,9 @@ int main(int argc, char *argv[]) { + m->confirm_spawn = arg_confirm_spawn; + m->default_std_output = arg_default_std_output; + m->default_std_error = arg_default_std_error; ++ m->default_restart_usec = arg_default_restart_usec; ++ m->default_timeout_start_usec = arg_default_timeout_start_usec; ++ m->default_timeout_stop_usec = arg_default_timeout_stop_usec; + m->runtime_watchdog = arg_runtime_watchdog; + m->shutdown_watchdog = arg_shutdown_watchdog; + m->userspace_timestamp = userspace_timestamp; +diff --git a/src/core/manager.h b/src/core/manager.h +index a3049b5..e74c609 100644 +--- a/src/core/manager.h ++++ b/src/core/manager.h +@@ -230,6 +230,9 @@ struct Manager { + + ExecOutput default_std_output, default_std_error; + ++ usec_t default_restart_usec, default_timeout_start_usec, ++ default_timeout_stop_usec; ++ + struct rlimit *rlimit[RLIMIT_NLIMITS]; + + /* non-zero if we are reloading or reexecuting, */ +diff --git a/src/core/mount.c b/src/core/mount.c +index 70cd372..c0445a6 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -131,7 +131,7 @@ static void mount_init(Unit *u) { + assert(u); + assert(u->load_state == UNIT_STUB); + +- m->timeout_usec = DEFAULT_TIMEOUT_USEC; ++ m->timeout_usec = u->manager->default_timeout_start_usec; + m->directory_mode = 0755; + + exec_context_init(&m->exec_context); +diff --git a/src/core/scope.c b/src/core/scope.c +index 50e5dba..41da3b9 100644 +--- a/src/core/scope.c ++++ b/src/core/scope.c +@@ -46,7 +46,7 @@ static void scope_init(Unit *u) { + assert(u); + assert(u->load_state == UNIT_STUB); + +- s->timeout_stop_usec = DEFAULT_TIMEOUT_USEC; ++ s->timeout_stop_usec = u->manager->default_timeout_stop_usec; + + watch_init(&s->timer_watch); + +diff --git a/src/core/service.c b/src/core/service.c +index 96ed2d3..e81aa1f 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -124,9 +124,9 @@ static void service_init(Unit *u) { + assert(u); + assert(u->load_state == UNIT_STUB); + +- s->timeout_start_usec = DEFAULT_TIMEOUT_USEC; +- s->timeout_stop_usec = DEFAULT_TIMEOUT_USEC; +- s->restart_usec = DEFAULT_RESTART_USEC; ++ s->timeout_start_usec = u->manager->default_timeout_start_usec; ++ s->timeout_stop_usec = u->manager->default_timeout_stop_usec; ++ s->restart_usec = u->manager->default_restart_usec; + s->type = _SERVICE_TYPE_INVALID; + + watch_init(&s->watchdog_watch); +diff --git a/src/core/socket.c b/src/core/socket.c +index 6c0ac1a..d368f7e 100644 +--- a/src/core/socket.c ++++ b/src/core/socket.c +@@ -73,7 +73,7 @@ static void socket_init(Unit *u) { + assert(u->load_state == UNIT_STUB); + + s->backlog = SOMAXCONN; +- s->timeout_usec = DEFAULT_TIMEOUT_USEC; ++ s->timeout_usec = u->manager->default_timeout_start_usec; + s->directory_mode = 0755; + s->socket_mode = 0666; + +diff --git a/src/core/swap.c b/src/core/swap.c +index a68ab7c..147f710 100644 +--- a/src/core/swap.c ++++ b/src/core/swap.c +@@ -86,7 +86,7 @@ static void swap_init(Unit *u) { + assert(s); + assert(UNIT(s)->load_state == UNIT_STUB); + +- s->timeout_usec = DEFAULT_TIMEOUT_USEC; ++ s->timeout_usec = u->manager->default_timeout_start_usec; + + exec_context_init(&s->exec_context); + s->exec_context.std_output = u->manager->default_std_output; +diff --git a/src/core/system.conf b/src/core/system.conf +index 7b03c87..3c6cc03 100644 +--- a/src/core/system.conf ++++ b/src/core/system.conf +@@ -24,6 +24,9 @@ + #ShutdownWatchdogSec=10min + #CapabilityBoundingSet= + #TimerSlackNSec= ++#DefaultTimeoutStartSec=90s ++#DefaultTimeoutStopSec=90s ++#DefaultRestartSec=100ms + #DefaultEnvironment= + #DefaultLimitCPU= + #DefaultLimitFSIZE= +diff --git a/src/core/user.conf b/src/core/user.conf +index 4a0129a..b030701 100644 +--- a/src/core/user.conf ++++ b/src/core/user.conf +@@ -14,3 +14,6 @@ + #LogLocation=no + #DefaultStandardOutput=inherit + #DefaultStandardError=inherit ++#DefaultTimeoutStartSec=90s ++#DefaultTimeoutStopSec=90s ++#DefaultRestartSec=100ms diff --git a/SOURCES/0031-manager-configurable-StartLimit-default-values.patch b/SOURCES/0031-manager-configurable-StartLimit-default-values.patch new file mode 100644 index 0000000..af95ca1 --- /dev/null +++ b/SOURCES/0031-manager-configurable-StartLimit-default-values.patch @@ -0,0 +1,161 @@ +From 409dbe76d743448629167f4412f290bba1aae11e Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Fri, 8 Nov 2013 16:01:22 +0100 +Subject: [PATCH] manager: configurable StartLimit default values + +https://bugzilla.redhat.com/show_bug.cgi?id=821723 +--- + man/systemd-system.conf.xml | 13 +++++++++++++ + man/systemd.service.xml | 9 ++++++--- + src/core/main.c | 6 ++++++ + src/core/manager.h | 3 +++ + src/core/service.c | 4 +++- + src/core/system.conf | 2 ++ + src/core/user.conf | 2 ++ + src/shared/def.h | 3 +++ + 8 files changed, 38 insertions(+), 4 deletions(-) + +diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml +index c1f2648..9a1a99f 100644 +--- a/man/systemd-system.conf.xml ++++ b/man/systemd-system.conf.xml +@@ -115,6 +115,19 @@ + TimeoutSec= value. + + ++ ++ DefaultStartLimitInterval= ++ DefaultStartLimitBurst= ++ ++ Configure the default start rate ++ limiting, as configured per-service by ++ StartLimitInterval= and ++ StartLimitBurst=. See ++ systemd.service5 ++ for details on the per-service ++ settings). ++ ++ + + + CPUAffinity= +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index df04048..3f31c11 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -863,12 +863,15 @@ + these two options, this rate limiting + may be modified. Use + StartLimitInterval= +- to configure the checking interval +- (defaults to 10s, set to 0 to disable ++ to configure the checking interval (defaults to ++ DefaultStartLimitInterval= in ++ manager configuration file, set to 0 to disable + any kind of rate limiting). Use + StartLimitBurst= to + configure how many starts per interval +- are allowed (defaults to 5). These ++ are allowed (defaults to ++ DefaultStartLimitBurst= in ++ manager configuration file). These + configuration options are particularly + useful in conjunction with + Restart=, however +diff --git a/src/core/main.c b/src/core/main.c +index 937994c..00fd394 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -93,6 +93,8 @@ static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT; + static usec_t arg_default_restart_usec = DEFAULT_RESTART_USEC; + static usec_t arg_default_timeout_start_usec = DEFAULT_TIMEOUT_USEC; + static usec_t arg_default_timeout_stop_usec = DEFAULT_TIMEOUT_USEC; ++static usec_t arg_default_start_limit_interval = DEFAULT_START_LIMIT_INTERVAL; ++static unsigned arg_default_start_limit_burst = DEFAULT_START_LIMIT_BURST; + static usec_t arg_runtime_watchdog = 0; + static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE; + static char **arg_default_environment = NULL; +@@ -642,6 +644,8 @@ static int parse_config_file(void) { + { "Manager", "DefaultTimeoutStartSec", config_parse_sec, 0, &arg_default_timeout_start_usec }, + { "Manager", "DefaultTimeoutStopSec", config_parse_sec, 0, &arg_default_timeout_stop_usec }, + { "Manager", "DefaultRestartSec", config_parse_sec, 0, &arg_default_restart_usec }, ++ { "Manager", "DefaultStartLimitInterval", config_parse_sec, 0, &arg_default_start_limit_interval }, ++ { "Manager", "DefaultStartLimitBurst", config_parse_unsigned, 0, &arg_default_start_limit_burst }, + { "Manager", "JoinControllers", config_parse_join_controllers, 0, &arg_join_controllers }, + { "Manager", "RuntimeWatchdogSec", config_parse_sec, 0, &arg_runtime_watchdog }, + { "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog }, +@@ -1551,6 +1555,8 @@ int main(int argc, char *argv[]) { + m->default_restart_usec = arg_default_restart_usec; + m->default_timeout_start_usec = arg_default_timeout_start_usec; + m->default_timeout_stop_usec = arg_default_timeout_stop_usec; ++ m->default_start_limit_interval = arg_default_start_limit_interval; ++ m->default_start_limit_burst = arg_default_start_limit_burst; + m->runtime_watchdog = arg_runtime_watchdog; + m->shutdown_watchdog = arg_shutdown_watchdog; + m->userspace_timestamp = userspace_timestamp; +diff --git a/src/core/manager.h b/src/core/manager.h +index e74c609..ee42c5e 100644 +--- a/src/core/manager.h ++++ b/src/core/manager.h +@@ -233,6 +233,9 @@ struct Manager { + usec_t default_restart_usec, default_timeout_start_usec, + default_timeout_stop_usec; + ++ usec_t default_start_limit_interval; ++ unsigned default_start_limit_burst; ++ + struct rlimit *rlimit[RLIMIT_NLIMITS]; + + /* non-zero if we are reloading or reexecuting, */ +diff --git a/src/core/service.c b/src/core/service.c +index e81aa1f..5662180 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -143,7 +143,9 @@ static void service_init(Unit *u) { + kill_context_init(&s->kill_context); + cgroup_context_init(&s->cgroup_context); + +- RATELIMIT_INIT(s->start_limit, 10*USEC_PER_SEC, 5); ++ RATELIMIT_INIT(s->start_limit, ++ u->manager->default_start_limit_interval, ++ u->manager->default_start_limit_burst); + + s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID; + } +diff --git a/src/core/system.conf b/src/core/system.conf +index 3c6cc03..38bbca5 100644 +--- a/src/core/system.conf ++++ b/src/core/system.conf +@@ -27,6 +27,8 @@ + #DefaultTimeoutStartSec=90s + #DefaultTimeoutStopSec=90s + #DefaultRestartSec=100ms ++#DefaultStartLimitInterval=10s ++#DefaultStartLimitBurst=5 + #DefaultEnvironment= + #DefaultLimitCPU= + #DefaultLimitFSIZE= +diff --git a/src/core/user.conf b/src/core/user.conf +index b030701..923ca66 100644 +--- a/src/core/user.conf ++++ b/src/core/user.conf +@@ -17,3 +17,5 @@ + #DefaultTimeoutStartSec=90s + #DefaultTimeoutStopSec=90s + #DefaultRestartSec=100ms ++#DefaultStartLimitInterval=10s ++#DefaultStartLimitBurst=5 +diff --git a/src/shared/def.h b/src/shared/def.h +index edd0bcf..e4ef735 100644 +--- a/src/shared/def.h ++++ b/src/shared/def.h +@@ -27,6 +27,9 @@ + #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC) + #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC) + ++#define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC) ++#define DEFAULT_START_LIMIT_BURST 5 ++ + #define DEFAULT_EXIT_USEC (5*USEC_PER_MINUTE) + + #define SYSTEMD_CGROUP_CONTROLLER "name=systemd" diff --git a/SOURCES/0032-sysctl-bring-back-etc-sysctl.conf.patch b/SOURCES/0032-sysctl-bring-back-etc-sysctl.conf.patch new file mode 100644 index 0000000..6142ed8 --- /dev/null +++ b/SOURCES/0032-sysctl-bring-back-etc-sysctl.conf.patch @@ -0,0 +1,25 @@ +From 9944a5e77f0ad03742a1582cd51cc5ebbdd487ed Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 11 Nov 2013 11:17:57 +0100 +Subject: [PATCH] sysctl: bring back /etc/sysctl.conf + +Read /etc/sysctl.conf as the last file, overwriting everything. +--- + src/sysctl/sysctl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c +index b5670db..878c923 100644 +--- a/src/sysctl/sysctl.c ++++ b/src/sysctl/sysctl.c +@@ -311,6 +311,10 @@ int main(int argc, char *argv[]) { + if (k < 0 && r == 0) + r = k; + } ++ ++ k = parse_file(sysctl_options, "/etc/sysctl.conf", true); ++ if (k < 0 && r == 0) ++ r = k; + } + + k = apply_all(sysctl_options); diff --git a/SOURCES/0033-systemd-treat-reload-failure-as-failure.patch b/SOURCES/0033-systemd-treat-reload-failure-as-failure.patch new file mode 100644 index 0000000..c8409cb --- /dev/null +++ b/SOURCES/0033-systemd-treat-reload-failure-as-failure.patch @@ -0,0 +1,90 @@ +From b659126834756a4476a5b020bcece486be1edb85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 a/src/core/job.c b/src/core/job.c +index bf1d956..5ea9803 100644 +--- a/src/core/job.c ++++ b/src/core/job.c +@@ -528,7 +528,7 @@ int job_run_and_invalidate(Job *j) { + else if (t == UNIT_ACTIVATING) + r = -EAGAIN; + else +- r = -ENOEXEC; ++ r = -EBADR; + break; + } + +@@ -557,8 +557,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--; +@@ -784,7 +786,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); +@@ -1140,7 +1142,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 a/src/core/job.h b/src/core/job.h +index d90bc96..4237529 100644 +--- a/src/core/job.h ++++ b/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 a/src/core/unit.c b/src/core/unit.c +index 1db7d06..0f57b06 100644 +--- a/src/core/unit.c ++++ b/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.", diff --git a/SOURCES/0034-journal-when-appending-to-journal-file-allocate-larg.patch b/SOURCES/0034-journal-when-appending-to-journal-file-allocate-larg.patch new file mode 100644 index 0000000..c860f88 --- /dev/null +++ b/SOURCES/0034-journal-when-appending-to-journal-file-allocate-larg.patch @@ -0,0 +1,135 @@ +From eb38fb593b201a97620555c0aca83ff487a50748 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 26 Nov 2013 18:39:42 +0100 +Subject: [PATCH] journal: when appending to journal file, allocate larger + blocks at once + +Conflicts: + src/journal/journal-file.c +--- + src/journal/journal-file.c | 51 +++++++++++++++++++++++----------------------- + 1 file changed, 26 insertions(+), 25 deletions(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 81c344f..4062a83 100644 +--- a/src/journal/journal-file.c ++++ b/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)); + +@@ -1344,7 +1352,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); + +@@ -2551,7 +2559,7 @@ fail: + } + + int journal_file_rotate(JournalFile **f, bool compress, bool seal) { +- char *p; ++ _cleanup_free_ char *p = NULL; + size_t l; + JournalFile *old_file, *new_file = NULL; + int r; +@@ -2568,22 +2576,15 @@ int journal_file_rotate(JournalFile **f, bool compress, bool seal) { + return -EINVAL; + + l = strlen(old_file->path); +- +- p = new(char, l + 1 + 32 + 1 + 16 + 1 + 16 + 1); +- if (!p) ++ r = asprintf(&p, "%.*s@" SD_ID128_FORMAT_STR "-%016"PRIx64"-%016"PRIx64".journal", ++ (int) l - 8, old_file->path, ++ SD_ID128_FORMAT_VAL(old_file->header->seqnum_id), ++ le64toh((*f)->header->head_entry_seqnum), ++ le64toh((*f)->header->head_entry_realtime)); ++ if (r < 0) + return -ENOMEM; + +- memcpy(p, old_file->path, l - 8); +- p[l-8] = '@'; +- sd_id128_to_string(old_file->header->seqnum_id, p + l - 8 + 1); +- snprintf(p + l - 8 + 1 + 32, 1 + 16 + 1 + 16 + 8 + 1, +- "-%016"PRIx64"-%016"PRIx64".journal", +- le64toh((*f)->header->head_entry_seqnum), +- le64toh((*f)->header->head_entry_realtime)); +- + r = rename(old_file->path, p); +- free(p); +- + if (r < 0) + return -errno; + +@@ -2634,7 +2635,7 @@ int journal_file_open_reliably( + + l = strlen(fname); + if (asprintf(&p, "%.*s@%016llx-%016llx.journal~", +- (int) (l-8), fname, ++ (int) l - 8, fname, + (unsigned long long) now(CLOCK_REALTIME), + random_ull()) < 0) + return -ENOMEM; diff --git a/SOURCES/0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch b/SOURCES/0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch new file mode 100644 index 0000000..68d5cf7 --- /dev/null +++ b/SOURCES/0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch @@ -0,0 +1,244 @@ +From 563bf9e9305aa88ad403a81c0c91418b7846f465 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 a/src/journal/journal-file.c b/src/journal/journal-file.c +index 4062a83..7adb1b5 100644 +--- a/src/journal/journal-file.c ++++ b/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; diff --git a/SOURCES/0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch b/SOURCES/0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch new file mode 100644 index 0000000..3b68302 --- /dev/null +++ b/SOURCES/0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch @@ -0,0 +1,23 @@ +From 5284c03b3bc881c4b79b1afb32284dd86ab836f5 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 a/src/journal/journal-file.c b/src/journal/journal-file.c +index 7adb1b5..53dd0c3 100644 +--- a/src/journal/journal-file.c ++++ b/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; diff --git a/SOURCES/0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch b/SOURCES/0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch new file mode 100644 index 0000000..e62849e --- /dev/null +++ b/SOURCES/0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch @@ -0,0 +1,25 @@ +From 0badfa6266d2b5116a14fe2eebcf55f6a072332b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 a/src/journal/journal-file.c b/src/journal/journal-file.c +index 53dd0c3..94e3921 100644 +--- a/src/journal/journal-file.c ++++ b/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); + diff --git a/SOURCES/0038-journal-simplify-pre-allocation-logic.patch b/SOURCES/0038-journal-simplify-pre-allocation-logic.patch new file mode 100644 index 0000000..f0b319d --- /dev/null +++ b/SOURCES/0038-journal-simplify-pre-allocation-logic.patch @@ -0,0 +1,58 @@ +From 2d9a810729f9c209cab7aa6bf50ec5f749ebff82 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 a/src/journal/journal-file.c b/src/journal/journal-file.c +index 94e3921..962cdd6 100644 +--- a/src/journal/journal-file.c ++++ b/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)); + diff --git a/SOURCES/0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch b/SOURCES/0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch new file mode 100644 index 0000000..cc56f08 --- /dev/null +++ b/SOURCES/0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch @@ -0,0 +1,55 @@ +From 29323cff9feac15e1871a10e727690ac0ed1007d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 a/src/journal/journald-server.c b/src/journal/journald-server.c +index e03e413..a0a8e9c 100644 +--- a/src/journal/journald-server.c ++++ b/src/journal/journald-server.c +@@ -968,9 +968,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); + +@@ -988,6 +991,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; +@@ -1007,6 +1012,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)); +@@ -1050,6 +1057,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; + } + diff --git a/SOURCES/0040-Never-call-qsort-on-potentially-NULL-arrays.patch b/SOURCES/0040-Never-call-qsort-on-potentially-NULL-arrays.patch new file mode 100644 index 0000000..bd6b097 --- /dev/null +++ b/SOURCES/0040-Never-call-qsort-on-potentially-NULL-arrays.patch @@ -0,0 +1,368 @@ +From 43406f091aaa58ed23250a9967f46ad9cfa0b007 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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-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 +++++----- + 16 files changed, 73 insertions(+), 52 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-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 9a2d255..0876ee6 100644 +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -755,7 +755,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 1b845b3..222abe0 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -764,3 +764,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 bb7ada9..0d1a487 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; diff --git a/SOURCES/0041-localed-match-converted-keymaps-before-legacy.patch b/SOURCES/0041-localed-match-converted-keymaps-before-legacy.patch new file mode 100644 index 0000000..6274b97 --- /dev/null +++ b/SOURCES/0041-localed-match-converted-keymaps-before-legacy.patch @@ -0,0 +1,324 @@ +From 354d8234f177bca65eddf1451b180772cdbf7611 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 18 Nov 2013 13:42:57 -0500 +Subject: [PATCH] localed: match converted keymaps before legacy + +Before, X11 keymap fr-pc105-oss would be converted to fr, +even though fr-oss exists. Now, if +/usr/lib/kbd/keymaps/xkb/[-].map[.gz] exists, +[-] will be used as the console keymap, +falling back to the legacy mappings otherwise. + +% sudo localectl set-x11-keymap pl pc105 +% localectl + System Locale: LANG=en_US.UTF-8 + VC Keymap: pl (was pl2 before) + X11 Layout: pl + X11 Model: pc105 +% sudo localectl set-x11-keymap fr pc105 oss +% localectl + System Locale: LANG=en_US.UTF-8 + VC Keymap: fr-oss (was fr before) + X11 Layout: fr + X11 Model: pc105 + X11 Variant: oss +% sudo localectl set-x11-keymap fr pc105 +% localectl + System Locale: LANG=en_US.UTF-8 + VC Keymap: fr + X11 Layout: fr + X11 Model: pc105 +% sudo localectl set-x11-keymap gb +% localectl + System Locale: LANG=en_US.UTF-8 + VC Keymap: gb (was uk before) + X11 Layout: gb + +Conflicts: + src/locale/localed.c + src/shared/def.h +--- + src/locale/localectl.c | 8 +-- + src/locale/localed.c | 189 ++++++++++++++++++++++++++++--------------------- + src/shared/def.h | 13 ++++ + 3 files changed, 126 insertions(+), 84 deletions(-) + +diff --git a/src/locale/localectl.c b/src/locale/localectl.c +index 8259c0a..d3c6152 100644 +--- a/src/locale/localectl.c ++++ b/src/locale/localectl.c +@@ -38,6 +38,7 @@ + #include "set.h" + #include "path-util.h" + #include "utf8.h" ++#include "def.h" + + static bool arg_no_pager = false; + static enum transport { +@@ -533,15 +534,14 @@ static int nftw_cb( + + static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) { + _cleanup_strv_free_ char **l = NULL; ++ const char *dir; + + keymaps = set_new(string_hash_func, string_compare_func); + if (!keymaps) + return log_oom(); + +- nftw("/usr/share/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); +- nftw("/usr/share/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); +- nftw("/usr/lib/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); +- nftw("/lib/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); ++ NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) ++ nftw(dir, nftw_cb, 20, FTW_MOUNT|FTW_PHYS); + + l = set_get_strv(keymaps); + if (!l) { +diff --git a/src/locale/localed.c b/src/locale/localed.c +index e160c04..b9b98f4 100644 +--- a/src/locale/localed.c ++++ b/src/locale/localed.c +@@ -792,105 +792,135 @@ static int convert_vconsole_to_x11(DBusConnection *connection) { + return 0; + } + +-static int convert_x11_to_vconsole(DBusConnection *connection) { +- bool modified = false; ++static int find_converted_keymap(char **new_keymap) { ++ const char *dir; ++ _cleanup_free_ char *n; ++ ++ if (state.x11_variant) ++ n = strjoin(state.x11_layout, "-", state.x11_variant, NULL); ++ else ++ n = strdup(state.x11_layout); ++ if (!n) ++ return -ENOMEM; + +- assert(connection); ++ NULSTR_FOREACH(dir, KBD_KEYMAP_DIRS) { ++ _cleanup_free_ char *p = NULL, *pz = NULL; + +- if (isempty(state.x11_layout)) { ++ p = strjoin(dir, "xkb/", n, ".map", NULL); ++ pz = strjoin(dir, "xkb/", n, ".map.gz", NULL); ++ if (!p || !pz) ++ return -ENOMEM; + +- modified = +- !isempty(state.vc_keymap) || +- !isempty(state.vc_keymap_toggle); ++ if (access(p, F_OK) == 0 || access(pz, F_OK) == 0) { ++ *new_keymap = n; ++ n = NULL; ++ return 1; ++ } ++ } + +- free_data_x11(); +- } else { +- FILE *f; +- unsigned n = 0; +- unsigned best_matching = 0; +- char *new_keymap = NULL; ++ return 0; ++} + +- f = fopen(SYSTEMD_KBD_MODEL_MAP, "re"); +- if (!f) +- return -errno; ++static int find_legacy_keymap(char **new_keymap) { ++ _cleanup_fclose_ FILE *f; ++ unsigned n = 0; ++ unsigned best_matching = 0; + +- for (;;) { +- char **a; +- unsigned matching = 0; +- int r; + +- r = read_next_mapping(f, &n, &a); +- if (r < 0) { +- fclose(f); +- return r; +- } ++ f = fopen(SYSTEMD_KBD_MODEL_MAP, "re"); ++ if (!f) ++ return -errno; + +- if (r == 0) +- break; ++ for (;;) { ++ _cleanup_strv_free_ char **a = NULL; ++ unsigned matching = 0; ++ int r; + +- /* Determine how well matching this entry is */ +- if (streq_ptr(state.x11_layout, a[1])) +- /* If we got an exact match, this is best */ +- matching = 10; +- else { +- size_t x; +- +- x = strcspn(state.x11_layout, ","); +- +- /* We have multiple X layouts, look +- * for an entry that matches our key +- * with the everything but the first +- * layout stripped off. */ +- if (x > 0 && +- strlen(a[1]) == x && +- strneq(state.x11_layout, a[1], x)) +- matching = 5; +- else { +- size_t w; +- +- /* If that didn't work, strip +- * off the other layouts from +- * the entry, too */ +- +- w = strcspn(a[1], ","); +- +- if (x > 0 && x == w && +- memcmp(state.x11_layout, a[1], x) == 0) +- matching = 1; +- } ++ r = read_next_mapping(f, &n, &a); ++ if (r < 0) ++ return r; ++ if (r == 0) ++ break; ++ ++ /* Determine how well matching this entry is */ ++ if (streq_ptr(state.x11_layout, a[1])) ++ /* If we got an exact match, this is best */ ++ matching = 10; ++ else { ++ size_t x; ++ ++ x = strcspn(state.x11_layout, ","); ++ ++ /* We have multiple X layouts, look for an ++ * entry that matches our key with everything ++ * but the first layout stripped off. */ ++ if (x > 0 && ++ strlen(a[1]) == x && ++ strneq(state.x11_layout, a[1], x)) ++ matching = 5; ++ else { ++ size_t w; ++ ++ /* If that didn't work, strip off the ++ * other layouts from the entry, too */ ++ w = strcspn(a[1], ","); ++ ++ if (x > 0 && x == w && ++ memcmp(state.x11_layout, a[1], x) == 0) ++ matching = 1; + } ++ } ++ ++ if (matching > 0 && ++ streq_ptr(state.x11_model, a[2])) { ++ matching++; + +- if (matching > 0 && +- streq_ptr(state.x11_model, a[2])) { ++ if (streq_ptr(state.x11_variant, a[3])) { + matching++; + +- if (streq_ptr(state.x11_variant, a[3])) { ++ if (streq_ptr(state.x11_options, a[4])) + matching++; +- +- if (streq_ptr(state.x11_options, a[4])) +- matching++; +- } + } ++ } + +- /* The best matching entry so far, then let's +- * save that */ +- if (matching > best_matching) { +- best_matching = matching; ++ /* The best matching entry so far, then let's save that */ ++ if (matching > best_matching) { ++ best_matching = matching; + +- free(new_keymap); +- new_keymap = strdup(a[0]); ++ free(*new_keymap); ++ *new_keymap = strdup(a[0]); ++ if (!*new_keymap) ++ return -ENOMEM; ++ } ++ } + +- if (!new_keymap) { +- strv_free(a); +- fclose(f); +- return -ENOMEM; +- } +- } ++ return 0; ++} + +- strv_free(a); +- } ++static int convert_x11_to_vconsole(DBusConnection *connection) { ++ bool modified = false; ++ int r; + +- fclose(f); ++ assert(connection); ++ ++ if (isempty(state.x11_layout)) { ++ ++ modified = ++ !isempty(state.vc_keymap) || ++ !isempty(state.vc_keymap_toggle); ++ ++ free_data_x11(); ++ } else { ++ char *new_keymap = NULL; ++ ++ r = find_converted_keymap(&new_keymap); ++ if (r < 0) ++ return r; ++ else if (r == 0) { ++ r = find_legacy_keymap(&new_keymap); ++ if (r < 0) ++ return r; ++ } + + if (!streq_ptr(state.vc_keymap, new_keymap)) { + free(state.vc_keymap); +@@ -907,7 +937,6 @@ static int convert_x11_to_vconsole(DBusConnection *connection) { + if (modified) { + dbus_bool_t b; + DBusMessage *changed; +- int r; + + r = write_data_vconsole(); + if (r < 0) +diff --git a/src/shared/def.h b/src/shared/def.h +index e4ef735..58c834c 100644 +--- a/src/shared/def.h ++++ b/src/shared/def.h +@@ -41,3 +41,16 @@ + #define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz" + #define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + #define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS ++ ++#ifdef HAVE_SPLIT_USR ++#define KBD_KEYMAP_DIRS \ ++ "/usr/share/keymaps/\0" \ ++ "/usr/share/kbd/keymaps/\0" \ ++ "/usr/lib/kbd/keymaps/\0" \ ++ "/lib/kbd/keymaps/\0" ++#else ++#define KBD_KEYMAP_DIRS \ ++ "/usr/share/keymaps/\0" \ ++ "/usr/share/kbd/keymaps/\0" \ ++ "/usr/lib/kbd/keymaps/\0" ++#endif diff --git a/SOURCES/0042-core-socket-fix-SO_REUSEPORT.patch b/SOURCES/0042-core-socket-fix-SO_REUSEPORT.patch new file mode 100644 index 0000000..2f8c231 --- /dev/null +++ b/SOURCES/0042-core-socket-fix-SO_REUSEPORT.patch @@ -0,0 +1,35 @@ +From 9dda034962ef7d339f07e5cdeae87f34db970431 Mon Sep 17 00:00:00 2001 +From: Shawn Landden +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 a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 +index 31fb7bc..d65bcc1 100644 +--- a/src/core/load-fragment-gperf.gperf.m4 ++++ b/src/core/load-fragment-gperf.gperf.m4 +@@ -211,6 +211,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 a/src/core/socket.c b/src/core/socket.c +index d368f7e..e673f38 100644 +--- a/src/core/socket.c ++++ b/src/core/socket.c +@@ -770,7 +770,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"); + } + diff --git a/SOURCES/0043-activate-fix-crash-when-s-is-passed.patch b/SOURCES/0043-activate-fix-crash-when-s-is-passed.patch new file mode 100644 index 0000000..b4519f7 --- /dev/null +++ b/SOURCES/0043-activate-fix-crash-when-s-is-passed.patch @@ -0,0 +1,23 @@ +From 6a4da7d980bf91207d07e2a7b1c4d1d2fe59e3e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= +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 a/src/activate/activate.c b/src/activate/activate.c +index 83d25b1..535b330 100644 +--- a/src/activate/activate.c ++++ b/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(); diff --git a/SOURCES/0044-systemd-python-fix-booted-and-add-two-functions-to-d.patch b/SOURCES/0044-systemd-python-fix-booted-and-add-two-functions-to-d.patch new file mode 100644 index 0000000..25d5952 --- /dev/null +++ b/SOURCES/0044-systemd-python-fix-booted-and-add-two-functions-to-d.patch @@ -0,0 +1,34 @@ +From 27b42c85817e4ebf03c60492f2bf187931450b51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 +- + src/python-systemd/docs/daemon.rst | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c +index 6b84fb8..f0ab16f 100644 +--- a/src/python-systemd/_daemon.c ++++ b/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); +diff --git a/src/python-systemd/docs/daemon.rst b/src/python-systemd/docs/daemon.rst +index 72280ca..0ad11ed 100644 +--- a/src/python-systemd/docs/daemon.rst ++++ b/src/python-systemd/docs/daemon.rst +@@ -14,3 +14,5 @@ + .. autofunction:: _is_socket_unix + .. autofunction:: _is_socket_inet + .. autofunction:: _is_mq ++ .. autofunction:: notify ++ .. autofunction:: booted diff --git a/SOURCES/0045-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch b/SOURCES/0045-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch new file mode 100644 index 0000000..bcd7ad4 --- /dev/null +++ b/SOURCES/0045-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch @@ -0,0 +1,28 @@ +From 4003ebeac4b10481f32b5b1fdd65fcc905a4b9a7 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +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 a/src/shared/util.c b/src/shared/util.c +index 6c88040..f602625 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -2561,7 +2561,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); diff --git a/SOURCES/0046-activate-mention-E-in-the-help-text.patch b/SOURCES/0046-activate-mention-E-in-the-help-text.patch new file mode 100644 index 0000000..a839f65 --- /dev/null +++ b/SOURCES/0046-activate-mention-E-in-the-help-text.patch @@ -0,0 +1,22 @@ +From 75095af78beb53ce399f50b004b4bf9a4de9ab60 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= +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 a/src/activate/activate.c b/src/activate/activate.c +index 535b330..a9461bc 100644 +--- a/src/activate/activate.c ++++ b/src/activate/activate.c +@@ -316,6 +316,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" diff --git a/SOURCES/0047-docs-remove-unneeded-the-s-in-gudev-docs.patch b/SOURCES/0047-docs-remove-unneeded-the-s-in-gudev-docs.patch new file mode 100644 index 0000000..f811a9b --- /dev/null +++ b/SOURCES/0047-docs-remove-unneeded-the-s-in-gudev-docs.patch @@ -0,0 +1,38 @@ +From 9d175ba1edccb9e7e1d9d2994c3c074f43ea2539 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c +index a644904..161181a 100644 +--- a/src/libudev/libudev-device.c ++++ b/src/libudev/libudev-device.c +@@ -980,9 +980,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. +@@ -1016,9 +1015,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. diff --git a/SOURCES/0048-man-explicitly-say-when-multiple-units-can-be-specif.patch b/SOURCES/0048-man-explicitly-say-when-multiple-units-can-be-specif.patch new file mode 100644 index 0000000..3d29fe8 --- /dev/null +++ b/SOURCES/0048-man-explicitly-say-when-multiple-units-can-be-specif.patch @@ -0,0 +1,235 @@ +From 521519ead8bb49d2c94aed90982ffcd6d5e34e92 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 a/man/systemd.unit.xml b/man/systemd.unit.xml +index 5c8b8e8..029392c 100644 +--- a/man/systemd.unit.xml ++++ b/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 @@ + RequisiteOverridable= + + Similar to +- Requires= +- and RequiresOverridable=, respectively. However, +- if a unit listed here is not started +- already it will not be started and the +- transaction fails +- immediately. ++ Requires= and ++ RequiresOverridable=, ++ respectively. However, if the units ++ listed here are not started already ++ they will not be started and the ++ transaction will fail immediately. ++ + + + + Wants= + + A weaker version of +- Requires=. A unit ++ Requires=. 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 @@ + + 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 + .wants/ directory + accompanying the unit file. For + details see above. +@@ -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. + +@@ -543,12 +546,12 @@ + + Conflicts= + +- Configures negative ++ A space-separated list ++ of unit names. Configures negative + requirement dependencies. If a unit +- has a +- Conflicts= setting +- on another unit, starting the former +- will stop the latter and vice ++ has a Conflicts= ++ 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 + After= and +@@ -575,7 +578,8 @@ + Before= + After= + +- Configures ordering ++ A space-separated list ++ of unit names. Configures ordering + dependencies between units. If a unit + foo.service + contains a setting +@@ -624,18 +628,18 @@ + type After= or + Before=. 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. + + + + OnFailure= + +- Lists one or more +- units that are activated when this +- unit enters the ++ A space-separated list ++ of one or more units that are ++ activated when this unit enters the + failed + state. + +@@ -644,16 +648,17 @@ + PropagatesReloadTo= + ReloadPropagatedFrom= + +- 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. ++ 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. + + + +@@ -1089,32 +1094,34 @@ + + Alias= + +- 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, +- systemctl enable +- will create symlinks from these names +- to the unit filename. ++ 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, systemctl ++ enable will create symlinks ++ from these names to the unit ++ filename. + + + + WantedBy= + RequiredBy= + +- A symbolic link is +- created in the +- .wants/ or +- .requires/ directory +- of the listed unit when this unit is +- activated by systemctl +- enable. This has the effect +- that a dependency of type +- Wants= or ++ 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 .wants/ or ++ .requires/ ++ directory of each of the listed units ++ when this unit is installed by ++ systemctl enable. ++ This has the effect that a dependency ++ of type Wants= or + Requires= is added + from the listed unit to the current + unit. The primary result is that the +@@ -1160,7 +1167,12 @@ + and systemctl + disable will automatically + install/uninstall units listed in this option as +- well. ++ well. ++ ++ This option may be used more ++ than once, or a space-separated list ++ of unit names may be ++ given. + + + diff --git a/SOURCES/0049-util-fix-handling-of-trailing-whitespace-in-split_qu.patch b/SOURCES/0049-util-fix-handling-of-trailing-whitespace-in-split_qu.patch new file mode 100644 index 0000000..e7fc500 --- /dev/null +++ b/SOURCES/0049-util-fix-handling-of-trailing-whitespace-in-split_qu.patch @@ -0,0 +1,122 @@ +From 996e958ecde418244f6aca999b5b1edaeeeb009b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 27 Nov 2013 22:37:52 +0100 +Subject: [PATCH] util: fix handling of trailing whitespace in split_quoted() + +Inspired by a patch by Lukas Nykryn. + +Conflicts: + src/test/test-strv.c +--- + src/shared/util.c | 24 +++++++++++++++--------- + src/test/test-strv.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 9 deletions(-) + +diff --git a/src/shared/util.c b/src/shared/util.c +index f602625..b1a4006 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -370,17 +370,21 @@ char *split(const char *c, size_t *l, const char *separator, char **state) { + /* Split a string into words, but consider strings enclosed in '' and + * "" as words even if they include spaces. */ + char *split_quoted(const char *c, size_t *l, char **state) { +- char *current, *e; ++ const char *current, *e; + bool escaped = false; + +- current = *state ? *state : (char*) c; ++ assert(c); ++ assert(l); ++ assert(state); + +- if (!*current || *c == 0) +- return NULL; ++ current = *state ? *state : c; + + current += strspn(current, WHITESPACE); + +- if (*current == '\'') { ++ if (*current == 0) ++ return NULL; ++ ++ else if (*current == '\'') { + current ++; + + for (e = current; *e; e++) { +@@ -393,7 +397,8 @@ char *split_quoted(const char *c, size_t *l, char **state) { + } + + *l = e-current; +- *state = *e == 0 ? e : e+1; ++ *state = (char*) (*e == 0 ? e : e+1); ++ + } else if (*current == '\"') { + current ++; + +@@ -407,7 +412,8 @@ char *split_quoted(const char *c, size_t *l, char **state) { + } + + *l = e-current; +- *state = *e == 0 ? e : e+1; ++ *state = (char*) (*e == 0 ? e : e+1); ++ + } else { + for (e = current; *e; e++) { + if (escaped) +@@ -418,10 +424,10 @@ char *split_quoted(const char *c, size_t *l, char **state) { + break; + } + *l = e-current; +- *state = e; ++ *state = (char*) e; + } + +- return (char*) current; ++ return current; + } + + int get_parent_of_pid(pid_t pid, pid_t *_ppid) { +diff --git a/src/test/test-strv.c b/src/test/test-strv.c +index c3d536d..ed26ad1 100644 +--- a/src/test/test-strv.c ++++ b/src/test/test-strv.c +@@ -156,6 +156,20 @@ static void test_strv_quote_unquote(const char* const *split, const char *quoted + } + } + ++static void test_strv_quote_unquote2(const char *quoted, const char ** list) { ++ _cleanup_strv_free_ char **s; ++ unsigned i = 0; ++ char **t; ++ ++ s = strv_split_quoted(quoted); ++ assert_se(s); ++ ++ STRV_FOREACH(t, s) ++ assert_se(streq(list[i++], *t)); ++ ++ assert_se(list[i] == NULL); ++} ++ + static void test_strv_split_nulstr(void) { + _cleanup_strv_free_ char **l = NULL; + const char nulstr[] = "str0\0str1\0str2\0str3\0"; +@@ -309,6 +323,18 @@ int main(int argc, char *argv[]) { + test_strv_quote_unquote(input_table_quotes, QUOTES_STRING); + test_strv_quote_unquote(input_table_spaces, SPACES_STRING); + ++ test_strv_quote_unquote2(" foo=bar \"waldo\" zzz ", (const char*[]) { "foo=bar", "waldo", "zzz", NULL }); ++ test_strv_quote_unquote2("", (const char*[]) { NULL }); ++ test_strv_quote_unquote2(" ", (const char*[]) { NULL }); ++ test_strv_quote_unquote2(" ", (const char*[]) { NULL }); ++ test_strv_quote_unquote2(" x", (const char*[]) { "x", NULL }); ++ test_strv_quote_unquote2("x ", (const char*[]) { "x", NULL }); ++ test_strv_quote_unquote2(" x ", (const char*[]) { "x", NULL }); ++ test_strv_quote_unquote2(" \"x\" ", (const char*[]) { "x", NULL }); ++ test_strv_quote_unquote2(" \'x\' ", (const char*[]) { "x", NULL }); ++ test_strv_quote_unquote2(" \'x\"\' ", (const char*[]) { "x\"", NULL }); ++ test_strv_quote_unquote2(" \"x\'\" ", (const char*[]) { "x\'", NULL }); ++ + test_strv_split_nulstr(); + test_strv_parse_nulstr(); + test_strv_overlap(); diff --git a/SOURCES/0050-man-Improve-the-description-of-parameter-X-in-tmpfil.patch b/SOURCES/0050-man-Improve-the-description-of-parameter-X-in-tmpfil.patch new file mode 100644 index 0000000..c6d99c6 --- /dev/null +++ b/SOURCES/0050-man-Improve-the-description-of-parameter-X-in-tmpfil.patch @@ -0,0 +1,42 @@ +From fb8be2cd82a3e00fdbe506e163fdf599e0bd5bd2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= +Date: Thu, 3 Oct 2013 15:47:26 +0200 +Subject: [PATCH] man: Improve the description of parameter X in tmpfiles.d + page + +--- + man/tmpfiles.d.xml | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml +index 9fc4b7c..e8b630d 100644 +--- a/man/tmpfiles.d.xml ++++ b/man/tmpfiles.d.xml +@@ -184,15 +184,18 @@ L /tmp/foobar - - - - /dev/null + + X + Ignore a path +- during cleanup. Use this type +- to prevent path removal as +- controlled with the Age parameter. +- Note that if path is a directory, +- content of a directory is not +- excluded from clean-up, only +- directory itself. Lines of this +- type accept shell-style globs +- in place of normal path ++ during cleaning. Use this type ++ to exclude paths from clean-up ++ as controlled with the Age ++ parameter. Unlike x this ++ parameter will not exclude the ++ content if path is a directory, ++ but only directory itself. ++ Note that lines of this type do ++ not influence the effect of r ++ or R lines. Lines of this type ++ accept shell-style globs in ++ place of normal path + names. + + diff --git a/SOURCES/0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch b/SOURCES/0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch new file mode 100644 index 0000000..ec5fa69 --- /dev/null +++ b/SOURCES/0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch @@ -0,0 +1,26 @@ +From 70a0ba4546c69646ef7b220fb5e753416443d5b2 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 14 Jan 2014 15:40:16 +0100 +Subject: [PATCH] coredumpctl: in case of error free pattern after print + +--- + src/journal/coredumpctl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c +index 75c96cc..356d03d 100644 +--- a/src/journal/coredumpctl.c ++++ b/src/journal/coredumpctl.c +@@ -126,10 +126,11 @@ static int add_match(Set *set, const char *match) { + goto fail; + + log_debug("Adding pattern: %s", pattern); +- r = set_consume(set, pattern); ++ r = set_put(set, pattern); + if (r < 0) { + log_error("Failed to add pattern '%s': %s", + pattern, strerror(-r)); ++ free(pattern); + goto fail; + } + diff --git a/SOURCES/0052-udev-net_id-Introduce-predictable-network-names-for-.patch b/SOURCES/0052-udev-net_id-Introduce-predictable-network-names-for-.patch new file mode 100644 index 0000000..463d571 --- /dev/null +++ b/SOURCES/0052-udev-net_id-Introduce-predictable-network-names-for-.patch @@ -0,0 +1,142 @@ +From 08f8572347ca597147ab761d425e4480885e1995 Mon Sep 17 00:00:00 2001 +From: Hendrik Brueckner +Date: Thu, 9 Jan 2014 11:28:12 +0100 +Subject: [PATCH] udev/net_id: Introduce predictable network names for Linux on + System z + +Use the bus-ID to create predicatable devices names for network interfaces +on Linux on System z instances. The bus-ID identifies a device in the s390 +channel subsystem. + +Network interfaces of device type Ethernet are named as: + enccw0.0.1234 (13 characters) +up to + enccwff.7.ffff (14 characters) + +CTC network devices of device type SLIP, use a different prefix as follows: + slccw0.0.1234 (13 characters) + +See also Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=870859 +[tomegun: typical problem of netdevs switching names between reboots.] + +Conflicts: + src/udev/udev-builtin-net_id.c +--- + src/udev/udev-builtin-net_id.c | 64 ++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 62 insertions(+), 2 deletions(-) + +diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c +index 9ae8f08..d9de46d 100644 +--- a/src/udev/udev-builtin-net_id.c ++++ b/src/udev/udev-builtin-net_id.c +@@ -28,6 +28,7 @@ + * + * Two character prefixes based on the type of interface: + * en -- ethernet ++ * sl -- serial line IP (slip) + * wl -- wlan + * ww -- wwan + * +@@ -101,6 +102,7 @@ enum netname_type{ + NET_PCI, + NET_USB, + NET_BCMA, ++ NET_CCWGROUP, + }; + + struct netnames { +@@ -118,6 +120,8 @@ struct netnames { + char usb_ports[IFNAMSIZ]; + + char bcma_core[IFNAMSIZ]; ++ ++ char ccw_core[IFNAMSIZ]; + }; + + /* retrieve on-board index number and label from firmware */ +@@ -351,6 +355,44 @@ static int names_bcma(struct udev_device *dev, struct netnames *names) { + return 0; + } + ++static int names_ccw(struct udev_device *dev, struct netnames *names) { ++ struct udev_device *cdev; ++ const char *bus_id; ++ size_t bus_id_len; ++ int rc; ++ ++ /* Retrieve the associated CCW device */ ++ cdev = udev_device_get_parent(dev); ++ if (!cdev) ++ return -ENOENT; ++ ++ /* Network devices are always grouped CCW devices */ ++ if (!streq_ptr("ccwgroup", udev_device_get_subsystem(cdev))) ++ return -ENOENT; ++ ++ /* Retrieve bus-ID of the grouped CCW device. The bus-ID uniquely ++ * identifies the network device on the Linux on System z channel ++ * subsystem. Note that the bus-ID contains lowercase characters. ++ */ ++ bus_id = udev_device_get_sysname(cdev); ++ if (!bus_id) ++ return -ENOENT; ++ ++ /* Check the length of the bus-ID. Rely on that the kernel provides ++ * a correct bus-ID; alternatively, improve this check and parse and ++ * verify each bus-ID part... ++ */ ++ bus_id_len = strlen(bus_id); ++ if (!bus_id_len || bus_id_len < 8 || bus_id_len > 9) ++ return -EINVAL; ++ ++ /* Store the CCW bus-ID for use as network device name */ ++ rc = snprintf(names->ccw_core, sizeof(names->ccw_core), "ccw%s", bus_id); ++ if (rc >= 0 && rc < (int)sizeof(names->ccw_core)) ++ names->type = NET_CCWGROUP; ++ return 0; ++} ++ + static int names_mac(struct udev_device *dev, struct netnames *names) { + const char *s; + unsigned int i; +@@ -409,13 +451,21 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool + struct netnames names = {}; + int err; + +- /* handle only ARPHRD_ETHER devices */ ++ /* handle only ARPHRD_ETHER and ARPHRD_SLIP devices */ + s = udev_device_get_sysattr_value(dev, "type"); + if (!s) + return EXIT_FAILURE; + i = strtoul(s, NULL, 0); +- if (i != 1) ++ switch (i) { ++ case 1: /* ARPHRD_ETHER */ ++ prefix = "en"; ++ break; ++ case 256: /* ARPHRD_SLIP */ ++ prefix = "sl"; ++ break; ++ default: + return 0; ++ } + + /* skip stacked devices, like VLANs, ... */ + s = udev_device_get_sysattr_value(dev, "ifindex"); +@@ -447,6 +497,16 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool + ieee_oui(dev, &names, test); + } + ++ /* get path names for Linux on System z network devices */ ++ err = names_ccw(dev, &names); ++ if (err >= 0 && names.type == NET_CCWGROUP) { ++ char str[IFNAMSIZ]; ++ ++ if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_core) < (int)sizeof(str)) ++ udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); ++ goto out; ++ } ++ + /* get PCI based path names, we compose only PCI based paths */ + err = names_pci(dev, &names); + if (err < 0) diff --git a/SOURCES/0053-tmpfiles-don-t-allow-label_fix-to-print-ENOENT-when-.patch b/SOURCES/0053-tmpfiles-don-t-allow-label_fix-to-print-ENOENT-when-.patch new file mode 100644 index 0000000..ecb2e74 --- /dev/null +++ b/SOURCES/0053-tmpfiles-don-t-allow-label_fix-to-print-ENOENT-when-.patch @@ -0,0 +1,33 @@ +From 5d27397f97e26c9b1e9f01f041c2e68cbfb41eb3 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 9 Jan 2014 18:00:50 +0100 +Subject: [PATCH] tmpfiles: don't allow label_fix to print ENOENT when we want + to ignore it + +--- + src/tmpfiles/tmpfiles.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 239e56b..9a397af 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -434,8 +434,6 @@ finish: + } + + static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) { +- int r; +- + /* not using i->path directly because it may be a glob */ + if (i->mode_set) + if (chmod(path, i->mode) < 0) { +@@ -456,8 +454,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) { + } + } + +- r = label_fix(path, false, false); +- return r == -ENOENT && ignore_enoent ? 0 : r; ++ return label_fix(path, ignore_enoent, false); + } + + static int item_set_perms(Item *i, const char *path) { diff --git a/SOURCES/0054-delta-ensure-that-d_type-will-be-set-on-every-fs.patch b/SOURCES/0054-delta-ensure-that-d_type-will-be-set-on-every-fs.patch new file mode 100644 index 0000000..ee073d0 --- /dev/null +++ b/SOURCES/0054-delta-ensure-that-d_type-will-be-set-on-every-fs.patch @@ -0,0 +1,22 @@ +From 8d48fb915cbfa1b4ad594b597f2567d682bfc635 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 9 Jan 2014 16:43:00 +0100 +Subject: [PATCH] delta: ensure that d_type will be set on every fs + +--- + src/delta/delta.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/delta/delta.c b/src/delta/delta.c +index b3272d9..193642d 100644 +--- a/src/delta/delta.c ++++ b/src/delta/delta.c +@@ -291,6 +291,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + if (!de) + break; + ++ dirent_ensure_type(d, de); ++ + if (dropins && de->d_type == DT_DIR && endswith(de->d_name, ".d")) + enumerate_dir_d(top, bottom, drops, path, de->d_name); + diff --git a/SOURCES/0055-shell-completion-dump-has-moved-to-systemd-analyze.patch b/SOURCES/0055-shell-completion-dump-has-moved-to-systemd-analyze.patch new file mode 100644 index 0000000..041deda --- /dev/null +++ b/SOURCES/0055-shell-completion-dump-has-moved-to-systemd-analyze.patch @@ -0,0 +1,81 @@ +From 544af839ed7dd06d20fb4efd201dd93dc0e98a15 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 21 Oct 2013 18:53:57 -0400 +Subject: [PATCH] shell-completion: dump has moved to systemd-analyze + +Rename NO_OPTION to STANDALONE for consistency with other files. +--- + shell-completion/bash/systemctl | 2 +- + shell-completion/bash/systemd-analyze | 4 ++-- + shell-completion/zsh/_systemctl | 3 +-- + shell-completion/zsh/_systemd-analyze | 1 + + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl +index e335ee8..eea4b6d 100644 +--- a/shell-completion/bash/systemctl ++++ b/shell-completion/bash/systemctl +@@ -137,7 +137,7 @@ _systemctl () { + [JOBS]='cancel' + [SNAPSHOTS]='delete' + [ENVS]='set-environment unset-environment' +- [STANDALONE]='daemon-reexec daemon-reload default dump ++ [STANDALONE]='daemon-reexec daemon-reload default + emergency exit halt hibernate hybrid-sleep kexec list-jobs + list-sockets list-units list-unit-files poweroff reboot rescue + show-environment suspend get-default' +diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze +index 5bd6768..b65466b 100644 +--- a/shell-completion/bash/systemd-analyze ++++ b/shell-completion/bash/systemd-analyze +@@ -31,7 +31,7 @@ _systemd_analyze() { + local OPTS='--help --version --system --user --from-pattern --to-pattern --order --require' + + local -A VERBS=( +- [NO_OPTION]='time blame plot' ++ [STANDALONE]='time blame plot dump' + [CRITICAL_CHAIN]='critical-chain' + [DOT]='dot' + [LOG_LEVEL]='set-log-level' +@@ -55,7 +55,7 @@ _systemd_analyze() { + if [[ -z $verb ]]; then + comps=${VERBS[*]} + +- elif __contains_word "$verb" ${VERBS[NO_OPTION]}; then ++ elif __contains_word "$verb" ${VERBS[STANDALONE]}; then + if [[ $cur = -* ]]; then + comps='--help --version --system --user' + fi +diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl +index 298e97e..3959cd5 100644 +--- a/shell-completion/zsh/_systemctl ++++ b/shell-completion/zsh/_systemctl +@@ -38,7 +38,6 @@ + "is-enabled:Check whether unit files are enabled" + "list-jobs:List jobs" + "cancel:Cancel all, one, or more jobs" +- "dump:Dump server status" + "snapshot:Create a snapshot" + "delete:Remove one or more snapshots" + "show-environment:Dump environment" +@@ -264,7 +263,7 @@ done + (( $+functions[_systemctl_link] )) || _systemctl_link() { _files } + + # no systemctl completion for: +-# [STANDALONE]='daemon-reexec daemon-reload default dump ++# [STANDALONE]='daemon-reexec daemon-reload default + # emergency exit halt kexec list-jobs list-units + # list-unit-files poweroff reboot rescue show-environment' + # [NAME]='snapshot load' +diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze +index 37c60f5..2eda5fe 100644 +--- a/shell-completion/zsh/_systemd-analyze ++++ b/shell-completion/zsh/_systemd-analyze +@@ -15,6 +15,7 @@ _systemd_analyze_command(){ + 'critical-chain:Print a tree of the time critical chain of units' + 'plot:Output SVG graphic showing service initialization' + 'dot:Dump dependency graph (in dot(1) format)' ++ 'dump:Dump server status' + 'set-log-level:Set systemd log threshold' + ) + diff --git a/SOURCES/0056-shell-completion-remove-load-from-systemctl.patch b/SOURCES/0056-shell-completion-remove-load-from-systemctl.patch new file mode 100644 index 0000000..7227e58 --- /dev/null +++ b/SOURCES/0056-shell-completion-remove-load-from-systemctl.patch @@ -0,0 +1,46 @@ +From 9e658a10c1de26c8b4a18a7e55440bb8bd819f20 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 15 Jan 2014 15:31:07 +0100 +Subject: [PATCH] shell-completion: remove load from systemctl + +Conflicts: + shell-completion/bash/systemctl +--- + shell-completion/bash/systemctl | 2 +- + shell-completion/zsh/_systemctl | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl +index eea4b6d..84149e3 100644 +--- a/shell-completion/bash/systemctl ++++ b/shell-completion/bash/systemctl +@@ -141,7 +141,7 @@ _systemctl () { + emergency exit halt hibernate hybrid-sleep kexec list-jobs + list-sockets list-units list-unit-files poweroff reboot rescue + show-environment suspend get-default' +- [NAME]='snapshot load' ++ [NAME]='snapshot' + [FILE]='link' + [TARGETS]='set-default' + ) +diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl +index 3959cd5..6d98cb6 100644 +--- a/shell-completion/zsh/_systemctl ++++ b/shell-completion/zsh/_systemctl +@@ -24,7 +24,6 @@ + "status:Show runtime status of one or more units" + "show:Show properties of one or more units/jobs or the manager" + "reset-failed:Reset failed state for all, one, or more units" +- "load:Load one or more units" + "list-unit-files:List installed unit files" + "enable:Enable one or more unit files" + "disable:Disable one or more unit files" +@@ -266,7 +265,7 @@ done + # [STANDALONE]='daemon-reexec daemon-reload default + # emergency exit halt kexec list-jobs list-units + # list-unit-files poweroff reboot rescue show-environment' +-# [NAME]='snapshot load' ++# [NAME]='snapshot' + + _systemctl_caching_policy() + { diff --git a/SOURCES/0057-Fix-SELinux-check-for-transient-units.-1008864.patch b/SOURCES/0057-Fix-SELinux-check-for-transient-units.-1008864.patch new file mode 100644 index 0000000..e456505 --- /dev/null +++ b/SOURCES/0057-Fix-SELinux-check-for-transient-units.-1008864.patch @@ -0,0 +1,105 @@ +From 96bb682b6fa33faaff5c3db7506e9864fe5c09dc Mon Sep 17 00:00:00 2001 +From: Dan Walsh +Date: Thu, 16 Jan 2014 12:59:10 +0100 +Subject: [PATCH] Fix SELinux check for transient units. (#1008864) + +SELinux does not have a path to check for a snapshot servic creation. +This ends up giving us a bogus check. + +On snapshot creation we should check if the remote process type, has the ability to start a service with the type that systemd is running with. +--- + src/core/dbus-manager.c | 6 +++--- + src/core/selinux-access.c | 9 +++++---- + src/core/selinux-access.h | 13 +++++++++++++ + 3 files changed, 21 insertions(+), 7 deletions(-) + +diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c +index 8f4d017..7be5d13 100644 +--- a/src/core/dbus-manager.c ++++ b/src/core/dbus-manager.c +@@ -1102,7 +1102,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + dbus_bool_t cleanup; + Snapshot *s; + +- SELINUX_ACCESS_CHECK(connection, message, "start"); ++ SELINUX_RUNTIME_UNIT_ACCESS_CHECK(connection, message, "start"); + + if (!dbus_message_get_args( + message, +@@ -1155,7 +1155,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + return bus_send_error_reply(connection, message, &error, -ENOENT); + } + +- SELINUX_UNIT_ACCESS_CHECK(u, connection, message, "stop"); ++ SELINUX_RUNTIME_UNIT_ACCESS_CHECK(connection, message, "stop"); + snapshot_remove(SNAPSHOT(u)); + + reply = dbus_message_new_method_return(message); +@@ -1765,7 +1765,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + if (r < 0) + return bus_send_error_reply(connection, message, &error, r); + +- SELINUX_UNIT_ACCESS_CHECK(u, connection, message, "start"); ++ SELINUX_RUNTIME_UNIT_ACCESS_CHECK(connection, message, "start"); + + if (u->load_state != UNIT_NOT_FOUND || set_size(u->dependencies[UNIT_REFERENCED_BY]) > 0) { + dbus_set_error(&error, BUS_ERROR_UNIT_EXISTS, "Unit %s already exists.", name); +diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c +index 0a3ee18..5d85b26 100644 +--- a/src/core/selinux-access.c ++++ b/src/core/selinux-access.c +@@ -374,8 +374,9 @@ int selinux_access_check( + goto finish; + } + +- if (path) { +- tclass = "service"; ++ ++ tclass = "service"; ++ if (path && !strneq(path,"system", strlen("system"))) { + /* get the file context of the unit file */ + r = getfilecon(path, &fcon); + if (r < 0) { +@@ -384,9 +385,9 @@ int selinux_access_check( + log_error("Failed to get security context on %s: %m",path); + goto finish; + } +- + } else { +- tclass = "system"; ++ if (path) ++ tclass = "system"; + r = getcon(&fcon); + if (r < 0) { + dbus_set_error(error, DBUS_ERROR_ACCESS_DENIED, "Failed to get current context."); +diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h +index 2d7ac64..92acd69 100644 +--- a/src/core/selinux-access.h ++++ b/src/core/selinux-access.h +@@ -36,6 +36,18 @@ int selinux_access_check(DBusConnection *connection, DBusMessage *message, const + DBusConnection *_c = (connection); \ + DBusMessage *_m = (message); \ + dbus_error_init(&_error); \ ++ _r = selinux_access_check(_c, _m, "system", (permission), &_error); \ ++ if (_r < 0) \ ++ return bus_send_error_reply(_c, _m, &_error, _r); \ ++ } while (false) ++ ++#define SELINUX_RUNTIME_UNIT_ACCESS_CHECK(connection, message, permission) \ ++ do { \ ++ DBusError _error; \ ++ int _r; \ ++ DBusConnection *_c = (connection); \ ++ DBusMessage *_m = (message); \ ++ dbus_error_init(&_error); \ + _r = selinux_access_check(_c, _m, NULL, (permission), &_error); \ + if (_r < 0) \ + return bus_send_error_reply(_c, _m, &_error, _r); \ +@@ -57,6 +69,7 @@ int selinux_access_check(DBusConnection *connection, DBusMessage *message, const + #else + + #define SELINUX_ACCESS_CHECK(connection, message, permission) do { } while (false) ++#define SELINUX_RUNTIME_UNIT_ACCESS_CHECK(connection, message, permission) do { } while (false) + #define SELINUX_UNIT_ACCESS_CHECK(unit, connection, message, permission) do { } while (false) + + #endif diff --git a/SOURCES/0058-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch b/SOURCES/0058-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch new file mode 100644 index 0000000..2d0a17d --- /dev/null +++ b/SOURCES/0058-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch @@ -0,0 +1,22 @@ +From eaa9e2f4c332d7cf8ee4bc9e377edb2043031e85 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 2 Oct 2013 13:39:49 +0200 +Subject: [PATCH] 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; diff --git a/SOURCES/0059-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch b/SOURCES/0059-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch new file mode 100644 index 0000000..ec6e9d9 --- /dev/null +++ b/SOURCES/0059-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch @@ -0,0 +1,22 @@ +From 9257a03a02a35f12e6d410dd16bf003c9bae742e Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 2 Oct 2013 14:03:56 +0200 +Subject: [PATCH] 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; diff --git a/SOURCES/0060-systemctl-fix-name-mangling-for-sysv-units.patch b/SOURCES/0060-systemctl-fix-name-mangling-for-sysv-units.patch new file mode 100644 index 0000000..2e8df3b --- /dev/null +++ b/SOURCES/0060-systemctl-fix-name-mangling-for-sysv-units.patch @@ -0,0 +1,131 @@ +From f4cad2f52718b386ab8c233d6d702e808acfb844 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= +Date: Wed, 2 Oct 2013 16:42:42 +0200 +Subject: [PATCH] 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 0d1a487..036828b 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; + diff --git a/SOURCES/0061-execute-more-debugging-messages.patch b/SOURCES/0061-execute-more-debugging-messages.patch new file mode 100644 index 0000000..5093eea --- /dev/null +++ b/SOURCES/0061-execute-more-debugging-messages.patch @@ -0,0 +1,121 @@ +From a454e9c726630fe4811a1c93b2d88b0e77b3094f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 28 Aug 2013 08:01:30 -0400 +Subject: [PATCH] execute: more debugging messages + +--- + src/core/execute.c | 35 +++++++++++++++++++++-------------- + src/login/pam-module.c | 3 ++- + 2 files changed, 23 insertions(+), 15 deletions(-) + +diff --git a/src/core/execute.c b/src/core/execute.c +index a53ef48..981b9e4 100644 +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -317,12 +317,12 @@ static int setup_input(const ExecContext *context, int socket_fd, bool apply_tty + case EXEC_INPUT_TTY_FAIL: { + int fd, r; + +- if ((fd = acquire_terminal( +- tty_path(context), +- i == EXEC_INPUT_TTY_FAIL, +- i == EXEC_INPUT_TTY_FORCE, +- false, +- (usec_t) -1)) < 0) ++ fd = acquire_terminal(tty_path(context), ++ i == EXEC_INPUT_TTY_FAIL, ++ i == EXEC_INPUT_TTY_FORCE, ++ false, ++ (usec_t) -1); ++ if (fd < 0) + return fd; + + if (fd != STDIN_FILENO) { +@@ -748,6 +748,7 @@ static int setup_pam( + char **e = NULL; + bool close_session = false; + pid_t pam_pid = 0, parent_pid; ++ int flags = 0; + + assert(name); + assert(user); +@@ -760,6 +761,9 @@ static int setup_pam( + * daemon. We do things this way to ensure that the main PID + * of the daemon is the one we initially fork()ed. */ + ++ if (log_get_max_level() < LOG_PRI(LOG_DEBUG)) ++ flags |= PAM_SILENT; ++ + pam_code = pam_start(name, user, &conv, &handle); + if (pam_code != PAM_SUCCESS) { + handle = NULL; +@@ -772,11 +776,11 @@ static int setup_pam( + goto fail; + } + +- pam_code = pam_acct_mgmt(handle, PAM_SILENT); ++ pam_code = pam_acct_mgmt(handle, flags); + if (pam_code != PAM_SUCCESS) + goto fail; + +- pam_code = pam_open_session(handle, PAM_SILENT); ++ pam_code = pam_open_session(handle, flags); + if (pam_code != PAM_SUCCESS) + goto fail; + +@@ -850,7 +854,7 @@ static int setup_pam( + + /* If our parent died we'll end the session */ + if (getppid() != parent_pid) { +- pam_code = pam_close_session(handle, PAM_DATA_SILENT); ++ pam_code = pam_close_session(handle, flags); + if (pam_code != PAM_SUCCESS) + goto child_finish; + } +@@ -858,7 +862,7 @@ static int setup_pam( + r = 0; + + child_finish: +- pam_end(handle, pam_code | PAM_DATA_SILENT); ++ pam_end(handle, pam_code | flags); + _exit(r); + } + +@@ -880,16 +884,19 @@ static int setup_pam( + return 0; + + fail: +- if (pam_code != PAM_SUCCESS) ++ if (pam_code != PAM_SUCCESS) { ++ log_error("PAM failed: %s", pam_strerror(handle, pam_code)); + err = -EPERM; /* PAM errors do not map to errno */ +- else ++ } else { ++ log_error("PAM failed: %m"); + err = -errno; ++ } + + if (handle) { + if (close_session) +- pam_code = pam_close_session(handle, PAM_DATA_SILENT); ++ pam_code = pam_close_session(handle, flags); + +- pam_end(handle, pam_code | PAM_DATA_SILENT); ++ pam_end(handle, pam_code | flags); + } + + strv_free(e); +diff --git a/src/login/pam-module.c b/src/login/pam-module.c +index 49296b5..973daf7 100644 +--- a/src/login/pam-module.c ++++ b/src/login/pam-module.c +@@ -199,7 +199,8 @@ _public_ PAM_EXTERN int pam_sm_open_session( + + dbus_error_init(&error); + +- /* pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); */ ++ if (debug) ++ pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); + + /* Make this a NOP on non-logind systems */ + if (!logind_running()) diff --git a/SOURCES/0062-logind-fix-bus-introspection-data-for-TakeControl.patch b/SOURCES/0062-logind-fix-bus-introspection-data-for-TakeControl.patch new file mode 100644 index 0000000..7b09e47 --- /dev/null +++ b/SOURCES/0062-logind-fix-bus-introspection-data-for-TakeControl.patch @@ -0,0 +1,22 @@ +From 52fe02b97504dfefb89db203cf7c6e93679ff681 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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 @@ + " \n" \ + " \n" \ + " \n" \ +- " \n" \ ++ " \n" \ + " \n" \ + " \n" \ + " \n" \ diff --git a/SOURCES/0063-utf8-fix-utf8_is_printable.patch b/SOURCES/0063-utf8-fix-utf8_is_printable.patch new file mode 100644 index 0000000..0074c63 --- /dev/null +++ b/SOURCES/0063-utf8-fix-utf8_is_printable.patch @@ -0,0 +1,44 @@ +From 91eda57764f26d3ebdbf8194a528d8d60d0f409a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 5 Oct 2013 22:47:52 -0400 +Subject: [PATCH] utf8: fix utf8_is_printable + +--- + src/shared/utf8.c | 5 +++-- + src/test/test-utf8.c | 1 + + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/shared/utf8.c b/src/shared/utf8.c +index a8e28ac..31120af 100644 +--- a/src/shared/utf8.c ++++ b/src/shared/utf8.c +@@ -141,14 +141,15 @@ bool utf8_is_printable(const char* str, size_t length) { + + assert(str); + +- for (p = (const uint8_t*) str; length; p++) { ++ for (p = (const uint8_t*) str; length;) { + int encoded_len = utf8_encoded_valid_unichar((const char *)p); +- int32_t val = utf8_encoded_to_unichar((const char*)p); ++ int val = utf8_encoded_to_unichar((const char*)p); + + if (encoded_len < 0 || val < 0 || is_unicode_control(val)) + return false; + + length -= encoded_len; ++ p += encoded_len; + } + + return true; +diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c +index 7bd0db1..f0182ee 100644 +--- a/src/test/test-utf8.c ++++ b/src/test/test-utf8.c +@@ -26,6 +26,7 @@ static void test_utf8_is_printable(void) { + assert_se(utf8_is_printable("ascii is valid\tunicode", 22)); + assert_se(utf8_is_printable("\342\204\242", 3)); + assert_se(!utf8_is_printable("\341\204", 2)); ++ assert_se(utf8_is_printable("ąę", 4)); + } + + static void test_utf8_is_valid(void) { diff --git a/SOURCES/0064-keymap-Fix-Samsung-900X-34-C.patch b/SOURCES/0064-keymap-Fix-Samsung-900X-34-C.patch new file mode 100644 index 0000000..4782f3a --- /dev/null +++ b/SOURCES/0064-keymap-Fix-Samsung-900X-34-C.patch @@ -0,0 +1,39 @@ +From 774b623c772bbb716b74c8927b6f90cfbce795b9 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Wed, 9 Oct 2013 16:05:15 +0200 +Subject: [PATCH] keymap: Fix Samsung 900X[34]C + +It appears that it's not really the 900 vs. 940 or the X3 vs X4, but the +A/B/C/D suffix after that which makes the difference between the keymaps. On a +NP900X3C-A04RU you get + + MODALIAS=dmi:bvn*:bvr*:bd*:svnSAMSUNGELECTRONICSCO.,LTD.:pn900X3C/900X3D/900X4C/900X4D:* + +So change the matches to use AB vs. CDG as the differentiator. + +Thanks to Anatoly Markov for reporting and testing! +--- + hwdb/60-keyboard.hwdb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index 20d398f..b497f92 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -904,6 +904,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr* + KEYBOARD_KEY_a9=! # Fn Lock - Function lock off + + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDG]*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* + KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings + KEYBOARD_KEY_a0=!mute # Fn+F6 mute +@@ -915,7 +916,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* + + # Series 9 + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr* + KEYBOARD_KEY_ce=! # Fn+F8 keyboard backlight up + KEYBOARD_KEY_8d=! # Fn+F7 keyboard backlight down + KEYBOARD_KEY_96=! # Fn+F1 performance mode (?) diff --git a/SOURCES/0065-do-not-accept-garbage-from-acpi-firmware-performance.patch b/SOURCES/0065-do-not-accept-garbage-from-acpi-firmware-performance.patch new file mode 100644 index 0000000..531aa76 --- /dev/null +++ b/SOURCES/0065-do-not-accept-garbage-from-acpi-firmware-performance.patch @@ -0,0 +1,30 @@ +From d6987c081c5b0d1a2d9083b3d50fb78c63ab4904 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +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) diff --git a/SOURCES/0066-login-fix-invalid-free-in-sd_session_get_vt.patch b/SOURCES/0066-login-fix-invalid-free-in-sd_session_get_vt.patch new file mode 100644 index 0000000..01743fd --- /dev/null +++ b/SOURCES/0066-login-fix-invalid-free-in-sd_session_get_vt.patch @@ -0,0 +1,24 @@ +From 540aab87440dbde3bf6a1d057df9c7a79adf7031 Mon Sep 17 00:00:00 2001 +From: David Herrmann +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; + diff --git a/SOURCES/0067-login-make-sd_session_get_vt-actually-work.patch b/SOURCES/0067-login-make-sd_session_get_vt-actually-work.patch new file mode 100644 index 0000000..74b6f71 --- /dev/null +++ b/SOURCES/0067-login-make-sd_session_get_vt-actually-work.patch @@ -0,0 +1,24 @@ +From b2301b8a4a17d51ac713fd39484fe48075ad2f64 Mon Sep 17 00:00:00 2001 +From: David Herrmann +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; + diff --git a/SOURCES/0068-Make-sure-that-we-don-t-dereference-NULL.patch b/SOURCES/0068-Make-sure-that-we-don-t-dereference-NULL.patch new file mode 100644 index 0000000..48887d0 --- /dev/null +++ b/SOURCES/0068-Make-sure-that-we-don-t-dereference-NULL.patch @@ -0,0 +1,27 @@ +From 9765cfab7747c4d9435ec16a5fe29affeb2e52a7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 12 Oct 2013 13:43:07 -0400 +Subject: [PATCH] Make sure that we don't dereference NULL + +The code was actually safe, because b should +never be null, because if rvalue is empty, a different +branch is taken. But we *do* check for NULL in the +loop above, so it's better to also check here for symmetry. +--- + src/core/load-fragment.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c +index 44920d6..f01843d 100644 +--- a/src/core/load-fragment.c ++++ b/src/core/load-fragment.c +@@ -1860,7 +1860,8 @@ int config_parse_documentation(const char *unit, + free(*a); + } + } +- *b = NULL; ++ if (b) ++ *b = NULL; + + return r; + } diff --git a/SOURCES/0069-gitignore-ignore-clang-analyze-output.patch b/SOURCES/0069-gitignore-ignore-clang-analyze-output.patch new file mode 100644 index 0000000..84f5b8e --- /dev/null +++ b/SOURCES/0069-gitignore-ignore-clang-analyze-output.patch @@ -0,0 +1,21 @@ +From 9f433bba1d84c974f73d7c5929850a317981f692 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 12 Oct 2013 19:50:54 -0400 +Subject: [PATCH] gitignore: ignore clang --analyze output + +--- + .gitignore | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.gitignore b/.gitignore +index 5b38c0b..56e10a6 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -162,6 +162,7 @@ + *.la + *.lo + *.o ++*.plist + *.stamp + *.pyc + __pycache__/ diff --git a/SOURCES/0070-man-add-more-markup-to-udevadm-8.patch b/SOURCES/0070-man-add-more-markup-to-udevadm-8.patch new file mode 100644 index 0000000..efbecde --- /dev/null +++ b/SOURCES/0070-man-add-more-markup-to-udevadm-8.patch @@ -0,0 +1,94 @@ +From 52473fa9ee6d097431c48c0b9c4b4a51837c75eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 13 Oct 2013 19:43:19 -0400 +Subject: [PATCH] man: add more markup to udevadm(8) + +--- + man/udevadm.xml | 49 +++++++++++++++++++++++++++++++++---------------- + 1 file changed, 33 insertions(+), 16 deletions(-) + +diff --git a/man/udevadm.xml b/man/udevadm.xml +index b959216..a1ffe42 100644 +--- a/man/udevadm.xml ++++ b/man/udevadm.xml +@@ -61,9 +61,10 @@ + + + Description +- udevadm expects a command and command specific options. It +- controls the runtime behavior of udev, requests kernel events, +- manages the event queue, and provides simple debugging mechanisms. ++ udevadm expects a command and command ++ specific options. It controls the runtime behavior of ++ systemd-udevd, requests kernel events, manages ++ the event queue, and provides simple debugging mechanisms. + + + OPTIONS +@@ -97,23 +98,37 @@ + + + +- Query the database for specified type of device data. It needs the +- or to identify the specified +- device. Valid queries are: +- name, symlink, path, +- property, all. ++ Query the database for specified type of device ++ data. It needs the or ++ to identify the specified ++ device. Valid queries are: name, ++ symlink, path, ++ property, ++ all. + + + + + +- The devpath of the device to query. ++ The /sys path of the device to ++ query, e.g. ++ /sys/class/block/sda. ++ Note that this option usually isn't very useful, since ++ udev can guess the type of the ++ argument, so udevadm ++ --devpath=/class/block/sda is equivalent to ++ udevadm /sys/class/block/sda. + + + + + +- The name of the device node or a symlink to query ++ The name of the device node or a symlink to query, ++ e.g. /dev/sda. ++ Note that this option usually isn't very useful, since ++ udev can guess the type of the ++ argument, so udevadm --name=sda is ++ equivalent to udevadm /dev/sda. + + + +@@ -462,13 +477,15 @@ + + + +- ++ + +- 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. ++ 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. + + + diff --git a/SOURCES/0071-Fix-bad-assert-in-show_pid_array.patch b/SOURCES/0071-Fix-bad-assert-in-show_pid_array.patch new file mode 100644 index 0000000..08c3d4e --- /dev/null +++ b/SOURCES/0071-Fix-bad-assert-in-show_pid_array.patch @@ -0,0 +1,35 @@ +From 50f0e2315d0c22d2e98e53ff02e7ae2412463e9a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 +--- + src/shared/cgroup-show.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c +index cc44ab4..aa0f017 100644 +--- a/src/shared/cgroup-show.c ++++ b/src/shared/cgroup-show.c +@@ -44,8 +44,6 @@ 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++) { +@@ -65,7 +63,7 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi + 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; diff --git a/SOURCES/0072-Never-call-qsort-on-potentially-NULL-arrays.patch b/SOURCES/0072-Never-call-qsort-on-potentially-NULL-arrays.patch new file mode 100644 index 0000000..1df9c4c --- /dev/null +++ b/SOURCES/0072-Never-call-qsort-on-potentially-NULL-arrays.patch @@ -0,0 +1,25 @@ +From 87f830a2046141ed917661a726c3ec38b4d15e89 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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/shared/cgroup-show.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c +index aa0f017..f6e56db 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/SOURCES/0073-rules-expose-loop-block-devices-to-systemd.patch b/SOURCES/0073-rules-expose-loop-block-devices-to-systemd.patch new file mode 100644 index 0000000..0da76da --- /dev/null +++ b/SOURCES/0073-rules-expose-loop-block-devices-to-systemd.patch @@ -0,0 +1,32 @@ +From 24888798c1c90dbdc7ab0aa0b57f2196066712c4 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 16 Oct 2013 02:49:54 +0200 +Subject: [PATCH] rules: expose loop block devices to systemd + +Since the kernel no longer exposes a large number of "dead" loop devices +it is OK to expose them now in systemd, so let's do that. This has the +benefit that mount dependencies on loop devices start to work. +--- + rules/99-systemd.rules.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index bbb7d0c..3c99475 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -11,12 +11,12 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd" + + KERNEL=="vport*", TAG+="systemd" + +-SUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd" +-SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" ++SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd" ++SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" + + # Ignore encrypted devices with no identified superblock on it, since + # we are probably still calling mke2fs or mkswap on it. +-SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0" ++SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0" + + # Ignore raid devices that are not yet assembled and started + SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0" diff --git a/SOURCES/0074-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch b/SOURCES/0074-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch new file mode 100644 index 0000000..fa85b4f --- /dev/null +++ b/SOURCES/0074-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch @@ -0,0 +1,35 @@ +From d59e493f9b1b6645c9d1916bdc3e8b4802643ab5 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +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. + +Conflicts: + rules/99-systemd.rules.in +--- + rules/99-systemd.rules.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index 3c99475..307f18f 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -53,12 +53,12 @@ ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sy + + # Pull in backlight save/restore for all firmware backlight devices + +-ACTION=="add", SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service" ++SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$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" diff --git a/SOURCES/0075-hwdb-update.patch b/SOURCES/0075-hwdb-update.patch new file mode 100644 index 0000000..66eb771 --- /dev/null +++ b/SOURCES/0075-hwdb-update.patch @@ -0,0 +1,1629 @@ +From 805268127b9bceb16f58bf52e3f993e87ea0b9f8 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sun, 20 Oct 2013 01:12:29 +0200 +Subject: [PATCH] hwdb: update + +--- + hwdb/20-OUI.hwdb | 391 +++++++++++++++++++++++++++++++++++++++++- + hwdb/20-pci-vendor-model.hwdb | 216 ++++++++++++++++++++--- + 2 files changed, 578 insertions(+), 29 deletions(-) + +diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb +index e913b28..5067167 100644 +--- a/hwdb/20-OUI.hwdb ++++ b/hwdb/20-OUI.hwdb +@@ -12278,7 +12278,7 @@ OUI:40D85501B* + ID_OUI_FROM_DATABASE=Audio Enhancement + + OUI:40D85501C* +- ID_OUI_FROM_DATABASE=BERG ++ ID_OUI_FROM_DATABASE=BERG Cloud Limited + + OUI:40D85501D* + ID_OUI_FROM_DATABASE=Scharco Elektronik GmbH +@@ -13324,6 +13324,93 @@ OUI:40D85517B* + OUI:40D85517C* + ID_OUI_FROM_DATABASE=Critical Link + ++OUI:40D85517D* ++ ID_OUI_FROM_DATABASE=Kiwigrid GmbH ++ ++OUI:40D85517E* ++ ID_OUI_FROM_DATABASE=TOKHATEC ++ ++OUI:40D85517F* ++ ID_OUI_FROM_DATABASE=Telvent ++ ++OUI:40D855180* ++ ID_OUI_FROM_DATABASE=BroadSoft Inc ++ ++OUI:40D855181* ++ ID_OUI_FROM_DATABASE=eROCCA ++ ++OUI:40D855182* ++ ID_OUI_FROM_DATABASE=Georg Neumann GmbH ++ ++OUI:40D855183* ++ ID_OUI_FROM_DATABASE=EMAC, Inc. ++ ++OUI:40D855184* ++ ID_OUI_FROM_DATABASE=Satkirit Ltd ++ ++OUI:40D855185* ++ ID_OUI_FROM_DATABASE=Standard Change Makers ++ ++OUI:40D855186* ++ ID_OUI_FROM_DATABASE=KST technology ++ ++OUI:40D855187* ++ ID_OUI_FROM_DATABASE=CDEX Corp. ++ ++OUI:40D855188* ++ ID_OUI_FROM_DATABASE=Array Corporation ++ ++OUI:40D855189* ++ ID_OUI_FROM_DATABASE=Yoozma Corporation ++ ++OUI:40D85518A* ++ ID_OUI_FROM_DATABASE=Aplex Technology Inc. ++ ++OUI:40D85518B* ++ ID_OUI_FROM_DATABASE=Diagnosys Test Systems Ltd ++ ++OUI:40D85518C* ++ ID_OUI_FROM_DATABASE=EOS S.r.l. ++ ++OUI:40D85518D* ++ ID_OUI_FROM_DATABASE=Zoe Medical ++ ++OUI:40D85518E* ++ ID_OUI_FROM_DATABASE=Kerun Visual Technology Co., Ltd.(Shenzhen) ++ ++OUI:40D85518F* ++ ID_OUI_FROM_DATABASE=Beat Sensing co. , ltd. ++ ++OUI:40D855190* ++ ID_OUI_FROM_DATABASE=Spider Tecnologia Ind. e Com Ltda ++ ++OUI:40D855191* ++ ID_OUI_FROM_DATABASE=Soukai Electric ++ ++OUI:40D855192* ++ ID_OUI_FROM_DATABASE=GENERAL DYNAMICS C4 SYSTEMS ++ ++OUI:40D855193* ++ ID_OUI_FROM_DATABASE=FORZA SILICON CORP. ++ ++OUI:40D855194* ++ ID_OUI_FROM_DATABASE=RF Code ++ ++OUI:40D855195* ++ ID_OUI_FROM_DATABASE=TONNA ELECTRONIQUE ++ ++OUI:40D855196* ++ ID_OUI_FROM_DATABASE=Advanced Micro Controls Inc. ++ ++OUI:40D855197* ++ ID_OUI_FROM_DATABASE=Berg Cloud Limited ++ ++OUI:40D855198* ++ ID_OUI_FROM_DATABASE=devboards GmbH ++ ++OUI:40D855199* ++ ID_OUI_FROM_DATABASE=PRESSOL Schmiergeraete GmbH ++ + OUI:000000* + ID_OUI_FROM_DATABASE=XEROX CORPORATION + +@@ -46883,7 +46970,7 @@ OUI:0080B7* + ID_OUI_FROM_DATABASE=STELLAR COMPUTER + + OUI:0080B8* +- ID_OUI_FROM_DATABASE=BUG, INCORPORATED ++ ID_OUI_FROM_DATABASE=B.U.G. MORISEIKI, INCORPORATED + + OUI:0080B9* + ID_OUI_FROM_DATABASE=ARCHE TECHNOLIGIES INC. +@@ -51589,6 +51676,9 @@ OUI:04F7E4* + OUI:04F8C2* + ID_OUI_FROM_DATABASE=Flaircomm Microelectronics, Inc. + ++OUI:04F938* ++ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD ++ + OUI:04FE31* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -52132,6 +52222,9 @@ OUI:08512E* + OUI:085240* + ID_OUI_FROM_DATABASE=EbV Elektronikbau- und Vertriebs GmbH + ++OUI:085AE0* ++ ID_OUI_FROM_DATABASE=Recovision Technology Co., Ltd. ++ + OUI:085B0E* + ID_OUI_FROM_DATABASE=Fortinet, Inc. + +@@ -52297,6 +52390,9 @@ OUI:08FC52* + OUI:08FC88* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:08FD0E* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:0C0400* + ID_OUI_FROM_DATABASE=Jantar d.o.o. + +@@ -52306,6 +52402,9 @@ OUI:0C0535* + OUI:0C1105* + ID_OUI_FROM_DATABASE=Ringslink (Xiamen) Network Communication Technologies Co., Ltd + ++OUI:0C1262* ++ ID_OUI_FROM_DATABASE=zte corporation ++ + OUI:0C130B* + ID_OUI_FROM_DATABASE=Uniqoteq Ltd. + +@@ -52366,6 +52465,9 @@ OUI:0C4DE9* + OUI:0C51F7* + ID_OUI_FROM_DATABASE=CHAUVIN ARNOUX + ++OUI:0C54A5* ++ ID_OUI_FROM_DATABASE=PEGATRON CORPORATION ++ + OUI:0C5521* + ID_OUI_FROM_DATABASE=Axiros GmbH + +@@ -52627,6 +52729,9 @@ OUI:100D7F* + OUI:100E2B* + ID_OUI_FROM_DATABASE=NEC CASIO Mobile Communications + ++OUI:100E7E* ++ ID_OUI_FROM_DATABASE=Juniper networks ++ + OUI:1010B6* + ID_OUI_FROM_DATABASE=McCain Inc + +@@ -53023,6 +53128,9 @@ OUI:149090* + OUI:149448* + ID_OUI_FROM_DATABASE=BLU CASTLE S.A. + ++OUI:1499E2* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:149FE8* + ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd. + +@@ -53095,6 +53203,9 @@ OUI:14EE9D* + OUI:14F0C5* + ID_OUI_FROM_DATABASE=Xtremio Ltd. + ++OUI:14F28E* ++ ID_OUI_FROM_DATABASE=ShenYang ZhongKe-Allwin Technology Co.LTD ++ + OUI:14F42A* + ID_OUI_FROM_DATABASE=Samsung Electronics + +@@ -53257,6 +53368,9 @@ OUI:1867B0* + OUI:186D99* + ID_OUI_FROM_DATABASE=Adanis Inc. + ++OUI:1879A2* ++ ID_OUI_FROM_DATABASE=GMJ ELECTRIC LIMITED ++ + OUI:187A93* + ID_OUI_FROM_DATABASE=AMICCOM Electronics Corporation + +@@ -53440,6 +53554,9 @@ OUI:1C19DE* + OUI:1C1D67* + ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd + ++OUI:1C1D86* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:1C334D* + ID_OUI_FROM_DATABASE=ITS Telecom + +@@ -53803,6 +53920,9 @@ OUI:20858C* + OUI:208984* + ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD + ++OUI:208986* ++ ID_OUI_FROM_DATABASE=zte corporation ++ + OUI:20918A* + ID_OUI_FROM_DATABASE=PROFALUX + +@@ -53929,6 +54049,9 @@ OUI:20FEDB* + OUI:2401C7* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:24050F* ++ ID_OUI_FROM_DATABASE=MTN Electronic Co. Ltd ++ + OUI:240917* + ID_OUI_FROM_DATABASE=Devlin Electronics Limited + +@@ -54034,6 +54157,9 @@ OUI:249442* + OUI:249504* + ID_OUI_FROM_DATABASE=SFR + ++OUI:24A2E1* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:24A42C* + ID_OUI_FROM_DATABASE=KOUKAAM a.s. + +@@ -54043,6 +54169,9 @@ OUI:24A43C* + OUI:24A495* + ID_OUI_FROM_DATABASE=Thales Canada Inc. + ++OUI:24A87D* ++ ID_OUI_FROM_DATABASE=Panasonic Automotive Systems Asia Pacific(Thailand)Co.,Ltd. ++ + OUI:24A937* + ID_OUI_FROM_DATABASE=PURE Storage + +@@ -54121,6 +54250,9 @@ OUI:24DBAC* + OUI:24DBAD* + ID_OUI_FROM_DATABASE=ShopperTrak RCT Corporation + ++OUI:24DBED* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:24DEC6* + ID_OUI_FROM_DATABASE=Aruba Networks + +@@ -54130,6 +54262,9 @@ OUI:24E271* + OUI:24E6BA* + ID_OUI_FROM_DATABASE=JSC Zavod im. Kozitsky + ++OUI:24E9B3* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:24EA40* + ID_OUI_FROM_DATABASE=Systeme Helmholz GmbH + +@@ -54547,6 +54682,9 @@ OUI:2C553C* + OUI:2C59E5* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:2C5A05* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:2C5AA3* + ID_OUI_FROM_DATABASE=PROMATE ELECTRONIC CO.LTD + +@@ -54940,6 +55078,9 @@ OUI:3407FB* + OUI:340804* + ID_OUI_FROM_DATABASE=D-Link Corporation + ++OUI:3413A8* ++ ID_OUI_FROM_DATABASE=Mediplan Limited ++ + OUI:3413E8* + ID_OUI_FROM_DATABASE=Intel Corporate + +@@ -55321,6 +55462,9 @@ OUI:386E21* + OUI:3872C0* + ID_OUI_FROM_DATABASE=COMTREND + ++OUI:387B47* ++ ID_OUI_FROM_DATABASE=AKELA, Inc. ++ + OUI:388345* + ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO., LTD. + +@@ -55390,6 +55534,9 @@ OUI:38C7BA* + OUI:38C85C* + ID_OUI_FROM_DATABASE=Cisco SPVTG + ++OUI:38C9A9* ++ ID_OUI_FROM_DATABASE=SMART High Reliability Solutions, Inc. ++ + OUI:38CA97* + ID_OUI_FROM_DATABASE=Contour Design LLC + +@@ -55459,6 +55606,9 @@ OUI:3C081E* + OUI:3C096D* + ID_OUI_FROM_DATABASE=Powerhouse Dynamics + ++OUI:3C0E23* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:3C0FC1* + ID_OUI_FROM_DATABASE=KBC Networks + +@@ -55507,6 +55657,9 @@ OUI:3C300C* + OUI:3C363D* + ID_OUI_FROM_DATABASE=Nokia Corporation + ++OUI:3C36E4* ++ ID_OUI_FROM_DATABASE=Arris Group, Inc. ++ + OUI:3C3888* + ID_OUI_FROM_DATABASE=ConnectQuest, llc + +@@ -55672,6 +55825,9 @@ OUI:3CD0F8* + OUI:3CD16E* + ID_OUI_FROM_DATABASE=Telepower Communication Co., Ltd + ++OUI:3CD4D6* ++ ID_OUI_FROM_DATABASE=WirelessWERX, Inc ++ + OUI:3CD7DA* + ID_OUI_FROM_DATABASE=SK Mtek microelectronics(shenzhen)limited + +@@ -55771,6 +55927,9 @@ OUI:402CF4* + OUI:403004* + ID_OUI_FROM_DATABASE=Apple + ++OUI:403067* ++ ID_OUI_FROM_DATABASE=Conlog (Pty) Ltd ++ + OUI:40336C* + ID_OUI_FROM_DATABASE=Godrej & Boyce Mfg. co. ltd + +@@ -55918,6 +56077,9 @@ OUI:40B3FC* + OUI:40B4F0* + ID_OUI_FROM_DATABASE=Juniper Networks + ++OUI:40B6B1* ++ ID_OUI_FROM_DATABASE=SUNGSAM CO,.Ltd ++ + OUI:40B7F3* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + +@@ -55972,6 +56134,9 @@ OUI:40ECF8* + OUI:40EF4C* + ID_OUI_FROM_DATABASE=Fihonest communication co.,Ltd + ++OUI:40F02F* ++ ID_OUI_FROM_DATABASE=Liteon Technology Corporation ++ + OUI:40F14C* + ID_OUI_FROM_DATABASE=ISE Europe SPRL + +@@ -56203,6 +56368,12 @@ OUI:44C233* + OUI:44C39B* + ID_OUI_FROM_DATABASE=OOO RUBEZH NPO + ++OUI:44C4A9* ++ ID_OUI_FROM_DATABASE=Opticom Communication, LLC ++ ++OUI:44C56F* ++ ID_OUI_FROM_DATABASE=NGN Easy Satfinder (Tianjin) Electronic Co., Ltd ++ + OUI:44C9A2* + ID_OUI_FROM_DATABASE=Greenwald Industries + +@@ -56362,6 +56533,9 @@ OUI:48B253* + OUI:48B8DE* + ID_OUI_FROM_DATABASE=HOMEWINS TECHNOLOGY CO.,LTD. + ++OUI:48B977* ++ ID_OUI_FROM_DATABASE=PulseOn Oy ++ + OUI:48B9C2* + ID_OUI_FROM_DATABASE=Teletics Inc. + +@@ -56659,9 +56833,15 @@ OUI:4CCC34* + OUI:4CD637* + ID_OUI_FROM_DATABASE=Qsono Electronics Co., Ltd + ++OUI:4CD9C4* ++ ID_OUI_FROM_DATABASE=Magneti Marelli Automotive Electronics (Guangzhou) Co. Ltd ++ + OUI:4CDF3D* + ID_OUI_FROM_DATABASE=TEAM ENGINEERS ADVANCE TECHNOLOGIES INDIA PVT LTD + ++OUI:4CE1BB* ++ ID_OUI_FROM_DATABASE=Zhuhai HiFocus Technology Co., Ltd. ++ + OUI:4CE676* + ID_OUI_FROM_DATABASE=Buffalo Inc. + +@@ -56701,6 +56881,9 @@ OUI:5011EB* + OUI:5017FF* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:501AC5* ++ ID_OUI_FROM_DATABASE=Microsoft ++ + OUI:50206B* + ID_OUI_FROM_DATABASE=Emerson Climate Technologies Transportation Solutions + +@@ -56812,6 +56995,9 @@ OUI:507D02* + OUI:507E5D* + ID_OUI_FROM_DATABASE=Arcadyan Technology Corporation + ++OUI:508569* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,LTD ++ + OUI:5087B8* + ID_OUI_FROM_DATABASE=Nuvyyo Inc + +@@ -56995,6 +57181,9 @@ OUI:5435DF* + OUI:543968* + ID_OUI_FROM_DATABASE=Edgewater Networks Inc + ++OUI:5439DF* ++ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD ++ + OUI:543D37* + ID_OUI_FROM_DATABASE=Ruckus Wireless + +@@ -57055,6 +57244,9 @@ OUI:5481AD* + OUI:54847B* + ID_OUI_FROM_DATABASE=Digital Devices GmbH + ++OUI:54880E* ++ ID_OUI_FROM_DATABASE=Samsung Electro Mechanics co., LTD. ++ + OUI:548922* + ID_OUI_FROM_DATABASE=Zelfy Inc + +@@ -57439,6 +57631,9 @@ OUI:5C2479* + OUI:5C260A* + ID_OUI_FROM_DATABASE=Dell Inc. + ++OUI:5C2AEF* ++ ID_OUI_FROM_DATABASE=Open Access Pty Ltd ++ + OUI:5C3327* + ID_OUI_FROM_DATABASE=Spazio Italia srl + +@@ -57547,6 +57742,9 @@ OUI:5CA39D* + OUI:5CA3EB* + ID_OUI_FROM_DATABASE=Lokel s.r.o. + ++OUI:5CA48A* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:5CAC4C* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -58228,6 +58426,9 @@ OUI:64E161* + OUI:64E599* + ID_OUI_FROM_DATABASE=EFM Networks + ++OUI:64E625* ++ ID_OUI_FROM_DATABASE=Woxu Wireless Co., Ltd ++ + OUI:64E682* + ID_OUI_FROM_DATABASE=Apple + +@@ -58318,6 +58519,9 @@ OUI:683EEC* + OUI:684352* + ID_OUI_FROM_DATABASE=Bhuu Limited + ++OUI:684898* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:684B88* + ID_OUI_FROM_DATABASE=Galtronics Telemetry Inc. + +@@ -58573,6 +58777,9 @@ OUI:6C3A84* + OUI:6C3BE5* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:6C3C53* ++ ID_OUI_FROM_DATABASE=SoundHawk Corp ++ + OUI:6C3E6D* + ID_OUI_FROM_DATABASE=Apple + +@@ -58912,6 +59119,9 @@ OUI:706582* + OUI:70704C* + ID_OUI_FROM_DATABASE=Purple Communications, Inc + ++OUI:7071B3* ++ ID_OUI_FROM_DATABASE=Brain Corporation ++ + OUI:7071BC* + ID_OUI_FROM_DATABASE=PEGATRON CORPORATION + +@@ -58936,6 +59146,9 @@ OUI:7076F0* + OUI:707BE8* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + ++OUI:707C18* ++ ID_OUI_FROM_DATABASE=ADATA Technology Co., Ltd ++ + OUI:707E43* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + +@@ -59128,6 +59341,9 @@ OUI:74372F* + OUI:743889* + ID_OUI_FROM_DATABASE=ANNAX Anzeigesysteme GmbH + ++OUI:743ECB* ++ ID_OUI_FROM_DATABASE=Gentrice tech ++ + OUI:744401* + ID_OUI_FROM_DATABASE=NETGEAR + +@@ -59533,6 +59749,9 @@ OUI:78A6BD* + OUI:78A714* + ID_OUI_FROM_DATABASE=Amphenol + ++OUI:78A873* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:78AB60* + ID_OUI_FROM_DATABASE=ABB Australia + +@@ -59644,6 +59863,9 @@ OUI:78E8B6* + OUI:78EC22* + ID_OUI_FROM_DATABASE=Shanghai Qihui Telecom Technology Co., LTD + ++OUI:78EC74* ++ ID_OUI_FROM_DATABASE=Kyland-USA ++ + OUI:78EF4C* + ID_OUI_FROM_DATABASE=Unetconvergence Co., Ltd. + +@@ -59749,6 +59971,9 @@ OUI:7C3E9D* + OUI:7C438F* + ID_OUI_FROM_DATABASE=E-Band Communications Corp. + ++OUI:7C444C* ++ ID_OUI_FROM_DATABASE=Entertainment Solutions, S.L. ++ + OUI:7C49B9* + ID_OUI_FROM_DATABASE=Plexus Manufacturing Sdn Bhd + +@@ -59911,6 +60136,9 @@ OUI:7CC8D7* + OUI:7CCB0D* + ID_OUI_FROM_DATABASE=Antaira Technologies, LLC + ++OUI:7CCD11* ++ ID_OUI_FROM_DATABASE=MS-Magnet ++ + OUI:7CCD3C* + ID_OUI_FROM_DATABASE=Guangzhou Juzing Technology Co., Ltd + +@@ -60181,6 +60409,9 @@ OUI:80B95C* + OUI:80BAAC* + ID_OUI_FROM_DATABASE=TeleAdapt Ltd + ++OUI:80BAE6* ++ ID_OUI_FROM_DATABASE=Neets ++ + OUI:80BBEB* + ID_OUI_FROM_DATABASE=Satmap Systems Ltd + +@@ -60373,6 +60604,9 @@ OUI:847E40* + OUI:8482F4* + ID_OUI_FROM_DATABASE=Beijing Huasun Unicreate Technology Co., Ltd + ++OUI:848336* ++ ID_OUI_FROM_DATABASE=Newrun ++ + OUI:848371* + ID_OUI_FROM_DATABASE=Avaya, Inc + +@@ -60475,6 +60709,9 @@ OUI:84F64C* + OUI:84FCFE* + ID_OUI_FROM_DATABASE=Apple + ++OUI:84FE9E* ++ ID_OUI_FROM_DATABASE=RTC Industries, Inc. ++ + OUI:880355* + ID_OUI_FROM_DATABASE=Arcadyan Technology Corp. + +@@ -60634,6 +60871,9 @@ OUI:889821* + OUI:889B39* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:889CA6* ++ ID_OUI_FROM_DATABASE=BTB Korea INC ++ + OUI:889FFA* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -60664,6 +60904,9 @@ OUI:88BFD5* + OUI:88C36E* + ID_OUI_FROM_DATABASE=Beijing Ereneben lnformation Technology Limited + ++OUI:88C626* ++ ID_OUI_FROM_DATABASE=Logitech - Ultimate Ears ++ + OUI:88C663* + ID_OUI_FROM_DATABASE=Apple + +@@ -60760,6 +61003,9 @@ OUI:8C2F39* + OUI:8C3330* + ID_OUI_FROM_DATABASE=EmFirst Co., Ltd. + ++OUI:8C3AE3* ++ ID_OUI_FROM_DATABASE=LG Electronics ++ + OUI:8C3C07* + ID_OUI_FROM_DATABASE=Skiva Technologies, Inc. + +@@ -60778,6 +61024,9 @@ OUI:8C4B59* + OUI:8C4CDC* + ID_OUI_FROM_DATABASE=PLANEX COMMUNICATIONS INC. + ++OUI:8C4DB9* ++ ID_OUI_FROM_DATABASE=Unmonday Ltd ++ + OUI:8C4DEA* + ID_OUI_FROM_DATABASE=Cerio Corporation + +@@ -60790,6 +61039,9 @@ OUI:8C53F7* + OUI:8C541D* + ID_OUI_FROM_DATABASE=LGE + ++OUI:8C569D* ++ ID_OUI_FROM_DATABASE=Imaging Solutions Group ++ + OUI:8C56C5* + ID_OUI_FROM_DATABASE=Nintendo Co., Ltd. + +@@ -60943,6 +61195,9 @@ OUI:8CDD8D* + OUI:8CDE52* + ID_OUI_FROM_DATABASE=ISSC Technologies Corp. + ++OUI:8CDE99* ++ ID_OUI_FROM_DATABASE=Comlab Inc. ++ + OUI:8CE081* + ID_OUI_FROM_DATABASE=zte corporation + +@@ -61138,6 +61393,9 @@ OUI:907F61* + OUI:908260* + ID_OUI_FROM_DATABASE=IEEE 1904.1 Working Group + ++OUI:90837A* ++ ID_OUI_FROM_DATABASE=General Electric Water & Process Technologies ++ + OUI:90840D* + ID_OUI_FROM_DATABASE=Apple + +@@ -61204,6 +61462,9 @@ OUI:90B21F* + OUI:90B8D0* + ID_OUI_FROM_DATABASE=Joyent, Inc. + ++OUI:90B931* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:90B97D* + ID_OUI_FROM_DATABASE=Johnson Outdoors Marine Electronics d/b/a Minnkota + +@@ -61543,6 +61804,9 @@ OUI:94F720* + OUI:94FAE8* + ID_OUI_FROM_DATABASE=Shenzhen Eycom Technology Co., Ltd + ++OUI:94FBB2* ++ ID_OUI_FROM_DATABASE=Shenzhen Gongjin Electronics Co.,Ltd ++ + OUI:94FD1D* + ID_OUI_FROM_DATABASE=WhereWhen Corp + +@@ -61747,6 +62011,9 @@ OUI:98D6F7* + OUI:98D88C* + ID_OUI_FROM_DATABASE=Nortel Networks + ++OUI:98DA92* ++ ID_OUI_FROM_DATABASE=Vuzix Corporation ++ + OUI:98DCD9* + ID_OUI_FROM_DATABASE=UNITEC Co., Ltd. + +@@ -61780,6 +62047,9 @@ OUI:98FE03* + OUI:98FE94* + ID_OUI_FROM_DATABASE=Apple + ++OUI:98FF6A* ++ ID_OUI_FROM_DATABASE=OTEC(Shanghai)Technology Co.,Ltd. ++ + OUI:98FFD0* + ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd. + +@@ -61849,6 +62119,9 @@ OUI:9C417C* + OUI:9C443D* + ID_OUI_FROM_DATABASE=CHENGDU XUGUANG TECHNOLOGY CO, LTD + ++OUI:9C44A6* ++ ID_OUI_FROM_DATABASE=SwiftTest, Inc. ++ + OUI:9C4563* + ID_OUI_FROM_DATABASE=DIMEP Sistemas + +@@ -61927,6 +62200,9 @@ OUI:9C7BD2* + OUI:9C807D* + ID_OUI_FROM_DATABASE=SYSCABLE Korea Inc. + ++OUI:9C80DF* ++ ID_OUI_FROM_DATABASE=Arcadyan Technology Corporation ++ + OUI:9C8888* + ID_OUI_FROM_DATABASE=Simac Techniek NV + +@@ -62098,6 +62374,9 @@ OUI:A01917* + OUI:A01C05* + ID_OUI_FROM_DATABASE=NIMAX TELECOM CO.,LTD. + ++OUI:A01D48* ++ ID_OUI_FROM_DATABASE=Hewlett Packard ++ + OUI:A02195* + ID_OUI_FROM_DATABASE=Samsung Electronics Digital Imaging + +@@ -62416,6 +62695,9 @@ OUI:A433D1* + OUI:A438FC* + ID_OUI_FROM_DATABASE=Plastic Logic + ++OUI:A43A69* ++ ID_OUI_FROM_DATABASE=Vers Inc ++ + OUI:A4466B* + ID_OUI_FROM_DATABASE=EOC Technology + +@@ -62461,6 +62743,9 @@ OUI:A46706* + OUI:A46E79* + ID_OUI_FROM_DATABASE=DFT System Co.Ltd + ++OUI:A47733* ++ ID_OUI_FROM_DATABASE=Google ++ + OUI:A47760* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -62911,6 +63196,9 @@ OUI:AC20AA* + OUI:AC220B* + ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. + ++OUI:AC2DA3* ++ ID_OUI_FROM_DATABASE=TXTR GmbH ++ + OUI:AC2FA8* + ID_OUI_FROM_DATABASE=Humannix Co.,Ltd. + +@@ -62986,6 +63274,9 @@ OUI:AC6123* + OUI:AC6706* + ID_OUI_FROM_DATABASE=Ruckus Wireless + ++OUI:AC6BAC* ++ ID_OUI_FROM_DATABASE=Jenny Science AG ++ + OUI:AC6E1A* + ID_OUI_FROM_DATABASE=Shenzhen Gongjin Electronics Co.,Ltd + +@@ -63085,6 +63376,9 @@ OUI:ACBEB6* + OUI:ACC2EC* + ID_OUI_FROM_DATABASE=CLT INT'L IND. CORP. + ++OUI:ACC595* ++ ID_OUI_FROM_DATABASE=Graphite Systems ++ + OUI:ACC698* + ID_OUI_FROM_DATABASE=Kohzu Precision Co., Ltd. + +@@ -63172,6 +63466,9 @@ OUI:ACF7F3* + OUI:ACF97E* + ID_OUI_FROM_DATABASE=ELESYS INC. + ++OUI:ACFDEC* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:B00594* + ID_OUI_FROM_DATABASE=Liteon Technology Corporation + +@@ -63193,6 +63490,9 @@ OUI:B01B7C* + OUI:B01C91* + ID_OUI_FROM_DATABASE=Elim Co + ++OUI:B024F3* ++ ID_OUI_FROM_DATABASE=Progeny Systems ++ + OUI:B0358D* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -63286,6 +63586,9 @@ OUI:B09134* + OUI:B0973A* + ID_OUI_FROM_DATABASE=E-Fuel Corporation + ++OUI:B0989F* ++ ID_OUI_FROM_DATABASE=LG CNS ++ + OUI:B09928* + ID_OUI_FROM_DATABASE=Fujitsu Limited + +@@ -63313,6 +63616,9 @@ OUI:B0AA36* + OUI:B0ACFA* + ID_OUI_FROM_DATABASE=Fujitsu Limited + ++OUI:B0ADAA* ++ ID_OUI_FROM_DATABASE=Avaya, Inc ++ + OUI:B0B2DC* + ID_OUI_FROM_DATABASE=Zyxel Communications Corporation + +@@ -63364,6 +63670,9 @@ OUI:B0D09C* + OUI:B0D2F5* + ID_OUI_FROM_DATABASE=Vello Systems, Inc. + ++OUI:B0D7C5* ++ ID_OUI_FROM_DATABASE=STP KFT ++ + OUI:B0DF3A* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -63466,6 +63775,9 @@ OUI:B43741* + OUI:B439D6* + ID_OUI_FROM_DATABASE=ProCurve Networking by HP + ++OUI:B43A28* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:B43DB2* + ID_OUI_FROM_DATABASE=Degreane Horizon + +@@ -63784,6 +64096,9 @@ OUI:B8782E* + OUI:B8797E* + ID_OUI_FROM_DATABASE=Secure Meters (UK) Limited + ++OUI:B87AC9* ++ ID_OUI_FROM_DATABASE=Siemens Ltd. ++ + OUI:B8871E* + ID_OUI_FROM_DATABASE=Good Mind Industries Co., Ltd. + +@@ -63823,6 +64138,9 @@ OUI:B8975A* + OUI:B898B0* + ID_OUI_FROM_DATABASE=Atlona Inc. + ++OUI:B898F7* ++ ID_OUI_FROM_DATABASE=Gionee Communication Equipment Co,Ltd.ShenZhen ++ + OUI:B89AED* + ID_OUI_FROM_DATABASE=OceanServer Technology, Inc + +@@ -63985,12 +64303,18 @@ OUI:BC125E* + OUI:BC1401* + ID_OUI_FROM_DATABASE=Hitron Technologies. Inc + ++OUI:BC14EF* ++ ID_OUI_FROM_DATABASE=ITON Technology Limited ++ + OUI:BC15A6* + ID_OUI_FROM_DATABASE=Taiwan Jantek Electronics,Ltd. + + OUI:BC1665* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:BC1A67* ++ ID_OUI_FROM_DATABASE=YF Technology Co., Ltd ++ + OUI:BC20A4* + ID_OUI_FROM_DATABASE=Samsung Electronics + +@@ -64021,6 +64345,9 @@ OUI:BC2D98* + OUI:BC305B* + ID_OUI_FROM_DATABASE=Dell Inc. + ++OUI:BC307D* ++ ID_OUI_FROM_DATABASE=Wistron Neweb Corp. ++ + OUI:BC35E5* + ID_OUI_FROM_DATABASE=Hydro Systems Company + +@@ -64207,6 +64534,9 @@ OUI:BCE59F* + OUI:BCEA2B* + ID_OUI_FROM_DATABASE=CityCom GmbH + ++OUI:BCEE7B* ++ ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. ++ + OUI:BCF2AF* + ID_OUI_FROM_DATABASE=devolo AG + +@@ -64324,6 +64654,9 @@ OUI:C0626B* + OUI:C06394* + ID_OUI_FROM_DATABASE=Apple + ++OUI:C064C6* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:C06599* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -64462,6 +64795,9 @@ OUI:C0E54E* + OUI:C0EAE4* + ID_OUI_FROM_DATABASE=Sonicwall + ++OUI:C0F1C4* ++ ID_OUI_FROM_DATABASE=Pacidal Corporation Ltd. ++ + OUI:C0F8DA* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -64642,6 +64978,9 @@ OUI:C47F51* + OUI:C4823F* + ID_OUI_FROM_DATABASE=Fujian Newland Auto-ID Tech. Co,.Ltd. + ++OUI:C4824E* ++ ID_OUI_FROM_DATABASE=Changzhou Uchip Electronics Co., LTD. ++ + OUI:C48508* + ID_OUI_FROM_DATABASE=Intel Corporate + +@@ -65005,6 +65344,9 @@ OUI:C8F386* + OUI:C8F406* + ID_OUI_FROM_DATABASE=Avaya, Inc + ++OUI:C8F68D* ++ ID_OUI_FROM_DATABASE=S.E.TECHNOLOGIES LIMITED ++ + OUI:C8F704* + ID_OUI_FROM_DATABASE=Building Block Video + +@@ -65143,6 +65485,9 @@ OUI:CC5D57* + OUI:CC60BB* + ID_OUI_FROM_DATABASE=Empower RF Systems + ++OUI:CC65AD* ++ ID_OUI_FROM_DATABASE=ARRIS Group, Inc. ++ + OUI:CC69B0* + ID_OUI_FROM_DATABASE=Global Traffic Technologies, LLC + +@@ -65533,6 +65878,9 @@ OUI:D0DFB2* + OUI:D0DFC7* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:D0E140* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:D0E347* + ID_OUI_FROM_DATABASE=Yoga + +@@ -65716,6 +66064,9 @@ OUI:D479C3* + OUI:D47B75* + ID_OUI_FROM_DATABASE=HARTING Electronics GmbH + ++OUI:D481CA* ++ ID_OUI_FROM_DATABASE=iDevices, LLC ++ + OUI:D4823E* + ID_OUI_FROM_DATABASE=Argosy Technologies, Ltd. + +@@ -65965,6 +66316,9 @@ OUI:D8543A* + OUI:D857EF* + ID_OUI_FROM_DATABASE=Samsung Electronics + ++OUI:D858D7* ++ ID_OUI_FROM_DATABASE=CZ.NIC, z.s.p.o. ++ + OUI:D85D4C* + ID_OUI_FROM_DATABASE=TP-LINK Technologies Co.,Ltd. + +@@ -66004,6 +66358,9 @@ OUI:D878E5* + OUI:D87988* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co., Ltd. + ++OUI:D87CDD* ++ ID_OUI_FROM_DATABASE=SANIX INCORPORATED ++ + OUI:D88A3B* + ID_OUI_FROM_DATABASE=UNIT-EM + +@@ -66475,6 +66832,9 @@ OUI:E067B3* + OUI:E06995* + ID_OUI_FROM_DATABASE=PEGATRON CORPORATION + ++OUI:E0750A* ++ ID_OUI_FROM_DATABASE=ALPS ERECTORIC CO.,LTD. ++ + OUI:E0757D* + ID_OUI_FROM_DATABASE=Motorola Mobility LLC + +@@ -66577,6 +66937,9 @@ OUI:E0C6B3* + OUI:E0C79D* + ID_OUI_FROM_DATABASE=Texas Instruments + ++OUI:E0C86A* ++ ID_OUI_FROM_DATABASE=SHENZHEN TW-SCIE Co., Ltd ++ + OUI:E0C922* + ID_OUI_FROM_DATABASE=Jireh Energy Tech., Ltd. + +@@ -66661,6 +67024,9 @@ OUI:E0F9BE* + OUI:E0FAEC* + ID_OUI_FROM_DATABASE=Platan sp. z o.o. sp. k. + ++OUI:E40439* ++ ID_OUI_FROM_DATABASE=TomTom Software Ltd ++ + OUI:E4115B* + ID_OUI_FROM_DATABASE=Hewlett Packard + +@@ -66997,6 +67363,9 @@ OUI:E85E53* + OUI:E8611F* + ID_OUI_FROM_DATABASE=Dawning Information Industry Co.,Ltd + ++OUI:E86183* ++ ID_OUI_FROM_DATABASE=Black Diamond Advanced Technology, LLC ++ + OUI:E86CDA* + ID_OUI_FROM_DATABASE=Supercomputers and Neurocomputers Research Center + +@@ -67435,6 +67804,9 @@ OUI:F02408* + OUI:F02572* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:F025B7* ++ ID_OUI_FROM_DATABASE=Samsung Electro Mechanics co., LTD. ++ + OUI:F0264C* + ID_OUI_FROM_DATABASE=Dr. Sigrist AG + +@@ -67486,6 +67858,9 @@ OUI:F05DC8* + OUI:F05F5A* + ID_OUI_FROM_DATABASE=Getriebebau NORD GmbH and Co. KG + ++OUI:F06130* ++ ID_OUI_FROM_DATABASE=Advantage Pharmacy Services, LLC ++ + OUI:F0620D* + ID_OUI_FROM_DATABASE=Shenzhen Egreat Tech Corp.,Ltd + +@@ -67681,6 +68056,9 @@ OUI:F40321* + OUI:F4044C* + ID_OUI_FROM_DATABASE=ValenceTech Limited + ++OUI:F4068D* ++ ID_OUI_FROM_DATABASE=devolo AG ++ + OUI:F40B93* + ID_OUI_FROM_DATABASE=Research In Motion + +@@ -68107,6 +68485,9 @@ OUI:F89FB8* + OUI:F8A03D* + ID_OUI_FROM_DATABASE=Dinstar Technologies Co., Ltd. + ++OUI:F8A2B4* ++ ID_OUI_FROM_DATABASE=RHEWA-WAAGENFABRIK August Freudewald GmbH &Co. KG ++ + OUI:F8A45F* + ID_OUI_FROM_DATABASE=Beijing Xiaomi communications co.,ltd + +@@ -68245,6 +68626,9 @@ OUI:FC0647* + OUI:FC0877* + ID_OUI_FROM_DATABASE=Prentke Romich Company + ++OUI:FC09D8* ++ ID_OUI_FROM_DATABASE=ACTEON Group ++ + OUI:FC0A81* + ID_OUI_FROM_DATABASE=Motorola Solutions Inc. + +@@ -68314,6 +68698,9 @@ OUI:FC455F* + OUI:FC48EF* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + ++OUI:FC4B1C* ++ ID_OUI_FROM_DATABASE=INTERSENSOR S.R.L. ++ + OUI:FC4BBC* + ID_OUI_FROM_DATABASE=Sunplus Technology Co., Ltd. + +diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb +index fdb534d..289f81c 100644 +--- a/hwdb/20-pci-vendor-model.hwdb ++++ b/hwdb/20-pci-vendor-model.hwdb +@@ -4158,7 +4158,7 @@ pci:v00001002d00005F57* + ID_MODEL_FROM_DATABASE=R423 [Radeon X800 XT] + + pci:v00001002d00006600* +- ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8670A/8750M] ++ ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8670A/8670M/8750M] + + pci:v00001002d00006601* + ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8730M] +@@ -4169,6 +4169,12 @@ pci:v00001002d00006602* + pci:v00001002d00006603* + ID_MODEL_FROM_DATABASE=Mars + ++pci:v00001002d00006604* ++ ID_MODEL_FROM_DATABASE=Mars [Radeon R7 M265] ++ ++pci:v00001002d00006605* ++ ID_MODEL_FROM_DATABASE=Mars [Radeon R7 M260] ++ + pci:v00001002d00006606* + ID_MODEL_FROM_DATABASE=Mars XTX [Radeon HD 8790M] + +@@ -4176,13 +4182,13 @@ pci:v00001002d00006607* + ID_MODEL_FROM_DATABASE=Mars LE [Radeon HD 8530M] + + pci:v00001002d00006610* +- ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8600 Series] ++ ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670/R7 250] + + pci:v00001002d00006611* + ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8570] + + pci:v00001002d00006613* +- ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8500 Series] ++ ID_MODEL_FROM_DATABASE=Oland PRO [Radeon R7 240] + + pci:v00001002d00006620* + ID_MODEL_FROM_DATABASE=Mars +@@ -4197,10 +4203,10 @@ pci:v00001002d00006631* + ID_MODEL_FROM_DATABASE=Oland + + pci:v00001002d00006640* +- ID_MODEL_FROM_DATABASE=Saturn [Radeon HD 8950] ++ ID_MODEL_FROM_DATABASE=Saturn XT [Radeon HD 8950M] + + pci:v00001002d00006641* +- ID_MODEL_FROM_DATABASE=Saturn PRO ++ ID_MODEL_FROM_DATABASE=Saturn PRO [Radeon HD 8930M] + + pci:v00001002d00006649* + ID_MODEL_FROM_DATABASE=Bonaire +@@ -4236,13 +4242,13 @@ pci:v00001002d0000665Csv00001787sd00002329* + ID_MODEL_FROM_DATABASE=Radeon HD 7790 TurboDuo + + pci:v00001002d0000665D* +- ID_MODEL_FROM_DATABASE=Bonaire ++ ID_MODEL_FROM_DATABASE=Bonaire [Radeon R7 200 Series] + + pci:v00001002d00006660* +- ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A] ++ ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A/8670M/8690M] + + pci:v00001002d00006663* +- ID_MODEL_FROM_DATABASE=Sun PRO [Radeon HD 8500M Series] ++ ID_MODEL_FROM_DATABASE=Sun PRO [Radeon HD 8570M] + + pci:v00001002d00006664* + ID_MODEL_FROM_DATABASE=Jet XT [Radeon R5 M200 Series] +@@ -4254,7 +4260,7 @@ pci:v00001002d00006667* + ID_MODEL_FROM_DATABASE=Jet ULT [Radeon R5 M200 Series] + + pci:v00001002d0000666F* +- ID_MODEL_FROM_DATABASE=Sun [Radeon HD 8500M] ++ ID_MODEL_FROM_DATABASE=Sun LE [Radeon HD 8550M] + + pci:v00001002d00006670* + ID_MODEL_FROM_DATABASE=Hainan +@@ -5675,6 +5681,15 @@ pci:v00001002d0000678Asv00001002sd0000030C* + pci:v00001002d0000678Asv00001002sd00000310* + ID_MODEL_FROM_DATABASE=FirePro S9000 + ++pci:v00001002d0000678Asv00001002sd00000420* ++ ID_MODEL_FROM_DATABASE=Radeon Sky 700 ++ ++pci:v00001002d0000678Asv00001002sd00000422* ++ ID_MODEL_FROM_DATABASE=Radeon Sky 900 ++ ++pci:v00001002d0000678Asv00001002sd00000B0E* ++ ID_MODEL_FROM_DATABASE=FirePro S10000 Passive ++ + pci:v00001002d0000678Asv00001002sd00000B2A* + ID_MODEL_FROM_DATABASE=FirePro S10000 + +@@ -5691,11 +5706,14 @@ pci:v00001002d00006792* + ID_MODEL_FROM_DATABASE=Tahiti + + pci:v00001002d00006798* +- ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970] ++ ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/R9 280X] + + pci:v00001002d00006798sv00001002sd00003000* + ID_MODEL_FROM_DATABASE=Tahiti XT2 [Radeon HD 7970 GHz Edition] + ++pci:v00001002d00006798sv00001002sd00003001* ++ ID_MODEL_FROM_DATABASE=Tahiti XTL [Radeon R9 280X] ++ + pci:v00001002d00006798sv00001002sd00004000* + ID_MODEL_FROM_DATABASE=Radeon HD 8970 OEM + +@@ -5717,6 +5735,12 @@ pci:v00001002d00006798sv00001043sd0000044A* + pci:v00001002d00006798sv00001043sd0000044C* + ID_MODEL_FROM_DATABASE=Tahiti XT2 [Matrix HD 7970 Platinum] + ++pci:v00001002d00006798sv00001043sd00003001* ++ ID_MODEL_FROM_DATABASE=Tahiti XTL [ROG Matrix R9 280X] ++ ++pci:v00001002d00006798sv00001043sd00003006* ++ ID_MODEL_FROM_DATABASE=Tahiti XTL [Radeon R9 280X DirectCU II TOP] ++ + pci:v00001002d00006798sv00001043sd00009999* + ID_MODEL_FROM_DATABASE=ARES II + +@@ -5771,6 +5795,9 @@ pci:v00001002d0000679Bsv00001002sd00000B2A* + pci:v00001002d0000679Bsv00001462sd00008036* + ID_MODEL_FROM_DATABASE=Radeon HD 8990 OEM + ++pci:v00001002d0000679Bsv0000148Csd00008990* ++ ID_MODEL_FROM_DATABASE=Radeon HD 8990 OEM ++ + pci:v00001002d0000679E* + ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT] + +@@ -5834,6 +5861,9 @@ pci:v00001002d00006808* + pci:v00001002d00006808sv00001002sd00000310* + ID_MODEL_FROM_DATABASE=FirePro S7000 + ++pci:v00001002d00006808sv00001002sd00000420* ++ ID_MODEL_FROM_DATABASE=Radeon Sky 500 ++ + pci:v00001002d00006809* + ID_MODEL_FROM_DATABASE=Pitcairn LE GL [FirePro W5000] + +@@ -5865,19 +5895,22 @@ pci:v00001002d00006819sv0000174Bsd0000E221* + ID_MODEL_FROM_DATABASE=Radeon HD 7850 2GB GDDR5 DVI-I/DVI-D/HDMI/DP + + pci:v00001002d00006820* +- ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8800M Series] ++ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M] + + pci:v00001002d00006820sv0000103Csd00001851* + ID_MODEL_FROM_DATABASE=Radeon HD 7750M + + pci:v00001002d00006821* +- ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8800M Series] ++ ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M] ++ ++pci:v00001002d00006821sv00001002sd0000031E* ++ ID_MODEL_FROM_DATABASE=FirePro SX4000 + + pci:v00001002d00006822* + ID_MODEL_FROM_DATABASE=Venus PRO + + pci:v00001002d00006823* +- ID_MODEL_FROM_DATABASE=Venus PRO [Radeon HD 8800M Series] ++ ID_MODEL_FROM_DATABASE=Venus PRO [Radeon HD 8850M] + + pci:v00001002d00006825* + ID_MODEL_FROM_DATABASE=Heathrow XT [Radeon HD 7870M] +@@ -5901,7 +5934,7 @@ pci:v00001002d0000682A* + ID_MODEL_FROM_DATABASE=Venus PRO + + pci:v00001002d0000682B* +- ID_MODEL_FROM_DATABASE=Venus LE [Radeon HD 8800M Series] ++ ID_MODEL_FROM_DATABASE=Venus LE [Radeon HD 8830M] + + pci:v00001002d0000682D* + ID_MODEL_FROM_DATABASE=Chelsea XT GL [FirePro M4000] +@@ -5919,7 +5952,7 @@ pci:v00001002d00006831* + ID_MODEL_FROM_DATABASE=Cape Verde [AMD Radeon HD 7700M Series] + + pci:v00001002d00006835* +- ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R7 200 Series] ++ ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R7 260] + + pci:v00001002d00006837* + ID_MODEL_FROM_DATABASE=Cape Verde LE [Radeon HD 7730/8730] +@@ -16466,6 +16499,12 @@ pci:v00001077d00008031* + pci:v00001077d00008032* + ID_MODEL_FROM_DATABASE=8300 Series 10GbE Converged Network Adapter (iSCSI) + ++pci:v00001077d00008430* ++ ID_MODEL_FROM_DATABASE=ISP8324 1/10GbE Converged Network Controller (NIC VF) ++ ++pci:v00001077d00008431* ++ ID_MODEL_FROM_DATABASE=8300 Series 10GbE Converged Network Adapter (FCoE VF) ++ + pci:v00001077d00008432* + ID_MODEL_FROM_DATABASE=ISP2432M-based 10GbE Converged Network Adapter (CNA) + +@@ -17090,6 +17129,12 @@ pci:v00001093d00002890* + pci:v00001093d000028C0* + ID_MODEL_FROM_DATABASE=PCI-6014 + ++pci:v00001093d000028D0* ++ ID_MODEL_FROM_DATABASE=PCI-5122 ++ ++pci:v00001093d000028E0* ++ ID_MODEL_FROM_DATABASE=PXI-5122 ++ + pci:v00001093d00002A60* + ID_MODEL_FROM_DATABASE=PCI-6023E + +@@ -17174,12 +17219,33 @@ pci:v00001093d000070BF* + pci:v00001093d000070C0* + ID_MODEL_FROM_DATABASE=PCI-6143 + ++pci:v00001093d000070F0* ++ ID_MODEL_FROM_DATABASE=PXI-5922 ++ ++pci:v00001093d000070F1* ++ ID_MODEL_FROM_DATABASE=PCI-5922 ++ + pci:v00001093d000070F2* + ID_MODEL_FROM_DATABASE=PCI-6224 + ++pci:v00001093d00007121* ++ ID_MODEL_FROM_DATABASE=PXI-5122EX ++ ++pci:v00001093d00007122* ++ ID_MODEL_FROM_DATABASE=PCI-5122EX ++ + pci:v00001093d00007144* + ID_MODEL_FROM_DATABASE=PXI-5124 (12-bit 200 MS/s Digitizer) + ++pci:v00001093d00007145* ++ ID_MODEL_FROM_DATABASE=PCI-5124 ++ ++pci:v00001093d0000714C* ++ ID_MODEL_FROM_DATABASE=PXI-5114 ++ ++pci:v00001093d0000714D* ++ ID_MODEL_FROM_DATABASE=PCI-5114 ++ + pci:v00001093d0000716C* + ID_MODEL_FROM_DATABASE=PCI-6225 + +@@ -17195,6 +17261,60 @@ pci:v00001093d000071BC* + pci:v00001093d000071D0* + ID_MODEL_FROM_DATABASE=PXI-6143 + ++pci:v00001093d00007260* ++ ID_MODEL_FROM_DATABASE=PXI-5142 ++ ++pci:v00001093d00007261* ++ ID_MODEL_FROM_DATABASE=PCI-5142 ++ ++pci:v00001093d000072A8* ++ ID_MODEL_FROM_DATABASE=PXI-5152 ++ ++pci:v00001093d000072A9* ++ ID_MODEL_FROM_DATABASE=PCI-5152 ++ ++pci:v00001093d000072AA* ++ ID_MODEL_FROM_DATABASE=PXI-5105 ++ ++pci:v00001093d000072AB* ++ ID_MODEL_FROM_DATABASE=PCI-5105 ++ ++pci:v00001093d0000730F* ++ ID_MODEL_FROM_DATABASE=PXI-5922EX ++ ++pci:v00001093d00007310* ++ ID_MODEL_FROM_DATABASE=PCI-5922EX ++ ++pci:v00001093d00007333* ++ ID_MODEL_FROM_DATABASE=PXI-5900 ++ ++pci:v00001093d00007349* ++ ID_MODEL_FROM_DATABASE=PXI-5154 ++ ++pci:v00001093d0000734A* ++ ID_MODEL_FROM_DATABASE=PCI-5154 ++ ++pci:v00001093d0000737D* ++ ID_MODEL_FROM_DATABASE=PXI-5124EX ++ ++pci:v00001093d000073F0* ++ ID_MODEL_FROM_DATABASE=PXI-5153 ++ ++pci:v00001093d000073F1* ++ ID_MODEL_FROM_DATABASE=PCI-5153 ++ ++pci:v00001093d0000745E* ++ ID_MODEL_FROM_DATABASE=PXI-5153EX ++ ++pci:v00001093d0000745F* ++ ID_MODEL_FROM_DATABASE=PCI-5153EX ++ ++pci:v00001093d00007460* ++ ID_MODEL_FROM_DATABASE=PXI-5154EX ++ ++pci:v00001093d00007461* ++ ID_MODEL_FROM_DATABASE=PCI-5154EX ++ + pci:v00001093d0000B001* + ID_MODEL_FROM_DATABASE=IMAQ-PCI-1408 + +@@ -17226,7 +17346,10 @@ pci:v00001093d0000B091* + ID_MODEL_FROM_DATABASE=IMAQ-PXI-1411 + + pci:v00001093d0000C4C4* +- ID_MODEL_FROM_DATABASE=PXIe-4353 ++ ID_MODEL_FROM_DATABASE=PXIe-4353/5160 ++ ++pci:v00001093d0000C4C4sv00001093sd000076D0* ++ ID_MODEL_FROM_DATABASE=PXIe-5160 + + pci:v00001093d0000C801* + ID_MODEL_FROM_DATABASE=PCI-GPIB +@@ -25557,10 +25680,10 @@ pci:v000010DEd00000FE5* + ID_MODEL_FROM_DATABASE=GK107 [GeForce K340 USM] + + pci:v000010DEd00000FE6* +- ID_MODEL_FROM_DATABASE=GK107 [NVS K1 USM] ++ ID_MODEL_FROM_DATABASE=GK107 [GRID K1 NVS USM] + + pci:v000010DEd00000FE7* +- ID_MODEL_FROM_DATABASE=GK107GL [GRID K1] ++ ID_MODEL_FROM_DATABASE=GK107GL [GRID K100 vGPU] + + pci:v000010DEd00000FE7sv000010DEsd0000101E* + ID_MODEL_FROM_DATABASE=GRID K100 +@@ -25575,13 +25698,13 @@ pci:v000010DEd00000FF2* + ID_MODEL_FROM_DATABASE=GK107GL [GRID K1] + + pci:v000010DEd00000FF5* +- ID_MODEL_FROM_DATABASE=GK107GL [Tesla K1 USM] ++ ID_MODEL_FROM_DATABASE=GK107GL [GRID K1 Tesla USM] + + pci:v000010DEd00000FF6* + ID_MODEL_FROM_DATABASE=GK107GLM [Quadro K1100M] + + pci:v000010DEd00000FF7* +- ID_MODEL_FROM_DATABASE=GK107GL [Quadro K1 USM] ++ ID_MODEL_FROM_DATABASE=GK107GL [GRID K140Q vGPU] + + pci:v000010DEd00000FF7sv000010DEsd00001037* + ID_MODEL_FROM_DATABASE=GRID K140Q +@@ -25652,6 +25775,9 @@ pci:v000010DEd00001021* + pci:v000010DEd00001022* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20c] + ++pci:v000010DEd00001024* ++ ID_MODEL_FROM_DATABASE=GK110GL [Tesla K40c] ++ + pci:v000010DEd00001026* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20s] + +@@ -26246,6 +26372,9 @@ pci:v000010DEd00001140sv000017AAsd00003983* + pci:v000010DEd00001140sv000017AAsd00005003* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + ++pci:v000010DEd00001140sv000017AAsd00005005* ++ ID_MODEL_FROM_DATABASE=GeForce 705M ++ + pci:v000010DEd00001140sv000017AAsd0000500D* + ID_MODEL_FROM_DATABASE=GeForce GT 620M + +@@ -26334,13 +26463,13 @@ pci:v000010DEd0000118A* + ID_MODEL_FROM_DATABASE=GK104GL [GRID K520] + + pci:v000010DEd0000118B* +- ID_MODEL_FROM_DATABASE=GK104 [GeForce K2 USM] ++ ID_MODEL_FROM_DATABASE=GK104GL [GRID K2 GeForce USM] + + pci:v000010DEd0000118C* +- ID_MODEL_FROM_DATABASE=GK104 [NVS K2 USM] ++ ID_MODEL_FROM_DATABASE=GK104 [GRID K2 NVS USM] + + pci:v000010DEd0000118D* +- ID_MODEL_FROM_DATABASE=GK104GL [GRID K2] ++ ID_MODEL_FROM_DATABASE=GK104GL [GRID K200 vGPU] + + pci:v000010DEd0000118Dsv000010DEsd0000101D* + ID_MODEL_FROM_DATABASE=GRID K200 +@@ -26351,6 +26480,9 @@ pci:v000010DEd0000118E* + pci:v000010DEd0000118F* + ID_MODEL_FROM_DATABASE=GK104GL [Tesla K10] + ++pci:v000010DEd00001193* ++ ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 760 Ti OEM] ++ + pci:v000010DEd0000119D* + ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 775M] + +@@ -26379,7 +26511,7 @@ pci:v000010DEd000011A7* + ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 675MX] + + pci:v000010DEd000011B0* +- ID_MODEL_FROM_DATABASE=GK104GL [Quadro K2 USM] ++ ID_MODEL_FROM_DATABASE=GK104GL [GRID K240Q\K260Q vGPU] + + pci:v000010DEd000011B0sv000010DEsd0000101A* + ID_MODEL_FROM_DATABASE=GRID K240Q +@@ -26388,7 +26520,7 @@ pci:v000010DEd000011B0sv000010DEsd0000101B* + ID_MODEL_FROM_DATABASE=GRID K260Q + + pci:v000010DEd000011B1* +- ID_MODEL_FROM_DATABASE=GK104GL [Tesla K2 USM] ++ ID_MODEL_FROM_DATABASE=GK104GL [GRID K2 Tesla USM] + + pci:v000010DEd000011B6* + ID_MODEL_FROM_DATABASE=GK104GLM [Quadro K3100M] +@@ -32642,6 +32774,9 @@ pci:v00001179d00000618* + pci:v00001179d00000701* + ID_MODEL_FROM_DATABASE=FIR Port Type-O + ++pci:v00001179d00000803* ++ ID_MODEL_FROM_DATABASE=TC6371AF SD Host Controller ++ + pci:v00001179d00000804* + ID_MODEL_FROM_DATABASE=TC6371AF SmartMedia Controller + +@@ -40046,6 +40181,9 @@ pci:v000013F6d00008788sv000014C3sd00001710* + pci:v000013F6d00008788sv000014C3sd00001711* + ID_MODEL_FROM_DATABASE=HiFier Serenade + ++pci:v000013F6d00008788sv000014C3sd00001713* ++ ID_MODEL_FROM_DATABASE=HiFier Serenade III ++ + pci:v000013F6d00008788sv00001A58sd00000910* + ID_MODEL_FROM_DATABASE=Barracuda AC-1 + +@@ -50711,8 +50849,11 @@ pci:v00001A41d00000002* + pci:v00001A41d00000200* + ID_MODEL_FROM_DATABASE=TILE-Gx processor + ++pci:v00001A41d00000201* ++ ID_MODEL_FROM_DATABASE=TILE-Gx Processor Virtual Function ++ + pci:v00001A41d00002000* +- ID_MODEL_FROM_DATABASE=TILE-Gx PCI Express Bridge ++ ID_MODEL_FROM_DATABASE=TILE-Gx PCI Express Root Port + + pci:v00001A4A* + ID_VENDOR_FROM_DATABASE=SLAC National Accelerator Lab PPA-REG +@@ -51353,6 +51494,15 @@ pci:v00001CC5* + pci:v00001CC5d00000100* + ID_MODEL_FROM_DATABASE=CAN-PCIe-02 + ++pci:v00001CE4* ++ ID_VENDOR_FROM_DATABASE=Exablaze ++ ++pci:v00001CE4d00000001* ++ ID_MODEL_FROM_DATABASE=ExaNIC X4 ++ ++pci:v00001CE4d00000002* ++ ID_MODEL_FROM_DATABASE=ExaNIC X2 ++ + pci:v00001D44* + ID_VENDOR_FROM_DATABASE=DPT + +@@ -54131,6 +54281,9 @@ pci:v00008086d000008B4sv00008086sd00000270* + pci:v00008086d000008B4sv00008086sd00008270* + ID_MODEL_FROM_DATABASE=Dual Band Wireless AC 3160 + ++pci:v00008086d000008CF* ++ ID_MODEL_FROM_DATABASE=Atom Processor Z2760 Integrated Graphics Controller ++ + pci:v00008086d00000960* + ID_MODEL_FROM_DATABASE=80960RP (i960RP) Microprocessor/Bridge + +@@ -56369,6 +56522,9 @@ pci:v00008086d000010FBsv0000103Csd0000211B* + pci:v00008086d000010FBsv0000103Csd00002147* + ID_MODEL_FROM_DATABASE=Ethernet 10Gb 1-port 561i Adapter + ++pci:v00008086d000010FBsv0000103Csd00002159* ++ ID_MODEL_FROM_DATABASE=Ethernet 10Gb 2-port 562i Adapter ++ + pci:v00008086d000010FBsv0000108Esd00007B11* + ID_MODEL_FROM_DATABASE=Ethernet Server Adapter X520-2 + +@@ -57290,6 +57446,9 @@ pci:v00008086d00001528sv00001028sd00001F61* + pci:v00008086d00001528sv0000103Csd0000192D* + ID_MODEL_FROM_DATABASE=561FLR-T 2-port 10Gb Ethernet Adapter + ++pci:v00008086d00001528sv0000103Csd00002004* ++ ID_MODEL_FROM_DATABASE=Ethernet 10Gb 2-port 561i Adapter ++ + pci:v00008086d00001528sv0000103Csd0000211A* + ID_MODEL_FROM_DATABASE=Ethernet 10Gb 2-port 561T Adapter + +@@ -57416,6 +57575,9 @@ pci:v00008086d0000155D* + pci:v00008086d0000155Dsv00008086sd00000001* + ID_MODEL_FROM_DATABASE=Ethernet Server Bypass Adapter X520-SR2 + ++pci:v00008086d0000155Dsv00008086sd00000002* ++ ID_MODEL_FROM_DATABASE=Ethernet Server Bypass Adapter X520-LR2 ++ + pci:v00008086d00001560* + ID_MODEL_FROM_DATABASE=Ethernet Controller X540 + +@@ -69747,7 +69909,7 @@ pci:v00009005d00000285sv0000103Csd00003227* + ID_MODEL_FROM_DATABASE=AAR-2610SA + + pci:v00009005d00000285sv0000108Esd00000286* +- ID_MODEL_FROM_DATABASE=STK RAID INT ++ ID_MODEL_FROM_DATABASE=Sun StorageTek SAS RAID HBA, Internal + + pci:v00009005d00000285sv0000108Esd00000287* + ID_MODEL_FROM_DATABASE=STK RAID EXT diff --git a/SOURCES/0076-rules-remove-pointless-MODE-settings.patch b/SOURCES/0076-rules-remove-pointless-MODE-settings.patch new file mode 100644 index 0000000..e2f5e28 --- /dev/null +++ b/SOURCES/0076-rules-remove-pointless-MODE-settings.patch @@ -0,0 +1,40 @@ +From d5ac78410cbf19b9e9e420286ad1afce03764c6d Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 21 Oct 2013 03:49:03 +0200 +Subject: [PATCH] rules: remove pointless MODE= settings + +Changing the default MODE= for the group accessi, but not specifying +a GROUP= does not provide anything. + +It disables the default logic that the mode switches to 0660 as soon +as a GROUP= is specifed, which make custom rules uneccesarily complicated. + +https://bugs.freedesktop.org/show_bug.cgi?id=70665 +--- + rules/50-udev-default.rules | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules +index f764789..679dfdf 100644 +--- a/rules/50-udev-default.rules ++++ b/rules/50-udev-default.rules +@@ -20,9 +20,7 @@ KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP= + + SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + +-SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640" +-SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0640" +-SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0644" ++SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664" + + SUBSYSTEM=="video4linux", GROUP="video" + SUBSYSTEM=="misc", KERNEL=="agpgart", GROUP="video" +@@ -63,7 +61,7 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk" + SUBSYSTEM=="aoe", GROUP="disk", MODE="0220" + SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" + +-KERNEL=="rfkill", MODE="0644" ++KERNEL=="rfkill", MODE="0664" + KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" + + KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" diff --git a/SOURCES/0077-catalog-remove-links-to-non-existent-wiki-pages.patch b/SOURCES/0077-catalog-remove-links-to-non-existent-wiki-pages.patch new file mode 100644 index 0000000..242ab4f --- /dev/null +++ b/SOURCES/0077-catalog-remove-links-to-non-existent-wiki-pages.patch @@ -0,0 +1,89 @@ +From c1dfe1e12f7f37d3f3ad13160146a551a396f3c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 24 Oct 2013 00:45:10 -0400 +Subject: [PATCH] catalog: remove links to non-existent wiki pages + +AFAIK, we don't have even one page with message explanations. +If/when we add them, we can add links. + +https://bugzilla.redhat.com/show_bug.cgi?id=1017161 +--- + catalog/systemd.catalog | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/catalog/systemd.catalog b/catalog/systemd.catalog +index 892b2ad..3c2fe64 100644 +--- a/catalog/systemd.catalog ++++ b/catalog/systemd.catalog +@@ -204,7 +204,6 @@ Unit @UNIT@ has begun shutting down. + Subject: Unit @UNIT@ has finished shutting down + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + Unit @UNIT@ has finished shutting down. + +@@ -212,7 +211,6 @@ Unit @UNIT@ has finished shutting down. + Subject: Unit @UNIT@ has failed + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + Unit @UNIT@ has failed. + +@@ -222,7 +220,6 @@ The result is @RESULT@. + Subject: Unit @UNIT@ has begun with reloading its configuration + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + Unit @UNIT@ has begun with reloading its configuration + +@@ -230,7 +227,6 @@ Unit @UNIT@ has begun with reloading its configuration + Subject: Unit @UNIT@ has finished reloading its configuration + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + Unit @UNIT@ has finished reloading its configuration + +@@ -240,7 +236,6 @@ The result is @RESULT@. + Subject: Process @EXECUTABLE@ could not be executed + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + The process @EXECUTABLE@ could not be executed and failed. + +@@ -250,7 +245,6 @@ The error number returned while executing this process is @ERRNO@. + Subject: One or more messages could not be forwarded to syslog + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + One or more messages could not be forwarded to the syslog service + running side-by-side with journald. This usually indicates that the +@@ -261,7 +255,6 @@ messages queued. + Subject: Mount point is not empty + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + The directory @WHERE@ is specified as the mount point (second field in + /etc/fstab or Where= field in systemd unit file) and is not empty. +@@ -274,7 +267,6 @@ location. + Subject: A virtual machine or container has been started + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + The virtual machine @NAME@ with its leader PID @LEADER@ has been + started is now ready to use. +@@ -283,7 +275,6 @@ started is now ready to use. + Subject: A virtual machine or container has been terminated + Defined-By: systemd + Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +-Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/@MESSAGE_ID@ + + The virtual machine @NAME@ with its leader PID @LEADER@ has been + shut down. diff --git a/SOURCES/0078-udev-builtin-path_id-add-support-for-bcma-bus.patch b/SOURCES/0078-udev-builtin-path_id-add-support-for-bcma-bus.patch new file mode 100644 index 0000000..b3d3af9 --- /dev/null +++ b/SOURCES/0078-udev-builtin-path_id-add-support-for-bcma-bus.patch @@ -0,0 +1,47 @@ +From 8e98bfcd1771a460ccf99fa7df7d46cac2e1754a Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Sat, 26 Oct 2013 12:22:04 +0200 +Subject: [PATCH] udev-builtin: path_id - add support for bcma bus + +This matches the bcma support in the network device naming. + +Eventually wa want to make sure ID_PATH is equivalent to ID_NET_NAME_PATH, +so we never need to match on the latter. +--- + src/udev/udev-builtin-path_id.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index 0659967..763f3c3 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -452,6 +452,19 @@ static struct udev_device *handle_usb(struct udev_device *parent, char **path) + return parent; + } + ++static struct udev_device *handle_bcma(struct udev_device *parent, char **path) ++{ ++ const char *sysname; ++ unsigned int core; ++ ++ sysname = udev_device_get_sysname(parent); ++ if (sscanf(sysname, "bcma%*u:%u", &core) != 1) ++ return NULL; ++ ++ path_prepend(path, "bcma-%u", core); ++ return parent; ++} ++ + static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path) + { + struct udev_device *scsi_dev; +@@ -509,6 +522,9 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool + } else if (streq(subsys, "usb")) { + parent = handle_usb(parent, &path); + some_transport = true; ++ } else if (streq(subsys, "bcma")) { ++ parent = handle_bcma(parent, &path); ++ some_transport = true; + } else if (streq(subsys, "serio")) { + path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent)); + parent = skip_subsystem(parent, "serio"); diff --git a/SOURCES/0079-libudev-default-log_priority-to-INFO.patch b/SOURCES/0079-libudev-default-log_priority-to-INFO.patch new file mode 100644 index 0000000..e680015 --- /dev/null +++ b/SOURCES/0079-libudev-default-log_priority-to-INFO.patch @@ -0,0 +1,23 @@ +From 1842d7a64410f099a454f341ecf0ad9d6682f8ec Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Wed, 30 Oct 2013 15:09:01 +0100 +Subject: [PATCH] libudev: default log_priority to INFO + +This brings it in sync with the default config file. +--- + src/libudev/libudev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c +index 208039a..bc73a5a 100644 +--- a/src/libudev/libudev.c ++++ b/src/libudev/libudev.c +@@ -125,7 +125,7 @@ _public_ struct udev *udev_new(void) + return NULL; + udev->refcount = 1; + udev->log_fn = log_stderr; +- udev->log_priority = LOG_ERR; ++ udev->log_priority = LOG_INFO; + udev_list_init(udev, &udev->properties_list, true); + + f = fopen("/etc/udev/udev.conf", "re"); diff --git a/SOURCES/0080-nspawn-only-pass-in-slice-setting-if-it-is-set.patch b/SOURCES/0080-nspawn-only-pass-in-slice-setting-if-it-is-set.patch new file mode 100644 index 0000000..7888d44 --- /dev/null +++ b/SOURCES/0080-nspawn-only-pass-in-slice-setting-if-it-is-set.patch @@ -0,0 +1,22 @@ +From d5e2897030849371bc976ecb8de3ca2fbf16b6bb Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 30 Oct 2013 18:40:21 +0100 +Subject: [PATCH] nspawn: only pass in slice setting if it is set + +--- + src/nspawn/nspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index eb9605c..9616dbf 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -1202,7 +1202,7 @@ static int register_machine(void) { + "container", + (uint32_t) 0, + strempty(arg_directory), +- 1, "Slice", "s", strempty(arg_slice)); ++ !isempty(arg_slice), "Slice", "s", arg_slice); + if (r < 0) { + log_error("Failed to register machine: %s", error.message ? error.message : strerror(-r)); + return r; diff --git a/SOURCES/0081-zsh-completion-add-systemd-run.patch b/SOURCES/0081-zsh-completion-add-systemd-run.patch new file mode 100644 index 0000000..697c4a7 --- /dev/null +++ b/SOURCES/0081-zsh-completion-add-systemd-run.patch @@ -0,0 +1,60 @@ +From d437087966e4a5f7ad0b37b4254988de41e16228 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Wed, 30 Oct 2013 21:57:44 +0100 +Subject: [PATCH] zsh-completion: add systemd-run + +--- + Makefile.am | 1 + + shell-completion/zsh/_systemd-run | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 32 insertions(+) + create mode 100644 shell-completion/zsh/_systemd-run + +diff --git a/Makefile.am b/Makefile.am +index 8d9c587..0c11477 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -352,6 +352,7 @@ dist_zshcompletion_DATA = \ + shell-completion/zsh/_kernel-install \ + shell-completion/zsh/_systemd-nspawn \ + shell-completion/zsh/_systemd-analyze \ ++ shell-completion/zsh/_systemd-run \ + shell-completion/zsh/_sd_hosts_or_user_at_host \ + shell-completion/zsh/_systemd-delta \ + shell-completion/zsh/_systemd +diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run +new file mode 100644 +index 0000000..0c81c54 +--- /dev/null ++++ b/shell-completion/zsh/_systemd-run +@@ -0,0 +1,31 @@ ++#compdef systemd-run ++ ++__systemctl() { ++ local -a _modes ++ _modes=("--user" "--system") ++ systemctl ${words:*_modes} --full --no-legend --no-pager "$@" 2>/dev/null ++} ++ ++__get_slices () { ++ __systemctl list-units --all -t slice \ ++ | { while read -r a b; do echo $a; done; }; ++} ++ ++__slices () { ++ local -a _slices ++ _slices=(${(fo)"$(__get_slices)"}) ++ typeset -U _slices ++ _describe 'slices' _slices ++} ++ ++_arguments \ ++ {-h,--help}'[Show help message]' \ ++ '--version[Show package version]' \ ++ '--user[Run as user unit]' \ ++ '--scope[Run this as scope rather than service]' \ ++ '--unit=[Run under the specified unit name]:unit name' \ ++ '--description=[Description for unit]:description' \ ++ '--slice=[Run in the specified slice]:slices:__slices' \ ++ {-r,--remain-after-exit}'[Leave service around until explicitly stopped]' \ ++ '--send-sighup[Send SIGHUP when terminating]' \ ++ '*::command:_command' diff --git a/SOURCES/0082-systemctl-fix-typo-in-help-text.patch b/SOURCES/0082-systemctl-fix-typo-in-help-text.patch new file mode 100644 index 0000000..fe90610 --- /dev/null +++ b/SOURCES/0082-systemctl-fix-typo-in-help-text.patch @@ -0,0 +1,22 @@ +From 9e6ece2b9eb8d57a9d724d6b7bbb92524ac52ad3 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Fri, 1 Nov 2013 20:46:49 +0100 +Subject: [PATCH] systemctl: fix typo in help text + +--- + src/systemctl/systemctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 036828b..36040db 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4743,7 +4743,7 @@ static int systemctl_help(void) { + " -f --force When enabling unit files, override existing symlinks\n" + " When shutting down, execute action immediately\n" + " --root=PATH Enable unit files in the specified root directory\n" +- " -n --lines=INTEGER Numer of journal entries to show\n" ++ " -n --lines=INTEGER Number of journal entries to show\n" + " -o --output=STRING Change journal output mode (short, short-monotonic,\n" + " verbose, export, json, json-pretty, json-sse, cat)\n\n" + "Unit Commands:\n" diff --git a/SOURCES/0083-detect_virtualization-returns-NULL-pass-empty-string.patch b/SOURCES/0083-detect_virtualization-returns-NULL-pass-empty-string.patch new file mode 100644 index 0000000..55bd8bd --- /dev/null +++ b/SOURCES/0083-detect_virtualization-returns-NULL-pass-empty-string.patch @@ -0,0 +1,32 @@ +From 98ec954cba5abf87f29cf5122825eb565b5bdf64 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Sat, 2 Nov 2013 00:01:32 +0100 +Subject: [PATCH] detect_virtualization() returns NULL; pass empty string to + dbus + +--- + src/core/dbus-manager.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c +index 7be5d13..6d16c2a 100644 +--- a/src/core/dbus-manager.c ++++ b/src/core/dbus-manager.c +@@ -466,7 +466,7 @@ static int bus_manager_append_progress(DBusMessageIter *i, const char *property, + + static int bus_manager_append_virt(DBusMessageIter *i, const char *property, void *data) { + Manager *m = data; +- const char *id = ""; ++ const char *id = NULL; + + assert(i); + assert(property); +@@ -474,6 +474,8 @@ static int bus_manager_append_virt(DBusMessageIter *i, const char *property, voi + + detect_virtualization(&id); + ++ if (!id) ++ id = ""; + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &id)) + return -ENOMEM; + diff --git a/SOURCES/0084-udev-builtin-keyboard-Fix-large-scan-codes-on-32-bit.patch b/SOURCES/0084-udev-builtin-keyboard-Fix-large-scan-codes-on-32-bit.patch new file mode 100644 index 0000000..648a718 --- /dev/null +++ b/SOURCES/0084-udev-builtin-keyboard-Fix-large-scan-codes-on-32-bit.patch @@ -0,0 +1,31 @@ +From 4b2a44e3fa0e56b638dab29def3f499788a03334 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Mon, 4 Nov 2013 07:25:45 +0100 +Subject: [PATCH] udev-builtin-keyboard: Fix large scan codes on 32 bit + architectures + +Use strtoul(), as scan codes are always positive. On 32 bit architectures +strtol gives wrong results: + + strtol("fffffff0", &endptr, 16) + +returns 2147483647 instead of 4294967280. + +https://launchpad.net/bugs/1247676 +--- + src/udev/udev-builtin-keyboard.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c +index ddd8535..8f457ab 100644 +--- a/src/udev/udev-builtin-keyboard.c ++++ b/src/udev/udev-builtin-keyboard.c +@@ -88,7 +88,7 @@ static int builtin_keyboard(struct udev_device *dev, int argc, char *argv[], boo + continue; + + /* KEYBOARD_KEY_= */ +- scancode = strtol(key + 13, &endptr, 16); ++ scancode = strtoul(key + 13, &endptr, 16); + if (endptr[0] != '\0') { + log_error("Error, unable to parse scan code from '%s'\n", key); + continue; diff --git a/SOURCES/0085-nspawn-log-out-of-memory-errors.patch b/SOURCES/0085-nspawn-log-out-of-memory-errors.patch new file mode 100644 index 0000000..3e6ba0c --- /dev/null +++ b/SOURCES/0085-nspawn-log-out-of-memory-errors.patch @@ -0,0 +1,37 @@ +From 472b443a7e1949f6d35d5216b6323424719d1b8c Mon Sep 17 00:00:00 2001 +From: Djalal Harouni +Date: Tue, 5 Nov 2013 15:26:37 +0100 +Subject: [PATCH] nspawn: log out of memory errors + +--- + src/nspawn/nspawn.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 9616dbf..db47fbd 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -224,6 +224,9 @@ static int parse_argv(int argc, char *argv[]) { + + case 'S': + arg_slice = strdup(optarg); ++ if (!arg_slice) ++ return log_oom(); ++ + break; + + case 'M': +@@ -315,11 +318,11 @@ static int parse_argv(int argc, char *argv[]) { + + r = strv_extend(x, a); + if (r < 0) +- return r; ++ return log_oom(); + + r = strv_extend(x, b); + if (r < 0) +- return r; ++ return log_oom(); + + break; + } diff --git a/SOURCES/0086-man-fix-typo.patch b/SOURCES/0086-man-fix-typo.patch new file mode 100644 index 0000000..b985a5a --- /dev/null +++ b/SOURCES/0086-man-fix-typo.patch @@ -0,0 +1,22 @@ +From 97df020a95852dddd28787ee846691c301b58807 Mon Sep 17 00:00:00 2001 +From: Ronny Chevalier +Date: Sun, 3 Nov 2013 15:07:31 +0100 +Subject: [PATCH] man: fix typo + +--- + man/systemd-run.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/systemd-run.xml b/man/systemd-run.xml +index e76a402..252335b 100644 +--- a/man/systemd-run.xml ++++ b/man/systemd-run.xml +@@ -60,7 +60,7 @@ along with systemd; If not, see . + + Description + +- systemd-run may be used create and start ++ systemd-run may be used to create and start + a transient .service or a + .scope unit and run the specified + COMMAND in it. diff --git a/SOURCES/0087-man-do-not-use-term-in-para.patch b/SOURCES/0087-man-do-not-use-term-in-para.patch new file mode 100644 index 0000000..20e3451 --- /dev/null +++ b/SOURCES/0087-man-do-not-use-term-in-para.patch @@ -0,0 +1,23 @@ +From 2bdcb1a688e047a1b7712acc6d8efbcd7a437373 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Tue, 5 Nov 2013 21:34:50 +0100 +Subject: [PATCH] man: do not use in + +Element term in namespace '' encountered in para, but no template matches. +--- + man/systemd.mount.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml +index 71a5736..df5a79e 100644 +--- a/man/systemd.mount.xml ++++ b/man/systemd.mount.xml +@@ -261,7 +261,7 @@ + a time span value such as "5min + 20s". Pass 0 to disable the timeout + logic. Default value is setted up in manager configuration +- file via DefaultTimeoutStart=. ++ file via DefaultTimeoutStart=. + + + diff --git a/SOURCES/0088-shutdown-trim-the-cgroup-tree-on-loop-iteration.patch b/SOURCES/0088-shutdown-trim-the-cgroup-tree-on-loop-iteration.patch new file mode 100644 index 0000000..ad78f06 --- /dev/null +++ b/SOURCES/0088-shutdown-trim-the-cgroup-tree-on-loop-iteration.patch @@ -0,0 +1,65 @@ +From 8742fc797d827ff92831af7d8af353e6bb073ddc Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 5 Nov 2013 22:17:03 +0100 +Subject: [PATCH] shutdown: trim the cgroup tree on loop iteration + +This way we leave the cgroup empty before exiting in a container which +makes sure the container manager will get cgroup notification event + +https://bugs.freedesktop.org/show_bug.cgi?id=68370 +https://bugzilla.redhat.com/show_bug.cgi?id=988883 +--- + src/core/shutdown.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/core/shutdown.c b/src/core/shutdown.c +index 4709746..ea02b60 100644 +--- a/src/core/shutdown.c ++++ b/src/core/shutdown.c +@@ -46,6 +46,7 @@ + #include "virt.h" + #include "watchdog.h" + #include "killall.h" ++#include "cgroup-util.h" + + #define FINALIZE_ATTEMPTS 50 + +@@ -131,12 +132,12 @@ static int pivot_to_new_root(void) { + } + + int main(int argc, char *argv[]) { +- _cleanup_free_ char *line = NULL; +- int cmd, r; +- unsigned retries; + bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true; + bool in_container, use_watchdog = false; ++ _cleanup_free_ char *line = NULL, *cgroup = NULL; + char *arguments[3]; ++ unsigned retries; ++ int cmd, r; + + /* suppress shutdown status output if 'quiet' is used */ + r = read_one_line_file("/proc/cmdline", &line); +@@ -186,6 +187,8 @@ int main(int argc, char *argv[]) { + goto error; + } + ++ cg_get_root_path(&cgroup); ++ + use_watchdog = !!getenv("WATCHDOG_USEC"); + + /* lock us into memory */ +@@ -210,6 +213,13 @@ int main(int argc, char *argv[]) { + if (use_watchdog) + watchdog_ping(); + ++ /* Let's trim the cgroup tree on each iteration so ++ that we leave an empty cgroup tree around, so that ++ container managers get a nice notify event when we ++ are down */ ++ if (cgroup) ++ cg_trim(SYSTEMD_CGROUP_CONTROLLER, cgroup, false); ++ + if (need_umount) { + log_info("Unmounting file systems."); + r = umount_all(&changed); diff --git a/SOURCES/0089-run-support-system-to-match-other-commands-even-if-r.patch b/SOURCES/0089-run-support-system-to-match-other-commands-even-if-r.patch new file mode 100644 index 0000000..74ec531 --- /dev/null +++ b/SOURCES/0089-run-support-system-to-match-other-commands-even-if-r.patch @@ -0,0 +1,112 @@ +From 8588ecf209ae4f8a198614b3786c58e584528f98 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 6 Nov 2013 17:31:20 +0100 +Subject: [PATCH] run: support --system to match other commands, even if + redundant + +Conflicts: + man/systemd-run.xml + src/run/run.c +--- + man/systemd-run.xml | 9 +++++++++ + src/run/run.c | 20 +++++++++++++------- + 2 files changed, 22 insertions(+), 7 deletions(-) + +diff --git a/man/systemd-run.xml b/man/systemd-run.xml +index 252335b..48a0715 100644 +--- a/man/systemd-run.xml ++++ b/man/systemd-run.xml +@@ -113,6 +113,15 @@ along with systemd; If not, see . + + + ++ ++ ++ ++ Talk to the service manager of the system. This is the ++ implied default. ++ ++ ++ ++ + + + +diff --git a/src/run/run.c b/src/run/run.c +index 18a4920..a6abead 100644 +--- a/src/run/run.c ++++ b/src/run/run.c +@@ -61,6 +61,7 @@ static int parse_argv(int argc, char *argv[]) { + enum { + ARG_VERSION = 0x100, + ARG_USER, ++ ARG_SYSTEM, + ARG_SCOPE, + ARG_UNIT, + ARG_DESCRIPTION, +@@ -72,6 +73,7 @@ static int parse_argv(int argc, char *argv[]) { + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, ARG_VERSION }, + { "user", no_argument, NULL, ARG_USER }, ++ { "system", no_argument, NULL, ARG_SYSTEM }, + { "scope", no_argument, NULL, ARG_SCOPE }, + { "unit", required_argument, NULL, ARG_UNIT }, + { "description", required_argument, NULL, ARG_DESCRIPTION }, +@@ -103,6 +105,10 @@ static int parse_argv(int argc, char *argv[]) { + arg_user = true; + break; + ++ case ARG_SYSTEM: ++ arg_user = false; ++ break; ++ + case ARG_SCOPE: + arg_scope = true; + break; +@@ -333,12 +339,12 @@ int main(int argc, char* argv[]) { + + r = parse_argv(argc, argv); + if (r <= 0) +- goto fail; ++ goto finish; + + r = find_binary(argv[optind], &command); + if (r < 0) { + log_error("Failed to find executable %s: %s", argv[optind], strerror(-r)); +- goto fail; ++ goto finish; + } + argv[optind] = command; + +@@ -346,7 +352,7 @@ int main(int argc, char* argv[]) { + description = strv_join(argv + optind, " "); + if (!description) { + r = log_oom(); +- goto fail; ++ goto finish; + } + + arg_description = description; +@@ -357,8 +363,8 @@ int main(int argc, char* argv[]) { + else + r = sd_bus_open_system(&bus); + if (r < 0) { +- log_error("Failed to create new bus connection: %s", strerror(-r)); +- goto fail; ++ log_error("Failed to create bus connection: %s", strerror(-r)); ++ goto finish; + } + + if (arg_scope) +@@ -368,9 +374,9 @@ int main(int argc, char* argv[]) { + if (r < 0) { + log_error("Failed start transient unit: %s", error.message ? error.message : strerror(-r)); + sd_bus_error_free(&error); +- goto fail; ++ goto finish; + } + +-fail: ++finish: + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + } diff --git a/SOURCES/0090-acpi-fpdt-break-on-zero-or-negative-length-read.patch b/SOURCES/0090-acpi-fpdt-break-on-zero-or-negative-length-read.patch new file mode 100644 index 0000000..9807e91 --- /dev/null +++ b/SOURCES/0090-acpi-fpdt-break-on-zero-or-negative-length-read.patch @@ -0,0 +1,23 @@ +From 113e2da2789ac680d2042993dcf76eef43072f4d Mon Sep 17 00:00:00 2001 +From: Pavel Holica +Date: Wed, 6 Nov 2013 23:24:16 +0100 +Subject: [PATCH] acpi-fpdt: break on zero or negative length read + +https://bugzilla.redhat.com/show_bug.cgi?id=1027478 +--- + src/shared/acpi-fpdt.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c +index 75648b4..7bae47f 100644 +--- a/src/shared/acpi-fpdt.c ++++ b/src/shared/acpi-fpdt.c +@@ -109,6 +109,8 @@ int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) { + for (rec = (struct acpi_fpdt_header *)(buf + sizeof(struct acpi_table_header)); + (char *)rec < buf + l; + rec = (struct acpi_fpdt_header *)((char *)rec + rec->length)) { ++ if (rec->length <= 0) ++ break; + if (rec->type != ACPI_FPDT_TYPE_BOOT) + continue; + if (rec->length != sizeof(struct acpi_fpdt_header)) diff --git a/SOURCES/0091-man-add-rationale-into-systemd-halt-8.patch b/SOURCES/0091-man-add-rationale-into-systemd-halt-8.patch new file mode 100644 index 0000000..d678ec3 --- /dev/null +++ b/SOURCES/0091-man-add-rationale-into-systemd-halt-8.patch @@ -0,0 +1,28 @@ +From e701defc239f63731940b8d0867405e0b36b9ada Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 7 Nov 2013 01:17:49 +0100 +Subject: [PATCH] man: add rationale into systemd-halt(8) + +The explanation is from +http://people.debian.org/~stapelberg/docs/systemd-dependencies.html +--- + man/systemd-halt.service.xml | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml +index 812281e..90b443f 100644 +--- a/man/systemd-halt.service.xml ++++ b/man/systemd-halt.service.xml +@@ -83,6 +83,12 @@ + remaining swap devices, detach all remaining storage + devices and kill all remaining processes. + ++ It is necessary to have this code in a separate binary ++ because otherwise rebooting after an upgrade might be broken — ++ the running PID 1 could still depend on libraries which are not ++ available any more, thus keeping the filesystem busy, which ++ then cannot be re-mounted read-only. ++ + Immediately before executing the actual system + halt/poweroff/reboot/kexec + systemd-shutdown will run all diff --git a/SOURCES/0092-systemd-python-convert-keyword-value-to-string.patch b/SOURCES/0092-systemd-python-convert-keyword-value-to-string.patch new file mode 100644 index 0000000..ab97a86 --- /dev/null +++ b/SOURCES/0092-systemd-python-convert-keyword-value-to-string.patch @@ -0,0 +1,27 @@ +From f9c5cdfe9fe4d3ac8b075ed55d58f79cc067cdae Mon Sep 17 00:00:00 2001 +From: Richard Marko +Date: Tue, 5 Nov 2013 15:41:20 +0100 +Subject: [PATCH] systemd-python: convert keyword value to string + +Allows using journal.send('msg', PRIORITY=journal.LOG_CRIT) + +Before this commit this results in +TypeError: cannot concatenate 'str' and 'int' objects +and requires passing PRIORITY value as string to work. +--- + src/python-systemd/journal.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py +index d0bcd24..9c7e004 100644 +--- a/src/python-systemd/journal.py ++++ b/src/python-systemd/journal.py +@@ -352,6 +352,8 @@ def get_catalog(mid): + def _make_line(field, value): + if isinstance(value, bytes): + return field.encode('utf-8') + b'=' + value ++ elif isinstance(value, int): ++ return field + '=' + str(value) + else: + return field + '=' + value + diff --git a/SOURCES/0093-Make-hibernation-test-work-for-swap-files.patch b/SOURCES/0093-Make-hibernation-test-work-for-swap-files.patch new file mode 100644 index 0000000..08a6534 --- /dev/null +++ b/SOURCES/0093-Make-hibernation-test-work-for-swap-files.patch @@ -0,0 +1,25 @@ +From 4baeb24c8002e602d9eca1ba240aa2e166de4ae6 Mon Sep 17 00:00:00 2001 +From: Jan Janssen +Date: Thu, 31 Oct 2013 17:22:03 +0100 +Subject: [PATCH] Make hibernation test work for swap files + +Suspend to disk works for swap files too (even if it is located +on an ecrypted file system): +https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt +--- + src/shared/sleep-config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c +index d068bfc..2bb0493 100644 +--- a/src/shared/sleep-config.c ++++ b/src/shared/sleep-config.c +@@ -206,7 +206,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) { + if (!d) + return -ENOMEM; + +- if (!streq(type, "partition")) { ++ if (!streq(type, "partition") && !streq(type, "file")) { + log_debug("Partition %s has type %s, ignoring.", d, type); + continue; + } diff --git a/SOURCES/0094-man-add-docs-for-sd_is_special-and-some-man-page-sym.patch b/SOURCES/0094-man-add-docs-for-sd_is_special-and-some-man-page-sym.patch new file mode 100644 index 0000000..2b774d0 --- /dev/null +++ b/SOURCES/0094-man-add-docs-for-sd_is_special-and-some-man-page-sym.patch @@ -0,0 +1,134 @@ +From 5b154beab0557c51f18012e7d01d29d48d1910f3 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 7 Nov 2013 17:51:09 +0100 +Subject: [PATCH] man: add docs for sd_is_special() and some man page symlinks + +Conflicts: + Makefile.am +--- + Makefile-man.am | 15 +++++++++++++++ + man/sd_is_fifo.xml | 17 +++++++++++++++++ + man/sd_seat_get_active.xml | 2 ++ + 3 files changed, 34 insertions(+) + +diff --git a/Makefile-man.am b/Makefile-man.am +index c8a4342..b8c8acc 100644 +--- a/Makefile-man.am ++++ b/Makefile-man.am +@@ -138,6 +138,7 @@ MANPAGES_ALIAS += \ + man/sd_is_socket.3 \ + man/sd_is_socket_inet.3 \ + man/sd_is_socket_unix.3 \ ++ man/sd_is_special.3 \ + man/sd_journal.3 \ + man/sd_journal_add_conjunction.3 \ + man/sd_journal_add_disjunction.3 \ +@@ -238,6 +239,7 @@ man/sd_is_mq.3: man/sd_is_fifo.3 + man/sd_is_socket.3: man/sd_is_fifo.3 + man/sd_is_socket_inet.3: man/sd_is_fifo.3 + man/sd_is_socket_unix.3: man/sd_is_fifo.3 ++man/sd_is_special.3: man/sd_is_fifo.3 + man/sd_journal.3: man/sd_journal_open.3 + man/sd_journal_add_conjunction.3: man/sd_journal_add_match.3 + man/sd_journal_add_disjunction.3: man/sd_journal_add_match.3 +@@ -410,6 +412,9 @@ man/sd_is_socket_inet.html: man/sd_is_fifo.html + man/sd_is_socket_unix.html: man/sd_is_fifo.html + $(html-alias) + ++man/sd_is_special.html: man/sd_is_fifo.html ++ $(html-alias) ++ + man/sd_journal.html: man/sd_journal_open.html + $(html-alias) + +@@ -844,7 +849,9 @@ MANPAGES_ALIAS += \ + man/sd_pid_get_slice.3 \ + man/sd_pid_get_unit.3 \ + man/sd_pid_get_user_unit.3 \ ++ man/sd_seat_can_graphical.3 \ + man/sd_seat_can_multi_session.3 \ ++ man/sd_seat_can_tty.3 \ + man/sd_seat_get_sessions.3 \ + man/sd_session_get_class.3 \ + man/sd_session_get_display.3 \ +@@ -873,7 +880,9 @@ man/sd_pid_get_owner_uid.3: man/sd_pid_get_session.3 + man/sd_pid_get_slice.3: man/sd_pid_get_session.3 + man/sd_pid_get_unit.3: man/sd_pid_get_session.3 + man/sd_pid_get_user_unit.3: man/sd_pid_get_session.3 ++man/sd_seat_can_graphical.3: man/sd_seat_get_active.3 + man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3 ++man/sd_seat_can_tty.3: man/sd_seat_get_active.3 + man/sd_seat_get_sessions.3: man/sd_seat_get_active.3 + man/sd_session_get_class.3: man/sd_session_is_active.3 + man/sd_session_get_display.3: man/sd_session_is_active.3 +@@ -930,9 +939,15 @@ man/sd_pid_get_unit.html: man/sd_pid_get_session.html + man/sd_pid_get_user_unit.html: man/sd_pid_get_session.html + $(html-alias) + ++man/sd_seat_can_graphical.html: man/sd_seat_get_active.html ++ $(html-alias) ++ + man/sd_seat_can_multi_session.html: man/sd_seat_get_active.html + $(html-alias) + ++man/sd_seat_can_tty.html: man/sd_seat_get_active.html ++ $(html-alias) ++ + man/sd_seat_get_sessions.html: man/sd_seat_get_active.html + $(html-alias) + +diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml +index 2bc860c..4d9cd79 100644 +--- a/man/sd_is_fifo.xml ++++ b/man/sd_is_fifo.xml +@@ -48,6 +48,7 @@ + sd_is_socket_inet + sd_is_socket_unix + sd_is_mq ++ sd_is_special + Check the type of a file descriptor + + +@@ -93,6 +94,12 @@ + const char *path + + ++ ++ int sd_is_special ++ int fd ++ const char *path ++ ++ + + + +@@ -153,6 +160,16 @@ + path parameter is not + NULL, it is checked whether the + message queue is bound to the specified name. ++ ++ sd_is_special() may be ++ called to check whether the specified file descriptor ++ refers to a special file. If the ++ path parameter is not ++ NULL, it is checked whether file ++ descriptor is bound to the specified file ++ name. Special files in this context are character ++ device nodes and files in /proc ++ or /sys. + + + +diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml +index 1610d3e..cd87696 100644 +--- a/man/sd_seat_get_active.xml ++++ b/man/sd_seat_get_active.xml +@@ -46,6 +46,8 @@ + sd_seat_get_active + sd_seat_get_sessions + sd_seat_can_multi_session ++ sd_seat_can_tty ++ sd_seat_can_graphical + Determine state of a specific seat + + diff --git a/SOURCES/0095-systemctl-return-r-instead-of-always-returning-0.patch b/SOURCES/0095-systemctl-return-r-instead-of-always-returning-0.patch new file mode 100644 index 0000000..53cec6a --- /dev/null +++ b/SOURCES/0095-systemctl-return-r-instead-of-always-returning-0.patch @@ -0,0 +1,22 @@ +From 72002c70f780a73efc8357fe0249228e6d0a6924 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Wed, 6 Nov 2013 11:18:02 +0100 +Subject: [PATCH] systemctl: return r instead of always returning 0 + +--- + src/systemctl/systemctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 36040db..1d68b38 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -1362,7 +1362,7 @@ static int list_jobs(DBusConnection *bus, char **args) { + } + free(jobs); + +- return 0; ++ return r; + } + + static int cancel_job(DBusConnection *bus, char **args) { diff --git a/SOURCES/0096-journal-fix-minor-memory-leak.patch b/SOURCES/0096-journal-fix-minor-memory-leak.patch new file mode 100644 index 0000000..4b99d8c --- /dev/null +++ b/SOURCES/0096-journal-fix-minor-memory-leak.patch @@ -0,0 +1,22 @@ +From 9d2d041c768d1597cd556a322e4eb3d1d623f318 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 8 Nov 2013 13:53:25 +0100 +Subject: [PATCH] journal: fix minor memory leak + +--- + src/journal/sd-journal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c +index 7700d6c..9676f0f 100644 +--- a/src/journal/sd-journal.c ++++ b/src/journal/sd-journal.c +@@ -1276,7 +1276,7 @@ static void check_network(sd_journal *j, int fd) { + static bool file_has_type_prefix(const char *prefix, const char *filename) { + const char *full, *tilded, *atted; + +- full = strappend(prefix, ".journal"); ++ full = strappenda(prefix, ".journal"); + tilded = strappenda(full, "~"); + atted = strappenda(prefix, "@"); + diff --git a/SOURCES/0097-man-units-fix-installation-of-systemd-nspawn-.servic.patch b/SOURCES/0097-man-units-fix-installation-of-systemd-nspawn-.servic.patch new file mode 100644 index 0000000..956462c --- /dev/null +++ b/SOURCES/0097-man-units-fix-installation-of-systemd-nspawn-.servic.patch @@ -0,0 +1,57 @@ +From a3794196f13a2fd47d61517a304c15e162a6c06a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 7 Nov 2013 23:57:19 -0500 +Subject: [PATCH] man,units: fix installation of systemd-nspawn@.service and + add example + +--- + TODO | 1 + + man/systemd-nspawn.xml | 12 ++++++++++++ + units/systemd-nspawn@.service.in | 2 +- + 3 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/TODO b/TODO +index 07269f4..ad4b733 100644 +--- a/TODO ++++ b/TODO +@@ -493,6 +493,7 @@ Features: + - nspawn: maybe add a way to drop additional caps, in addition to add additional caps + - nspawn: maybe explicitly reset loginuid? + - nspawn: make it work for dwalsh and shared /usr containers -- tmpfs mounts as command line parameters, selinux exec context ++ - refuses to boot containers without /etc/machine-id (OK?), and with empty /etc/machine-id (not OK). + + * cryptsetup: + - cryptsetup-generator: allow specification of passwords in crypttab itself +diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml +index 7d450f9..ba9e516 100644 +--- a/man/systemd-nspawn.xml ++++ b/man/systemd-nspawn.xml +@@ -428,6 +428,18 @@ + + + ++ Example 4 ++ ++ # mv ~/arch-tree /var/lib/container/arch ++# systemctl enable systemd-nspawn@arch.service ++# systemctl start systemd-nspawn@arch.service ++ ++ This makes the Arch Linux container part of the ++ multi-user.target on the host. ++ ++ ++ ++ + Exit status + + The exit code of the program executed in the +diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in +index eca62e3..8e00736 100644 +--- a/units/systemd-nspawn@.service.in ++++ b/units/systemd-nspawn@.service.in +@@ -14,4 +14,4 @@ ExecStart=@bindir@/systemd-nspawn -bjD /var/lib/container/%i + Type=notify + + [Install] +-Also=multi-user.target ++WantedBy=multi-user.target diff --git a/SOURCES/0098-systemd-fix-memory-leak-in-cgroup-code.patch b/SOURCES/0098-systemd-fix-memory-leak-in-cgroup-code.patch new file mode 100644 index 0000000..069e194 --- /dev/null +++ b/SOURCES/0098-systemd-fix-memory-leak-in-cgroup-code.patch @@ -0,0 +1,65 @@ +From 19a5f184904952d20cf1a6ea81e6e295fe991765 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 8 Nov 2013 08:41:13 -0500 +Subject: [PATCH] systemd: fix memory leak in cgroup code + +If the unit already was in the hashmap, path would be leaked. +--- + src/core/cgroup.c | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/src/core/cgroup.c b/src/core/cgroup.c +index 8bf4d89..b60707c 100644 +--- a/src/core/cgroup.c ++++ b/src/core/cgroup.c +@@ -376,23 +376,23 @@ static CGroupControllerMask unit_get_siblings_mask(Unit *u) { + } + + static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) { +- char *path = NULL; ++ _cleanup_free_ char *path; + int r; +- bool is_in_hash = false; ++ bool was_in_hash = false; + + assert(u); + + path = unit_default_cgroup_path(u); + if (!path) +- return -ENOMEM; ++ return log_oom(); + + r = hashmap_put(u->manager->cgroup_unit, path, u); + if (r == 0) +- is_in_hash = true; +- +- if (r < 0) { +- log_error("cgroup %s exists already: %s", path, strerror(-r)); +- free(path); ++ was_in_hash = true; ++ else if (r < 0) { ++ log_error(r == -EEXIST ? ++ "cgroup %s exists already: %s" : "hashmap_put failed for %s: %s", ++ path, strerror(-r)); + return r; + } + +@@ -405,13 +405,15 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) { + if (u->cgroup_path) { + r = cg_migrate_everywhere(u->manager->cgroup_supported, u->cgroup_path, path); + if (r < 0) +- log_error("Failed to migrate cgroup %s: %s", path, strerror(-r)); ++ log_error("Failed to migrate cgroup from %s to %s: %s", ++ u->cgroup_path, path, strerror(-r)); + } + +- if (!is_in_hash) { +- /* And remember the new data */ ++ if (!was_in_hash) { ++ /* Remember the new data */ + free(u->cgroup_path); + u->cgroup_path = path; ++ path = NULL; + } + + u->cgroup_realized = true; diff --git a/SOURCES/0099-button-don-t-exit-if-we-cannot-handle-a-button-press.patch b/SOURCES/0099-button-don-t-exit-if-we-cannot-handle-a-button-press.patch new file mode 100644 index 0000000..3a1167c --- /dev/null +++ b/SOURCES/0099-button-don-t-exit-if-we-cannot-handle-a-button-press.patch @@ -0,0 +1,22 @@ +From 47be95beb25c23acbd7a47fa226a5523eb4a6e35 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Sun, 10 Nov 2013 23:05:08 +0100 +Subject: [PATCH] button: don't exit if we cannot handle a button press + +--- + src/login/logind-button.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-button.c b/src/login/logind-button.c +index ea45c28..4f456d2 100644 +--- a/src/login/logind-button.c ++++ b/src/login/logind-button.c +@@ -172,7 +172,7 @@ static int button_handle( + * execute another one until the lid is opened/closed again */ + b->lid_close_queued = false; + +- return r; ++ return 0; + } + + int button_process(Button *b) { diff --git a/SOURCES/0100-timer-properly-format-relative-timestamps-in-the-fut.patch b/SOURCES/0100-timer-properly-format-relative-timestamps-in-the-fut.patch new file mode 100644 index 0000000..8d9b3a7 --- /dev/null +++ b/SOURCES/0100-timer-properly-format-relative-timestamps-in-the-fut.patch @@ -0,0 +1,120 @@ +From dc7bf475eda82d02b5a0f243fee6741fab56729c Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 11 Nov 2013 03:02:52 +0100 +Subject: [PATCH] timer: properly format relative timestamps in the future + +--- + src/shared/time-util.c | 69 ++++++++++++++++++++++++++++++++------------------ + 1 file changed, 44 insertions(+), 25 deletions(-) + +diff --git a/src/shared/time-util.c b/src/shared/time-util.c +index 860be61..b8a6bd7 100644 +--- a/src/shared/time-util.c ++++ b/src/shared/time-util.c +@@ -191,55 +191,62 @@ char *format_timestamp_us(char *buf, size_t l, usec_t t) { + } + + char *format_timestamp_relative(char *buf, size_t l, usec_t t) { ++ const char *s; + usec_t n, d; + + n = now(CLOCK_REALTIME); + +- if (t <= 0 || t > n || t + USEC_PER_DAY*7 <= t) ++ if (t <= 0 || (t == (usec_t) -1)) + return NULL; + +- d = n - t; ++ if (n > t) { ++ d = n - t; ++ s = "ago"; ++ } else { ++ d = t - n; ++ s = "left"; ++ } + + if (d >= USEC_PER_YEAR) +- snprintf(buf, l, "%llu years %llu months ago", ++ snprintf(buf, l, "%llu years %llu months %s", + (unsigned long long) (d / USEC_PER_YEAR), +- (unsigned long long) ((d % USEC_PER_YEAR) / USEC_PER_MONTH)); ++ (unsigned long long) ((d % USEC_PER_YEAR) / USEC_PER_MONTH), s); + else if (d >= USEC_PER_MONTH) +- snprintf(buf, l, "%llu months %llu days ago", ++ snprintf(buf, l, "%llu months %llu days %s", + (unsigned long long) (d / USEC_PER_MONTH), +- (unsigned long long) ((d % USEC_PER_MONTH) / USEC_PER_DAY)); ++ (unsigned long long) ((d % USEC_PER_MONTH) / USEC_PER_DAY), s); + else if (d >= USEC_PER_WEEK) +- snprintf(buf, l, "%llu weeks %llu days ago", ++ snprintf(buf, l, "%llu weeks %llu days %s", + (unsigned long long) (d / USEC_PER_WEEK), +- (unsigned long long) ((d % USEC_PER_WEEK) / USEC_PER_DAY)); ++ (unsigned long long) ((d % USEC_PER_WEEK) / USEC_PER_DAY), s); + else if (d >= 2*USEC_PER_DAY) +- snprintf(buf, l, "%llu days ago", (unsigned long long) (d / USEC_PER_DAY)); ++ snprintf(buf, l, "%llu days %s", (unsigned long long) (d / USEC_PER_DAY), s); + else if (d >= 25*USEC_PER_HOUR) +- snprintf(buf, l, "1 day %lluh ago", +- (unsigned long long) ((d - USEC_PER_DAY) / USEC_PER_HOUR)); ++ snprintf(buf, l, "1 day %lluh %s", ++ (unsigned long long) ((d - USEC_PER_DAY) / USEC_PER_HOUR), s); + else if (d >= 6*USEC_PER_HOUR) +- snprintf(buf, l, "%lluh ago", +- (unsigned long long) (d / USEC_PER_HOUR)); ++ snprintf(buf, l, "%lluh %s", ++ (unsigned long long) (d / USEC_PER_HOUR), s); + else if (d >= USEC_PER_HOUR) +- snprintf(buf, l, "%lluh %llumin ago", ++ snprintf(buf, l, "%lluh %llumin %s", + (unsigned long long) (d / USEC_PER_HOUR), +- (unsigned long long) ((d % USEC_PER_HOUR) / USEC_PER_MINUTE)); ++ (unsigned long long) ((d % USEC_PER_HOUR) / USEC_PER_MINUTE), s); + else if (d >= 5*USEC_PER_MINUTE) +- snprintf(buf, l, "%llumin ago", +- (unsigned long long) (d / USEC_PER_MINUTE)); ++ snprintf(buf, l, "%llumin %s", ++ (unsigned long long) (d / USEC_PER_MINUTE), s); + else if (d >= USEC_PER_MINUTE) +- snprintf(buf, l, "%llumin %llus ago", ++ snprintf(buf, l, "%llumin %llus %s", + (unsigned long long) (d / USEC_PER_MINUTE), +- (unsigned long long) ((d % USEC_PER_MINUTE) / USEC_PER_SEC)); ++ (unsigned long long) ((d % USEC_PER_MINUTE) / USEC_PER_SEC), s); + else if (d >= USEC_PER_SEC) +- snprintf(buf, l, "%llus ago", +- (unsigned long long) (d / USEC_PER_SEC)); ++ snprintf(buf, l, "%llus %s", ++ (unsigned long long) (d / USEC_PER_SEC), s); + else if (d >= USEC_PER_MSEC) +- snprintf(buf, l, "%llums ago", +- (unsigned long long) (d / USEC_PER_MSEC)); ++ snprintf(buf, l, "%llums %s", ++ (unsigned long long) (d / USEC_PER_MSEC), s); + else if (d > 0) +- snprintf(buf, l, "%lluus ago", +- (unsigned long long) d); ++ snprintf(buf, l, "%lluus %s", ++ (unsigned long long) d, s); + else + snprintf(buf, l, "now"); + +@@ -479,6 +486,18 @@ int parse_timestamp(const char *t, usec_t *usec) { + return r; + + goto finish; ++ } else if (endswith(t, " left")) { ++ _cleanup_free_ char *z; ++ ++ z = strndup(t, strlen(t) - 4); ++ if (!z) ++ return -ENOMEM; ++ ++ r = parse_sec(z, &plus); ++ if (r < 0) ++ return r; ++ ++ goto finish; + } + + for (i = 0; i < ELEMENTSOF(day_nr); i++) { diff --git a/SOURCES/0101-timer-consider-usec_t-1-an-invalid-timestamp.patch b/SOURCES/0101-timer-consider-usec_t-1-an-invalid-timestamp.patch new file mode 100644 index 0000000..40d0397 --- /dev/null +++ b/SOURCES/0101-timer-consider-usec_t-1-an-invalid-timestamp.patch @@ -0,0 +1,48 @@ +From eaae0683686ccd07d1cf79f2247032586162f854 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 11 Nov 2013 03:03:17 +0100 +Subject: [PATCH] timer: consider (usec_t) -1 an invalid timestamp + +--- + src/shared/time-util.c | 4 ++-- + src/shared/time-util.h | 5 ++++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/shared/time-util.c b/src/shared/time-util.c +index b8a6bd7..81d4ede 100644 +--- a/src/shared/time-util.c ++++ b/src/shared/time-util.c +@@ -157,7 +157,7 @@ char *format_timestamp(char *buf, size_t l, usec_t t) { + assert(buf); + assert(l > 0); + +- if (t <= 0) ++ if (t <= 0 || t == (usec_t) -1) + return NULL; + + sec = (time_t) (t / USEC_PER_SEC); +@@ -175,7 +175,7 @@ char *format_timestamp_us(char *buf, size_t l, usec_t t) { + assert(buf); + assert(l > 0); + +- if (t <= 0) ++ if (t <= 0 || t == (usec_t) -1) + return NULL; + + sec = (time_t) (t / USEC_PER_SEC); +diff --git a/src/shared/time-util.h b/src/shared/time-util.h +index 7660fe1..bc10d22 100644 +--- a/src/shared/time-util.h ++++ b/src/shared/time-util.h +@@ -64,7 +64,10 @@ dual_timestamp* dual_timestamp_get(dual_timestamp *ts); + dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u); + dual_timestamp* dual_timestamp_from_monotonic(dual_timestamp *ts, usec_t u); + +-#define dual_timestamp_is_set(ts) ((ts)->realtime > 0) ++static inline bool dual_timestamp_is_set(dual_timestamp *ts) { ++ return ((ts->realtime > 0 && ts->realtime != (usec_t) -1) || ++ (ts->monotonic > 0 && ts->monotonic != (usec_t) -1)); ++} + + usec_t timespec_load(const struct timespec *ts) _pure_; + struct timespec *timespec_store(struct timespec *ts, usec_t u); diff --git a/SOURCES/0102-Resolve-dev-console-to-the-active-tty-instead-of-jus.patch b/SOURCES/0102-Resolve-dev-console-to-the-active-tty-instead-of-jus.patch new file mode 100644 index 0000000..405308f --- /dev/null +++ b/SOURCES/0102-Resolve-dev-console-to-the-active-tty-instead-of-jus.patch @@ -0,0 +1,33 @@ +From 41882edd0421d7f611bcec8cba9379ac8bfa24a9 Mon Sep 17 00:00:00 2001 +From: Olivier Brunel +Date: Fri, 20 Sep 2013 22:18:28 +0200 +Subject: [PATCH] Resolve /dev/console to the active tty instead of just "tty0" + +When resolving /dev/console one would often get "tty0" meaning the active VT. +Resolving to the actual tty (e.g. "tty1") will notably help on boot when +determining whether or not PID1 can output to the console. +--- + src/shared/util.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index b1a4006..8a542da 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -3627,6 +3627,16 @@ char *resolve_dev_console(char **active) { + else + tty = *active; + ++ if (streq(tty, "tty0")) { ++ char *tmp; ++ ++ /* Get the active VC (e.g. tty1) */ ++ if (read_one_line_file("/sys/class/tty/tty0/active", &tmp) >= 0) { ++ free(*active); ++ tty = *active = tmp; ++ } ++ } ++ + return tty; + } + diff --git a/SOURCES/0103-Only-disable-output-on-console-during-boot-if-needed.patch b/SOURCES/0103-Only-disable-output-on-console-during-boot-if-needed.patch new file mode 100644 index 0000000..446b085 --- /dev/null +++ b/SOURCES/0103-Only-disable-output-on-console-during-boot-if-needed.patch @@ -0,0 +1,37 @@ +From 6a2697e8d12f8a09caa26394ecdbbb6d0721f757 Mon Sep 17 00:00:00 2001 +From: Olivier Brunel +Date: Fri, 20 Sep 2013 22:18:29 +0200 +Subject: [PATCH] Only disable output on console during boot if needed + +If there are no more jobs on console, no need/we shouldn't disable output. +--- + src/core/manager.c | 2 +- + src/core/unit.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 58dacdc..ce32baf 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1761,7 +1761,7 @@ static int process_event(Manager *m, struct epoll_event *ev) { + } + + case WATCH_IDLE_PIPE: { +- m->no_console_output = true; ++ m->no_console_output = m->n_on_console > 0; + + manager_unwatch_idle_pipe(m); + close_idle_pipe(m); +diff --git a/src/core/unit.c b/src/core/unit.c +index 0f57b06..acd9c74 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -1457,7 +1457,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su + + if (m->n_on_console == 0) + /* unset no_console_output flag, since the console is free */ +- m->no_console_output = 0; ++ m->no_console_output = false; + } else + m->n_on_console ++; + } diff --git a/SOURCES/0104-Fix-possible-lack-of-status-messages-on-shutdown-reb.patch b/SOURCES/0104-Fix-possible-lack-of-status-messages-on-shutdown-reb.patch new file mode 100644 index 0000000..d3e1a98 --- /dev/null +++ b/SOURCES/0104-Fix-possible-lack-of-status-messages-on-shutdown-reb.patch @@ -0,0 +1,26 @@ +From f64dc9cfd4f2fb79c3b46b2657961b407c6b3235 Mon Sep 17 00:00:00 2001 +From: Olivier Brunel +Date: Fri, 20 Sep 2013 22:18:30 +0200 +Subject: [PATCH] Fix possible lack of status messages on shutdown/reboot + +Since 31a7eb86 the output on console can be disabled to avoid colliding with +gettys. However, it could also lead to a lack of messages during +shutdown/reboot. +--- + src/core/job.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/job.c b/src/core/job.c +index 5ea9803..7d2b994 100644 +--- a/src/core/job.c ++++ b/src/core/job.c +@@ -1099,6 +1099,9 @@ void job_shutdown_magic(Job *j) { + if (!unit_has_name(j->unit, SPECIAL_SHUTDOWN_TARGET)) + return; + ++ /* In case messages on console has been disabled on boot */ ++ j->unit->manager->no_console_output = false; ++ + if (detect_container(NULL) > 0) + return; + diff --git a/SOURCES/0105-random-seed-improve-debugging-messages-a-bit.patch b/SOURCES/0105-random-seed-improve-debugging-messages-a-bit.patch new file mode 100644 index 0000000..08eb783 --- /dev/null +++ b/SOURCES/0105-random-seed-improve-debugging-messages-a-bit.patch @@ -0,0 +1,70 @@ +From 03269523c0f254846613ae3ae0183f4724e47ed8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 12 Nov 2013 22:05:16 -0500 +Subject: [PATCH] random-seed: improve debugging messages a bit + +--- + Makefile.am | 2 ++ + src/random-seed/random-seed.c | 8 ++++---- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0c11477..3103bac 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -159,6 +159,7 @@ AM_CPPFLAGS = \ + -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \ + -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \ + -DROOTPREFIX=\"$(rootprefix)\" \ ++ -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \ + -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \ + -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \ + -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \ +@@ -4227,6 +4228,7 @@ substitutions = \ + '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ + '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ + '|PACKAGE_URL=$(PACKAGE_URL)|' \ ++ '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \ + '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \ + '|prefix=$(prefix)|' \ + '|exec_prefix=$(exec_prefix)|' \ +diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c +index afbd500..af79ecf 100644 +--- a/src/random-seed/random-seed.c ++++ b/src/random-seed/random-seed.c +@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) { + + r = mkdir_parents_label(RANDOM_SEED, 0755); + if (r < 0) { +- log_error("Failed to create parent directory of " RANDOM_SEED ": %s", strerror(-r)); ++ log_error("Failed to create directory " RANDOM_SEED_DIR ": %s", strerror(-r)); + goto finish; + } + +@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { + if (seed_fd < 0) { + seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY); + if (seed_fd < 0) { +- log_error("Failed to open random seed: %m"); ++ log_error("Failed to open " RANDOM_SEED ": %m"); + r = -errno; + goto finish; + } +@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) { + if (k <= 0) { + + if (r != 0) +- log_error("Failed to read seed file: %m"); ++ log_error("Failed to read seed from " RANDOM_SEED ": %m"); + + r = k == 0 ? -EIO : (int) k; + +@@ -125,7 +125,7 @@ int main(int argc, char *argv[]) { + + seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); + if (seed_fd < 0) { +- log_error("Failed to open random seed: %m"); ++ log_error("Failed to open " RANDOM_SEED ": %m"); + r = -errno; + goto finish; + } diff --git a/SOURCES/0106-Fix-RemainAfterExit-services-keeping-a-hold-on-conso.patch b/SOURCES/0106-Fix-RemainAfterExit-services-keeping-a-hold-on-conso.patch new file mode 100644 index 0000000..86dead0 --- /dev/null +++ b/SOURCES/0106-Fix-RemainAfterExit-services-keeping-a-hold-on-conso.patch @@ -0,0 +1,54 @@ +From 210dca6fd02254b8c4d145064cdfadbfef68dbd3 Mon Sep 17 00:00:00 2001 +From: Olivier Brunel +Date: Thu, 14 Nov 2013 15:52:54 +0100 +Subject: [PATCH] Fix RemainAfterExit services keeping a hold on console + +When a service exits succesfully and has RemainAfterExit set, its hold +on the console (in m->n_on_console) wasn't released since the unit state +didn't change. +--- + src/core/service.c | 16 ++++++++++++++++ + src/core/unit.c | 3 +++ + 2 files changed, 19 insertions(+) + +diff --git a/src/core/service.c b/src/core/service.c +index 5662180..62ae8f0 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -1570,6 +1570,22 @@ static void service_set_state(Service *s, ServiceState state) { + if (state == SERVICE_EXITED && UNIT(s)->manager->n_reloading <= 0) + unit_destroy_cgroup(UNIT(s)); + ++ /* For remain_after_exit services, let's see if we can "release" the ++ * hold on the console, since unit_notify() only does that in case of ++ * change of state */ ++ if (state == SERVICE_EXITED && s->remain_after_exit && ++ UNIT(s)->manager->n_on_console > 0) { ++ ExecContext *ec = unit_get_exec_context(UNIT(s)); ++ if (ec && exec_context_may_touch_console(ec)) { ++ Manager *m = UNIT(s)->manager; ++ ++ m->n_on_console --; ++ if (m->n_on_console == 0) ++ /* unset no_console_output flag, since the console is free */ ++ m->no_console_output = false; ++ } ++ } ++ + if (old_state != state) + log_debug_unit(UNIT(s)->id, + "%s changed %s -> %s", UNIT(s)->id, +diff --git a/src/core/unit.c b/src/core/unit.c +index acd9c74..6c2c4a0 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -1449,6 +1449,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su + if (UNIT_IS_INACTIVE_OR_FAILED(ns)) + unit_destroy_cgroup(u); + ++ /* Note that this doesn't apply to RemainAfterExit services exiting ++ * sucessfully, since there's no change of state in that case. Which is ++ * why it is handled in service_set_state() */ + if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) { + ExecContext *ec = unit_get_exec_context(u); + if (ec && exec_context_may_touch_console(ec)) { diff --git a/SOURCES/0107-keymap-Add-Toshiba-Satellite-U940.patch b/SOURCES/0107-keymap-Add-Toshiba-Satellite-U940.patch new file mode 100644 index 0000000..7419cb1 --- /dev/null +++ b/SOURCES/0107-keymap-Add-Toshiba-Satellite-U940.patch @@ -0,0 +1,28 @@ +From d76eefd8a937c6ed75cb24a2c14fa37291e663be Mon Sep 17 00:00:00 2001 +From: Jose Ignacio Naranjo +Date: Sun, 17 Nov 2013 21:11:34 +0100 +Subject: [PATCH] keymap: Add Toshiba Satellite U940 + +Signed-off-by: Martin Pitt +--- + hwdb/60-keyboard.hwdb | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index b497f92..d4d948d 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -1031,6 +1031,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:pvr* + KEYBOARD_KEY_a9=switchvideomode # switch display outputs + KEYBOARD_KEY_d4=wlan # RF Switch Off + ++# Satellite U940 ++keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEU940:pvr* ++ KEYBOARD_KEY_13c=brightnessdown ++ KEYBOARD_KEY_13d=brightnessup ++ KEYBOARD_KEY_13e=switchvideomode ++ KEYBOARD_KEY_13f=f21 # Touchpad toggle ++ + ########################################################### + # VIA + ########################################################### diff --git a/SOURCES/0108-calendar-support-yearly-and-annually-names-the-same-.patch b/SOURCES/0108-calendar-support-yearly-and-annually-names-the-same-.patch new file mode 100644 index 0000000..7ed6206 --- /dev/null +++ b/SOURCES/0108-calendar-support-yearly-and-annually-names-the-same-.patch @@ -0,0 +1,38 @@ +From 9e4b36ca509cdcb39afaa9fc7a0f1901b8855647 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 19 Nov 2013 01:13:42 +0100 +Subject: [PATCH] calendar: support 'yearly' and 'annually' names the same way + as cron + +--- + src/shared/calendarspec.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c +index 7979e23..7075159 100644 +--- a/src/shared/calendarspec.c ++++ b/src/shared/calendarspec.c +@@ -686,6 +686,23 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) { + if (r < 0) + goto fail; + ++ } else if (strcaseeq(p, "anually") || strcaseeq(p, "yearly")) { ++ r = const_chain(1, &c->month); ++ if (r < 0) ++ goto fail; ++ r = const_chain(1, &c->day); ++ if (r < 0) ++ goto fail; ++ r = const_chain(0, &c->hour); ++ if (r < 0) ++ goto fail; ++ r = const_chain(0, &c->minute); ++ if (r < 0) ++ goto fail; ++ r = const_chain(0, &c->second); ++ if (r < 0) ++ goto fail; ++ + } else if (strcaseeq(p, "weekly")) { + + c->weekdays_bits = 1; diff --git a/SOURCES/0109-hashmap-be-a-bit-more-conservative-with-pre-allocati.patch b/SOURCES/0109-hashmap-be-a-bit-more-conservative-with-pre-allocati.patch new file mode 100644 index 0000000..49110a5 --- /dev/null +++ b/SOURCES/0109-hashmap-be-a-bit-more-conservative-with-pre-allocati.patch @@ -0,0 +1,57 @@ +From 79d427226ea91530362d41e778e1064a396aad09 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 19 Nov 2013 21:02:59 +0100 +Subject: [PATCH] hashmap: be a bit more conservative with pre-allocating hash + tables and items + +--- + src/shared/hashmap.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c +index f06fce6..8f5957b 100644 +--- a/src/shared/hashmap.c ++++ b/src/shared/hashmap.c +@@ -66,13 +66,14 @@ static void *first_hashmap_tile = NULL; + static struct pool *first_entry_pool = NULL; + static void *first_entry_tile = NULL; + +-static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t tile_size) { ++static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t tile_size, unsigned at_least) { + unsigned i; + + /* When a tile is released we add it to the list and simply + * place the next pointer at its offset 0. */ + + assert(tile_size >= sizeof(void*)); ++ assert(at_least > 0); + + if (*first_tile) { + void *r; +@@ -88,7 +89,7 @@ static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t t + struct pool *p; + + n = *first_pool ? (*first_pool)->n_tiles : 0; +- n = MAX(512U, n * 2); ++ n = MAX(at_least, n * 2); + size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*tile_size); + n = (size - ALIGN(sizeof(struct pool))) / tile_size; + +@@ -191,7 +192,7 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { + size = ALIGN(sizeof(Hashmap)) + INITIAL_N_BUCKETS * sizeof(struct hashmap_entry*); + + if (b) { +- h = allocate_tile(&first_hashmap_pool, &first_hashmap_tile, size); ++ h = allocate_tile(&first_hashmap_pool, &first_hashmap_tile, size, 8); + if (!h) + return NULL; + +@@ -476,7 +477,7 @@ int hashmap_put(Hashmap *h, const void *key, void *value) { + hash = bucket_hash(h, key); + + if (h->from_pool) +- e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry)); ++ e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry), 64U); + else + e = new(struct hashmap_entry, 1); + diff --git a/SOURCES/0110-manager-don-t-do-plymouth-in-a-container.patch b/SOURCES/0110-manager-don-t-do-plymouth-in-a-container.patch new file mode 100644 index 0000000..e2393a2 --- /dev/null +++ b/SOURCES/0110-manager-don-t-do-plymouth-in-a-container.patch @@ -0,0 +1,26 @@ +From d4b53c89833bf8dc934eee8a19bd3b112135fe71 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 20 Nov 2013 03:44:11 +0100 +Subject: [PATCH] manager: don't do plymouth in a container + +Given that plymouth listens on an abstract namespace socket and if +CLONE_NEWNET is not used the abstract namespace is shared with the host +we might actually end up send plymouth data to the host. +--- + src/core/manager.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/manager.c b/src/core/manager.c +index ce32baf..944c196 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1966,6 +1966,9 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) { + if (m->running_as != SYSTEMD_SYSTEM) + return; + ++ if (detect_container(NULL) > 0) ++ return; ++ + if (u->type != UNIT_SERVICE && + u->type != UNIT_MOUNT && + u->type != UNIT_SWAP) diff --git a/SOURCES/0111-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/SOURCES/0111-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 0000000..4ebe150 --- /dev/null +++ b/SOURCES/0111-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,327 @@ +From 9151c0ff148c20cdeb6e9fbc5909d56133718780 Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Sat, 21 Sep 2013 11:45:05 -0700 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 209 +++++++++++++++++++++++++++++++--- + 1 file changed, 193 insertions(+), 16 deletions(-) + +diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb +index c8cb322..faecf42 100644 +--- a/hwdb/20-bluetooth-vendor-product.hwdb ++++ b/hwdb/20-bluetooth-vendor-product.hwdb +@@ -46,7 +46,7 @@ bluetooth:v000D* + ID_VENDOR_FROM_DATABASE=Texas Instruments Inc. + + bluetooth:v000E* +- ID_VENDOR_FROM_DATABASE=Ceva, Inc. (formerly Parthus Technologies Inc.) ++ ID_VENDOR_FROM_DATABASE=Ceva, Inc. (formerly Parthus Technologies, Inc.) + + bluetooth:v000F* + ID_VENDOR_FROM_DATABASE=Broadcom Corporation +@@ -55,7 +55,7 @@ bluetooth:v0010* + ID_VENDOR_FROM_DATABASE=Mitel Semiconductor + + bluetooth:v0011* +- ID_VENDOR_FROM_DATABASE=Widcomm, Inc. ++ ID_VENDOR_FROM_DATABASE=Widcomm, Inc + + bluetooth:v0012* + ID_VENDOR_FROM_DATABASE=Zeevo, Inc. +@@ -73,13 +73,13 @@ bluetooth:v0016* + ID_VENDOR_FROM_DATABASE=KC Technology Inc. + + bluetooth:v0017* +- ID_VENDOR_FROM_DATABASE=Newlogic ++ ID_VENDOR_FROM_DATABASE=NewLogic + + bluetooth:v0018* + ID_VENDOR_FROM_DATABASE=Transilica, Inc. + + bluetooth:v0019* +- ID_VENDOR_FROM_DATABASE=Rohde & Schwartz GmbH & Co. KG ++ ID_VENDOR_FROM_DATABASE=Rohde & Schwarz GmbH & Co. KG + + bluetooth:v001A* + ID_VENDOR_FROM_DATABASE=TTPCom Limited +@@ -151,7 +151,7 @@ bluetooth:v0030* + ID_VENDOR_FROM_DATABASE=ST Microelectronics + + bluetooth:v0031* +- ID_VENDOR_FROM_DATABASE=Synopsys ++ ID_VENDOR_FROM_DATABASE=Synopsis + + bluetooth:v0032* + ID_VENDOR_FROM_DATABASE=Red-M (Communications) Ltd +@@ -190,16 +190,16 @@ bluetooth:v003D* + ID_VENDOR_FROM_DATABASE=IPextreme, Inc. + + bluetooth:v003E* +- ID_VENDOR_FROM_DATABASE=Systems and Chips, Inc ++ ID_VENDOR_FROM_DATABASE=Systems and Chips, Inc. + + bluetooth:v003F* +- ID_VENDOR_FROM_DATABASE=Bluetooth SIG, Inc ++ ID_VENDOR_FROM_DATABASE=Bluetooth SIG, Inc. + + bluetooth:v0040* + ID_VENDOR_FROM_DATABASE=Seiko Epson Corporation + + bluetooth:v0041* +- ID_VENDOR_FROM_DATABASE=Integrated Silicon Solution Taiwain, Inc. ++ ID_VENDOR_FROM_DATABASE=Integrated Silicon Solution Taiwan, Inc. + + bluetooth:v0042* + ID_VENDOR_FROM_DATABASE=CONWISE Technology Corporation Ltd +@@ -244,7 +244,7 @@ bluetooth:v004F* + ID_VENDOR_FROM_DATABASE=APT Licensing Ltd. + + bluetooth:v0050* +- ID_VENDOR_FROM_DATABASE=SiRF Technology, Inc. ++ ID_VENDOR_FROM_DATABASE=SiRF Technology + + bluetooth:v0051* + ID_VENDOR_FROM_DATABASE=Tzero Technologies, Inc. +@@ -379,7 +379,7 @@ bluetooth:v007C* + ID_VENDOR_FROM_DATABASE=A & R Cambridge + + bluetooth:v007D* +- ID_VENDOR_FROM_DATABASE=Seers Technology Co. Ltd. ++ ID_VENDOR_FROM_DATABASE=Seers Technology Co. Ltd + + bluetooth:v007E* + ID_VENDOR_FROM_DATABASE=Sports Tracking Technologies Ltd. +@@ -406,7 +406,7 @@ bluetooth:v0085* + ID_VENDOR_FROM_DATABASE=BlueRadios, Inc. + + bluetooth:v0086* +- ID_VENDOR_FROM_DATABASE=equinux AG ++ ID_VENDOR_FROM_DATABASE=equinox AG + + bluetooth:v0087* + ID_VENDOR_FROM_DATABASE=Garmin International, Inc. +@@ -421,7 +421,7 @@ bluetooth:v008A* + ID_VENDOR_FROM_DATABASE=Jawbone + + bluetooth:v008B* +- ID_VENDOR_FROM_DATABASE=Topcon Positioning Systems, LLC ++ ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC + + bluetooth:v008C* + ID_VENDOR_FROM_DATABASE=Qualcomm Labs, Inc. +@@ -433,13 +433,13 @@ bluetooth:v008E* + ID_VENDOR_FROM_DATABASE=Quintic Corp. + + bluetooth:v008F* +- ID_VENDOR_FROM_DATABASE=Stollmann E+V GmbH ++ ID_VENDOR_FROM_DATABASE=Stollman E+V GmbH + + bluetooth:v0090* + ID_VENDOR_FROM_DATABASE=Funai Electric Co., Ltd. + + bluetooth:v0091* +- ID_VENDOR_FROM_DATABASE=Advanced PANMOBIL systems GmbH & Co. KG ++ ID_VENDOR_FROM_DATABASE=Advanced PANMOBIL Systems GmbH & Co. KG + + bluetooth:v0092* + ID_VENDOR_FROM_DATABASE=ThinkOptics, Inc. +@@ -460,7 +460,7 @@ bluetooth:v0097* + ID_VENDOR_FROM_DATABASE=Bluetrek Technologies Limited + + bluetooth:v0098* +- ID_VENDOR_FROM_DATABASE=zero1.tv GmbH ++ ID_VENDOR_FROM_DATABASE=zer01.tv GmbH + + bluetooth:v0099* + ID_VENDOR_FROM_DATABASE=i.Tech Dynamic Global Distribution Ltd. +@@ -511,7 +511,7 @@ bluetooth:v00A8* + ID_VENDOR_FROM_DATABASE=ARP Devices Limited + + bluetooth:v00A9* +- ID_VENDOR_FROM_DATABASE=Magneti Marelli S.p.A. ++ ID_VENDOR_FROM_DATABASE=Magneti Marelli S.p.A + + bluetooth:v00AA* + ID_VENDOR_FROM_DATABASE=CAEN RFID srl +@@ -539,3 +539,180 @@ bluetooth:v00B1* + + bluetooth:v00B2* + ID_VENDOR_FROM_DATABASE=Bekey A/S ++ ++bluetooth:v00B3* ++ ID_VENDOR_FROM_DATABASE=Clarinox Technologies Pty. Ltd. ++ ++bluetooth:v00B4* ++ ID_VENDOR_FROM_DATABASE=BDE Technology Co., Ltd. ++ ++bluetooth:v00B5* ++ ID_VENDOR_FROM_DATABASE=Swirl Networks ++ ++bluetooth:v00B6* ++ ID_VENDOR_FROM_DATABASE=Meso international ++ ++bluetooth:v00B7* ++ ID_VENDOR_FROM_DATABASE=TreLab Ltd ++ ++bluetooth:v00B8* ++ ID_VENDOR_FROM_DATABASE=Qualcomm Innovation Center, Inc. (QuIC) ++ ++bluetooth:v00B9* ++ ID_VENDOR_FROM_DATABASE=Johnson Controls, Inc. ++ ++bluetooth:v00BA* ++ ID_VENDOR_FROM_DATABASE=Starkey Laboratories Inc. ++ ++bluetooth:v00BB* ++ ID_VENDOR_FROM_DATABASE=S-Power Electronics Limited ++ ++bluetooth:v00BC* ++ ID_VENDOR_FROM_DATABASE=Ace Sensor Inc ++ ++bluetooth:v00BD* ++ ID_VENDOR_FROM_DATABASE=Aplix Corporation ++ ++bluetooth:v00BE* ++ ID_VENDOR_FROM_DATABASE=AAMP of America ++ ++bluetooth:v00BF* ++ ID_VENDOR_FROM_DATABASE=Stalmart Technology Limited ++ ++bluetooth:v00C0* ++ ID_VENDOR_FROM_DATABASE=AMICCOM Electronics Corporation ++ ++bluetooth:v00C1* ++ ID_VENDOR_FROM_DATABASE=Shenzhen Excelsecu Data Technology Co.,Ltd ++ ++bluetooth:v00C2* ++ ID_VENDOR_FROM_DATABASE=Geneq Inc. ++ ++bluetooth:v00C3* ++ ID_VENDOR_FROM_DATABASE=adidas AG ++ ++bluetooth:v00C4* ++ ID_VENDOR_FROM_DATABASE=LG Electronics ++ ++bluetooth:v00C5* ++ ID_VENDOR_FROM_DATABASE=Onset Computer Corporation ++ ++bluetooth:v00C6* ++ ID_VENDOR_FROM_DATABASE=Selfly BV ++ ++bluetooth:v00C7* ++ ID_VENDOR_FROM_DATABASE=Quuppa Oy. ++ ++bluetooth:v00C8* ++ ID_VENDOR_FROM_DATABASE=GeLo Inc ++ ++bluetooth:v00C9* ++ ID_VENDOR_FROM_DATABASE=Evluma ++ ++bluetooth:v00CA* ++ ID_VENDOR_FROM_DATABASE=MC10 ++ ++bluetooth:v00CB* ++ ID_VENDOR_FROM_DATABASE=Binauric SE ++ ++bluetooth:v00CC* ++ ID_VENDOR_FROM_DATABASE=Beats Electronics ++ ++bluetooth:v00CD* ++ ID_VENDOR_FROM_DATABASE=Microchip Technology Inc. ++ ++bluetooth:v00CE* ++ ID_VENDOR_FROM_DATABASE=Elgato Systems GmbH ++ ++bluetooth:v00CF* ++ ID_VENDOR_FROM_DATABASE=ARCHOS SA ++ ++bluetooth:v00D1* ++ ID_VENDOR_FROM_DATABASE=Polar Electro Europe B.V. ++ ++bluetooth:v00D2* ++ ID_VENDOR_FROM_DATABASE=Dialog Semiconductor B.V. ++ ++bluetooth:v00D3* ++ ID_VENDOR_FROM_DATABASE=Taixingbang Technology (HK) Co,. LTD. ++ ++bluetooth:v00D4* ++ ID_VENDOR_FROM_DATABASE=Kawantech ++ ++bluetooth:v00D5* ++ ID_VENDOR_FROM_DATABASE=Austco Communication Systems ++ ++bluetooth:v00D6* ++ ID_VENDOR_FROM_DATABASE=Timex Group USA, Inc. ++ ++bluetooth:v00D7* ++ ID_VENDOR_FROM_DATABASE=Qualcomm Technologies, Inc. ++ ++bluetooth:v00D8* ++ ID_VENDOR_FROM_DATABASE=Qualcomm Connected Experiences, Inc. ++ ++bluetooth:v00D9* ++ ID_VENDOR_FROM_DATABASE=Voyetra Turtle Beach ++ ++bluetooth:v00DA* ++ ID_VENDOR_FROM_DATABASE=txtr GmbH ++ ++bluetooth:v00DB* ++ ID_VENDOR_FROM_DATABASE=Biosentronics ++ ++bluetooth:v00DC* ++ ID_VENDOR_FROM_DATABASE=Procter & Gamble ++ ++bluetooth:v00DD* ++ ID_VENDOR_FROM_DATABASE=Hosiden Corporation ++ ++bluetooth:v00DE* ++ ID_VENDOR_FROM_DATABASE=Muzik LLC ++ ++bluetooth:v00DF* ++ ID_VENDOR_FROM_DATABASE=Misfit Wearables Corp ++ ++bluetooth:v00E0* ++ ID_VENDOR_FROM_DATABASE=Google ++ ++bluetooth:v00E1* ++ ID_VENDOR_FROM_DATABASE=Danlers Ltd ++ ++bluetooth:v00E2* ++ ID_VENDOR_FROM_DATABASE=Semilink Inc ++ ++bluetooth:v00E3* ++ ID_VENDOR_FROM_DATABASE=inMusic Brands, Inc ++ ++bluetooth:v00E4* ++ ID_VENDOR_FROM_DATABASE=L.S. Research Inc. ++ ++bluetooth:v00E5* ++ ID_VENDOR_FROM_DATABASE=Eden Software Consultants Ltd. ++ ++bluetooth:v00E6* ++ ID_VENDOR_FROM_DATABASE=Freshtemp ++ ++bluetooth:v00E7* ++ ID_VENDOR_FROM_DATABASE=KS Technologies ++ ++bluetooth:v00E8* ++ ID_VENDOR_FROM_DATABASE=ACTS Technologies ++ ++bluetooth:v00E9* ++ ID_VENDOR_FROM_DATABASE=Vtrack Systems ++ ++bluetooth:v00EA* ++ ID_VENDOR_FROM_DATABASE=Nielsen-Kellerman Company ++ ++bluetooth:v00EB* ++ ID_VENDOR_FROM_DATABASE=Server Technology, Inc. ++ ++bluetooth:v00EC* ++ ID_VENDOR_FROM_DATABASE=BioResearch Associates ++ ++bluetooth:v00ED* ++ ID_VENDOR_FROM_DATABASE=Jolly Logic, LLC ++ ++bluetooth:v00EE* ++ ID_VENDOR_FROM_DATABASE=Above Average Outcomes, Inc. diff --git a/SOURCES/0112-automount-log-info-about-triggering-process.patch b/SOURCES/0112-automount-log-info-about-triggering-process.patch new file mode 100644 index 0000000..08de3c9 --- /dev/null +++ b/SOURCES/0112-automount-log-info-about-triggering-process.patch @@ -0,0 +1,26 @@ +From 46405e5b293eeb66eb10e79f824a51cbaf5147ab Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 28 Nov 2013 01:25:10 +0100 +Subject: [PATCH] automount: log info about triggering process + +Conflicts: + src/core/automount.c +--- + src/core/automount.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/core/automount.c b/src/core/automount.c +index d1379e0..203104e 100644 +--- a/src/core/automount.c ++++ b/src/core/automount.c +@@ -776,8 +776,8 @@ static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) { + _cleanup_free_ char *p = NULL; + + get_process_comm(packet.v5_packet.pid, &p); +- log_debug_unit(u->id, +- "Got direct mount request on %s, triggered by %lu (%s)", ++ log_info_unit(u->id, ++ "Got automount request for %s, triggered by %lu (%s)", + a->where, (unsigned long) packet.v5_packet.pid, strna(p)); + } else + log_debug_unit(u->id, "Got direct mount request on %s", a->where); diff --git a/SOURCES/0113-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/SOURCES/0113-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 0000000..0d0176a --- /dev/null +++ b/SOURCES/0113-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,147 @@ +From 99e5a2d023c6651d76f5a5d36fa8b0400dd3720a Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Fri, 29 Nov 2013 07:26:47 -0800 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 109 +++++++++++++++++++++++++++++++++- + 1 file changed, 107 insertions(+), 2 deletions(-) + +diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb +index faecf42..dcc25bb 100644 +--- a/hwdb/20-bluetooth-vendor-product.hwdb ++++ b/hwdb/20-bluetooth-vendor-product.hwdb +@@ -366,6 +366,9 @@ bluetooth:v0077* + bluetooth:v0078* + ID_VENDOR_FROM_DATABASE=Nike, Inc. + ++bluetooth:v0078p0001* ++ ID_PRODUCT_FROM_DATABASE=Nike+ FuelBand ++ + bluetooth:v0079* + ID_VENDOR_FROM_DATABASE=lesswire AG + +@@ -457,7 +460,7 @@ bluetooth:v0096* + ID_VENDOR_FROM_DATABASE=ODM Technology, Inc. + + bluetooth:v0097* +- ID_VENDOR_FROM_DATABASE=Bluetrek Technologies Limited ++ ID_VENDOR_FROM_DATABASE=ConnecteDevice Ltd. + + bluetooth:v0098* + ID_VENDOR_FROM_DATABASE=zer01.tv GmbH +@@ -634,7 +637,7 @@ bluetooth:v00D2* + ID_VENDOR_FROM_DATABASE=Dialog Semiconductor B.V. + + bluetooth:v00D3* +- ID_VENDOR_FROM_DATABASE=Taixingbang Technology (HK) Co,. LTD. ++ ID_VENDOR_FROM_DATABASE=Taixingbang Technology (HK) Co,. LTD. + + bluetooth:v00D4* + ID_VENDOR_FROM_DATABASE=Kawantech +@@ -716,3 +719,105 @@ bluetooth:v00ED* + + bluetooth:v00EE* + ID_VENDOR_FROM_DATABASE=Above Average Outcomes, Inc. ++ ++bluetooth:v00EF* ++ ID_VENDOR_FROM_DATABASE=Bitsplitters GmbH ++ ++bluetooth:v00F0* ++ ID_VENDOR_FROM_DATABASE=PayPal, Inc. ++ ++bluetooth:v00F1* ++ ID_VENDOR_FROM_DATABASE=Witron Technology Limited ++ ++bluetooth:v00F2* ++ ID_VENDOR_FROM_DATABASE=Morse Project Inc. ++ ++bluetooth:v00F3* ++ ID_VENDOR_FROM_DATABASE=Kent Displays Inc. ++ ++bluetooth:v00F4* ++ ID_VENDOR_FROM_DATABASE=Nautilus Inc. ++ ++bluetooth:v00F5* ++ ID_VENDOR_FROM_DATABASE=Smartifier Oy ++ ++bluetooth:v00F6* ++ ID_VENDOR_FROM_DATABASE=Elcometer Limited ++ ++bluetooth:v00F7* ++ ID_VENDOR_FROM_DATABASE=VSN Technologies Inc. ++ ++bluetooth:v00F8* ++ ID_VENDOR_FROM_DATABASE=AceUni Corp., Ltd. ++ ++bluetooth:v00F9* ++ ID_VENDOR_FROM_DATABASE=StickNFind ++ ++bluetooth:v00FA* ++ ID_VENDOR_FROM_DATABASE=Crystal Code AB ++ ++bluetooth:v00FB* ++ ID_VENDOR_FROM_DATABASE=KOUKAAM a.s. ++ ++bluetooth:v00FC* ++ ID_VENDOR_FROM_DATABASE=Delphi Corporation ++ ++bluetooth:v00FD* ++ ID_VENDOR_FROM_DATABASE=ValenceTech Limited ++ ++bluetooth:v00FE* ++ ID_VENDOR_FROM_DATABASE=Reserved ++ ++bluetooth:v00FF* ++ ID_VENDOR_FROM_DATABASE=Typo Products, LLC ++ ++bluetooth:v0100* ++ ID_VENDOR_FROM_DATABASE=TomTom International BV ++ ++bluetooth:v0101* ++ ID_VENDOR_FROM_DATABASE=Fugoo, Inc ++ ++bluetooth:v0102* ++ ID_VENDOR_FROM_DATABASE=Keiser Corporation ++ ++bluetooth:v0103* ++ ID_VENDOR_FROM_DATABASE=Bang & Olufsen A/S ++ ++bluetooth:v0104* ++ ID_VENDOR_FROM_DATABASE=PLUS Locations Systems Pty Ltd ++ ++bluetooth:v0105* ++ ID_VENDOR_FROM_DATABASE=Ubiquitous Computing Technology Corporation ++ ++bluetooth:v0106* ++ ID_VENDOR_FROM_DATABASE=Innovative Yachtter Solutions ++ ++bluetooth:v0107* ++ ID_VENDOR_FROM_DATABASE=William Demant Holding A/S ++ ++bluetooth:v0108* ++ ID_VENDOR_FROM_DATABASE=Chicony Electronics Co., Ltd. ++ ++bluetooth:v0109* ++ ID_VENDOR_FROM_DATABASE=Atus BV ++ ++bluetooth:v010A* ++ ID_VENDOR_FROM_DATABASE=Codegate Ltd. ++ ++bluetooth:v010B* ++ ID_VENDOR_FROM_DATABASE=ERi, Inc. ++ ++bluetooth:v010C* ++ ID_VENDOR_FROM_DATABASE=Transducers Direct, LLC ++ ++bluetooth:v010D* ++ ID_VENDOR_FROM_DATABASE=Fujitsu Ten Limited ++ ++bluetooth:v010E* ++ ID_VENDOR_FROM_DATABASE=Audi AG ++ ++bluetooth:v010F* ++ ID_VENDOR_FROM_DATABASE=HiSilicon Technologies Co., Ltd. ++ ++bluetooth:v0110* ++ ID_VENDOR_FROM_DATABASE=Nippon Seiki Co., Ltd. diff --git a/SOURCES/0114-journal-fail-silently-in-sd_j_sendv-if-journal-is-un.patch b/SOURCES/0114-journal-fail-silently-in-sd_j_sendv-if-journal-is-un.patch new file mode 100644 index 0000000..a164ad5 --- /dev/null +++ b/SOURCES/0114-journal-fail-silently-in-sd_j_sendv-if-journal-is-un.patch @@ -0,0 +1,34 @@ +From d57b2e82e42d68555c92da2b19e07dbfdd74ab12 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 3 Dec 2013 08:07:32 -0500 +Subject: [PATCH] journal: fail silently in sd_j_sendv() if journal is + unavailable + +"syslog(3) and sd_journal_print() may largely be used interchangeably +functionality-wise" according to sd_journal_print(3). This socket +should be always available except in rare circumstatances, and we +don't random applications to fail on logging, so let's do what syslog +did. The alternative of forcing all callers to do error handling for +this rare case doesn't really have any benefits, since if they can't +log there isn't much they can do anyway. + +https://bugzilla.redhat.com/show_bug.cgi?id=1023041 +--- + src/journal/journal-send.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +index d00e26f..d99ff0c 100644 +--- a/src/journal/journal-send.c ++++ b/src/journal/journal-send.c +@@ -305,6 +305,10 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) { + if (k >= 0) + return 0; + ++ /* Fail silently if the journal is not available */ ++ if (errno == ENOENT) ++ return 0; ++ + if (errno != EMSGSIZE && errno != ENOBUFS) + return -errno; + diff --git a/SOURCES/0115-Fix-memory-leak-in-stdout-journal-streams.patch b/SOURCES/0115-Fix-memory-leak-in-stdout-journal-streams.patch new file mode 100644 index 0000000..186952d --- /dev/null +++ b/SOURCES/0115-Fix-memory-leak-in-stdout-journal-streams.patch @@ -0,0 +1,23 @@ +From ac67da03ebc56ab45b3fbb166fe961cb753d2777 Mon Sep 17 00:00:00 2001 +From: Dan McGee +Date: Sun, 8 Dec 2013 14:33:45 -0600 +Subject: [PATCH] Fix memory leak in stdout journal streams + +Just as 'identifier' is strdup-ed and freed, we need to do the same for +unit_id. +--- + src/journal/journald-stream.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c +index 9c4efec..4080622 100644 +--- a/src/journal/journald-stream.c ++++ b/src/journal/journald-stream.c +@@ -339,6 +339,7 @@ void stdout_stream_free(StdoutStream *s) { + #endif + + free(s->identifier); ++ free(s->unit_id); + free(s); + } + diff --git a/SOURCES/0116-man-document-is-enabled-output.patch b/SOURCES/0116-man-document-is-enabled-output.patch new file mode 100644 index 0000000..f4c79d8 --- /dev/null +++ b/SOURCES/0116-man-document-is-enabled-output.patch @@ -0,0 +1,92 @@ +From ce006689117c3226ddb0eb5a1f8e5963cab1c92a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 8 Dec 2013 18:56:16 -0500 +Subject: [PATCH] man: document 'is-enabled' output + +https://bugzilla.redhat.com/show_bug.cgi?id=953077 +--- + man/systemctl.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 59 insertions(+), 5 deletions(-) + +diff --git a/man/systemctl.xml b/man/systemctl.xml +index 166282c..b4bc15d 100644 +--- a/man/systemctl.xml ++++ b/man/systemctl.xml +@@ -437,7 +437,7 @@ systemctl start foo + + + When used with enable, +- disable, is-enabled ++ disable, + (and related commands), make changes only temporarily, so + that they are lost on the next reboot. This will have the + effect that changes are not made in subdirectories of +@@ -885,10 +885,64 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service + + + Checks whether any of the specified unit files are +- enabled (as with enable). Returns an exit +- code of 0 if at least one is enabled, non-zero +- otherwise. Prints the current enable status. To suppress +- this output, use . ++ enabled (as with enable). Returns an ++ exit code of 0 if at least one is enabled, non-zero ++ otherwise. Prints the current enable status (see table). ++ To suppress this output, use . ++ ++ ++ ++ ++ <command>is-enabled</command> output ++ ++ ++ ++ ++ ++ Printed string ++ Meaning ++ Return value ++ ++ ++ ++ ++ enabled ++ Enabled through a symlink in .wants directory (permanently or just in /run) ++ 0 ++ ++ ++ enabled-runtime ++ ++ ++ linked ++ Made available through a symlink to the unit file (permanently or just in /run) ++ 1 ++ ++ ++ linked-runtime ++ ++ ++ masked ++ Disabled entirely (permanently or just in /run) ++ 1 ++ ++ ++ masked-runtime ++ ++ ++ static ++ Unit is not enabled, but has no provisions for enabling in [Install] section ++ 1 ++ ++ ++ disabled ++ Unit is not enabled ++ 1 ++ ++ ++ ++
++ +
+ + diff --git a/SOURCES/0117-hostnamed-avoid-using-NULL-in-error-path.patch b/SOURCES/0117-hostnamed-avoid-using-NULL-in-error-path.patch new file mode 100644 index 0000000..0833384 --- /dev/null +++ b/SOURCES/0117-hostnamed-avoid-using-NULL-in-error-path.patch @@ -0,0 +1,32 @@ +From 7722552d5eade35dbb6c433e82774fcd2e157232 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 6 Jan 2014 12:16:55 +0000 +Subject: [PATCH] hostnamed: avoid using NULL in error path + +https://bugzilla.redhat.com/show_bug.cgi?id=1047335 +--- + src/hostname/hostnamed.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c +index 6a43aeb..0c24b65 100644 +--- a/src/hostname/hostnamed.c ++++ b/src/hostname/hostnamed.c +@@ -637,7 +637,7 @@ static int connect_bus(DBusConnection **_bus) { + if (!bus) { + log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error)); + r = -ECONNREFUSED; +- goto fail; ++ goto fail2; + } + + dbus_connection_set_exit_on_disconnect(bus, FALSE); +@@ -669,7 +669,7 @@ static int connect_bus(DBusConnection **_bus) { + fail: + dbus_connection_close(bus); + dbus_connection_unref(bus); +- ++fail2: + dbus_error_free(&error); + + return r; diff --git a/SOURCES/0118-core-do-not-segfault-if-swap-activity-happens-when-p.patch b/SOURCES/0118-core-do-not-segfault-if-swap-activity-happens-when-p.patch new file mode 100644 index 0000000..2e0f1ad --- /dev/null +++ b/SOURCES/0118-core-do-not-segfault-if-swap-activity-happens-when-p.patch @@ -0,0 +1,87 @@ +From 80b37e95f732ab5de22fda0d8d14c7d58ac29877 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 12 Jan 2014 11:38:56 -0500 +Subject: [PATCH] core: do not segfault if swap activity happens when + /proc/swaps is not open + +In https://bugzilla.redhat.com/show_bug.cgi?id=969795 systemd crashes +in swap_dispatch_reload called from manager_loop becuase m->proc_swaps +is NULL. It can legitimately be NULL if something went wrong when +initially enumerating swap devices when starting the manager. This +is probably a sign of significant trouble, but let's do our best +to recover. +--- + src/core/swap.c | 45 +++++++++++++++++++++++++++++---------------- + 1 file changed, 29 insertions(+), 16 deletions(-) + +diff --git a/src/core/swap.c b/src/core/swap.c +index 147f710..f295b65 100644 +--- a/src/core/swap.c ++++ b/src/core/swap.c +@@ -1068,14 +1068,40 @@ static int swap_load_proc_swaps(Manager *m, bool set_flags) { + return r; + } + ++static int open_proc_swaps(Manager *m) { ++ if (!m->proc_swaps) { ++ struct epoll_event ev = { ++ .events = EPOLLPRI, ++ .data.ptr = &m->swap_watch, ++ }; ++ ++ m->proc_swaps = fopen("/proc/swaps", "re"); ++ if (!m->proc_swaps) ++ return (errno == ENOENT) ? 0 : -errno; ++ ++ m->swap_watch.type = WATCH_SWAP; ++ m->swap_watch.fd = fileno(m->proc_swaps); ++ ++ if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->swap_watch.fd, &ev) < 0) ++ return -errno; ++ } ++ ++ return 0; ++} ++ + int swap_dispatch_reload(Manager *m) { + /* This function should go as soon as the kernel properly notifies us */ ++ int r; + + if (_likely_(!m->request_reload)) + return 0; + + m->request_reload = false; + ++ r = open_proc_swaps(m); ++ if (r < 0) ++ return r; ++ + return swap_fd_event(m, EPOLLPRI); + } + +@@ -1225,22 +1251,9 @@ static int swap_enumerate(Manager *m) { + int r; + assert(m); + +- if (!m->proc_swaps) { +- struct epoll_event ev = { +- .events = EPOLLPRI, +- .data.ptr = &m->swap_watch, +- }; +- +- m->proc_swaps = fopen("/proc/swaps", "re"); +- if (!m->proc_swaps) +- return (errno == ENOENT) ? 0 : -errno; +- +- m->swap_watch.type = WATCH_SWAP; +- m->swap_watch.fd = fileno(m->proc_swaps); +- +- if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->swap_watch.fd, &ev) < 0) +- return -errno; +- } ++ r = open_proc_swaps(m); ++ if (r < 0) ++ return r; + + r = swap_load_proc_swaps(m, false); + if (r < 0) diff --git a/SOURCES/0119-kernel-install-add-h-help.patch b/SOURCES/0119-kernel-install-add-h-help.patch new file mode 100644 index 0000000..43f033b --- /dev/null +++ b/SOURCES/0119-kernel-install-add-h-help.patch @@ -0,0 +1,69 @@ +From ced01b28f5e44cc708ae7af681919e4dc83da169 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 8 Dec 2013 07:46:46 -0500 +Subject: [PATCH] kernel-install: add -h/--help + +--- + src/kernel-install/kernel-install | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install +index 9d3e75d..f5ff362 100644 +--- a/src/kernel-install/kernel-install ++++ b/src/kernel-install/kernel-install +@@ -21,9 +21,9 @@ + + usage() + { +- echo "Usage:" >&2 +- echo " $0 add " >&2 +- echo " $0 remove " >&2 ++ echo "Usage:" ++ echo " $0 add KERNEL-VERSION KERNEL-IMAGE" ++ echo " $0 remove KERNEL-VERSION KERNEL-IMAGE" + } + + dropindirs_sort() +@@ -54,6 +54,13 @@ dropindirs_sort() + + export LC_COLLATE=C + ++for i in "$@"; do ++ if [ "$i" == "--help" -o "$i" == "-h" ]; then ++ usage ++ exit 0 ++ fi ++done ++ + if [[ "${0##*/}" == 'installkernel' ]]; then + COMMAND='add' + else +@@ -75,7 +82,7 @@ if ! [[ $MACHINE_ID ]]; then + fi + + if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then +- usage ++ echo "Not enough arguments" >&2 + exit 1 + fi + +@@ -90,8 +97,8 @@ readarray -t PLUGINS < <( + + case $COMMAND in + add) +- if [[ ! $KERNEL_IMAGE ]]; then +- usage ++ if [[ ! "$KERNEL_IMAGE" ]]; then ++ echo "Command 'add' requires an argument" >&2 + exit 1 + fi + +@@ -121,7 +128,7 @@ case $COMMAND in + ;; + + *) +- usage ++ echo "Unknown command '$COMMAND'" >&2 + exit 1 + ;; + esac diff --git a/SOURCES/0120-kernel-install-fix-help-output.patch b/SOURCES/0120-kernel-install-fix-help-output.patch new file mode 100644 index 0000000..5fb2323 --- /dev/null +++ b/SOURCES/0120-kernel-install-fix-help-output.patch @@ -0,0 +1,25 @@ +From 13279ea569e963ac8cd7062a33108c209b9e2308 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= +Date: Thu, 5 Dec 2013 02:55:05 +0100 +Subject: [PATCH] kernel-install: fix help output + +Kernel install doesn't need the second argument on his command line when +removing. +This is correctly documented in the man page. +--- + src/kernel-install/kernel-install | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install +index f5ff362..3ae1d77 100644 +--- a/src/kernel-install/kernel-install ++++ b/src/kernel-install/kernel-install +@@ -23,7 +23,7 @@ usage() + { + echo "Usage:" + echo " $0 add KERNEL-VERSION KERNEL-IMAGE" +- echo " $0 remove KERNEL-VERSION KERNEL-IMAGE" ++ echo " $0 remove KERNEL-VERSION" + } + + dropindirs_sort() diff --git a/SOURCES/0121-man-improve-wording-and-comma-usage-in-systemd.journ.patch b/SOURCES/0121-man-improve-wording-and-comma-usage-in-systemd.journ.patch new file mode 100644 index 0000000..5eb475b --- /dev/null +++ b/SOURCES/0121-man-improve-wording-and-comma-usage-in-systemd.journ.patch @@ -0,0 +1,67 @@ +From 4984e8c420d3e091d5e42094bbf5e38721702dad Mon Sep 17 00:00:00 2001 +From: "Jason St. John" +Date: Tue, 10 Dec 2013 00:10:03 -0500 +Subject: [PATCH] man: improve wording and comma usage in + systemd.journal-fields(7) + +Improve wording under "Description" and "_KERNEL_DEVICE=" +--- + man/systemd.journal-fields.xml | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml +index 8a15598..bb89ed5 100644 +--- a/man/systemd.journal-fields.xml ++++ b/man/systemd.journal-fields.xml +@@ -51,14 +51,14 @@ + Description + + Entries in the journal resemble an environment +- block in their syntax, however with fields that can ++ block in their syntax but with fields that can + include binary data. Primarily, fields are formatted + UTF-8 text strings, and binary formatting is used only + where formatting as UTF-8 text strings makes little + sense. New fields may freely be defined by + applications, but a few fields have special + meaning. All fields with special meanings are +- optional. In some cases fields may appear more than ++ optional. In some cases, fields may appear more than + once per entry. +
+ +@@ -176,7 +176,7 @@ + _UID= + _GID= + +- The process, user and ++ The process, user, and + group ID of the process the + journal entry originates from + formatted as a decimal +@@ -190,7 +190,7 @@ + _CMDLINE= + + The name, the executable +- path and the command line of ++ path, and the command line of + the process the journal entry + originates from. + +@@ -389,12 +389,12 @@ + the major and minor of the + device node, separated by : + and prefixed by b. Similar +- for character devices, but ++ for character devices but + prefixed by c. For network +- devices the interface index, ++ devices, this is the interface index + prefixed by n. For all other +- devices + followed by the +- subsystem name, followed by ++ devices, this is the subsystem name ++ prefixed by +, followed by + :, followed by the kernel + device name. + diff --git a/SOURCES/0122-drop-several-entries-from-kbd-model-map-whose-kbd-la.patch b/SOURCES/0122-drop-several-entries-from-kbd-model-map-whose-kbd-la.patch new file mode 100644 index 0000000..1d3fb33 --- /dev/null +++ b/SOURCES/0122-drop-several-entries-from-kbd-model-map-whose-kbd-la.patch @@ -0,0 +1,84 @@ +From b39fc4c896dffbe14d14b17dab68961027194856 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Mon, 9 Dec 2013 21:58:34 -0800 +Subject: [PATCH] drop several entries from kbd-model-map whose kbd layouts do + not exist + +kbd-model-map was generated from system-config-keyboard's keyboard_models.py. +Several of the kbd layouts referred in that file do not exist and, so far as I +can tell, never did. I believe these entries existed simply to provide the xkb +configuration information for those layouts, and there never were matching kbd +entries; the kbd names were entirely notional, to satisfy the need for some +entry or other in that field. + +For systemd, the only function of kbd-model-map is to 'match' kbd and xkb +configurations, so it does not make any sense to maintain entries for cases +where only one or the other exists in this context. +--- + src/locale/kbd-model-map | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/src/locale/kbd-model-map b/src/locale/kbd-model-map +index 1fe9bca..78c7887 100644 +--- a/src/locale/kbd-model-map ++++ b/src/locale/kbd-model-map +@@ -4,22 +4,18 @@ sg ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp + nl nl pc105 - terminate:ctrl_alt_bksp + mk-utf mk,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + trq tr pc105 - terminate:ctrl_alt_bksp +-guj in,us pc105 guj terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + uk gb pc105 - terminate:ctrl_alt_bksp + is-latin1 is pc105 - terminate:ctrl_alt_bksp + de de pc105 - terminate:ctrl_alt_bksp +-gur gur,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + la-latin1 latam pc105 - terminate:ctrl_alt_bksp + us us pc105+inet - terminate:ctrl_alt_bksp + ko kr pc105 - terminate:ctrl_alt_bksp + ro-std ro pc105 std terminate:ctrl_alt_bksp + de-latin1 de pc105 - terminate:ctrl_alt_bksp +-tml-inscript in,us pc105 tam terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + slovene si pc105 - terminate:ctrl_alt_bksp + hu101 hu pc105 qwerty terminate:ctrl_alt_bksp + jp106 jp jp106 - terminate:ctrl_alt_bksp + croat hr pc105 - terminate:ctrl_alt_bksp +-ben-probhat in,us pc105 ben_probhat terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + fi-latin1 fi pc105 - terminate:ctrl_alt_bksp + it2 it pc105 - terminate:ctrl_alt_bksp + hu hu pc105 - terminate:ctrl_alt_bksp +@@ -29,7 +25,6 @@ fr_CH ch pc105 fr terminate:ctrl_alt_bksp + dk-latin1 dk pc105 - terminate:ctrl_alt_bksp + fr fr pc105 - terminate:ctrl_alt_bksp + it it pc105 - terminate:ctrl_alt_bksp +-tml-uni in,us pc105 tam_TAB terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + ua-utf ua,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + fr-latin1 fr pc105 - terminate:ctrl_alt_bksp + sg-latin1 ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp +@@ -39,16 +34,12 @@ fr-pc fr pc105 - terminate:ctrl_alt_bksp + bg_pho-utf8 bg,us pc105 ,phonetic terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + it-ibm it pc105 - terminate:ctrl_alt_bksp + cz-us-qwertz cz,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll +-ar-digits ara,us pc105 digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + br-abnt2 br abnt2 - terminate:ctrl_alt_bksp + ro ro pc105 - terminate:ctrl_alt_bksp + us-acentos us pc105 intl terminate:ctrl_alt_bksp + pt-latin1 pt pc105 - terminate:ctrl_alt_bksp + ro-std-cedilla ro pc105 std_cedilla terminate:ctrl_alt_bksp + tj tj pc105 - terminate:ctrl_alt_bksp +-ar-qwerty ara,us pc105 qwerty terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll +-ar-azerty-digits ara,us pc105 azerty_digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll +-ben in,us pc105 ben terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + de-latin1-nodeadkeys de pc105 nodeadkeys terminate:ctrl_alt_bksp + no no pc105 - terminate:ctrl_alt_bksp + bg_bds-utf8 bg,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll +@@ -60,11 +51,8 @@ pl2 pl pc105 - terminate:ctrl_alt_bksp + es es pc105 - terminate:ctrl_alt_bksp + ro-cedilla ro pc105 cedilla terminate:ctrl_alt_bksp + ie ie pc105 - terminate:ctrl_alt_bksp +-ar-azerty ara,us pc105 azerty terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll +-ar-qwerty-digits ara,us pc105 qwerty_digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + et ee pc105 - terminate:ctrl_alt_bksp + sk-qwerty sk pc105 - terminate:ctrl_alt_bksp,qwerty +-dev dev,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll + fr-latin9 fr pc105 latin9 terminate:ctrl_alt_bksp + fr_CH-latin1 ch pc105 fr terminate:ctrl_alt_bksp + cf ca pc105 - terminate:ctrl_alt_bksp diff --git a/SOURCES/0123-correct-name-of-Tajik-kbd-layout-in-kbd-model-map.patch b/SOURCES/0123-correct-name-of-Tajik-kbd-layout-in-kbd-model-map.patch new file mode 100644 index 0000000..b7509f7 --- /dev/null +++ b/SOURCES/0123-correct-name-of-Tajik-kbd-layout-in-kbd-model-map.patch @@ -0,0 +1,22 @@ +From ccc70cad7ae319fcff491bbd657b2ff06d4d3ee8 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Mon, 9 Dec 2013 22:02:25 -0800 +Subject: [PATCH] correct name of Tajik kbd layout in kbd-model-map + +--- + src/locale/kbd-model-map | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/locale/kbd-model-map b/src/locale/kbd-model-map +index 78c7887..322c0a9 100644 +--- a/src/locale/kbd-model-map ++++ b/src/locale/kbd-model-map +@@ -39,7 +39,7 @@ ro ro pc105 - terminate:ctrl_alt_bksp + us-acentos us pc105 intl terminate:ctrl_alt_bksp + pt-latin1 pt pc105 - terminate:ctrl_alt_bksp + ro-std-cedilla ro pc105 std_cedilla terminate:ctrl_alt_bksp +-tj tj pc105 - terminate:ctrl_alt_bksp ++tj_alt-UTF8 tj pc105 - terminate:ctrl_alt_bksp + de-latin1-nodeadkeys de pc105 nodeadkeys terminate:ctrl_alt_bksp + no no pc105 - terminate:ctrl_alt_bksp + bg_bds-utf8 bg,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll diff --git a/SOURCES/0124-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/SOURCES/0124-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 0000000..fba8d02 --- /dev/null +++ b/SOURCES/0124-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,35 @@ +From 3ec8c3972d2a93027ce2b07a22b3ee8fdfb447cc Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Tue, 10 Dec 2013 03:17:39 -0800 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb +index dcc25bb..6f8301f 100644 +--- a/hwdb/20-bluetooth-vendor-product.hwdb ++++ b/hwdb/20-bluetooth-vendor-product.hwdb +@@ -821,3 +821,21 @@ bluetooth:v010F* + + bluetooth:v0110* + ID_VENDOR_FROM_DATABASE=Nippon Seiki Co., Ltd. ++ ++bluetooth:v0111* ++ ID_VENDOR_FROM_DATABASE=Steelseries ApS ++ ++bluetooth:v0112* ++ ID_VENDOR_FROM_DATABASE=vyzybl Inc. ++ ++bluetooth:v0113* ++ ID_VENDOR_FROM_DATABASE=Openbrain Technologies, Co., Ltd. ++ ++bluetooth:v0114* ++ ID_VENDOR_FROM_DATABASE=Xensr ++ ++bluetooth:v0115* ++ ID_VENDOR_FROM_DATABASE=e.solutions ++ ++bluetooth:v0116* ++ ID_VENDOR_FROM_DATABASE=1OAK Technologies diff --git a/SOURCES/0125-Ensure-unit-is-journaled-for-short-lived-or-oneshot-.patch b/SOURCES/0125-Ensure-unit-is-journaled-for-short-lived-or-oneshot-.patch new file mode 100644 index 0000000..1c804b0 --- /dev/null +++ b/SOURCES/0125-Ensure-unit-is-journaled-for-short-lived-or-oneshot-.patch @@ -0,0 +1,33 @@ +From 3bdb6f693180ae6a64af158ddf23fb1335380e48 Mon Sep 17 00:00:00 2001 +From: Dan McGee +Date: Sun, 8 Dec 2013 13:27:05 -0600 +Subject: [PATCH] Ensure unit is journaled for short-lived or oneshot processes + +In the time it takes to process incoming log messages, the process we +are logging details for may exit. This means the cgroup data is no +longer available from '/proc'. Unfortunately, the way the code was +structured before, we never log _SYSTEMD_UNIT if we don't have this +cgroup information. + +Add an else if case that allows the passed in unit_id to be logged even +if we couldn't capture cgroup information. This ensures a command like +`journalctl -u run-XXX` will return all log messages from a oneshot +process. +--- + src/journal/journald-server.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c +index a0a8e9c..1fcb3d5 100644 +--- a/src/journal/journald-server.c ++++ b/src/journal/journald-server.c +@@ -626,6 +626,9 @@ static void dispatch_message_real( + } + + free(c); ++ } else if (unit_id) { ++ x = strappenda("_SYSTEMD_UNIT=", unit_id); ++ IOVEC_SET_STRING(iovec[n++], x); + } + + #ifdef HAVE_SELINUX diff --git a/SOURCES/0126-core-manager-remove-infinite-loop.patch b/SOURCES/0126-core-manager-remove-infinite-loop.patch new file mode 100644 index 0000000..c07716c --- /dev/null +++ b/SOURCES/0126-core-manager-remove-infinite-loop.patch @@ -0,0 +1,25 @@ +From 31a3bfaf3da730a2d6f32a8ab9d9e10e77905d4f Mon Sep 17 00:00:00 2001 +From: Shawn Landden +Date: Tue, 10 Dec 2013 09:28:26 -0800 +Subject: [PATCH] core/manager: remove infinite loop + +--- + src/core/manager.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 944c196..a34a3c6 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -2285,10 +2285,8 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) { + } + + finish: +- if (ferror(f)) { ++ if (ferror(f)) + r = -EIO; +- goto finish; +- } + + assert(m->n_reloading > 0); + m->n_reloading --; diff --git a/SOURCES/0127-util-check-for-overflow-in-greedy_realloc.patch b/SOURCES/0127-util-check-for-overflow-in-greedy_realloc.patch new file mode 100644 index 0000000..b7f5d0e --- /dev/null +++ b/SOURCES/0127-util-check-for-overflow-in-greedy_realloc.patch @@ -0,0 +1,34 @@ +From aa37345b6b9c0910d871d05ff028c257b657ffb7 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 10 Dec 2013 18:53:03 +0000 +Subject: [PATCH] util: check for overflow in greedy_realloc() + +Conflicts: + src/shared/util.c +--- + src/shared/util.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 8a542da..e9b8255 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -5838,10 +5838,18 @@ void* greedy_realloc(void **p, size_t *allocated, size_t need) { + size_t a; + void *q; + ++ assert(p); ++ assert(allocated); ++ + if (*allocated >= need) + return *p; + + a = MAX(64u, need * 2); ++ ++ /* check for overflows */ ++ if (a < need) ++ return NULL; ++ + q = realloc(*p, a); + if (!q) + return NULL; diff --git a/SOURCES/0128-journald-use-a-bit-more-cleanup-magic.patch b/SOURCES/0128-journald-use-a-bit-more-cleanup-magic.patch new file mode 100644 index 0000000..2a7e2f8 --- /dev/null +++ b/SOURCES/0128-journald-use-a-bit-more-cleanup-magic.patch @@ -0,0 +1,35 @@ +From f1a8d50c069f57f0b9d23c81e50686bc8a2e43b7 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 10 Dec 2013 19:51:47 +0000 +Subject: [PATCH] journald: use a bit more cleanup magic! + +--- + src/journal/journald-stream.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c +index 4080622..771a2bd 100644 +--- a/src/journal/journald-stream.c ++++ b/src/journal/journald-stream.c +@@ -75,7 +75,7 @@ struct StdoutStream { + + static int stdout_stream_log(StdoutStream *s, const char *p) { + struct iovec iovec[N_IOVEC_META_FIELDS + 5]; +- char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL; ++ _cleanup_free_ char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL; + unsigned n = 0; + int priority; + char *label = NULL; +@@ -128,12 +128,6 @@ static int stdout_stream_log(StdoutStream *s, const char *p) { + #endif + + server_dispatch_message(s->server, iovec, n, ELEMENTSOF(iovec), &s->ucred, NULL, label, label_len, s->unit_id, priority, 0); +- +- free(message); +- free(syslog_priority); +- free(syslog_facility); +- free(syslog_identifier); +- + return 0; + } + diff --git a/SOURCES/0129-activate-clean-up-inherited-descriptors.patch b/SOURCES/0129-activate-clean-up-inherited-descriptors.patch new file mode 100644 index 0000000..3467859 --- /dev/null +++ b/SOURCES/0129-activate-clean-up-inherited-descriptors.patch @@ -0,0 +1,77 @@ +From 25854e394d661eeb661c6974f01b492f55868307 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 10 Dec 2013 21:52:11 -0500 +Subject: [PATCH] activate: clean up inherited descriptors + +> [simon@troela server]$ /usr/lib/systemd/systemd-activate -l 9000 main.js +> Assertion 'fd == 3 + count' failed at src/activate/activate.c:115, +> function open_sockets(). Aborting. +> Aborted (core dumped) + +> after a bit debuging i found the problem: +> slim appears to leak an fd into all of its children: +> stat /proc/14004/fd/3 (14004 is the pid a random process in my session) +> File: '/proc/14004/fd/3' -> '/var/log/slim.log' + +systemd-activate should be robust against the shell (or anything else) leaking +descriptors. Now everything except stdin/stdout/stderr and received sockets +will be closed. +--- + src/activate/activate.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/src/activate/activate.c b/src/activate/activate.c +index a9461bc..6aa8b9f 100644 +--- a/src/activate/activate.c ++++ b/src/activate/activate.c +@@ -137,6 +137,17 @@ static int open_sockets(int *epoll_fd, bool accept) { + count ++; + } + ++ /* Close logging and all other descriptors */ ++ if (arg_listen) { ++ int except[3 + n]; ++ ++ for (fd = 0; fd < SD_LISTEN_FDS_START + n; fd++) ++ except[fd] = fd; ++ ++ log_close(); ++ close_all_fds(except, 3 + n); ++ } ++ + /** Note: we leak some fd's on error here. I doesn't matter + * much, since the program will exit immediately anyway, but + * would be a pain to fix. +@@ -147,6 +158,7 @@ static int open_sockets(int *epoll_fd, bool accept) { + + fd = make_socket_fd(*address, SOCK_STREAM | (arg_accept*SOCK_CLOEXEC)); + if (fd < 0) { ++ log_open(); + log_error("Failed to open '%s': %s", *address, strerror(-fd)); + return fd; + } +@@ -154,6 +166,9 @@ static int open_sockets(int *epoll_fd, bool accept) { + count ++; + } + ++ if (arg_listen) ++ log_open(); ++ + *epoll_fd = epoll_create1(EPOLL_CLOEXEC); + if (*epoll_fd < 0) { + log_error("Failed to create epoll object: %m"); +@@ -298,10 +313,10 @@ static void sigchld_hdl(int sig, siginfo_t *t, void *data) { + + static int install_chld_handler(void) { + int r; +- struct sigaction act; +- zero(act); +- act.sa_flags = SA_SIGINFO; +- act.sa_sigaction = sigchld_hdl; ++ struct sigaction act = { ++ .sa_flags = SA_SIGINFO, ++ .sa_sigaction = sigchld_hdl, ++ }; + + r = sigaction(SIGCHLD, &act, 0); + if (r < 0) diff --git a/SOURCES/0130-man-explain-in-more-detail-how-SYSTEMD_READY-influen.patch b/SOURCES/0130-man-explain-in-more-detail-how-SYSTEMD_READY-influen.patch new file mode 100644 index 0000000..845b047 --- /dev/null +++ b/SOURCES/0130-man-explain-in-more-detail-how-SYSTEMD_READY-influen.patch @@ -0,0 +1,95 @@ +From f0f727fbb8576afc7ea31f2b6aacccdd565472d0 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 11 Dec 2013 18:38:51 +0100 +Subject: [PATCH] man: explain in more detail how SYSTEMD_READY= influences + SYSTEMD_WANTS= in udev rules + +https://bugzilla.redhat.com/show_bug.cgi?id=1026860 +--- + man/systemd.device.xml | 45 +++++++++++++++++++++++++++++++-------------- + 1 file changed, 31 insertions(+), 14 deletions(-) + +diff --git a/man/systemd.device.xml b/man/systemd.device.xml +index 96ebe89..002b647 100644 +--- a/man/systemd.device.xml ++++ b/man/systemd.device.xml +@@ -70,12 +70,15 @@ + since no device-specific options may be + configured. + +- systemd will automatically create dynamic device +- units for all kernel devices that are marked with the +- "systemd" udev tag (by default all block and network +- devices, and a few others). This may be used to define +- dependencies between devices and other +- units. ++ systemd will dynamically create device units for ++ all kernel devices that are marked with the "systemd" ++ udev tag (by default all block and network devices, ++ and a few others). This may be used to define ++ dependencies between devices and other units. To tag a ++ udev device use TAG+="systemd" in ++ the udev rules file, see ++ udev7 ++ for details. + + Device units are named after the + /sys and +@@ -93,7 +96,7 @@ + + The settings of device units may either be + configured via unit files, or directly from the udev +- database (which is recommended). The following udev ++ database (which is recommended). The following udev device + properties are understood by systemd: + + +@@ -101,16 +104,26 @@ + SYSTEMD_WANTS= + Adds dependencies of + type Wants from +- this unit to all listed units. This ++ the device unit to all listed units. This + may be used to activate arbitrary +- units, when a specific device becomes ++ units when a specific device becomes + available. Note that this and the + other tags are not taken into account + unless the device is tagged with the + systemd string in + the udev database, because otherwise + the device is not exposed as systemd +- unit. ++ unit (see above). Note that systemd ++ will only act on ++ Wants dependencies ++ when a device first becomes active, it ++ will not act on them if they are added ++ to devices that are already ++ active. Use ++ SYSTEMD_READY= (see ++ below) to influence on which udev ++ event to trigger the device ++ dependencies. + + + +@@ -135,10 +148,14 @@ + device disappears from the udev + tree. This option is useful to support + devices that initially show up in an +- uninitialized state in the tree, and for +- which a changed event is generated the +- moment they are fully set +- up. ++ uninitialized state in the tree, and ++ for which a changed ++ event is generated the moment they are ++ fully set up. Note that ++ SYSTEMD_WANTS= (see ++ above) is not acted on as long as ++ SYSTEMD_READY=0 is ++ set for a device. + + + diff --git a/SOURCES/0131-units-don-t-run-readahead-done-timers-in-containers.patch b/SOURCES/0131-units-don-t-run-readahead-done-timers-in-containers.patch new file mode 100644 index 0000000..b2a01c0 --- /dev/null +++ b/SOURCES/0131-units-don-t-run-readahead-done-timers-in-containers.patch @@ -0,0 +1,36 @@ +From 295730ffeef69a057773ba201cb1ad9e81c187fa Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 11 Dec 2013 23:31:34 +0100 +Subject: [PATCH] units: don't run readahead done timers in containers + +We don't run the collector in the container either, hence we don't need +to stop it either. +--- + units/systemd-readahead-done.service.in | 1 + + units/systemd-readahead-done.timer | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/units/systemd-readahead-done.service.in b/units/systemd-readahead-done.service.in +index c3b2ac5..e0d9579 100644 +--- a/units/systemd-readahead-done.service.in ++++ b/units/systemd-readahead-done.service.in +@@ -12,6 +12,7 @@ DefaultDependencies=no + Conflicts=shutdown.target + After=default.target + Before=shutdown.target ++ConditionVirtualization=no + + [Service] + Type=oneshot +diff --git a/units/systemd-readahead-done.timer b/units/systemd-readahead-done.timer +index 41bfb2b..a9f6278 100644 +--- a/units/systemd-readahead-done.timer ++++ b/units/systemd-readahead-done.timer +@@ -12,6 +12,7 @@ DefaultDependencies=no + Conflicts=shutdown.target + After=default.target + Before=shutdown.target ++ConditionVirtualization=no + + [Timer] + OnActiveSec=30s diff --git a/SOURCES/0132-nspawn-complain-and-continue-if-machine-has-same-id.patch b/SOURCES/0132-nspawn-complain-and-continue-if-machine-has-same-id.patch new file mode 100644 index 0000000..1ba1db8 --- /dev/null +++ b/SOURCES/0132-nspawn-complain-and-continue-if-machine-has-same-id.patch @@ -0,0 +1,63 @@ +From e16c7a905dbb6882970a13678e42816847565841 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 11 Dec 2013 22:00:33 -0500 +Subject: [PATCH] nspawn: complain and continue if machine has same id + +If --link-journal=host or --link-journal=guest is used, this totally +cannot work and we exit with an error. If however --link-journal=auto +or --link-journal=no is used, just display a warning. + +Having the same machine id can happen if booting from the same +filesystem as the host. Since other things mostly function correctly, +let's allow that. + +https://bugs.freedesktop.org/show_bug.cgi?id=68369 +--- + src/nspawn/nspawn.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index db47fbd..4bc49a3 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -802,14 +802,11 @@ static int setup_hostname(void) { + } + + static int setup_journal(const char *directory) { +- sd_id128_t machine_id; ++ sd_id128_t machine_id, this_id; + _cleanup_free_ char *p = NULL, *b = NULL, *q = NULL, *d = NULL; + char *id; + int r; + +- if (arg_link_journal == LINK_NO) +- return 0; +- + p = strappend(directory, "/etc/machine-id"); + if (!p) + return log_oom(); +@@ -833,6 +830,24 @@ static int setup_journal(const char *directory) { + return r; + } + ++ r = sd_id128_get_machine(&this_id); ++ if (r < 0) { ++ log_error("Failed to retrieve machine ID: %s", strerror(-r)); ++ return r; ++ } ++ ++ if (sd_id128_equal(machine_id, this_id)) { ++ log_full(arg_link_journal == LINK_AUTO ? LOG_WARNING : LOG_ERR, ++ "Host and machine ids are equal (%s): refusing to link journals", id); ++ if (arg_link_journal == LINK_AUTO) ++ return 0; ++ return ++ -EEXIST; ++ } ++ ++ if (arg_link_journal == LINK_NO) ++ return 0; ++ + free(p); + p = strappend("/var/log/journal/", id); + q = strjoin(directory, "/var/log/journal/", id, NULL); diff --git a/SOURCES/0133-man-beef-up-ExecStart-description.patch b/SOURCES/0133-man-beef-up-ExecStart-description.patch new file mode 100644 index 0000000..0100ab5 --- /dev/null +++ b/SOURCES/0133-man-beef-up-ExecStart-description.patch @@ -0,0 +1,150 @@ +From 1e09f64d4735563be7b7f7e98d727ba15fe6a523 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 14 Dec 2013 17:21:55 -0500 +Subject: [PATCH] man: beef up ExecStart description + +We have lots of questions from people who assume that shell syntax works +here, so let's be very explicit what is allowed and what is not. A few +examples should also help. + +http://bugs.debian.org/732156 +--- + man/systemd.service.xml | 97 ++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 80 insertions(+), 17 deletions(-) + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index 3f31c11..ca297ba 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -305,9 +305,10 @@ + ExecStart= + Commands with their + arguments that are executed when this +- service is started. The first +- argument must be an absolute path +- name. ++ service is started. For each of the ++ specified commands, the first argument ++ must be an absolute and literal path ++ to an executable. + + When Type is + not , only one +@@ -332,6 +333,35 @@ + prior assignments of this option will + have no effect. + ++ Each command line is split on ++ whitespace, with the first item being ++ the command to execute, and the ++ subsequent items being the arguments. ++ Double quotes ("...") and single ++ quotes ('...') may be used, in which ++ case everything until the next ++ matching quote becomes part of the ++ same argument. Quotes themselves are ++ removed after parsing. In addition, a ++ trailing backslash ++ (\) may be used to ++ merge lines. This syntax is intended ++ to be very similar to shell syntax, ++ but only the meta-characters and ++ expansions described in the following ++ paragraphs are understood. ++ Specifically, redirection using ++ <, ++ <<, ++ >, and ++ >>, pipes ++ using |, and ++ running programs in the background ++ using & ++ and other elements of shell ++ syntax are not supported. ++ ++ + If more than one command is + specified, the commands are invoked + one by one sequentially in the order +@@ -350,10 +380,11 @@ + The command line accepts + % specifiers as + described in +- systemd.unit5. Note +- that the first argument of the command +- line (i.e. the program to execute) may +- not include specifiers. ++ systemd.unit5. ++ Note that the first argument of the ++ command line (i.e. the program to ++ execute) may not include ++ specifiers. + + Basic environment variable + substitution is supported. Use +@@ -372,9 +403,7 @@ + more arguments. To pass literal dollar sign + use $$. Note that the first + argument (i.e. the program to execute) +- may not be a variable, since it must +- be a literal and absolute path +- name. ++ may not be a variable. + + Optionally, if the absolute file + name is prefixed with +@@ -402,13 +431,47 @@ + ExecStart=/bin/sh -c 'dmesg | tac' + + +- For services run by a user +- instance of systemd the special +- environment variable +- $MANAGERPID is set +- to the PID of the systemd +- instance. +- ++ Only select environment variables ++ are set for executed commands. See ++ systemd.exec5. ++ ++ ++ Example: ++ ExecStart=/bin/echo one ; /bin/echo "two two" ++ ++ This will execute ++ /bin/echo two ++ times, each time with one argument, ++ one and ++ two two, ++ respectively. Since two commands are ++ specified ++ Type=oneshot must ++ be used. ++ ++ Example: ++ ExecStart=/bin/echo / >/dev/null & \; \ ++/bin/ls ++ ++ This will execute ++ /bin/echo with five ++ arguments: /, ++ >/dev/null, ++ &, ++ ;, and ++ /bin/ls. ++ ++ Example: ++ Environment="ONE=one" 'TWO=two two' ++ExecStart=/bin/echo $ONE $TWO ${TWO} ++ ++ This will execute ++ /bin/echo with four ++ arguments: one, ++ two, ++ two, and ++ two two. ++ + + + diff --git a/SOURCES/0134-man-remove-advice-to-avoid-setting-the-same-var-more.patch b/SOURCES/0134-man-remove-advice-to-avoid-setting-the-same-var-more.patch new file mode 100644 index 0000000..c5fc953 --- /dev/null +++ b/SOURCES/0134-man-remove-advice-to-avoid-setting-the-same-var-more.patch @@ -0,0 +1,53 @@ +From 69924ed702e14592ba0aae1510fca652c7d306df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 14 Dec 2013 17:30:25 -0500 +Subject: [PATCH] man: remove advice to avoid setting the same var more than + once + +So far the compatibility with .desktop settings hasn't been imporant +at all, and we do not want people to write convoluted unit +files. +--- + man/systemd.service.xml | 6 +----- + man/systemd.unit.xml | 11 +++++++++++ + 2 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index ca297ba..8f9137c 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -321,11 +321,7 @@ + (these semicolons must be passed as + separate words). Alternatively, this + directive may be specified more than +- once with the same effect. However, +- the latter syntax is not recommended +- for compatibility with parsers +- suitable for XDG +- .desktop files. ++ once with the same effect. + Lone semicolons may be escaped as + \;. If the empty + string is assigned to this option, the +diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml +index 029392c..77127ff 100644 +--- a/man/systemd.unit.xml ++++ b/man/systemd.unit.xml +@@ -120,6 +120,17 @@ + systemd.scope5. + + ++ Various settings are allowed to be specified ++ more than once, in which case the interpretation ++ depends on the setting. Often, multiple settings form ++ a list, and setting to an empty value "resets", which ++ means that previous assignments are ignored. When this ++ is allowed, it is mentioned in the description of the ++ setting. Note that using multiple assignments to the ++ same value makes the unit file incompatible with ++ parsers for the XDG .desktop file ++ format. ++ + Unit files are loaded from a set of paths + determined during compilation, described in the next section. + diff --git a/SOURCES/0135-systemctl-add-the-plain-option-to-the-help-message.patch b/SOURCES/0135-systemctl-add-the-plain-option-to-the-help-message.patch new file mode 100644 index 0000000..23dd90e --- /dev/null +++ b/SOURCES/0135-systemctl-add-the-plain-option-to-the-help-message.patch @@ -0,0 +1,23 @@ +From f1150c21ae7c7b337c29c12624046eccebc6b636 Mon Sep 17 00:00:00 2001 +From: Djalal Harouni +Date: Sun, 15 Dec 2013 00:05:38 +0100 +Subject: [PATCH] systemctl: add the --plain option to the help message + +--- + src/systemctl/systemctl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 1d68b38..d29133c 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4745,7 +4745,8 @@ static int systemctl_help(void) { + " --root=PATH Enable unit files in the specified root directory\n" + " -n --lines=INTEGER Number of journal entries to show\n" + " -o --output=STRING Change journal output mode (short, short-monotonic,\n" +- " verbose, export, json, json-pretty, json-sse, cat)\n\n" ++ " verbose, export, json, json-pretty, json-sse, cat)\n" ++ " --plain Print unit dependencies as a list instead of a tree\n\n" + "Unit Commands:\n" + " list-units List loaded units\n" + " list-sockets List loaded sockets ordered by address\n" diff --git a/SOURCES/0136-Fix-a-few-resource-leaks-in-error-paths.patch b/SOURCES/0136-Fix-a-few-resource-leaks-in-error-paths.patch new file mode 100644 index 0000000..0e9ce24 --- /dev/null +++ b/SOURCES/0136-Fix-a-few-resource-leaks-in-error-paths.patch @@ -0,0 +1,67 @@ +From c26444ca9751a1f7cec28f8140b9674cec2ee3ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 15 Dec 2013 16:25:04 -0500 +Subject: [PATCH] Fix a few resource leaks in error paths + +https://bugzilla.redhat.com/show_bug.cgi?id=1043304 + +Conflicts: + src/libsystemd-bus/bus-objects.c + src/udev/net/link-config.c +--- + src/sleep/sleep.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c +index a56ab89..f96987f 100644 +--- a/src/sleep/sleep.c ++++ b/src/sleep/sleep.c +@@ -57,15 +57,14 @@ static int write_mode(char **modes) { + return r; + } + +-static int write_state(FILE *f0, char **states) { +- FILE _cleanup_fclose_ *f = f0; ++static int write_state(FILE **f, char **states) { + char **state; + int r = 0; + + STRV_FOREACH(state, states) { + int k; + +- k = write_string_to_file(f, *state); ++ k = write_string_to_file(*f, *state); + if (k == 0) + return 0; + log_debug("Failed to write '%s' to /sys/power/state: %s", +@@ -73,9 +72,9 @@ static int write_state(FILE *f0, char **states) { + if (r == 0) + r = k; + +- fclose(f); +- f = fopen("/sys/power/state", "we"); +- if (!f) { ++ fclose(*f); ++ *f = fopen("/sys/power/state", "we"); ++ if (!*f) { + log_error("Failed to open /sys/power/state: %m"); + return -errno; + } +@@ -87,7 +86,7 @@ static int write_state(FILE *f0, char **states) { + static int execute(char **modes, char **states) { + char* arguments[4]; + int r; +- FILE *f; ++ _cleanup_fclose_ FILE *f = NULL; + const char* note = strappenda("SLEEP=", arg_verb); + + /* This file is opened first, so that if we hit an error, +@@ -115,7 +114,7 @@ static int execute(char **modes, char **states) { + note, + NULL); + +- r = write_state(f, states); ++ r = write_state(&f, states); + if (r < 0) + return r; + diff --git a/SOURCES/0137-Fix-a-few-signed-unsigned-format-string-issues.patch b/SOURCES/0137-Fix-a-few-signed-unsigned-format-string-issues.patch new file mode 100644 index 0000000..1991645 --- /dev/null +++ b/SOURCES/0137-Fix-a-few-signed-unsigned-format-string-issues.patch @@ -0,0 +1,81 @@ +From fbf1747793446a4779dbd503ba07d3e0cb3cd360 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 15 Dec 2013 16:26:27 -0500 +Subject: [PATCH] Fix a few signed/unsigned format string issues + +Since numbers involved are all small, behaviour was correct already. + +https://bugzilla.redhat.com/show_bug.cgi?id=1043304 +--- + src/shared/time-util.c | 2 +- + src/udev/udev-builtin-net_id.c | 21 +++++++-------------- + 2 files changed, 8 insertions(+), 15 deletions(-) + +diff --git a/src/shared/time-util.c b/src/shared/time-util.c +index 81d4ede..d31401b 100644 +--- a/src/shared/time-util.c ++++ b/src/shared/time-util.c +@@ -382,7 +382,7 @@ void dual_timestamp_deserialize(const char *value, dual_timestamp *t) { + assert(value); + assert(t); + +- if (sscanf(value, "%lli %llu", &a, &b) != 2) ++ if (sscanf(value, "%llu %llu", &a, &b) != 2) + log_debug("Failed to parse finish timestamp value %s", value); + else { + t->realtime = a; +diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c +index d9de46d..b3cb04b 100644 +--- a/src/udev/udev-builtin-net_id.c ++++ b/src/udev/udev-builtin-net_id.c +@@ -170,23 +170,17 @@ out: + + static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { + struct udev *udev = udev_device_get_udev(names->pcidev); +- unsigned int domain; +- unsigned int bus; +- unsigned int slot; +- unsigned int func; +- unsigned int dev_id = 0; ++ unsigned domain, bus, slot, func, dev_id = 0; + size_t l; + char *s; + const char *attr; + struct udev_device *pci = NULL; +- char slots[256]; +- DIR *dir; ++ char slots[256], str[256]; ++ _cleanup_closedir_ DIR *dir = NULL; + struct dirent *dent; +- char str[256]; +- int hotplug_slot = 0; +- int err = 0; ++ int hotplug_slot = 0, err = 0; + +- if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%d", &domain, &bus, &slot, &func) != 4) ++ if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4) + return -ENOENT; + + /* kernel provided multi-device index */ +@@ -243,7 +237,6 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { + if (hotplug_slot > 0) + break; + } +- closedir(dir); + + if (hotplug_slot > 0) { + s = names->pci_slot; +@@ -345,11 +338,11 @@ static int names_bcma(struct udev_device *dev, struct netnames *names) { + return -ENOENT; + + /* bus num:core num */ +- if (sscanf(udev_device_get_sysname(bcmadev), "bcma%*d:%d", &core) != 1) ++ if (sscanf(udev_device_get_sysname(bcmadev), "bcma%*u:%u", &core) != 1) + return -EINVAL; + /* suppress the common core == 0 */ + if (core > 0) +- snprintf(names->bcma_core, sizeof(names->bcma_core), "b%d", core); ++ snprintf(names->bcma_core, sizeof(names->bcma_core), "b%u", core); + + names->type = NET_BCMA; + return 0; diff --git a/SOURCES/0138-journal-file-protect-against-alloca-0.patch b/SOURCES/0138-journal-file-protect-against-alloca-0.patch new file mode 100644 index 0000000..c069194 --- /dev/null +++ b/SOURCES/0138-journal-file-protect-against-alloca-0.patch @@ -0,0 +1,23 @@ +From d3bf15d0b7c461aae4d97fe6425a6f0cea277222 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Mon, 16 Dec 2013 23:35:30 +0100 +Subject: [PATCH] journal-file: protect against alloca(0) + +--- + src/journal/journal-file.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 962cdd6..ebf72f3 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -2730,7 +2730,8 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6 + ts.realtime = le64toh(o->entry.realtime); + + n = journal_file_entry_n_items(o); +- items = alloca(sizeof(EntryItem) * n); ++ /* alloca() can't take 0, hence let's allocate at least one */ ++ items = alloca(sizeof(EntryItem) * MAX(1u, n)); + + for (i = 0; i < n; i++) { + uint64_t l, h; diff --git a/SOURCES/0139-man-describe-journalctl-show-cursor.patch b/SOURCES/0139-man-describe-journalctl-show-cursor.patch new file mode 100644 index 0000000..e858676 --- /dev/null +++ b/SOURCES/0139-man-describe-journalctl-show-cursor.patch @@ -0,0 +1,42 @@ +From d6be31a099e36738c48a322466f080701a39d1a9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 16 Dec 2013 23:40:00 -0500 +Subject: [PATCH] man: describe journalctl --show-cursor + +--- + man/journalctl.xml | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) + +diff --git a/man/journalctl.xml b/man/journalctl.xml +index b5a0c53..dd8cb18 100644 +--- a/man/journalctl.xml ++++ b/man/journalctl.xml +@@ -565,11 +565,23 @@ + + + +- Start showing entries from the +- location in the journal +- after the location +- specified by the this cursor. +- ++ Start showing entries ++ from the location in the journal ++ after the ++ location specified by the this cursor. ++ The cursor is shown when the ++ option ++ is used. ++ ++ ++ ++ ++ ++ The cursor is shown after the last ++ entry after two dashes: ++ -- cursor: s=0639... ++ The format of this the cursor is private ++ and subject ot change. + + + diff --git a/SOURCES/0140-journal-fix-against-theoretical-undefined-behavior.patch b/SOURCES/0140-journal-fix-against-theoretical-undefined-behavior.patch new file mode 100644 index 0000000..b7737e3 --- /dev/null +++ b/SOURCES/0140-journal-fix-against-theoretical-undefined-behavior.patch @@ -0,0 +1,39 @@ +From 072cebc2c736bec33e90299b49d82976c12b5549 Mon Sep 17 00:00:00 2001 +From: Shawn Landden +Date: Mon, 16 Dec 2013 15:41:00 -0800 +Subject: [PATCH] journal: fix against (theoretical) undefined behavior + +While all the libc implementations I know return NULL when memchr's size +parameter is 0, without accessing any memory, passing NULL to memchr is +still invalid: + +C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length +of the array for a function, n can have the value zero on a call to that +function. Unless explicitly stated otherwise in the description of a +particular function in this subclause, pointer arguments on such a call +shall still have valid values, as described in 7.1.4. On such a call, a +function that locates a character finds no occurrence, a function that +compares two character sequences returns zero, and a function that copies +characters copies zero characters. + +see http://llvm.org/bugs/show_bug.cgi?id=18247 +--- + src/journal/journal-file.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index ebf72f3..2c0fd0c 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1010,7 +1010,10 @@ static int journal_file_append_data( + if (r < 0) + return r; + +- eq = memchr(data, '=', size); ++ if (!data) ++ eq = NULL; ++ else ++ eq = memchr(data, '=', size); + if (eq && eq > data) { + uint64_t fp; + Object *fo; diff --git a/SOURCES/0141-journald-downgrade-warning-message-when-dev-kmsg-doe.patch b/SOURCES/0141-journald-downgrade-warning-message-when-dev-kmsg-doe.patch new file mode 100644 index 0000000..2ba9527 --- /dev/null +++ b/SOURCES/0141-journald-downgrade-warning-message-when-dev-kmsg-doe.patch @@ -0,0 +1,24 @@ +From b92a3a82b9bfdce438821f6f941f81ef2b4dd9e1 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 17 Dec 2013 19:56:06 +0100 +Subject: [PATCH] journald: downgrade warning message when /dev/kmsg does not + exist + +--- + src/journal/journald-kmsg.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c +index 21649d0..9895808 100644 +--- a/src/journal/journald-kmsg.c ++++ b/src/journal/journald-kmsg.c +@@ -382,7 +382,8 @@ int server_open_dev_kmsg(Server *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; + } + diff --git a/SOURCES/0142-journal-file.c-remove-redundant-assignment-of-variab.patch b/SOURCES/0142-journal-file.c-remove-redundant-assignment-of-variab.patch new file mode 100644 index 0000000..7d152a1 --- /dev/null +++ b/SOURCES/0142-journal-file.c-remove-redundant-assignment-of-variab.patch @@ -0,0 +1,24 @@ +From cbd7e523d1bccde7fc1ad2ca18c74b8ee00f2940 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Tue, 17 Dec 2013 20:15:45 +0100 +Subject: [PATCH] journal-file.c: remove redundant assignment of variable + +we also do 'last_index = (uint64_t) -1;' at the end of the while +loop so there is no reason to also do it here. +--- + src/journal/journal-file.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 2c0fd0c..9f04c58 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1628,8 +1628,6 @@ static int generic_array_bisect( + else + left = y + 1; + } +- +- last_index = (uint64_t) -1; + } + + for (;;) { diff --git a/SOURCES/0143-login-Don-t-stop-a-running-user-manager-from-garbage.patch b/SOURCES/0143-login-Don-t-stop-a-running-user-manager-from-garbage.patch new file mode 100644 index 0000000..d0aa0b2 --- /dev/null +++ b/SOURCES/0143-login-Don-t-stop-a-running-user-manager-from-garbage.patch @@ -0,0 +1,33 @@ +From 85e0484fedb9f4cf0220e19a5207a3923326fb7f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Sun, 15 Dec 2013 12:06:37 +0100 +Subject: [PATCH] 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. + +Conflicts: + src/login/logind-user.c +--- + src/login/logind-user.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/src/login/logind-user.c b/src/login/logind-user.c +index adbe638..e2fce5c 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_started) { + 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; + } + diff --git a/SOURCES/0144-log-when-we-log-to-dev-console-and-got-disconnected-.patch b/SOURCES/0144-log-when-we-log-to-dev-console-and-got-disconnected-.patch new file mode 100644 index 0000000..5af8230 --- /dev/null +++ b/SOURCES/0144-log-when-we-log-to-dev-console-and-got-disconnected-.patch @@ -0,0 +1,42 @@ +From 87823e84ec7b0e6939596063c540219a681bbbb9 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 18 Dec 2013 16:49:15 +0100 +Subject: [PATCH] log: when we log to /dev/console and got disconnected (maybe + due to vhangup) reconnect + +--- + src/shared/log.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/src/shared/log.c b/src/shared/log.c +index 8f4995a..605d069 100644 +--- a/src/shared/log.c ++++ b/src/shared/log.c +@@ -337,8 +337,25 @@ static int write_to_console( + IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_OFF); + IOVEC_SET_STRING(iovec[n++], "\n"); + +- if (writev(console_fd, iovec, n) < 0) +- return -errno; ++ if (writev(console_fd, iovec, n) < 0) { ++ ++ if (errno == EIO && getpid() == 1) { ++ ++ /* If somebody tried to kick us from our ++ * console tty (via vhangup() or suchlike), ++ * try to reconnect */ ++ ++ log_close_console(); ++ log_open_console(); ++ ++ if (console_fd < 0) ++ return 0; ++ ++ if (writev(console_fd, iovec, n) < 0) ++ return -errno; ++ } else ++ return -errno; ++ } + + return 1; + } diff --git a/SOURCES/0145-loginctl-when-showing-device-tree-of-seats-with-no-d.patch b/SOURCES/0145-loginctl-when-showing-device-tree-of-seats-with-no-d.patch new file mode 100644 index 0000000..983678c --- /dev/null +++ b/SOURCES/0145-loginctl-when-showing-device-tree-of-seats-with-no-d.patch @@ -0,0 +1,23 @@ +From 63c96665d60fd219410eb213b2e2fd83ef242616 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 18 Dec 2013 17:16:33 +0100 +Subject: [PATCH] loginctl: when showing device tree of seats with no devices + show something useful + +--- + src/login/sysfs-show.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c +index 3c03bd1..14de7d8 100644 +--- a/src/login/sysfs-show.c ++++ b/src/login/sysfs-show.c +@@ -182,6 +182,8 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { + first = udev_enumerate_get_list_entry(e); + if (first) + show_sysfs_one(udev, seat, &first, "/", prefix, n_columns); ++ else ++ printf("%s%s%s\n", prefix, draw_special_char(DRAW_TREE_RIGHT), "(none)"); + + finish: + if (e) diff --git a/SOURCES/0146-man-be-more-explicit-about-option-arguments-that-tak.patch b/SOURCES/0146-man-be-more-explicit-about-option-arguments-that-tak.patch new file mode 100644 index 0000000..a0d5914 --- /dev/null +++ b/SOURCES/0146-man-be-more-explicit-about-option-arguments-that-tak.patch @@ -0,0 +1,52 @@ +From 44d5ed4f1e398188bad5283fd75b91594de54cd0 Mon Sep 17 00:00:00 2001 +From: "Jason St. John" +Date: Tue, 17 Dec 2013 18:48:43 -0500 +Subject: [PATCH] man: be more explicit about option arguments that take + 128-bit IDs in journalctl(1) + +It may not be immediately obvious to the reader what "ID128" is, so replace the +example option argument "ID128" with "128-bit-ID". +--- + man/journalctl.xml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/man/journalctl.xml b/man/journalctl.xml +index dd8cb18..2ee1647 100644 +--- a/man/journalctl.xml ++++ b/man/journalctl.xml +@@ -714,7 +714,7 @@ + + + + + List the contents of +@@ -723,7 +723,7 @@ + description strings. + + If any +- ID128s are ++ 128-bit-IDs are + specified, only those entries are shown. + + +@@ -731,7 +731,7 @@ + + + + + Show the contents of +@@ -742,7 +742,7 @@ + files. + + If any +- ID128s are ++ 128-bit-IDs are + specified, only those entries are shown. + + diff --git a/SOURCES/0147-man-add-DOI-for-refereed-article-on-Forward-Secure-S.patch b/SOURCES/0147-man-add-DOI-for-refereed-article-on-Forward-Secure-S.patch new file mode 100644 index 0000000..247541f --- /dev/null +++ b/SOURCES/0147-man-add-DOI-for-refereed-article-on-Forward-Secure-S.patch @@ -0,0 +1,59 @@ +From 214ead7a0ff493e8961e0368ece5414d1409c4cf Mon Sep 17 00:00:00 2001 +From: "Jason St. John" +Date: Tue, 17 Dec 2013 19:40:02 -0500 +Subject: [PATCH] man: add DOI for refereed article on Forward Secure Sealing + to journald.conf(5) + +In journalctl(1), be more explicit about the reference to "Seal=" in +journald.conf(5) and what information can be found there. +--- + man/journalctl.xml | 8 ++++++-- + man/journald.conf.xml | 10 +++++----- + 2 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/man/journalctl.xml b/man/journalctl.xml +index 2ee1647..0e188df 100644 +--- a/man/journalctl.xml ++++ b/man/journalctl.xml +@@ -770,10 +770,14 @@ + sealing key is stored in the journal + data directory and shall remain on the + host. The verification key should be +- stored externally. Also see the ++ stored externally. Refer to the + option in + journald.conf5 +- for details. ++ for information on Forward Secure ++ Sealing and for a link to a refereed ++ scholarly paper detailing the ++ cryptographic theory it is based on. ++ + + + +diff --git a/man/journald.conf.xml b/man/journald.conf.xml +index 7aa2e78..8e642a3 100644 +--- a/man/journald.conf.xml ++++ b/man/journald.conf.xml +@@ -130,15 +130,15 @@ + by + journalctl1's + +- command), forward secure sealing (FSS) ++ command), Forward Secure Sealing (FSS) + for all persistent journal files is + enabled. FSS is based on Seekable + Sequential Key Generators by +- G. A. Marson and B. Poettering and +- may be used to protect journal files +- from unnoticed +- alteration. ++ G. A. Marson and B. Poettering ++ (doi:10.1007/978-3-642-40203-6_7) ++ and may be used to protect journal files ++ from unnoticed alteration. + + + diff --git a/SOURCES/0148-keymap-Refactor-Acer-tables.patch b/SOURCES/0148-keymap-Refactor-Acer-tables.patch new file mode 100644 index 0000000..c7f7417 --- /dev/null +++ b/SOURCES/0148-keymap-Refactor-Acer-tables.patch @@ -0,0 +1,145 @@ +From fd5f1706cda158e7a89e955f861bd34d7a8b429f Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 19 Dec 2013 08:33:32 +0100 +Subject: [PATCH] keymap: Refactor Acer tables + +Move common keys into generic Acer table, and factorize the model specific +exceptions. +--- + hwdb/60-keyboard.hwdb | 101 ++++++++++++++++++-------------------------------- + 1 file changed, 36 insertions(+), 65 deletions(-) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index d4d948d..ab9e569 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -46,52 +46,7 @@ + # Acer + ########################################## + +-# Acer platform kernel driver +-keyboard:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:pvr* +- KEYBOARD_KEY_82=f21 +- +-# Aspire 5720 +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:pvr* +- KEYBOARD_KEY_84=bluetooth # sent when bluetooth module missing, and key pressed +- KEYBOARD_KEY_92=media # Acer arcade +- KEYBOARD_KEY_d4=bluetooth # Bluetooth on +- KEYBOARD_KEY_d9=bluetooth # Bluetooth off +- KEYBOARD_KEY_f4=prog3 # e-key +- +-# Aspire 5920g +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5920G:* +- KEYBOARD_KEY_8a=media +- KEYBOARD_KEY_92=media +- KEYBOARD_KEY_a6=setup +- KEYBOARD_KEY_b2=www +- KEYBOARD_KEY_d9=bluetooth # (toggle) on-to-off +- +-# Aspire 6920 +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*6920:* +- KEYBOARD_KEY_d9=bluetooth # (toggle) on-to-off +- KEYBOARD_KEY_92=media +- KEYBOARD_KEY_9e=back +- KEYBOARD_KEY_83=rewind +- KEYBOARD_KEY_89=fastforward +- +-# Aspire 8930 +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*8930:* +- KEYBOARD_KEY_ca=prog3 # key 'HOLD' on CineDash Media Console +- KEYBOARD_KEY_83=rewind +- KEYBOARD_KEY_89=fastforward +- KEYBOARD_KEY_92=media # key 'ARCADE' on CineDash Media Console +- KEYBOARD_KEY_9e=back +- +-# Travelmate C300 +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr* +- KEYBOARD_KEY_67=f24 # FIXME: rotate screen +- KEYBOARD_KEY_68=up +- KEYBOARD_KEY_69=down +- KEYBOARD_KEY_6b=fn +- KEYBOARD_KEY_6c=screenlock # FIXME: lock tablet device/buttons +- +-# ++# common keys + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn* + keyboard:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr* +@@ -99,6 +54,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr* + KEYBOARD_KEY_a6=setup # Fn+F2 Acer eSettings + KEYBOARD_KEY_a7=battery # Fn+F3 Power Management + KEYBOARD_KEY_a9=switchvideomode # Fn+F5 ++ KEYBOARD_KEY_b2=www + KEYBOARD_KEY_b3=euro + KEYBOARD_KEY_b4=dollar + KEYBOARD_KEY_ce=brightnessup # Fn+Right +@@ -118,33 +74,48 @@ keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr* + KEYBOARD_KEY_f8=fn + KEYBOARD_KEY_f9=prog1 # Launch NTI shadow + +-# ++# Acer platform kernel driver ++keyboard:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:pvr* ++ KEYBOARD_KEY_82=f21 # Touchpad toggle ++ ++# Aspire models ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*:pvr* ++ KEYBOARD_KEY_84=bluetooth # sent when bluetooth module missing, and key pressed ++ KEYBOARD_KEY_d9=bluetooth # Bluetooth off ++ KEYBOARD_KEY_92=media # Acer arcade ++ ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:pvr* ++ KEYBOARD_KEY_f4=prog3 # e-key ++ ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5920G:* ++ KEYBOARD_KEY_8a=media ++ KEYBOARD_KEY_a6=setup ++ ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*6920:* ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*8930:* ++ KEYBOARD_KEY_ca=prog3 # key 'HOLD' on CineDash Media Console ++ KEYBOARD_KEY_83=rewind ++ KEYBOARD_KEY_89=fastforward ++ KEYBOARD_KEY_9e=back ++ ++# Travelmate C300 ++keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr* ++ KEYBOARD_KEY_67=f24 # FIXME: rotate screen ++ KEYBOARD_KEY_68=up ++ KEYBOARD_KEY_69=down ++ KEYBOARD_KEY_6b=fn ++ KEYBOARD_KEY_6c=screenlock # FIXME: lock tablet device/buttons ++ ++# on some models this isn't brightnessup + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5210*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5220*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5610*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5620*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5720*:pvr* +- KEYBOARD_KEY_ee=screenlock +- +-# +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*6292*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*8471*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*7720*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*1810T*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAO751h:* +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAO531h:* +- KEYBOARD_KEY_d9=bluetooth +- +-# +-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:pvr* +- KEYBOARD_KEY_b2=www +- KEYBOARD_KEY_ee=screenlock +- +-# + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*6593:* + keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*1640:* +- KEYBOARD_KEY_b2=www + KEYBOARD_KEY_ee=screenlock + + ########################################################### diff --git a/SOURCES/0149-logind-remove-dead-variable.patch b/SOURCES/0149-logind-remove-dead-variable.patch new file mode 100644 index 0000000..d31a83d --- /dev/null +++ b/SOURCES/0149-logind-remove-dead-variable.patch @@ -0,0 +1,37 @@ +From d999e2ffa714ceda7859df25e2db296444dcbd1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 19 Dec 2013 14:16:46 -0500 +Subject: [PATCH] logind: remove dead variable + +Noticed-by: Jan Alexander Steffens +--- + src/login/logind-user.c | 3 --- + src/login/logind-user.h | 1 - + 2 files changed, 4 deletions(-) + +diff --git a/src/login/logind-user.c b/src/login/logind-user.c +index e2fce5c..b87311c 100644 +--- a/src/login/logind-user.c ++++ b/src/login/logind-user.c +@@ -648,9 +648,6 @@ UserState user_get_state(User *u) { + + assert(u); + +- if (u->closing) +- return USER_CLOSING; +- + if (u->slice_job || u->service_job) + return USER_OPENING; + +diff --git a/src/login/logind-user.h b/src/login/logind-user.h +index b9171d3..a36f456 100644 +--- a/src/login/logind-user.h ++++ b/src/login/logind-user.h +@@ -61,7 +61,6 @@ struct User { + + bool in_gc_queue:1; + bool started:1; +- bool closing:1; + + LIST_HEAD(Session, sessions); + LIST_FIELDS(User, gc_queue); diff --git a/SOURCES/0150-hwdb-update.patch b/SOURCES/0150-hwdb-update.patch new file mode 100644 index 0000000..27dd141 --- /dev/null +++ b/SOURCES/0150-hwdb-update.patch @@ -0,0 +1,4917 @@ +From 2ad4d7a28f6875caaeba0af6d093d644f995f4ff Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Sun, 22 Dec 2013 11:32:11 -0800 +Subject: [PATCH] hwdb: update + +Conflicts: + hwdb/20-sdio-vendor-model.hwdb +--- + hwdb/20-OUI.hwdb | 1174 ++++++++++++++++++++++++++++++++++++++++- + hwdb/20-pci-vendor-model.hwdb | 689 ++++++++++++++++++++++-- + hwdb/20-usb-vendor-model.hwdb | 112 +++- + 3 files changed, 1922 insertions(+), 53 deletions(-) + +diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb +index 5067167..92b96ae 100644 +--- a/hwdb/20-OUI.hwdb ++++ b/hwdb/20-OUI.hwdb +@@ -13411,6 +13411,222 @@ OUI:40D855198* + OUI:40D855199* + ID_OUI_FROM_DATABASE=PRESSOL Schmiergeraete GmbH + ++OUI:40D85519A* ++ ID_OUI_FROM_DATABASE=Rohde&Schwarz Topex SA ++ ++OUI:40D85519B* ++ ID_OUI_FROM_DATABASE=Northern Star Technologies ++ ++OUI:40D85519C* ++ ID_OUI_FROM_DATABASE=Parris Service Corporation ++ ++OUI:40D85519D* ++ ID_OUI_FROM_DATABASE=EMAC, Inc. ++ ++OUI:40D85519E* ++ ID_OUI_FROM_DATABASE=Thirdwayv Inc. ++ ++OUI:40D85519F* ++ ID_OUI_FROM_DATABASE=Patria Aviation Oy ++ ++OUI:40D8551A0* ++ ID_OUI_FROM_DATABASE=Futaba Corporation ++ ++OUI:40D8551A1* ++ ID_OUI_FROM_DATABASE=KRONOTECH SRL ++ ++OUI:40D8551A2* ++ ID_OUI_FROM_DATABASE=HIPODROMO DE AGUA CALIENTE, S.A. DE C.V. ++ ++OUI:40D8551A3* ++ ID_OUI_FROM_DATABASE=Noritake Itron Corporation ++ ++OUI:40D8551A4* ++ ID_OUI_FROM_DATABASE=cibite AG ++ ++OUI:40D8551A5* ++ ID_OUI_FROM_DATABASE=DemoPad ++ ++OUI:40D8551A6* ++ ID_OUI_FROM_DATABASE=RB-LINK Wireless ++ ++OUI:40D8551A7* ++ ID_OUI_FROM_DATABASE=ENTEC Electric & Electronic CO., LTD ++ ++OUI:40D8551A8* ++ ID_OUI_FROM_DATABASE=Multiobrabotka ++ ++OUI:40D8551A9* ++ ID_OUI_FROM_DATABASE=Lubino s.r.o. ++ ++OUI:40D8551AA* ++ ID_OUI_FROM_DATABASE=Broachlink Technology Co.,Limited ++ ++OUI:40D8551AB* ++ ID_OUI_FROM_DATABASE=Rosslare Enterprises Limited ++ ++OUI:40D8551AC* ++ ID_OUI_FROM_DATABASE=ELAN SYSTEMS ++ ++OUI:40D8551AD* ++ ID_OUI_FROM_DATABASE=WICHER DIGITAL TECHNIK ++ ++OUI:40D8551AE* ++ ID_OUI_FROM_DATABASE=Autonomous Solutions, Inc ++ ++OUI:40D8551AF* ++ ID_OUI_FROM_DATABASE=Vigitron Inc. ++ ++OUI:40D8551B0* ++ ID_OUI_FROM_DATABASE=Shin-ei Electronic Measuring Co.,Ltd. ++ ++OUI:40D8551B1* ++ ID_OUI_FROM_DATABASE=Logos 01 S.r.l. ++ ++OUI:40D8551B2* ++ ID_OUI_FROM_DATABASE=AGE A. Gilg Elektronik ++ ++OUI:40D8551B3* ++ ID_OUI_FROM_DATABASE=BETTINI SRL ++ ++OUI:40D8551B4* ++ ID_OUI_FROM_DATABASE=Inforce Computing Inc. ++ ++OUI:40D8551B5* ++ ID_OUI_FROM_DATABASE=A+EC Klein Ingenieurbuero ++ ++OUI:40D8551B6* ++ ID_OUI_FROM_DATABASE=Magic Systems ++ ++OUI:40D8551B7* ++ ID_OUI_FROM_DATABASE=TEWS Elektronik GmbH & Co. KG ++ ++OUI:40D8551B8* ++ ID_OUI_FROM_DATABASE=Orion Systems, Inc ++ ++OUI:40D8551B9* ++ ID_OUI_FROM_DATABASE=Beking Industrieele automatisering ++ ++OUI:40D8551BA* ++ ID_OUI_FROM_DATABASE=Creative Lighting And Sound Systems Pty Ltd ++ ++OUI:40D8551BB* ++ ID_OUI_FROM_DATABASE=Micromega Dynamics SA ++ ++OUI:40D8551BC* ++ ID_OUI_FROM_DATABASE=KbDevice,Inc. ++ ++OUI:40D8551BD* ++ ID_OUI_FROM_DATABASE=HORIBA ABX ++ ++OUI:40D8551BE* ++ ID_OUI_FROM_DATABASE=PEEK TRAFFIC ++ ++OUI:40D8551BF* ++ ID_OUI_FROM_DATABASE=shanghai mingding information tech co.Ltd ++ ++OUI:40D8551C0* ++ ID_OUI_FROM_DATABASE=NPB Automation AB ++ ++OUI:40D8551C1* ++ ID_OUI_FROM_DATABASE=Triamec Motion AG ++ ++OUI:40D8551C2* ++ ID_OUI_FROM_DATABASE=Digital Display Systems ++ ++OUI:40D8551C3* ++ ID_OUI_FROM_DATABASE=Cornfed Systems LLC ++ ++OUI:40D8551C4* ++ ID_OUI_FROM_DATABASE=QED Advanced Systems Limited ++ ++OUI:40D8551C6* ++ ID_OUI_FROM_DATABASE=Device Solutions Ltd ++ ++OUI:40D8551C7* ++ ID_OUI_FROM_DATABASE=Wexiödisk AB ++ ++OUI:40D8551C8* ++ ID_OUI_FROM_DATABASE=Sensata Technologies ++ ++OUI:40D8551C9* ++ ID_OUI_FROM_DATABASE=Andy-L Ltd. ++ ++OUI:40D8551CA* ++ ID_OUI_FROM_DATABASE=Rigel Engineering ++ ++OUI:40D8551CB* ++ ID_OUI_FROM_DATABASE=MG S.r.l. ++ ++OUI:40D8551CD* ++ ID_OUI_FROM_DATABASE=YXLON International A/S ++ ++OUI:40D8551CE* ++ ID_OUI_FROM_DATABASE=Peter Huber ++ ++OUI:40D8551CF* ++ ID_OUI_FROM_DATABASE=Omnik New Energy Co., Ltd ++ ++OUI:40D8551D0* ++ ID_OUI_FROM_DATABASE=Webeasy BV ++ ++OUI:40D8551D1* ++ ID_OUI_FROM_DATABASE=Founder Broadband Network Service Co.,Ltd. ++ ++OUI:40D8551D2* ++ ID_OUI_FROM_DATABASE=InventLab s.c. ++ ++OUI:40D8551D3* ++ ID_OUI_FROM_DATABASE=Kaluga Teletypes Manufacturing Plant ++ ++OUI:40D8551D4* ++ ID_OUI_FROM_DATABASE=Prisma Engineering srl ++ ++OUI:40D8551D5* ++ ID_OUI_FROM_DATABASE=FST21 Ltd. ++ ++OUI:40D8551D6* ++ ID_OUI_FROM_DATABASE=EMS Computers Pty Ltd ++ ++OUI:40D8551D7* ++ ID_OUI_FROM_DATABASE=Wheatstone Corporation ++ ++OUI:40D8551D8* ++ ID_OUI_FROM_DATABASE=Owl Computing Technologies, Inc. ++ ++OUI:40D8551D9* ++ ID_OUI_FROM_DATABASE=Commercial Wireless Systems International LLC. ++ ++OUI:40D8551DA* ++ ID_OUI_FROM_DATABASE=Energy Technology and Control Ltd. ++ ++OUI:40D8551DB* ++ ID_OUI_FROM_DATABASE=NIPPON TECHNO LAB.,INC, ++ ++OUI:40D8551DC* ++ ID_OUI_FROM_DATABASE=Aplex Technology Inc. ++ ++OUI:40D8551DD* ++ ID_OUI_FROM_DATABASE=BaOpt Benelux bv ++ ++OUI:40D8551DE* ++ ID_OUI_FROM_DATABASE=Vidisys GmbH ++ ++OUI:40D8551DF* ++ ID_OUI_FROM_DATABASE=Chengdu Meihuan Technology Co.,Ltd ++ ++OUI:40D8551E0* ++ ID_OUI_FROM_DATABASE=Embedded Technology Corporation ++ ++OUI:40D8551E1* ++ ID_OUI_FROM_DATABASE=AD QUALITE ++ ++OUI:40D8551E2* ++ ID_OUI_FROM_DATABASE=ELNEC s.r.o. ++ ++OUI:40D8551E3* ++ ID_OUI_FROM_DATABASE=Mega Electronics Ltd ++ + OUI:000000* + ID_OUI_FROM_DATABASE=XEROX CORPORATION + +@@ -13664,7 +13880,7 @@ OUI:000053* + ID_OUI_FROM_DATABASE=COMPUCORP + + OUI:000054* +- ID_OUI_FROM_DATABASE=MODICON, INC. ++ ID_OUI_FROM_DATABASE=Schnieder Electric + + OUI:000055* + ID_OUI_FROM_DATABASE=COMMISSARIAT A L`ENERGIE ATOM. +@@ -13694,7 +13910,7 @@ OUI:00005D* + ID_OUI_FROM_DATABASE=CS TELECOM + + OUI:00005E* +- ID_OUI_FROM_DATABASE=USC INFORMATION SCIENCES INST ++ ID_OUI_FROM_DATABASE=ICANN, IANA Department + + OUI:00005F* + ID_OUI_FROM_DATABASE=SUMITOMO ELECTRIC IND., LTD. +@@ -17957,7 +18173,7 @@ OUI:0005ED* + ID_OUI_FROM_DATABASE=Technikum Joanneum GmbH + + OUI:0005EE* +- ID_OUI_FROM_DATABASE=BEWATOR Group ++ ID_OUI_FROM_DATABASE=Siemens AB, Infrastructure & Cities, Building Technologies Division, IC BT SSP SP BA PR + + OUI:0005EF* + ID_OUI_FROM_DATABASE=ADOIR Digital Technology +@@ -19412,7 +19628,7 @@ OUI:0007D2* + ID_OUI_FROM_DATABASE=Logopak Systeme GmbH & Co. KG + + OUI:0007D3* +- ID_OUI_FROM_DATABASE=Stork Prints B.V. ++ ID_OUI_FROM_DATABASE=SPGPrints B.V. + + OUI:0007D4* + ID_OUI_FROM_DATABASE=Zhejiang Yutong Network Communication Co Ltd. +@@ -19613,7 +19829,7 @@ OUI:000815* + ID_OUI_FROM_DATABASE=CATS Co., Ltd. + + OUI:000816* +- ID_OUI_FROM_DATABASE=Bluetags A/S ++ ID_OUI_FROM_DATABASE=Bluelon ApS + + OUI:000817* + ID_OUI_FROM_DATABASE=EmergeCore Networks LLC +@@ -29819,7 +30035,7 @@ OUI:001587* + ID_OUI_FROM_DATABASE=Takenaka Seisakusho Co.,Ltd + + OUI:001588* +- ID_OUI_FROM_DATABASE=Balda Solution Malaysia Sdn Bhd ++ ID_OUI_FROM_DATABASE=Salutica Allied Solutions Sdn Bhd + + OUI:001589* + ID_OUI_FROM_DATABASE=D-MAX Technology Co.,Ltd +@@ -33935,7 +34151,7 @@ OUI:001AE7* + ID_OUI_FROM_DATABASE=Aztek Networks, Inc. + + OUI:001AE8* +- ID_OUI_FROM_DATABASE=Siemens Enterprise Communications GmbH & Co. KG ++ ID_OUI_FROM_DATABASE=Unify GmbH and Co KG + + OUI:001AE9* + ID_OUI_FROM_DATABASE=Nintendo Co., Ltd. +@@ -36926,7 +37142,7 @@ OUI:001ECC* + ID_OUI_FROM_DATABASE=2Wire, Inc. + + OUI:001ECD* +- ID_OUI_FROM_DATABASE=2Wire, Inc. ++ ID_OUI_FROM_DATABASE=KYLAND Technology Co. LTD + + OUI:001ECE* + ID_OUI_FROM_DATABASE=2Wire, Inc. +@@ -40337,7 +40553,7 @@ OUI:002340* + ID_OUI_FROM_DATABASE=MiX Telematics + + OUI:002341* +- ID_OUI_FROM_DATABASE=Siemens AG, Infrastructure & Cities Sector, Building Technologies Division ++ ID_OUI_FROM_DATABASE=Siemens AB, Infrastructure & Cities, Building Technologies Division, IC BT SSP SP BA PR + + OUI:002342* + ID_OUI_FROM_DATABASE=Coffee Equipment Company +@@ -42200,7 +42416,7 @@ OUI:0025B8* + ID_OUI_FROM_DATABASE=Agile Communications, Inc. + + OUI:0025B9* +- ID_OUI_FROM_DATABASE=Agilink Systems Corp. ++ ID_OUI_FROM_DATABASE=Cypress Solutions Inc + + OUI:0025BA* + ID_OUI_FROM_DATABASE=Alcatel-Lucent IPD +@@ -44405,7 +44621,7 @@ OUI:004065* + ID_OUI_FROM_DATABASE=GTE SPACENET + + OUI:004066* +- ID_OUI_FROM_DATABASE=HITACHI CABLE, LTD. ++ ID_OUI_FROM_DATABASE=Hitachi Metals, Ltd. + + OUI:004067* + ID_OUI_FROM_DATABASE=OMNIBYTE CORPORATION +@@ -46100,7 +46316,7 @@ OUI:0060A3* + ID_OUI_FROM_DATABASE=CONTINUUM TECHNOLOGY CORP. + + OUI:0060A4* +- ID_OUI_FROM_DATABASE=GRINAKER SYSTEM TECHNOLOGIES ++ ID_OUI_FROM_DATABASE=GEW Technologies (PTY)Ltd + + OUI:0060A5* + ID_OUI_FROM_DATABASE=PERFORMANCE TELECOM CORP. +@@ -46904,7 +47120,7 @@ OUI:0080A1* + ID_OUI_FROM_DATABASE=MICROTEST, INC. + + OUI:0080A2* +- ID_OUI_FROM_DATABASE=Tattile SRL ++ ID_OUI_FROM_DATABASE=CREATIVE ELECTRONIC SYSTEMS + + OUI:0080A3* + ID_OUI_FROM_DATABASE=Lantronix +@@ -47188,6 +47404,9 @@ OUI:0080FF* + OUI:008865* + ID_OUI_FROM_DATABASE=Apple + ++OUI:008B43* ++ ID_OUI_FROM_DATABASE=RFTECH ++ + OUI:008C10* + ID_OUI_FROM_DATABASE=Black Box Corp. + +@@ -47980,6 +48199,9 @@ OUI:0091D6* + OUI:0091FA* + ID_OUI_FROM_DATABASE=Synapse Product Development + ++OUI:0092FA* ++ ID_OUI_FROM_DATABASE=SHENZHEN WISKY TECHNOLOGY CO.,LTD ++ + OUI:009363* + ID_OUI_FROM_DATABASE=Uni-Link Technology Co., Ltd. + +@@ -51340,6 +51562,9 @@ OUI:00E8AB* + OUI:00EB2D* + ID_OUI_FROM_DATABASE=Sony Mobile Communications AB + ++OUI:00EEBD* ++ ID_OUI_FROM_DATABASE=HTC Corporation ++ + OUI:00F051* + ID_OUI_FROM_DATABASE=KWB Gmbh + +@@ -51481,6 +51706,9 @@ OUI:044BFF* + OUI:044CEF* + ID_OUI_FROM_DATABASE=Fujian Sanao Technology Co.,Ltd + ++OUI:044E06* ++ ID_OUI_FROM_DATABASE=Ericsson AB ++ + OUI:044F8B* + ID_OUI_FROM_DATABASE=Adapteva, Inc. + +@@ -51628,6 +51856,9 @@ OUI:04DAD2* + OUI:04DB56* + ID_OUI_FROM_DATABASE=Apple, Inc. + ++OUI:04DB8A* ++ ID_OUI_FROM_DATABASE=Suntech International Ltd. ++ + OUI:04DD4C* + ID_OUI_FROM_DATABASE=Velocytech + +@@ -51664,6 +51895,9 @@ OUI:04EE91* + OUI:04F021* + ID_OUI_FROM_DATABASE=Compex Systems Pte Ltd + ++OUI:04F13E* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:04F17D* + ID_OUI_FROM_DATABASE=Tarana Wireless + +@@ -52117,6 +52351,12 @@ OUI:08008F* + OUI:080090* + ID_OUI_FROM_DATABASE=SONOMA SYSTEMS + ++OUI:080371* ++ ID_OUI_FROM_DATABASE=KRG CORPORATE ++ ++OUI:0805CD* ++ ID_OUI_FROM_DATABASE=DongGuang EnMai Electronic Product Co.Ltd. ++ + OUI:0808C2* + ID_OUI_FROM_DATABASE=Samsung Electronics + +@@ -52204,12 +52444,21 @@ OUI:083E0C* + OUI:083E8E* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind.Co.Ltd + ++OUI:083F3E* ++ ID_OUI_FROM_DATABASE=WSH GmbH ++ ++OUI:083F76* ++ ID_OUI_FROM_DATABASE=Intellian Technologies, Inc. ++ + OUI:084027* + ID_OUI_FROM_DATABASE=Gridstore Inc. + + OUI:08482C* + ID_OUI_FROM_DATABASE=Raycore Taiwan Co., LTD. + ++OUI:084929* ++ ID_OUI_FROM_DATABASE=CYBATI ++ + OUI:084E1C* + ID_OUI_FROM_DATABASE=H2A Systems, LLC + +@@ -52222,6 +52471,9 @@ OUI:08512E* + OUI:085240* + ID_OUI_FROM_DATABASE=EbV Elektronikbau- und Vertriebs GmbH + ++OUI:085700* ++ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. ++ + OUI:085AE0* + ID_OUI_FROM_DATABASE=Recovision Technology Co., Ltd. + +@@ -52240,6 +52492,9 @@ OUI:0868D0* + OUI:0868EA* + ID_OUI_FROM_DATABASE=EITO ELECTRONICS CO., LTD. + ++OUI:086DF2* ++ ID_OUI_FROM_DATABASE=Shenzhen MIMOWAVE Technology Co.,Ltd ++ + OUI:087045* + ID_OUI_FROM_DATABASE=Apple + +@@ -52450,6 +52705,9 @@ OUI:0C3956* + OUI:0C3C65* + ID_OUI_FROM_DATABASE=Dome Imaging Inc + ++OUI:0C3E9F* ++ ID_OUI_FROM_DATABASE=Apple, Inc ++ + OUI:0C469D* + ID_OUI_FROM_DATABASE=MS Sedco + +@@ -52462,6 +52720,9 @@ OUI:0C4C39* + OUI:0C4DE9* + ID_OUI_FROM_DATABASE=Apple + ++OUI:0C4F5A* ++ ID_OUI_FROM_DATABASE=ASA-RT s.r.l. ++ + OUI:0C51F7* + ID_OUI_FROM_DATABASE=CHAUVIN ARNOUX + +@@ -52597,6 +52858,9 @@ OUI:0CC0C0* + OUI:0CC3A7* + ID_OUI_FROM_DATABASE=Meritec + ++OUI:0CC47A* ++ ID_OUI_FROM_DATABASE=Super Micro Computer, Inc. ++ + OUI:0CC47E* + ID_OUI_FROM_DATABASE=EUCAST Co., Ltd. + +@@ -52657,6 +52921,9 @@ OUI:0CDDEF* + OUI:0CDFA4* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:0CE0E4* ++ ID_OUI_FROM_DATABASE=Plantronics, Inc ++ + OUI:0CE5D3* + ID_OUI_FROM_DATABASE=DH electronics GmbH + +@@ -52765,6 +53032,9 @@ OUI:101F74* + OUI:102279* + ID_OUI_FROM_DATABASE=ZeroDesktop, Inc. + ++OUI:1027BE* ++ ID_OUI_FROM_DATABASE=TVIP ++ + OUI:102831* + ID_OUI_FROM_DATABASE=Morion Inc. + +@@ -52954,6 +53224,12 @@ OUI:10D542* + OUI:10DDB1* + ID_OUI_FROM_DATABASE=Apple + ++OUI:10DDF4* ++ ID_OUI_FROM_DATABASE=Maxway Electronics CO.,LTD ++ ++OUI:10DEE4* ++ ID_OUI_FROM_DATABASE=automationNEXT GmbH ++ + OUI:10E2D5* + ID_OUI_FROM_DATABASE=Qi Hardware Inc. + +@@ -53155,6 +53431,12 @@ OUI:14B1C8* + OUI:14B73D* + ID_OUI_FROM_DATABASE=ARCHEAN Technologies + ++OUI:14B968* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ ++OUI:14C089* ++ ID_OUI_FROM_DATABASE=DUNE HD LTD ++ + OUI:14C21D* + ID_OUI_FROM_DATABASE=Sabtech Industries + +@@ -53275,6 +53557,9 @@ OUI:182012* + OUI:182032* + ID_OUI_FROM_DATABASE=Apple + ++OUI:1820A6* ++ ID_OUI_FROM_DATABASE=Sage Co., Ltd. ++ + OUI:182666* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -53386,6 +53671,9 @@ OUI:1880CE* + OUI:1880F5* + ID_OUI_FROM_DATABASE=Alcatel-Lucent Shanghai Bell Co., Ltd + ++OUI:188331* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:188410* + ID_OUI_FROM_DATABASE=CoreTrust Inc. + +@@ -53401,6 +53689,9 @@ OUI:188796* + OUI:188857* + ID_OUI_FROM_DATABASE=Beijing Jinhong Xi-Dian Information Technology Corp. + ++OUI:1889DF* ++ ID_OUI_FROM_DATABASE=CerebrEX Inc. ++ + OUI:188ED5* + ID_OUI_FROM_DATABASE=TP Vision Belgium N.V. - innovation site Brugge + +@@ -53491,6 +53782,9 @@ OUI:18E288* + OUI:18E2C2* + ID_OUI_FROM_DATABASE=Samsung Electronics + ++OUI:18E728* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:18E7F4* + ID_OUI_FROM_DATABASE=Apple + +@@ -53521,6 +53815,9 @@ OUI:18FC9F* + OUI:18FE34* + ID_OUI_FROM_DATABASE=Espressif Inc. + ++OUI:18FF2E* ++ ID_OUI_FROM_DATABASE=Shenzhen Rui Ying Da Technology Co., Ltd ++ + OUI:1C0656* + ID_OUI_FROM_DATABASE=IDY Corporation + +@@ -53551,6 +53848,9 @@ OUI:1C184A* + OUI:1C19DE* + ID_OUI_FROM_DATABASE=eyevis GmbH + ++OUI:1C1B68* ++ ID_OUI_FROM_DATABASE=ARRIS Group, Inc. ++ + OUI:1C1D67* + ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd + +@@ -53707,6 +54007,9 @@ OUI:1CA770* + OUI:1CAA07* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:1CAB01* ++ ID_OUI_FROM_DATABASE=Innovolt ++ + OUI:1CABA7* + ID_OUI_FROM_DATABASE=Apple + +@@ -53770,6 +54073,9 @@ OUI:1CE62B* + OUI:1CE6C7* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:1CEEE8* ++ ID_OUI_FROM_DATABASE=Ilshin Elecom ++ + OUI:1CF061* + ID_OUI_FROM_DATABASE=SCAPS GmbH + +@@ -53779,6 +54085,9 @@ OUI:1CF5E7* + OUI:1CFA68* + ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. + ++OUI:1CFCBB* ++ ID_OUI_FROM_DATABASE=Realfiction ApS ++ + OUI:1CFEA7* + ID_OUI_FROM_DATABASE=IDentytech Solutins Ltd. + +@@ -53794,12 +54103,21 @@ OUI:200505* + OUI:2005E8* + ID_OUI_FROM_DATABASE=OOO InProMedia + ++OUI:2008ED* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:200A5E* + ID_OUI_FROM_DATABASE=Xiangshan Giant Eagle Technology Developing co.,LTD + + OUI:200BC7* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + ++OUI:200CC8* ++ ID_OUI_FROM_DATABASE=NETGEAR INC., ++ ++OUI:200E95* ++ ID_OUI_FROM_DATABASE=IEC – TC9 WG43 ++ + OUI:20107A* + ID_OUI_FROM_DATABASE=Gemtek Technology Co., Ltd. + +@@ -53917,6 +54235,9 @@ OUI:207D74* + OUI:20858C* + ID_OUI_FROM_DATABASE=Assa + ++OUI:2087AC* ++ ID_OUI_FROM_DATABASE=AES motomation ++ + OUI:208984* + ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD + +@@ -54022,6 +54343,9 @@ OUI:20E564* + OUI:20E791* + ID_OUI_FROM_DATABASE=Siemens Healthcare Diagnostics, Inc + ++OUI:20EAC7* ++ ID_OUI_FROM_DATABASE=SHENZHEN RIOPINE ELECTRONICS CO., LTD ++ + OUI:20EEC6* + ID_OUI_FROM_DATABASE=Elefirst Science & Tech Co ., ltd + +@@ -54070,6 +54394,9 @@ OUI:241064* + OUI:241125* + ID_OUI_FROM_DATABASE=Hutek Co., Ltd. + ++OUI:241148* ++ ID_OUI_FROM_DATABASE=Entropix, LLC ++ + OUI:2411D0* + ID_OUI_FROM_DATABASE=Chongqing Ehs Science and Technology Development Co.,Ltd. + +@@ -54085,6 +54412,9 @@ OUI:241F2C* + OUI:2421AB* + ID_OUI_FROM_DATABASE=Sony Ericsson Mobile Communications + ++OUI:242642* ++ ID_OUI_FROM_DATABASE=SHARP Corporation. ++ + OUI:242FFA* + ID_OUI_FROM_DATABASE=Toshiba Global Commerce Solutions + +@@ -54328,6 +54658,9 @@ OUI:281878* + OUI:2818FD* + ID_OUI_FROM_DATABASE=Aditya Infotech Ltd. + ++OUI:282246* ++ ID_OUI_FROM_DATABASE=Beijing Sinoix Communication Co., LTD ++ + OUI:2826A6* + ID_OUI_FROM_DATABASE=PBR electronics GmbH + +@@ -54397,6 +54730,12 @@ OUI:286046* + OUI:286094* + ID_OUI_FROM_DATABASE=CAPELEC + ++OUI:286336* ++ ID_OUI_FROM_DATABASE=Siemens AG - Industrial Automation - EWA ++ ++OUI:28656B* ++ ID_OUI_FROM_DATABASE=Keystone Microtech Corporation ++ + OUI:286AB8* + ID_OUI_FROM_DATABASE=Apple + +@@ -54451,6 +54790,9 @@ OUI:28987B* + OUI:289A4B* + ID_OUI_FROM_DATABASE=SteelSeries ApS + ++OUI:289AFA* ++ ID_OUI_FROM_DATABASE=TCT Mobile Limited ++ + OUI:289EDF* + ID_OUI_FROM_DATABASE=Danfoss Turbocor Compressors, Inc + +@@ -54487,6 +54829,9 @@ OUI:28BA18* + OUI:28BAB5* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:28BB59* ++ ID_OUI_FROM_DATABASE=RNET Technologies, Inc. ++ + OUI:28BE9B* + ID_OUI_FROM_DATABASE=Technicolor USA Inc. + +@@ -54502,6 +54847,9 @@ OUI:28C68E* + OUI:28C718* + ID_OUI_FROM_DATABASE=Altierre + ++OUI:28C825* ++ ID_OUI_FROM_DATABASE=DellKing Industrial Co., Ltd ++ + OUI:28C914* + ID_OUI_FROM_DATABASE=Taimag Corporation + +@@ -54547,6 +54895,9 @@ OUI:28D997* + OUI:28DB81* + ID_OUI_FROM_DATABASE=Shanghai Guao Electronic Technology Co., Ltd + ++OUI:28DEF6* ++ ID_OUI_FROM_DATABASE=bioMerieux Inc. ++ + OUI:28E02C* + ID_OUI_FROM_DATABASE=Apple + +@@ -54598,6 +54949,9 @@ OUI:2C00F7* + OUI:2C0623* + ID_OUI_FROM_DATABASE=Win Leader Inc. + ++OUI:2C073C* ++ ID_OUI_FROM_DATABASE=DEVLINE LIMITED ++ + OUI:2C10C1* + ID_OUI_FROM_DATABASE=Nintendo Co., Ltd. + +@@ -54655,6 +55009,9 @@ OUI:2C3A28* + OUI:2C3BFD* + ID_OUI_FROM_DATABASE=Netstor Technology Co., Ltd. + ++OUI:2C3ECF* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:2C3F38* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + +@@ -54673,6 +55030,9 @@ OUI:2C441B* + OUI:2C44FD* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:2C534A* ++ ID_OUI_FROM_DATABASE=Shenzhen Winyao Electronic Limited ++ + OUI:2C542D* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + +@@ -54748,6 +55108,9 @@ OUI:2C922C* + OUI:2C9464* + ID_OUI_FROM_DATABASE=Cincoze Co., Ltd. + ++OUI:2C957F* ++ ID_OUI_FROM_DATABASE=zte corporation ++ + OUI:2C9717* + ID_OUI_FROM_DATABASE=I.C.Y. B.V. + +@@ -55009,6 +55372,9 @@ OUI:3092F6* + OUI:309BAD* + ID_OUI_FROM_DATABASE=BBK Electronics Corp., Ltd., + ++OUI:30A8DB* ++ ID_OUI_FROM_DATABASE=Sony Mobile Communications AB ++ + OUI:30AABD* + ID_OUI_FROM_DATABASE=Shanghai Reallytek Information Technology Co.,Ltd + +@@ -55024,6 +55390,12 @@ OUI:30B216* + OUI:30B3A2* + ID_OUI_FROM_DATABASE=Shenzhen Heguang Measurement & Control Technology Co.,Ltd + ++OUI:30B5C2* ++ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. ++ ++OUI:30C750* ++ ID_OUI_FROM_DATABASE=MIC Technology Group ++ + OUI:30C82A* + ID_OUI_FROM_DATABASE=Wi-Next s.r.l. + +@@ -55060,6 +55432,9 @@ OUI:30F31D* + OUI:30F33A* + ID_OUI_FROM_DATABASE=+plugg srl + ++OUI:30F42F* ++ ID_OUI_FROM_DATABASE=ESP ++ + OUI:30F70D* + ID_OUI_FROM_DATABASE=Cisco Systems + +@@ -55087,6 +55462,9 @@ OUI:3413E8* + OUI:34159E* + ID_OUI_FROM_DATABASE=Apple + ++OUI:3417EB* ++ ID_OUI_FROM_DATABASE=Dell Inc PCBA Test ++ + OUI:341A4C* + ID_OUI_FROM_DATABASE=SHENZHEN WEIBU ELECTRONICS CO.,LTD. + +@@ -55117,6 +55495,9 @@ OUI:343111* + OUI:3440B5* + ID_OUI_FROM_DATABASE=IBM + ++OUI:34466F* ++ ID_OUI_FROM_DATABASE=HiTEM Engineering ++ + OUI:344B3D* + ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Tech.Co.,Ltd. + +@@ -55126,6 +55507,9 @@ OUI:344B50* + OUI:344F3F* + ID_OUI_FROM_DATABASE=IO-Power Technology Co., Ltd. + ++OUI:344F5C* ++ ID_OUI_FROM_DATABASE=R&M AG ++ + OUI:344F69* + ID_OUI_FROM_DATABASE=EKINOPS SAS + +@@ -55318,6 +55702,12 @@ OUI:34D7B4* + OUI:34DBFD* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:34DE1A* ++ ID_OUI_FROM_DATABASE=Intel Corporate ++ ++OUI:34DE34* ++ ID_OUI_FROM_DATABASE=zte corporation ++ + OUI:34DF2A* + ID_OUI_FROM_DATABASE=Fujikon Industrial Co.,Limited + +@@ -55456,6 +55846,9 @@ OUI:386793* + OUI:386BBB* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + ++OUI:386C9B* ++ ID_OUI_FROM_DATABASE=Ivy Biomedical ++ + OUI:386E21* + ID_OUI_FROM_DATABASE=Wasion Group Ltd. + +@@ -55576,9 +55969,15 @@ OUI:38ECE4* + OUI:38EE9D* + ID_OUI_FROM_DATABASE=Anedo Ltd. + ++OUI:38F098* ++ ID_OUI_FROM_DATABASE=Vapor Stone Rail Systems ++ + OUI:38F597* + ID_OUI_FROM_DATABASE=home2net GmbH + ++OUI:38F708* ++ ID_OUI_FROM_DATABASE=National Resource Management, Inc. ++ + OUI:38F8B7* + ID_OUI_FROM_DATABASE=V2COM PARTICIPACOES S.A. + +@@ -55603,9 +56002,15 @@ OUI:3C0771* + OUI:3C081E* + ID_OUI_FROM_DATABASE=Beijing Yupont Electric Power Technology Co.,Ltd + ++OUI:3C08F6* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:3C096D* + ID_OUI_FROM_DATABASE=Powerhouse Dynamics + ++OUI:3C0C48* ++ ID_OUI_FROM_DATABASE=Servergy, Inc. ++ + OUI:3C0E23* + ID_OUI_FROM_DATABASE=Cisco + +@@ -55639,6 +56044,9 @@ OUI:3C1A79* + OUI:3C1CBE* + ID_OUI_FROM_DATABASE=JADAK LLC + ++OUI:3C25D7* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:3C26D5* + ID_OUI_FROM_DATABASE=Sotera Wireless + +@@ -55744,6 +56152,9 @@ OUI:3C83B5* + OUI:3C86A8* + ID_OUI_FROM_DATABASE=Sangshin elecom .co,, LTD + ++OUI:3C89A6* ++ ID_OUI_FROM_DATABASE=KAPELSE ++ + OUI:3C8AB0* + ID_OUI_FROM_DATABASE=Juniper Networks + +@@ -55837,6 +56248,9 @@ OUI:3CD92B* + OUI:3CDF1E* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:3CDFBD* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:3CE072* + ID_OUI_FROM_DATABASE=Apple + +@@ -55870,6 +56284,9 @@ OUI:3CF748* + OUI:3CFB96* + ID_OUI_FROM_DATABASE=Emcraft Systems LLC + ++OUI:400107* ++ ID_OUI_FROM_DATABASE=Arista Corp ++ + OUI:4001C6* + ID_OUI_FROM_DATABASE=3COM EUROPE LTD + +@@ -55948,6 +56365,9 @@ OUI:40406B* + OUI:404A03* + ID_OUI_FROM_DATABASE=ZyXEL Communications Corporation + ++OUI:404A18* ++ ID_OUI_FROM_DATABASE=Addrek Smart Solutions ++ + OUI:404D8E* + ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd + +@@ -56011,6 +56431,9 @@ OUI:407074* + OUI:407496* + ID_OUI_FROM_DATABASE=aFUN TECHNOLOGY INC. + ++OUI:407875* ++ ID_OUI_FROM_DATABASE=IMBEL - Industria de Material Belico do Brasil ++ + OUI:407A80* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -56059,6 +56482,9 @@ OUI:40A6A4* + OUI:40A6D9* + ID_OUI_FROM_DATABASE=Apple + ++OUI:40A8F0* ++ ID_OUI_FROM_DATABASE=Hewlett Packard ++ + OUI:40AC8D* + ID_OUI_FROM_DATABASE=Data Management, Inc. + +@@ -56164,6 +56590,9 @@ OUI:4403A7* + OUI:440CFD* + ID_OUI_FROM_DATABASE=NetMan Co., Ltd. + ++OUI:4411C2* ++ ID_OUI_FROM_DATABASE=Telegartner Karl Gartner GmbH ++ + OUI:441319* + ID_OUI_FROM_DATABASE=WKK TECHNOLOGY LTD. + +@@ -56182,6 +56611,9 @@ OUI:4423AA* + OUI:4425BB* + ID_OUI_FROM_DATABASE=Bamboo Entertainment Corporation + ++OUI:442938* ++ ID_OUI_FROM_DATABASE=NietZsche enterprise Co.Ltd. ++ + OUI:442A60* + ID_OUI_FROM_DATABASE=Apple + +@@ -56230,6 +56662,9 @@ OUI:443D21* + OUI:443EB2* + ID_OUI_FROM_DATABASE=DEOTRON Co., LTD. + ++OUI:444891* ++ ID_OUI_FROM_DATABASE=HDMI Licensing, LLC ++ + OUI:444A65* + ID_OUI_FROM_DATABASE=Silverflare Ltd. + +@@ -56287,6 +56722,9 @@ OUI:446D57* + OUI:44700B* + ID_OUI_FROM_DATABASE=IFFU + ++OUI:447098* ++ ID_OUI_FROM_DATABASE=MING HONG TECHNOLOGY (SHEN ZHEN) LIMITED ++ + OUI:447BC4* + ID_OUI_FROM_DATABASE=DualShine Technology(SZ)Co.,Ltd + +@@ -56296,6 +56734,9 @@ OUI:447C7F* + OUI:447DA5* + ID_OUI_FROM_DATABASE=VTION INFORMATION TECHNOLOGY (FUJIAN) CO.,LTD + ++OUI:447E76* ++ ID_OUI_FROM_DATABASE=Trek Technology (S) Pte Ltd ++ + OUI:447E95* + ID_OUI_FROM_DATABASE=Alpha and Omega, Inc + +@@ -56365,6 +56806,9 @@ OUI:44C15C* + OUI:44C233* + ID_OUI_FROM_DATABASE=Guangzhou Comet Technology Development Co.Ltd + ++OUI:44C306* ++ ID_OUI_FROM_DATABASE=SIFROM Inc. ++ + OUI:44C39B* + ID_OUI_FROM_DATABASE=OOO RUBEZH NPO + +@@ -56443,6 +56887,9 @@ OUI:4813F3* + OUI:48174C* + ID_OUI_FROM_DATABASE=MicroPower technologies + ++OUI:481842* ++ ID_OUI_FROM_DATABASE=Shanghai Winaas Co. Equipment Co. Ltd. ++ + OUI:481BD2* + ID_OUI_FROM_DATABASE=Intron Scientific co., ltd. + +@@ -56458,6 +56905,9 @@ OUI:4833DD* + OUI:48343D* + ID_OUI_FROM_DATABASE=IEP GmbH + ++OUI:483D32* ++ ID_OUI_FROM_DATABASE=Syscor Controls & Automation ++ + OUI:484487* + ID_OUI_FROM_DATABASE=Cisco SPVTG + +@@ -56476,6 +56926,9 @@ OUI:485261* + OUI:485A3F* + ID_OUI_FROM_DATABASE=WISOL + ++OUI:485AB6* ++ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. ++ + OUI:485B39* + ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. + +@@ -56500,6 +56953,9 @@ OUI:486FD2* + OUI:487119* + ID_OUI_FROM_DATABASE=SGB GROUP LTD. + ++OUI:48746E* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:488E42* + ID_OUI_FROM_DATABASE=DIGALOG GmbH + +@@ -56530,6 +56986,9 @@ OUI:48AA5D* + OUI:48B253* + ID_OUI_FROM_DATABASE=Marketaxess Corporation + ++OUI:48B5A7* ++ ID_OUI_FROM_DATABASE=Glory Horse Industries Ltd. ++ + OUI:48B8DE* + ID_OUI_FROM_DATABASE=HOMEWINS TECHNOLOGY CO.,LTD. + +@@ -56554,6 +57013,9 @@ OUI:48C8B6* + OUI:48CB6E* + ID_OUI_FROM_DATABASE=Cello Electronics (UK) Ltd + ++OUI:48D0CF* ++ ID_OUI_FROM_DATABASE=Universal Electronics, Inc. ++ + OUI:48D224* + ID_OUI_FROM_DATABASE=Liteon Technology Corporation + +@@ -56584,6 +57046,12 @@ OUI:48EB30* + OUI:48ED80* + ID_OUI_FROM_DATABASE=daesung eltec + ++OUI:48EE07* ++ ID_OUI_FROM_DATABASE=Silver Palm Technologies LLC ++ ++OUI:48EE86* ++ ID_OUI_FROM_DATABASE=UTStarcom (China) Co.,Ltd ++ + OUI:48F230* + ID_OUI_FROM_DATABASE=Ubizcore Co.,LTD + +@@ -56605,6 +57073,9 @@ OUI:48F925* + OUI:48FCB8* + ID_OUI_FROM_DATABASE=Woodstream Corporation + ++OUI:48FEEA* ++ ID_OUI_FROM_DATABASE=HOMA B.V. ++ + OUI:4C0082* + ID_OUI_FROM_DATABASE=Cisco + +@@ -56626,6 +57097,9 @@ OUI:4C09B4* + OUI:4C0B3A* + ID_OUI_FROM_DATABASE=TCT Mobile Limited + ++OUI:4C0DEE* ++ ID_OUI_FROM_DATABASE=JABIL CIRCUIT (SHANGHAI) LTD. ++ + OUI:4C0F6E* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -56746,6 +57220,9 @@ OUI:4C7897* + OUI:4C79BA* + ID_OUI_FROM_DATABASE=Intel Corporate + ++OUI:4C7F62* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:4C804F* + ID_OUI_FROM_DATABASE=Armstrong Monitoring Corp + +@@ -56755,6 +57232,9 @@ OUI:4C8093* + OUI:4C82CF* + ID_OUI_FROM_DATABASE=Echostar Technologies + ++OUI:4C8B30* ++ ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc ++ + OUI:4C8B55* + ID_OUI_FROM_DATABASE=Grupo Digicon + +@@ -56779,6 +57259,9 @@ OUI:4C9E80* + OUI:4C9EE4* + ID_OUI_FROM_DATABASE=Hanyang Navicom Co.,Ltd. + ++OUI:4CA56D* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:4CA74B* + ID_OUI_FROM_DATABASE=Alcatel Lucent + +@@ -56833,6 +57316,9 @@ OUI:4CCC34* + OUI:4CD637* + ID_OUI_FROM_DATABASE=Qsono Electronics Co., Ltd + ++OUI:4CD7B6* ++ ID_OUI_FROM_DATABASE=Helmer Scientific ++ + OUI:4CD9C4* + ID_OUI_FROM_DATABASE=Magneti Marelli Automotive Electronics (Guangzhou) Co. Ltd + +@@ -56854,6 +57340,9 @@ OUI:4CEDDE* + OUI:4CF02E* + ID_OUI_FROM_DATABASE=Vifa Denmark A/S + ++OUI:4CF45B* ++ ID_OUI_FROM_DATABASE=Blue Clover Devices ++ + OUI:4CF737* + ID_OUI_FROM_DATABASE=SamJi Electronics Co., Ltd + +@@ -56884,6 +57373,9 @@ OUI:5017FF* + OUI:501AC5* + ID_OUI_FROM_DATABASE=Microsoft + ++OUI:501CBF* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:50206B* + ID_OUI_FROM_DATABASE=Emerson Climate Technologies Transportation Solutions + +@@ -56950,6 +57442,9 @@ OUI:504F94* + OUI:505663* + ID_OUI_FROM_DATABASE=Texas Instruments + ++OUI:5056A8* ++ ID_OUI_FROM_DATABASE=Jolla Ltd ++ + OUI:5057A8* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + +@@ -56959,6 +57454,9 @@ OUI:505AC6* + OUI:506028* + ID_OUI_FROM_DATABASE=Xirrus Inc. + ++OUI:506184* ++ ID_OUI_FROM_DATABASE=Avaya, Inc ++ + OUI:5061D6* + ID_OUI_FROM_DATABASE=Indu-Sol GmbH + +@@ -57025,6 +57523,9 @@ OUI:509871* + OUI:509F27* + ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd + ++OUI:50A054* ++ ID_OUI_FROM_DATABASE=Actineon ++ + OUI:50A0BF* + ID_OUI_FROM_DATABASE=Alba Fiber Systems Inc. + +@@ -57046,6 +57547,9 @@ OUI:50ABBF* + OUI:50AF73* + ID_OUI_FROM_DATABASE=Shenzhen Bitland Information Technology Co., Ltd. + ++OUI:50B695* ++ ID_OUI_FROM_DATABASE=Micropoint Biotechnologies,Inc. ++ + OUI:50B7C3* + ID_OUI_FROM_DATABASE=Samsung Electronics CO., LTD + +@@ -57163,6 +57667,9 @@ OUI:5422F8* + OUI:542696* + ID_OUI_FROM_DATABASE=Apple + ++OUI:54271E* ++ ID_OUI_FROM_DATABASE=AzureWave Technonloies, Inc. ++ + OUI:542A9C* + ID_OUI_FROM_DATABASE=LSY Defense, LLC. + +@@ -57175,6 +57682,9 @@ OUI:542F89* + OUI:543131* + ID_OUI_FROM_DATABASE=Raster Vision Ltd + ++OUI:543530* ++ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. ++ + OUI:5435DF* + ID_OUI_FROM_DATABASE=Symeo GmbH + +@@ -57214,6 +57724,9 @@ OUI:545FA9* + OUI:5461EA* + ID_OUI_FROM_DATABASE=Zaplox AB + ++OUI:54724F* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:547398* + ID_OUI_FROM_DATABASE=Toyo Electronics Corporation + +@@ -57274,6 +57787,9 @@ OUI:549D85* + OUI:54A04F* + ID_OUI_FROM_DATABASE=t-mac Technologies Ltd + ++OUI:54A31B* ++ ID_OUI_FROM_DATABASE=Shenzhen Linkworld Technology Co,.LTD ++ + OUI:54A51B* + ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd + +@@ -57286,6 +57802,9 @@ OUI:54A619* + OUI:54A9D4* + ID_OUI_FROM_DATABASE=Minibar Systems + ++OUI:54AE27* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:54B620* + ID_OUI_FROM_DATABASE=SUHDOL E&C Co.Ltd. + +@@ -57295,9 +57814,15 @@ OUI:54BEF7* + OUI:54CDA7* + ID_OUI_FROM_DATABASE=Fujian Shenzhou Electronic Co.,Ltd + ++OUI:54CDEE* ++ ID_OUI_FROM_DATABASE=ShenZhen Apexis Electronic Co.,Ltd ++ + OUI:54D0ED* + ID_OUI_FROM_DATABASE=AXIM Communications + ++OUI:54D163* ++ ID_OUI_FROM_DATABASE=MAX-TECH,INC ++ + OUI:54D1B0* + ID_OUI_FROM_DATABASE=Universal Laser Systems, Inc + +@@ -57310,6 +57835,9 @@ OUI:54DF63* + OUI:54E032* + ID_OUI_FROM_DATABASE=Juniper Networks + ++OUI:54E2E0* ++ ID_OUI_FROM_DATABASE=Pace plc ++ + OUI:54E3B0* + ID_OUI_FROM_DATABASE=JVL Industri Elektronik + +@@ -57337,6 +57865,9 @@ OUI:54FB58* + OUI:54FDBF* + ID_OUI_FROM_DATABASE=Scheidt & Bachmann GmbH + ++OUI:580528* ++ ID_OUI_FROM_DATABASE=LABRIS NETWORKS ++ + OUI:580556* + ID_OUI_FROM_DATABASE=Elettronica GF S.r.L. + +@@ -57346,6 +57877,9 @@ OUI:5808FA* + OUI:5809E5* + ID_OUI_FROM_DATABASE=Kivic Inc. + ++OUI:580A20* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:581243* + ID_OUI_FROM_DATABASE=AcSiP Technology Corp. + +@@ -57394,6 +57928,9 @@ OUI:5846E1* + OUI:5848C0* + ID_OUI_FROM_DATABASE=COFLEC + ++OUI:58493B* ++ ID_OUI_FROM_DATABASE=Palo Alto Networks ++ + OUI:5849BA* + ID_OUI_FROM_DATABASE=Chitai Electronic Corp. + +@@ -57406,6 +57943,9 @@ OUI:584CEE* + OUI:585076* + ID_OUI_FROM_DATABASE=Linear Equipamentos Eletronicos SA + ++OUI:5850AB* ++ ID_OUI_FROM_DATABASE=TLS Corporation ++ + OUI:5850E6* + ID_OUI_FROM_DATABASE=Best Buy Corporation + +@@ -57493,6 +58033,9 @@ OUI:589835* + OUI:58986F* + ID_OUI_FROM_DATABASE=Revolution Display + ++OUI:589CFC* ++ ID_OUI_FROM_DATABASE=FreeBSD Foundation ++ + OUI:58A2B5* + ID_OUI_FROM_DATABASE=LG Electronics + +@@ -57628,6 +58171,9 @@ OUI:5C22C4* + OUI:5C2479* + ID_OUI_FROM_DATABASE=Baltech AG + ++OUI:5C254C* ++ ID_OUI_FROM_DATABASE=Avire Global Pte Ltd ++ + OUI:5C260A* + ID_OUI_FROM_DATABASE=Dell Inc. + +@@ -57757,6 +58303,9 @@ OUI:5CBD9E* + OUI:5CC213* + ID_OUI_FROM_DATABASE=Fr. Sauter AG + ++OUI:5CC5D4* ++ ID_OUI_FROM_DATABASE=Intel Corporate ++ + OUI:5CC6D0* + ID_OUI_FROM_DATABASE=Skyworth Digital technology(shenzhen)co.ltd. + +@@ -57808,6 +58357,9 @@ OUI:5CE286* + OUI:5CE2F4* + ID_OUI_FROM_DATABASE=AcSiP Technology Corp. + ++OUI:5CE7BF* ++ ID_OUI_FROM_DATABASE=New Singularity International Technical Development Co.,Ltd ++ + OUI:5CE8EB* + ID_OUI_FROM_DATABASE=Samsung Electronics + +@@ -57826,6 +58378,9 @@ OUI:5CF370* + OUI:5CF3FC* + ID_OUI_FROM_DATABASE=IBM Corp + ++OUI:5CF50D* ++ ID_OUI_FROM_DATABASE=Institute of microelectronic applications ++ + OUI:5CF6DC* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,LTD + +@@ -57847,6 +58402,9 @@ OUI:5CFFFF* + OUI:6002B4* + ID_OUI_FROM_DATABASE=Wistron NeWeb Corp. + ++OUI:600308* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:600347* + ID_OUI_FROM_DATABASE=Billion Electric Co. Ltd. + +@@ -57874,6 +58432,9 @@ OUI:601D0F* + OUI:601E02* + ID_OUI_FROM_DATABASE=EltexAlatau + ++OUI:602103* ++ ID_OUI_FROM_DATABASE=STCUBE.INC ++ + OUI:6021C0* + ID_OUI_FROM_DATABASE=Murata Manufactuaring Co.,Ltd. + +@@ -58117,12 +58678,18 @@ OUI:60FB42* + OUI:60FE1E* + ID_OUI_FROM_DATABASE=China Palms Telecom.Ltd + ++OUI:60FE20* ++ ID_OUI_FROM_DATABASE=2 Wire ++ + OUI:60FEC5* + ID_OUI_FROM_DATABASE=Apple + + OUI:60FEF9* + ID_OUI_FROM_DATABASE=Thomas & Betts + ++OUI:60FFDD* ++ ID_OUI_FROM_DATABASE=C.E. ELECTRONICS, INC ++ + OUI:6400F1* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + +@@ -58228,6 +58795,9 @@ OUI:645563* + OUI:64557F* + ID_OUI_FROM_DATABASE=NSFOCUS Information Technology Co., Ltd. + ++OUI:6455B1* ++ ID_OUI_FROM_DATABASE=ARRIS Group, Inc. ++ + OUI:645601* + ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD + +@@ -58363,6 +58933,9 @@ OUI:64AE88* + OUI:64B310* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:64B370* ++ ID_OUI_FROM_DATABASE=PowerComm Solutons LLC ++ + OUI:64B64A* + ID_OUI_FROM_DATABASE=ViVOtech, Inc. + +@@ -58435,12 +59008,18 @@ OUI:64E682* + OUI:64E84F* + ID_OUI_FROM_DATABASE=Serialway Communication Technology Co. Ltd + ++OUI:64E892* ++ ID_OUI_FROM_DATABASE=Morio Denki Co., Ltd. ++ + OUI:64E8E6* + ID_OUI_FROM_DATABASE=global moisture management system + + OUI:64E950* + ID_OUI_FROM_DATABASE=Cisco + ++OUI:64EB8C* ++ ID_OUI_FROM_DATABASE=Seiko Epson Corporation ++ + OUI:64ED57* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + +@@ -58570,6 +59149,9 @@ OUI:687251* + OUI:68764F* + ID_OUI_FROM_DATABASE=Sony Mobile Communications AB + ++OUI:687848* ++ ID_OUI_FROM_DATABASE=Westunitis Co., Ltd. ++ + OUI:68784C* + ID_OUI_FROM_DATABASE=Nortel Networks + +@@ -58594,6 +59176,9 @@ OUI:688470* + OUI:688540* + ID_OUI_FROM_DATABASE=IGI Mobile, Inc. + ++OUI:68856A* ++ ID_OUI_FROM_DATABASE=OuterLink Corporation ++ + OUI:6886A7* + ID_OUI_FROM_DATABASE=Cisco + +@@ -58684,6 +59269,9 @@ OUI:68CE4E* + OUI:68D1FD* + ID_OUI_FROM_DATABASE=Shenzhen Trimax Technology Co.,Ltd + ++OUI:68D247* ++ ID_OUI_FROM_DATABASE=Portalis LC ++ + OUI:68D925* + ID_OUI_FROM_DATABASE=ProSys Development Services + +@@ -58732,6 +59320,9 @@ OUI:68FCB3* + OUI:6C0460* + ID_OUI_FROM_DATABASE=RBH Access Technologies Inc. + ++OUI:6C09D6* ++ ID_OUI_FROM_DATABASE=Digiquest Electronics LTD ++ + OUI:6C0E0D* + ID_OUI_FROM_DATABASE=Sony Ericsson Mobile Communications AB + +@@ -58816,12 +59407,18 @@ OUI:6C5D63* + OUI:6C5E7A* + ID_OUI_FROM_DATABASE=Ubiquitous Internet Telecom Co., Ltd + ++OUI:6C5F1C* ++ ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd. ++ + OUI:6C6126* + ID_OUI_FROM_DATABASE=Rinicom Holdings + + OUI:6C626D* + ID_OUI_FROM_DATABASE=Micro-Star INT'L CO., LTD + ++OUI:6C641A* ++ ID_OUI_FROM_DATABASE=Penguin Computing ++ + OUI:6C6F18* + ID_OUI_FROM_DATABASE=Stereotaxis, Inc. + +@@ -58864,6 +59461,9 @@ OUI:6C92BF* + OUI:6C98EB* + ID_OUI_FROM_DATABASE=Xyne GmbH + ++OUI:6C9989* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:6C9AC9* + ID_OUI_FROM_DATABASE=Valentine Research, Inc. + +@@ -59023,6 +59623,9 @@ OUI:702559* + OUI:702B1D* + ID_OUI_FROM_DATABASE=E-Domus International Limited + ++OUI:702C1F* ++ ID_OUI_FROM_DATABASE=Wisol ++ + OUI:702F4B* + ID_OUI_FROM_DATABASE=PolyVision Inc. + +@@ -59071,6 +59674,9 @@ OUI:704AE4* + OUI:704CED* + ID_OUI_FROM_DATABASE=TMRG, Inc. + ++OUI:704E01* ++ ID_OUI_FROM_DATABASE=KWANGWON TECH CO., LTD. ++ + OUI:7052C5* + ID_OUI_FROM_DATABASE=Avaya, Inc. + +@@ -59389,9 +59995,15 @@ OUI:746630* + OUI:746A89* + ID_OUI_FROM_DATABASE=Rezolt Corporation + ++OUI:746A8F* ++ ID_OUI_FROM_DATABASE=VS Vision Systems GmbH ++ + OUI:746B82* + ID_OUI_FROM_DATABASE=MOVEK + ++OUI:746F3D* ++ ID_OUI_FROM_DATABASE=Contec GmbH ++ + OUI:7472F2* + ID_OUI_FROM_DATABASE=Chipsip Technology Co., Ltd. + +@@ -59413,6 +60025,9 @@ OUI:747E2D* + OUI:74867A* + ID_OUI_FROM_DATABASE=Dell Inc PCBA Test + ++OUI:74882A* ++ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD ++ + OUI:74888B* + ID_OUI_FROM_DATABASE=ADB Broadband Italia + +@@ -59422,6 +60037,9 @@ OUI:748E08* + OUI:748EF8* + ID_OUI_FROM_DATABASE=Brocade Communications Systems, Inc. + ++OUI:748F1B* ++ ID_OUI_FROM_DATABASE=MasterImage 3D ++ + OUI:749050* + ID_OUI_FROM_DATABASE=Renesas Electronics Corporation + +@@ -59437,6 +60055,9 @@ OUI:74943D* + OUI:749975* + ID_OUI_FROM_DATABASE=IBM Corporation + ++OUI:749C52* ++ ID_OUI_FROM_DATABASE=Huizhou Desay SV Automotive Co., Ltd. ++ + OUI:749DDC* + ID_OUI_FROM_DATABASE=2Wire + +@@ -59467,6 +60088,9 @@ OUI:74BE08* + OUI:74BFA1* + ID_OUI_FROM_DATABASE=HYUNTECK + ++OUI:74C621* ++ ID_OUI_FROM_DATABASE=Zhejiang Hite Renewable Energy Co.,LTD ++ + OUI:74C99A* + ID_OUI_FROM_DATABASE=Ericsson AB + +@@ -59605,6 +60229,9 @@ OUI:78303B* + OUI:7830E1* + ID_OUI_FROM_DATABASE=UltraClenz, LLC + ++OUI:7831C1* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:78324F* + ID_OUI_FROM_DATABASE=Millennium Group, Inc. + +@@ -59614,6 +60241,9 @@ OUI:783CE3* + OUI:783D5B* + ID_OUI_FROM_DATABASE=TELNET Redes Inteligentes S.A. + ++OUI:783E53* ++ ID_OUI_FROM_DATABASE=BSkyB Ltd ++ + OUI:783F15* + ID_OUI_FROM_DATABASE=EasySYNC Ltd. + +@@ -59638,6 +60268,9 @@ OUI:78491D* + OUI:784B08* + ID_OUI_FROM_DATABASE=f.robotics acquisitions ltd + ++OUI:784B87* ++ ID_OUI_FROM_DATABASE=Murata Manufacturing Co.,Ltd. ++ + OUI:78510C* + ID_OUI_FROM_DATABASE=LiveU Ltd. + +@@ -59674,6 +60307,9 @@ OUI:78617C* + OUI:7866AE* + ID_OUI_FROM_DATABASE=ZTEC Instruments, Inc. + ++OUI:786A89* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:786C1C* + ID_OUI_FROM_DATABASE=Apple + +@@ -59737,6 +60373,9 @@ OUI:78A2A0* + OUI:78A3E4* + ID_OUI_FROM_DATABASE=Apple + ++OUI:78A504* ++ ID_OUI_FROM_DATABASE=Texas Instruments ++ + OUI:78A5DD* + ID_OUI_FROM_DATABASE=Shenzhen Smarteye Digital Electronics Co., Ltd + +@@ -59830,6 +60469,9 @@ OUI:78D5B5* + OUI:78D6F0* + ID_OUI_FROM_DATABASE=Samsung Electro Mechanics + ++OUI:78D752* ++ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD ++ + OUI:78D99F* + ID_OUI_FROM_DATABASE=NuCom HK Ltd. + +@@ -59887,6 +60529,9 @@ OUI:78FE3D* + OUI:78FE41* + ID_OUI_FROM_DATABASE=Socus networks + ++OUI:78FEE2* ++ ID_OUI_FROM_DATABASE=Shanghai Diveo Technology Co., Ltd ++ + OUI:78FF57* + ID_OUI_FROM_DATABASE=Intel Corporate + +@@ -59929,6 +60574,9 @@ OUI:7C1476* + OUI:7C160D* + ID_OUI_FROM_DATABASE=Saia-Burgess Controls AG + ++OUI:7C1A03* ++ ID_OUI_FROM_DATABASE=8Locations Co., Ltd. ++ + OUI:7C1AFC* + ID_OUI_FROM_DATABASE=Dalian Co-Edifice Video Technology Co., Ltd + +@@ -60058,6 +60706,9 @@ OUI:7C822D* + OUI:7C8306* + ID_OUI_FROM_DATABASE=Glen Dimplex Nordic as + ++OUI:7C8D91* ++ ID_OUI_FROM_DATABASE=Shanghai Hongzhuo Information Technology co.,LTD ++ + OUI:7C8EE4* + ID_OUI_FROM_DATABASE=Texas Instruments + +@@ -60172,6 +60823,9 @@ OUI:7CDD90* + OUI:7CE044* + ID_OUI_FROM_DATABASE=NEON Inc + ++OUI:7CE1FF* ++ ID_OUI_FROM_DATABASE=Computer Performance, Inc. DBA Digital Loggers, Inc. ++ + OUI:7CE56B* + ID_OUI_FROM_DATABASE=ESEN Optoelectronics Technology Co.,Ltd. + +@@ -60214,6 +60868,9 @@ OUI:80000B* + OUI:800010* + ID_OUI_FROM_DATABASE=ATT BELL LABORATORIES + ++OUI:80006E* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:8005DF* + ID_OUI_FROM_DATABASE=Montage Technology Group Limited + +@@ -60307,9 +60964,15 @@ OUI:805719* + OUI:8058C5* + ID_OUI_FROM_DATABASE=NovaTec Kommunikationstechnik GmbH + ++OUI:8059FD* ++ ID_OUI_FROM_DATABASE=Noviga ++ + OUI:806007* + ID_OUI_FROM_DATABASE=RIM + ++OUI:80618F* ++ ID_OUI_FROM_DATABASE=Shenzhen sangfei consumer communications co.,ltd ++ + OUI:806459* + ID_OUI_FROM_DATABASE=Nimbus Inc. + +@@ -60448,6 +61111,9 @@ OUI:80D733* + OUI:80DB31* + ID_OUI_FROM_DATABASE=Power Quotient International Co., Ltd. + ++OUI:80EA96* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:80EE73* + ID_OUI_FROM_DATABASE=Shuttle Inc. + +@@ -60481,6 +61147,9 @@ OUI:840F45* + OUI:841715* + ID_OUI_FROM_DATABASE=GP Electronics (HK) Ltd. + ++OUI:841766* ++ ID_OUI_FROM_DATABASE=Weifang GoerTek Electronics Co., Ltd ++ + OUI:841888* + ID_OUI_FROM_DATABASE=Juniper Networks + +@@ -60502,9 +61171,15 @@ OUI:84248D* + OUI:84253F* + ID_OUI_FROM_DATABASE=Silex Technology, Inc + ++OUI:8425A4* ++ ID_OUI_FROM_DATABASE=Tariox Limited ++ + OUI:8425DB* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:842615* ++ ID_OUI_FROM_DATABASE=ADB Broadband Italia ++ + OUI:84262B* + ID_OUI_FROM_DATABASE=Alcatel-Lucent + +@@ -60586,6 +61261,9 @@ OUI:846AED* + OUI:846EB1* + ID_OUI_FROM_DATABASE=Park Assist LLC + ++OUI:847207* ++ ID_OUI_FROM_DATABASE=I&C Technology ++ + OUI:84742A* + ID_OUI_FROM_DATABASE=zte corporation + +@@ -60610,12 +61288,18 @@ OUI:848336* + OUI:848371* + ID_OUI_FROM_DATABASE=Avaya, Inc + ++OUI:848433* ++ ID_OUI_FROM_DATABASE=Paradox Engineering SA ++ + OUI:848506* + ID_OUI_FROM_DATABASE=Apple + + OUI:848D84* + ID_OUI_FROM_DATABASE=Rajant Corporation + ++OUI:848E0C* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:848E96* + ID_OUI_FROM_DATABASE=Embertec Pty Ltd + +@@ -60838,6 +61522,9 @@ OUI:888717* + OUI:8887DD* + ID_OUI_FROM_DATABASE=DarbeeVision Inc. + ++OUI:888914* ++ ID_OUI_FROM_DATABASE=All Components Incorporated ++ + OUI:888964* + ID_OUI_FROM_DATABASE=GSI Electronics Inc. + +@@ -60853,6 +61540,9 @@ OUI:889166* + OUI:8891DD* + ID_OUI_FROM_DATABASE=Racktivity + ++OUI:889471* ++ ID_OUI_FROM_DATABASE=Brocade Communications Systems, Inc. ++ + OUI:8894F9* + ID_OUI_FROM_DATABASE=Gemicom Technology, Inc. + +@@ -60883,6 +61573,9 @@ OUI:88A3CC* + OUI:88A5BD* + ID_OUI_FROM_DATABASE=QPCOM INC. + ++OUI:88A73C* ++ ID_OUI_FROM_DATABASE=Ragentek Technology Group ++ + OUI:88ACC1* + ID_OUI_FROM_DATABASE=Generiton Co., Ltd. + +@@ -60916,6 +61609,9 @@ OUI:88CB87* + OUI:88D7BC* + ID_OUI_FROM_DATABASE=DEP Company + ++OUI:88D962* ++ ID_OUI_FROM_DATABASE=Canopus Systems US LLC ++ + OUI:88DC96* + ID_OUI_FROM_DATABASE=SENAO Networks, Inc. + +@@ -60928,12 +61624,18 @@ OUI:88E0A0* + OUI:88E0F3* + ID_OUI_FROM_DATABASE=Juniper Networks + ++OUI:88E3AB* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:88E712* + ID_OUI_FROM_DATABASE=Whirlpool Corporation + + OUI:88E7A6* + ID_OUI_FROM_DATABASE=iKnowledge Integration Corp. + ++OUI:88E8F8* ++ ID_OUI_FROM_DATABASE=YONG TAI ELECTRONIC (DONGGUAN) LTD. ++ + OUI:88E917* + ID_OUI_FROM_DATABASE=Tamaggo + +@@ -60949,6 +61651,9 @@ OUI:88F488* + OUI:88F490* + ID_OUI_FROM_DATABASE=Jetmobile Pte Ltd + ++OUI:88F7C7* ++ ID_OUI_FROM_DATABASE=Technicolor USA Inc. ++ + OUI:88FD15* + ID_OUI_FROM_DATABASE=LINEEYE CO., LTD + +@@ -60994,6 +61699,9 @@ OUI:8C271D* + OUI:8C278A* + ID_OUI_FROM_DATABASE=Vocollect Inc + ++OUI:8C2937* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:8C2DAA* + ID_OUI_FROM_DATABASE=Apple + +@@ -61012,6 +61720,9 @@ OUI:8C3C07* + OUI:8C3C4A* + ID_OUI_FROM_DATABASE=NAKAYO TELECOMMUNICATIONS,INC. + ++OUI:8C41F2* ++ ID_OUI_FROM_DATABASE=RDA Technologies Ltd. ++ + OUI:8C4435* + ID_OUI_FROM_DATABASE=Shanghai BroadMobi Communication Technology Co., Ltd. + +@@ -61099,6 +61810,9 @@ OUI:8C7716* + OUI:8C7B9D* + ID_OUI_FROM_DATABASE=Apple + ++OUI:8C7C92* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:8C7CB5* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -61153,6 +61867,9 @@ OUI:8CB82C* + OUI:8CB864* + ID_OUI_FROM_DATABASE=AcSiP Technology Corp. + ++OUI:8CBEBE* ++ ID_OUI_FROM_DATABASE=Xiaomi Technology Co.,Ltd ++ + OUI:8CC121* + ID_OUI_FROM_DATABASE=Panasonic Corporation AVC Networks Company + +@@ -61285,6 +62002,9 @@ OUI:902B34* + OUI:902E87* + ID_OUI_FROM_DATABASE=LabJack + ++OUI:9031CD* ++ ID_OUI_FROM_DATABASE=Onyx Healthcare Inc. ++ + OUI:90342B* + ID_OUI_FROM_DATABASE=Gatekeeper Systems, Inc. + +@@ -61324,6 +62044,9 @@ OUI:9049FA* + OUI:904CE5* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + ++OUI:904E2B* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:90507B* + ID_OUI_FROM_DATABASE=Advanced PANMOBIL Systems GmbH & Co. KG + +@@ -61426,6 +62149,9 @@ OUI:9092B4* + OUI:9094E4* + ID_OUI_FROM_DATABASE=D-Link International + ++OUI:909864* ++ ID_OUI_FROM_DATABASE=Impex-Sat GmbH&Co KG ++ + OUI:909916* + ID_OUI_FROM_DATABASE=ELVEES NeoTek OJSC + +@@ -61501,6 +62227,12 @@ OUI:90D92C* + OUI:90DA4E* + ID_OUI_FROM_DATABASE=AVANU + ++OUI:90DB46* ++ ID_OUI_FROM_DATABASE=E-LEAD ELECTRONIC CO., LTD ++ ++OUI:90DFB7* ++ ID_OUI_FROM_DATABASE=s.m.s smart microwave sensors GmbH ++ + OUI:90E0F0* + ID_OUI_FROM_DATABASE=Harman International + +@@ -61513,6 +62245,12 @@ OUI:90E6BA* + OUI:90EA60* + ID_OUI_FROM_DATABASE=SPI Lasers Ltd + ++OUI:90F1AA* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,LTD ++ ++OUI:90F1B0* ++ ID_OUI_FROM_DATABASE=Hangzhou Anheng Info&Tech CO.,LTD ++ + OUI:90F278* + ID_OUI_FROM_DATABASE=Radius Gateway + +@@ -61624,6 +62362,9 @@ OUI:945047* + OUI:945103* + ID_OUI_FROM_DATABASE=Samsung Electronics + ++OUI:9451BF* ++ ID_OUI_FROM_DATABASE=Hyundai ESG ++ + OUI:94592D* + ID_OUI_FROM_DATABASE=EKE Building Technology Systems Ltd + +@@ -61681,6 +62422,9 @@ OUI:949BFD* + OUI:949C55* + ID_OUI_FROM_DATABASE=Alta Data Technologies + ++OUI:949F3F* ++ ID_OUI_FROM_DATABASE=Optek Digital Technology company limited ++ + OUI:949FB4* + ID_OUI_FROM_DATABASE=ChengDu JiaFaAnTai Technology Co.,Ltd + +@@ -61711,6 +62455,9 @@ OUI:94BA56* + OUI:94BF1E* + ID_OUI_FROM_DATABASE=eflow Inc. / Smart Device Planning and Development Division + ++OUI:94C014* ++ ID_OUI_FROM_DATABASE=Sorter Sp. j. Konrad Grzeszczyk MichaA, Ziomek ++ + OUI:94C150* + ID_OUI_FROM_DATABASE=2Wire Inc + +@@ -61939,6 +62686,9 @@ OUI:9873C4* + OUI:9876B6* + ID_OUI_FROM_DATABASE=Adafruit + ++OUI:987770* ++ ID_OUI_FROM_DATABASE=Pep Digital Technology (Guangzhou) Co., Ltd ++ + OUI:988217* + ID_OUI_FROM_DATABASE=Disruptive Ltd + +@@ -61990,6 +62740,9 @@ OUI:98BC57* + OUI:98BC99* + ID_OUI_FROM_DATABASE=Edeltech Co.,Ltd. + ++OUI:98C0EB* ++ ID_OUI_FROM_DATABASE=Global Regency Ltd ++ + OUI:98C845* + ID_OUI_FROM_DATABASE=PacketAccess + +@@ -62026,6 +62779,9 @@ OUI:98E79A* + OUI:98EC65* + ID_OUI_FROM_DATABASE=Cosesy ApS + ++OUI:98F0AB* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:98F537* + ID_OUI_FROM_DATABASE=zte corporation + +@@ -62113,6 +62869,9 @@ OUI:9C31B6* + OUI:9C3AAF* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:9C3EAA* ++ ID_OUI_FROM_DATABASE=EnvyLogic Co.,Ltd. ++ + OUI:9C417C* + ID_OUI_FROM_DATABASE=Hame Technology Co., Limited + +@@ -62179,6 +62938,12 @@ OUI:9C611D* + OUI:9C645E* + ID_OUI_FROM_DATABASE=Harman Consumer Group + ++OUI:9C65B0* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ ++OUI:9C65F9* ++ ID_OUI_FROM_DATABASE=AcSiP Technology Corp. ++ + OUI:9C6650* + ID_OUI_FROM_DATABASE=Glodio Technolies Co.,Ltd Tianjin Branch + +@@ -62203,6 +62968,9 @@ OUI:9C807D* + OUI:9C80DF* + ID_OUI_FROM_DATABASE=Arcadyan Technology Corporation + ++OUI:9C86DA* ++ ID_OUI_FROM_DATABASE=Phoenix Geophysics Ltd. ++ + OUI:9C8888* + ID_OUI_FROM_DATABASE=Simac Techniek NV + +@@ -62272,6 +63040,9 @@ OUI:9CB793* + OUI:9CBB98* + ID_OUI_FROM_DATABASE=Shen Zhen RND Electronic Co.,LTD + ++OUI:9CBD9D* ++ ID_OUI_FROM_DATABASE=SkyDisk, Inc. ++ + OUI:9CC077* + ID_OUI_FROM_DATABASE=PrintCounts, LLC + +@@ -62332,6 +63103,9 @@ OUI:9CF8DB* + OUI:9CF938* + ID_OUI_FROM_DATABASE=AREVA NP GmbH + ++OUI:9CFBF1* ++ ID_OUI_FROM_DATABASE=MESOMATIC GmbH & Co.KG ++ + OUI:9CFFBE* + ID_OUI_FROM_DATABASE=OTSL Inc. + +@@ -62449,6 +63223,9 @@ OUI:A05DE7* + OUI:A05E6B* + ID_OUI_FROM_DATABASE=MELPER Co., Ltd. + ++OUI:A06518* ++ ID_OUI_FROM_DATABASE=VNPT TECHNOLOGY ++ + OUI:A067BE* + ID_OUI_FROM_DATABASE=Sicon s.r.l. + +@@ -62479,6 +63256,9 @@ OUI:A073FC* + OUI:A07591* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:A07771* ++ ID_OUI_FROM_DATABASE=Vialis BV ++ + OUI:A078BA* + ID_OUI_FROM_DATABASE=Pantech Co., Ltd. + +@@ -62500,6 +63280,9 @@ OUI:A08869* + OUI:A088B4* + ID_OUI_FROM_DATABASE=Intel Corporate + ++OUI:A089E4* ++ ID_OUI_FROM_DATABASE=Skyworth Digital Technology(Shenzhen) Co.,Ltd ++ + OUI:A08A87* + ID_OUI_FROM_DATABASE=HuiZhou KaiYue Electronic Co.,Ltd + +@@ -62599,6 +63382,9 @@ OUI:A0E25A* + OUI:A0E295* + ID_OUI_FROM_DATABASE=DAT System Co.,Ltd + ++OUI:A0E453* ++ ID_OUI_FROM_DATABASE=Sony Mobile Communications AB ++ + OUI:A0E534* + ID_OUI_FROM_DATABASE=Stratec Biomedical AG + +@@ -62635,6 +63421,9 @@ OUI:A0F419* + OUI:A0F450* + ID_OUI_FROM_DATABASE=HTC Corporation + ++OUI:A0F459* ++ ID_OUI_FROM_DATABASE=FN-LINK TECHNOLOGY LIMITED ++ + OUI:A0FE91* + ID_OUI_FROM_DATABASE=AVAT Automation GmbH + +@@ -62740,6 +63529,9 @@ OUI:A45D36* + OUI:A46706* + ID_OUI_FROM_DATABASE=Apple + ++OUI:A46CC1* ++ ID_OUI_FROM_DATABASE=LTi REEnergy GmbH ++ + OUI:A46E79* + ID_OUI_FROM_DATABASE=DFT System Co.Ltd + +@@ -62785,6 +63577,9 @@ OUI:A49947* + OUI:A49981* + ID_OUI_FROM_DATABASE=FuJian Elite Power Tech CO.,LTD. + ++OUI:A49A58* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:A49B13* + ID_OUI_FROM_DATABASE=Burroughs Payment Systems, Inc. + +@@ -62836,6 +63631,9 @@ OUI:A4B980* + OUI:A4BADB* + ID_OUI_FROM_DATABASE=Dell Inc. + ++OUI:A4BBAF* ++ ID_OUI_FROM_DATABASE=Lime Instruments ++ + OUI:A4BE61* + ID_OUI_FROM_DATABASE=EutroVision System, Inc. + +@@ -62941,6 +63739,9 @@ OUI:A80180* + OUI:A80600* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:A80C0D* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:A8154D* + ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. + +@@ -62959,6 +63760,9 @@ OUI:A81FAF* + OUI:A82066* + ID_OUI_FROM_DATABASE=Apple + ++OUI:A824EB* ++ ID_OUI_FROM_DATABASE=ZAO NPO Introtest ++ + OUI:A826D9* + ID_OUI_FROM_DATABASE=HTC Corporation + +@@ -62992,6 +63796,9 @@ OUI:A854B2* + OUI:A8556A* + ID_OUI_FROM_DATABASE=Pocketnet Technology Inc. + ++OUI:A8574E* ++ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. ++ + OUI:A85BB0* + ID_OUI_FROM_DATABASE=Shenzhen Dehoo Technology Co.,Ltd + +@@ -63034,6 +63841,9 @@ OUI:A87B39* + OUI:A87E33* + ID_OUI_FROM_DATABASE=Nokia Danmark A/S + ++OUI:A881F1* ++ ID_OUI_FROM_DATABASE=BMEYE B.V. ++ + OUI:A886DD* + ID_OUI_FROM_DATABASE=Apple, Inc. + +@@ -63085,12 +63895,18 @@ OUI:A8B0AE* + OUI:A8B1D4* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:A8B9B3* ++ ID_OUI_FROM_DATABASE=ESSYS ++ + OUI:A8BBCF* + ID_OUI_FROM_DATABASE=Apple + + OUI:A8BD1A* + ID_OUI_FROM_DATABASE=Honey Bee (Hong Kong) Limited + ++OUI:A8BD3A* ++ ID_OUI_FROM_DATABASE=UNIONMAN TECHNOLOGY CO.,LTD ++ + OUI:A8C222* + ID_OUI_FROM_DATABASE=TM-Research Inc. + +@@ -63157,6 +63973,9 @@ OUI:AA0004* + OUI:AC0142* + ID_OUI_FROM_DATABASE=Uriel Technologies SIA + ++OUI:AC02CA* ++ ID_OUI_FROM_DATABASE=HI Solutions, Inc. ++ + OUI:AC02CF* + ID_OUI_FROM_DATABASE=RW Tecnologia Industria e Comercio Ltda + +@@ -63208,6 +64027,9 @@ OUI:AC319D* + OUI:AC34CB* + ID_OUI_FROM_DATABASE=Shanhai GBCOM Communication Technology Co. Ltd + ++OUI:AC3613* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:AC3C0B* + ID_OUI_FROM_DATABASE=Apple + +@@ -63406,6 +64228,9 @@ OUI:ACCE8F* + OUI:ACCF23* + ID_OUI_FROM_DATABASE=Hi-flying electronics technology Co.,Ltd + ++OUI:ACCF5C* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:ACD180* + ID_OUI_FROM_DATABASE=Crexendo Business Solutions, Inc. + +@@ -63421,6 +64246,9 @@ OUI:ACD9D6* + OUI:ACDBDA* + ID_OUI_FROM_DATABASE=Shenzhen Geniatech Inc, Ltd + ++OUI:ACE069* ++ ID_OUI_FROM_DATABASE=ISAAC Instruments ++ + OUI:ACE215* + ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd + +@@ -63493,6 +64321,9 @@ OUI:B01C91* + OUI:B024F3* + ID_OUI_FROM_DATABASE=Progeny Systems + ++OUI:B03495* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:B0358D* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -63523,6 +64354,9 @@ OUI:B050BC* + OUI:B0518E* + ID_OUI_FROM_DATABASE=Holl technology CO.Ltd. + ++OUI:B05706* ++ ID_OUI_FROM_DATABASE=Vallox Oy ++ + OUI:B058C4* + ID_OUI_FROM_DATABASE=Broadcast Microwave Services, Inc + +@@ -63538,6 +64372,12 @@ OUI:B06563* + OUI:B065BD* + ID_OUI_FROM_DATABASE=Apple + ++OUI:B068B6* ++ ID_OUI_FROM_DATABASE=Hangzhou OYE Technology Co. Ltd ++ ++OUI:B06971* ++ ID_OUI_FROM_DATABASE=DEI Sales, Inc. ++ + OUI:B06CBF* + ID_OUI_FROM_DATABASE=3ality Digital Systems GmbH + +@@ -63568,6 +64408,9 @@ OUI:B0808C* + OUI:B081D8* + ID_OUI_FROM_DATABASE=I-sys Corp + ++OUI:B0869E* ++ ID_OUI_FROM_DATABASE=Chloride S.r.L ++ + OUI:B08807* + ID_OUI_FROM_DATABASE=Strata Worldwide + +@@ -63643,6 +64486,9 @@ OUI:B0BF99* + OUI:B0C4E7* + ID_OUI_FROM_DATABASE=Samsung Electronics + ++OUI:B0C554* ++ ID_OUI_FROM_DATABASE=D-Link International ++ + OUI:B0C69A* + ID_OUI_FROM_DATABASE=Juniper Networks + +@@ -63673,6 +64519,9 @@ OUI:B0D2F5* + OUI:B0D7C5* + ID_OUI_FROM_DATABASE=STP KFT + ++OUI:B0DA00* ++ ID_OUI_FROM_DATABASE=CERA ELECTRONIQUE ++ + OUI:B0DF3A* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -63694,6 +64543,9 @@ OUI:B0E97E* + OUI:B0EC71* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:B0EC8F* ++ ID_OUI_FROM_DATABASE=GMX SAS ++ + OUI:B0EE45* + ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc. + +@@ -63736,6 +64588,9 @@ OUI:B41489* + OUI:B41513* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + ++OUI:B418D1* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:B41DEF* + ID_OUI_FROM_DATABASE=Internet Laboratories, Inc. + +@@ -63754,6 +64609,9 @@ OUI:B428F1* + OUI:B42A39* + ID_OUI_FROM_DATABASE=ORBIT MERRET, spol. s r. o. + ++OUI:B42C92* ++ ID_OUI_FROM_DATABASE=Zhejiang Weirong Electronic Co., Ltd ++ + OUI:B42CBE* + ID_OUI_FROM_DATABASE=Direct Payment Solutions Limited + +@@ -63787,6 +64645,9 @@ OUI:B43E3B* + OUI:B4417A* + ID_OUI_FROM_DATABASE=ShenZhen Gongjin Electronics Co.,Ltd + ++OUI:B4430D* ++ ID_OUI_FROM_DATABASE=Broadlink Pty Ltd ++ + OUI:B44CC2* + ID_OUI_FROM_DATABASE=NR ELECTRIC CO., LTD + +@@ -63847,6 +64708,9 @@ OUI:B482C5* + OUI:B482FE* + ID_OUI_FROM_DATABASE=Askey Computer Corp + ++OUI:B48547* ++ ID_OUI_FROM_DATABASE=Amptown System Company GmbH ++ + OUI:B48910* + ID_OUI_FROM_DATABASE=Coster T.E. S.P.A. + +@@ -63856,6 +64720,9 @@ OUI:B4944E* + OUI:B49842* + ID_OUI_FROM_DATABASE=zte corporation + ++OUI:B4994C* ++ ID_OUI_FROM_DATABASE=Texas Instruments ++ + OUI:B499BA* + ID_OUI_FROM_DATABASE=Hewlett-Packard Company + +@@ -63875,7 +64742,7 @@ OUI:B4A5A9* + ID_OUI_FROM_DATABASE=MODI GmbH + + OUI:B4A82B* +- ID_OUI_FROM_DATABASE=Histar ++ ID_OUI_FROM_DATABASE=Histar Digital Electronics Co., Ltd. + + OUI:B4A95A* + ID_OUI_FROM_DATABASE=Avaya, Inc +@@ -63895,6 +64762,9 @@ OUI:B4B362* + OUI:B4B52F* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:B4B542* ++ ID_OUI_FROM_DATABASE=Hubbell Power Systems, Inc. ++ + OUI:B4B5AF* + ID_OUI_FROM_DATABASE=Minsung Electronics + +@@ -64021,6 +64891,9 @@ OUI:B830A8* + OUI:B836D8* + ID_OUI_FROM_DATABASE=Videoswitch + ++OUI:B83861* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:B838CA* + ID_OUI_FROM_DATABASE=Kyokko Tsushin System CO.,LTD + +@@ -64036,6 +64909,9 @@ OUI:B83E59* + OUI:B8415F* + ID_OUI_FROM_DATABASE=ASP AG + ++OUI:B843E4* ++ ID_OUI_FROM_DATABASE=Vlatacom ++ + OUI:B847C6* + ID_OUI_FROM_DATABASE=SanJet Technology Corp. + +@@ -64075,6 +64951,9 @@ OUI:B8653B* + OUI:B86B23* + ID_OUI_FROM_DATABASE=Toshiba + ++OUI:B86CE8* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:B870F4* + ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD. + +@@ -64543,6 +65422,9 @@ OUI:BCF2AF* + OUI:BCF5AC* + ID_OUI_FROM_DATABASE=LG Electronics + ++OUI:BCF61C* ++ ID_OUI_FROM_DATABASE=Geomodeling Wuxi Technology Co. Ltd. ++ + OUI:BCF685* + ID_OUI_FROM_DATABASE=D-Link International + +@@ -64762,6 +65644,9 @@ OUI:C0C3B6* + OUI:C0C520* + ID_OUI_FROM_DATABASE=Ruckus Wireless + ++OUI:C0C569* ++ ID_OUI_FROM_DATABASE=SHANGHAI LYNUC CNC TECHNOLOGY CO.,LTD ++ + OUI:C0C687* + ID_OUI_FROM_DATABASE=Cisco SPVTG + +@@ -64798,6 +65683,9 @@ OUI:C0EAE4* + OUI:C0F1C4* + ID_OUI_FROM_DATABASE=Pacidal Corporation Ltd. + ++OUI:C0F79D* ++ ID_OUI_FROM_DATABASE=Powercode ++ + OUI:C0F8DA* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -64816,18 +65704,27 @@ OUI:C401B1* + OUI:C40415* + ID_OUI_FROM_DATABASE=NETGEAR INC., + ++OUI:C40528* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:C40938* + ID_OUI_FROM_DATABASE=Fujian Star-net Communication Co., Ltd + + OUI:C40ACB* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:C40E45* ++ ID_OUI_FROM_DATABASE=ACK Networks,Inc. ++ + OUI:C40F09* + ID_OUI_FROM_DATABASE=Hermes electronic GmbH + + OUI:C4108A* + ID_OUI_FROM_DATABASE=Ruckus Wireless + ++OUI:C4143C* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:C416FA* + ID_OUI_FROM_DATABASE=Prysm Inc + +@@ -64858,6 +65755,9 @@ OUI:C42628* + OUI:C42795* + ID_OUI_FROM_DATABASE=Technicolor USA Inc. + ++OUI:C4291D* ++ ID_OUI_FROM_DATABASE=KLEMSAN ELEKTRIK ELEKTRONIK SAN.VE TIC.AS. ++ + OUI:C42C03* + ID_OUI_FROM_DATABASE=Apple + +@@ -64900,9 +65800,15 @@ OUI:C44AD0* + OUI:C44B44* + ID_OUI_FROM_DATABASE=Omniprint Inc. + ++OUI:C44E1F* ++ ID_OUI_FROM_DATABASE=BlueN ++ + OUI:C44EAC* + ID_OUI_FROM_DATABASE=Shenzhen Shiningworth Technology Co., Ltd. + ++OUI:C45006* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:C45444* + ID_OUI_FROM_DATABASE=QUANTA COMPUTER INC. + +@@ -65002,6 +65908,9 @@ OUI:C495A2* + OUI:C49805* + ID_OUI_FROM_DATABASE=Minieum Networks, Inc + ++OUI:C4A81D* ++ ID_OUI_FROM_DATABASE=D-Link International ++ + OUI:C4AAA1* + ID_OUI_FROM_DATABASE=SUMMIT DEVELOPMENT, spol.s r.o. + +@@ -65014,12 +65923,18 @@ OUI:C4B512* + OUI:C4BA99* + ID_OUI_FROM_DATABASE=I+ME Actia Informatik und Mikro-Elektronik GmbH + ++OUI:C4C0AE* ++ ID_OUI_FROM_DATABASE=MIDORI ELECTRONIC CO., LTD. ++ + OUI:C4C19F* + ID_OUI_FROM_DATABASE=National Oilwell Varco Instrumentation, Monitoring, and Optimization (NOV IMO) + + OUI:C4C755* + ID_OUI_FROM_DATABASE=Beijing HuaqinWorld Technology Co.,Ltd + ++OUI:C4C919* ++ ID_OUI_FROM_DATABASE=Energy Imports Ltd ++ + OUI:C4CAD9* + ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited + +@@ -65050,6 +65965,9 @@ OUI:C4E7BE* + OUI:C4E92F* + ID_OUI_FROM_DATABASE=AB Sciex + ++OUI:C4E984* ++ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. ++ + OUI:C4EBE3* + ID_OUI_FROM_DATABASE=RRCN SAS + +@@ -65092,6 +66010,9 @@ OUI:C80E95* + OUI:C81479* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:C816BD* ++ ID_OUI_FROM_DATABASE=HISENSE ELECTRIC CO.,LTD. ++ + OUI:C819F7* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -65302,6 +66223,9 @@ OUI:C8D2C1* + OUI:C8D3A3* + ID_OUI_FROM_DATABASE=D-Link International + ++OUI:C8D429* ++ ID_OUI_FROM_DATABASE=Muehlbauer AG ++ + OUI:C8D5FE* + ID_OUI_FROM_DATABASE=Shenzhen Zowee Technology Co., Ltd + +@@ -65428,6 +66352,9 @@ OUI:CC34D7* + OUI:CC3540* + ID_OUI_FROM_DATABASE=Technicolor USA Inc. + ++OUI:CC398C* ++ ID_OUI_FROM_DATABASE=Shiningtek ++ + OUI:CC3A61* + ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO MECHANICS CO., LTD. + +@@ -65527,6 +66454,12 @@ OUI:CC7D37* + OUI:CC7EE7* + ID_OUI_FROM_DATABASE=Panasonic AVC Networks Company + ++OUI:CC856C* ++ ID_OUI_FROM_DATABASE=SHENZHEN MDK DIGITAL TECHNOLOGY CO.,LTD ++ ++OUI:CC89FD* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:CC8CE3* + ID_OUI_FROM_DATABASE=Texas Instruments + +@@ -65539,18 +66472,27 @@ OUI:CC912B* + OUI:CC944A* + ID_OUI_FROM_DATABASE=Pfeiffer Vacuum GmbH + ++OUI:CC95D7* ++ ID_OUI_FROM_DATABASE=VIZIO, Inc ++ + OUI:CC96A0* + ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd + + OUI:CC9E00* + ID_OUI_FROM_DATABASE=Nintendo Co., Ltd. + ++OUI:CC9F35* ++ ID_OUI_FROM_DATABASE=Transbit Sp. z o.o. ++ + OUI:CCA374* + ID_OUI_FROM_DATABASE=Guangdong Guanglian Electronic Technology Co.Ltd + + OUI:CCA462* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + ++OUI:CCA614* ++ ID_OUI_FROM_DATABASE=AIFA TECHNOLOGY CORP. ++ + OUI:CCAF78* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + +@@ -65650,6 +66592,9 @@ OUI:CCF954* + OUI:CCF9E8* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + ++OUI:CCFA00* ++ ID_OUI_FROM_DATABASE=LG Electronics ++ + OUI:CCFB65* + ID_OUI_FROM_DATABASE=Nintendo Co., Ltd. + +@@ -65731,6 +66676,9 @@ OUI:D0574C* + OUI:D05785* + ID_OUI_FROM_DATABASE=Pantech Co., Ltd. + ++OUI:D057A1* ++ ID_OUI_FROM_DATABASE=Werma Signaltechnik GmbH & Co. KG ++ + OUI:D05875* + ID_OUI_FROM_DATABASE=Active Control Technology Inc. + +@@ -65743,6 +66691,9 @@ OUI:D05A0F* + OUI:D05FCE* + ID_OUI_FROM_DATABASE=Hitachi Data Systems + ++OUI:D0634D* ++ ID_OUI_FROM_DATABASE=Meiko Maschinenbau GmbH & Co. KG ++ + OUI:D063B4* + ID_OUI_FROM_DATABASE=SolidRun Ltd. + +@@ -65755,6 +66706,9 @@ OUI:D067E5* + OUI:D0699E* + ID_OUI_FROM_DATABASE=LUMINEX Lighting Control Equipment + ++OUI:D069D0* ++ ID_OUI_FROM_DATABASE=Verto Medical Solutions, LLC ++ + OUI:D0737F* + ID_OUI_FROM_DATABASE=Mini-Circuits + +@@ -65767,12 +66721,18 @@ OUI:D073D5* + OUI:D075BE* + ID_OUI_FROM_DATABASE=Reno A&E + ++OUI:D07AB5* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:D07DE5* + ID_OUI_FROM_DATABASE=Forward Pay Systems, Inc. + + OUI:D07E28* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:D07E35* ++ ID_OUI_FROM_DATABASE=Intel Corporate ++ + OUI:D08999* + ID_OUI_FROM_DATABASE=APCON, Inc. + +@@ -65797,6 +66757,9 @@ OUI:D095C7* + OUI:D09B05* + ID_OUI_FROM_DATABASE=Emtronix + ++OUI:D09C30* ++ ID_OUI_FROM_DATABASE=Foster Electric Company, Limited ++ + OUI:D09D0A* + ID_OUI_FROM_DATABASE=LINKCOM + +@@ -65824,6 +66787,9 @@ OUI:D0B53D* + OUI:D0BB80* + ID_OUI_FROM_DATABASE=SHL Telemedicine International Ltd. + ++OUI:D0BD01* ++ ID_OUI_FROM_DATABASE=DS International ++ + OUI:D0BE2C* + ID_OUI_FROM_DATABASE=CNSLink Co., Ltd. + +@@ -65965,6 +66931,9 @@ OUI:D4206D* + OUI:D4223F* + ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd. + ++OUI:D4224E* ++ ID_OUI_FROM_DATABASE=Alcatel Lucent ++ + OUI:D42751* + ID_OUI_FROM_DATABASE=Infopia Co., Ltd + +@@ -65977,6 +66946,12 @@ OUI:D429EA* + OUI:D42C3D* + ID_OUI_FROM_DATABASE=Sky Light Digital Limited + ++OUI:D42F23* ++ ID_OUI_FROM_DATABASE=Akenori PTE Ltd ++ ++OUI:D4319D* ++ ID_OUI_FROM_DATABASE=Sinwatec ++ + OUI:D43A65* + ID_OUI_FROM_DATABASE=IGRS Engineering Lab Ltd. + +@@ -66241,6 +67216,9 @@ OUI:D809C3* + OUI:D80DE3* + ID_OUI_FROM_DATABASE=FXI TECHNOLOGIES AS + ++OUI:D8150D* ++ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. ++ + OUI:D8160A* + ID_OUI_FROM_DATABASE=Nippon Electro-Sensory Devices + +@@ -66277,6 +67255,9 @@ OUI:D82916* + OUI:D82986* + ID_OUI_FROM_DATABASE=Best Wish Technology LTD + ++OUI:D82A15* ++ ID_OUI_FROM_DATABASE=Leitner SpA ++ + OUI:D82A7E* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -66325,9 +67306,15 @@ OUI:D85D4C* + OUI:D85D84* + ID_OUI_FROM_DATABASE=CAx soft GmbH + ++OUI:D86194* ++ ID_OUI_FROM_DATABASE=Objetivos y Sevicios de Valor Añadido ++ + OUI:D862DB* + ID_OUI_FROM_DATABASE=Eno Inc. + ++OUI:D86595* ++ ID_OUI_FROM_DATABASE=Toy's Myth Inc. ++ + OUI:D866C6* + ID_OUI_FROM_DATABASE=Shenzhen Daystar Technology Co.,ltd + +@@ -66361,6 +67348,9 @@ OUI:D87988* + OUI:D87CDD* + ID_OUI_FROM_DATABASE=SANIX INCORPORATED + ++OUI:D881CE* ++ ID_OUI_FROM_DATABASE=AHN INC. ++ + OUI:D88A3B* + ID_OUI_FROM_DATABASE=UNIT-EM + +@@ -66418,6 +67408,9 @@ OUI:D8B377* + OUI:D8B6C1* + ID_OUI_FROM_DATABASE=NetworkAccountant, Inc. + ++OUI:D8B6D6* ++ ID_OUI_FROM_DATABASE=Blu Tether Limited ++ + OUI:D8B8F6* + ID_OUI_FROM_DATABASE=Nantworks + +@@ -66466,6 +67459,12 @@ OUI:D8DA52* + OUI:D8DCE9* + ID_OUI_FROM_DATABASE=Kunshan Erlab ductless filtration system Co.,Ltd + ++OUI:D8DD5F* ++ ID_OUI_FROM_DATABASE=BALMUDA Inc. ++ ++OUI:D8DDFD* ++ ID_OUI_FROM_DATABASE=Texas Instruments ++ + OUI:D8DF0D* + ID_OUI_FROM_DATABASE=beroNet GmbH + +@@ -66484,9 +67483,15 @@ OUI:D8E952* + OUI:D8EB97* + ID_OUI_FROM_DATABASE=TRENDnet, Inc. + ++OUI:D8EE78* ++ ID_OUI_FROM_DATABASE=Moog Protokraft ++ + OUI:D8F0F2* + ID_OUI_FROM_DATABASE=Zeebo Inc + ++OUI:D8FC93* ++ ID_OUI_FROM_DATABASE=Intel Corporate ++ + OUI:D8FE8F* + ID_OUI_FROM_DATABASE=IDFone Co., Ltd. + +@@ -66499,6 +67504,9 @@ OUI:DC0265* + OUI:DC028E* + ID_OUI_FROM_DATABASE=zte corporation + ++OUI:DC052F* ++ ID_OUI_FROM_DATABASE=National Products Inc. ++ + OUI:DC0575* + ID_OUI_FROM_DATABASE=SIEMENS ENERGY AUTOMATION + +@@ -66619,6 +67627,9 @@ OUI:DC86D8* + OUI:DC9B1E* + ID_OUI_FROM_DATABASE=Intercom, Inc. + ++OUI:DC9B9C* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:DC9C52* + ID_OUI_FROM_DATABASE=Sapphire Technology Limited. + +@@ -66670,6 +67681,9 @@ OUI:DCC101* + OUI:DCC422* + ID_OUI_FROM_DATABASE=Systembase Limited + ++OUI:DCC793* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:DCCBA8* + ID_OUI_FROM_DATABASE=Explora Technologies Inc + +@@ -66703,6 +67717,9 @@ OUI:DCDECA* + OUI:DCE2AC* + ID_OUI_FROM_DATABASE=Lumens Digital Optics Inc. + ++OUI:DCE578* ++ ID_OUI_FROM_DATABASE=Experimental Factory of Scientific Engineering and Special Design Department ++ + OUI:DCE71C* + ID_OUI_FROM_DATABASE=AUG Elektronik GmbH + +@@ -66781,6 +67798,9 @@ OUI:E03005* + OUI:E031D0* + ID_OUI_FROM_DATABASE=SZ Telstar CO., LTD + ++OUI:E036E3* ++ ID_OUI_FROM_DATABASE=Stage One International Co., Ltd. ++ + OUI:E039D7* + ID_OUI_FROM_DATABASE=Plexxi, Inc. + +@@ -66793,6 +67813,9 @@ OUI:E03E4A* + OUI:E03E7D* + ID_OUI_FROM_DATABASE=data-complex GmbH + ++OUI:E03F49* ++ ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. ++ + OUI:E0469A* + ID_OUI_FROM_DATABASE=NETGEAR + +@@ -66841,6 +67864,9 @@ OUI:E0757D* + OUI:E07C62* + ID_OUI_FROM_DATABASE=Whistle Labs, Inc. + ++OUI:E07F53* ++ ID_OUI_FROM_DATABASE=TECHBOARD SRL ++ + OUI:E07F88* + ID_OUI_FROM_DATABASE=EVIDENCE Network SIA + +@@ -66967,6 +67993,9 @@ OUI:E0D10A* + OUI:E0D1E6* + ID_OUI_FROM_DATABASE=Aliph dba Jawbone + ++OUI:E0D31A* ++ ID_OUI_FROM_DATABASE=EQUES Technology Co., Limited ++ + OUI:E0D7BA* + ID_OUI_FROM_DATABASE=Texas Instruments + +@@ -66979,6 +68008,9 @@ OUI:E0DADC* + OUI:E0DB55* + ID_OUI_FROM_DATABASE=Dell Inc + ++OUI:E0DB88* ++ ID_OUI_FROM_DATABASE=Open Standard Digital-IF Interface for SATCOM Systems ++ + OUI:E0DCA0* + ID_OUI_FROM_DATABASE=Siemens Electrical Apparatus Ltd., Suzhou Chengdu Branch + +@@ -67030,6 +68062,9 @@ OUI:E40439* + OUI:E4115B* + ID_OUI_FROM_DATABASE=Hewlett Packard + ++OUI:E4121D* ++ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd ++ + OUI:E41289* + ID_OUI_FROM_DATABASE=topsystem Systemhaus GmbH + +@@ -67093,6 +68128,9 @@ OUI:E446BD* + OUI:E448C7* + ID_OUI_FROM_DATABASE=Cisco SPVTG + ++OUI:E44C6C* ++ ID_OUI_FROM_DATABASE=Shenzhen Guo Wei Electronic Co,. Ltd. ++ + OUI:E44E18* + ID_OUI_FROM_DATABASE=Gardasoft VisionLimited + +@@ -67144,6 +68182,9 @@ OUI:E47CF9* + OUI:E47D5A* + ID_OUI_FROM_DATABASE=Beijing Hanbang Technology Corp. + ++OUI:E48184* ++ ID_OUI_FROM_DATABASE=Alcatel-Lucent ++ + OUI:E481B3* + ID_OUI_FROM_DATABASE=Shenzhen ACT Industrial Co.,Ltd. + +@@ -67267,6 +68308,9 @@ OUI:E8056D* + OUI:E80688* + ID_OUI_FROM_DATABASE=Apple + ++OUI:E8088B* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:E80B13* + ID_OUI_FROM_DATABASE=Akib Systems Taiwan, INC + +@@ -67285,6 +68329,9 @@ OUI:E81132* + OUI:E81324* + ID_OUI_FROM_DATABASE=GuangZhou Bonsoninfo System CO.,LTD + ++OUI:E817FC* ++ ID_OUI_FROM_DATABASE=NIFTY Corporation ++ + OUI:E82877* + ID_OUI_FROM_DATABASE=TMY Co., Ltd. + +@@ -67363,6 +68410,9 @@ OUI:E85E53* + OUI:E8611F* + ID_OUI_FROM_DATABASE=Dawning Information Industry Co.,Ltd + ++OUI:E8617E* ++ ID_OUI_FROM_DATABASE=Liteon Technology Corporation ++ + OUI:E86183* + ID_OUI_FROM_DATABASE=Black Diamond Advanced Technology, LLC + +@@ -67438,6 +68488,9 @@ OUI:E8A4C1* + OUI:E8ABFA* + ID_OUI_FROM_DATABASE=Shenzhen Reecam Tech.Ltd. + ++OUI:E8B1FC* ++ ID_OUI_FROM_DATABASE=Intel Corporate ++ + OUI:E8B4AE* + ID_OUI_FROM_DATABASE=Shenzhen C&D Electronics Co.,Ltd + +@@ -67519,6 +68572,9 @@ OUI:E8E776* + OUI:E8E875* + ID_OUI_FROM_DATABASE=iS5 Communications Inc. + ++OUI:E8EA6A* ++ ID_OUI_FROM_DATABASE=StarTech.com ++ + OUI:E8EADA* + ID_OUI_FROM_DATABASE=Denkovi Assembly Electroncs LTD + +@@ -67534,6 +68590,9 @@ OUI:E8F226* + OUI:E8F928* + ID_OUI_FROM_DATABASE=RFTECH SRL + ++OUI:E8FC60* ++ ID_OUI_FROM_DATABASE=ELCOM Innovations Private Limited ++ + OUI:EC0ED6* + ID_OUI_FROM_DATABASE=ITECH INSTRUMENTS SAS + +@@ -67756,6 +68815,12 @@ OUI:ECF236* + OUI:ECF35B* + ID_OUI_FROM_DATABASE=Nokia Corporation + ++OUI:ECF4BB* ++ ID_OUI_FROM_DATABASE=Dell Inc PCBA Test ++ ++OUI:ECF72B* ++ ID_OUI_FROM_DATABASE=HD DIGITAL TECH CO., LTD. ++ + OUI:ECFAAA* + ID_OUI_FROM_DATABASE=The IMS Company + +@@ -67783,6 +68848,9 @@ OUI:F008F1* + OUI:F013C3* + ID_OUI_FROM_DATABASE=SHENZHEN FENDA TECHNOLOGY CO., LTD + ++OUI:F015A0* ++ ID_OUI_FROM_DATABASE=KyungDong One Co., Ltd. ++ + OUI:F01C13* + ID_OUI_FROM_DATABASE=LG Electronics + +@@ -67822,12 +68890,21 @@ OUI:F02A61* + OUI:F02FD8* + ID_OUI_FROM_DATABASE=Bi2-Vision + ++OUI:F0321A* ++ ID_OUI_FROM_DATABASE=Mita-Teknik A/S ++ + OUI:F037A1* + ID_OUI_FROM_DATABASE=Huike Electronics (SHENZHEN) CO., LTD. + ++OUI:F03A4B* ++ ID_OUI_FROM_DATABASE=Bloombase, Inc. ++ + OUI:F03A55* + ID_OUI_FROM_DATABASE=Omega Elektronik AS + ++OUI:F03FF8* ++ ID_OUI_FROM_DATABASE=R L Drake ++ + OUI:F04335* + ID_OUI_FROM_DATABASE=DVN(Shanghai)Ltd. + +@@ -67900,12 +68977,18 @@ OUI:F07F0C* + OUI:F081AF* + ID_OUI_FROM_DATABASE=IRZ AUTOMATION TECHNOLOGIES LTD + ++OUI:F08261* ++ ID_OUI_FROM_DATABASE=SAGEMCOM ++ + OUI:F0842F* + ID_OUI_FROM_DATABASE=ADB Broadband Italia + + OUI:F084C9* + ID_OUI_FROM_DATABASE=zte corporation + ++OUI:F08A28* ++ ID_OUI_FROM_DATABASE=JIANGSU HENGSION ELECTRONIC S and T CO.,LTD ++ + OUI:F08BFE* + ID_OUI_FROM_DATABASE=COSTEL.,CO.LTD + +@@ -67990,6 +69073,9 @@ OUI:F0DA7C* + OUI:F0DB30* + ID_OUI_FROM_DATABASE=Yottabyte + ++OUI:F0DBF8* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:F0DCE2* + ID_OUI_FROM_DATABASE=Apple + +@@ -68029,6 +69115,9 @@ OUI:F0F260* + OUI:F0F5AE* + ID_OUI_FROM_DATABASE=Adaptrum Inc. + ++OUI:F0F61C* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:F0F644* + ID_OUI_FROM_DATABASE=Whitesky Science & Technology Co.,Ltd. + +@@ -68089,6 +69178,9 @@ OUI:F42896* + OUI:F436E1* + ID_OUI_FROM_DATABASE=Abilis Systems SARL + ++OUI:F437B7* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:F43814* + ID_OUI_FROM_DATABASE=Shanghai Howell Electronic Co.,Ltd + +@@ -68191,6 +69283,9 @@ OUI:F48771* + OUI:F48E09* + ID_OUI_FROM_DATABASE=Nokia Corporation + ++OUI:F490CA* ++ ID_OUI_FROM_DATABASE=Tensorcom ++ + OUI:F490EA* + ID_OUI_FROM_DATABASE=Deciso B.V. + +@@ -68221,9 +69316,15 @@ OUI:F4B164* + OUI:F4B381* + ID_OUI_FROM_DATABASE=WindowMaster A/S + ++OUI:F4B52F* ++ ID_OUI_FROM_DATABASE=Juniper networks ++ + OUI:F4B549* + ID_OUI_FROM_DATABASE=Yeastar Technology Co., Ltd. + ++OUI:F4B6E5* ++ ID_OUI_FROM_DATABASE=TerraSem Co.,Ltd ++ + OUI:F4B72A* + ID_OUI_FROM_DATABASE=TIME INTERCONNECT LTD + +@@ -68251,6 +69352,9 @@ OUI:F4CD90* + OUI:F4CE46* + ID_OUI_FROM_DATABASE=Hewlett-Packard Company + ++OUI:F4CFE2* ++ ID_OUI_FROM_DATABASE=Cisco ++ + OUI:F4D9FB* + ID_OUI_FROM_DATABASE=Samsung Electronics CO., LTD + +@@ -68260,6 +69364,9 @@ OUI:F4DC4D* + OUI:F4DCDA* + ID_OUI_FROM_DATABASE=Zhuhai Jiahe Communication Technology Co., limited + ++OUI:F4DCF9* ++ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd ++ + OUI:F4E142* + ID_OUI_FROM_DATABASE=Delta Elektronika BV + +@@ -68413,6 +69520,9 @@ OUI:F8572E* + OUI:F85BC9* + ID_OUI_FROM_DATABASE=M-Cube Spa + ++OUI:F85C45* ++ ID_OUI_FROM_DATABASE=IC Nexus Co. Ltd. ++ + OUI:F85F2A* + ID_OUI_FROM_DATABASE=Nokia Corporation + +@@ -68494,6 +69604,9 @@ OUI:F8A45F* + OUI:F8A963* + ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD. + ++OUI:F8A9D0* ++ ID_OUI_FROM_DATABASE=LG Electronics ++ + OUI:F8A9DE* + ID_OUI_FROM_DATABASE=PUISSANCE PLUS + +@@ -68566,6 +69679,9 @@ OUI:F8DC7A* + OUI:F8DFA8* + ID_OUI_FROM_DATABASE=ZTE Corporation + ++OUI:F8E079* ++ ID_OUI_FROM_DATABASE=Motorola Mobility LLC ++ + OUI:F8E4FB* + ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc + +@@ -68581,6 +69697,9 @@ OUI:F8EA0A* + OUI:F8EDA5* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + ++OUI:F8F005* ++ ID_OUI_FROM_DATABASE=Newport Media Inc. ++ + OUI:F8F014* + ID_OUI_FROM_DATABASE=RackWare Inc. + +@@ -68623,12 +69742,18 @@ OUI:FC01CD* + OUI:FC0647* + ID_OUI_FROM_DATABASE=Cortland Research, LLC + ++OUI:FC07A0* ++ ID_OUI_FROM_DATABASE=LRE Medical GmbH ++ + OUI:FC0877* + ID_OUI_FROM_DATABASE=Prentke Romich Company + + OUI:FC09D8* + ID_OUI_FROM_DATABASE=ACTEON Group + ++OUI:FC09F6* ++ ID_OUI_FROM_DATABASE=GUANGDONG TONZE ELECTRIC CO.,LTD ++ + OUI:FC0A81* + ID_OUI_FROM_DATABASE=Motorola Solutions Inc. + +@@ -68641,6 +69766,15 @@ OUI:FC10BD* + OUI:FC1186* + ID_OUI_FROM_DATABASE=Logic3 plc + ++OUI:FC1349* ++ ID_OUI_FROM_DATABASE=Global Apps Corp. ++ ++OUI:FC15B4* ++ ID_OUI_FROM_DATABASE=Hewlett Packard ++ ++OUI:FC1607* ++ ID_OUI_FROM_DATABASE=Taian Technology(Wuxi) Co.,Ltd. ++ + OUI:FC1794* + ID_OUI_FROM_DATABASE=InterCreative Co., Ltd + +@@ -68668,6 +69802,9 @@ OUI:FC229C* + OUI:FC253F* + ID_OUI_FROM_DATABASE=Apple + ++OUI:FC27A2* ++ ID_OUI_FROM_DATABASE=TRANS ELECTRIC CO., LTD. ++ + OUI:FC2A54* + ID_OUI_FROM_DATABASE=Connected Data, Inc. + +@@ -68761,6 +69898,9 @@ OUI:FC8E7E* + OUI:FC8FC4* + ID_OUI_FROM_DATABASE=Intelligent Technology Inc. + ++OUI:FC923B* ++ ID_OUI_FROM_DATABASE=Nokia Corporation ++ + OUI:FC946C* + ID_OUI_FROM_DATABASE=UBIVELOX + +@@ -68791,6 +69931,9 @@ OUI:FCAF6A* + OUI:FCB0C4* + ID_OUI_FROM_DATABASE=Shanghai DareGlobal Technologies Co., Ltd + ++OUI:FCBBA1* ++ ID_OUI_FROM_DATABASE=Shenzhen Minicreate Technology Co.,Ltd ++ + OUI:FCC23D* + ID_OUI_FROM_DATABASE=Atmel Corporation + +@@ -68851,6 +69994,9 @@ OUI:FCF528* + OUI:FCF8AE* + ID_OUI_FROM_DATABASE=Intel Corporate + ++OUI:FCF8B7* ++ ID_OUI_FROM_DATABASE=TRONTEQ Electronic ++ + OUI:FCFAF7* + ID_OUI_FROM_DATABASE=Shanghai Baud Data Communication Co.,Ltd. + +diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb +index 289f81c..6142dc8 100644 +--- a/hwdb/20-pci-vendor-model.hwdb ++++ b/hwdb/20-pci-vendor-model.hwdb +@@ -917,6 +917,9 @@ pci:v00001000d0000005Bsv00001028sd00001F37* + pci:v00001000d0000005Bsv00001028sd00001F38* + ID_MODEL_FROM_DATABASE=PERC H710 Mini (for monolithics) + ++pci:v00001000d0000005Bsv00008086sd00003510* ++ ID_MODEL_FROM_DATABASE=RMS25PB080 RAID Controller ++ + pci:v00001000d0000005Bsv00008086sd00003513* + ID_MODEL_FROM_DATABASE=RMS25CB080 RAID Controller + +@@ -4203,7 +4206,7 @@ pci:v00001002d00006631* + ID_MODEL_FROM_DATABASE=Oland + + pci:v00001002d00006640* +- ID_MODEL_FROM_DATABASE=Saturn XT [Radeon HD 8950M] ++ ID_MODEL_FROM_DATABASE=Saturn XT [FirePro M6100] + + pci:v00001002d00006641* + ID_MODEL_FROM_DATABASE=Saturn PRO [Radeon HD 8930M] +@@ -4248,7 +4251,10 @@ pci:v00001002d00006660* + ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A/8670M/8690M] + + pci:v00001002d00006663* +- ID_MODEL_FROM_DATABASE=Sun PRO [Radeon HD 8570M] ++ ID_MODEL_FROM_DATABASE=Sun PRO [Radeon HD 8570A/8570M] ++ ++pci:v00001002d00006663sv00001025sd00000846* ++ ID_MODEL_FROM_DATABASE=Radeon HD 8570A + + pci:v00001002d00006664* + ID_MODEL_FROM_DATABASE=Jet XT [Radeon R5 M200 Series] +@@ -4904,12 +4910,18 @@ pci:v00001002d00006758sv0000174Bsd00007670* + pci:v00001002d00006758sv0000174Bsd0000E181* + ID_MODEL_FROM_DATABASE=Radeon HD 6670 + ++pci:v00001002d00006758sv00001787sd00002309* ++ ID_MODEL_FROM_DATABASE=Radeon HD 6670 ++ + pci:v00001002d00006759* +- ID_MODEL_FROM_DATABASE=Turks PRO [Radeon HD 6570/7570] ++ ID_MODEL_FROM_DATABASE=Turks PRO [Radeon HD 6570/7570/8550] + + pci:v00001002d00006759sv0000103Csd00003130* + ID_MODEL_FROM_DATABASE=Radeon HD 6570 + ++pci:v00001002d00006759sv00001043sd00000403* ++ ID_MODEL_FROM_DATABASE=Radeon HD 6570 ++ + pci:v00001002d00006759sv00001462sd00002500* + ID_MODEL_FROM_DATABASE=Radeon HD 6570 + +@@ -4925,6 +4937,9 @@ pci:v00001002d00006759sv00001642sd00003A67* + pci:v00001002d00006759sv00001682sd00003280* + ID_MODEL_FROM_DATABASE=Radeon HD 7570 + ++pci:v00001002d00006759sv00001682sd00003530* ++ ID_MODEL_FROM_DATABASE=Radeon HD 8550 ++ + pci:v00001002d00006759sv0000174Bsd00007570* + ID_MODEL_FROM_DATABASE=Radeon HD 7570 + +@@ -5585,6 +5600,9 @@ pci:v00001002d00006779sv0000103Csd00002128* + pci:v00001002d00006779sv0000103Csd00002AEE* + ID_MODEL_FROM_DATABASE=Radeon HD 7450A + ++pci:v00001002d00006779sv00001462sd00002125* ++ ID_MODEL_FROM_DATABASE=Radeon HD 6450 ++ + pci:v00001002d00006779sv00001462sd00002346* + ID_MODEL_FROM_DATABASE=Radeon HD 7450 + +@@ -5813,6 +5831,15 @@ pci:v00001002d000067A1* + pci:v00001002d000067A2* + ID_MODEL_FROM_DATABASE=Hawaii GL + ++pci:v00001002d000067A8* ++ ID_MODEL_FROM_DATABASE=Hawaii ++ ++pci:v00001002d000067A9* ++ ID_MODEL_FROM_DATABASE=Hawaii ++ ++pci:v00001002d000067AA* ++ ID_MODEL_FROM_DATABASE=Hawaii ++ + pci:v00001002d000067B0* + ID_MODEL_FROM_DATABASE=Hawaii XT [Radeon R9 290X] + +@@ -5907,7 +5934,7 @@ pci:v00001002d00006821sv00001002sd0000031E* + ID_MODEL_FROM_DATABASE=FirePro SX4000 + + pci:v00001002d00006822* +- ID_MODEL_FROM_DATABASE=Venus PRO ++ ID_MODEL_FROM_DATABASE=Venus PRO [Radeon E8860] + + pci:v00001002d00006823* + ID_MODEL_FROM_DATABASE=Venus PRO [Radeon HD 8850M] +@@ -7463,6 +7490,9 @@ pci:v00001002d000068F9sv0000103Csd00002AAE* + pci:v00001002d000068F9sv0000103Csd00003580* + ID_MODEL_FROM_DATABASE=Radeon HD 5450 + ++pci:v00001002d000068F9sv00001043sd00000386* ++ ID_MODEL_FROM_DATABASE=Radeon HD 5450 ++ + pci:v00001002d000068F9sv00001043sd000003C2* + ID_MODEL_FROM_DATABASE=EAH5450 SILENT/DI/512MD2 (LP) + +@@ -8834,9 +8864,18 @@ pci:v00001002d00009901* + pci:v00001002d00009902* + ID_MODEL_FROM_DATABASE=Trinity HDMI Audio Controller + ++pci:v00001002d00009902sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001002d00009903* + ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7640G] + ++pci:v00001002d00009903sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ ++pci:v00001002d00009903sv0000103Csd00001952* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001002d00009904* + ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7560D] + +@@ -10964,6 +11003,9 @@ pci:v00001022d00007801* + pci:v00001022d00007801sv0000103Csd0000168B* + ID_MODEL_FROM_DATABASE=ProBook 4535s Notebook + ++pci:v00001022d00007801sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d00007802* + ID_MODEL_FROM_DATABASE=FCH SATA Controller [RAID mode] + +@@ -10982,27 +11024,45 @@ pci:v00001022d00007806* + pci:v00001022d00007807* + ID_MODEL_FROM_DATABASE=FCH USB OHCI Controller + ++pci:v00001022d00007807sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d00007808* + ID_MODEL_FROM_DATABASE=FCH USB EHCI Controller + ++pci:v00001022d00007808sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d00007809* + ID_MODEL_FROM_DATABASE=FCH USB OHCI Controller + ++pci:v00001022d00007809sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d0000780B* + ID_MODEL_FROM_DATABASE=FCH SMBus Controller + ++pci:v00001022d0000780Bsv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d0000780C* + ID_MODEL_FROM_DATABASE=FCH IDE Controller + + pci:v00001022d0000780D* + ID_MODEL_FROM_DATABASE=FCH Azalia Controller + ++pci:v00001022d0000780Dsv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d0000780Dsv00001043sd00008444* + ID_MODEL_FROM_DATABASE=F2A85-M Series + + pci:v00001022d0000780E* + ID_MODEL_FROM_DATABASE=FCH LPC Bridge + ++pci:v00001022d0000780Esv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d0000780F* + ID_MODEL_FROM_DATABASE=FCH PCI Bridge + +@@ -11015,11 +11075,41 @@ pci:v00001022d00007813* + pci:v00001022d00007814* + ID_MODEL_FROM_DATABASE=FCH USB XHCI Controller + ++pci:v00001022d00007814sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v00001022d00007900* +- ID_MODEL_FROM_DATABASE=CZ SATA Controller [IDE mode] ++ ID_MODEL_FROM_DATABASE=FCH SATA Controller [IDE mode] ++ ++pci:v00001022d00007901* ++ ID_MODEL_FROM_DATABASE=FCH SATA Controller [AHCI mode] ++ ++pci:v00001022d00007902* ++ ID_MODEL_FROM_DATABASE=FCH SATA Controller [RAID mode] ++ ++pci:v00001022d00007903* ++ ID_MODEL_FROM_DATABASE=FCH SATA Controller [RAID mode] ++ ++pci:v00001022d00007904* ++ ID_MODEL_FROM_DATABASE=FCH SATA Controller [AHCI mode] ++ ++pci:v00001022d00007906* ++ ID_MODEL_FROM_DATABASE=FCH SD Flash Controller ++ ++pci:v00001022d00007908* ++ ID_MODEL_FROM_DATABASE=FCH USB EHCI Controller + + pci:v00001022d0000790B* +- ID_MODEL_FROM_DATABASE=CZ SMBus Controller ++ ID_MODEL_FROM_DATABASE=FCH SMBus Controller ++ ++pci:v00001022d0000790E* ++ ID_MODEL_FROM_DATABASE=FCH LPC Bridge ++ ++pci:v00001022d0000790F* ++ ID_MODEL_FROM_DATABASE=FCH PCI Bridge ++ ++pci:v00001022d00007914* ++ ID_MODEL_FROM_DATABASE=FCH USB XHCI Controller + + pci:v00001022d00009600* + ID_MODEL_FROM_DATABASE=RS780 Host Bridge +@@ -23672,6 +23762,21 @@ pci:v000010DEd000005E6* + pci:v000010DEd000005E7* + ID_MODEL_FROM_DATABASE=GT200GL [Tesla C1060 / M1060] + ++pci:v000010DEd000005E7sv000010DEsd00000595* ++ ID_MODEL_FROM_DATABASE=Tesla T10 Processor ++ ++pci:v000010DEd000005E7sv000010DEsd0000068F* ++ ID_MODEL_FROM_DATABASE=Tesla T10 Processor ++ ++pci:v000010DEd000005E7sv000010DEsd00000697* ++ ID_MODEL_FROM_DATABASE=Tesla M1060 ++ ++pci:v000010DEd000005E7sv000010DEsd00000714* ++ ID_MODEL_FROM_DATABASE=Tesla M1060 ++ ++pci:v000010DEd000005E7sv000010DEsd00000743* ++ ID_MODEL_FROM_DATABASE=Tesla M1060 ++ + pci:v000010DEd000005EA* + ID_MODEL_FROM_DATABASE=GT200 [GeForce GTX 260] + +@@ -23732,6 +23837,9 @@ pci:v000010DEd00000608* + pci:v000010DEd00000609* + ID_MODEL_FROM_DATABASE=G92M [GeForce 8800M GTS] + ++pci:v000010DEd00000609sv0000106Bsd000000A7* ++ ID_MODEL_FROM_DATABASE=GeForce 8800 GS ++ + pci:v000010DEd0000060A* + ID_MODEL_FROM_DATABASE=G92M [GeForce GTX 280M] + +@@ -23864,6 +23972,9 @@ pci:v000010DEd0000062D* + pci:v000010DEd0000062E* + ID_MODEL_FROM_DATABASE=G94 [GeForce 9600 GT] + ++pci:v000010DEd0000062Esv0000106Bsd00000605* ++ ID_MODEL_FROM_DATABASE=GeForce GT 130 ++ + pci:v000010DEd0000062F* + ID_MODEL_FROM_DATABASE=G94 [GeForce 9800 S] + +@@ -23921,6 +24032,9 @@ pci:v000010DEd00000648* + pci:v000010DEd00000649* + ID_MODEL_FROM_DATABASE=G96M [GeForce 9600M GT] + ++pci:v000010DEd00000649sv00001043sd0000202D* ++ ID_MODEL_FROM_DATABASE=GeForce GT 220M ++ + pci:v000010DEd0000064A* + ID_MODEL_FROM_DATABASE=G96M [GeForce 9700M GT] + +@@ -23942,12 +24056,21 @@ pci:v000010DEd00000651* + pci:v000010DEd00000652* + ID_MODEL_FROM_DATABASE=G96M [GeForce GT 130M] + ++pci:v000010DEd00000652sv0000152Dsd00000850* ++ ID_MODEL_FROM_DATABASE=GeForce GT 240M LE ++ + pci:v000010DEd00000653* + ID_MODEL_FROM_DATABASE=G96M [GeForce GT 120M] + + pci:v000010DEd00000654* + ID_MODEL_FROM_DATABASE=G96M [GeForce GT 220M] + ++pci:v000010DEd00000654sv00001043sd000014A2* ++ ID_MODEL_FROM_DATABASE=GeForce GT 320M ++ ++pci:v000010DEd00000654sv00001043sd000014D2* ++ ID_MODEL_FROM_DATABASE=GeForce GT 320M ++ + pci:v000010DEd00000655* + ID_MODEL_FROM_DATABASE=G96 [GeForce GT 120] + +@@ -24098,6 +24221,9 @@ pci:v000010DEd000006E7* + pci:v000010DEd000006E8* + ID_MODEL_FROM_DATABASE=G98M [GeForce 9200M GS] + ++pci:v000010DEd000006E8sv0000103Csd0000360B* ++ ID_MODEL_FROM_DATABASE=GeForce 9200M GE ++ + pci:v000010DEd000006E9* + ID_MODEL_FROM_DATABASE=G98M [GeForce 9300M GS] + +@@ -24596,6 +24722,9 @@ pci:v000010DEd000007FEsv00001019sd0000297A* + pci:v000010DEd000007FEsv00001AFAsd00007150* + ID_MODEL_FROM_DATABASE=JW-IN7150-HD + ++pci:v000010DEd00000840* ++ ID_MODEL_FROM_DATABASE=C77 [GeForce 8200M] ++ + pci:v000010DEd00000844* + ID_MODEL_FROM_DATABASE=C77 [GeForce 9100M G] + +@@ -24665,6 +24794,9 @@ pci:v000010DEd00000865* + pci:v000010DEd00000866* + ID_MODEL_FROM_DATABASE=C79 [GeForce 9400M G] + ++pci:v000010DEd00000866sv0000106Bsd000000B1* ++ ID_MODEL_FROM_DATABASE=GeForce 9400M ++ + pci:v000010DEd00000867* + ID_MODEL_FROM_DATABASE=C79 [GeForce 9400] + +@@ -24746,6 +24878,9 @@ pci:v000010DEd0000087E* + pci:v000010DEd0000087F* + ID_MODEL_FROM_DATABASE=ION LE VGA + ++pci:v000010DEd000008A0* ++ ID_MODEL_FROM_DATABASE=MCP89 [GeForce 320M] ++ + pci:v000010DEd000008A2* + ID_MODEL_FROM_DATABASE=MCP89 [GeForce 320M] + +@@ -24755,6 +24890,9 @@ pci:v000010DEd000008A3* + pci:v000010DEd000008A4* + ID_MODEL_FROM_DATABASE=MCP89 [GeForce 320M] + ++pci:v000010DEd000008A5* ++ ID_MODEL_FROM_DATABASE=MCP89 [GeForce 320M] ++ + pci:v000010DEd00000A20* + ID_MODEL_FROM_DATABASE=GT216 [GeForce GT 220] + +@@ -24875,6 +25013,9 @@ pci:v000010DEd00000A73* + pci:v000010DEd00000A74* + ID_MODEL_FROM_DATABASE=GT218M [GeForce G210M] + ++pci:v000010DEd00000A74sv00001B0Asd0000903A* ++ ID_MODEL_FROM_DATABASE=GeForce G210 ++ + pci:v000010DEd00000A75* + ID_MODEL_FROM_DATABASE=GT218M [GeForce 310M] + +@@ -24986,6 +25127,9 @@ pci:v000010DEd00000A7Asv00001462sd0000AC82* + pci:v000010DEd00000A7Asv00001462sd0000AE33* + ID_MODEL_FROM_DATABASE=GeForce 405 + ++pci:v000010DEd00000A7Asv00001642sd00003980* ++ ID_MODEL_FROM_DATABASE=GeForce 405 ++ + pci:v000010DEd00000A7Asv000017AAsd00003950* + ID_MODEL_FROM_DATABASE=GeForce 405M + +@@ -24995,6 +25139,9 @@ pci:v000010DEd00000A7Asv000017AAsd0000397D* + pci:v000010DEd00000A7Asv00001B0Asd00002091* + ID_MODEL_FROM_DATABASE=GeForce 315M + ++pci:v000010DEd00000A7Asv00001B0Asd000090B4* ++ ID_MODEL_FROM_DATABASE=GeForce 405 ++ + pci:v000010DEd00000A7Asv00001BFDsd00000003* + ID_MODEL_FROM_DATABASE=GeForce 405 + +@@ -25266,7 +25413,7 @@ pci:v000010DEd00000AD8* + ID_MODEL_FROM_DATABASE=MCP78S [GeForce 8200] SATA Controller (RAID mode) + + pci:v000010DEd00000BE2* +- ID_MODEL_FROM_DATABASE=High Definition Audio Controller ++ ID_MODEL_FROM_DATABASE=GT216 HDMI Audio Controller + + pci:v000010DEd00000BE2sv00001043sd00008311* + ID_MODEL_FROM_DATABASE=ENGT220/DI/1GD3(LP)/V2 +@@ -25460,12 +25607,42 @@ pci:v000010DEd00000DE4* + pci:v000010DEd00000DE5* + ID_MODEL_FROM_DATABASE=GF108 [GeForce GT 530] + ++pci:v000010DEd00000DE7* ++ ID_MODEL_FROM_DATABASE=GF108 [GeForce GT 610] ++ + pci:v000010DEd00000DE8* + ID_MODEL_FROM_DATABASE=GF108M [GeForce GT 620M] + + pci:v000010DEd00000DE9* + ID_MODEL_FROM_DATABASE=GF108M [GeForce GT 630M] + ++pci:v000010DEd00000DE9sv00001025sd00000692* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd00000725* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd00000728* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd0000072B* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd0000072E* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd00000753* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv00001025sd00000754* ++ ID_MODEL_FROM_DATABASE=GeForce GT 620M ++ ++pci:v000010DEd00000DE9sv000017AAsd00003977* ++ ID_MODEL_FROM_DATABASE=GeForce GT 640M LE ++ ++pci:v000010DEd00000DE9sv00001B0Asd00002210* ++ ID_MODEL_FROM_DATABASE=GeForce GT 635M ++ + pci:v000010DEd00000DEA* + ID_MODEL_FROM_DATABASE=GF108M [GeForce 610M] + +@@ -25514,6 +25691,12 @@ pci:v000010DEd00000DF3* + pci:v000010DEd00000DF4* + ID_MODEL_FROM_DATABASE=GF108M [GeForce GT 540M] + ++pci:v000010DEd00000DF4sv0000152Dsd00000952* ++ ID_MODEL_FROM_DATABASE=GeForce GT 630M ++ ++pci:v000010DEd00000DF4sv0000152Dsd00000953* ++ ID_MODEL_FROM_DATABASE=GeForce GT 630M ++ + pci:v000010DEd00000DF5* + ID_MODEL_FROM_DATABASE=GF108M [GeForce GT 525M] + +@@ -25610,6 +25793,9 @@ pci:v000010DEd00000FC6sv00001043sd00008428* + pci:v000010DEd00000FCD* + ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 755M] + ++pci:v000010DEd00000FCE* ++ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 640M LE] ++ + pci:v000010DEd00000FD1* + ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 650M] + +@@ -25667,6 +25853,9 @@ pci:v000010DEd00000FE0* + pci:v000010DEd00000FE1* + ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 730M] + ++pci:v000010DEd00000FE2* ++ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 745M] ++ + pci:v000010DEd00000FE3* + ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 745M] + +@@ -25688,6 +25877,12 @@ pci:v000010DEd00000FE7* + pci:v000010DEd00000FE7sv000010DEsd0000101E* + ID_MODEL_FROM_DATABASE=GRID K100 + ++pci:v000010DEd00000FE9* ++ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 750M Mac Edition] ++ ++pci:v000010DEd00000FEA* ++ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 755M Mac Edition] ++ + pci:v000010DEd00000FEF* + ID_MODEL_FROM_DATABASE=GK107GL [GRID K340] + +@@ -25739,6 +25934,15 @@ pci:v000010DEd00001003* + pci:v000010DEd00001004* + ID_MODEL_FROM_DATABASE=GK110 [GeForce GTX 780] + ++pci:v000010DEd00001004sv00003842sd00000784* ++ ID_MODEL_FROM_DATABASE=GK110B [GeForce GTX 780 SC w/ ACX Cooler] ++ ++pci:v000010DEd00001004sv00003842sd00001784* ++ ID_MODEL_FROM_DATABASE=GK110B [GeForce GTX 780 Dual FTW w/ ACX Cooler] ++ ++pci:v000010DEd00001004sv00003842sd00001788* ++ ID_MODEL_FROM_DATABASE=GK110B [GeForce GTX 780 Dual Classified w/ ACX Cooler] ++ + pci:v000010DEd00001005* + ID_MODEL_FROM_DATABASE=GK110 [GeForce GTX Titan] + +@@ -25763,6 +25967,9 @@ pci:v000010DEd00001005sv00003842sd00002794* + pci:v000010DEd00001005sv00003842sd00002795* + ID_MODEL_FROM_DATABASE=GeForce GTX Titan SC Hydro Copper Signature + ++pci:v000010DEd0000100A* ++ ID_MODEL_FROM_DATABASE=GK110B [GeForce GTX 780 Ti] ++ + pci:v000010DEd0000101F* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20] + +@@ -25775,15 +25982,24 @@ pci:v000010DEd00001021* + pci:v000010DEd00001022* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20c] + ++pci:v000010DEd00001023* ++ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40m] ++ + pci:v000010DEd00001024* +- ID_MODEL_FROM_DATABASE=GK110GL [Tesla K40c] ++ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40c] + + pci:v000010DEd00001026* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20s] + ++pci:v000010DEd00001027* ++ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40st] ++ + pci:v000010DEd00001028* + ID_MODEL_FROM_DATABASE=GK110GL [Tesla K20m] + ++pci:v000010DEd00001029* ++ ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40s] ++ + pci:v000010DEd0000103A* + ID_MODEL_FROM_DATABASE=GK110GL [Quadro K6000] + +@@ -25832,6 +26048,12 @@ pci:v000010DEd00001057* + pci:v000010DEd00001058* + ID_MODEL_FROM_DATABASE=GF119M [GeForce 610M] + ++pci:v000010DEd00001058sv0000103Csd00002AED* ++ ID_MODEL_FROM_DATABASE=GeForce 610 ++ ++pci:v000010DEd00001058sv0000103Csd00002AF1* ++ ID_MODEL_FROM_DATABASE=GeForce 610 ++ + pci:v000010DEd00001058sv00001043sd000010AC* + ID_MODEL_FROM_DATABASE=GeForce GT 610M + +@@ -25841,6 +26063,9 @@ pci:v000010DEd00001058sv00001043sd000010BC* + pci:v000010DEd00001058sv00001043sd00001652* + ID_MODEL_FROM_DATABASE=GeForce GT 610M + ++pci:v000010DEd00001059* ++ ID_MODEL_FROM_DATABASE=GF119M [GeForce 610M] ++ + pci:v000010DEd0000105A* + ID_MODEL_FROM_DATABASE=GF119M [GeForce 610M] + +@@ -25904,6 +26129,12 @@ pci:v000010DEd00001091sv000010DEsd0000088E* + pci:v000010DEd00001091sv000010DEsd00000891* + ID_MODEL_FROM_DATABASE=Tesla X2090 + ++pci:v000010DEd00001091sv000010DEsd00000974* ++ ID_MODEL_FROM_DATABASE=Tesla X2090 ++ ++pci:v000010DEd00001091sv000010DEsd0000098D* ++ ID_MODEL_FROM_DATABASE=Tesla X2090 ++ + pci:v000010DEd00001094* + ID_MODEL_FROM_DATABASE=GF110GL [Tesla M2075] + +@@ -25941,7 +26172,7 @@ pci:v000010DEd000010D8* + ID_MODEL_FROM_DATABASE=GT218 [NVS 300] + + pci:v000010DEd00001140* +- ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] ++ ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] + + pci:v000010DEd00001140sv00001025sd00000600* + ID_MODEL_FROM_DATABASE=GeForce GT 620M +@@ -26081,6 +26312,9 @@ pci:v000010DEd00001140sv00001028sd00000554* + pci:v000010DEd00001140sv00001028sd00000557* + ID_MODEL_FROM_DATABASE=GeForce GT 620M + ++pci:v000010DEd00001140sv00001028sd00000562* ++ ID_MODEL_FROM_DATABASE=GeForce GT 625M ++ + pci:v000010DEd00001140sv00001028sd00000565* + ID_MODEL_FROM_DATABASE=GeForce GT 630M + +@@ -26111,6 +26345,12 @@ pci:v000010DEd00001140sv00001028sd000005B3* + pci:v000010DEd00001140sv00001028sd000005DA* + ID_MODEL_FROM_DATABASE=GeForce GT 630M + ++pci:v000010DEd00001140sv00001028sd000005DE* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ ++pci:v000010DEd00001140sv00001028sd000005E0* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv00001028sd000005E8* + ID_MODEL_FROM_DATABASE=GeForce GT 630M + +@@ -26156,6 +26396,9 @@ pci:v000010DEd00001140sv00001043sd0000126D* + pci:v000010DEd00001140sv00001043sd0000131D* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + ++pci:v000010DEd00001140sv00001043sd000013FD* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv00001043sd000014C7* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + +@@ -26189,6 +26432,9 @@ pci:v000010DEd00001140sv00001043sd0000224A* + pci:v000010DEd00001140sv00001043sd00008595* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + ++pci:v000010DEd00001140sv00001072sd0000152D* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv000010CFsd000017F5* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + +@@ -26291,6 +26537,9 @@ pci:v000010DEd00001140sv0000144Dsd0000C709* + pci:v000010DEd00001140sv0000144Dsd0000C711* + ID_MODEL_FROM_DATABASE=GeForce 710M + ++pci:v000010DEd00001140sv0000144Dsd0000C736* ++ ID_MODEL_FROM_DATABASE=GeForce 710M ++ + pci:v000010DEd00001140sv00001462sd000010B8* + ID_MODEL_FROM_DATABASE=GeForce GT 710M + +@@ -26303,6 +26552,9 @@ pci:v000010DEd00001140sv00001462sd0000AA33* + pci:v000010DEd00001140sv00001462sd0000AAA2* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + ++pci:v000010DEd00001140sv00001462sd0000AAA3* ++ ID_MODEL_FROM_DATABASE=GeForce 820M ++ + pci:v000010DEd00001140sv00001462sd0000AE71* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + +@@ -26315,15 +26567,30 @@ pci:v000010DEd00001140sv0000152Dsd00000982* + pci:v000010DEd00001140sv0000152Dsd00000983* + ID_MODEL_FROM_DATABASE=GeForce GT 630M + ++pci:v000010DEd00001140sv0000152Dsd00001012* ++ ID_MODEL_FROM_DATABASE=GeForce 710M ++ + pci:v000010DEd00001140sv0000152Dsd00001030* + ID_MODEL_FROM_DATABASE=GeForce GT 630M + + pci:v000010DEd00001140sv0000152Dsd00001055* + ID_MODEL_FROM_DATABASE=GeForce 710M + ++pci:v000010DEd00001140sv0000152Dsd00001067* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ ++pci:v000010DEd00001140sv0000152Dsd00001072* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv000017AAsd00002200* + ID_MODEL_FROM_DATABASE=NVS 5200M + ++pci:v000010DEd00001140sv000017AAsd00002213* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ ++pci:v000010DEd00001140sv000017AAsd00002220* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv000017AAsd00003656* + ID_MODEL_FROM_DATABASE=GeForce GT 620M + +@@ -26369,6 +26636,9 @@ pci:v000010DEd00001140sv000017AAsd00003977* + pci:v000010DEd00001140sv000017AAsd00003983* + ID_MODEL_FROM_DATABASE=GeForce 610M + ++pci:v000010DEd00001140sv000017AAsd00005001* ++ ID_MODEL_FROM_DATABASE=GeForce 610M ++ + pci:v000010DEd00001140sv000017AAsd00005003* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + +@@ -26414,18 +26684,33 @@ pci:v000010DEd00001140sv000017AAsd0000502E* + pci:v000010DEd00001140sv000017AAsd0000502F* + ID_MODEL_FROM_DATABASE=GeForce GT 720M + ++pci:v000010DEd00001140sv000017AAsd0000503E* ++ ID_MODEL_FROM_DATABASE=GeForce 710M ++ ++pci:v000010DEd00001140sv000017AAsd0000503F* ++ ID_MODEL_FROM_DATABASE=GeForce 820M ++ + pci:v000010DEd00001140sv00001854sd00000177* + ID_MODEL_FROM_DATABASE=GeForce 710M + + pci:v000010DEd00001140sv00001854sd00000180* + ID_MODEL_FROM_DATABASE=GeForce 710M + ++pci:v000010DEd00001140sv00001854sd00000190* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ ++pci:v000010DEd00001140sv00001854sd00000192* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001140sv00001B0Asd000020DD* + ID_MODEL_FROM_DATABASE=GeForce GT 620M + + pci:v000010DEd00001140sv00001B0Asd000020DF* + ID_MODEL_FROM_DATABASE=GeForce GT 620M + ++pci:v000010DEd00001140sv00001B0Asd00002202* ++ ID_MODEL_FROM_DATABASE=GeForce GT 720M ++ + pci:v000010DEd00001180* + ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 680] + +@@ -26484,10 +26769,10 @@ pci:v000010DEd00001193* + ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 760 Ti OEM] + + pci:v000010DEd0000119D* +- ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 775M] ++ ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 775M Mac Edition] + + pci:v000010DEd0000119E* +- ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 780M] ++ ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 780M Mac Edition] + + pci:v000010DEd0000119F* + ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 780M] +@@ -27210,32 +27495,23 @@ pci:v000010EC* + ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Co., Ltd. + + pci:v000010ECd00000139* +- ID_MODEL_FROM_DATABASE=Zonet Zen3200 +- +-pci:v000010ECd00000880* +- ID_MODEL_FROM_DATABASE=Realtek 880 High Definition Audio +- +-pci:v000010ECd00000883* +- ID_MODEL_FROM_DATABASE=Realtek 883 High Definition Audio +- +-pci:v000010ECd00000885* +- ID_MODEL_FROM_DATABASE=Realtek 885 High Definition Audio +- +-pci:v000010ECd00000888* +- ID_MODEL_FROM_DATABASE=Realtek 888 High Definition Audio +- +-pci:v000010ECd00000892* +- ID_MODEL_FROM_DATABASE=Realtek 892 High Definition Audio ++ ID_MODEL_FROM_DATABASE=RTL-8139/8139C/8139C+ Ethernet Controller + + pci:v000010ECd00005209* + ID_MODEL_FROM_DATABASE=RTS5209 PCI Express Card Reader + ++pci:v000010ECd00005227* ++ ID_MODEL_FROM_DATABASE=RTS5227 PCI Express Card Reader ++ + pci:v000010ECd00005229* + ID_MODEL_FROM_DATABASE=RTS5229 PCI Express Card Reader + + pci:v000010ECd00005229sv00001025sd00000813* + ID_MODEL_FROM_DATABASE=Aspire R7-571 + ++pci:v000010ECd00005229sv0000103Csd0000194E* ++ ID_MODEL_FROM_DATABASE=ProBook 455 G1 Notebook ++ + pci:v000010ECd00005288* + ID_MODEL_FROM_DATABASE=Barossa PCI Express Card Reader + +@@ -27449,6 +27725,9 @@ pci:v000010ECd00008168* + pci:v000010ECd00008168sv00001019sd00008168* + ID_MODEL_FROM_DATABASE=RTL8111/8168 PCI Express Gigabit Ethernet controller + ++pci:v000010ECd00008168sv00001028sd00000283* ++ ID_MODEL_FROM_DATABASE=Vostro 220 ++ + pci:v000010ECd00008168sv00001028sd000004B2* + ID_MODEL_FROM_DATABASE=Vostro 3350 + +@@ -27458,6 +27737,9 @@ pci:v000010ECd00008168sv00001028sd000004DA* + pci:v000010ECd00008168sv0000103Csd00001611* + ID_MODEL_FROM_DATABASE=Pavilion DM1Z-3000 + ++pci:v000010ECd00008168sv0000103Csd00001950* ++ ID_MODEL_FROM_DATABASE=ProBook 450/455 ++ + pci:v000010ECd00008168sv00001043sd000011F5* + ID_MODEL_FROM_DATABASE=A6J-Q008 + +@@ -27617,6 +27899,9 @@ pci:v000010ECd00008199sv00001462sd00006894* + pci:v000010ECd00008723* + ID_MODEL_FROM_DATABASE=RTL8723AE PCIe Wireless Network Adapter + ++pci:v000010ECd0000B723* ++ ID_MODEL_FROM_DATABASE=RTL8723BE PCIe Wireless Network Adapter ++ + pci:v000010ED* + ID_VENDOR_FROM_DATABASE=Ascii Corporation + +@@ -31562,6 +31847,15 @@ pci:v00001137d00000042* + pci:v00001137d00000042sv00001137sd00000047* + ID_MODEL_FROM_DATABASE=VIC P81E PCIe Management Controller + ++pci:v00001137d00000042sv00001137sd00000085* ++ ID_MODEL_FROM_DATABASE=VIC 1225 PCIe Management Controller ++ ++pci:v00001137d00000042sv00001137sd000000CD* ++ ID_MODEL_FROM_DATABASE=VIC 1285 PCIe Management Controller ++ ++pci:v00001137d00000042sv00001137sd000000CE* ++ ID_MODEL_FROM_DATABASE=VIC 1225T PCIe Management Controller ++ + pci:v00001137d00000043* + ID_MODEL_FROM_DATABASE=VIC Ethernet NIC + +@@ -31580,6 +31874,12 @@ pci:v00001137d00000043sv00001137sd00000084* + pci:v00001137d00000043sv00001137sd00000085* + ID_MODEL_FROM_DATABASE=VIC 1225 PCIe Ethernet NIC + ++pci:v00001137d00000043sv00001137sd000000CD* ++ ID_MODEL_FROM_DATABASE=VIC 1285 PCIe Ethernet NIC ++ ++pci:v00001137d00000043sv00001137sd000000CE* ++ ID_MODEL_FROM_DATABASE=VIC 1225T PCIe Ethernet NIC ++ + pci:v00001137d00000044* + ID_MODEL_FROM_DATABASE=VIC Ethernet NIC Dynamic + +@@ -31598,6 +31898,12 @@ pci:v00001137d00000044sv00001137sd00000084* + pci:v00001137d00000044sv00001137sd00000085* + ID_MODEL_FROM_DATABASE=VIC 1225 PCIe Ethernet NIC Dynamic + ++pci:v00001137d00000044sv00001137sd000000CD* ++ ID_MODEL_FROM_DATABASE=VIC 1285 PCIe Ethernet NIC Dynamic ++ ++pci:v00001137d00000044sv00001137sd000000CE* ++ ID_MODEL_FROM_DATABASE=VIC 1225T PCIe Ethernet NIC Dynamic ++ + pci:v00001137d00000045* + ID_MODEL_FROM_DATABASE=VIC FCoE HBA + +@@ -31610,18 +31916,24 @@ pci:v00001137d00000045sv00001137sd00000048* + pci:v00001137d00000045sv00001137sd0000004F* + ID_MODEL_FROM_DATABASE=VIC 1280 Mezzanine FCoE HBA + ++pci:v00001137d00000045sv00001137sd00000084* ++ ID_MODEL_FROM_DATABASE=VIC 1240 MLOM FCoE HBA ++ ++pci:v00001137d00000045sv00001137sd00000085* ++ ID_MODEL_FROM_DATABASE=VIC 1225 PCIe FCoE HBA ++ ++pci:v00001137d00000045sv00001137sd000000CD* ++ ID_MODEL_FROM_DATABASE=VIC 1285 PCIe FCoE HBA ++ ++pci:v00001137d00000045sv00001137sd000000CE* ++ ID_MODEL_FROM_DATABASE=VIC 1225T PCIe FCoE HBA ++ + pci:v00001137d0000004E* + ID_MODEL_FROM_DATABASE=VIC 82 PCIe Upstream Port + + pci:v00001137d00000071* + ID_MODEL_FROM_DATABASE=VIC SR-IOV VF + +-pci:v00001137d00000084* +- ID_MODEL_FROM_DATABASE=VIC 1240 MLOM FCoE HBA +- +-pci:v00001137d00000085* +- ID_MODEL_FROM_DATABASE=VIC 1225 PCIe FCOE HBA +- + pci:v00001137d000000CF* + ID_MODEL_FROM_DATABASE=VIC Userspace NIC + +@@ -35087,6 +35399,15 @@ pci:v000011F8d00007384* + pci:v000011F8d00008000* + ID_MODEL_FROM_DATABASE=PM8000 [SPC - SAS Protocol Controller] + ++pci:v000011F8d00008032* ++ ID_MODEL_FROM_DATABASE=ATTO Celerity FC8xEN ++ ++pci:v000011F8d00008032sv0000117Csd0000003B* ++ ID_MODEL_FROM_DATABASE=Celerity FC-82EN Fibre Channel Adapter ++ ++pci:v000011F8d00008032sv0000117Csd0000003C* ++ ID_MODEL_FROM_DATABASE=Celerity FC-84EN Fibre Channel Adapter ++ + pci:v000011F9* + ID_VENDOR_FROM_DATABASE=I-Cube Inc + +@@ -42029,6 +42350,24 @@ pci:v0000144C* + pci:v0000144D* + ID_VENDOR_FROM_DATABASE=Samsung Electronics Co Ltd + ++pci:v0000144Dd00001600* ++ ID_MODEL_FROM_DATABASE=Apple PCIe SSD ++ ++pci:v0000144Dd0000A800* ++ ID_MODEL_FROM_DATABASE=XP941 PCIe SSD ++ ++pci:v0000144Dd0000A820* ++ ID_MODEL_FROM_DATABASE=NVMe SSD Controller 171X ++ ++pci:v0000144Dd0000A820sv00001028sd00001F95* ++ ID_MODEL_FROM_DATABASE=Express Flash NVMe XS1715 SSD 400GB ++ ++pci:v0000144Dd0000A820sv00001028sd00001F96* ++ ID_MODEL_FROM_DATABASE=Express Flash NVMe XS1715 SSD 800GB ++ ++pci:v0000144Dd0000A820sv00001028sd00001F97* ++ ID_MODEL_FROM_DATABASE=Express Flash NVMe XS1715 SSD 1600GB ++ + pci:v0000144E* + ID_VENDOR_FROM_DATABASE=OLITEC + +@@ -42527,6 +42866,9 @@ pci:v000014C2* + pci:v000014C3* + ID_VENDOR_FROM_DATABASE=MEDIATEK Corp. + ++pci:v000014C3d00007630* ++ ID_MODEL_FROM_DATABASE=MT7630e 802.11bgn Wireless Network Adapter ++ + pci:v000014C4* + ID_VENDOR_FROM_DATABASE=IWASAKI Information Systems Co Ltd + +@@ -46334,6 +46676,9 @@ pci:v000015ADd000007B0* + pci:v000015ADd000007C0* + ID_MODEL_FROM_DATABASE=PVSCSI SCSI Controller + ++pci:v000015ADd000007E0* ++ ID_MODEL_FROM_DATABASE=SATA AHCI controller ++ + pci:v000015ADd00000801* + ID_MODEL_FROM_DATABASE=Virtual Machine Interface + +@@ -46623,11 +46968,17 @@ pci:v000015BCd00000103* + ID_MODEL_FROM_DATABASE=QX4 PCI Express quad 4-gigabit Fibre Channel controller + + pci:v000015BCd00000105* +- ID_MODEL_FROM_DATABASE=Celerity FC-42XS Fibre Channel Adapter ++ ID_MODEL_FROM_DATABASE=Celerity FC-44XS/FC-42XS/FC-41XS/FC-44ES/FC-42ES/FC-41ES + + pci:v000015BCd00000105sv0000117Csd00000022* + ID_MODEL_FROM_DATABASE=Celerity FC-42XS Fibre Channel Adapter + ++pci:v000015BCd00000105sv0000117Csd00000025* ++ ID_MODEL_FROM_DATABASE=Celerity FC-44ES Fibre Channel Adapter ++ ++pci:v000015BCd00000105sv0000117Csd00000026* ++ ID_MODEL_FROM_DATABASE=Celerity FC-42ES Fibre Channel Adapter ++ + pci:v000015BCd00001100* + ID_MODEL_FROM_DATABASE=E8001-66442 PCI Express CIC + +@@ -48215,6 +48566,9 @@ pci:v0000170C* + pci:v00001719* + ID_VENDOR_FROM_DATABASE=EZChip Technologies + ++pci:v00001719d00001000* ++ ID_MODEL_FROM_DATABASE=NPA Access Network Processor Family ++ + pci:v00001725* + ID_VENDOR_FROM_DATABASE=Vitesse Semiconductor + +@@ -49040,9 +49394,15 @@ pci:v00001814d00003092* + pci:v00001814d00003290* + ID_MODEL_FROM_DATABASE=RT3290 Wireless 802.11n 1T/1R PCIe + ++pci:v00001814d00003290sv0000103Csd000018EC* ++ ID_MODEL_FROM_DATABASE=Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter ++ + pci:v00001814d00003298* + ID_MODEL_FROM_DATABASE=RT3290 Bluetooth + ++pci:v00001814d00003298sv0000103Csd000018EC* ++ ID_MODEL_FROM_DATABASE=Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter ++ + pci:v00001814d00003592* + ID_MODEL_FROM_DATABASE=RT3592 Wireless 802.11abgn 2T/2R PCIe + +@@ -51299,6 +51659,9 @@ pci:v00001B4Bd00009172* + pci:v00001B4Bd0000917A* + ID_MODEL_FROM_DATABASE=88SE9172 SATA III 6Gb/s RAID Controller + ++pci:v00001B4Bd00009183* ++ ID_MODEL_FROM_DATABASE=88SS9183 PCIe SSD Controller ++ + pci:v00001B4Bd00009192* + ID_MODEL_FROM_DATABASE=88SE9172 SATA III 6Gb/s RAID Controller + +@@ -51455,9 +51818,27 @@ pci:v00001C1Cd00000001* + pci:v00001C2C* + ID_VENDOR_FROM_DATABASE=Fiberblaze + ++pci:v00001C2Cd0000000A* ++ ID_MODEL_FROM_DATABASE=Capture ++ ++pci:v00001C2Cd0000000F* ++ ID_MODEL_FROM_DATABASE=SmartNIC ++ ++pci:v00001C2Cd000000A0* ++ ID_MODEL_FROM_DATABASE=FBC4G Capture 4x1Gb ++ ++pci:v00001C2Cd000000A1* ++ ID_MODEL_FROM_DATABASE=FBC4XG Capture 4x10Gb ++ ++pci:v00001C2Cd000000A2* ++ ID_MODEL_FROM_DATABASE=FBC8XG Capture 8x10Gb ++ + pci:v00001C32* + ID_VENDOR_FROM_DATABASE=Highland Technology, Inc. + ++pci:v00001C33* ++ ID_VENDOR_FROM_DATABASE=Daktronics, Inc ++ + pci:v00001C3B* + ID_VENDOR_FROM_DATABASE=Accensus, LLC + +@@ -51503,6 +51884,9 @@ pci:v00001CE4d00000001* + pci:v00001CE4d00000002* + ID_MODEL_FROM_DATABASE=ExaNIC X2 + ++pci:v00001CF7* ++ ID_VENDOR_FROM_DATABASE=Subspace Dynamics ++ + pci:v00001D44* + ID_VENDOR_FROM_DATABASE=DPT + +@@ -54284,6 +54668,81 @@ pci:v00008086d000008B4sv00008086sd00008270* + pci:v00008086d000008CF* + ID_MODEL_FROM_DATABASE=Atom Processor Z2760 Integrated Graphics Controller + ++pci:v00008086d0000095A* ++ ID_MODEL_FROM_DATABASE=Wireless 7265 ++ ++pci:v00008086d0000095Asv00008086sd00001010* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005000* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005002* ++ ID_MODEL_FROM_DATABASE=Wireless-N 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005010* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005020* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 ++ ++pci:v00008086d0000095Asv00008086sd0000502A* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005090* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005110* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005400* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005410* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005420* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 ++ ++pci:v00008086d0000095Asv00008086sd00005490* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00009010* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00009210* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Asv00008086sd00009410* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095B* ++ ID_MODEL_FROM_DATABASE=Wireless 7265 ++ ++pci:v00008086d0000095Bsv00008086sd0000500A* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005012* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005200* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005202* ++ ID_MODEL_FROM_DATABASE=Wireless-N 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005210* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005290* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005302* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ ++pci:v00008086d0000095Bsv00008086sd00005310* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ + pci:v00008086d00000960* + ID_MODEL_FROM_DATABASE=80960RP (i960RP) Microprocessor/Bridge + +@@ -54299,6 +54758,9 @@ pci:v00008086d00000A04* + pci:v00008086d00000A06* + ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller + ++pci:v00008086d00000A0C* ++ ID_MODEL_FROM_DATABASE=Haswell-ULT HD Audio Controller ++ + pci:v00008086d00000A16* + ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller + +@@ -57332,6 +57794,12 @@ pci:v00008086d00001521sv00001028sd00001F62* + pci:v00008086d00001521sv0000103Csd000017D1* + ID_MODEL_FROM_DATABASE=Ethernet 1Gb 4-port 366FLR Adapter + ++pci:v00008086d00001521sv0000103Csd00002003* ++ ID_MODEL_FROM_DATABASE=Ethernet 1Gb 2-port 367i Adapter ++ ++pci:v00008086d00001521sv0000103Csd00002226* ++ ID_MODEL_FROM_DATABASE=Ethernet 1Gb 1-port 364i Adapter ++ + pci:v00008086d00001521sv0000103Csd0000337F* + ID_MODEL_FROM_DATABASE=Ethernet 1Gb 2-port 361i Adapter + +@@ -57407,6 +57875,9 @@ pci:v00008086d00001523sv0000103Csd00001784* + pci:v00008086d00001523sv0000103Csd000018D1* + ID_MODEL_FROM_DATABASE=Ethernet 1Gb 2-port 361FLB Adapter + ++pci:v00008086d00001523sv0000103Csd00001989* ++ ID_MODEL_FROM_DATABASE=Ethernet 1Gb 2-port 363i Adapter ++ + pci:v00008086d00001523sv0000103Csd0000339F* + ID_MODEL_FROM_DATABASE=Ethernet 1Gb 4-port 366M Adapter + +@@ -57584,6 +58055,9 @@ pci:v00008086d00001560* + pci:v00008086d0000157B* + ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection + ++pci:v00008086d0000157C* ++ ID_MODEL_FROM_DATABASE=I210 Gigabit Backplane Connection ++ + pci:v00008086d000015A0* + ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I218-LM + +@@ -58448,6 +58922,9 @@ pci:v00008086d00001E2Dsv00001849sd00001E2D* + pci:v00008086d00001E31* + ID_MODEL_FROM_DATABASE=7 Series/C210 Series Chipset Family USB xHCI Host Controller + ++pci:v00008086d00001E31sv0000103Csd000017AB* ++ ID_MODEL_FROM_DATABASE=ProBook 6570b ++ + pci:v00008086d00001E31sv00001043sd00001477* + ID_MODEL_FROM_DATABASE=N56VZ + +@@ -58748,7 +59225,7 @@ pci:v00008086d00001F3F* + pci:v00008086d00001F40* + ID_MODEL_FROM_DATABASE=Ethernet Connection I354 1.0 GbE Backplane + +-pci:v00008086d00001F40sv00001028sd000010F1* ++pci:v00008086d00001F40sv00001028sd000005F1* + ID_MODEL_FROM_DATABASE=Ethernet Connection I354 1.0 GbE Backplane + + pci:v00008086d00001F41* +@@ -65144,6 +65621,9 @@ pci:v00008086d00002E17* + pci:v00008086d00002E20* + ID_MODEL_FROM_DATABASE=4 Series Chipset DRAM Controller + ++pci:v00008086d00002E20sv00001028sd00000283* ++ ID_MODEL_FROM_DATABASE=Dell Vostro 220 ++ + pci:v00008086d00002E20sv00001043sd000082D3* + ID_MODEL_FROM_DATABASE=P5Q Deluxe Motherboard + +@@ -67689,7 +68169,7 @@ pci:v00008086d00004227* + ID_MODEL_FROM_DATABASE=PRO/Wireless 3945ABG [Golan] Network Connection + + pci:v00008086d00004227sv00008086sd00001011* +- ID_MODEL_FROM_DATABASE=ThinkPad R60e/X60s ++ ID_MODEL_FROM_DATABASE=ThinkPad T60/R60e/X60s + + pci:v00008086d00004227sv00008086sd00001014* + ID_MODEL_FROM_DATABASE=PRO/Wireless 3945BG Network Connection +@@ -69155,6 +69635,111 @@ pci:v00008086d00009C65* + pci:v00008086d00009C66* + ID_MODEL_FROM_DATABASE=Lynx Point-LP SPI Controller #1 + ++pci:v00008086d00009C83* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP SATA Controller [AHCI Mode] ++ ++pci:v00008086d00009C85* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP SATA Controller [RAID Mode] ++ ++pci:v00008086d00009C87* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP SATA Controller [RAID Mode] ++ ++pci:v00008086d00009C8F* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP SATA Controller [RAID Mode] ++ ++pci:v00008086d00009C90* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #1 ++ ++pci:v00008086d00009C92* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #2 ++ ++pci:v00008086d00009C94* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #3 ++ ++pci:v00008086d00009C96* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #4 ++ ++pci:v00008086d00009C98* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #5 ++ ++pci:v00008086d00009C9A* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP PCI Express Root Port #6 ++ ++pci:v00008086d00009CA0* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP High Definition Audio Controller ++ ++pci:v00008086d00009CA2* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP SMBus Controller ++ ++pci:v00008086d00009CA4* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Thermal Management Controller ++ ++pci:v00008086d00009CA6* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP USB EHCI Controller ++ ++pci:v00008086d00009CB1* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP USB xHCI Controller ++ ++pci:v00008086d00009CB5* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Secure Digital IO Controller ++ ++pci:v00008086d00009CB6* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Smart Sound Technology Controller ++ ++pci:v00008086d00009CBA* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP MEI Controller #1 ++ ++pci:v00008086d00009CBB* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP MEI Controller #2 ++ ++pci:v00008086d00009CBC* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP IDE-r Controller ++ ++pci:v00008086d00009CBD* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP KT Controller ++ ++pci:v00008086d00009CC1* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC2* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC3* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC5* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC6* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC7* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CC9* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP LPC Controller ++ ++pci:v00008086d00009CE0* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO DMA Controller ++ ++pci:v00008086d00009CE1* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO I2C Controller #0 ++ ++pci:v00008086d00009CE2* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO I2C Controller #1 ++ ++pci:v00008086d00009CE3* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO UART Controller #0 ++ ++pci:v00008086d00009CE4* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO UART Controller #1 ++ ++pci:v00008086d00009CE5* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO GSPI Controller #0 ++ ++pci:v00008086d00009CE6* ++ ID_MODEL_FROM_DATABASE=Wildcat Point-LP Serial IO GSPI Controller #1 ++ + pci:v00008086d0000A000* + ID_MODEL_FROM_DATABASE=Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge + +@@ -70691,6 +71276,24 @@ pci:v0000BDBDd0000A11E* + pci:v0000BDBDd0000A121* + ID_MODEL_FROM_DATABASE=DeckLink HD Extreme 3D/3D+ + ++pci:v0000BDBDd0000A124* ++ ID_MODEL_FROM_DATABASE=Intensity Extreme ++ ++pci:v0000BDBDd0000A126* ++ ID_MODEL_FROM_DATABASE=Intensity Shuttle ++ ++pci:v0000BDBDd0000A127* ++ ID_MODEL_FROM_DATABASE=UltraStudio Express ++ ++pci:v0000BDBDd0000A129* ++ ID_MODEL_FROM_DATABASE=UltraStudio Mini Monitor ++ ++pci:v0000BDBDd0000A12A* ++ ID_MODEL_FROM_DATABASE=UltraStudio Mini Recorder ++ ++pci:v0000BDBDd0000A12D* ++ ID_MODEL_FROM_DATABASE=UltraStudio 4K ++ + pci:v0000BDBDd0000A12E* + ID_MODEL_FROM_DATABASE=DeckLink 4K Extreme + +@@ -70700,6 +71303,9 @@ pci:v0000BDBDd0000A12F* + pci:v0000BDBDd0000A130* + ID_MODEL_FROM_DATABASE=DeckLink Mini Recorder + ++pci:v0000BDBDd0000A132* ++ ID_MODEL_FROM_DATABASE=UltraStudio 4K ++ + pci:v0000C001* + ID_VENDOR_FROM_DATABASE=TSI Telsys + +@@ -70860,7 +71466,7 @@ pci:v0000DCBA* + ID_VENDOR_FROM_DATABASE=Dynamic Engineering + + pci:v0000DCBAd00000046* +- ID_MODEL_FROM_DATABASE=PCIeAlteraCycloneIV ++ ID_MODEL_FROM_DATABASE=PCIe Altera Cyclone IV + + pci:v0000DCBAd00000047* + ID_MODEL_FROM_DATABASE=VPX-RCB +@@ -70868,6 +71474,15 @@ pci:v0000DCBAd00000047* + pci:v0000DCBAd00000048* + ID_MODEL_FROM_DATABASE=PMC-Biserial-III-BAE9 + ++pci:v0000DCBAd0000004E* ++ ID_MODEL_FROM_DATABASE=PC104p-Biserial-III-NVY5 ++ ++pci:v0000DCBAd0000004F* ++ ID_MODEL_FROM_DATABASE=PC104p-Biserial-III-NVY6 ++ ++pci:v0000DCBAd00000052* ++ ID_MODEL_FROM_DATABASE=PCIeBiSerialDb37 BA22 LVDS IO ++ + pci:v0000DD01* + ID_VENDOR_FROM_DATABASE=Digital Devices GmbH + +diff --git a/hwdb/20-usb-vendor-model.hwdb b/hwdb/20-usb-vendor-model.hwdb +index da8385e..6663820 100644 +--- a/hwdb/20-usb-vendor-model.hwdb ++++ b/hwdb/20-usb-vendor-model.hwdb +@@ -53,6 +53,12 @@ usb:v017C* + usb:v017Cp145F* + ID_MODEL_FROM_DATABASE=Trust Deskset + ++usb:v0200* ++ ID_VENDOR_FROM_DATABASE=TP-Link ++ ++usb:v0200p0201* ++ ID_MODEL_FROM_DATABASE=MA180 UMTS Modem ++ + usb:v0204* + ID_VENDOR_FROM_DATABASE=Chipsbank Microelectronics Co., Ltd + +@@ -515,6 +521,12 @@ usb:v03F0p0417* + usb:v03F0p0423* + ID_MODEL_FROM_DATABASE=HS-COMBO Cardreader + ++usb:v03F0p042A* ++ ID_MODEL_FROM_DATABASE=LaserJet M1132 MFP ++ ++usb:v03F0p0441* ++ ID_MODEL_FROM_DATABASE=HP Prime Calculator ++ + usb:v03F0p0504* + ID_MODEL_FROM_DATABASE=DeskJet 885c + +@@ -957,7 +969,7 @@ usb:v03F0p2317* + ID_MODEL_FROM_DATABASE=LaserJet 4350 + + usb:v03F0p231D* +- ID_MODEL_FROM_DATABASE=4 GB Flash Drive ++ ID_MODEL_FROM_DATABASE=Broadcom 2070 Bluetooth Combo + + usb:v03F0p2402* + ID_MODEL_FROM_DATABASE=PhotoSmart 7700 series +@@ -1214,6 +1226,9 @@ usb:v03F0p3B17* + usb:v03F0p3C02* + ID_MODEL_FROM_DATABASE=PhotoSmart 7350 + ++usb:v03F0p3C05* ++ ID_MODEL_FROM_DATABASE=Scanjet Professional 1000 Mobile Scanner ++ + usb:v03F0p3C11* + ID_MODEL_FROM_DATABASE=PSC 1358 + +@@ -2018,6 +2033,9 @@ usb:v0403p8040* + usb:v0403p8070* + ID_MODEL_FROM_DATABASE=7 Port Hub + ++usb:v0403p8140* ++ ID_MODEL_FROM_DATABASE=Vehicle Explorer Interface ++ + usb:v0403p8210* + ID_MODEL_FROM_DATABASE=MGTimer - MGCC (Vic) Timing System + +@@ -2036,6 +2054,12 @@ usb:v0403p8A28* + usb:v0403p8A98* + ID_MODEL_FROM_DATABASE=TIAO Multi-Protocol Adapter + ++usb:v0403p9133* ++ ID_MODEL_FROM_DATABASE=CallerID ++ ++usb:v0403p9135* ++ ID_MODEL_FROM_DATABASE=Rotary Pub alarm ++ + usb:v0403p9E90* + ID_MODEL_FROM_DATABASE=Marvell OpenRD Base/Client + +@@ -2978,6 +3002,9 @@ usb:v040Ap6005* + usb:v040B* + ID_VENDOR_FROM_DATABASE=Weltrend Semiconductor + ++usb:v040Bp0A68* ++ ID_MODEL_FROM_DATABASE=Func MS-3 gaming mouse [WT6573F MCU] ++ + usb:v040Bp6510* + ID_MODEL_FROM_DATABASE=Weltrend Bar Code Reader + +@@ -3662,6 +3689,9 @@ usb:v041Ep4057* + usb:v041Ep4058* + ID_MODEL_FROM_DATABASE=Live! Cam Optia AF + ++usb:v041Ep405F* ++ ID_MODEL_FROM_DATABASE=WebCam Vista (VF0330) ++ + usb:v041Ep4061* + ID_MODEL_FROM_DATABASE=Live! Cam Notebook Pro [VF0400] + +@@ -5255,6 +5285,9 @@ usb:v0457p0162* + usb:v0457p0163* + ID_MODEL_FROM_DATABASE=802.11 Wireless LAN Adapter + ++usb:v0457p0817* ++ ID_MODEL_FROM_DATABASE=SiS-184-ASUS-4352.17 touch panel ++ + usb:v0457p5401* + ID_MODEL_FROM_DATABASE=Wireless Adapter RO80211GS-USB + +@@ -5531,6 +5564,9 @@ usb:v0458p7079* + usb:v0458p707F* + ID_MODEL_FROM_DATABASE=TVGo DVB-T03 [RTL2832] + ++usb:v0458p7088* ++ ID_MODEL_FROM_DATABASE=WideCam 1050 ++ + usb:v0459* + ID_VENDOR_FROM_DATABASE=Adobe Systems, Inc. + +@@ -6401,6 +6437,9 @@ usb:v045Ep0772* + usb:v045Ep0779* + ID_MODEL_FROM_DATABASE=LifeCam HD-3000 + ++usb:v045Ep0797* ++ ID_MODEL_FROM_DATABASE=Optical Mouse 200 ++ + usb:v045Ep930A* + ID_MODEL_FROM_DATABASE=ISOUSB.SYS Intel 82930 Isochronous IO Test Board + +@@ -6624,7 +6663,7 @@ usb:v046A* + ID_VENDOR_FROM_DATABASE=Cherry GmbH + + usb:v046Ap0001* +- ID_MODEL_FROM_DATABASE=My3000 Keyboard ++ ID_MODEL_FROM_DATABASE=Keyboard + + usb:v046Ap0003* + ID_MODEL_FROM_DATABASE=My3000 Hub +@@ -8504,6 +8543,9 @@ usb:v0480pA006* + usb:v0480pA007* + ID_MODEL_FROM_DATABASE=External Disk USB 3.0 + ++usb:v0480pD010* ++ ID_MODEL_FROM_DATABASE=External Disk 3TB ++ + usb:v0481* + ID_VENDOR_FROM_DATABASE=Zenith Data Systems + +@@ -8597,6 +8639,9 @@ usb:v0483p5001* + usb:v0483p5710* + ID_MODEL_FROM_DATABASE=Joystick in FS Mode + ++usb:v0483p5720* ++ ID_MODEL_FROM_DATABASE=STM microSD Flash Device ++ + usb:v0483p5721* + ID_MODEL_FROM_DATABASE=Hantek DDS-3X25 Arbitrary Waveform Generator + +@@ -8693,6 +8738,12 @@ usb:v048Dp9009* + usb:v048Dp9135* + ID_MODEL_FROM_DATABASE=Zolid Mini DVB-T Stick + ++usb:v048Dp9503* ++ ID_MODEL_FROM_DATABASE=ITE it9503 feature-limited DVB-T transmission chip [ccHDtv] ++ ++usb:v048Dp9507* ++ ID_MODEL_FROM_DATABASE=ITE it9507 full featured DVB-T transmission chip [ccHDtv] ++ + usb:v048F* + ID_VENDOR_FROM_DATABASE=Eicon Tech. + +@@ -10937,9 +10988,21 @@ usb:v04A9p3260* + usb:v04A9p3264* + ID_MODEL_FROM_DATABASE=PowerShot A1400 + ++usb:v04A9p3265* ++ ID_MODEL_FROM_DATABASE=Powershot ELPH 130 IS / IXUS 140 ++ + usb:v04A9p3268* + ID_MODEL_FROM_DATABASE=PowerShot ELPH 330 HS / IXUS 255 HS + ++usb:v04A9p3271* ++ ID_MODEL_FROM_DATABASE=PowerShot A2500 ++ ++usb:v04A9p3276* ++ ID_MODEL_FROM_DATABASE=PowerShot SX170 IS ++ ++usb:v04A9p327D* ++ ID_MODEL_FROM_DATABASE=Powershot ELPH 115 IS / IXUS 132 ++ + usb:v04AA* + ID_VENDOR_FROM_DATABASE=DaeWoo Telecom, Ltd + +@@ -11162,6 +11225,9 @@ usb:v04B0p0425* + usb:v04B0p0428* + ID_MODEL_FROM_DATABASE=D7000 + ++usb:v04B0p0429* ++ ID_MODEL_FROM_DATABASE=D5100 ++ + usb:v04B0p042A* + ID_MODEL_FROM_DATABASE=D800 (ptp) + +@@ -12806,6 +12872,9 @@ usb:v04D9p1503* + usb:v04D9p1603* + ID_MODEL_FROM_DATABASE=Keyboard + ++usb:v04D9p1702* ++ ID_MODEL_FROM_DATABASE=Keyboard LKS02 ++ + usb:v04D9p2013* + ID_MODEL_FROM_DATABASE=Keyboard [Das Keyboard] + +@@ -12821,6 +12890,9 @@ usb:v04D9p2519* + usb:v04D9p2832* + ID_MODEL_FROM_DATABASE=1channel Telephone line recorder + ++usb:v04D9p2834* ++ ID_MODEL_FROM_DATABASE=HT82A834R Audio MCU ++ + usb:v04D9pA055* + ID_MODEL_FROM_DATABASE=Keyboard + +@@ -14252,6 +14324,9 @@ usb:v04F2pB354* + usb:v04F3* + ID_VENDOR_FROM_DATABASE=Elan Microelectronics Corp. + ++usb:v04F3p000A* ++ ID_MODEL_FROM_DATABASE=Touchscreen ++ + usb:v04F3p0103* + ID_MODEL_FROM_DATABASE=ActiveJet K-2024 Multimedia Keyboard + +@@ -15302,6 +15377,12 @@ usb:v050Dp1102* + usb:v050Dp1103* + ID_MODEL_FROM_DATABASE=F9L1103 N750 DB 802.11abgn 2x3:3 [Ralink RT3573] + ++usb:v050Dp1106* ++ ID_MODEL_FROM_DATABASE=F9L1106v1 802.11a/b/g/n/ac Wireless Adapter [Broadcom BCM43526] ++ ++usb:v050Dp1109* ++ ID_MODEL_FROM_DATABASE=F9L1109v1 802.11a/b/g/n/ac Wireless Adapter [Realtek RTL8812AU] ++ + usb:v050Dp11F2* + ID_MODEL_FROM_DATABASE=ISY Wireless Micro Adapter IWL 2000 [RTL8188CUS] + +@@ -16514,6 +16595,9 @@ usb:v054Cp0485* + usb:v054Cp04CB* + ID_MODEL_FROM_DATABASE=WALKMAN NWZ-E354 + ++usb:v054Cp06BB* ++ ID_MODEL_FROM_DATABASE=WALKMAN NWZ-F805 ++ + usb:v054Cp1000* + ID_MODEL_FROM_DATABASE=Wireless Buzz! Receiver + +@@ -47582,6 +47666,15 @@ usb:v2101* + usb:v2101p0201* + ID_MODEL_FROM_DATABASE=SIIG 4-to-2 Printer Switch + ++usb:v2149* ++ ID_VENDOR_FROM_DATABASE=Advanced Silicon S.A. ++ ++usb:v2149p211B* ++ ID_MODEL_FROM_DATABASE=Touchscreen Controller ++ ++usb:v2149p2703* ++ ID_MODEL_FROM_DATABASE=TS58xxA/TC56xxA [CoolTouch] ++ + usb:v2162* + ID_VENDOR_FROM_DATABASE=Creative (?) + +@@ -47636,6 +47729,21 @@ usb:v2227* + usb:v2227p3105* + ID_MODEL_FROM_DATABASE=SKYDATA SKD-U100 + ++usb:v2232* ++ ID_VENDOR_FROM_DATABASE=Silicon Motion ++ ++usb:v2232p1005* ++ ID_MODEL_FROM_DATABASE=WebCam SCB-0385N ++ ++usb:v2232p1028* ++ ID_MODEL_FROM_DATABASE=WebCam SC-03FFL11939N ++ ++usb:v2232p1029* ++ ID_MODEL_FROM_DATABASE=WebCam SC-13HDL11939N ++ ++usb:v2232p1037* ++ ID_MODEL_FROM_DATABASE=WebCam SC-03FFM12339N ++ + usb:v2233* + ID_VENDOR_FROM_DATABASE=RadioShack Corporation + diff --git a/SOURCES/0151-delta-replace-readdir_r-with-readdir.patch b/SOURCES/0151-delta-replace-readdir_r-with-readdir.patch new file mode 100644 index 0000000..ca8ebba --- /dev/null +++ b/SOURCES/0151-delta-replace-readdir_r-with-readdir.patch @@ -0,0 +1,31 @@ +From 095e14ab14e22d4fa605411bb0f47a856c90df8b Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 19 Dec 2013 11:16:12 +0100 +Subject: [PATCH] delta: replace readdir_r with readdir + +--- + src/delta/delta.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/delta/delta.c b/src/delta/delta.c +index 193642d..c2550d6 100644 +--- a/src/delta/delta.c ++++ b/src/delta/delta.c +@@ -280,13 +280,13 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + + for (;;) { + struct dirent *de; +- union dirent_storage buf; + int k; + char *p; + +- k = readdir_r(d, &buf.de, &de); +- if (k != 0) +- return -k; ++ errno = 0; ++ de = readdir(d); ++ if (!de && errno != 0) ++ return -errno; + + if (!de) + break; diff --git a/SOURCES/0152-delta-fix-delta-for-drop-ins.patch b/SOURCES/0152-delta-fix-delta-for-drop-ins.patch new file mode 100644 index 0000000..7a257aa --- /dev/null +++ b/SOURCES/0152-delta-fix-delta-for-drop-ins.patch @@ -0,0 +1,375 @@ +From 5bb09b7611b2bb5df0df432df20c84ca741cad24 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 22 Dec 2013 19:45:02 -0500 +Subject: [PATCH] delta: fix delta for drop-ins + +Also, fix highlighting, add more debug statements, make const tables +static and global, run path_kill_slashes only at entry. + +Conflicts: + src/delta/delta.c +--- + src/delta/delta.c | 174 +++++++++++++++++++++++++----------------------------- + 1 file changed, 79 insertions(+), 95 deletions(-) + +diff --git a/src/delta/delta.c b/src/delta/delta.c +index c2550d6..06c7431 100644 +--- a/src/delta/delta.c ++++ b/src/delta/delta.c +@@ -33,6 +33,34 @@ + #include "build.h" + #include "strv.h" + ++static const char prefixes[] = ++ "/etc\0" ++ "/run\0" ++ "/usr/local/lib\0" ++ "/usr/local/share\0" ++ "/usr/lib\0" ++ "/usr/share\0" ++#ifdef HAVE_SPLIT_USR ++ "/lib\0" ++#endif ++ ; ++ ++static const char suffixes[] = ++ "sysctl.d\0" ++ "tmpfiles.d\0" ++ "modules-load.d\0" ++ "binfmt.d\0" ++ "systemd/system\0" ++ "systemd/user\0" ++ "systemd/system-preset\0" ++ "systemd/user-preset\0" ++ "udev/rules.d\0" ++ "modprobe.d\0"; ++ ++static const char have_dropins[] = ++ "systemd/system\0" ++ "systemd/user\0"; ++ + static bool arg_no_pager = false; + static int arg_diff = -1; + +@@ -48,6 +76,14 @@ static enum { + (SHOW_MASKED | SHOW_EQUIVALENT | SHOW_REDIRECTED | SHOW_OVERRIDDEN | SHOW_EXTENDED) + } arg_flags = 0; + ++static void pager_open_if_enabled(void) { ++ ++ if (arg_no_pager) ++ return; ++ ++ pager_open(false); ++} ++ + static int equivalent(const char *a, const char *b) { + _cleanup_free_ char *x = NULL, *y = NULL; + +@@ -76,7 +112,7 @@ static int notify_override_equivalent(const char *top, const char *bottom) { + return 0; + + printf("%s%s%s %s → %s\n", +- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight(), top, bottom); ++ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom); + return 1; + } + +@@ -160,24 +196,26 @@ static int found_override(const char *top, const char *bottom) { + } + + static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const char *toppath, const char *drop) { +- _cleanup_free_ char *conf = NULL; ++ _cleanup_free_ char *unit = NULL; + _cleanup_free_ char *path = NULL; + _cleanup_strv_free_ char **list = NULL; + char **file; + char *c; + int r; + ++ assert(!endswith(drop, "/")); ++ + path = strjoin(toppath, "/", drop, NULL); + if (!path) + return -ENOMEM; + +- path_kill_slashes(path); ++ log_debug("Looking at %s", path); + +- conf = strdup(drop); +- if (!conf) ++ unit = strdup(drop); ++ if (!unit) + return -ENOMEM; + +- c = strrchr(conf, '.'); ++ c = strrchr(unit, '.'); + if (!c) + return -EINVAL; + *c = 0; +@@ -200,35 +238,21 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + p = strjoin(path, "/", *file, NULL); + if (!p) + return -ENOMEM; ++ d = p + strlen(toppath) + 1; + +- path_kill_slashes(p); +- +- d = strrchr(p, '/'); +- if (!d || d == p) { +- free(p); +- return -EINVAL; +- } +- d--; +- d = strrchr(p, '/'); +- +- if (!d || d == p) { +- free(p); +- return -EINVAL; +- } +- ++ log_debug("Adding at top: %s → %s", d, p); + k = hashmap_put(top, d, p); + if (k >= 0) { + p = strdup(p); + if (!p) + return -ENOMEM; +- d = strrchr(p, '/'); +- d--; +- d = strrchr(p, '/'); ++ d = p + strlen(toppath) + 1; + } else if (k != -EEXIST) { + free(p); + return k; + } + ++ log_debug("Adding at bottom: %s → %s", d, p); + free(hashmap_remove(bottom, d)); + k = hashmap_put(bottom, d, p); + if (k < 0) { +@@ -236,14 +260,14 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + return k; + } + +- h = hashmap_get(drops, conf); ++ h = hashmap_get(drops, unit); + if (!h) { + h = hashmap_new(string_hash_func, string_compare_func); + if (!h) + return -ENOMEM; +- hashmap_put(drops, conf, h); +- conf = strdup(conf); +- if (!conf) ++ hashmap_put(drops, unit, h); ++ unit = strdup(unit); ++ if (!unit) + return -ENOMEM; + } + +@@ -251,7 +275,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + if (!p) + return -ENOMEM; + +- k = hashmap_put(h, path_get_file_name(p), p); ++ log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p); ++ k = hashmap_put(h, basename(p), p); + if (k < 0) { + free(p); + if (k != -EEXIST) +@@ -269,12 +294,14 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + assert(drops); + assert(path); + ++ log_debug("Looking at %s", path); ++ + d = opendir(path); + if (!d) { + if (errno == ENOENT) + return 0; + +- log_error("Failed to enumerate %s: %m", path); ++ log_error("Failed to open %s: %m", path); + return -errno; + } + +@@ -285,11 +312,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + + errno = 0; + de = readdir(d); +- if (!de && errno != 0) +- return -errno; +- + if (!de) +- break; ++ return -errno; + + dirent_ensure_type(d, de); + +@@ -303,9 +327,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + if (!p) + return -ENOMEM; + +- path_kill_slashes(p); +- +- k = hashmap_put(top, path_get_file_name(p), p); ++ log_debug("Adding at top: %s → %s", basename(p), p); ++ k = hashmap_put(top, basename(p), p); + if (k >= 0) { + p = strdup(p); + if (!p) +@@ -315,44 +338,37 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + return k; + } + +- free(hashmap_remove(bottom, path_get_file_name(p))); +- k = hashmap_put(bottom, path_get_file_name(p), p); ++ log_debug("Adding at bottom: %s → %s", basename(p), p); ++ free(hashmap_remove(bottom, basename(p))); ++ k = hashmap_put(bottom, basename(p), p); + if (k < 0) { + free(p); + return k; + } + } +- +- return 0; + } + +-static int process_suffix(const char *prefixes, const char *suffix, bool dropins) { ++static int process_suffix(const char *suffix) { + const char *p; + char *f; +- Hashmap *top, *bottom=NULL, *drops=NULL; ++ Hashmap *top, *bottom, *drops; + Hashmap *h; + char *key; + int r = 0, k; + Iterator i, j; + int n_found = 0; ++ bool dropins; + +- assert(prefixes); + assert(suffix); ++ assert(!startswith(suffix, "/")); ++ assert(!strstr(suffix, "//")); + +- top = hashmap_new(string_hash_func, string_compare_func); +- if (!top) { +- r = -ENOMEM; +- goto finish; +- } ++ dropins = nulstr_contains(have_dropins, suffix); + ++ top = hashmap_new(string_hash_func, string_compare_func); + bottom = hashmap_new(string_hash_func, string_compare_func); +- if (!bottom) { +- r = -ENOMEM; +- goto finish; +- } +- + drops = hashmap_new(string_hash_func, string_compare_func); +- if (!drops) { ++ if (!top || !bottom || !drops) { + r = -ENOMEM; + goto finish; + } +@@ -367,10 +383,8 @@ static int process_suffix(const char *prefixes, const char *suffix, bool dropins + } + + k = enumerate_dir(top, bottom, drops, t, dropins); +- if (k < 0) ++ if (r == 0) + r = k; +- +- log_debug("Looking at %s", t); + } + + HASHMAP_FOREACH_KEY(f, key, top, i) { +@@ -411,21 +425,20 @@ finish: + return r < 0 ? r : n_found; + } + +-static int process_suffix_chop(const char *prefixes, const char *suffix, const char *have_dropins) { ++static int process_suffix_chop(const char *suffix) { + const char *p; + +- assert(prefixes); + assert(suffix); + + if (!path_is_absolute(suffix)) +- return process_suffix(prefixes, suffix, nulstr_contains(have_dropins, suffix)); ++ return process_suffix(suffix); + + /* Strip prefix from the suffix */ + NULSTR_FOREACH(p, prefixes) { + if (startswith(suffix, p)) { + suffix += strlen(p); + suffix += strspn(suffix, "/"); +- return process_suffix(prefixes, suffix, nulstr_contains(have_dropins, suffix)); ++ return process_suffix(suffix); + } + } + +@@ -550,35 +563,6 @@ static int parse_argv(int argc, char *argv[]) { + } + + int main(int argc, char *argv[]) { +- +- const char prefixes[] = +- "/etc\0" +- "/run\0" +- "/usr/local/lib\0" +- "/usr/local/share\0" +- "/usr/lib\0" +- "/usr/share\0" +-#ifdef HAVE_SPLIT_USR +- "/lib\0" +-#endif +- ; +- +- const char suffixes[] = +- "sysctl.d\0" +- "tmpfiles.d\0" +- "modules-load.d\0" +- "binfmt.d\0" +- "systemd/system\0" +- "systemd/user\0" +- "systemd/system-preset\0" +- "systemd/user-preset\0" +- "udev/rules.d\0" +- "modprobe.d\0"; +- +- const char have_dropins[] = +- "systemd/system\0" +- "systemd/user\0"; +- + int r = 0, k; + int n_found = 0; + +@@ -597,14 +581,14 @@ int main(int argc, char *argv[]) { + else if (arg_diff) + arg_flags |= SHOW_OVERRIDDEN; + +- if (!arg_no_pager) +- pager_open(false); ++ pager_open_if_enabled(); + + if (optind < argc) { + int i; + + for (i = optind; i < argc; i++) { +- k = process_suffix_chop(prefixes, argv[i], have_dropins); ++ path_kill_slashes(argv[i]); ++ k = process_suffix_chop(argv[i]); + if (k < 0) + r = k; + else +@@ -615,7 +599,7 @@ int main(int argc, char *argv[]) { + const char *n; + + NULSTR_FOREACH(n, suffixes) { +- k = process_suffix(prefixes, n, nulstr_contains(have_dropins, n)); ++ k = process_suffix(n); + if (k < 0) + r = k; + else diff --git a/SOURCES/0153-delta-if-prefix-is-specified-only-show-overrides-the.patch b/SOURCES/0153-delta-if-prefix-is-specified-only-show-overrides-the.patch new file mode 100644 index 0000000..efb109c --- /dev/null +++ b/SOURCES/0153-delta-if-prefix-is-specified-only-show-overrides-the.patch @@ -0,0 +1,251 @@ +From 13fb7479365d958e76b149fe5615be74f519f03a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 22 Dec 2013 22:53:23 -0500 +Subject: [PATCH] delta: if prefix is specified, only show overrides there + +systemd-delta /run/systemd/system will show all unit overrides +in /run, etc. +--- + man/systemd-delta.xml | 80 +++++++++++++++++++++++++++++++++++++++++---------- + src/delta/delta.c | 71 ++++++++++++++++++++++++++++----------------- + 2 files changed, 109 insertions(+), 42 deletions(-) + +diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml +index 413ebd8..4d3ab78 100644 +--- a/man/systemd-delta.xml ++++ b/man/systemd-delta.xml +@@ -49,7 +49,9 @@ + + + +- systemd-delta OPTIONS SUFFIX ++ systemd-delta ++ OPTIONS ++ PREFIX/SUFFIX|SUFFIX + + + +@@ -57,18 +59,46 @@ + Description + + systemd-delta may be used to +- identify and compare configuration files in +- /etc that override default +- counterparts in /usr. The command +- line argument can be one or more name of a subdirectories of +- /etc or +- /usr/lib to compare, such as +- tmpfiles.d, sysctl.d or +- systemd/system. +- +- When no argument is specified a number of +- well-known subdirectories are searched for overridden +- files. ++ identify and compare configuration files that override ++ other configuration files. Files in ++ /etc have highest priority, files ++ in /run have the second highest ++ priority, ..., files in /lib have ++ lowest priority. Files in a directory with higher ++ priority override files with the same name in ++ directories of lower priority. In addition, certain ++ configuration files can have .d ++ directories which contain "drop-in" files with ++ configuration snippets which augment the main ++ configuration file. "Drop-in" files can be overriden ++ in the same way by placing files with the same name in ++ a directory of higher priority (except that in case of ++ "drop-in" files, both the "drop-in" file name and the ++ name of the containing directory, which corresponds to ++ the name of the main configuration file, must match). ++ For a fuller explanation, see ++ systemd.unit5. ++ ++ ++ The command line argument will be split into a ++ prefix and a suffix. Either is optional. The prefix ++ must be one of the directories containing ++ configuration files (/etc, ++ /run, ++ /usr/lib, ...). If it is given, ++ only overriding files contained in this directory will ++ be shown. Otherwise, all overriding files will be ++ shown. The suffix must be a name of a subdirectory ++ containing configuration files like ++ tmpfiles.d, ++ sysctl.d or ++ systemd/system. If it is given, ++ only configuration files in this subdirectory (across ++ all configuration paths) will be analyzed. Otherwise, ++ all configuration files will be analyzed. If the ++ commandline argument is not given at all, all ++ configuration files will be analyzed. See below for ++ some examples. + + + +@@ -168,9 +198,28 @@ + + + +- + + ++ ++ Examples ++ ++ To see all local configuration: ++ systemd-delta ++ ++ ++ To see all runtime configuration: ++ systemd-delta /run ++ ++ ++ To see all system unit configuration changes: ++ systemd-delta systemd/system ++ ++ ++ To see all runtime "drop-in" changes for system units: ++ systemd-delta --type=extended /run/systemd/system ++ ++ ++ + + Exit status + +@@ -181,7 +230,8 @@ + + See Also + +- systemd1 ++ systemd1, ++ systemd.unit5 + + + +diff --git a/src/delta/delta.c b/src/delta/delta.c +index 06c7431..a8dd57e 100644 +--- a/src/delta/delta.c ++++ b/src/delta/delta.c +@@ -4,6 +4,7 @@ + This file is part of systemd. + + Copyright 2012 Lennart Poettering ++ Copyright 2013 Zbigniew Jędrzejewski-Szmek + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by +@@ -348,7 +349,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + } + } + +-static int process_suffix(const char *suffix) { ++static int process_suffix(const char *suffix, const char *onlyprefix) { + const char *p; + char *f; + Hashmap *top, *bottom, *drops; +@@ -393,20 +394,23 @@ static int process_suffix(const char *suffix) { + o = hashmap_get(bottom, key); + assert(o); + +- if (path_equal(o, f)) +- notify_override_unchanged(f); +- else { +- k = found_override(f, o); +- if (k < 0) +- r = k; +- else +- n_found += k; ++ if (!onlyprefix || startswith(o, onlyprefix)) { ++ if (path_equal(o, f)) { ++ notify_override_unchanged(f); ++ } else { ++ k = found_override(f, o); ++ if (k < 0) ++ r = k; ++ else ++ n_found += k; ++ } + } + + h = hashmap_get(drops, key); + if (h) + HASHMAP_FOREACH(o, h, j) +- n_found += notify_override_extended(f, o); ++ if (!onlyprefix || startswith(o, onlyprefix)) ++ n_found += notify_override_extended(f, o); + } + + finish: +@@ -425,24 +429,41 @@ finish: + return r < 0 ? r : n_found; + } + +-static int process_suffix_chop(const char *suffix) { ++static int process_suffixes(const char *onlyprefix) { ++ const char *n; ++ int n_found = 0, r; ++ ++ NULSTR_FOREACH(n, suffixes) { ++ r = process_suffix(n, onlyprefix); ++ if (r < 0) ++ return r; ++ else ++ n_found += r; ++ } ++ return n_found; ++} ++ ++static int process_suffix_chop(const char *arg) { + const char *p; + +- assert(suffix); ++ assert(arg); + +- if (!path_is_absolute(suffix)) +- return process_suffix(suffix); ++ if (!path_is_absolute(arg)) ++ return process_suffix(arg, NULL); + + /* Strip prefix from the suffix */ + NULSTR_FOREACH(p, prefixes) { +- if (startswith(suffix, p)) { +- suffix += strlen(p); ++ const char *suffix = startswith(arg, p); ++ if (suffix) { + suffix += strspn(suffix, "/"); +- return process_suffix(suffix); ++ if (*suffix) ++ return process_suffix(suffix, NULL); ++ else ++ return process_suffixes(arg); + } + } + +- log_error("Invalid suffix specification %s.", suffix); ++ log_error("Invalid suffix specification %s.", arg); + return -EINVAL; + } + +@@ -596,15 +617,11 @@ int main(int argc, char *argv[]) { + } + + } else { +- const char *n; +- +- NULSTR_FOREACH(n, suffixes) { +- k = process_suffix(n); +- if (k < 0) +- r = k; +- else +- n_found += k; +- } ++ k = process_suffixes(NULL); ++ if (k < 0) ++ r = k; ++ else ++ n_found += k; + } + + if (r >= 0) diff --git a/SOURCES/0154-man-units-tmpfiles.d-5-cleanup.patch b/SOURCES/0154-man-units-tmpfiles.d-5-cleanup.patch new file mode 100644 index 0000000..6d8b332 --- /dev/null +++ b/SOURCES/0154-man-units-tmpfiles.d-5-cleanup.patch @@ -0,0 +1,401 @@ +From b2d9ad357e136b289238eb05648c504d0c0bc06b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 24 Dec 2013 10:21:45 -0500 +Subject: [PATCH] man,units: tmpfiles.d(5) cleanup + +Condition for /lib (necessary for split /usr) was missing from the unit. + +Some changes which were done in tmpfiles.d(5) were not carried over to +systemd-tmpfiles(1). + +Also use markup where possible. + +Conflicts: + man/tmpfiles.d.xml +--- + man/systemd-tmpfiles.xml | 53 ++++++---- + man/tmpfiles.d.xml | 168 +++++++++++++++++++------------- + units/systemd-tmpfiles-setup.service.in | 1 + + 3 files changed, 134 insertions(+), 88 deletions(-) + +diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml +index ba727e1..91c0372 100644 +--- a/man/systemd-tmpfiles.xml ++++ b/man/systemd-tmpfiles.xml +@@ -54,7 +54,9 @@ + + + +- systemd-tmpfiles OPTIONS CONFIGURATION FILE ++ systemd-tmpfiles ++ OPTIONS ++ CONFIGFILE + + + systemd-tmpfiles-setup.service +@@ -67,22 +69,20 @@ + Description + + systemd-tmpfiles creates, +- deletes and cleans up volatile and temporary files and ++ deletes, and cleans up volatile and temporary files and + directories, based on the configuration file format and +- location specified in +- tmpfiles.d +- 5 +- . ++ location specified in ++ tmpfiles.d5. ++ + + If invoked with no arguments, it applies all + directives from all configuration files. If one or + more filenames are passed on the command line, only + the directives in these files are applied. If only + the basename of a configuration file is specified, +- all configuration directories as specified in +- tmpfiles.d +- 5 +- are searched for a matching file. ++ all configuration directories as specified in ++ tmpfiles.d5 ++ are searched for a matching file. + + + +@@ -94,12 +94,25 @@ + + + +- If this option is passed, all +- files and directories marked with f, +- F, d, D in the configuration files are +- created. Files and directories marked with z, +- Z have their ownership, access mode and security +- labels set. ++ If this option is ++ passed, all files and directories ++ marked with f, ++ F, ++ w, ++ d, ++ D, ++ p, ++ L, ++ c, ++ b, ++ m in the ++ configuration files are created or ++ written to. Files and directories ++ marked with z, ++ Z, ++ m have their ++ ownership, access mode and security ++ labels set. + + + +@@ -113,9 +126,11 @@ + + + If this option is +- passed, all files and directories marked +- with r, R in the configuration files +- are removed. ++ passed, all files and directories ++ marked with r, ++ R in the ++ configuration files are ++ removed. + + + +diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml +index e8b630d..a00637b 100644 +--- a/man/tmpfiles.d.xml ++++ b/man/tmpfiles.d.xml +@@ -67,23 +67,32 @@ + Configuration Format + + Each configuration file shall be named in the +- style of <package>.conf. +- Files in /etc/ override files +- with the same name in /usr/lib/ +- and /run/. Files in +- /run/ override files with the same +- name in /usr/lib/. Packages ++ style of ++ package.conf ++ or ++ package-part.conf. ++ The second variant should be used when it is desirable ++ to make it easy to override just this part of ++ configuration. ++ ++ Files in /etc/tmpfiles.d ++ override files with the same name in ++ /usr/lib/tmpfiles.d and ++ /run/tmpfiles.d. Files in ++ /run/tmpfiles.d override files ++ with the same name in ++ /usr/lib/tmpfiles.d. Packages + should install their configuration files in +- /usr/lib/. Files in +- /etc/ are reserved for the local +- administrator, who may use this logic to override the +- configuration files installed by vendor packages. All +- configuration files are sorted by their filename in +- lexicographic order, regardless in which of the +- directories they reside. If multiple files specify the +- same path, the entry in the file with the lexicographically +- earliest name will be applied, all all other conflicting +- entries logged as errors. ++ /usr/lib/tmpfiles.d. Files in ++ /etc/tmpfiles.d are reserved for ++ the local administrator, who may use this logic to ++ override the configuration files installed by vendor ++ packages. All configuration files are sorted by their ++ filename in lexicographic order, regardless in which ++ of the directories they reside. If multiple files ++ specify the same path, the entry in the file with the ++ lexicographically earliest name will be applied, all ++ all other conflicting entries logged as errors. + + If the administrator wants to disable a + configuration file supplied by the vendor, the +@@ -93,10 +102,10 @@ + same filename. + + The configuration format is one line per path +- containing action, path, mode, ownership, age and argument ++ containing type, path, mode, ownership, age, and argument + fields: + +- Type Path Mode UID GID Age Argument ++ #Type Path Mode UID GID Age Argument + d /run/user 0755 root root 10d - + L /tmp/foobar - - - - /dev/null + +@@ -109,12 +118,12 @@ L /tmp/foobar - - - - /dev/null + + + f +- Create a file if it does not exist yet (optionally writing a short string into it, if the argument parameter is passed) ++ Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file. + + + + F +- Create or truncate a file (optionally writing a short string into it, if the argument parameter is passed) ++ Create or truncate a file. If the argument parameter is given, it will be written to the file. + + + +@@ -127,32 +136,32 @@ L /tmp/foobar - - - - /dev/null + + + d +- Create a directory if it does not exist yet ++ Create a directory if it does not exist yet. + + + + D +- Create or empty a directory ++ Create or empty a directory. + + + + p +- Create a named pipe (FIFO) if it does not exist yet ++ Create a named pipe (FIFO) if it does not exist yet. + + + + L +- Create a symlink if it does not exist yet ++ Create a symlink if it does not exist yet. + + + + c +- Create a character device node if it does not exist yet ++ Create a character device node if it does not exist yet. + + + + b +- Create a block device node if it does not exist yet ++ Create a block device node if it does not exist yet. + + + +@@ -174,11 +183,12 @@ L /tmp/foobar - - - - /dev/null + as controlled with the Age + parameter. Note that lines of + this type do not influence the +- effect of r or R lines. Lines +- of this type accept ++ effect of r ++ or R lines. ++ Lines of this type accept + shell-style globs in place of +- normal path +- names. ++ normal path names. ++ + + + +@@ -187,28 +197,31 @@ L /tmp/foobar - - - - /dev/null + during cleaning. Use this type + to exclude paths from clean-up + as controlled with the Age +- parameter. Unlike x this ++ parameter. Unlike ++ x, this + parameter will not exclude the +- content if path is a directory, +- but only directory itself. +- Note that lines of this type do +- not influence the effect of r +- or R lines. Lines of this type +- accept shell-style globs in +- place of normal path +- names. ++ content if path is a ++ directory, but only directory ++ itself. Note that lines of ++ this type do not influence the ++ effect of r ++ or R lines. ++ Lines of this type accept ++ shell-style globs in place of ++ normal path names. ++ + + + + r + Remove a file +- or directory if it +- exists. This may not be used +- to remove non-empty +- directories, use R for +- that. Lines of this type +- accept shell-style globs in +- place of normal path ++ or directory if it exists. ++ This may not be used to remove ++ non-empty directories, use ++ R for that. ++ Lines of this type accept ++ shell-style globs in place of ++ normal path + names. + + +@@ -308,11 +321,14 @@ L /tmp/foobar - - - - /dev/null + The file access mode to use when + creating this file or directory. If omitted or + when set to -, the default is used: 0755 for +- directories, 0644 for all other file +- objects. For z, Z lines, if omitted or when set +- to -, the file access mode will not be +- modified. This parameter is ignored for x, r, +- R, L lines. ++ directories, 0644 for all other file objects. ++ For z, Z ++ lines, if omitted or when set to ++ -, the file access mode ++ will not be modified. This parameter is ++ ignored for x, ++ r, R, ++ L lines. + + + +@@ -321,10 +337,15 @@ L /tmp/foobar - - - - /dev/null + The user and group to use for this file + or directory. This may either be a numeric + user/group ID or a user or group name. If +- omitted or when set to -, the default 0 (root) +- is used. For z, Z lines, when omitted or when set to -, +- the file ownership will not be modified. +- These parameters are ignored for x, r, R, L lines. ++ omitted or when set to -, ++ the default 0 (root) is used. For ++ z, Z ++ lines, when omitted or when set to -, the file ++ ownership will not be modified. These ++ parameters are ignored for ++ x, r, ++ R, L ++ lines. + + + +@@ -357,28 +378,37 @@ L /tmp/foobar - - - - /dev/null + When the age is set to zero, the files are cleaned + unconditionally. + +- The age field only applies to lines starting with +- d, D and x. If omitted or set to -, no automatic clean-up +- is done. ++ The age field only applies to lines ++ starting with d, ++ D, and ++ x. If omitted or set to ++ -, no automatic clean-up is ++ done. + + If the age field starts with a tilde +- character (~), the clean-up is only applied to +- files and directories one level inside the +- directory specified, but not the files and +- directories immediately inside it. ++ character ~, the clean-up ++ is only applied to files and directories one ++ level inside the directory specified, but not ++ the files and directories immediately inside ++ it. + + + + Argument + +- For L lines determines the destination +- path of the symlink. For c, b determines the ++ For L lines ++ determines the destination path of the ++ symlink. For c, ++ b determines the + major/minor of the device node, with major and +- minor formatted as integers, separated by :, +- e.g. "1:3". For f, F, w may be used to specify +- a short string that is written to the file, +- suffixed by a newline. Ignored for all other +- lines. ++ minor formatted as integers, separated by ++ :, e.g. ++ 1:3. For ++ f, F, ++ and w may be used to ++ specify a short string that is written to the ++ file, suffixed by a newline. Ignored for all ++ other lines. + + + +diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in +index 6f98063..3405e28 100644 +--- a/units/systemd-tmpfiles-setup.service.in ++++ b/units/systemd-tmpfiles-setup.service.in +@@ -14,6 +14,7 @@ Conflicts=shutdown.target + After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target + Before=sysinit.target shutdown.target + ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d ++ConditionDirectoryNotEmpty=|/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/etc/tmpfiles.d + ConditionDirectoryNotEmpty=|/run/tmpfiles.d diff --git a/SOURCES/0155-tmpfiles-introduce-the-concept-of-unsafe-operations.patch b/SOURCES/0155-tmpfiles-introduce-the-concept-of-unsafe-operations.patch new file mode 100644 index 0000000..60be1d3 --- /dev/null +++ b/SOURCES/0155-tmpfiles-introduce-the-concept-of-unsafe-operations.patch @@ -0,0 +1,281 @@ +From 97784aaf5e005bf57c572a6f8ccae5baee59bd0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 20 Dec 2013 20:25:39 -0500 +Subject: [PATCH] tmpfiles: introduce the concept of unsafe operations + +Various operations done by systemd-tmpfiles may only be safely done at +boot (e.g. removal of X lockfiles in /tmp, creation of /run/nologin). +Other operations may be done at any point in time (e.g. setting the +ownership on /{run,var}/log/journal). This distinction is largely +orthogonal to the type of operation. + +A new switch --unsafe is added, and operations which should only be +executed during bootup are marked with an exclamation mark in the +configuration files. systemd-tmpfiles.service is modified to use this +switch, and guards are added so it is hard to re-start it by mistake. + +If we install a new version of systemd, we actually want to enforce +some changes to tmpfiles configuration immediately. This should now be +possible to do safely, so distribution packages can be modified to +execute the "safe" subset at package installation time. + +/run/nologin creation is split out into a separate service, to make it +easy to override. + +https://bugzilla.redhat.com/show_bug.cgi?id=1043212 +https://bugzilla.redhat.com/show_bug.cgi?id=1045849 +--- + Makefile.am | 1 + + man/systemd-tmpfiles.xml | 6 ++++++ + man/tmpfiles.d.xml | 25 +++++++++++++++++++++++++ + src/tmpfiles/tmpfiles.c | 22 +++++++++++++++++++--- + tmpfiles.d/legacy.conf | 6 +++--- + tmpfiles.d/systemd-nologin.conf | 11 +++++++++++ + tmpfiles.d/systemd.conf | 4 +--- + tmpfiles.d/x11.conf | 2 +- + units/systemd-tmpfiles-setup.service.in | 6 ++++-- + 9 files changed, 71 insertions(+), 12 deletions(-) + create mode 100644 tmpfiles.d/systemd-nologin.conf + +diff --git a/Makefile.am b/Makefile.am +index 3103bac..f4867d9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1589,6 +1589,7 @@ nodist_systemunit_DATA += \ + + dist_tmpfiles_DATA = \ + tmpfiles.d/systemd.conf \ ++ tmpfiles.d/systemd-nologin.conf \ + tmpfiles.d/tmp.conf \ + tmpfiles.d/x11.conf + +diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml +index 91c0372..495247e 100644 +--- a/man/systemd-tmpfiles.xml ++++ b/man/systemd-tmpfiles.xml +@@ -133,6 +133,12 @@ + removed. + + ++ ++ Also execute lines ++ with an exclamation mark. ++ ++ ++ + + Only apply rules that + apply to paths with the specified +diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml +index a00637b..39aa68d 100644 +--- a/man/tmpfiles.d.xml ++++ b/man/tmpfiles.d.xml +@@ -113,6 +113,9 @@ L /tmp/foobar - - - - /dev/null + + Type + ++ The type consists of a single letter and ++ optionally an exclamation mark. ++ + The following line types are understood: + + +@@ -262,6 +265,28 @@ L /tmp/foobar - - - - /dev/null + names. + + ++ ++ If the exclamation mark is used, this ++ line is only safe of execute during boot, and ++ can break a running system. Lines without the ++ exclamation mark are presumed to be safe to ++ execute at any time, e.g. on package upgrades. ++ systemd-tmpfiles will ++ execute line with an exclamation mark only if ++ option is given. ++ ++ ++ For example: ++ ++# Make sure these are created by default so that nobody else can ++d /tmp/.X11-unix 1777 root root 10d ++ ++# Unlink the X11 lock files ++r! /tmp/.X[0-9]*-lock ++ ++ The second line in contrast to the first one ++ would break a running system, and will only be ++ executed with . + + + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 9a397af..1983717 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -106,6 +106,7 @@ static Set *unix_sockets = NULL; + static bool arg_create = false; + static bool arg_clean = false; + static bool arg_remove = false; ++static bool arg_unsafe = false; + + static char **include_prefixes = NULL; + static char **exclude_prefixes = NULL; +@@ -1073,7 +1074,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + _cleanup_item_free_ Item *i = NULL; + Item *existing; + _cleanup_free_ char +- *mode = NULL, *user = NULL, *group = NULL, *age = NULL, *path = NULL; ++ *action = NULL, *mode = NULL, *user = NULL, *group = NULL, *age = NULL, *path = NULL; + char type; + Hashmap *h; + int r, n = -1; +@@ -1083,8 +1084,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + assert(buffer); + + r = sscanf(buffer, +- "%c %ms %ms %ms %ms %ms %n", +- &type, ++ "%ms %ms %ms %ms %ms %ms %n", ++ &action, + &path, + &mode, + &user, +@@ -1096,6 +1097,14 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + return -EIO; + } + ++ if (strlen(action) > 2 || (strlen(action) > 1 && action[1] != '!')) { ++ log_error("[%s:%u] Unknown modifier '%s'", fname, line, action); ++ return -EINVAL; ++ } else if (strlen(action) > 1 && !arg_unsafe) ++ return 0; ++ ++ type = action[0]; ++ + i = new0(Item, 1); + if (!i) + return log_oom(); +@@ -1266,6 +1275,7 @@ static int help(void) { + " --create Create marked files/directories\n" + " --clean Clean up marked directories\n" + " --remove Remove marked files/directories\n" ++ " --unsafe Execute actions only safe at boot\n" + " --prefix=PATH Only apply rules that apply to paths with the specified prefix\n" + " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n", + program_invocation_short_name); +@@ -1279,6 +1289,7 @@ static int parse_argv(int argc, char *argv[]) { + ARG_CREATE, + ARG_CLEAN, + ARG_REMOVE, ++ ARG_UNSAFE, + ARG_PREFIX, + ARG_EXCLUDE_PREFIX, + }; +@@ -1288,6 +1299,7 @@ static int parse_argv(int argc, char *argv[]) { + { "create", no_argument, NULL, ARG_CREATE }, + { "clean", no_argument, NULL, ARG_CLEAN }, + { "remove", no_argument, NULL, ARG_REMOVE }, ++ { "unsafe", no_argument, NULL, ARG_UNSAFE }, + { "prefix", required_argument, NULL, ARG_PREFIX }, + { "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX }, + { NULL, 0, NULL, 0 } +@@ -1318,6 +1330,10 @@ static int parse_argv(int argc, char *argv[]) { + arg_remove = true; + break; + ++ case ARG_UNSAFE: ++ arg_unsafe = true; ++ break; ++ + case ARG_PREFIX: + if (strv_extend(&include_prefixes, optarg) < 0) + return log_oom(); +diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf +index 3fff347..a165687 100644 +--- a/tmpfiles.d/legacy.conf ++++ b/tmpfiles.d/legacy.conf +@@ -29,6 +29,6 @@ d /run/lock/lockdev 0775 root lock - + # kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and + # 'quotacheck.mode=force' + +-r /forcefsck +-r /fastboot +-r /forcequotacheck ++r! /forcefsck ++r! /fastboot ++r! /forcequotacheck +diff --git a/tmpfiles.d/systemd-nologin.conf b/tmpfiles.d/systemd-nologin.conf +new file mode 100644 +index 0000000..d61232b +--- /dev/null ++++ b/tmpfiles.d/systemd-nologin.conf +@@ -0,0 +1,11 @@ ++# This file is part of systemd. ++# ++# systemd is free software; you can redistribute it and/or modify it ++# under the terms of the GNU Lesser General Public License as published by ++# the Free Software Foundation; either version 2.1 of the License, or ++# (at your option) any later version. ++ ++# See tmpfiles.d(5) and systemd-forbid-user-logins.service(5). ++# This file has special suffix so it is not run by mistake. ++ ++F! /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)" +diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf +index a05c657..7c6d6b9 100644 +--- a/tmpfiles.d/systemd.conf ++++ b/tmpfiles.d/systemd.conf +@@ -8,7 +8,7 @@ + # See tmpfiles.d(5) for details + + 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 - +@@ -22,8 +22,6 @@ d /run/systemd/users 0755 root root - + d /run/systemd/machines 0755 root root - + d /run/systemd/shutdown 0755 root root - + +-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 - - +diff --git a/tmpfiles.d/x11.conf b/tmpfiles.d/x11.conf +index ece6a5c..4c96a54 100644 +--- a/tmpfiles.d/x11.conf ++++ b/tmpfiles.d/x11.conf +@@ -15,4 +15,4 @@ d /tmp/.font-unix 1777 root root 10d + d /tmp/.Test-unix 1777 root root 10d + + # Unlink the X11 lock files +-r /tmp/.X[0-9]*-lock ++r! /tmp/.X[0-9]*-lock +diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in +index 3405e28..c2dcae0 100644 +--- a/units/systemd-tmpfiles-setup.service.in ++++ b/units/systemd-tmpfiles-setup.service.in +@@ -6,7 +6,7 @@ + # (at your option) any later version. + + [Unit] +-Description=Recreate Volatile Files and Directories ++Description=Create Volatile Files and Directories + Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) + DefaultDependencies=no + Wants=local-fs.target +@@ -18,8 +18,10 @@ ConditionDirectoryNotEmpty=|/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d + ConditionDirectoryNotEmpty=|/etc/tmpfiles.d + ConditionDirectoryNotEmpty=|/run/tmpfiles.d ++RefuseManualStart=yes ++RefuseManualStop=yes + + [Service] + Type=oneshot + RemainAfterExit=yes +-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --exclude-prefix=/dev ++ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --unsafe --exclude-prefix=/dev diff --git a/SOURCES/0156-sleep-config-fix-useless-check-for-swapfile-type.patch b/SOURCES/0156-sleep-config-fix-useless-check-for-swapfile-type.patch new file mode 100644 index 0000000..9e5e16a --- /dev/null +++ b/SOURCES/0156-sleep-config-fix-useless-check-for-swapfile-type.patch @@ -0,0 +1,43 @@ +From 4a57577928328ccd3f695a2723872ca9f9d911fb Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Tue, 24 Dec 2013 16:42:06 -0500 +Subject: [PATCH] sleep-config: fix useless check for swapfile type + +Since 0c6f1f4ea49 the check was useless, because the kernel will +ever only write "partition" or "file" there. + +OTOH, it is possible that "\\040(deleted)" (escaped " (deleted)") +will be added for removed files. This should not happen, so add +a warning to detect those cases. +--- + src/shared/sleep-config.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c +index 2bb0493..d76e3ad 100644 +--- a/src/shared/sleep-config.c ++++ b/src/shared/sleep-config.c +@@ -183,7 +183,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) { + (void) fscanf(f, "%*s %*s %*s %*s %*s\n"); + + for (i = 1;; i++) { +- _cleanup_free_ char *dev = NULL, *d = NULL, *type = NULL; ++ _cleanup_free_ char *dev = NULL, *type = NULL; + size_t size_field, used_field; + int k; + +@@ -202,12 +202,8 @@ static int hibernation_partition_size(size_t *size, size_t *used) { + continue; + } + +- d = cunescape(dev); +- if (!d) +- return -ENOMEM; +- +- if (!streq(type, "partition") && !streq(type, "file")) { +- log_debug("Partition %s has type %s, ignoring.", d, type); ++ if (streq(type, "partition") && endswith(dev, "\\040(deleted)")) { ++ log_warning("Ignoring deleted swapfile '%s'.", dev); + continue; + } + diff --git a/SOURCES/0157-man-resolve-word-omissions.patch b/SOURCES/0157-man-resolve-word-omissions.patch new file mode 100644 index 0000000..3e2c3c8 --- /dev/null +++ b/SOURCES/0157-man-resolve-word-omissions.patch @@ -0,0 +1,725 @@ +From 36cd86e0d91fdc201b5e5bb2862cf12606da6fdf Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 26 Dec 2013 02:47:43 +0100 +Subject: [PATCH] man: resolve word omissions + +This is a recurring submission and includes corrections to: +word omissions and word class choice. + +Conflicts: + man/sd_bus_message_get_cookie.xml + man/sd_bus_request_name.xml + man/sd_watchdog_enabled.xml + man/systemd-getty-generator.xml +--- + man/binfmt.d.xml | 4 ++-- + man/journald.conf.xml | 2 +- + man/loginctl.xml | 2 +- + man/sd-daemon.xml | 2 +- + man/sd-journal.xml | 2 +- + man/sd-login.xml | 4 ++-- + man/sd_booted.xml | 2 +- + man/sd_get_seats.xml | 8 ++++---- + man/sd_id128_get_machine.xml | 2 +- + man/sd_id128_randomize.xml | 2 +- + man/sd_id128_to_string.xml | 2 +- + man/sd_is_fifo.xml | 2 +- + man/sd_journal_add_match.xml | 2 +- + man/sd_journal_get_catalog.xml | 2 +- + man/sd_journal_get_cursor.xml | 2 +- + man/sd_journal_get_cutoff_realtime_usec.xml | 2 +- + man/sd_journal_get_data.xml | 2 +- + man/sd_journal_get_fd.xml | 2 +- + man/sd_journal_get_realtime_usec.xml | 2 +- + man/sd_journal_get_usage.xml | 2 +- + man/sd_journal_next.xml | 6 +++--- + man/sd_journal_print.xml | 2 +- + man/sd_journal_query_unique.xml | 2 +- + man/sd_journal_seek_head.xml | 4 ++-- + man/sd_journal_stream_fd.xml | 2 +- + man/sd_listen_fds.xml | 4 ++-- + man/sd_login_monitor_new.xml | 2 +- + man/sd_notify.xml | 4 ++-- + man/sd_pid_get_session.xml | 2 +- + man/sd_seat_get_active.xml | 2 +- + man/sd_session_is_active.xml | 2 +- + man/sd_uid_get_state.xml | 4 ++-- + man/sysctl.d.xml | 4 ++-- + man/systemctl.xml | 4 ++-- + man/systemd-getty-generator.xml | 8 ++++---- + man/systemd-halt.service.xml | 2 +- + man/systemd-machine-id-setup.xml | 2 +- + man/systemd.preset.xml | 4 ++-- + man/systemd.service.xml | 2 +- + man/systemd.socket.xml | 4 ++-- + man/systemd.unit.xml | 4 ++-- + man/tmpfiles.d.xml | 4 ++-- + 42 files changed, 62 insertions(+), 62 deletions(-) + +diff --git a/man/binfmt.d.xml b/man/binfmt.d.xml +index 94f97e0..6f8668b 100644 +--- a/man/binfmt.d.xml ++++ b/man/binfmt.d.xml +@@ -88,8 +88,8 @@ + administrator, who may use this logic to override the + configuration files installed from vendor + packages. All files are sorted by their filename in +- lexicographic order, regardless in which of the +- directories they reside. If multiple files specify ++ lexicographic order, regardless of which of the ++ directories they reside in. If multiple files specify + the same binary type name, the entry in the file with + the lexicographically latest name will be applied. + +diff --git a/man/journald.conf.xml b/man/journald.conf.xml +index 8e642a3..b362c5d 100644 +--- a/man/journald.conf.xml ++++ b/man/journald.conf.xml +@@ -155,7 +155,7 @@ + into the system journal. If + uid, any user ID + will get his own journal files +- regardless whether it belongs to a ++ regardless of whether it belongs to a + system service or refers to a real + logged in user. If + none, journal files +diff --git a/man/loginctl.xml b/man/loginctl.xml +index 1b54ff7..133d6cf 100644 +--- a/man/loginctl.xml ++++ b/man/loginctl.xml +@@ -109,7 +109,7 @@ + + When showing + session/user/seat properties, show all +- properties regardless whether they are ++ properties regardless of whether they are + set or not. + + +diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml +index 6e804e1..84c1afa 100644 +--- a/man/sd-daemon.xml ++++ b/man/sd-daemon.xml +@@ -144,7 +144,7 @@ + These APIs are implemented in the reference + implementation's sd-daemon.c and + sd-daemon.h files. These +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs +diff --git a/man/sd-journal.xml b/man/sd-journal.xml +index 6d39611..832d584 100644 +--- a/man/sd-journal.xml ++++ b/man/sd-journal.xml +@@ -98,7 +98,7 @@ + + Notes + +- These APIs are implemented as shared library, ++ These APIs are implemented as a shared library, + which can be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd-login.xml b/man/sd-login.xml +index 251b35b..1d47b29 100644 +--- a/man/sd-login.xml ++++ b/man/sd-login.xml +@@ -99,7 +99,7 @@ + caller with the libc + free3 + call after use, including the strings referenced +- therein. Similar, individual strings returned need to ++ therein. Similarly, individual strings returned need to + be freed, as well. + + As a special exception, instead of an empty +@@ -120,7 +120,7 @@ + + Notes + +- These APIs are implemented as shared library, ++ These APIs are implemented as a shared library, + which can be compiled and linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_booted.xml b/man/sd_booted.xml +index 64c0cd9..6f8cc95 100644 +--- a/man/sd_booted.xml ++++ b/man/sd_booted.xml +@@ -100,7 +100,7 @@ + in the reference implementation's + sd-daemon.c and + sd-daemon.h files. These +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs +diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml +index 8254b7c..1e55af3 100644 +--- a/man/sd_get_seats.xml ++++ b/man/sd_get_seats.xml +@@ -90,13 +90,13 @@ + NULL may be returned and should be considered + equivalent to an empty array. + +- Similar, sd_get_sessions() may ++ Similarly, sd_get_sessions() may + be used to determine all current login sessions. + +- Similar, sd_get_uids() may ++ Similarly, sd_get_uids() may + be used to determine all Unix users who currently have login sessions. + +- Similar, ++ Similarly, + sd_get_machine_names() may be + used to determine all current virtual machines and + containers on the system. +@@ -122,7 +122,7 @@ + sd_get_sessions(), + sd_get_uids() and + sd_get_machine_names() interfaces +- are available as shared library, which can be compiled ++ are available as a shared library, which can be compiled + and linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml +index 6bee7ad..084fda2 100644 +--- a/man/sd_id128_get_machine.xml ++++ b/man/sd_id128_get_machine.xml +@@ -116,7 +116,7 @@ + + The sd_id128_get_machine() + and sd_id128_get_boot() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-id128 pkg-config1 + file. +diff --git a/man/sd_id128_randomize.xml b/man/sd_id128_randomize.xml +index 0b95803..100de16 100644 +--- a/man/sd_id128_randomize.xml ++++ b/man/sd_id128_randomize.xml +@@ -95,7 +95,7 @@ + Notes + + The sd_id128_randomize() interface +- is available as shared library, which can be compiled ++ is available as a shared library, which can be compiled + and linked to with the + libsystemd-id128 pkg-config1 + file. +diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml +index 71cf82a..eae2915 100644 +--- a/man/sd_id128_to_string.xml ++++ b/man/sd_id128_to_string.xml +@@ -118,7 +118,7 @@ + + The sd_id128_to_string() + and sd_id128_from_string() interfaces are +- available as shared library, which can be compiled and ++ available as a shared library, which can be compiled and + linked to with the libsystemd-id128 pkg-config1 + file. + +diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml +index 4d9cd79..5e79453 100644 +--- a/man/sd_is_fifo.xml ++++ b/man/sd_is_fifo.xml +@@ -208,7 +208,7 @@ + related functions are implemented in the reference + implementation's sd-daemon.c and + sd-daemon.h files. These +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs +diff --git a/man/sd_journal_add_match.xml b/man/sd_journal_add_match.xml +index b6c7b06..6568234 100644 +--- a/man/sd_journal_add_match.xml ++++ b/man/sd_journal_add_match.xml +@@ -174,7 +174,7 @@ + sd_journal_add_disjunction(), + sd_journal_add_conjunction() and + sd_journal_flush_matches() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_catalog.xml b/man/sd_journal_get_catalog.xml +index 4a7e0a1..ecd329f 100644 +--- a/man/sd_journal_get_catalog.xml ++++ b/man/sd_journal_get_catalog.xml +@@ -118,7 +118,7 @@ + + The sd_journal_get_catalog() and + sd_journal_get_catalog_for_message_id() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_cursor.xml b/man/sd_journal_get_cursor.xml +index 4cee7d5..046c154 100644 +--- a/man/sd_journal_get_cursor.xml ++++ b/man/sd_journal_get_cursor.xml +@@ -130,7 +130,7 @@ + + The sd_journal_get_cursor() + and sd_journal_test_cursor() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_cutoff_realtime_usec.xml b/man/sd_journal_get_cutoff_realtime_usec.xml +index 9bf8220..287c1c5 100644 +--- a/man/sd_journal_get_cutoff_realtime_usec.xml ++++ b/man/sd_journal_get_cutoff_realtime_usec.xml +@@ -122,7 +122,7 @@ + sd_journal_get_cutoff_realtime_usec() + and + sd_journal_get_cutoff_monotonic_usec() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_data.xml b/man/sd_journal_get_data.xml +index 0e1111e..6ed52b5 100644 +--- a/man/sd_journal_get_data.xml ++++ b/man/sd_journal_get_data.xml +@@ -203,7 +203,7 @@ + sd_journal_set_data_threshold() + and + sd_journal_get_data_threshold() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml +index 764f716..4b36f97 100644 +--- a/man/sd_journal_get_fd.xml ++++ b/man/sd_journal_get_fd.xml +@@ -253,7 +253,7 @@ else { + sd_journal_reliable_fd(), + sd_journal_process() and + sd_journal_wait() interfaces are +- available as shared library, which can be compiled and ++ available as a shared library, which can be compiled and + linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_realtime_usec.xml b/man/sd_journal_get_realtime_usec.xml +index 8870c29..bf1aa50 100644 +--- a/man/sd_journal_get_realtime_usec.xml ++++ b/man/sd_journal_get_realtime_usec.xml +@@ -122,7 +122,7 @@ + sd_journal_get_realtime_usec() + and + sd_journal_get_monotonic_usec() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_get_usage.xml b/man/sd_journal_get_usage.xml +index 180d8b2..08d8640 100644 +--- a/man/sd_journal_get_usage.xml ++++ b/man/sd_journal_get_usage.xml +@@ -84,7 +84,7 @@ + Notes + + The sd_journal_get_usage() +- interface is available as shared library, which can be ++ interface is available as a shared library, which can be + compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_next.xml b/man/sd_journal_next.xml +index 6e437d1..1409b0d 100644 +--- a/man/sd_journal_next.xml ++++ b/man/sd_journal_next.xml +@@ -102,7 +102,7 @@ + functions such as + sd_journal_get_data3. + +- Similar, sd_journal_previous() sets ++ Similarly, sd_journal_previous() sets + the read pointer back one entry. + + sd_journal_next_skip() and +@@ -129,7 +129,7 @@ + sd_journal_seek_head3 + and sd_journal_next() in order to + make iterating through the journal easier. See below +- for an example. Similar, ++ for an example. Similarly, + SD_JOURNAL_FOREACH_BACKWARDS() + may be used for iterating the journal in reverse + order. +@@ -156,7 +156,7 @@ + The sd_journal_next(), sd_journal_previous(), + sd_journal_next_skip() and + sd_journal_previous_skip() interfaces are +- available as shared library, which can be compiled and ++ available as a shared library, which can be compiled and + linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml +index e61a648..a716cc3 100644 +--- a/man/sd_journal_print.xml ++++ b/man/sd_journal_print.xml +@@ -227,7 +227,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid( + sd_journal_printv(), + sd_journal_send() and + sd_journal_sendv() interfaces +- are available as shared library, which can be compiled ++ are available as a shared library, which can be compiled + and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_query_unique.xml b/man/sd_journal_query_unique.xml +index f5d9d2b..f0b9204 100644 +--- a/man/sd_journal_query_unique.xml ++++ b/man/sd_journal_query_unique.xml +@@ -156,7 +156,7 @@ + The sd_journal_query_unique(), + sd_journal_enumerate_unique() and + sd_journal_restart_unique() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_seek_head.xml b/man/sd_journal_seek_head.xml +index 03de30a..939f0b1 100644 +--- a/man/sd_journal_seek_head.xml ++++ b/man/sd_journal_seek_head.xml +@@ -94,7 +94,7 @@ + seeks to the beginning of the journal, i.e. the oldest + available entry. + +- Similar, ++ Similarly, + sd_journal_seek_tail() may be + used to seek to the end of the journal, i.e. the most + recent available entry. +@@ -156,7 +156,7 @@ + sd_journal_seek_monotonic_usec(), + sd_journal_seek_realtime_usec(), + and sd_journal_seek_cursor() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_journal_stream_fd.xml b/man/sd_journal_stream_fd.xml +index 4bd0abc..a8dc8fd 100644 +--- a/man/sd_journal_stream_fd.xml ++++ b/man/sd_journal_stream_fd.xml +@@ -112,7 +112,7 @@ + Notes + + The sd_journal_stream_fd() +- interface is available as shared library, which can ++ interface is available as a shared library, which can + be compiled and linked to with the + libsystemd-journal pkg-config1 + file. +diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml +index 240300d..aaabdbf 100644 +--- a/man/sd_listen_fds.xml ++++ b/man/sd_listen_fds.xml +@@ -73,7 +73,7 @@ + parameter is non-zero, + sd_listen_fds() will unset the + $LISTEN_FDS/$LISTEN_PID +- environment variables before returning (regardless ++ environment variables before returning (regardless of + whether the function call itself succeeded or + not). Further calls to + sd_listen_fds() will then fail, +@@ -149,7 +149,7 @@ + implemented in the reference implementation's + sd-daemon.c and + sd-daemon.h files. These +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs +diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml +index 909a3d9..f439d3e 100644 +--- a/man/sd_login_monitor_new.xml ++++ b/man/sd_login_monitor_new.xml +@@ -224,7 +224,7 @@ else { + sd_login_monitor_get_fd(), + sd_login_monitor_get_events() and + sd_login_monitor_get_timeout() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_notify.xml b/man/sd_notify.xml +index 55965ff..e078140 100644 +--- a/man/sd_notify.xml ++++ b/man/sd_notify.xml +@@ -79,7 +79,7 @@ + If the unset_environment + parameter is non-zero, sd_notify() + will unset the $NOTIFY_SOCKET +- environment variable before returning (regardless ++ environment variable before returning (regardless of + whether the function call itself succeeded or + not). Further calls to + sd_notify() will then fail, but +@@ -236,7 +236,7 @@ + the reference implementation's + sd-daemon.c and + sd-daemon.h files. These +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs +diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml +index e5c7709..ff5905b 100644 +--- a/man/sd_pid_get_session.xml ++++ b/man/sd_pid_get_session.xml +@@ -186,7 +186,7 @@ + sd_pid_get_owner_uid(), + sd_pid_get_machine_name() and + sd_pid_get_slice() interfaces are +- available as shared library, which can be compiled and ++ available as a shared library, which can be compiled and + linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml +index cd87696..23d582d 100644 +--- a/man/sd_seat_get_active.xml ++++ b/man/sd_seat_get_active.xml +@@ -164,7 +164,7 @@ + sd_seat_can_multi_session(), + sd_seat_can_tty() and + sd_seat_can_grapical() interfaces +- are available as shared library, which can be compiled ++ are available as a shared library, which can be compiled + and linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml +index 293ce71..06891f7 100644 +--- a/man/sd_session_is_active.xml ++++ b/man/sd_session_is_active.xml +@@ -252,7 +252,7 @@ + sd_session_get_class(), + sd_session_get_display() and + sd_session_get_tty() +- interfaces are available as shared library, which can ++ interfaces are available as a shared library, which can + be compiled and linked to with the + libsystemd-login pkg-config1 + file. +diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml +index d4d23f4..0faa765 100644 +--- a/man/sd_uid_get_state.xml ++++ b/man/sd_uid_get_state.xml +@@ -139,7 +139,7 @@ + be returned and should be considered equivalent to an + empty array. + +- Similar, sd_uid_get_seats() ++ Similarly, sd_uid_get_seats() + may be used to determine the list of seats on which + the user currently has sessions. Similar semantics + apply, however note that the user may have +@@ -171,7 +171,7 @@ + sd_uid_is_on_seat(), + sd_uid_get_sessions(), and + sd_uid_get_seats() interfaces are +- available as shared library, which can be compiled and ++ available as a shared library, which can be compiled and + linked to with the libsystemd-login pkg-config1 + file. + +diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml +index 854864c..5544283 100644 +--- a/man/sysctl.d.xml ++++ b/man/sysctl.d.xml +@@ -89,8 +89,8 @@ + administrator, who may use this logic to override the + configuration files installed by vendor packages. All + configuration files are sorted by their filename in +- lexicographic order, regardless in which of the +- directories they reside. If multiple files specify the ++ lexicographic order, regardless of which of the ++ directories they reside in. If multiple files specify the + same variable name, the entry in the file with the + lexicographically latest name will be applied. It is + recommended to prefix all filenames with a two-digit +diff --git a/man/systemctl.xml b/man/systemctl.xml +index b4bc15d..61deb19 100644 +--- a/man/systemctl.xml ++++ b/man/systemctl.xml +@@ -250,7 +250,7 @@ systemctl start foo + sleep state. Any user may take these locks and privileged + users may override these locks. If any locks are taken, + shutdown and sleep state requests will normally fail +- (regardless if privileged or not) and a list of active locks ++ (regardless of whether privileged or not) and a list of active locks + is printed. However, if + is specified, the locks are ignored and not printed, and the + operation attempted anyway, possibly requiring additional +@@ -445,7 +445,7 @@ systemctl start foo + with identical immediate effects, however, since the latter + is lost on reboot, the changes are lost too. + +- Similar, when used with ++ Similarly, when used with + set-property, make changes only + temporarily, so that they are lost on the next + reboot. +diff --git a/man/systemd-getty-generator.xml b/man/systemd-getty-generator.xml +index da88e72..b1993ae 100644 +--- a/man/systemd-getty-generator.xml ++++ b/man/systemd-getty-generator.xml +@@ -61,10 +61,10 @@ + subsystem. It will also instantiate + serial-getty@.service instances + for virtualizer consoles, if execution in a +- virtualized environment is detected. This should +- ensure that the user is shown a login prompt at the +- right place, regardless in which environment the +- system is started. For example, it is sufficient to ++ virtualized environment is detected. This ++ should ensure that the user is shown a login prompt at ++ the right place, regardless of which environment the ++ system is started in. For example, it is sufficient to + redirect the kernel console with a kernel command line + argument such as console= to get + both kernel messages and a getty prompt on a serial +diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml +index 90b443f..99457aa 100644 +--- a/man/systemd-halt.service.xml ++++ b/man/systemd-halt.service.xml +@@ -65,7 +65,7 @@ + systemd-halt.service is a + system service that is pulled in by + halt.target and is responsible +- for the actual system halt. Similar, ++ for the actual system halt. Similarly, + systemd-poweroff.service is + pulled in by poweroff.target, + systemd-reboot.service by +diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml +index fef76bc..bc38d55 100644 +--- a/man/systemd-machine-id-setup.xml ++++ b/man/systemd-machine-id-setup.xml +@@ -80,7 +80,7 @@ + UUID passed is sufficiently unique and is different + for every booted instanced of the VM. + +- Similar, if run inside a Linux container ++ Similarly, if run inside a Linux container + environment and a UUID is set for the container this + is used to initialize the machine ID. For details see + the documentation of the always, the service +- will be restarted regardless whether ++ will be restarted regardless of whether + it exited cleanly or not, got + terminated abnormally by a signal or + hit a timeout. +diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml +index 1c78562..ac3127d 100644 +--- a/man/systemd.socket.xml ++++ b/man/systemd.socket.xml +@@ -213,7 +213,7 @@ + traffic on any of the sockets will + trigger service activation, and all + listed sockets will be passed to the +- service, regardless whether there is ++ service, regardless of whether there is + incoming traffic on them or not. If + the empty string is assigned to any of + these options, the list of addresses +@@ -225,7 +225,7 @@ + it is often desirable to listen on it + before the interface it is configured + on is up and running, and even +- regardless whether it will be up and ++ regardless of whether it will be up and + running ever at all. To deal with this + it is recommended to set the + FreeBind= option +diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml +index 77127ff..b70c5e9 100644 +--- a/man/systemd.unit.xml ++++ b/man/systemd.unit.xml +@@ -634,7 +634,7 @@ + dependency on another unit is shut + down while the latter is started up, + the shut down is ordered before the +- start-up regardless whether the ++ start-up regardless of whether the + ordering dependency is actually of + type After= or + Before=. If two +@@ -938,7 +938,7 @@ + exists, is a regular file and marked + executable. + +- Similar, ++ Similarly, + ConditionKernelCommandLine= + may be used to check whether a + specific kernel command line option is +diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml +index 39aa68d..ed88751 100644 +--- a/man/tmpfiles.d.xml ++++ b/man/tmpfiles.d.xml +@@ -88,8 +88,8 @@ + the local administrator, who may use this logic to + override the configuration files installed by vendor + packages. All configuration files are sorted by their +- filename in lexicographic order, regardless in which +- of the directories they reside. If multiple files ++ filename in lexicographic order, regardless of which ++ of the directories they reside in. If multiple files + specify the same path, the entry in the file with the + lexicographically earliest name will be applied, all + all other conflicting entries logged as errors. diff --git a/SOURCES/0158-man-improvements-to-comma-placement.patch b/SOURCES/0158-man-improvements-to-comma-placement.patch new file mode 100644 index 0000000..042cecc --- /dev/null +++ b/SOURCES/0158-man-improvements-to-comma-placement.patch @@ -0,0 +1,507 @@ +From 17bb3520f3e976c9e1cec61c330b1e37449b7832 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 26 Dec 2013 02:47:44 +0100 +Subject: [PATCH] man: improvements to comma placement + +This is a recurring submission and includes corrections to: +comma placement. + +Conflicts: + man/sd_bus_message_get_cookie.xml + man/sd_bus_request_name.xml + man/sd_session_is_active.xml + man/sd_watchdog_enabled.xml + man/systemctl.xml + man/systemd.exec.xml + man/systemd.timer.xml + man/systemd.unit.xml +--- + man/halt.xml | 2 +- + man/hostnamectl.xml | 2 +- + man/sd-daemon.xml | 4 ++-- + man/sd-readahead.xml | 2 +- + man/sd_booted.xml | 2 +- + man/sd_get_seats.xml | 2 +- + man/sd_is_fifo.xml | 2 +- + man/sd_listen_fds.xml | 2 +- + man/sd_login_monitor_new.xml | 6 +++--- + man/sd_notify.xml | 2 +- + man/sd_readahead.xml | 2 +- + man/sd_seat_get_active.xml | 4 ++-- + man/sd_uid_get_state.xml | 4 ++-- + man/shutdown.xml | 2 +- + man/systemd-analyze.xml | 2 +- + man/systemd-ask-password.xml | 2 +- + man/systemd-cat.xml | 2 +- + man/systemd-cgls.xml | 2 +- + man/systemd-cgtop.xml | 2 +- + man/systemd-coredumpctl.xml | 2 +- + man/systemd-delta.xml | 2 +- + man/systemd-machine-id-setup.xml | 2 +- + man/systemd-notify.xml | 2 +- + man/systemd-tmpfiles.xml | 2 +- + man/systemd-tty-ask-password-agent.xml | 2 +- + man/systemd.device.xml | 2 +- + man/systemd.mount.xml | 2 +- + man/systemd.service.xml | 2 +- + man/systemd.special.xml | 2 +- + man/systemd.swap.xml | 2 +- + man/systemd.xml | 2 +- + man/telinit.xml | 2 +- + man/timedatectl.xml | 2 +- + 33 files changed, 38 insertions(+), 38 deletions(-) + +diff --git a/man/halt.xml b/man/halt.xml +index 2a13d3c..f54a864 100644 +--- a/man/halt.xml ++++ b/man/halt.xml +@@ -148,7 +148,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml +index b39fb55..a0776f5 100644 +--- a/man/hostnamectl.xml ++++ b/man/hostnamectl.xml +@@ -255,7 +255,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml +index 84c1afa..b48eac9 100644 +--- a/man/sd-daemon.xml ++++ b/man/sd-daemon.xml +@@ -83,7 +83,7 @@ + sd_booted3, + sd_is_fifo3 + for more information about the functions +- implemented. In addition to these functions a couple ++ implemented. In addition to these functions, a couple + of logging prefixes are defined as macros: + + #define SD_EMERG "<0>" /* system is unusable */ +@@ -135,7 +135,7 @@ + implementation. See the respective function man pages + for details. + +- In addition, for details about the algorithms ++ In addition, for details about the algorithms, + check the liberally licensed reference implementation + sources: + +diff --git a/man/sd-readahead.xml b/man/sd-readahead.xml +index f8a0a0b..bcc46b2 100644 +--- a/man/sd-readahead.xml ++++ b/man/sd-readahead.xml +@@ -83,7 +83,7 @@ + reference implementation. See the respective function + man pages for details. + +- In addition, for details about the algorithms ++ In addition, for details about the algorithms, + check the liberally licensed reference implementation + sources: + +diff --git a/man/sd_booted.xml b/man/sd_booted.xml +index 6f8cc95..1e38d2a 100644 +--- a/man/sd_booted.xml ++++ b/man/sd_booted.xml +@@ -106,7 +106,7 @@ + file. Alternatively, applications consuming these APIs + may copy the implementation into their source + tree. For more details about the reference +- implementation see ++ implementation, see + sd-daemon3. + + If the reference implementation is used as +diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml +index 1e55af3..f0e7655 100644 +--- a/man/sd_get_seats.xml ++++ b/man/sd_get_seats.xml +@@ -107,7 +107,7 @@ + + Return Value + +- On success sd_get_seats(), ++ On success, sd_get_seats(), + sd_get_sessions(), + sd_get_uids() and + sd_get_machine_names() return the +diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml +index 5e79453..4bb2236 100644 +--- a/man/sd_is_fifo.xml ++++ b/man/sd_is_fifo.xml +@@ -214,7 +214,7 @@ + file. Alternatively, applications consuming these APIs + may copy the implementation into their source + tree. For more details about the reference +- implementation see ++ implementation, see + sd-daemon3. + + These functions continue to work as described, +diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml +index aaabdbf..6a9e082 100644 +--- a/man/sd_listen_fds.xml ++++ b/man/sd_listen_fds.xml +@@ -155,7 +155,7 @@ + file. Alternatively, applications consuming these APIs + may copy the implementation into their source + tree. For more details about the reference +- implementation see ++ implementation, see + sd-daemon3. + + If the reference implementation is used as +diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml +index f439d3e..14ff241 100644 +--- a/man/sd_login_monitor_new.xml ++++ b/man/sd_login_monitor_new.xml +@@ -198,13 +198,13 @@ else { + + Return Value + +- On success ++ On success, + sd_login_monitor_new(), + sd_login_monitor_flush() and + sd_login_monitor_get_timeout() +- return 0 or a positive integer. On success ++ return 0 or a positive integer. On success, + sd_login_monitor_get_fd() returns +- a Unix file descriptor. On success ++ a Unix file descriptor. On success, + sd_login_monitor_get_events() + returns a combination of POLLIN, + POLLOUT and suchlike. On failure, +diff --git a/man/sd_notify.xml b/man/sd_notify.xml +index e078140..aae27a8 100644 +--- a/man/sd_notify.xml ++++ b/man/sd_notify.xml +@@ -241,7 +241,7 @@ + libsystemd-daemon pkg-config1 + file. Alternatively, applications consuming these APIs + may copy the implementation into their source tree. For +- more details about the reference implementation see ++ more details about the reference implementation, see + sd-daemon3. + + If the reference implementation is used as +diff --git a/man/sd_readahead.xml b/man/sd_readahead.xml +index bb01bcf..9827299 100644 +--- a/man/sd_readahead.xml ++++ b/man/sd_readahead.xml +@@ -139,7 +139,7 @@ + sd-readahead.h files. It is + recommended that applications consuming this API copy + the implementation into their source tree. For more +- details about the reference implementation see ++ details about the reference implementation, see + sd-readahead3 + + If -DDISABLE_SYSTEMD is set during compilation, +diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml +index 23d582d..c64ba13 100644 +--- a/man/sd_seat_get_active.xml ++++ b/man/sd_seat_get_active.xml +@@ -143,9 +143,9 @@ + + Return Value + +- On success ++ On success, + sd_seat_get_active() +- returns 0 or a positive integer. On success ++ returns 0 or a positive integer. On success, + sd_seat_get_sessions() returns + the number of entries in the session identifier + array. If the test succeeds, +diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml +index 0faa765..30b254c 100644 +--- a/man/sd_uid_get_state.xml ++++ b/man/sd_uid_get_state.xml +@@ -152,11 +152,11 @@ + + Return Value + +- On success ++ On success, + sd_uid_get_state() returns 0 or a + positive integer. If the test succeeds, + sd_uid_is_on_seat() returns a +- positive integer, if it fails ++ positive integer; if it fails, + 0. sd_uid_get_sessions() and + sd_uid_get_seats() return the + number of entries in the returned arrays. On failure, +diff --git a/man/shutdown.xml b/man/shutdown.xml +index 795fb66..27e7e87 100644 +--- a/man/shutdown.xml ++++ b/man/shutdown.xml +@@ -164,7 +164,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml +index aefbfc8..b7753f9 100644 +--- a/man/systemd-analyze.xml ++++ b/man/systemd-analyze.xml +@@ -270,7 +270,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml +index 8af328d..79902cb 100644 +--- a/man/systemd-ask-password.xml ++++ b/man/systemd-ask-password.xml +@@ -167,7 +167,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml +index ffb1dfd..ba7a2cf 100644 +--- a/man/systemd-cat.xml ++++ b/man/systemd-cat.xml +@@ -158,7 +158,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml +index 432706b..152b883 100644 +--- a/man/systemd-cgls.xml ++++ b/man/systemd-cgls.xml +@@ -145,7 +145,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml +index 7faedfb..0e1f7c5 100644 +--- a/man/systemd-cgtop.xml ++++ b/man/systemd-cgtop.xml +@@ -264,7 +264,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-coredumpctl.xml b/man/systemd-coredumpctl.xml +index 9ccb67d..67f75d1 100644 +--- a/man/systemd-coredumpctl.xml ++++ b/man/systemd-coredumpctl.xml +@@ -200,7 +200,7 @@ + + + Exit status +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. Not finding any matching coredumps is treated + as failure. + +diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml +index 4d3ab78..ebaa349 100644 +--- a/man/systemd-delta.xml ++++ b/man/systemd-delta.xml +@@ -223,7 +223,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml +index bc38d55..7b3aa7e 100644 +--- a/man/systemd-machine-id-setup.xml ++++ b/man/systemd-machine-id-setup.xml +@@ -116,7 +116,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml +index a769346..e14977d 100644 +--- a/man/systemd-notify.xml ++++ b/man/systemd-notify.xml +@@ -172,7 +172,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml +index 495247e..c678031 100644 +--- a/man/systemd-tmpfiles.xml ++++ b/man/systemd-tmpfiles.xml +@@ -178,7 +178,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd-tty-ask-password-agent.xml b/man/systemd-tty-ask-password-agent.xml +index 31a18ba..cb5fb43 100644 +--- a/man/systemd-tty-ask-password-agent.xml ++++ b/man/systemd-tty-ask-password-agent.xml +@@ -148,7 +148,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/systemd.device.xml b/man/systemd.device.xml +index 002b647..586473c 100644 +--- a/man/systemd.device.xml ++++ b/man/systemd.device.xml +@@ -75,7 +75,7 @@ + udev tag (by default all block and network devices, + and a few others). This may be used to define + dependencies between devices and other units. To tag a +- udev device use TAG+="systemd" in ++ udev device, use TAG+="systemd" in + the udev rules file, see + udev7 + for details. +diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml +index df5a79e..6f9f70c 100644 +--- a/man/systemd.mount.xml ++++ b/man/systemd.mount.xml +@@ -94,7 +94,7 @@ + in a unit file + home-lennart.mount. For details + about the escaping logic used to convert a file system +- path to a unit name see ++ path to a unit name, see + systemd.unit5. + + Optionally, a mount unit may be accompanied by +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index 80a935d..e869f95 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -441,7 +441,7 @@ + one and + two two, + respectively. Since two commands are +- specified ++ specified, + Type=oneshot must + be used. + +diff --git a/man/systemd.special.xml b/man/systemd.special.xml +index 863a029..76bb5cd 100644 +--- a/man/systemd.special.xml ++++ b/man/systemd.special.xml +@@ -996,7 +996,7 @@ + smartcard.target, + sound.target. + +- In addition the following special unit is ++ In addition, the following special unit is + understood only when systemd runs as service instance: + + +diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml +index 13f6c84..5e8b25f 100644 +--- a/man/systemd.swap.xml ++++ b/man/systemd.swap.xml +@@ -85,7 +85,7 @@ + /dev/sda5 must be configured in a + unit file dev-sda5.swap. For + details about the escaping logic used to convert a +- file system path to a unit name see ++ file system path to a unit name, see + systemd.unit5. + + All swap units automatically get the appropriate +diff --git a/man/systemd.xml b/man/systemd.xml +index 85c06d3..23a0c26 100644 +--- a/man/systemd.xml ++++ b/man/systemd.xml +@@ -494,7 +494,7 @@ + /proc. + + For more information about the concepts and +- ideas behind systemd please refer to the Original + Design Document. + +diff --git a/man/telinit.xml b/man/telinit.xml +index bb80939..b20a60a 100644 +--- a/man/telinit.xml ++++ b/man/telinit.xml +@@ -171,7 +171,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + +diff --git a/man/timedatectl.xml b/man/timedatectl.xml +index be0ad3f..f4975ce 100644 +--- a/man/timedatectl.xml ++++ b/man/timedatectl.xml +@@ -222,7 +222,7 @@ + + Exit status + +- On success 0 is returned, a non-zero failure ++ On success, 0 is returned, a non-zero failure + code otherwise. + + diff --git a/SOURCES/0159-man-grammar-and-wording-improvements.patch b/SOURCES/0159-man-grammar-and-wording-improvements.patch new file mode 100644 index 0000000..09d5e86 --- /dev/null +++ b/SOURCES/0159-man-grammar-and-wording-improvements.patch @@ -0,0 +1,79 @@ +From 24f82a86f4d61809f9eb913c1244a4a6df7ba896 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Thu, 26 Dec 2013 02:47:45 +0100 +Subject: [PATCH] man: grammar and wording improvements + +This is a recurring submission and includes corrections to: +- missing words, preposition choice. +- change of /lib to /usr/lib, because that is what most distros are + using as the system-wide location for systemd/udev files. + +Conflicts: + man/journalctl.xml + man/sd_bus_message_get_cookie.xml + man/sd_bus_request_name.xml + man/systemctl.xml + man/systemd-networkd.service.xml + man/systemd.device.xml + man/systemd.exec.xml + man/systemd.timer.xml + man/udev.xml +--- + man/daemon.xml | 2 +- + man/sd_is_fifo.xml | 2 +- + man/systemd.service.xml | 2 +- + man/systemd.unit.xml | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/man/daemon.xml b/man/daemon.xml +index 7790420..1fe4546 100644 +--- a/man/daemon.xml ++++ b/man/daemon.xml +@@ -408,7 +408,7 @@ + description files. + + In systemd, if the developer or +- administrator wants to make sure a service or ++ administrator wants to make sure that a service or + other unit is activated automatically on boot, + it is recommended to place a symlink to the + unit file in the .wants/ +diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml +index 4bb2236..58cd1c9 100644 +--- a/man/sd_is_fifo.xml ++++ b/man/sd_is_fifo.xml +@@ -165,7 +165,7 @@ + called to check whether the specified file descriptor + refers to a special file. If the + path parameter is not +- NULL, it is checked whether file ++ NULL, it is checked whether the file + descriptor is bound to the specified file + name. Special files in this context are character + device nodes and files in /proc +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index e869f95..e3a370f 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -427,7 +427,7 @@ + ExecStart=/bin/sh -c 'dmesg | tac' + + +- Only select environment variables ++ Only select environment variables that + are set for executed commands. See + systemd.exec5. + +diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml +index b70c5e9..f6b4b24 100644 +--- a/man/systemd.unit.xml ++++ b/man/systemd.unit.xml +@@ -548,7 +548,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. + diff --git a/SOURCES/0160-man-document-fail-nofail-auto-noauto.patch b/SOURCES/0160-man-document-fail-nofail-auto-noauto.patch new file mode 100644 index 0000000..ddf240b --- /dev/null +++ b/SOURCES/0160-man-document-fail-nofail-auto-noauto.patch @@ -0,0 +1,130 @@ +From 9395355f4733cecc72b31f384e313606745c14d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 25 Dec 2013 23:20:57 -0500 +Subject: [PATCH] man: document fail/nofail, auto/noauto + +Also s/filesystem/file system/ in a few places. + +Conflicts: + TODO + man/systemd-fsck@.service.xml + man/systemd-fstab-generator.xml +--- + man/systemd-fsck@.service.xml | 5 ++++- + man/systemd-fstab-generator.xml | 6 ++++++ + man/systemd-halt.service.xml | 2 +- + man/systemd.mount.xml | 20 +++++++++++++++++++- + man/systemd.unit.xml | 2 +- + man/udevadm.xml | 2 +- + 6 files changed, 32 insertions(+), 5 deletions(-) + +diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml +index e934352..c653dc5 100644 +--- a/man/systemd-fsck@.service.xml ++++ b/man/systemd-fsck@.service.xml +@@ -62,7 +62,10 @@ + system + check. systemd-fsck-root.service is + responsible for file system checks on the root +- file system. ++ file system. The root file system check is performed ++ before the other file systems. Either service is enabled ++ at boot if passno in /etc/fstab for ++ the file system is set to a value greater than zero. + + systemd-fsck will + forward file system checking progress to the +diff --git a/man/systemd-fstab-generator.xml b/man/systemd-fstab-generator.xml +index 9ca16c7..e3cf5d2 100644 +--- a/man/systemd-fstab-generator.xml ++++ b/man/systemd-fstab-generator.xml +@@ -61,6 +61,12 @@ + reloaded. This will instantiate mount and swap units + as necessary. + ++ The passno field is treated ++ like a simple boolean, and the ordering information is ++ discarded. However, if the root file system is ++ checked, it is checked before all the other ++ file systems. ++ + See + systemd.mount5 + and +diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml +index 99457aa..bec2e36 100644 +--- a/man/systemd-halt.service.xml ++++ b/man/systemd-halt.service.xml +@@ -86,7 +86,7 @@ + It is necessary to have this code in a separate binary + because otherwise rebooting after an upgrade might be broken — + the running PID 1 could still depend on libraries which are not +- available any more, thus keeping the filesystem busy, which ++ available any more, thus keeping the file system busy, which + then cannot be re-mounted read-only. + + Immediately before executing the actual system +diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml +index 6f9f70c..cadf950 100644 +--- a/man/systemd.mount.xml ++++ b/man/systemd.mount.xml +@@ -132,7 +132,10 @@ + for details). Mounts listed in + /etc/fstab will be converted into + native units dynamically at boot and when the +- configuration of the system manager is reloaded. See ++ configuration of the system manager is reloaded. In ++ general, configuring mount points through ++ /etc/fstab is the preferred ++ approach. See + systemd-fstab-generator8 + for details about the conversion. + +@@ -159,6 +162,21 @@ + s, min, + h, ms. + ++ If is given, this mount ++ will be only wanted, not required, by the ++ local-fs.target. This means that ++ the boot will continue even if this mount point is not ++ mounted successfully. Option has ++ the opposite meaning and is the default. ++ ++ If is given, this mount ++ will not be added as a dependency for ++ local-fs.target. This means that ++ it will not be mounted automatically during boot, ++ unless it is pulled in by some other unit. Option ++ has the opposite meaning and is ++ the default. ++ + If a mount point is configured in both + /etc/fstab and a unit file that + is stored below /usr, the former +diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml +index f6b4b24..4704352 100644 +--- a/man/systemd.unit.xml ++++ b/man/systemd.unit.xml +@@ -232,7 +232,7 @@ + multiple units from a single configuration file. If + systemd looks for a unit configuration file, it will + first search for the literal unit name in the +- filesystem. If that yields no success and the unit ++ file system. If that yields no success and the unit + name contains an @ character, systemd will look for a + unit template that shares the same name but with the + instance string (i.e. the part between the @ character +diff --git a/man/udevadm.xml b/man/udevadm.xml +index a1ffe42..ca3713f 100644 +--- a/man/udevadm.xml ++++ b/man/udevadm.xml +@@ -461,7 +461,7 @@ + + + +- Alternative root path in the filesystem for reading and writing files. ++ Alternative root path in the file system for reading and writing files. + + + diff --git a/SOURCES/0161-man-fix-description-of-is-enabled-returned-value.patch b/SOURCES/0161-man-fix-description-of-is-enabled-returned-value.patch new file mode 100644 index 0000000..a29e918 --- /dev/null +++ b/SOURCES/0161-man-fix-description-of-is-enabled-returned-value.patch @@ -0,0 +1,22 @@ +From 823c9b307bdcbce12ee7af42ab2e8b4a01df1831 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 24 Dec 2013 22:57:15 -0500 +Subject: [PATCH] man: fix description of is-enabled returned value + +--- + man/systemctl.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/systemctl.xml b/man/systemctl.xml +index 61deb19..25b03d8 100644 +--- a/man/systemctl.xml ++++ b/man/systemctl.xml +@@ -932,7 +932,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service + + static + Unit is not enabled, but has no provisions for enabling in [Install] section +- 1 ++ 0 + + + disabled diff --git a/SOURCES/0162-man-fix-Type-reference.patch b/SOURCES/0162-man-fix-Type-reference.patch new file mode 100644 index 0000000..262de6f --- /dev/null +++ b/SOURCES/0162-man-fix-Type-reference.patch @@ -0,0 +1,23 @@ +From 8c9d4932e5d6ee02b6fc3373a8f68d89faf49928 Mon Sep 17 00:00:00 2001 +From: Marcos Felipe Rasia de Mello +Date: Thu, 26 Dec 2013 17:47:57 -0200 +Subject: [PATCH] man: fix Type= reference + +Simple man page fix attached. +--- + man/systemd.service.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index e3a370f..898c19d 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -139,7 +139,7 @@ + + If set to + (the default +- value if BusName= ++ value if Type= + is not specified), it is expected that + the process configured with + ExecStart= is the diff --git a/SOURCES/0163-man-fix-Type-reference-v2.patch b/SOURCES/0163-man-fix-Type-reference-v2.patch new file mode 100644 index 0000000..c5bfe20 --- /dev/null +++ b/SOURCES/0163-man-fix-Type-reference-v2.patch @@ -0,0 +1,37 @@ +From 7f66158304287727f35c24d9bd4c700c0923bc73 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 27 Dec 2013 01:18:39 -0500 +Subject: [PATCH] man: fix Type= reference v2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +grawity: + + It looks like the old version _was_ correct – the default value will + be "Type=dbus" if the service has a BusName set. + + Suggested change: "if neither Type= nor BusName= is specified" +--- + man/systemd.service.xml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index 898c19d..71bcfb4 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -139,9 +139,11 @@ + + If set to + (the default +- value if Type= +- is not specified), it is expected that +- the process configured with ++ value if neither ++ Type= nor ++ BusName= are ++ specified), it is expected that the ++ process configured with + ExecStart= is the + main process of the service. In this + mode, if the process offers diff --git a/SOURCES/0164-hwdb-Update-database-of-Bluetooth-company-identifier.patch b/SOURCES/0164-hwdb-Update-database-of-Bluetooth-company-identifier.patch new file mode 100644 index 0000000..ac7a4f8 --- /dev/null +++ b/SOURCES/0164-hwdb-Update-database-of-Bluetooth-company-identifier.patch @@ -0,0 +1,38 @@ +From 48acc4b9f59e019748459e01c8c125803ac88df3 Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Fri, 27 Dec 2013 09:35:20 -0800 +Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers + +--- + hwdb/20-bluetooth-vendor-product.hwdb | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb +index 6f8301f..192b715 100644 +--- a/hwdb/20-bluetooth-vendor-product.hwdb ++++ b/hwdb/20-bluetooth-vendor-product.hwdb +@@ -427,7 +427,7 @@ bluetooth:v008B* + ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC + + bluetooth:v008C* +- ID_VENDOR_FROM_DATABASE=Qualcomm Labs, Inc. ++ ID_VENDOR_FROM_DATABASE=Qualcomm Retail Solutions, Inc. (formerly Qualcomm Labs, Inc.) + + bluetooth:v008D* + ID_VENDOR_FROM_DATABASE=Zscan Software +@@ -839,3 +839,15 @@ bluetooth:v0115* + + bluetooth:v0116* + ID_VENDOR_FROM_DATABASE=1OAK Technologies ++ ++bluetooth:v0117* ++ ID_VENDOR_FROM_DATABASE=Wimoto Technologies Inc ++ ++bluetooth:v0118* ++ ID_VENDOR_FROM_DATABASE=Radius Networks, Inc. ++ ++bluetooth:v0119* ++ ID_VENDOR_FROM_DATABASE=Wize Technology Co., Ltd. ++ ++bluetooth:v011A* ++ ID_VENDOR_FROM_DATABASE=Qualcomm Labs, Inc. diff --git a/SOURCES/0165-man-add-a-note-about-propagating-signals.patch b/SOURCES/0165-man-add-a-note-about-propagating-signals.patch new file mode 100644 index 0000000..2db8823 --- /dev/null +++ b/SOURCES/0165-man-add-a-note-about-propagating-signals.patch @@ -0,0 +1,61 @@ +From a49c79e807843bbd87961b3d4b81ea79076c043e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 27 Dec 2013 15:27:24 -0500 +Subject: [PATCH] man: add a note about propagating signals + +--- + man/systemd.service.xml | 39 +++++++++++++++++++++++++-------------- + 1 file changed, 25 insertions(+), 14 deletions(-) + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index 71bcfb4..af3e0f2 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -734,22 +734,33 @@ ExecStart=/bin/echo $ONE $TWO ${TWO} + considered successful termination, in + addition to the normal successful exit + code 0 and the signals SIGHUP, SIGINT, +- SIGTERM and SIGPIPE. Exit status ++ SIGTERM, and SIGPIPE. Exit status + definitions can either be numeric exit + codes or termination signal names, +- separated by spaces. Example: +- SuccessExitStatus=1 2 8 +- SIGKILL, ensures that exit +- codes 1, 2, 8 and the termination +- signal SIGKILL are considered clean +- service terminations. This option may +- appear more than once in which case +- the list of successful exit statuses +- is merged. If the empty string is +- assigned to this option, the list is +- reset, all prior assignments of this +- option will have no +- effect. ++ separated by spaces. For example: ++ SuccessExitStatus=1 2 8 SIGKILL ++ ensures that exit codes 1, 2, 8 and ++ the termination signal ++ SIGKILL are ++ considered clean service terminations. ++ ++ ++ Note that if a process has a ++ signal handler installed and exits by ++ calling ++ _exit2 ++ in response to a signal, the ++ information about the signal is lost. ++ Programs should instead perform cleanup and kill themselves with the same signal instead. See ++ Proper handling of SIGINT/SIGQUIT — How to be a proper program. ++ ++ This option may appear more than once ++ in which case the list of successful ++ exit statuses is merged. If the empty ++ string is assigned to this option, the ++ list is reset, all prior assignments ++ of this option will have no ++ effect. + + + diff --git a/SOURCES/0166-man-include-autoconf-snippet-in-daemon-7.patch b/SOURCES/0166-man-include-autoconf-snippet-in-daemon-7.patch new file mode 100644 index 0000000..e6f0e03 --- /dev/null +++ b/SOURCES/0166-man-include-autoconf-snippet-in-daemon-7.patch @@ -0,0 +1,41 @@ +From f338abbfbc3e385dda57ebc22769e54ab3f5edc8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 27 Dec 2013 23:44:27 -0500 +Subject: [PATCH] man: include autoconf snippet in daemon(7) + +https://bugs.freedesktop.org/show_bug.cgi?id=40446 +--- + man/daemon.xml | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/man/daemon.xml b/man/daemon.xml +index 1fe4546..105826a 100644 +--- a/man/daemon.xml ++++ b/man/daemon.xml +@@ -765,12 +765,20 @@ + + PKG_PROG_PKG_CONFIG + AC_ARG_WITH([systemdsystemunitdir], +- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), +- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +-if test "x$with_systemdsystemunitdir" != xno; then +- AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +-fi +-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) ++ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),, ++ [with_systemdsystemunitdir=auto]) ++AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ ++ def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) ++ ++ AS_IF([test "x$def_systemdsystemunitdir" = "x"], ++ [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], ++ [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) ++ with_systemdsystemunitdir=no], ++ [with_systemdsystemunitdir=$def_systemdsystemunitdir])]) ++AS_IF([test "x$with_systemdsystemunitdir" != "xno"], ++ [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) ++AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"]) ++ + + This snippet allows automatic + installation of the unit files on systemd diff --git a/SOURCES/0167-systemd-python-fix-setting-of-exception-codes.patch b/SOURCES/0167-systemd-python-fix-setting-of-exception-codes.patch new file mode 100644 index 0000000..32dd320 --- /dev/null +++ b/SOURCES/0167-systemd-python-fix-setting-of-exception-codes.patch @@ -0,0 +1,325 @@ +From b22a215807207c1a6332a22505840478ac633afd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 29 Dec 2013 23:39:28 -0500 +Subject: [PATCH] systemd-python: fix setting of exception codes + +The return value of 0 would be treated as failure by mistake, +resulting in " SystemError: error return without exception set". +The way that set_error() is used is changed to be the same +everywhere. +--- + src/python-systemd/_daemon.c | 14 +++++----- + src/python-systemd/_reader.c | 63 ++++++++++++++++++++------------------------ + 2 files changed, 35 insertions(+), 42 deletions(-) + +diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c +index f0ab16f..c6db69f 100644 +--- a/src/python-systemd/_daemon.c ++++ b/src/python-systemd/_daemon.c +@@ -88,7 +88,7 @@ static PyObject* notify(PyObject *self, PyObject *args, PyObject *keywds) { + #endif + + r = sd_notify(unset, msg); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -123,7 +123,7 @@ static PyObject* listen_fds(PyObject *self, PyObject *args, PyObject *keywds) { + #endif + + r = sd_listen_fds(unset); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return long_FromLong(r); +@@ -151,7 +151,7 @@ static PyObject* is_fifo(PyObject *self, PyObject *args) { + #endif + + r = sd_is_fifo(fd, path); +- if (set_error(r, path, NULL)) ++ if (set_error(r, path, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -179,7 +179,7 @@ static PyObject* is_mq(PyObject *self, PyObject *args) { + #endif + + r = sd_is_mq(fd, path); +- if (set_error(r, path, NULL)) ++ if (set_error(r, path, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -203,7 +203,7 @@ static PyObject* is_socket(PyObject *self, PyObject *args) { + return NULL; + + r = sd_is_socket(fd, family, type, listening); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -230,7 +230,7 @@ static PyObject* is_socket_inet(PyObject *self, PyObject *args) { + } + + r = sd_is_socket_inet(fd, family, type, listening, (uint16_t) port); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -265,7 +265,7 @@ static PyObject* is_socket_unix(PyObject *self, PyObject *args) { + #endif + + r = sd_is_socket_unix(fd, type, listening, path, length); +- if (set_error(r, path, NULL)) ++ if (set_error(r, path, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c +index bc5db19..0c88926 100644 +--- a/src/python-systemd/_reader.c ++++ b/src/python-systemd/_reader.c +@@ -206,8 +206,7 @@ PyDoc_STRVAR(Reader_reliable_fd__doc__, + static PyObject* Reader_reliable_fd(Reader *self, PyObject *args) + { + int r = sd_journal_reliable_fd(self->j); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + return PyBool_FromLong(r); + } +@@ -221,8 +220,7 @@ PyDoc_STRVAR(Reader_get_events__doc__, + static PyObject* Reader_get_events(Reader *self, PyObject *args) + { + int r = sd_journal_get_events(self->j); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + return long_FromLong(r); + } +@@ -242,8 +240,7 @@ static PyObject* Reader_get_timeout(Reader *self, PyObject *args) + uint64_t t; + + r = sd_journal_get_timeout(self->j, &t); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + if (t == (uint64_t) -1) +@@ -265,8 +262,7 @@ static PyObject* Reader_get_timeout_ms(Reader *self, PyObject *args) + uint64_t t; + + r = sd_journal_get_timeout(self->j, &t); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return absolute_timeout(t); +@@ -304,7 +300,7 @@ static PyObject* Reader_get_usage(Reader *self, PyObject *args) + uint64_t bytes; + + r = sd_journal_get_usage(self->j, &bytes); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + assert_cc(sizeof(unsigned long long) == sizeof(bytes)); +@@ -366,8 +362,7 @@ static PyObject* Reader_next(Reader *self, PyObject *args) + assert_not_reached("should not be here"); + Py_END_ALLOW_THREADS + +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + return PyBool_FromLong(r); + } +@@ -445,7 +440,8 @@ static PyObject* Reader_get(Reader *self, PyObject *args) + if (r == -ENOENT) { + PyErr_SetString(PyExc_KeyError, field); + return NULL; +- } else if (set_error(r, NULL, "field name is not valid")) ++ } ++ if (set_error(r, NULL, "field name is not valid") < 0) + return NULL; + + r = extract(msg, msg_len, NULL, &value); +@@ -530,7 +526,7 @@ static PyObject* Reader_get_realtime(Reader *self, PyObject *args) + assert(!args); + + r = sd_journal_get_realtime_usec(self->j, ×tamp); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + assert_cc(sizeof(unsigned long long) == sizeof(timestamp)); +@@ -555,7 +551,7 @@ static PyObject* Reader_get_monotonic(Reader *self, PyObject *args) + assert(!args); + + r = sd_journal_get_monotonic_usec(self->j, ×tamp, &id); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + assert_cc(sizeof(unsigned long long) == sizeof(timestamp)); +@@ -598,8 +594,7 @@ static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds + return NULL; + + r = sd_journal_add_match(self->j, match, match_len); +- set_error(r, NULL, "Invalid match"); +- if (r < 0) ++ if (set_error(r, NULL, "Invalid match") < 0) + return NULL; + + Py_RETURN_NONE; +@@ -616,8 +611,7 @@ static PyObject* Reader_add_disjunction(Reader *self, PyObject *args) + { + int r; + r = sd_journal_add_disjunction(self->j); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -633,8 +627,7 @@ static PyObject* Reader_add_conjunction(Reader *self, PyObject *args) + { + int r; + r = sd_journal_add_conjunction(self->j); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -661,7 +654,7 @@ static PyObject* Reader_seek_head(Reader *self, PyObject *args) + Py_BEGIN_ALLOW_THREADS + r = sd_journal_seek_head(self->j); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -678,7 +671,7 @@ static PyObject* Reader_seek_tail(Reader *self, PyObject *args) + Py_BEGIN_ALLOW_THREADS + r = sd_journal_seek_tail(self->j); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -699,7 +692,7 @@ static PyObject* Reader_seek_realtime(Reader *self, PyObject *args) + Py_BEGIN_ALLOW_THREADS + r = sd_journal_seek_realtime_usec(self->j, timestamp); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -723,20 +716,20 @@ static PyObject* Reader_seek_monotonic(Reader *self, PyObject *args) + + if (bootid) { + r = sd_id128_from_string(bootid, &id); +- if (set_error(r, NULL, "Invalid bootid")) ++ if (set_error(r, NULL, "Invalid bootid") < 0) + return NULL; + } else { + Py_BEGIN_ALLOW_THREADS + r = sd_id128_get_boot(&id); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + } + + Py_BEGIN_ALLOW_THREADS + r = sd_journal_seek_monotonic_usec(self->j, id, timestamp); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + Py_RETURN_NONE; +@@ -809,7 +802,7 @@ static PyObject* Reader_seek_cursor(Reader *self, PyObject *args) + Py_BEGIN_ALLOW_THREADS + r = sd_journal_seek_cursor(self->j, cursor); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, "Invalid cursor")) ++ if (set_error(r, NULL, "Invalid cursor") < 0) + return NULL; + Py_RETURN_NONE; + } +@@ -828,7 +821,7 @@ static PyObject* Reader_get_cursor(Reader *self, PyObject *args) + assert(!args); + + r = sd_journal_get_cursor(self->j, &cursor); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return unicode_FromString(cursor); +@@ -851,8 +844,7 @@ static PyObject* Reader_test_cursor(Reader *self, PyObject *args) + return NULL; + + r = sd_journal_test_cursor(self->j, cursor); +- set_error(r, NULL, NULL); +- if (r < 0) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return PyBool_FromLong(r); +@@ -876,7 +868,7 @@ static PyObject* Reader_query_unique(Reader *self, PyObject *args) + Py_BEGIN_ALLOW_THREADS + r = sd_journal_query_unique(self->j, query); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, "Invalid field name")) ++ if (set_error(r, NULL, "Invalid field name") < 0) + return NULL; + + value_set = PySet_New(0); +@@ -930,7 +922,8 @@ static PyObject* Reader_get_catalog(Reader *self, PyObject *args) + else + set_error(r, NULL, NULL); + return NULL; +- } else if (set_error(r, NULL, NULL)) ++ } ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return unicode_FromString(msg); +@@ -955,13 +948,13 @@ static PyObject* get_catalog(PyObject *self, PyObject *args) + return NULL; + + r = sd_id128_from_string(id_, &id); +- if (set_error(r, NULL, "Invalid id128")) ++ if (set_error(r, NULL, "Invalid id128") < 0) + return NULL; + + Py_BEGIN_ALLOW_THREADS + r = sd_journal_get_catalog_for_message_id(id, &msg); + Py_END_ALLOW_THREADS +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return unicode_FromString(msg); +@@ -979,7 +972,7 @@ static PyObject* Reader_get_data_threshold(Reader *self, void *closure) + int r; + + r = sd_journal_get_data_threshold(self->j, &cvalue); +- if (set_error(r, NULL, NULL)) ++ if (set_error(r, NULL, NULL) < 0) + return NULL; + + return long_FromSize_t(cvalue); diff --git a/SOURCES/0168-systemd-python-fix-listen_fds-under-Python-2.patch b/SOURCES/0168-systemd-python-fix-listen_fds-under-Python-2.patch new file mode 100644 index 0000000..46d4dd1 --- /dev/null +++ b/SOURCES/0168-systemd-python-fix-listen_fds-under-Python-2.patch @@ -0,0 +1,22 @@ +From 9135ee7824ab7f645488e9fa163eda49d4d2b12e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 30 Dec 2013 00:01:00 -0500 +Subject: [PATCH] systemd-python: fix listen_fds under Python 2 + +--- + src/python-systemd/_daemon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c +index c6db69f..3982e85 100644 +--- a/src/python-systemd/_daemon.c ++++ b/src/python-systemd/_daemon.c +@@ -114,7 +114,7 @@ static PyObject* listen_fds(PyObject *self, PyObject *args, PyObject *keywds) { + #else + PyObject *obj = NULL; + if (!PyArg_ParseTupleAndKeywords(args, keywds, "|O:_listen_fds", +- (char**) kwlist, &unset, &obj)) ++ (char**) kwlist, &obj)) + return NULL; + if (obj != NULL) + unset = PyObject_IsTrue(obj); diff --git a/SOURCES/0169-man-expand-on-some-more-subtle-points-in-systemd.soc.patch b/SOURCES/0169-man-expand-on-some-more-subtle-points-in-systemd.soc.patch new file mode 100644 index 0000000..064a939 --- /dev/null +++ b/SOURCES/0169-man-expand-on-some-more-subtle-points-in-systemd.soc.patch @@ -0,0 +1,120 @@ +From 6fe43c70ac008feaf26f49420c559565e3b50528 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 30 Dec 2013 00:11:30 -0500 +Subject: [PATCH] man: expand on some more subtle points in systemd.socket(5) + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1694 +--- + man/systemd.socket.xml | 67 ++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 49 insertions(+), 18 deletions(-) + +diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml +index ac3127d..570a6fb 100644 +--- a/man/systemd.socket.xml ++++ b/man/systemd.socket.xml +@@ -85,21 +85,26 @@ + processes of the socket. + + For each socket file a matching service file +- (see ++ must exist, describing the service to start on ++ incoming traffic on the socket (see + systemd.service5 +- for details) must exist, describing the service to +- start on incoming traffic on the socket. Depending on +- the setting of (see below), +- this must either be named like the socket unit, but +- with the suffix replaced; or it must be a template +- file named the same way. Example: a socket file ++ for more information about .service files). The name ++ of the .service unit is by default the same as the ++ name of the .socket unit, but can be altered with ++ option described below. ++ Depending on the setting of ++ option described below, this .service unit must either ++ be named like the .socket unit, but with the suffix ++ replaced, unless overridden with ++ ; or it must be a template ++ unit named the same way. Example: a socket file + foo.socket needs a matching + service foo.service if + is set. If +- is set, a service template +- file foo@.service must exist from +- which services are instantiated for each incoming +- connection. ++ is set, a service ++ template file foo@.service must ++ exist from which services are instantiated for each ++ incoming connection. + + Unless DefaultDependencies= + is set to , socket units will +@@ -116,9 +121,21 @@ + boot or late system shutdown should disable this + option. + ++ Socket units will have a ++ Before= dependency on the service ++ which they trigger added implicitly. No implicit ++ WantedBy= or ++ RequiredBy= dependency from the ++ socket to the service is added. This means that the ++ service may be started without the socket, in which ++ case it must be able to open sockets by itself. To ++ prevent this, an explicit Requires= ++ dependency may be added. ++ + Socket units may be used to implement on-demand + starting of services, as well as parallelized starting +- of services. ++ of services. See the blog stories linked at the end ++ for introduction. + + Note that the daemon software configured for + socket activation with socket units needs to be able +@@ -221,12 +238,23 @@ + of any of these options will have no + effect. + ++ It is also possible to have more ++ than one socket unit for the same ++ service when using ++ Service=, and the ++ service will receive all the sockets ++ configured in all the socket units. ++ Sockets configured in one unit are ++ passed in the order of configuration, ++ but no ordering between socket units ++ is specified. ++ + If an IP address is used here, + it is often desirable to listen on it + before the interface it is configured + on is up and running, and even + regardless of whether it will be up and +- running ever at all. To deal with this ++ running at any point. To deal with this + it is recommended to set the + FreeBind= option + described below. +@@ -687,11 +715,14 @@ + Service= + Specifies the service + unit name to activate on incoming +- traffic. This defaults to the service +- that bears the same name as the socket +- (ignoring the different suffixes). In +- most cases it should not be necessary +- to use this option. ++ traffic. This setting is only allowed ++ for sockets with ++ Accept=no. It ++ defaults to the service that bears the ++ same name as the socket (with the ++ suffix replaced). In most cases it ++ should not be necessary to use this ++ option. + + + diff --git a/SOURCES/0170-tmpfiles-rename-unsafe-to-boot.patch b/SOURCES/0170-tmpfiles-rename-unsafe-to-boot.patch new file mode 100644 index 0000000..c8ac916 --- /dev/null +++ b/SOURCES/0170-tmpfiles-rename-unsafe-to-boot.patch @@ -0,0 +1,119 @@ +From 81e897b916baa556c7f0ef7bceedb5b73d550bad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 30 Dec 2013 13:00:38 -0500 +Subject: [PATCH] tmpfiles: rename --unsafe to --boot + +As suggested by Kay, it is better to describe what is done, +not what might happen. +--- + man/systemd-tmpfiles.xml | 2 +- + man/tmpfiles.d.xml | 4 ++-- + src/tmpfiles/tmpfiles.c | 14 +++++++------- + units/systemd-tmpfiles-setup.service.in | 2 +- + 4 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml +index c678031..64f9cf9 100644 +--- a/man/systemd-tmpfiles.xml ++++ b/man/systemd-tmpfiles.xml +@@ -133,7 +133,7 @@ + removed. + + +- ++ + Also execute lines + with an exclamation mark. + +diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml +index ed88751..8267ffc 100644 +--- a/man/tmpfiles.d.xml ++++ b/man/tmpfiles.d.xml +@@ -273,7 +273,7 @@ L /tmp/foobar - - - - /dev/null + execute at any time, e.g. on package upgrades. + systemd-tmpfiles will + execute line with an exclamation mark only if +- option is given. ++ option is given. + + + For example: +@@ -286,7 +286,7 @@ r! /tmp/.X[0-9]*-lock + + The second line in contrast to the first one + would break a running system, and will only be +- executed with . ++ executed with . + + + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 1983717..67b13bc 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -106,7 +106,7 @@ static Set *unix_sockets = NULL; + static bool arg_create = false; + static bool arg_clean = false; + static bool arg_remove = false; +-static bool arg_unsafe = false; ++static bool arg_boot = false; + + static char **include_prefixes = NULL; + static char **exclude_prefixes = NULL; +@@ -1100,7 +1100,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + if (strlen(action) > 2 || (strlen(action) > 1 && action[1] != '!')) { + log_error("[%s:%u] Unknown modifier '%s'", fname, line, action); + return -EINVAL; +- } else if (strlen(action) > 1 && !arg_unsafe) ++ } else if (strlen(action) > 1 && !arg_boot) + return 0; + + type = action[0]; +@@ -1275,7 +1275,7 @@ static int help(void) { + " --create Create marked files/directories\n" + " --clean Clean up marked directories\n" + " --remove Remove marked files/directories\n" +- " --unsafe Execute actions only safe at boot\n" ++ " --boot Execute actions only safe at boot\n" + " --prefix=PATH Only apply rules that apply to paths with the specified prefix\n" + " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n", + program_invocation_short_name); +@@ -1289,7 +1289,7 @@ static int parse_argv(int argc, char *argv[]) { + ARG_CREATE, + ARG_CLEAN, + ARG_REMOVE, +- ARG_UNSAFE, ++ ARG_BOOT, + ARG_PREFIX, + ARG_EXCLUDE_PREFIX, + }; +@@ -1299,7 +1299,7 @@ static int parse_argv(int argc, char *argv[]) { + { "create", no_argument, NULL, ARG_CREATE }, + { "clean", no_argument, NULL, ARG_CLEAN }, + { "remove", no_argument, NULL, ARG_REMOVE }, +- { "unsafe", no_argument, NULL, ARG_UNSAFE }, ++ { "boot", no_argument, NULL, ARG_BOOT }, + { "prefix", required_argument, NULL, ARG_PREFIX }, + { "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX }, + { NULL, 0, NULL, 0 } +@@ -1330,8 +1330,8 @@ static int parse_argv(int argc, char *argv[]) { + arg_remove = true; + break; + +- case ARG_UNSAFE: +- arg_unsafe = true; ++ case ARG_BOOT: ++ arg_boot = true; + break; + + case ARG_PREFIX: +diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in +index c2dcae0..01043b7 100644 +--- a/units/systemd-tmpfiles-setup.service.in ++++ b/units/systemd-tmpfiles-setup.service.in +@@ -24,4 +24,4 @@ RefuseManualStop=yes + [Service] + Type=oneshot + RemainAfterExit=yes +-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --unsafe --exclude-prefix=/dev ++ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev diff --git a/SOURCES/0171-sleep-config-Dereference-pointer-before-check-for-NU.patch b/SOURCES/0171-sleep-config-Dereference-pointer-before-check-for-NU.patch new file mode 100644 index 0000000..0812944 --- /dev/null +++ b/SOURCES/0171-sleep-config-Dereference-pointer-before-check-for-NU.patch @@ -0,0 +1,47 @@ +From 44d380fa1042c56eee959c8cf8477aa62b8d8a0e Mon Sep 17 00:00:00 2001 +From: Stefan Beller +Date: Mon, 30 Dec 2013 17:43:52 +0100 +Subject: [PATCH] sleep-config: Dereference pointer before check for NULL + +This fixes a bug pointed out by http://css.csail.mit.edu/stack/ +(Optimization-unstable code) +It is a similar fix as f146f5e159 (2013-12-30, core: +Forgot to dereference pointer when checking for NULL) + +To explain this bug consider the following similar, but simpler code: + if (!p) + free(*p) + +Assume the if condition evaluates to true, then we will access *p, +which means the compiler can assume p is a valid pointer, so it could +dereference p and use the value *p. +Assuming p as a valid pointer, !p will be false. +But initally we assumed the condition evaluates to true. + +By this reasoning the optimizing compiler can deduce, we have dead code. +("The if will never be taken, as *p must be valid, because otherwise +accessing *p inside the if would segfault") + +This led to an error message of the static code checker, so I checked the +code in question. + +As we access *modes and *states before the check in the changed line of +this patch, I assume the line to be wrong and we actually wanted to check +for *modes and *states being both non null. +--- + src/shared/sleep-config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c +index d76e3ad..b2a0787 100644 +--- a/src/shared/sleep-config.c ++++ b/src/shared/sleep-config.c +@@ -94,7 +94,7 @@ int parse_sleep_config(const char *verb, char ***modes, char ***states) { + } else + assert_not_reached("what verb"); + +- if (!modes || !states) { ++ if (!*modes || !*states) { + strv_free(*modes); + strv_free(*states); + return log_oom(); diff --git a/SOURCES/0172-sleep-config-fix-double-free.patch b/SOURCES/0172-sleep-config-fix-double-free.patch new file mode 100644 index 0000000..439932b --- /dev/null +++ b/SOURCES/0172-sleep-config-fix-double-free.patch @@ -0,0 +1,99 @@ +From 9835435400e945b294872a525aacf99a5ad5bcf5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 31 Dec 2013 11:23:58 -0500 +Subject: [PATCH] sleep-config: fix double free + +Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL' +oom conditions would not be detected properly. After that commit, a double +free was performed. + +Rework the whole function to be easier to understand, and also replace +strv_split_nulstr with strv_new, since we know the strings anyway. +--- + src/shared/sleep-config.c | 38 ++++++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 18 deletions(-) + +diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c +index b2a0787..70a0896 100644 +--- a/src/shared/sleep-config.c ++++ b/src/shared/sleep-config.c +@@ -28,11 +28,14 @@ + #include "strv.h" + #include "util.h" + +-int parse_sleep_config(const char *verb, char ***modes, char ***states) { ++#define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0) ++ ++int parse_sleep_config(const char *verb, char ***_modes, char ***_states) { + _cleanup_strv_free_ char + **suspend_mode = NULL, **suspend_state = NULL, + **hibernate_mode = NULL, **hibernate_state = NULL, + **hybrid_mode = NULL, **hybrid_state = NULL; ++ char **modes, **states; + + const ConfigTableItem items[] = { + { "Sleep", "SuspendMode", config_parse_strv, 0, &suspend_mode }, +@@ -59,47 +62,46 @@ int parse_sleep_config(const char *verb, char ***modes, char ***states) { + + if (streq(verb, "suspend")) { + /* empty by default */ +- *modes = suspend_mode; ++ USE(modes, suspend_mode); + + if (suspend_state) +- *states = suspend_state; ++ USE(states, suspend_state); + else +- *states = strv_split_nulstr("mem\0standby\0freeze\0"); ++ states = strv_new("mem", "standby", "freeze", NULL); + +- suspend_mode = suspend_state = NULL; + } else if (streq(verb, "hibernate")) { + if (hibernate_mode) +- *modes = hibernate_mode; ++ USE(modes, hibernate_mode); + else +- *modes = strv_split_nulstr("platform\0shutdown\0"); ++ modes = strv_new("platform", "shutdown", NULL); + + if (hibernate_state) +- *states = hibernate_state; ++ USE(states, hibernate_state); + else +- *states = strv_split_nulstr("disk\0"); ++ states = strv_new("disk", NULL); + +- hibernate_mode = hibernate_state = NULL; + } else if (streq(verb, "hybrid-sleep")) { + if (hybrid_mode) +- *modes = hybrid_mode; ++ USE(modes, hybrid_mode); + else +- *modes = strv_split_nulstr("suspend\0platform\0shutdown\0"); ++ modes = strv_new("suspend", "platform", "shutdown", NULL); + + if (hybrid_state) +- *states = hybrid_state; ++ USE(states, hybrid_state); + else +- *states = strv_split_nulstr("disk\0"); ++ states = strv_new("disk", NULL); + +- hybrid_mode = hybrid_state = NULL; + } else + assert_not_reached("what verb"); + +- if (!*modes || !*states) { +- strv_free(*modes); +- strv_free(*states); ++ if ((!modes && !streq(verb, "suspend")) || !states) { ++ strv_free(modes); ++ strv_free(states); + return log_oom(); + } + ++ *_modes = modes; ++ *_states = states; + return 0; + } + diff --git a/SOURCES/0173-core-service-check-if-mainpid-matches-only-if-it-is-.patch b/SOURCES/0173-core-service-check-if-mainpid-matches-only-if-it-is-.patch new file mode 100644 index 0000000..729d377 --- /dev/null +++ b/SOURCES/0173-core-service-check-if-mainpid-matches-only-if-it-is-.patch @@ -0,0 +1,26 @@ +From 32e036b9baa6e9c9ecc90ae5db558db0a93847b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 30 Dec 2013 11:21:56 -0500 +Subject: [PATCH] core/service: check if mainpid matches only if it is set + +https://bugzilla.redhat.com/show_bug.cgi?id=1047304 + +Conflicts: + src/core/service.c +--- + src/core/service.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 62ae8f0..f0acda1 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3400,7 +3400,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + return; + } + +- if (s->notify_access == NOTIFY_MAIN && pid != s->main_pid) { ++ if (s->notify_access == NOTIFY_MAIN && s->main_pid != 0 && pid != s->main_pid) { + log_warning_unit(u->id, + "%s: Got notification message from PID %lu, but reception only permitted for PID %lu", + u->id, (unsigned long) pid, (unsigned long) s->main_pid); diff --git a/SOURCES/0174-man-typo-fix.patch b/SOURCES/0174-man-typo-fix.patch new file mode 100644 index 0000000..6b02abd --- /dev/null +++ b/SOURCES/0174-man-typo-fix.patch @@ -0,0 +1,22 @@ +From 903086a167718d33ebb5e4f1825d1696e45ff1a5 Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Sat, 4 Jan 2014 23:21:13 +0100 +Subject: [PATCH] man: typo fix + +--- + man/systemd.time.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/systemd.time.xml b/man/systemd.time.xml +index f438fa5..a837f23 100644 +--- a/man/systemd.time.xml ++++ b/man/systemd.time.xml +@@ -222,7 +222,7 @@ + In the date and time specifications, any + component may be specified as * in + which case any value will match. Alternatively, each +- component can be specified as list of values separated ++ component can be specified as a list of values separated + by commas. Values may also be suffixed with + / and a repetition value, which + indicates that the value and all values plus multiples diff --git a/SOURCES/0175-swap-remove-if-else-with-the-same-data-path.patch b/SOURCES/0175-swap-remove-if-else-with-the-same-data-path.patch new file mode 100644 index 0000000..39753dd --- /dev/null +++ b/SOURCES/0175-swap-remove-if-else-with-the-same-data-path.patch @@ -0,0 +1,29 @@ +From 6710995e2c264939da4d383b5d37724c46282cdc Mon Sep 17 00:00:00 2001 +From: Stefan Beller +Date: Fri, 3 Jan 2014 20:33:20 +0100 +Subject: [PATCH] swap: remove if/else with the same data path + +This was introduced in e1770af812 (2012-02-03, swap: replace failure +boolean by result enum). + +This just removes unneeded lines of code, no functional change. +--- + src/core/swap.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/core/swap.c b/src/core/swap.c +index f295b65..727bb95 100644 +--- a/src/core/swap.c ++++ b/src/core/swap.c +@@ -959,10 +959,7 @@ static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) { + case SWAP_DEACTIVATING_SIGKILL: + case SWAP_DEACTIVATING_SIGTERM: + +- if (f == SWAP_SUCCESS) +- swap_enter_dead(s, f); +- else +- swap_enter_dead(s, f); ++ swap_enter_dead(s, f); + break; + + default: diff --git a/SOURCES/0176-hwdb-update.patch b/SOURCES/0176-hwdb-update.patch new file mode 100644 index 0000000..331e48b --- /dev/null +++ b/SOURCES/0176-hwdb-update.patch @@ -0,0 +1,769 @@ +From 6dc222a83a577bfd29def018fb7a8c591b2d6761 Mon Sep 17 00:00:00 2001 +From: Marcel Holtmann +Date: Sun, 5 Jan 2014 00:44:34 -0800 +Subject: [PATCH] hwdb: update + +Conflicts: + hwdb/20-sdio-vendor-model.hwdb +--- + hwdb/20-OUI.hwdb | 97 +++++++++++++++++++++++++- + hwdb/20-pci-vendor-model.hwdb | 154 ++++++++++++++++++++++++++++++++++++++---- + hwdb/20-usb-vendor-model.hwdb | 6 ++ + 3 files changed, 241 insertions(+), 16 deletions(-) + +diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb +index 92b96ae..a51a00a 100644 +--- a/hwdb/20-OUI.hwdb ++++ b/hwdb/20-OUI.hwdb +@@ -13627,6 +13627,12 @@ OUI:40D8551E2* + OUI:40D8551E3* + ID_OUI_FROM_DATABASE=Mega Electronics Ltd + ++OUI:40D8551E4* ++ ID_OUI_FROM_DATABASE=STEK Ltd ++ ++OUI:40D855EE6* ++ ID_OUI_FROM_DATABASE=Narinet, Inc. ++ + OUI:000000* + ID_OUI_FROM_DATABASE=XEROX CORPORATION + +@@ -35222,7 +35228,7 @@ OUI:001C4C* + ID_OUI_FROM_DATABASE=Petrotest Instruments + + OUI:001C4D* +- ID_OUI_FROM_DATABASE=Zeemote Technology Inc. (part of Aplix). ++ ID_OUI_FROM_DATABASE=Aplix IP Holdings Corporation + + OUI:001C4E* + ID_OUI_FROM_DATABASE=TASA International Limited +@@ -52606,6 +52612,9 @@ OUI:08D42B* + OUI:08D5C0* + ID_OUI_FROM_DATABASE=Seers Technology Co., Ltd + ++OUI:08D833* ++ ID_OUI_FROM_DATABASE=Shenzhen RF Technology Co,.Ltd ++ + OUI:08E5DA* + ID_OUI_FROM_DATABASE=NANJING FUJITSU COMPUTER PRODUCTS CO.,LTD. + +@@ -53308,6 +53317,9 @@ OUI:1423D7* + OUI:142BD2* + ID_OUI_FROM_DATABASE=Armtel Ltd. + ++OUI:142D27* ++ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. ++ + OUI:142D8B* + ID_OUI_FROM_DATABASE=Incipio Technologies, Inc + +@@ -53761,6 +53773,9 @@ OUI:18C451* + OUI:18C8E7* + ID_OUI_FROM_DATABASE=Shenzhen Hualistone Technology Co.,Ltd + ++OUI:18CC23* ++ ID_OUI_FROM_DATABASE=Philio Technology Corporation ++ + OUI:18D071* + ID_OUI_FROM_DATABASE=DASAN SMC, Inc. + +@@ -54688,6 +54703,9 @@ OUI:2838CF* + OUI:2839E7* + ID_OUI_FROM_DATABASE=Preceno Technology Pte.Ltd. + ++OUI:283B96* ++ ID_OUI_FROM_DATABASE=Cool Control LTD ++ + OUI:283CE4* + ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd + +@@ -54907,6 +54925,9 @@ OUI:28E14C* + OUI:28E297* + ID_OUI_FROM_DATABASE=Shanghai InfoTM Microelectronics Co.,Ltd. + ++OUI:28E347* ++ ID_OUI_FROM_DATABASE=Liteon Technology Corporation ++ + OUI:28E608* + ID_OUI_FROM_DATABASE=Tokheim + +@@ -55717,6 +55738,9 @@ OUI:34E0CF* + OUI:34E0D7* + ID_OUI_FROM_DATABASE=DONGGUAN QISHENG ELECTRONICS INDUSTRIAL CO., LTD + ++OUI:34E2FD* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:34EF44* + ID_OUI_FROM_DATABASE=2Wire + +@@ -56023,6 +56047,9 @@ OUI:3C1040* + OUI:3C106F* + ID_OUI_FROM_DATABASE=ALBAHITH TECHNOLOGIES + ++OUI:3C15C2* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:3C15EA* + ID_OUI_FROM_DATABASE=TESCOM CO., LTD. + +@@ -56227,6 +56254,9 @@ OUI:3CC99E* + OUI:3CCA87* + ID_OUI_FROM_DATABASE=Iders Incorporated + ++OUI:3CCD93* ++ ID_OUI_FROM_DATABASE=LG ELECTRONICS INC ++ + OUI:3CCE73* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + +@@ -56408,7 +56438,7 @@ OUI:40667A* + ID_OUI_FROM_DATABASE=mediola - connected living AG + + OUI:406826* +- ID_OUI_FROM_DATABASE=Thales Optronics Limited ++ ID_OUI_FROM_DATABASE=Thales UK Limited + + OUI:406AAB* + ID_OUI_FROM_DATABASE=RIM +@@ -57436,6 +57466,9 @@ OUI:5048EB* + OUI:504A5E* + ID_OUI_FROM_DATABASE=Masimo Corporation + ++OUI:504A6E* ++ ID_OUI_FROM_DATABASE=NETGEAR INC., ++ + OUI:504F94* + ID_OUI_FROM_DATABASE=Loxone Electronics GmbH + +@@ -58480,6 +58513,9 @@ OUI:6045BD* + OUI:604616* + ID_OUI_FROM_DATABASE=XIAMEN VANN INTELLIGENT CO., LTD + ++OUI:6047D4* ++ ID_OUI_FROM_DATABASE=FORICS Electronic Technology Co., Ltd. ++ + OUI:604A1C* + ID_OUI_FROM_DATABASE=SUYIN Corporation + +@@ -58630,6 +58666,9 @@ OUI:60D30A* + OUI:60D819* + ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. + ++OUI:60D9C7* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:60DA23* + ID_OUI_FROM_DATABASE=Estech Co.,Ltd + +@@ -58849,6 +58888,9 @@ OUI:6473E2* + OUI:647657* + ID_OUI_FROM_DATABASE=Innovative Security Designs + ++OUI:6476BA* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:647791* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -58882,6 +58924,9 @@ OUI:6487D7* + OUI:6488FF* + ID_OUI_FROM_DATABASE=Sichuan Changhong Electric Ltd. + ++OUI:648D9E* ++ ID_OUI_FROM_DATABASE=IVT Electronic Co.,Ltd ++ + OUI:64995D* + ID_OUI_FROM_DATABASE=LGE + +@@ -59161,6 +59206,9 @@ OUI:687924* + OUI:6879ED* + ID_OUI_FROM_DATABASE=SHARP Corporation + ++OUI:687CC8* ++ ID_OUI_FROM_DATABASE=Measurement Systems S. de R.L. ++ + OUI:687CD5* + ID_OUI_FROM_DATABASE=Y Soft Corporation, a.s. + +@@ -59425,6 +59473,9 @@ OUI:6C6F18* + OUI:6C7039* + ID_OUI_FROM_DATABASE=Novar GmbH + ++OUI:6C709F* ++ ID_OUI_FROM_DATABASE=Apple ++ + OUI:6C71D9* + ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc + +@@ -59779,6 +59830,9 @@ OUI:708B78* + OUI:708D09* + ID_OUI_FROM_DATABASE=Nokia Corporation + ++OUI:709383* ++ ID_OUI_FROM_DATABASE=Intelligent Optical Network High Tech CO.,LTD. ++ + OUI:7093F8* + ID_OUI_FROM_DATABASE=Space Monkey, Inc. + +@@ -60166,6 +60220,9 @@ OUI:74F612* + OUI:74F726* + ID_OUI_FROM_DATABASE=Neuron Robotics + ++OUI:74F85D* ++ ID_OUI_FROM_DATABASE=Berkeley Nucleonics Corp ++ + OUI:74FDA0* + ID_OUI_FROM_DATABASE=Compupal (Group) Corporation + +@@ -60862,6 +60919,9 @@ OUI:7CFADF* + OUI:7CFE28* + ID_OUI_FROM_DATABASE=Salutron Inc. + ++OUI:7CFF62* ++ ID_OUI_FROM_DATABASE=Huizhou Super Electron Technology Co.,Ltd. ++ + OUI:80000B* + ID_OUI_FROM_DATABASE=Intel Corporate + +@@ -61105,6 +61165,9 @@ OUI:80D019* + OUI:80D18B* + ID_OUI_FROM_DATABASE=Hangzhou I'converge Technology Co.,Ltd + ++OUI:80D433* ++ ID_OUI_FROM_DATABASE=LzLabs GmbH ++ + OUI:80D733* + ID_OUI_FROM_DATABASE=QSR Automations, Inc. + +@@ -61336,6 +61399,9 @@ OUI:84ACA4* + OUI:84AF1F* + ID_OUI_FROM_DATABASE=Beat System Service Co,. Ltd. + ++OUI:84B59C* ++ ID_OUI_FROM_DATABASE=Juniper networks ++ + OUI:84C2E4* + ID_OUI_FROM_DATABASE=Jiangsu Qinheng Co., Ltd. + +@@ -61402,6 +61468,9 @@ OUI:880355* + OUI:880905* + ID_OUI_FROM_DATABASE=MTMCommunications + ++OUI:880FB6* ++ ID_OUI_FROM_DATABASE=Jabil Circuits India Pvt Ltd,-EHTP unit ++ + OUI:881036* + ID_OUI_FROM_DATABASE=Panodic(ShenZhen) Electronics Limted + +@@ -62605,6 +62674,9 @@ OUI:983000* + OUI:983071* + ID_OUI_FROM_DATABASE=DAIKYUNG VASCOM + ++OUI:98349D* ++ ID_OUI_FROM_DATABASE=Krauss Maffei Technologies GmbH ++ + OUI:983571* + ID_OUI_FROM_DATABASE=Sub10 Systems Ltd + +@@ -63061,6 +63133,9 @@ OUI:9CCAD9* + OUI:9CCD82* + ID_OUI_FROM_DATABASE=CHENG UEI PRECISION INDUSTRY CO.,LTD + ++OUI:9CD21E* ++ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. ++ + OUI:9CD24B* + ID_OUI_FROM_DATABASE=zte corporation + +@@ -63358,6 +63433,9 @@ OUI:A0CEC8* + OUI:A0CF5B* + ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC. + ++OUI:A0D12A* ++ ID_OUI_FROM_DATABASE=AXPRO Technology Inc. ++ + OUI:A0D3C1* + ID_OUI_FROM_DATABASE=Hewlett Packard + +@@ -64366,6 +64444,9 @@ OUI:B05B1F* + OUI:B05CE5* + ID_OUI_FROM_DATABASE=Nokia Corporation + ++OUI:B061C7* ++ ID_OUI_FROM_DATABASE=Ericsson-LG Enterprise ++ + OUI:B06563* + ID_OUI_FROM_DATABASE=Shanghai Railway Communication Factory + +@@ -64684,6 +64765,9 @@ OUI:B46293* + OUI:B462AD* + ID_OUI_FROM_DATABASE=raytest GmbH + ++OUI:B46698* ++ ID_OUI_FROM_DATABASE=Zealabs srl ++ + OUI:B467E9* + ID_OUI_FROM_DATABASE=Qingdao GoerTek Technology Co., Ltd. + +@@ -65590,6 +65674,9 @@ OUI:C098E5* + OUI:C09C92* + ID_OUI_FROM_DATABASE=COBY + ++OUI:C09D26* ++ ID_OUI_FROM_DATABASE=Topicon HK Lmd. ++ + OUI:C09F42* + ID_OUI_FROM_DATABASE=Apple + +@@ -65833,6 +65920,9 @@ OUI:C45DD8* + OUI:C46044* + ID_OUI_FROM_DATABASE=Everex Electronics Limited + ++OUI:C4626B* ++ ID_OUI_FROM_DATABASE=ZPT Vigantice ++ + OUI:C462EA* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +@@ -68605,6 +68695,9 @@ OUI:EC14F6* + OUI:EC172F* + ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO., LTD. + ++OUI:EC1766* ++ ID_OUI_FROM_DATABASE=Research Centre Module ++ + OUI:EC1A59* + ID_OUI_FROM_DATABASE=Belkin International Inc. + +diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb +index 6142dc8..7f833e3 100644 +--- a/hwdb/20-pci-vendor-model.hwdb ++++ b/hwdb/20-pci-vendor-model.hwdb +@@ -4166,6 +4166,9 @@ pci:v00001002d00006600* + pci:v00001002d00006601* + ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8730M] + ++pci:v00001002d00006601sv0000103Csd00002100* ++ ID_MODEL_FROM_DATABASE=FirePro M4100 ++ + pci:v00001002d00006602* + ID_MODEL_FROM_DATABASE=Mars + +@@ -4185,10 +4188,22 @@ pci:v00001002d00006607* + ID_MODEL_FROM_DATABASE=Mars LE [Radeon HD 8530M] + + pci:v00001002d00006610* +- ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670/R7 250] ++ ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670 / R7 250] + + pci:v00001002d00006611* +- ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8570] ++ ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8570 / R7 240 OEM] ++ ++pci:v00001002d00006611sv00001028sd0000210B* ++ ID_MODEL_FROM_DATABASE=Radeon R5 240 OEM ++ ++pci:v00001002d00006611sv0000174Bsd00004248* ++ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM ++ ++pci:v00001002d00006611sv0000174Bsd0000A240* ++ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM ++ ++pci:v00001002d00006611sv00001B0Asd000090D3* ++ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM + + pci:v00001002d00006613* + ID_MODEL_FROM_DATABASE=Oland PRO [Radeon R7 240] +@@ -4224,7 +4239,7 @@ pci:v00001002d00006658* + ID_MODEL_FROM_DATABASE=Bonaire XTX [Radeon R7 260X] + + pci:v00001002d0000665C* +- ID_MODEL_FROM_DATABASE=Bonaire XT [Radeon HD 7790/8770] ++ ID_MODEL_FROM_DATABASE=Bonaire XT [Radeon HD 7790/8770 / R9 260 OEM] + + pci:v00001002d0000665Csv00001043sd00000452* + ID_MODEL_FROM_DATABASE=Radeon HD 7790 DirectCU II OC +@@ -4235,6 +4250,12 @@ pci:v00001002d0000665Csv00001462sd00002930* + pci:v00001002d0000665Csv00001462sd00002932* + ID_MODEL_FROM_DATABASE=Radeon HD 8770 + ++pci:v00001002d0000665Csv00001462sd00002934* ++ ID_MODEL_FROM_DATABASE=Radeon R9 260 OEM ++ ++pci:v00001002d0000665Csv0000148Csd00009260* ++ ID_MODEL_FROM_DATABASE=Radeon R9 260 OEM ++ + pci:v00001002d0000665Csv00001682sd00003310* + ID_MODEL_FROM_DATABASE=Radeon HD 7790 Black Edition 2 GB + +@@ -4817,9 +4838,21 @@ pci:v00001002d00006742sv0000148Csd00006570* + pci:v00001002d00006742sv00001682sd00006570* + ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570] + ++pci:v00001002d00006742sv0000174Bsd00005570* ++ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 5570] ++ + pci:v00001002d00006742sv0000174Bsd00006570* + ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570] + ++pci:v00001002d00006742sv0000174Bsd00007570* ++ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 7570] ++ ++pci:v00001002d00006742sv0000174Bsd00008510* ++ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 8510] ++ ++pci:v00001002d00006742sv0000174Bsd00008570* ++ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 8570] ++ + pci:v00001002d00006742sv00001787sd00006570* + ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570] + +@@ -5541,13 +5574,13 @@ pci:v00001002d00006770sv000017AAsd00003658* + ID_MODEL_FROM_DATABASE=Radeon HD 7470A + + pci:v00001002d00006771* +- ID_MODEL_FROM_DATABASE=Caicos XTX [Radeon HD 8490] ++ ID_MODEL_FROM_DATABASE=Caicos XTX [Radeon HD 8490 / R5 235X OEM] + + pci:v00001002d00006772* + ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 7450A] + + pci:v00001002d00006778* +- ID_MODEL_FROM_DATABASE=Caicos XT [Radeon HD 7470/8470] ++ ID_MODEL_FROM_DATABASE=Caicos XT [Radeon HD 7470/8470 / R5 235 OEM] + + pci:v00001002d00006778sv00001019sd00000024* + ID_MODEL_FROM_DATABASE=Radeon HD 7470 +@@ -5580,7 +5613,7 @@ pci:v00001002d00006778sv0000174Bsd0000E145* + ID_MODEL_FROM_DATABASE=Radeon HD 7470 + + pci:v00001002d00006779* +- ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 6450/7450/8450] ++ ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] + + pci:v00001002d00006779sv00001019sd00000016* + ID_MODEL_FROM_DATABASE=Radeon HD 6450 +@@ -5979,7 +6012,7 @@ pci:v00001002d00006831* + ID_MODEL_FROM_DATABASE=Cape Verde [AMD Radeon HD 7700M Series] + + pci:v00001002d00006835* +- ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R7 260] ++ ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R9 255 OEM] + + pci:v00001002d00006837* + ID_MODEL_FROM_DATABASE=Cape Verde LE [Radeon HD 7730/8730] +@@ -8967,7 +9000,7 @@ pci:v00001002d0000999C* + ID_MODEL_FROM_DATABASE=Richland + + pci:v00001002d0000999D* +- ID_MODEL_FROM_DATABASE=Richland ++ ID_MODEL_FROM_DATABASE=Richland [Radeon HD 8550D] + + pci:v00001002d000099A0* + ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7520G] +@@ -17663,6 +17696,9 @@ pci:v0000109Ed0000036Esv00001461sd00000761* + pci:v0000109Ed0000036Esv00001461sd00000771* + ID_MODEL_FROM_DATABASE=AverMedia AVerTV DVB-T 771 + ++pci:v0000109Ed0000036Esv00001464sd0000AA00* ++ ID_MODEL_FROM_DATABASE=iTuner Spectra8 ++ + pci:v0000109Ed0000036Esv000014F1sd00000001* + ID_MODEL_FROM_DATABASE=Bt878 Mediastream Controller NTSC + +@@ -27503,6 +27539,9 @@ pci:v000010ECd00005209* + pci:v000010ECd00005227* + ID_MODEL_FROM_DATABASE=RTS5227 PCI Express Card Reader + ++pci:v000010ECd00005227sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v000010ECd00005229* + ID_MODEL_FROM_DATABASE=RTS5229 PCI Express Card Reader + +@@ -48170,9 +48209,18 @@ pci:v0000168Cd00000033* + pci:v0000168Cd00000034* + ID_MODEL_FROM_DATABASE=AR9462 Wireless Network Adapter + ++pci:v0000168Cd00000034sv00001A56sd00002003* ++ ID_MODEL_FROM_DATABASE=Killer Wireless-N 1202 Half-size Mini PCIe Card ++ + pci:v0000168Cd00000036* + ID_MODEL_FROM_DATABASE=QCA9565 / AR9565 Wireless Network Adapter + ++pci:v0000168Cd00000037* ++ ID_MODEL_FROM_DATABASE=AR9485 Wireless Network Adapter ++ ++pci:v0000168Cd00000037sv00001A3Bsd00002100* ++ ID_MODEL_FROM_DATABASE=AW-NB100H 802.11n Wireless Mini PCIe Card ++ + pci:v0000168Cd0000003C* + ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter + +@@ -48191,6 +48239,9 @@ pci:v0000168Cd00009013* + pci:v0000168Cd0000FF19* + ID_MODEL_FROM_DATABASE=AR5006X Wireless Network Adapter + ++pci:v0000168Cd0000FF1B* ++ ID_MODEL_FROM_DATABASE=AR2425 Wireless Network Adapter [AR5007EG 802.11bg] ++ + pci:v0000168Cd0000FF1C* + ID_MODEL_FROM_DATABASE=AR5008 Wireless Network Adapter + +@@ -49406,6 +49457,9 @@ pci:v00001814d00003298sv0000103Csd000018EC* + pci:v00001814d00003592* + ID_MODEL_FROM_DATABASE=RT3592 Wireless 802.11abgn 2T/2R PCIe + ++pci:v00001814d0000359F* ++ ID_MODEL_FROM_DATABASE=RT3592 PCIe Wireless Network Adapter ++ + pci:v00001814d00005360* + ID_MODEL_FROM_DATABASE=RT5360 Wireless 802.11n 1T/1R + +@@ -49421,6 +49475,9 @@ pci:v00001814d00005390* + pci:v00001814d00005390sv0000103Csd00001636* + ID_MODEL_FROM_DATABASE=U98Z077.00 Half-size Mini PCIe Card + ++pci:v00001814d00005392* ++ ID_MODEL_FROM_DATABASE=RT5392 PCIe Wireless Network Adapter ++ + pci:v00001814d0000539F* + ID_MODEL_FROM_DATABASE=RT5390 [802.11 b/g/n 1T1R G-band PCI Express Single Chip] + +@@ -50585,6 +50642,12 @@ pci:v00001957d00000087* + pci:v00001957d000000B4* + ID_MODEL_FROM_DATABASE=MPC8315E + ++pci:v00001957d000000B6* ++ ID_MODEL_FROM_DATABASE=MPC8314E ++ ++pci:v00001957d000000B6sv00001A56sd00001101* ++ ID_MODEL_FROM_DATABASE=Killer Xeno Pro Gigabit Ethernet Controller ++ + pci:v00001957d000000C2* + ID_MODEL_FROM_DATABASE=MPC8379E + +@@ -50669,6 +50732,12 @@ pci:v00001957d00007011* + pci:v00001957d00007018* + ID_MODEL_FROM_DATABASE=MPC8610 + ++pci:v00001957d0000C006* ++ ID_MODEL_FROM_DATABASE=MPC8308 ++ ++pci:v00001957d0000C006sv00001A56sd00001201* ++ ID_MODEL_FROM_DATABASE=Killer E2100 Gigabit Ethernet Controller ++ + pci:v00001958* + ID_VENDOR_FROM_DATABASE=Faster Technology, LLC. + +@@ -54164,6 +54233,9 @@ pci:v00008086d00000412* + pci:v00008086d00000416* + ID_MODEL_FROM_DATABASE=4th Gen Core Processor Integrated Graphics Controller + ++pci:v00008086d00000416sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d0000041A* + ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3 Processor Integrated Graphics Controller + +@@ -54680,9 +54752,15 @@ pci:v00008086d0000095Asv00008086sd00005000* + pci:v00008086d0000095Asv00008086sd00005002* + ID_MODEL_FROM_DATABASE=Wireless-N 7265 + ++pci:v00008086d0000095Asv00008086sd0000500A* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ + pci:v00008086d0000095Asv00008086sd00005010* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + ++pci:v00008086d0000095Asv00008086sd00005012* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ + pci:v00008086d0000095Asv00008086sd00005020* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 + +@@ -54695,6 +54773,9 @@ pci:v00008086d0000095Asv00008086sd00005090* + pci:v00008086d0000095Asv00008086sd00005110* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + ++pci:v00008086d0000095Asv00008086sd00005190* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ + pci:v00008086d0000095Asv00008086sd00005400* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +@@ -54707,24 +54788,30 @@ pci:v00008086d0000095Asv00008086sd00005420* + pci:v00008086d0000095Asv00008086sd00005490* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + ++pci:v00008086d0000095Asv00008086sd00005590* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 ++ + pci:v00008086d0000095Asv00008086sd00009010* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +-pci:v00008086d0000095Asv00008086sd00009210* ++pci:v00008086d0000095Asv00008086sd00009110* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +-pci:v00008086d0000095Asv00008086sd00009410* ++pci:v00008086d0000095Asv00008086sd00009210* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +-pci:v00008086d0000095B* +- ID_MODEL_FROM_DATABASE=Wireless 7265 ++pci:v00008086d0000095Asv00008086sd00009310* ++ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +-pci:v00008086d0000095Bsv00008086sd0000500A* ++pci:v00008086d0000095Asv00008086sd00009410* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + +-pci:v00008086d0000095Bsv00008086sd00005012* ++pci:v00008086d0000095Asv00008086sd00009510* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265 + ++pci:v00008086d0000095B* ++ ID_MODEL_FROM_DATABASE=Wireless 7265 ++ + pci:v00008086d0000095Bsv00008086sd00005200* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265 + +@@ -54860,6 +54947,9 @@ pci:v00008086d00000C01* + pci:v00008086d00000C04* + ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller + ++pci:v00008086d00000C04sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00000C05* + ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller + +@@ -54872,6 +54962,9 @@ pci:v00008086d00000C09* + pci:v00008086d00000C0C* + ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller + ++pci:v00008086d00000C0Csv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00000C46* + ID_MODEL_FROM_DATABASE=Atom Processor S1200 PCI Express Root Port 1 + +@@ -57986,6 +58079,9 @@ pci:v00008086d00001539* + pci:v00008086d0000153A* + ID_MODEL_FROM_DATABASE=Ethernet Connection I217-LM + ++pci:v00008086d0000153Asv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d0000153B* + ID_MODEL_FROM_DATABASE=Ethernet Connection I217-V + +@@ -69035,6 +69131,9 @@ pci:v00008086d00008C02* + pci:v00008086d00008C03* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] + ++pci:v00008086d00008C03sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C04* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode] + +@@ -69062,12 +69161,18 @@ pci:v00008086d00008C0F* + pci:v00008086d00008C10* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #1 + ++pci:v00008086d00008C10sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C11* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #1 + + pci:v00008086d00008C12* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #2 + ++pci:v00008086d00008C12sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C13* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #2 + +@@ -69110,12 +69215,18 @@ pci:v00008086d00008C1F* + pci:v00008086d00008C20* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset High Definition Audio Controller + ++pci:v00008086d00008C20sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C21* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset High Definition Audio Controller + + pci:v00008086d00008C22* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family SMBus Controller + ++pci:v00008086d00008C22sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C23* + ID_MODEL_FROM_DATABASE=8 Series Chipset Family CHAP Counters + +@@ -69125,12 +69236,21 @@ pci:v00008086d00008C24* + pci:v00008086d00008C26* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB EHCI #1 + ++pci:v00008086d00008C26sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C2D* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB EHCI #2 + ++pci:v00008086d00008C2Dsv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C31* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB xHCI + ++pci:v00008086d00008C31sv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C33* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family LAN Controller + +@@ -69140,6 +69260,9 @@ pci:v00008086d00008C34* + pci:v00008086d00008C3A* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family MEI Controller #1 + ++pci:v00008086d00008C3Asv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C3B* + ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family MEI Controller #2 + +@@ -69197,6 +69320,9 @@ pci:v00008086d00008C4E* + pci:v00008086d00008C4F* + ID_MODEL_FROM_DATABASE=QM87 Express LPC Controller + ++pci:v00008086d00008C4Fsv000017AAsd0000220E* ++ ID_MODEL_FROM_DATABASE=ThinkPad T440p ++ + pci:v00008086d00008C50* + ID_MODEL_FROM_DATABASE=B85 Express LPC Controller + +diff --git a/hwdb/20-usb-vendor-model.hwdb b/hwdb/20-usb-vendor-model.hwdb +index 6663820..60dbcd2 100644 +--- a/hwdb/20-usb-vendor-model.hwdb ++++ b/hwdb/20-usb-vendor-model.hwdb +@@ -46055,6 +46055,12 @@ usb:v1B5A* + usb:v1B65* + ID_VENDOR_FROM_DATABASE=The Hong Kong Standards and Testing Centre Ltd. + ++usb:v1B71* ++ ID_VENDOR_FROM_DATABASE=Fushicai ++ ++usb:v1B71p3002* ++ ID_MODEL_FROM_DATABASE=USBTV007 Video Grabber [EasyCAP] ++ + usb:v1B72* + ID_VENDOR_FROM_DATABASE=ATERGI TECHNOLOGY CO., LTD. + diff --git a/SOURCES/0177-journal-Add-missing-byte-order-conversions.patch b/SOURCES/0177-journal-Add-missing-byte-order-conversions.patch new file mode 100644 index 0000000..13f36ef --- /dev/null +++ b/SOURCES/0177-journal-Add-missing-byte-order-conversions.patch @@ -0,0 +1,58 @@ +From dcf643901f6aeeda806e19fa7cbb766ded3f3d44 Mon Sep 17 00:00:00 2001 +From: George McCollister +Date: Tue, 31 Dec 2013 14:37:32 -0600 +Subject: [PATCH] journal: Add missing byte order conversions + +Convert entry_array.items[0] to host byte order prior to passing it to +chain_cache_put(). + +[zj: also use le64toh in journal-verify.c] + +https://bugs.freedesktop.org/show_bug.cgi?id=73194 +--- + src/journal/journal-file.c | 4 ++-- + src/journal/journal-verify.c | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 9f04c58..748816a 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -1452,7 +1452,7 @@ static int generic_array_get( + + 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, i); ++ chain_cache_put(f->chain_cache, ci, first, a, le64toh(o->entry_array.items[0]), t, i); + + r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o); + if (r < 0) +@@ -1685,7 +1685,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, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i); ++ chain_cache_put(f->chain_cache, ci, first, a, le64toh(array->entry_array.items[0]), t, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i); + + if (subtract_one && i == 0) + p = last_p; +diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c +index 3405811..82b0f0a 100644 +--- a/src/journal/journal-verify.c ++++ b/src/journal/journal-verify.c +@@ -249,12 +249,12 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o + } + + for (i = 0; i < journal_file_entry_array_n_items(o); i++) +- if (o->entry_array.items[i] != 0 && +- !VALID64(o->entry_array.items[i])) { ++ if (le64toh(o->entry_array.items[i]) != 0 && ++ !VALID64(le64toh(o->entry_array.items[i]))) { + log_error(OFSfmt": invalid object entry array item (%"PRIu64"/%"PRIu64"): "OFSfmt, + offset, + i, journal_file_entry_array_n_items(o), +- o->entry_array.items[i]); ++ le64toh(o->entry_array.items[i])); + return -EBADMSG; + } + diff --git a/SOURCES/0178-hwdb-change-key-mappings-for-Samsung-90X3A.patch b/SOURCES/0178-hwdb-change-key-mappings-for-Samsung-90X3A.patch new file mode 100644 index 0000000..e7547c6 --- /dev/null +++ b/SOURCES/0178-hwdb-change-key-mappings-for-Samsung-90X3A.patch @@ -0,0 +1,39 @@ +From 3d7988d5f0db77f35581a5fb5786a84723d7ce6e Mon Sep 17 00:00:00 2001 +From: Raudi +Date: Mon, 6 Jan 2014 19:44:08 -0500 +Subject: [PATCH] hwdb: change key mappings for Samsung 90X3A + +The Key codes didn't match with the described key. Also the key +identifier strings were missing. I hope I chose appropriate ones. + +https://bugs.freedesktop.org/show_bug.cgi?id=70296 +--- + hwdb/60-keyboard.hwdb | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index ab9e569..644cb94 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -886,7 +886,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* + KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer + + # Series 9 +-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr* + KEYBOARD_KEY_ce=! # Fn+F8 keyboard backlight up + KEYBOARD_KEY_8d=! # Fn+F7 keyboard backlight down +@@ -894,6 +893,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr + KEYBOARD_KEY_97=! # Fn+F12 Wi-Fi toggle + KEYBOARD_KEY_d5=! # Fn+F6 battery life extender + ++keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr* ++ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings ++ KEYBOARD_KEY_8d=!prog3 # Fn+F6 performance mode ++ KEYBOARD_KEY_97=!kbdillumdown # Fn+F7 keyboard backlight down ++ KEYBOARD_KEY_96=!kbdillumup # Fn+F8 keyboard backlight up ++ KEYBOARD_KEY_d5=!wlan # Fn+F12 Wi-Fi toggle ++ + # SQ1US + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr* + KEYBOARD_KEY_d4=menu diff --git a/SOURCES/0179-hwdb-add-Samsung-700G.patch b/SOURCES/0179-hwdb-add-Samsung-700G.patch new file mode 100644 index 0000000..a8cf51a --- /dev/null +++ b/SOURCES/0179-hwdb-add-Samsung-700G.patch @@ -0,0 +1,22 @@ +From c28eaf0a17c230cdda898525a132109a50f82996 Mon Sep 17 00:00:00 2001 +From: Dmitry Pisklov +Date: Mon, 6 Jan 2014 20:06:59 -0500 +Subject: [PATCH] hwdb: add Samsung 700G + +https://bugs.freedesktop.org/show_bug.cgi?id=72311 +--- + hwdb/60-keyboard.hwdb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index 644cb94..ccfc734 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -875,6 +875,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr* + KEYBOARD_KEY_a9=! # Fn Lock - Function lock off + + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDG]*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr* + KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings diff --git a/SOURCES/0180-hwdb-remove-duplicate-entry-for-Samsung-700Z.patch b/SOURCES/0180-hwdb-remove-duplicate-entry-for-Samsung-700Z.patch new file mode 100644 index 0000000..c566805 --- /dev/null +++ b/SOURCES/0180-hwdb-remove-duplicate-entry-for-Samsung-700Z.patch @@ -0,0 +1,28 @@ +From 13e1c1cd5d95e077fe9e08ec6e80b3ac91e957f2 Mon Sep 17 00:00:00 2001 +From: Dmitry Pisklov +Date: Mon, 6 Jan 2014 20:08:21 -0500 +Subject: [PATCH] hwdb: remove duplicate entry for Samsung 700Z + +keyboardbrightnessup/down are not even real keys. + +https://bugs.freedesktop.org/show_bug.cgi?id=72311 +--- + hwdb/60-keyboard.hwdb | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index ccfc734..cf3d1fb 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -918,11 +918,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*SX20S*:pvr* + KEYBOARD_KEY_77=f22 # Touchpad on + KEYBOARD_KEY_79=f23 # Touchpad off + +-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* +- KEYBOARD_KEY_ba=ejectcd +- KEYBOARD_KEY_96=keyboardbrightnessup +- KEYBOARD_KEY_97=keyboardbrightnessdown +- + keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:pvr* + KEYBOARD_KEY_ad=leftmeta + diff --git a/SOURCES/0181-hwdb-fix-match-for-Thinkpad-X201-tablet.patch b/SOURCES/0181-hwdb-fix-match-for-Thinkpad-X201-tablet.patch new file mode 100644 index 0000000..0c30675 --- /dev/null +++ b/SOURCES/0181-hwdb-fix-match-for-Thinkpad-X201-tablet.patch @@ -0,0 +1,22 @@ +From ce340fda3e72602eac5165c33527f444eff78d18 Mon Sep 17 00:00:00 2001 +From: AppleBloom +Date: Mon, 6 Jan 2014 20:51:47 -0500 +Subject: [PATCH] hwdb: fix match for Thinkpad X201 tablet + +https://bugs.freedesktop.org/show_bug.cgi?id=71929 +--- + hwdb/60-keyboard.hwdb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index cf3d1fb..d253724 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -524,6 +524,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr* + + # Thinkpad X200_Tablet + keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X2*Tablet*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet* + KEYBOARD_KEY_5d=menu + KEYBOARD_KEY_63=fn + KEYBOARD_KEY_66=screenlock diff --git a/SOURCES/0182-keymap-Recognize-different-Toshiba-Satellite-capital.patch b/SOURCES/0182-keymap-Recognize-different-Toshiba-Satellite-capital.patch new file mode 100644 index 0000000..4f223e2 --- /dev/null +++ b/SOURCES/0182-keymap-Recognize-different-Toshiba-Satellite-capital.patch @@ -0,0 +1,26 @@ +From a3d80446f49c5b5e40522fc250b1df3356cb0cf1 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 7 Jan 2014 09:40:01 +0100 +Subject: [PATCH] keymap: Recognize different Toshiba Satellite capitalizations + +https://launchpad.net/bugs/665918 +--- + hwdb/60-keyboard.hwdb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index d253724..84a061f 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -1056,9 +1056,9 @@ keyboard:dmi:bvn*:bvr*:bd*:svnFOXCONN:pnQBOOK:* + keyboard:dmi:bvn*:bvr*:bd*:svnMTC:pn*:pvrA0:* + keyboard:dmi:bvn*:bvr*:bd*:svnMio*Technology:pnN890:* + keyboard:dmi:bvn*:bvr*:bd*:svnPEGATRON*CORP.:pnSpring*Peak:* +-keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU]30[05]*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU][35]0[05]*:pvr* ++keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU][35]0[05]*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*Pro*[uU]300*:pvr* +-keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU]500*:pvr* + keyboard:dmi:bvn*:bvr*:bd*:svnViooo*Corporation:pnPT17:* + keyboard:dmi:bvn*:bvr*:bd*:svnHANNspree:pnSN10E100:* + keyboard:dmi:bvn*:bvr*:bd*:svnGIGABYTE:pni1520M:* diff --git a/SOURCES/0183-sleep.c-fix-typo.patch b/SOURCES/0183-sleep.c-fix-typo.patch new file mode 100644 index 0000000..a37a28f --- /dev/null +++ b/SOURCES/0183-sleep.c-fix-typo.patch @@ -0,0 +1,22 @@ +From 5eaadd27a8c22c2a9e5c66c5cc69c9354eff036e Mon Sep 17 00:00:00 2001 +From: Michele Curti +Date: Tue, 7 Jan 2014 17:51:41 +0100 +Subject: [PATCH] sleep.c: fix typo + +--- + src/sleep/sleep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c +index f96987f..c228cb6 100644 +--- a/src/sleep/sleep.c ++++ b/src/sleep/sleep.c +@@ -90,7 +90,7 @@ static int execute(char **modes, char **states) { + const char* note = strappenda("SLEEP=", arg_verb); + + /* 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"); + if (!f) { + log_error("Failed to open /sys/power/state: %m"); diff --git a/SOURCES/0184-man-mention-which-variables-will-be-expanded-in-Exec.patch b/SOURCES/0184-man-mention-which-variables-will-be-expanded-in-Exec.patch new file mode 100644 index 0000000..622312d --- /dev/null +++ b/SOURCES/0184-man-mention-which-variables-will-be-expanded-in-Exec.patch @@ -0,0 +1,86 @@ +From b993c1cda2625b91562ada55f21da2310e9b436d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 9 Jan 2014 22:23:32 -0500 +Subject: [PATCH] man: mention which variables will be expanded in ExecStart + +Conflicts: + man/systemd.service.xml +--- + man/systemd.exec.xml | 6 ++++-- + man/systemd.service.xml | 35 +++++++++++++++++++++++------------ + 2 files changed, 27 insertions(+), 14 deletions(-) + +diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml +index f50161f..612b4d2 100644 +--- a/man/systemd.exec.xml ++++ b/man/systemd.exec.xml +@@ -295,9 +295,11 @@ + for the assignment. + + Example: +- Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6" ++ Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6" + gives three variables VAR1, +- VAR2, VAR3. ++ VAR2, VAR3 ++ with the values word1 word2, ++ word3, $word 5 6. + + + +diff --git a/man/systemd.service.xml b/man/systemd.service.xml +index af3e0f2..4fb21ba 100644 +--- a/man/systemd.service.xml ++++ b/man/systemd.service.xml +@@ -392,16 +392,32 @@ + replaced by the value of the + environment variable including all + whitespace it contains, resulting in a +- single argument. Use ++ single argument. Use + $FOO as a separate + word on the command line, in which + case it will be replaced by the value +- of the environment variable split up +- at whitespace, resulting in zero or +- more arguments. To pass literal dollar sign +- use $$. Note that the first +- argument (i.e. the program to execute) +- may not be a variable. ++ of the environment variable split at ++ whitespace, resulting in zero or more ++ arguments. To pass a literal dollar ++ sign, use $$. ++ Variables whose value is not known at ++ expansion time are treated as empty ++ strings. Note that the first argument ++ (i.e. the program to execute) may not ++ be a variable. ++ ++ Variables to be used in this ++ fashion may be defined through ++ Environment= and ++ EnvironmentFile=. ++ In addition, variables listed in ++ section "Environment variables in ++ spawned processes" in ++ systemd.exec5 ++ which are considered "static ++ configuration" may used (this includes ++ e.g. $USER, but not ++ $TERM). + + Optionally, if the absolute file + name is prefixed with +@@ -429,11 +445,6 @@ + ExecStart=/bin/sh -c 'dmesg | tac' + + +- Only select environment variables that +- are set for executed commands. See +- systemd.exec5. +- +- + Example: + ExecStart=/bin/echo one ; /bin/echo "two two" + diff --git a/SOURCES/0185-hwdb-Add-support-for-Toshiba-Satellite-P75-A7200-key.patch b/SOURCES/0185-hwdb-Add-support-for-Toshiba-Satellite-P75-A7200-key.patch new file mode 100644 index 0000000..0dc8aba --- /dev/null +++ b/SOURCES/0185-hwdb-Add-support-for-Toshiba-Satellite-P75-A7200-key.patch @@ -0,0 +1,28 @@ +From 6ccaa6a0b732ab324629c8b1c24a8e775f51da86 Mon Sep 17 00:00:00 2001 +From: Unai Uribarri +Date: Sat, 11 Jan 2014 09:19:41 -0500 +Subject: [PATCH] hwdb: Add support for Toshiba Satellite P75-A7200 keyboard + +--- + hwdb/60-keyboard.hwdb | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb +index 84a061f..e3d1f02 100644 +--- a/hwdb/60-keyboard.hwdb ++++ b/hwdb/60-keyboard.hwdb +@@ -1012,6 +1012,14 @@ keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEU940 + KEYBOARD_KEY_13e=switchvideomode + KEYBOARD_KEY_13f=f21 # Touchpad toggle + ++# Satellite P75-A7200 ++keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:pvr* ++ KEYBOARD_KEY_13c=brightnessdown ++ KEYBOARD_KEY_13d=brightnessup ++ KEYBOARD_KEY_13e=switchvideomode ++ KEYBOARD_KEY_13f=touchpad_toggle ++ KEYBOARD_KEY_9e=wlan ++ + ########################################################### + # VIA + ########################################################### diff --git a/SOURCES/0186-journal-fix-access-to-munmapped-memory-in-sd_journal.patch b/SOURCES/0186-journal-fix-access-to-munmapped-memory-in-sd_journal.patch new file mode 100644 index 0000000..37d6d58 --- /dev/null +++ b/SOURCES/0186-journal-fix-access-to-munmapped-memory-in-sd_journal.patch @@ -0,0 +1,320 @@ +From 035c9e559064114e3f7ba19b593a97c4a4d4f060 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 28 Dec 2013 19:33:23 -0500 +Subject: [PATCH] journal: fix access to munmapped memory in + sd_journal_enumerate_unique + +sd_j_e_u needs to keep a reference to an object while comparing it +with possibly duplicate objects in other files. Because the size of +mmap cache is limited, with enough files and object to compare to, +at some point the object being compared would be munmapped, resulting +in a segmentation fault. + +Fix this issue by turning keep_always into a reference count that can +be increased and decreased. Other callers which set keep_always=true +are unmodified: their references are never released but are ignored +when the whole file is closed, which happens at some point. keep_always +is increased in sd_j_e_u and later on released. +--- + src/journal/journal-file.c | 5 +--- + src/journal/journal-file.h | 24 +++++++++++++++++++ + src/journal/journal-verify.c | 4 ---- + src/journal/mmap-cache.c | 57 +++++++++++++++++++++++++++++++++++--------- + src/journal/mmap-cache.h | 18 +++++++++++++- + src/journal/sd-journal.c | 18 +++++++++++--- + 6 files changed, 103 insertions(+), 23 deletions(-) + +diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c +index 748816a..9dbd674 100644 +--- a/src/journal/journal-file.c ++++ b/src/journal/journal-file.c +@@ -419,7 +419,6 @@ int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Objec + void *t; + Object *o; + uint64_t s; +- unsigned context; + + assert(f); + assert(ret); +@@ -428,10 +427,8 @@ int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Objec + if (!VALID64(offset)) + return -EFAULT; + +- /* One context for each type, plus one catch-all for the rest */ +- context = type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; + +- r = journal_file_move_to(f, context, false, offset, sizeof(ObjectHeader), &t); ++ r = journal_file_move_to(f, type_to_context(type), false, offset, sizeof(ObjectHeader), &t); + if (r < 0) + return r; + +diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h +index 5cc2c2d..376c3d4 100644 +--- a/src/journal/journal-file.h ++++ b/src/journal/journal-file.h +@@ -128,6 +128,10 @@ int journal_file_open_reliably( + #define ALIGN64(x) (((x) + 7ULL) & ~7ULL) + #define VALID64(x) (((x) & 7ULL) == 0ULL) + ++/* Use six characters to cover the offsets common in smallish journal ++ * files without adding too many zeros. */ ++#define OFSfmt "%06"PRIx64 ++ + static inline bool VALID_REALTIME(uint64_t u) { + /* This considers timestamps until the year 3112 valid. That should be plenty room... */ + return u > 0 && u < (1ULL << 55); +@@ -197,3 +201,23 @@ int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, usec_t * + int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to); + + bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec); ++ ++ ++static unsigned type_to_context(int type) { ++ /* One context for each type, plus one catch-all for the rest */ ++ return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; ++} ++ ++static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) { ++ unsigned context = type_to_context(o->object.type); ++ ++ return mmap_cache_get(f->mmap, f->fd, f->prot, context, true, ++ offset, o->object.size, &f->last_stat, NULL); ++} ++ ++static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) { ++ unsigned context = type_to_context(o->object.type); ++ ++ return mmap_cache_release(f->mmap, f->fd, f->prot, context, ++ offset, o->object.size); ++} +diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c +index 82b0f0a..f2422ff 100644 +--- a/src/journal/journal-verify.c ++++ b/src/journal/journal-verify.c +@@ -34,10 +34,6 @@ + #include "compress.h" + #include "fsprg.h" + +-/* Use six characters to cover the offsets common in smallish journal +- * files without adding to many zeros. */ +-#define OFSfmt "%06"PRIx64 +- + static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o) { + uint64_t i; + +diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c +index 03b57be..cfb26da 100644 +--- a/src/journal/mmap-cache.c ++++ b/src/journal/mmap-cache.c +@@ -38,7 +38,7 @@ typedef struct FileDescriptor FileDescriptor; + struct Window { + MMapCache *cache; + +- bool keep_always; ++ unsigned keep_always; + bool in_unused; + + int prot; +@@ -182,7 +182,7 @@ static void context_detach_window(Context *c) { + c->window = NULL; + LIST_REMOVE(Context, by_window, w->contexts, c); + +- if (!w->contexts && !w->keep_always) { ++ if (!w->contexts && w->keep_always == 0) { + /* Not used anymore? */ + LIST_PREPEND(Window, unused, c->cache->unused, w); + if (!c->cache->last_unused) +@@ -357,7 +357,6 @@ static int try_context( + assert(m->n_ref > 0); + assert(fd >= 0); + assert(size > 0); +- assert(ret); + + c = hashmap_get(m->contexts, UINT_TO_PTR(context+1)); + if (!c) +@@ -375,9 +374,10 @@ static int try_context( + return 0; + } + +- c->window->keep_always = c->window->keep_always || keep_always; ++ c->window->keep_always += keep_always; + +- *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset); ++ if (ret) ++ *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset); + return 1; + } + +@@ -399,7 +399,6 @@ static int find_mmap( + assert(m->n_ref > 0); + assert(fd >= 0); + assert(size > 0); +- assert(ret); + + f = hashmap_get(m->fds, INT_TO_PTR(fd + 1)); + if (!f) +@@ -419,9 +418,10 @@ static int find_mmap( + return -ENOMEM; + + context_attach_window(c, w); +- w->keep_always = w->keep_always || keep_always; ++ w->keep_always += keep_always; + +- *ret = (uint8_t*) w->ptr + (offset - w->offset); ++ if (ret) ++ *ret = (uint8_t*) w->ptr + (offset - w->offset); + return 1; + } + +@@ -447,7 +447,6 @@ static int add_mmap( + assert(m->n_ref > 0); + assert(fd >= 0); + assert(size > 0); +- assert(ret); + + woffset = offset & ~((uint64_t) page_size() - 1ULL); + wsize = size + (offset - woffset); +@@ -517,7 +516,8 @@ static int add_mmap( + c->window = w; + LIST_PREPEND(Context, by_window, w->contexts, c); + +- *ret = (uint8_t*) w->ptr + (offset - w->offset); ++ if (ret) ++ *ret = (uint8_t*) w->ptr + (offset - w->offset); + return 1; + } + +@@ -538,7 +538,6 @@ int mmap_cache_get( + assert(m->n_ref > 0); + assert(fd >= 0); + assert(size > 0); +- assert(ret); + + /* Check whether the current context is the right one already */ + r = try_context(m, fd, prot, context, keep_always, offset, size, ret); +@@ -554,6 +553,42 @@ int mmap_cache_get( + return add_mmap(m, fd, prot, context, keep_always, offset, size, st, ret); + } + ++int mmap_cache_release( ++ MMapCache *m, ++ int fd, ++ int prot, ++ unsigned context, ++ uint64_t offset, ++ size_t size) { ++ ++ FileDescriptor *f; ++ Window *w; ++ ++ assert(m); ++ assert(m->n_ref > 0); ++ assert(fd >= 0); ++ assert(size > 0); ++ ++ f = hashmap_get(m->fds, INT_TO_PTR(fd + 1)); ++ if (!f) ++ return -EBADF; ++ ++ assert(f->fd == fd); ++ ++ LIST_FOREACH(by_fd, w, f->windows) ++ if (window_matches(w, fd, prot, offset, size)) ++ break; ++ ++ if (!w) ++ return -ENOENT; ++ ++ if (w->keep_always == 0) ++ return -ENOLCK; ++ ++ w->keep_always -= 1; ++ return 0; ++} ++ + void mmap_cache_close_fd(MMapCache *m, int fd) { + FileDescriptor *f; + +diff --git a/src/journal/mmap-cache.h b/src/journal/mmap-cache.h +index 0c42fb8..e5e3b38 100644 +--- a/src/journal/mmap-cache.h ++++ b/src/journal/mmap-cache.h +@@ -31,6 +31,22 @@ MMapCache* mmap_cache_new(void); + MMapCache* mmap_cache_ref(MMapCache *m); + MMapCache* mmap_cache_unref(MMapCache *m); + +-int mmap_cache_get(MMapCache *m, int fd, int prot, unsigned context, bool keep_always, uint64_t offset, size_t size, struct stat *st, void **ret); ++int mmap_cache_get( ++ MMapCache *m, ++ int fd, ++ int prot, ++ unsigned context, ++ bool keep_always, ++ uint64_t offset, ++ size_t size, ++ struct stat *st, ++ void **ret); ++int mmap_cache_release( ++ MMapCache *m, ++ int fd, ++ int prot, ++ unsigned context, ++ uint64_t offset, ++ size_t size); + void mmap_cache_close_fd(MMapCache *m, int fd); + void mmap_cache_close_context(MMapCache *m, unsigned context); +diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c +index 9676f0f..67a77e6 100644 +--- a/src/journal/sd-journal.c ++++ b/src/journal/sd-journal.c +@@ -2506,9 +2506,7 @@ _public_ int sd_journal_query_unique(sd_journal *j, const char *field) { + } + + _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l) { +- Object *o; + size_t k; +- int r; + + if (!j) + return -EINVAL; +@@ -2533,9 +2531,11 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_ + for (;;) { + JournalFile *of; + Iterator i; ++ Object *o; + const void *odata; + size_t ol; + bool found; ++ int r; + + /* Proceed to next data object in the field's linked list */ + if (j->unique_offset == 0) { +@@ -2572,8 +2572,16 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_ + return r; + + /* Let's do the type check by hand, since we used 0 context above. */ +- if (o->object.type != OBJECT_DATA) ++ if (o->object.type != OBJECT_DATA) { ++ log_error("%s:offset " OFSfmt ": object has type %d, expected %d", ++ j->unique_file->path, j->unique_offset, ++ o->object.type, OBJECT_DATA); + return -EBADMSG; ++ } ++ ++ r = journal_file_object_keep(j->unique_file, o, j->unique_offset); ++ if (r < 0) ++ return r; + + r = return_data(j, j->unique_file, o, &odata, &ol); + if (r < 0) +@@ -2607,6 +2615,10 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_ + if (found) + continue; + ++ r = journal_file_object_release(j->unique_file, o, j->unique_offset); ++ if (r < 0) ++ return r; ++ + r = return_data(j, j->unique_file, o, data, l); + if (r < 0) + return r; diff --git a/SOURCES/0187-gpt-auto-generator-skip-nonexistent-devices.patch b/SOURCES/0187-gpt-auto-generator-skip-nonexistent-devices.patch new file mode 100644 index 0000000..4b7115f --- /dev/null +++ b/SOURCES/0187-gpt-auto-generator-skip-nonexistent-devices.patch @@ -0,0 +1,32 @@ +From 7f3f1b3f979a96182b2eb44eeea86993506108d5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= +Date: Tue, 7 Jan 2014 15:00:22 +0100 +Subject: [PATCH] gpt-auto-generator: skip nonexistent devices + +The devices we work with have eMMC chips for storage. The chips +provide four "hardware" partitions. The first is /dev/mmcblk0, it +takes almost whole space and holds a GPT with several real partitions +(/dev/mmcblk0p?). Then there are three block devices (mmcblk0boot0, +mmcblk0boot1, rpmb) that are part of the same hardware as mmcblk0 that +are presented by the kernel as children of the latter. That relationship +makes gpt-auto-generator try to peek them but since they are not GPT +partitions blkid_do_safeprobe() returns -2 making verify_gpt_parition() +function return -ENODEV. +--- + src/gpt-auto-generator/gpt-auto-generator.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c +index d2b4213..1f09aed 100644 +--- a/src/gpt-auto-generator/gpt-auto-generator.c ++++ b/src/gpt-auto-generator/gpt-auto-generator.c +@@ -306,6 +306,9 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) { + + r = verify_gpt_partition(node, &type_id, &nr, &fstype); + if (r < 0) { ++ /* skip child devices which are not detected properly */ ++ if (r == -ENODEV) ++ continue; + log_error("Failed to verify GPT partition %s: %s", + node, strerror(-r)); + udev_device_unref(q); diff --git a/SOURCES/0188-gpt-auto-generator-use-EBADSLT-code-when-unable-to-d.patch b/SOURCES/0188-gpt-auto-generator-use-EBADSLT-code-when-unable-to-d.patch new file mode 100644 index 0000000..3b194f3 --- /dev/null +++ b/SOURCES/0188-gpt-auto-generator-use-EBADSLT-code-when-unable-to-d.patch @@ -0,0 +1,38 @@ +From 59250a9f6ac82b91cae43ae6a022298df1a67ee1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 11 Jan 2014 16:45:29 -0500 +Subject: [PATCH] gpt-auto-generator: use EBADSLT code when unable to detect + partition type + +ENODEV suggests that something is missing, which is be misleading +here. +--- + src/gpt-auto-generator/gpt-auto-generator.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c +index 1f09aed..f1749be 100644 +--- a/src/gpt-auto-generator/gpt-auto-generator.c ++++ b/src/gpt-auto-generator/gpt-auto-generator.c +@@ -73,10 +73,8 @@ static int verify_gpt_partition(const char *node, sd_id128_t *type, unsigned *nr + + errno = 0; + r = blkid_do_safeprobe(b); +- if (r == -2) +- return -ENODEV; +- else if (r == 1) +- return -ENODEV; ++ if (r == -2 || r == 1) /* no result or uncertain */ ++ return -EBADSLT; + else if (r != 0) + return errno ? -errno : -EIO; + +@@ -307,7 +305,7 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) { + r = verify_gpt_partition(node, &type_id, &nr, &fstype); + if (r < 0) { + /* skip child devices which are not detected properly */ +- if (r == -ENODEV) ++ if (r == -EBADSLT) + continue; + log_error("Failed to verify GPT partition %s: %s", + node, strerror(-r)); diff --git a/SOURCES/0189-nspawn-explicitly-terminate-machines-when-we-exit-ns.patch b/SOURCES/0189-nspawn-explicitly-terminate-machines-when-we-exit-ns.patch new file mode 100644 index 0000000..b3eb736 --- /dev/null +++ b/SOURCES/0189-nspawn-explicitly-terminate-machines-when-we-exit-ns.patch @@ -0,0 +1,123 @@ +From 5a69011a7d265ec42562fdfdb99d886570a49d7a Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 6 Nov 2013 02:05:06 +0100 +Subject: [PATCH] nspawn: explicitly terminate machines when we exit nspawn + +https://bugs.freedesktop.org/show_bug.cgi?id=68370 +https://bugzilla.redhat.com/show_bug.cgi?id=988883 + +Conflicts: + src/nspawn/nspawn.c + +Conflicts: + src/nspawn/nspawn.c +--- + src/nspawn/nspawn.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 64 insertions(+), 4 deletions(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 4bc49a3..f326f99 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -43,9 +43,9 @@ + #include + #include + +-#include +-#include +- ++#include "sd-daemon.h" ++#include "sd-bus.h" ++#include "sd-id128.h" + #include "log.h" + #include "util.h" + #include "mkdir.h" +@@ -56,13 +56,13 @@ + #include "strv.h" + #include "path-util.h" + #include "loopback-setup.h" +-#include "sd-id128.h" + #include "dev-setup.h" + #include "fdset.h" + #include "build.h" + #include "fileio.h" + #include "bus-internal.h" + #include "bus-message.h" ++#include "bus-error.h" + + #ifndef TTY_GID + #define TTY_GID 5 +@@ -1229,6 +1229,60 @@ static int register_machine(void) { + return 0; + } + ++static int terminate_machine(pid_t pid) { ++ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; ++ _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; ++ _cleanup_bus_unref_ sd_bus *bus = NULL; ++ const char *path; ++ int r; ++ ++ r = sd_bus_open_system(&bus); ++ if (r < 0) { ++ log_error("Failed to open system bus: %s", strerror(-r)); ++ return r; ++ } ++ ++ r = sd_bus_call_method( ++ bus, ++ "org.freedesktop.machine1", ++ "/org/freedesktop/machine1", ++ "org.freedesktop.machine1.Manager", ++ "GetMachineByPID", ++ &error, ++ &reply, ++ "u", ++ (uint32_t) pid); ++ if (r < 0) { ++ /* Note that the machine might already have been ++ * cleaned up automatically, hence don't consider it a ++ * failure if we cannot get the machine object. */ ++ log_debug("Failed to get machine: %s", bus_error_message(&error, r)); ++ return 0; ++ } ++ ++ r = sd_bus_message_read(reply, "o", &path); ++ if (r < 0) { ++ log_error("Failed to parse GetMachineByPID() reply: %s", bus_error_message(&error, r)); ++ return r; ++ } ++ ++ r = sd_bus_call_method( ++ bus, ++ "org.freedesktop.machine1", ++ path, ++ "org.freedesktop.machine1.Machine", ++ "Terminate", ++ &error, ++ NULL, ++ NULL); ++ if (r < 0) { ++ log_debug("Failed to terminate machine: %s", bus_error_message(&error, r)); ++ return 0; ++ } ++ ++ return 0; ++} ++ + static bool audit_enabled(void) { + int fd; + +@@ -1704,6 +1758,12 @@ int main(int argc, char *argv[]) { + if (saved_attr_valid) + tcsetattr(STDIN_FILENO, TCSANOW, &saved_attr); + ++ /* Kill if it is not dead yet anyway */ ++ terminate_machine(pid); ++ ++ /* Redundant, but better safe than sorry */ ++ kill(pid, SIGKILL); ++ + k = wait_for_terminate(pid, &status); + if (k < 0) { + r = EXIT_FAILURE; diff --git a/SOURCES/0190-bash-completion-journalctl-file.patch b/SOURCES/0190-bash-completion-journalctl-file.patch new file mode 100644 index 0000000..2da6b7c --- /dev/null +++ b/SOURCES/0190-bash-completion-journalctl-file.patch @@ -0,0 +1,35 @@ +From 30b346ca4f331934ce49a1199137778562ff38d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 15 Nov 2013 19:00:01 -0500 +Subject: [PATCH] bash-completion: journalctl --file + +Conflicts: + shell-completion/bash/journalctl +--- + shell-completion/bash/journalctl | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl +index 3c40d57..441b636 100644 +--- a/shell-completion/bash/journalctl ++++ b/shell-completion/bash/journalctl +@@ -43,7 +43,7 @@ _journalctl() { + -h --help -l --local --new-id128 -m --merge --no-pager + --no-tail -q --quiet --setup-keys --this-boot --verify + --version --list-catalog --update-catalog' +- [ARG]='-b --boot --this-boot -D --directory -F --field ++ [ARG]='-b --boot --this-boot -D --directory --file -F --field + -o --output -u --unit --user-unit' + [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until + --verify-key' +@@ -58,6 +58,10 @@ _journalctl() { + comps=$(compgen -d -- "$cur") + compopt -o filenames + ;; ++ --file) ++ comps=$(compgen -f -- "$cur") ++ compopt -o filenames ++ ;; + --output|-o) + comps='short short-monotonic verbose export json cat' + ;; diff --git a/SOURCES/0191-journalctl-zsh-completion-fix-several-issues-in-help.patch b/SOURCES/0191-journalctl-zsh-completion-fix-several-issues-in-help.patch new file mode 100644 index 0000000..24cc9fe --- /dev/null +++ b/SOURCES/0191-journalctl-zsh-completion-fix-several-issues-in-help.patch @@ -0,0 +1,135 @@ +From d7e71959bf4e186404e112e0c5c5c1ecdbe2056c Mon Sep 17 00:00:00 2001 +From: "Jason St. John" +Date: Tue, 17 Dec 2013 21:36:27 -0500 +Subject: [PATCH] journalctl,zsh-completion: fix several issues in --help + message text + +-- fix grammar and reword some descriptions for clarity +-- add a useful description of what --follow does +-- fix the description for --after-cursor +-- properly introduce the FSS acronym for "Forward Secure Sealing" in +both sections +-- clarify the --disk-usage command + +[zj: perform similar changes to zsh completions] + +squash! journalctl: fix several issues in --help message text + +Conflicts: + src/journal/journalctl.c + +Conflicts: + shell-completion/zsh/_journalctl + src/journal/journalctl.c +--- + shell-completion/zsh/_journalctl | 14 +++++++------- + src/journal/journalctl.c | 34 +++++++++++++++++----------------- + 2 files changed, 24 insertions(+), 24 deletions(-) + +diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl +index 73646b5..57f9452 100644 +--- a/shell-completion/zsh/_journalctl ++++ b/shell-completion/zsh/_journalctl +@@ -70,14 +70,14 @@ _arguments -s \ + {-q,--quiet}"[Don't show privilege warning]" \ + {-m,--merge}'[Show entries from all available journals]' \ + {-b+,--boot=}'[Show data only from the specified boot or offset]:boot id or offset:_journal_boots' \ +- {-k,--dmesg}'[Show only kernel messages, Implies -b]' \ ++ {-k,--dmesg}'[Show only kernel messages from the current boot]' \ + {-u+,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ + '--user-unit=[Show data only from the specified user session unit]:units:_journal_fields USER_UNIT' \ + {-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \ +- {-c+,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \ +- '--after-cursor=[Start showing entries from the location in the journal after the cursor]:cursors:_journal_fields __CURSORS' \ +- '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ +- '--until=[Stop showing entries older or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ ++ {-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journal_fields __CURSORS' \ ++ '--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journal_fields __CURSORS' \ ++ '--since=[Start showing entries on or newer than the specified date]:YYYY-MM-DD HH\:MM\:SS' \ ++ '--until=[Stop showing entries on or older than the specified date]:YYYY-MM-DD HH\:MM\:SS' \ + {-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \ + '--system[Show system and kernel messages]' \ + '--user[Show messages from user services]' \ +@@ -90,8 +90,8 @@ _arguments -s \ + '--list-catalog[List messages in catalog]' \ + '--dump-catalog[Dump messages in catalog]' \ + '--update-catalog[Update binary catalog database]' \ +- '--setup-keys[Generate new FSS key pair]' \ +- '--force[Force recreation of FSS keys]' \ ++ '--setup-keys[Generate a new FSS key pair]' \ ++ '--force[Force recreation of the FSS keys]' \ + '--interval=[Time interval for changing the FSS sealing key]:time interval' \ + '--verify[Verify journal file consistency]' \ + '--verify-key=[Specify FSS verification key]:FSS key' \ +diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c +index 0876ee6..54e3ddd 100644 +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -118,29 +118,29 @@ static int help(void) { + "Query the journal.\n\n" + "Flags:\n" + " --system Show only the system journal\n" +- " --user Show only the user journal for current user\n" +- " --since=DATE Start showing entries newer or of the specified date\n" +- " --until=DATE Stop showing entries older or of the specified date\n" +- " -c --cursor=CURSOR Start showing entries from specified cursor\n" +- " --after-cursor=CURSOR Start showing entries from specified cursor\n" ++ " --user Show only the user journal for the current user\n" ++ " --since=DATE Start showing entries on or newer than the specified date\n" ++ " --until=DATE Stop showing entries on or older than the specified date\n" ++ " -c --cursor=CURSOR Start showing entries from the specified cursor\n" ++ " --after-cursor=CURSOR Start showing entries from after the specified cursor\n" + " --show-cursor Print the cursor after all the entries\n" +- " -b --boot[=ID] Show data only from ID or current boot if unspecified\n" +- " -k --dmesg Show kernel message log from current boot\n" ++ " -b --boot[=ID] Show data only from ID or, if unspecified, the current boot\n" ++ " -k --dmesg Show kernel message log from the current boot\n" + " -u --unit=UNIT Show data only from the specified unit\n" + " --user-unit=UNIT Show data only from the specified user session unit\n" + " -p --priority=RANGE Show only messages within the specified priority range\n" + " -e --pager-end Immediately jump to end of the journal in the pager\n" +- " -f --follow Follow journal\n" ++ " -f --follow Follow the journal\n" + " -n --lines[=INTEGER] Number of journal entries to show\n" + " --no-tail Show all lines, even in follow mode\n" + " -r --reverse Show the newest entries first\n" + " -o --output=STRING Change journal output mode (short, short-iso,\n" +- " short-precise, short-monotonic, verbose,\n" +- " export, json, json-pretty, json-sse, cat)\n" ++ " short-precise, short-monotonic, verbose,\n" ++ " export, json, json-pretty, json-sse, cat)\n" + " -x --catalog Add message explanations where available\n" + " -l --full Do not ellipsize fields\n" + " -a --all Show all fields, including long and unprintable\n" +- " -q --quiet Don't show privilege warning\n" ++ " -q --quiet Do not show privilege warning\n" + " --no-pager Do not pipe output into a pager\n" + " -m --merge Show entries from all available journals\n" + " -D --directory=PATH Show journal files from directory\n" +@@ -149,20 +149,20 @@ static int help(void) { + #ifdef HAVE_GCRYPT + " --interval=TIME Time interval for changing the FSS sealing key\n" + " --verify-key=KEY Specify FSS verification key\n" +- " --force Force overriding new FSS key pair with --setup-keys\n" ++ " --force Force overriding of the FSS key pair with --setup-keys\n" + #endif + "\nCommands:\n" +- " -h --help Show this help\n" ++ " -h --help Show this help text\n" + " --version Show package version\n" +- " --new-id128 Generate a new 128 Bit ID\n" ++ " --new-id128 Generate a new 128-bit ID\n" + " --header Show journal header information\n" +- " --disk-usage Show total disk usage\n" +- " -F --field=FIELD List all values a certain field takes\n" ++ " --disk-usage Show total disk usage of all journal files\n" ++ " -F --field=FIELD List all values that a specified field takes\n" + " --list-catalog Show message IDs of all entries in the message catalog\n" + " --dump-catalog Show entries in the message catalog\n" + " --update-catalog Update the message catalog database\n" + #ifdef HAVE_GCRYPT +- " --setup-keys Generate new FSS key pair\n" ++ " --setup-keys Generate a new FSS key pair\n" + " --verify Verify journal file consistency\n" + #endif + , program_invocation_short_name); diff --git a/SOURCES/0192-cgroup-run-PID-1-in-the-root-cgroup.patch b/SOURCES/0192-cgroup-run-PID-1-in-the-root-cgroup.patch new file mode 100644 index 0000000..38a14e5 --- /dev/null +++ b/SOURCES/0192-cgroup-run-PID-1-in-the-root-cgroup.patch @@ -0,0 +1,61 @@ +From c46be83563a2d20a480988dab55404f941b9cc35 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 5 Nov 2013 22:14:52 +0100 +Subject: [PATCH] cgroup: run PID 1 in the root cgroup + +This way cleaning up the cgroup tree on shutdown is a lot easier since +we are in the root dir. Also PID 1 was previously artificially placed in +system.slice, even though our rule actually was not to have processes in +slices. The root slice otoh is magic anyway, so having PID 1 in there +sounds less surprising. + +Of course, this means that PID is scheduled against the three top-level +slices. +--- + src/core/cgroup.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/core/cgroup.c b/src/core/cgroup.c +index b60707c..32e2599 100644 +--- a/src/core/cgroup.c ++++ b/src/core/cgroup.c +@@ -591,8 +591,8 @@ pid_t unit_search_main_pid(Unit *u) { + + int manager_setup_cgroup(Manager *m) { + _cleanup_free_ char *path = NULL; ++ char *e; + int r; +- char *e, *a; + + assert(m); + +@@ -612,9 +612,13 @@ int manager_setup_cgroup(Manager *m) { + return r; + } + +- /* Already in /system.slice? If so, let's cut this off again */ ++ /* LEGACY: Already in /system.slice? If so, let's cut this ++ * off. This is to support live upgrades from older systemd ++ * versions where PID 1 was moved there. */ + if (m->running_as == SYSTEMD_SYSTEM) { + e = endswith(m->cgroup_root, "/" SPECIAL_SYSTEM_SLICE); ++ if (!e) ++ e = endswith(m->cgroup_root, "/system"); + if (e) + *e = 0; + } +@@ -645,12 +649,8 @@ int manager_setup_cgroup(Manager *m) { + log_debug("Release agent already installed."); + } + +- /* 4. Realize the system slice and put us in there */ +- if (m->running_as == SYSTEMD_SYSTEM) { +- a = strappenda(m->cgroup_root, "/" SPECIAL_SYSTEM_SLICE); +- r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, a, 0); +- } else +- r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, 0); ++ /* 4. Make sure we are in the root cgroup */ ++ r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, 0); + if (r < 0) { + log_error("Failed to create root cgroup hierarchy: %s", strerror(-r)); + return r; diff --git a/SOURCES/0193-pam-retrieve-value-of-debug-param-first.patch b/SOURCES/0193-pam-retrieve-value-of-debug-param-first.patch new file mode 100644 index 0000000..5d6a2f1 --- /dev/null +++ b/SOURCES/0193-pam-retrieve-value-of-debug-param-first.patch @@ -0,0 +1,36 @@ +From c9f24bd31d2b980718ecdc55ab33f5baa35ec4a2 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Feb 2014 13:47:38 +0100 +Subject: [PATCH] pam: retrieve value of debug param first + +We are setting debug to false by default, so we should should first retrieve +value of debug parameter and then log only if debug was set. Now we don't take +the value passed to us into the count. +--- + src/login/pam-module.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/login/pam-module.c b/src/login/pam-module.c +index 973daf7..878a704 100644 +--- a/src/login/pam-module.c ++++ b/src/login/pam-module.c +@@ -199,9 +199,6 @@ _public_ PAM_EXTERN int pam_sm_open_session( + + dbus_error_init(&error); + +- if (debug) +- pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); +- + /* Make this a NOP on non-logind systems */ + if (!logind_running()) + return PAM_SUCCESS; +@@ -214,6 +211,9 @@ _public_ PAM_EXTERN int pam_sm_open_session( + 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; diff --git a/SOURCES/0194-utils-silence-the-compiler-warning.patch b/SOURCES/0194-utils-silence-the-compiler-warning.patch new file mode 100644 index 0000000..7c644e0 --- /dev/null +++ b/SOURCES/0194-utils-silence-the-compiler-warning.patch @@ -0,0 +1,22 @@ +From 34c5f9d3b7020312310de1ea9b6446c51b911cb3 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Feb 2014 15:41:47 +0100 +Subject: [PATCH] utils: silence the compiler warning + +--- + 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 e9b8255..2086847 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -427,7 +427,7 @@ char *split_quoted(const char *c, size_t *l, char **state) { + *state = (char*) e; + } + +- return current; ++ return (char *) current; + } + + int get_parent_of_pid(pid_t pid, pid_t *_ppid) { diff --git a/SOURCES/0195-s390-getty-generator-initialize-essential-system-ter.patch b/SOURCES/0195-s390-getty-generator-initialize-essential-system-ter.patch new file mode 100644 index 0000000..ce31e20 --- /dev/null +++ b/SOURCES/0195-s390-getty-generator-initialize-essential-system-ter.patch @@ -0,0 +1,58 @@ +From d87f3874bac62d012ff5e573c2b803b3244a02da Mon Sep 17 00:00:00 2001 +From: Hendrik Brueckner +Date: Fri, 31 Jan 2014 17:08:37 +0100 +Subject: [PATCH] s390/getty-generator: initialize essential system + terminals/consoles + +Ensure to start getty programs on all essential system consoles on Linux on +System z. Add these essential devices to the list of virtualization_consoles +to always generate getty configurations. + +For the sake of completion, the list of essential consoles is: + + /dev/sclp_line0 - Operating system messages applet (LPAR) + /dev/ttysclp0 - Integrated ASCII console applet (z/VM and LPAR) + /dev/ttyS0 - Already handled by systemd (3215 console on z/VM) + /dev/hvc0 - Already handled by systemd (IUCV HVC terminal on z/VM) + +Depending on the environment, z/VM or LPAR, only a subset of these terminals +are available. + +See also RH BZ 860158[1] "Cannot login via Operating System Console into RHEL7 +instance installed on a LPAR". This bugzilla actually blocks the installation +of Linux on System z instances in LPAR mode. + +[1] https://bugzilla.redhat.com/show_bug.cgi?id=860158 +--- + rules/99-systemd.rules.in | 2 +- + src/getty-generator/getty-generator.c | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index 307f18f..0e0a567 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -7,7 +7,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" + + KERNEL=="vport*", TAG+="systemd" + +diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c +index 6c93806..40374b5 100644 +--- a/src/getty-generator/getty-generator.c ++++ b/src/getty-generator/getty-generator.c +@@ -91,7 +91,9 @@ int main(int argc, char *argv[]) { + static const char virtualization_consoles[] = + "hvc0\0" + "xvc0\0" +- "hvsi0\0"; ++ "hvsi0\0" ++ "sclp_line0\0" ++ "ttysclp0\0"; + + int r = EXIT_SUCCESS; + char *active; diff --git a/SOURCES/0196-pam-use-correct-log-level.patch b/SOURCES/0196-pam-use-correct-log-level.patch new file mode 100644 index 0000000..fb6ba86 --- /dev/null +++ b/SOURCES/0196-pam-use-correct-log-level.patch @@ -0,0 +1,22 @@ +From e4478da5da5d3cfa56cf88e8d8ef598245e96535 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Feb 2014 16:53:05 +0100 +Subject: [PATCH] pam: use correct log level + +--- + src/login/pam-module.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/pam-module.c b/src/login/pam-module.c +index 878a704..02f1618 100644 +--- a/src/login/pam-module.c ++++ b/src/login/pam-module.c +@@ -212,7 +212,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( + } + + if (debug) +- pam_syslog(handle, LOG_INFO, "pam-systemd initializing"); ++ pam_syslog(handle, LOG_DEBUG, "pam-systemd initializing"); + + r = get_user_data(handle, &username, &pw); + if (r != PAM_SUCCESS) diff --git a/SOURCES/0197-pam-do-not-set-XDG_RUNTIME_DIR-unconditionally.patch b/SOURCES/0197-pam-do-not-set-XDG_RUNTIME_DIR-unconditionally.patch new file mode 100644 index 0000000..0e128e9 --- /dev/null +++ b/SOURCES/0197-pam-do-not-set-XDG_RUNTIME_DIR-unconditionally.patch @@ -0,0 +1,159 @@ +From 281100560056e06f69d2cdb4dcc854bd3717734f Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Feb 2014 17:41:32 +0100 +Subject: [PATCH] pam: do not set XDG_RUNTIME_DIR unconditionally + +If the session's original user is not the same as the newly logged in one we +will not set XDG_RUNTIME_DIR. + +Patch based on upstream commit baae0358f349870544884e405e82e4be7d8add9f +--- + src/login/logind-dbus.c | 2 ++ + src/login/logind-session-dbus.c | 1 + + src/login/pam-module.c | 52 ++++++++++++++++++++--------------------- + 3 files changed, 29 insertions(+), 26 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index bb85c7d..69e94aa 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -90,6 +90,7 @@ + " \n" \ + " \n" \ + " \n" \ ++ " \n" \ + " \n" \ + " \n" \ + " \n" \ +@@ -523,6 +524,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) { + 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, +diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c +index be4e01c..86b0746 100644 +--- a/src/login/logind-session-dbus.c ++++ b/src/login/logind-session-dbus.c +@@ -755,6 +755,7 @@ int session_send_create_reply(Session *s, DBusError *error) { + 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, +diff --git a/src/login/pam-module.c b/src/login/pam-module.c +index 02f1618..22d9733 100644 +--- a/src/login/pam-module.c ++++ b/src/login/pam-module.c +@@ -86,31 +86,24 @@ static int get_user_data( + + const char *username = NULL; + struct passwd *pw = NULL; +- uid_t uid; + int r; + + assert(handle); + 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 +116,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_free_ char *p = NULL, *tty=NULL; + _cleanup_close_ int fd = -1; + union sockaddr_union sa = { + .un.sun_family = AF_UNIX, + }; + struct ucred ucred; + socklen_t l; +- _cleanup_free_ char *tty = NULL; +- int v; ++ int v, r; + + assert(display); + assert(vtnr); +@@ -186,14 +177,14 @@ _public_ PAM_EXTERN int pam_sm_open_session( + bool debug = false; + const char *username, *id, *object_path, *runtime_path, *service = NULL, *tty = NULL, *display = NULL, *remote_user = NULL, *remote_host = NULL, *seat = NULL, *type = NULL, *class = NULL, *class_pam = NULL, *cvtnr = NULL; + DBusError error; +- uint32_t uid, pid; + DBusMessageIter iter; + int session_fd = -1; + DBusConnection *bus = NULL; + DBusMessage *m = NULL, *reply = NULL; + dbus_bool_t remote, existing; + int r; +- uint32_t vtnr = 0; ++ uint32_t uid, pid, vtnr = 0; ++ uid_t original_uid; + + assert(handle); + +@@ -389,6 +380,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( + 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, +@@ -409,10 +401,18 @@ _public_ PAM_EXTERN int pam_sm_open_session( + 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."); ++ return r; ++ } + } + + if (!isempty(seat)) { diff --git a/SOURCES/0198-selinux-Don-t-attempt-to-load-policy-in-initramfs-if.patch b/SOURCES/0198-selinux-Don-t-attempt-to-load-policy-in-initramfs-if.patch new file mode 100644 index 0000000..9efd464 --- /dev/null +++ b/SOURCES/0198-selinux-Don-t-attempt-to-load-policy-in-initramfs-if.patch @@ -0,0 +1,40 @@ +From 4083e4d76b61bc9eb40583f941412c1ea1a0285b Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Fri, 21 Feb 2014 03:29:00 +0100 +Subject: [PATCH] selinux: Don't attempt to load policy in initramfs if it + doesn't exist + +Currently on at least Fedora, SELinux policy does not come in the +initramfs. systemd will attempt to load *both* in the initramfs and +in the real root. + +Now, the selinux_init_load_policy() API has a regular error return +value, as well as an "enforcing" boolean. To determine enforcing +state, it looks for /etc/selinux/config as well as the presence of +"enforcing=" on the kernel command line. + +Ordinarily, neither of those exist in the initramfs, so it will return +"unknown" for enforcing, and systemd will simply ignore the failure to +load policy. +--- + src/core/selinux-setup.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c +index 7a32ed5..9a5d6b2 100644 +--- a/src/core/selinux-setup.c ++++ b/src/core/selinux-setup.c +@@ -58,6 +58,13 @@ int selinux_setup(bool *loaded_policy) { + cb.func_log = null_log; + selinux_set_callback(SELINUX_CB_LOG, cb); + ++ /* Don't load policy in the initrd if we don't appear to have ++ * it. For the real root, we check below if we've already ++ * loaded policy, and return gracefully. ++ */ ++ if (in_initrd() && access(selinux_path(), F_OK) < 0) ++ return 0; ++ + /* Already initialized by somebody else? */ + r = getcon_raw(&con); + if (r == 0) { diff --git a/SOURCES/0199-kernel-install-add-fedora-specific-callouts-to-new-k.patch b/SOURCES/0199-kernel-install-add-fedora-specific-callouts-to-new-k.patch new file mode 100644 index 0000000..092bc0e --- /dev/null +++ b/SOURCES/0199-kernel-install-add-fedora-specific-callouts-to-new-k.patch @@ -0,0 +1,42 @@ +From 4d66c1673654c639a350f784c59b4c613c94edf7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 13 Mar 2013 07:57:53 +0100 +Subject: [PATCH] kernel-install: add fedora specific callouts to + new-kernel-pkg + +--- + src/kernel-install/kernel-install | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install +index 3ae1d77..3a2ac56 100644 +--- a/src/kernel-install/kernel-install ++++ b/src/kernel-install/kernel-install +@@ -19,6 +19,27 @@ + # You should have received a copy of the GNU Lesser General Public License + # along with systemd; If not, see . + ++if [[ -x /sbin/new-kernel-pkg ]]; then ++ [[ "$2" == *\+* ]] && flavor=-"${2##*+}" ++ case "$1" in ++ add) ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $? ++ ;; ++ remove) ++ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || exit $? ++ ;; ++ *) ++ ;; ++ esac ++ ++ # exit, if we can't find a boot loader spec conforming setup ++ if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then ++ exit 0 ++ fi ++fi ++ + usage() + { + echo "Usage:" diff --git a/SOURCES/0200-remove-user-.service.patch b/SOURCES/0200-remove-user-.service.patch new file mode 100644 index 0000000..d6784ca --- /dev/null +++ b/SOURCES/0200-remove-user-.service.patch @@ -0,0 +1,91 @@ +From a76f607703911f314fea41148ef7c23fac20029d Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 30 Oct 2013 18:22:49 +0100 +Subject: [PATCH] remove user@.service + +fixes rhbz#1019738 +--- + Makefile.am | 2 -- + src/login/logind-user.c | 42 ------------------------------------------ + 2 files changed, 44 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index f4867d9..df63275 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -437,7 +437,6 @@ nodist_systemunit_DATA = \ + units/systemd-sysctl.service \ + units/emergency.service \ + units/rescue.service \ +- units/user@.service \ + units/systemd-hibernate.service \ + units/systemd-hybrid-sleep.service \ + units/systemd-suspend.service \ +@@ -486,7 +485,6 @@ EXTRA_DIST += \ + units/user/systemd-exit.service.in \ + units/systemd-fsck@.service.in \ + units/systemd-fsck-root.service.in \ +- units/user@.service.in \ + units/systemd-udevd.service \ + units/systemd-udev-trigger.service \ + units/systemd-udev-settle.service \ +diff --git a/src/login/logind-user.c b/src/login/logind-user.c +index b87311c..8e7256b 100644 +--- a/src/login/logind-user.c ++++ b/src/login/logind-user.c +@@ -365,43 +365,6 @@ static int user_start_slice(User *u) { + return 0; + } + +-static int user_start_service(User *u) { +- DBusError error; +- char *job; +- int r; +- +- assert(u); +- +- dbus_error_init(&error); +- +- if (!u->service) { +- char lu[DECIMAL_STR_MAX(unsigned long) + 1], *service; +- sprintf(lu, "%lu", (unsigned long) u->uid); +- +- service = unit_name_build("user", lu, ".service"); +- if (!service) +- return log_oom(); +- +- r = manager_start_unit(u->manager, service, &error, &job); +- if (r < 0) { +- log_error("Failed to start user service: %s", bus_error(&error, r)); +- dbus_error_free(&error); +- +- free(service); +- } else { +- u->service = service; +- +- free(u->service_job); +- u->service_job = job; +- } +- } +- +- if (u->service) +- hashmap_put(u->manager->user_units, u->service, u); +- +- return 0; +-} +- + int user_start(User *u) { + int r; + +@@ -422,11 +385,6 @@ int user_start(User *u) { + if (r < 0) + return r; + +- /* Spawn user systemd */ +- r = user_start_service(u); +- if (r < 0) +- return r; +- + if (!dual_timestamp_is_set(&u->timestamp)) + dual_timestamp_get(&u->timestamp); + diff --git a/SOURCES/0201-Fix-bad-assert-in-show_pid_array.patch b/SOURCES/0201-Fix-bad-assert-in-show_pid_array.patch new file mode 100644 index 0000000..5a7ef1d --- /dev/null +++ b/SOURCES/0201-Fix-bad-assert-in-show_pid_array.patch @@ -0,0 +1,26 @@ +From a01fee0ef04e93dbe1eecb1aa276e515114e9c1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 +--- + src/shared/cgroup-show.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c +index f6e56db..aa0f017 100644 +--- a/src/shared/cgroup-show.c ++++ b/src/shared/cgroup-show.c +@@ -44,8 +44,6 @@ 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/SOURCES/0202-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch b/SOURCES/0202-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch new file mode 100644 index 0000000..d3e7674 --- /dev/null +++ b/SOURCES/0202-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch @@ -0,0 +1,69 @@ +From 3b321e8bb1548432624b374f7077f4aaaae40a2d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 26 Feb 2014 04:27:50 +0100 +Subject: [PATCH] mount: don't send out PropertiesChanged message if actually + nothing got changed + +Conflicts: + src/core/mount.c +--- + src/core/mount.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/core/mount.c b/src/core/mount.c +index c0445a6..62ec7fe 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -1414,7 +1414,7 @@ static int mount_add_one( + bool set_flags) { + int r; + Unit *u; +- bool delete; ++ bool delete, changed = false;; + char *e, *w = NULL, *o = NULL, *f = NULL; + MountParameters *p; + bool load_extras = false; +@@ -1483,6 +1483,7 @@ static int mount_add_one( + } + + unit_add_to_load_queue(u); ++ changed = true; + } else { + delete = false; + free(e); +@@ -1502,6 +1503,7 @@ static int mount_add_one( + /* Load in the extras later on, after we + * finished initialization of the unit */ + load_extras = true; ++ changed = true; + } + } + +@@ -1513,10 +1515,16 @@ static int mount_add_one( + } + + p = &MOUNT(u)->parameters_proc_self_mountinfo; ++ ++ changed = changed || ++ !streq_ptr(p->options, options) || ++ !streq_ptr(p->what, what) || ++ !streq_ptr(p->fstype, fstype); ++ + if (set_flags) { + MOUNT(u)->is_mounted = true; + MOUNT(u)->just_mounted = !MOUNT(u)->from_proc_self_mountinfo; +- MOUNT(u)->just_changed = !streq_ptr(p->options, o); ++ MOUNT(u)->just_changed = changed; + } + + MOUNT(u)->from_proc_self_mountinfo = true; +@@ -1538,7 +1546,8 @@ static int mount_add_one( + goto fail; + } + +- unit_add_to_dbus_queue(u); ++ if (changed) ++ unit_add_to_dbus_queue(u); + + return 0; + diff --git a/SOURCES/0203-udev-rules-setup-tty-permissions-and-group-for-sclp_.patch b/SOURCES/0203-udev-rules-setup-tty-permissions-and-group-for-sclp_.patch new file mode 100644 index 0000000..b9d9a8c --- /dev/null +++ b/SOURCES/0203-udev-rules-setup-tty-permissions-and-group-for-sclp_.patch @@ -0,0 +1,24 @@ +From 01f17a96d58033e281e52483d1afb73362c98aa8 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 27 Feb 2014 11:19:09 +0100 +Subject: [PATCH] udev/rules: setup tty permissions and group for sclp_line, + ttysclp and 3270/tty + +--- + rules/50-udev-default.rules | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules +index 679dfdf..0bccf67 100644 +--- a/rules/50-udev-default.rules ++++ b/rules/50-udev-default.rules +@@ -15,6 +15,9 @@ ACTION!="add", GOTO="default_permissions_end" + SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666" + SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" + SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" ++SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" ++SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" ++SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" + KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" + diff --git a/SOURCES/0204-cdrom_id-use-the-old-MMC-fallback.patch b/SOURCES/0204-cdrom_id-use-the-old-MMC-fallback.patch new file mode 100644 index 0000000..bc9671f --- /dev/null +++ b/SOURCES/0204-cdrom_id-use-the-old-MMC-fallback.patch @@ -0,0 +1,54 @@ +From 0f9f786f2f6fa8e7aa0c00b29c36296e8b291d76 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 27 Feb 2014 11:06:37 +0100 +Subject: [PATCH] cdrom_id: use the old MMC fallback + +https://bugzilla.redhat.com/show_bug.cgi?id=1038015 +The problem seems to be that the your virtual DVD is emulating a really +old DVD device, and doing it kind of strangely. + +> dracut:# /lib/udev/cdrom_id --debug /dev/sr0 +> probing: '/dev/sr0' +> INQUIRY: [IMM ][Virtual CD/DVD ][0316] +> GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h + +So your virtual drive rejects the GET CONFIGURATION command as illegal. + +Other pre-MMC2 drives that don't accept this command usually return the +error +SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id +tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set +and all the /dev/disk/by-label (etc) links get set up. + +The virtual drive returns the error SK=5h,ASC=24h (invalid field in +Command Descriptor Block), which cdrom_id doesn't handle, so it gives up +and the links never get made. + +The ideal solution would be to make the IMM to emulate a device that's +less than 15 years old, but I'm not going to hold my breath waiting for +that. + +So probably cdrom_id should also use the old MMC fallback when the error +is SK=5h,ASC=24h, and then all of this would work as expected. + +Suggested-by:Luca Miccini + +Conflicts: + src/udev/cdrom_id/cdrom_id.c +--- + src/udev/cdrom_id/cdrom_id.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c +index 1ad0459..ae19542 100644 +--- a/src/udev/cdrom_id/cdrom_id.c ++++ b/src/udev/cdrom_id/cdrom_id.c +@@ -555,7 +555,7 @@ static int cd_profiles(struct udev *udev, int fd) + if ((err != 0)) { + info_scsi_cmd_err(udev, "GET CONFIGURATION", err); + /* handle pre-MMC2 drives which do not support GET CONFIGURATION */ +- if (SK(err) == 0x5 && ASC(err) == 0x20) { ++ if (SK(err) == 0x5 && (ASC(err) == 0x20 || ASC(err) == 0x24)) { + log_debug("drive is pre-MMC2 and does not support 46h get configuration command\n"); + log_debug("trying to work around the problem\n"); + ret = cd_profiles_old_mmc(udev, fd); diff --git a/SOURCES/0205-core-introduce-new-stop-protocol-for-unit-scopes.patch b/SOURCES/0205-core-introduce-new-stop-protocol-for-unit-scopes.patch new file mode 100644 index 0000000..6f6c239 --- /dev/null +++ b/SOURCES/0205-core-introduce-new-stop-protocol-for-unit-scopes.patch @@ -0,0 +1,265 @@ +From 1c961f8bf67a798d51d88195f89d035012a681d4 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 27 Feb 2014 17:56:16 +0100 +Subject: [PATCH] core: introduce new stop protocol for unit scopes + +By specifiy a Controller property when creating the scope a client can +specify a bus name that will be notified with a RequestStop bus signal +when the scope has been asked to shut down, instead of sending SIGTERM +to the scope processes themselves. + +https://bugzilla.redhat.com/show_bug.cgi?id=1032695 + +Based-on: 2d4a39e759c4ab846ad8a546abeddd40bc8d736e +--- + src/core/dbus-scope.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/core/dbus-scope.h | 2 ++ + src/core/scope.c | 20 +++++++++++++++--- + src/core/scope.h | 2 ++ + src/run/run.c | 8 +++++++ + src/shared/dbus-common.c | 42 ++++++++++++++++++++++++++++++++++++ + src/shared/dbus-common.h | 2 ++ + 7 files changed, 128 insertions(+), 3 deletions(-) + +diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c +index 783a969..b576f76 100644 +--- a/src/core/dbus-scope.c ++++ b/src/core/dbus-scope.c +@@ -31,10 +31,12 @@ + #define BUS_SCOPE_INTERFACE \ + " \n" \ + BUS_UNIT_CGROUP_INTERFACE \ ++ " \n"\ + " \n" \ + BUS_KILL_CONTEXT_INTERFACE \ + BUS_CGROUP_CONTEXT_INTERFACE \ + " \n" \ ++ " \n" \ + " \n" + + #define INTROSPECTION \ +@@ -56,6 +58,7 @@ const char bus_scope_interface[] _introspect_("Scope") = BUS_SCOPE_INTERFACE; + static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_scope_append_scope_result, scope_result, ScopeResult); + + static const BusProperty bus_scope_properties[] = { ++ { "Controller", bus_property_append_string, "s", offsetof(Scope, controller) }, + { "TimeoutStopUSec", bus_property_append_usec, "t", offsetof(Scope, timeout_stop_usec) }, + { "Result", bus_scope_append_scope_result, "s", offsetof(Scope, result) }, + {} +@@ -127,6 +130,31 @@ static int bus_scope_set_transient_property( + + return 1; + ++ } else if (streq(name, "Controller")) { ++ const char *controller; ++ ++ if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_STRING) ++ return -EINVAL; ++ ++ dbus_message_iter_get_basic(i, &controller); ++ ++ if (!isempty(controller) && !bus_service_name_is_valid(controller)) ++ return -EINVAL; ++ ++ if (mode != UNIT_CHECK) { ++ char *c = NULL; ++ ++ if (!isempty(controller)) { ++ c = strdup(controller); ++ if (!c) ++ return -ENOMEM; ++ } ++ ++ free(s->controller); ++ s->controller = c; ++ } ++ ++ return 1; + } else if (streq(name, "TimeoutStopUSec")) { + + if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_UINT64) +@@ -187,3 +215,30 @@ int bus_scope_commit_properties(Unit *u) { + unit_realize_cgroup(u); + return 0; + } ++ ++int bus_scope_send_request_stop(Scope *s) { ++ _cleanup_dbus_message_unref_ DBusMessage *m = NULL; ++ _cleanup_free_ char *p = NULL; ++ int r; ++ ++ assert(s); ++ ++ if (!s->controller) ++ return 0; ++ ++ p = unit_dbus_path(UNIT(s)); ++ if (!p) ++ return -ENOMEM; ++ ++ m = dbus_message_new_signal(p, ++ "org.freedesktop.systemd1.Scope", ++ "RequestStop"); ++ if (!m) ++ return 0; ++ ++ r = dbus_message_set_destination(m, s->controller); ++ if (!r) ++ return 0; ++ ++ return dbus_connection_send(UNIT(s)->manager->api_bus, m, NULL); ++} +diff --git a/src/core/dbus-scope.h b/src/core/dbus-scope.h +index e6836f1..34720f2 100644 +--- a/src/core/dbus-scope.h ++++ b/src/core/dbus-scope.h +@@ -30,4 +30,6 @@ DBusHandlerResult bus_scope_message_handler(Unit *u, DBusConnection *c, DBusMess + int bus_scope_set_property(Unit *u, const char *name, DBusMessageIter *i, UnitSetPropertiesMode mode, DBusError *error); + int bus_scope_commit_properties(Unit *u); + ++int bus_scope_send_request_stop(Scope *s); ++ + extern const char bus_scope_interface[]; +diff --git a/src/core/scope.c b/src/core/scope.c +index 41da3b9..e75fc2b 100644 +--- a/src/core/scope.c ++++ b/src/core/scope.c +@@ -64,6 +64,9 @@ static void scope_done(Unit *u) { + + cgroup_context_done(&s->cgroup_context); + ++ free(s->controller); ++ s->controller = NULL; ++ + set_free(s->pids); + s->pids = NULL; + +@@ -198,6 +201,7 @@ static void scope_enter_dead(Scope *s, ScopeResult f) { + } + + static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) { ++ bool skip_signal = false; + int r; + + assert(s); +@@ -205,13 +209,23 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) { + if (f != SCOPE_SUCCESS) + s->result = f; + +- r = unit_kill_context( ++ /* If we have a controller set let's ask the controller nicely ++ * to terminate the scope, instead of us going directly into ++ * SIGTERM beserk mode */ ++ if (state == SCOPE_STOP_SIGTERM) ++ skip_signal = bus_scope_send_request_stop(s) > 0; ++ ++ if (!skip_signal) { ++ r = unit_kill_context( + UNIT(s), + &s->kill_context, + state != SCOPE_STOP_SIGTERM, + -1, -1, false); +- if (r < 0) +- goto fail; ++ ++ if (r < 0) ++ goto fail; ++ } else ++ r = 1; + + if (r > 0) { + if (s->timeout_stop_usec > 0) { +diff --git a/src/core/scope.h b/src/core/scope.h +index 2a3dcb7..b4bafa7 100644 +--- a/src/core/scope.h ++++ b/src/core/scope.h +@@ -55,6 +55,8 @@ struct Scope { + + usec_t timeout_stop_usec; + ++ char *controller; ++ + Set *pids; + + Watch timer_watch; +diff --git a/src/run/run.c b/src/run/run.c +index a6abead..93e3f88 100644 +--- a/src/run/run.c ++++ b/src/run/run.c +@@ -315,6 +315,14 @@ static int start_transient_scope( + if (r < 0) + return r; + ++ { ++ const char *unique_id; ++ sd_bus_get_unique_name(bus, &unique_id); ++ r = sd_bus_message_append(m, "(sv)", "Controller", "s", unique_id); ++ if (r < 0) ++ return r; ++ } ++ + r = sd_bus_message_append(m, "(sv)", "PIDs", "au", 1, (uint32_t) getpid()); + if (r < 0) + return r; +diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c +index 3ba2d87..8a68708 100644 +--- a/src/shared/dbus-common.c ++++ b/src/shared/dbus-common.c +@@ -1428,3 +1428,45 @@ const char *bus_message_get_sender_with_fallback(DBusMessage *m) { + + return ":no-sender"; + } ++ ++bool bus_service_name_is_valid(const char *p) { ++ const char *q; ++ bool dot, found_dot = false, unique; ++ ++ if (isempty(p)) ++ return false; ++ ++ unique = p[0] == ':'; ++ ++ for (dot = true, q = unique ? p+1 : p; *q; q++) ++ if (*q == '.') { ++ if (dot) ++ return false; ++ ++ found_dot = dot = true; ++ } else { ++ bool good; ++ ++ good = ++ (*q >= 'a' && *q <= 'z') || ++ (*q >= 'A' && *q <= 'Z') || ++ ((!dot || unique) && *q >= '0' && *q <= '9') || ++ *q == '_' || *q == '-'; ++ ++ if (!good) ++ return false; ++ ++ dot = false; ++ } ++ ++ if (q - p > 255) ++ return false; ++ ++ if (dot) ++ return false; ++ ++ if (!found_dot) ++ return false; ++ ++ return true; ++} +diff --git a/src/shared/dbus-common.h b/src/shared/dbus-common.h +index 9752f08..8d01d14 100644 +--- a/src/shared/dbus-common.h ++++ b/src/shared/dbus-common.h +@@ -242,5 +242,7 @@ const char *bus_message_get_sender_with_fallback(DBusMessage *m); + + void bus_message_unrefp(DBusMessage **reply); + ++bool bus_service_name_is_valid(const char *p); ++ + #define _cleanup_dbus_message_unref_ __attribute__((cleanup(bus_message_unrefp))) + #define _cleanup_dbus_error_free_ __attribute__((cleanup(dbus_error_free))) diff --git a/SOURCES/0206-core-watch-SIGCHLD-more-closely-to-track-processes-o.patch b/SOURCES/0206-core-watch-SIGCHLD-more-closely-to-track-processes-o.patch new file mode 100644 index 0000000..5ebd63a --- /dev/null +++ b/SOURCES/0206-core-watch-SIGCHLD-more-closely-to-track-processes-o.patch @@ -0,0 +1,716 @@ +From 1386240aee3f78a9101a118f11a7028571d33a71 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 27 Feb 2014 18:16:19 +0100 +Subject: [PATCH] core: watch SIGCHLD more closely to track processes of units + with no reliable cgroup empty notifier + +When a process dies that we can associate with a specific unit, start +watching all other processes of that unit, so that we can associate +those processes with the unit too. + +Also, for service units start doing this as soon as we get the first +SIGCHLD for either control or main process, so that we can follow the +processes of the service from one to the other, as long as process that +remain are processes of the ones we watched that died and got reassigned +to us as parent. + +Similar, for scope units start doing this as soon as the scope +controller abandons the unit, and thus management entirely reverts to +systemd. To abandon a unit introduce a new Abandon() scope unit method +call. + +Based-on: a911bb9ab27ac0eb3bbf4e8b4109e5da9b88eee3 +--- + src/core/dbus-scope.c | 36 +++++++++---- + src/core/manager.c | 2 +- + src/core/scope.c | 87 ++++++++++++++++++++++--------- + src/core/scope.h | 5 +- + src/core/service.c | 140 ++++++++++++++++++++++++++++++-------------------- + src/core/unit.c | 112 +++++++++++++++++++++++++++++++++++++++- + src/core/unit.h | 9 ++++ + 7 files changed, 298 insertions(+), 93 deletions(-) + +diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c +index b576f76..58dd9ff 100644 +--- a/src/core/dbus-scope.c ++++ b/src/core/dbus-scope.c +@@ -30,6 +30,7 @@ + + #define BUS_SCOPE_INTERFACE \ + " \n" \ ++ " \n" \ + BUS_UNIT_CGROUP_INTERFACE \ + " \n"\ + " \n" \ +@@ -66,19 +67,40 @@ static const BusProperty bus_scope_properties[] = { + + DBusHandlerResult bus_scope_message_handler(Unit *u, DBusConnection *c, DBusMessage *message) { + Scope *s = SCOPE(u); ++ _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; + +- const BusBoundProperties bps[] = { ++ SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status"); ++ ++ if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Scope", "Abandon")) { ++ int r; ++ ++ r = scope_abandon(s); ++ if (r < 0) ++ log_error("Failed to mark scope %s as abandoned : %s", UNIT(s)->id, strerror(-r)); ++ ++ reply = dbus_message_new_method_return(message); ++ if (!reply) ++ goto oom; ++ } else { ++ const BusBoundProperties bps[] = { + { "org.freedesktop.systemd1.Unit", bus_unit_properties, u }, + { "org.freedesktop.systemd1.Scope", bus_unit_cgroup_properties, u }, + { "org.freedesktop.systemd1.Scope", bus_scope_properties, s }, + { "org.freedesktop.systemd1.Scope", bus_cgroup_context_properties, &s->cgroup_context }, + { "org.freedesktop.systemd1.Scope", bus_kill_context_properties, &s->kill_context }, + {} +- }; ++ }; + +- SELINUX_UNIT_ACCESS_CHECK(u, c, message, "status"); ++ return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); ++ } ++ ++ if (reply) ++ if (!bus_maybe_send_reply(c, message, reply)) ++ goto oom; + +- return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); ++ return DBUS_HANDLER_RESULT_HANDLED; ++oom: ++ return DBUS_HANDLER_RESULT_NEED_MEMORY; + } + + static int bus_scope_set_transient_property( +@@ -102,10 +124,6 @@ static int bus_scope_set_transient_property( + dbus_message_iter_get_element_type(i) != DBUS_TYPE_UINT32) + return -EINVAL; + +- r = set_ensure_allocated(&s->pids, trivial_hash_func, trivial_compare_func); +- if (r < 0) +- return r; +- + dbus_message_iter_recurse(i, &sub); + while (dbus_message_iter_get_arg_type(&sub) == DBUS_TYPE_UINT32) { + uint32_t pid; +@@ -116,7 +134,7 @@ static int bus_scope_set_transient_property( + return -EINVAL; + + if (mode != UNIT_CHECK) { +- r = set_put(s->pids, LONG_TO_PTR(pid)); ++ r = unit_watch_pid(UNIT(s), pid); + if (r < 0 && r != -EEXIST) + return r; + } +diff --git a/src/core/manager.c b/src/core/manager.c +index a34a3c6..db5094f 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1389,7 +1389,7 @@ static int manager_dispatch_sigchld(Manager *m) { + log_debug_unit(u->id, + "Child %lu belongs to %s", (long unsigned) si.si_pid, u->id); + +- hashmap_remove(m->watch_pids, LONG_TO_PTR(si.si_pid)); ++ unit_unwatch_pid(u, si.si_pid); + UNIT_VTABLE(u)->sigchld_event(u, si.si_pid, si.si_code, si.si_status); + } + +diff --git a/src/core/scope.c b/src/core/scope.c +index e75fc2b..22bdfb2 100644 +--- a/src/core/scope.c ++++ b/src/core/scope.c +@@ -35,6 +35,7 @@ + static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = { + [SCOPE_DEAD] = UNIT_INACTIVE, + [SCOPE_RUNNING] = UNIT_ACTIVE, ++ [SCOPE_ABANDONED] = UNIT_ACTIVE, + [SCOPE_STOP_SIGTERM] = UNIT_DEACTIVATING, + [SCOPE_STOP_SIGKILL] = UNIT_DEACTIVATING, + [SCOPE_FAILED] = UNIT_FAILED +@@ -67,9 +68,6 @@ static void scope_done(Unit *u) { + free(s->controller); + s->controller = NULL; + +- set_free(s->pids); +- s->pids = NULL; +- + unit_unwatch_timer(u, &s->timer_watch); + } + +@@ -84,6 +82,9 @@ static void scope_set_state(Scope *s, ScopeState state) { + state != SCOPE_STOP_SIGKILL) + unit_unwatch_timer(UNIT(s), &s->timer_watch); + ++ if (state == SCOPE_DEAD || state == SCOPE_FAILED) ++ unit_unwatch_all_pids(UNIT(s)); ++ + if (state != old_state) + log_debug("%s changed %s -> %s", + UNIT(s)->id, +@@ -115,7 +116,7 @@ static int scope_verify(Scope *s) { + if (UNIT(s)->load_state != UNIT_LOADED) + return 0; + +- if (set_size(s->pids) <= 0 && UNIT(s)->manager->n_reloading <= 0) { ++ if (set_size(UNIT(s)->pids) <= 0 && UNIT(s)->manager->n_reloading <= 0) { + log_error_unit(UNIT(s)->id, "Scope %s has no PIDs. Refusing.", UNIT(s)->id); + return -EINVAL; + } +@@ -169,6 +170,9 @@ static int scope_coldplug(Unit *u) { + return r; + } + ++ if (s->deserialized_state != SCOPE_DEAD && s->deserialized_state != SCOPE_FAILED) ++ unit_watch_all_pids(UNIT(s)); ++ + scope_set_state(s, s->deserialized_state); + } + +@@ -209,6 +213,8 @@ static void scope_enter_signal(Scope *s, ScopeState state, ScopeResult f) { + if (f != SCOPE_SUCCESS) + s->result = f; + ++ unit_watch_all_pids(UNIT(s)); ++ + /* If we have a controller set let's ask the controller nicely + * to terminate the scope, instead of us going directly into + * SIGTERM beserk mode */ +@@ -271,13 +277,10 @@ static int scope_start(Unit *u) { + return r; + } + +- r = cg_attach_many_everywhere(u->manager->cgroup_supported, u->cgroup_path, s->pids); ++ r = cg_attach_many_everywhere(u->manager->cgroup_supported, u->cgroup_path, UNIT(s)->pids); + if (r < 0) + return r; + +- set_free(s->pids); +- s->pids = NULL; +- + s->result = SCOPE_SUCCESS; + + scope_set_state(s, SCOPE_RUNNING); +@@ -288,13 +291,13 @@ static int scope_stop(Unit *u) { + Scope *s = SCOPE(u); + + assert(s); +- assert(s->state == SCOPE_RUNNING); + + if (s->state == SCOPE_STOP_SIGTERM || + s->state == SCOPE_STOP_SIGKILL) + return 0; + +- assert(s->state == SCOPE_RUNNING); ++ assert(s->state == SCOPE_RUNNING || ++ s->state == SCOPE_ABANDONED); + + scope_enter_signal(s, SCOPE_STOP_SIGTERM, SCOPE_SUCCESS); + return 0; +@@ -358,7 +361,7 @@ static bool scope_check_gc(Unit *u) { + /* Never clean up scopes that still have a process around, + * even if the scope is formally dead. */ + +- if (UNIT(s)->cgroup_path) { ++ if (u->cgroup_path) { + r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, UNIT(s)->cgroup_path, true); + if (r <= 0) + return true; +@@ -367,6 +370,33 @@ static bool scope_check_gc(Unit *u) { + return false; + } + ++static void scope_notify_cgroup_empty_event(Unit *u) { ++ Scope *s = SCOPE(u); ++ ++ assert(u); ++ ++ log_debug_unit(u->id, "%s: cgroup is empty", u->id); ++ ++ if (s->state == SCOPE_RUNNING || s->state == SCOPE_ABANDONED || ++ s->state == SCOPE_STOP_SIGTERM || SCOPE_STOP_SIGKILL) ++ scope_enter_dead(s, SCOPE_SUCCESS); ++} ++ ++static void scope_sigchld_event(Unit *u, pid_t pid, int code, int status) { ++ /* If we get a SIGCHLD event for one of the processes we were ++ interested in, then we look for others to watch, under the ++ assumption that we'll sooner or later get a SIGCHLD for ++ them, as the original process we watched was probably the ++ parent of them, and they are hence now our children. */ ++ ++ unit_tidy_watch_pids(u, 0, 0); ++ unit_watch_all_pids(u); ++ ++ /* If the PID set is empty now, then let's finish this off */ ++ if (set_isempty(u->pids)) ++ scope_notify_cgroup_empty_event(u); ++} ++ + static void scope_timer_event(Unit *u, uint64_t elapsed, Watch*w) { + Scope *s = SCOPE(u); + +@@ -397,24 +427,30 @@ static void scope_timer_event(Unit *u, uint64_t elapsed, Watch*w) { + } + } + +-static void scope_notify_cgroup_empty_event(Unit *u) { +- Scope *s = SCOPE(u); +- assert(u); ++int scope_abandon(Scope *s) { ++ assert(s); + +- log_debug_unit(u->id, "%s: cgroup is empty", u->id); ++ if (s->state != SCOPE_RUNNING && s->state != SCOPE_ABANDONED) ++ return -ESTALE; + +- switch (s->state) { ++ free(s->controller); ++ s->controller = NULL; + +- case SCOPE_RUNNING: +- case SCOPE_STOP_SIGTERM: +- case SCOPE_STOP_SIGKILL: +- scope_enter_dead(s, SCOPE_SUCCESS); ++ /* The client is no longer watching the remaining processes, ++ * so let's step in here, under the assumption that the ++ * remaining processes will be sooner or later reassigned to ++ * us as parent. */ + +- break; ++ unit_tidy_watch_pids(UNIT(s), 0, 0); ++ unit_watch_all_pids(UNIT(s)); + +- default: +- ; +- } ++ /* If the PID set is empty now, then let's finish this off */ ++ if (set_isempty(UNIT(s)->pids)) ++ scope_notify_cgroup_empty_event(UNIT(s)); ++ else ++ scope_set_state(s, SCOPE_ABANDONED); ++ ++ return 0; + } + + _pure_ static UnitActiveState scope_active_state(Unit *u) { +@@ -432,6 +468,7 @@ _pure_ static const char *scope_sub_state_to_string(Unit *u) { + static const char* const scope_state_table[_SCOPE_STATE_MAX] = { + [SCOPE_DEAD] = "dead", + [SCOPE_RUNNING] = "running", ++ [SCOPE_ABANDONED] = "abandoned", + [SCOPE_STOP_SIGTERM] = "stop-sigterm", + [SCOPE_STOP_SIGKILL] = "stop-sigkill", + [SCOPE_FAILED] = "failed", +@@ -481,6 +518,8 @@ const UnitVTable scope_vtable = { + + .check_gc = scope_check_gc, + ++ .sigchld_event = scope_sigchld_event, ++ + .timer_event = scope_timer_event, + + .reset_failed = scope_reset_failed, +diff --git a/src/core/scope.h b/src/core/scope.h +index b4bafa7..1e9f201 100644 +--- a/src/core/scope.h ++++ b/src/core/scope.h +@@ -29,6 +29,7 @@ typedef struct Scope Scope; + typedef enum ScopeState { + SCOPE_DEAD, + SCOPE_RUNNING, ++ SCOPE_ABANDONED, + SCOPE_STOP_SIGTERM, + SCOPE_STOP_SIGKILL, + SCOPE_FAILED, +@@ -57,13 +58,13 @@ struct Scope { + + char *controller; + +- Set *pids; +- + Watch timer_watch; + }; + + extern const UnitVTable scope_vtable; + ++int scope_abandon(Scope *s); ++ + const char* scope_state_to_string(ScopeState i) _const_; + ScopeState scope_state_from_string(const char *s) _pure_; + +diff --git a/src/core/service.c b/src/core/service.c +index f0acda1..41e5cb5 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -1546,6 +1546,11 @@ static void service_set_state(Service *s, ServiceState state) { + s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID; + } + ++ if (state == SERVICE_DEAD || ++ state == SERVICE_FAILED || ++ state == SERVICE_AUTO_RESTART) ++ unit_unwatch_all_pids(UNIT(s)); ++ + if (state != SERVICE_START_PRE && + state != SERVICE_START && + state != SERVICE_START_POST && +@@ -1661,8 +1666,14 @@ static int service_coldplug(Unit *u) { + return r; + } + ++ if (s->deserialized_state != SERVICE_DEAD && ++ s->deserialized_state != SERVICE_FAILED && ++ s->deserialized_state != SERVICE_AUTO_RESTART) ++ unit_watch_all_pids(UNIT(s)); ++ + if (s->deserialized_state == SERVICE_START_POST || +- s->deserialized_state == SERVICE_RUNNING) ++ s->deserialized_state == SERVICE_RUNNING || ++ s->deserialized_state == SERVICE_RELOAD) + service_handle_watchdog(s); + + service_set_state(s, s->deserialized_state); +@@ -1970,6 +1981,7 @@ static void service_enter_stop_post(Service *s, ServiceResult f) { + s->result = f; + + service_unwatch_control_pid(s); ++ unit_watch_all_pids(UNIT(s)); + + s->control_command = s->exec_command[SERVICE_EXEC_STOP_POST]; + if (s->control_command) { +@@ -2010,6 +2022,8 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f + if (f != SERVICE_SUCCESS) + s->result = f; + ++ unit_watch_all_pids(UNIT(s)); ++ + r = unit_kill_context( + UNIT(s), + &s->kill_context, +@@ -2055,6 +2069,7 @@ static void service_enter_stop(Service *s, ServiceResult f) { + s->result = f; + + service_unwatch_control_pid(s); ++ unit_watch_all_pids(UNIT(s)); + + s->control_command = s->exec_command[SERVICE_EXEC_STOP]; + if (s->control_command) { +@@ -2961,6 +2976,62 @@ fail: + service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_RESOURCES); + } + ++static void service_notify_cgroup_empty_event(Unit *u) { ++ Service *s = SERVICE(u); ++ ++ assert(u); ++ ++ log_debug_unit(u->id, "%s: cgroup is empty", u->id); ++ ++ switch (s->state) { ++ ++ /* Waiting for SIGCHLD is usually more interesting, ++ * because it includes return codes/signals. Which is ++ * why we ignore the cgroup events for most cases, ++ * except when we don't know pid which to expect the ++ * SIGCHLD for. */ ++ ++ case SERVICE_START: ++ case SERVICE_START_POST: ++ /* If we were hoping for the daemon to write its PID file, ++ * we can give up now. */ ++ if (s->pid_file_pathspec) { ++ log_warning_unit(u->id, ++ "%s never wrote its PID file. Failing.", UNIT(s)->id); ++ service_unwatch_pid_file(s); ++ if (s->state == SERVICE_START) ++ service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES); ++ else ++ service_enter_stop(s, SERVICE_FAILURE_RESOURCES); ++ } ++ break; ++ ++ case SERVICE_RUNNING: ++ /* service_enter_running() will figure out what to do */ ++ service_enter_running(s, SERVICE_SUCCESS); ++ break; ++ ++ case SERVICE_STOP_SIGTERM: ++ case SERVICE_STOP_SIGKILL: ++ ++ if (main_pid_good(s) <= 0 && !control_pid_good(s)) ++ service_enter_stop_post(s, SERVICE_SUCCESS); ++ ++ break; ++ ++ case SERVICE_STOP_POST: ++ case SERVICE_FINAL_SIGTERM: ++ case SERVICE_FINAL_SIGKILL: ++ if (main_pid_good(s) <= 0 && !control_pid_good(s)) ++ service_enter_dead(s, SERVICE_SUCCESS, true); ++ ++ break; ++ ++ default: ++ ; ++ } ++} ++ + static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { + Service *s = SERVICE(u); + ServiceResult f; +@@ -3229,6 +3300,18 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { + + /* Notify clients about changed exit status */ + unit_add_to_dbus_queue(u); ++ ++ /* We got one SIGCHLD for the service, let's watch all ++ * processes that are now running of the service, and watch ++ * that. Among the PIDs we then watch will be children ++ * reassigned to us, which hopefully allows us to identify ++ * when all children are gone */ ++ unit_tidy_watch_pids(u, s->main_pid, s->control_pid); ++ unit_watch_all_pids(u); ++ ++ /* If the PID set is empty now, then let's finish this off */ ++ if (set_isempty(u->pids)) ++ service_notify_cgroup_empty_event(u); + } + + static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) { +@@ -3332,61 +3415,6 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) { + } + } + +-static void service_notify_cgroup_empty_event(Unit *u) { +- Service *s = SERVICE(u); +- +- assert(u); +- +- log_debug_unit(u->id, "%s: cgroup is empty", u->id); +- +- switch (s->state) { +- +- /* Waiting for SIGCHLD is usually more interesting, +- * because it includes return codes/signals. Which is +- * why we ignore the cgroup events for most cases, +- * except when we don't know pid which to expect the +- * SIGCHLD for. */ +- +- case SERVICE_START: +- case SERVICE_START_POST: +- /* If we were hoping for the daemon to write its PID file, +- * we can give up now. */ +- if (s->pid_file_pathspec) { +- log_warning_unit(u->id, +- "%s never wrote its PID file. Failing.", UNIT(s)->id); +- service_unwatch_pid_file(s); +- if (s->state == SERVICE_START) +- service_enter_signal(s, SERVICE_FINAL_SIGTERM, SERVICE_FAILURE_RESOURCES); +- else +- service_enter_stop(s, SERVICE_FAILURE_RESOURCES); +- } +- break; +- +- case SERVICE_RUNNING: +- /* service_enter_running() will figure out what to do */ +- service_enter_running(s, SERVICE_SUCCESS); +- break; +- +- case SERVICE_STOP_SIGTERM: +- case SERVICE_STOP_SIGKILL: +- +- if (main_pid_good(s) <= 0 && !control_pid_good(s)) +- service_enter_stop_post(s, SERVICE_SUCCESS); +- +- break; +- +- case SERVICE_FINAL_SIGTERM: +- case SERVICE_FINAL_SIGKILL: +- if (main_pid_good(s) <= 0 && !control_pid_good(s)) +- service_enter_dead(s, SERVICE_SUCCESS, true); +- +- break; +- +- default: +- ; +- } +-} +- + static void service_notify_message(Unit *u, pid_t pid, char **tags) { + Service *s = SERVICE(u); + const char *e; +diff --git a/src/core/unit.c b/src/core/unit.c +index 6c2c4a0..0332094 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -472,6 +472,8 @@ void unit_free(Unit *u) { + + set_free_free(u->names); + ++ unit_unwatch_all_pids(u); ++ + condition_free_list(u->conditions); + + unit_ref_unset(&u->slice); +@@ -1658,13 +1660,25 @@ void unit_unwatch_fd(Unit *u, Watch *w) { + } + + int unit_watch_pid(Unit *u, pid_t pid) { ++ int q, r; ++ + assert(u); + assert(pid >= 1); + ++ r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); ++ if (r < 0) ++ return r; ++ + /* Watch a specific PID. We only support one unit watching + * each PID for now. */ + +- return hashmap_put(u->manager->watch_pids, LONG_TO_PTR(pid), u); ++ r = set_put(u->pids, LONG_TO_PTR(pid)); ++ ++ q = hashmap_put(u->manager->watch_pids, LONG_TO_PTR(pid), u); ++ if (q < 0) ++ return q; ++ ++ return r; + } + + void unit_unwatch_pid(Unit *u, pid_t pid) { +@@ -1672,6 +1686,102 @@ void unit_unwatch_pid(Unit *u, pid_t pid) { + assert(pid >= 1); + + hashmap_remove_value(u->manager->watch_pids, LONG_TO_PTR(pid), u); ++ set_remove(u->pids, LONG_TO_PTR(pid)); ++} ++ ++static int watch_pids_in_path(Unit *u, const char *path) { ++ _cleanup_closedir_ DIR *d = NULL; ++ _cleanup_fclose_ FILE *f = NULL; ++ int ret = 0, r; ++ ++ assert(u); ++ assert(path); ++ ++ /* Adds all PIDs from a specific cgroup path to the set of PIDs we watch. */ ++ ++ r = cg_enumerate_processes(SYSTEMD_CGROUP_CONTROLLER, path, &f); ++ if (r >= 0) { ++ pid_t pid; ++ ++ while ((r = cg_read_pid(f, &pid)) > 0) { ++ r = unit_watch_pid(u, pid); ++ if (r < 0 && ret >= 0) ++ ret = r; ++ } ++ if (r < 0 && ret >= 0) ++ ret = r; ++ ++ } else if (ret >= 0) ++ ret = r; ++ ++ r = cg_enumerate_subgroups(SYSTEMD_CGROUP_CONTROLLER, path, &d); ++ if (r >= 0) { ++ char *fn; ++ ++ while ((r = cg_read_subgroup(d, &fn)) > 0) { ++ _cleanup_free_ char *p = NULL; ++ ++ p = strjoin(path, "/", fn, NULL); ++ free(fn); ++ ++ if (!p) ++ return -ENOMEM; ++ ++ r = watch_pids_in_path(u, p); ++ if (r < 0 && ret >= 0) ++ ret = r; ++ } ++ if (r < 0 && ret >= 0) ++ ret = r; ++ ++ } else if (ret >= 0) ++ ret = r; ++ ++ return ret; ++} ++ ++ ++int unit_watch_all_pids(Unit *u) { ++ assert(u); ++ ++ if (!u->cgroup_path) ++ return -ENOENT; ++ ++ /* Adds all PIDs from our cgroup to the set of PIDs we watch */ ++ ++ return watch_pids_in_path(u, u->cgroup_path); ++} ++ ++void unit_unwatch_all_pids(Unit *u) { ++ Iterator i; ++ void *e; ++ ++ assert(u); ++ ++ SET_FOREACH(e, u->pids, i) ++ hashmap_remove_value(u->manager->watch_pids, e, u); ++ ++ set_free(u->pids); ++ u->pids = NULL; ++} ++ ++void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { ++ Iterator i; ++ void *e; ++ ++ assert(u); ++ ++ /* Cleans dead PIDs from our list */ ++ ++ SET_FOREACH(e, u->pids, i) { ++ pid_t pid = PTR_TO_LONG(e); ++ ++ if (pid == except1 || pid == except2) ++ continue; ++ ++ if (kill(pid, 0) < 0 && errno == ESRCH) ++ set_remove(u->pids, e); ++ } + } + + int unit_watch_timer(Unit *u, clockid_t clock_id, bool relative, usec_t usec, Watch *w) { +diff --git a/src/core/unit.h b/src/core/unit.h +index 6dd750f..6dff25e 100644 +--- a/src/core/unit.h ++++ b/src/core/unit.h +@@ -198,6 +198,11 @@ struct Unit { + /* CGroup realize members queue */ + LIST_FIELDS(Unit, cgroup_queue); + ++ /* PIDs we keep an eye on. Note that a unit might have many ++ * more, but these are the ones we care enough about to ++ * process SIGCHLD for */ ++ Set *pids; ++ + /* Used during GC sweeps */ + unsigned gc_marker; + +@@ -531,6 +536,10 @@ void unit_unwatch_fd(Unit *u, Watch *w); + + int unit_watch_pid(Unit *u, pid_t pid); + void unit_unwatch_pid(Unit *u, pid_t pid); ++int unit_watch_all_pids(Unit *u); ++void unit_unwatch_all_pids(Unit *u); ++ ++void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2); + + int unit_watch_timer(Unit *u, clockid_t, bool relative, usec_t usec, Watch *w); + void unit_unwatch_timer(Unit *u, Watch *w); diff --git a/SOURCES/0207-logind-rework-session-shutdown-logic.patch b/SOURCES/0207-logind-rework-session-shutdown-logic.patch new file mode 100644 index 0000000..b9387e2 --- /dev/null +++ b/SOURCES/0207-logind-rework-session-shutdown-logic.patch @@ -0,0 +1,597 @@ +From 553a962a570cade5c44953593209d25e28ec5145 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 3 Mar 2014 15:37:49 +0100 +Subject: [PATCH] logind: rework session shutdown logic + +Simplify the shutdown logic a bit: + +- Keep the session FIFO around in the PAM module, even after the session + shutdown hook has been finished. This allows logind to track precisely + when the PAM handler goes away. + +- In the ReleaseSession() call start a timer, that will stop terminate + the session when elapsed. + +- Never fiddle with the KillMode of scopes to configure whether user + processes should be killed or not. Instead, simply leave the scope + units around when we terminate a session whose processes should not be + killed. + +- When killing is enabled, stop the session scope on FIFO EOF or after + the ReleaseSession() timeout. When killing is disabled, simply tell + PID 1 to abandon the scope. + +Because the scopes stay around and hence all processes are always member +of a scope, the system shutdown logic should be more robust, as the +scopes can be shutdown as part of the usual shutdown logic. + +Based-on: 5f41d1f10fd97e93517b6a762b1bec247f4d1171 +--- + src/login/logind-dbus.c | 51 +++++++++++------- + src/login/logind-session.c | 130 +++++++++++++++++++++++++++++++++++---------- + src/login/logind-session.h | 4 ++ + src/login/logind-user.c | 23 +++++--- + src/login/logind-user.h | 1 + + src/login/logind.c | 23 ++++++-- + src/login/logind.h | 4 +- + src/login/pam-module.c | 11 ++-- + 8 files changed, 182 insertions(+), 65 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index 69e94aa..8de301e 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -1747,13 +1747,7 @@ static DBusHandlerResult manager_message_handler( + if (!session) + return bus_send_error_reply(connection, message, &error, -ENOENT); + +- /* We use the FIFO to detect stray sessions where the +- process invoking PAM dies abnormally. We need to make +- sure that that process is not killed if at the clean +- end of the session it closes the FIFO. Hence, with +- this call explicitly turn off the FIFO logic, so that +- the PAM code can finish clean up on its own */ +- session_remove_fifo(session); ++ session_release(session); + + reply = dbus_message_new_method_return(message); + if (!reply) +@@ -2551,7 +2545,6 @@ int manager_start_scope( + const char *slice, + const char *description, + const char *after, +- const char *kill_mode, + DBusError *error, + char **job) { + +@@ -2623,18 +2616,6 @@ int manager_start_scope( + return log_oom(); + } + +- if (!isempty(kill_mode)) { +- const char *kill_mode_property = "KillMode"; +- +- if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) || +- !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &kill_mode_property) || +- !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, "s", &sub3) || +- !dbus_message_iter_append_basic(&sub3, DBUS_TYPE_STRING, &kill_mode) || +- !dbus_message_iter_close_container(&sub2, &sub3) || +- !dbus_message_iter_close_container(&sub, &sub2)) +- return log_oom(); +- } +- + /* cgroup empty notification is not available in containers + * currently. To make this less problematic, let's shorten the + * stop timeout for sessions, so that we don't wait +@@ -2793,6 +2774,36 @@ int manager_stop_unit(Manager *manager, const char *unit, DBusError *error, char + return 1; + } + ++int manager_abandon_scope(Manager *manager, const char *scope, DBusError *error) { ++ _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; ++ _cleanup_free_ char *path = NULL; ++ int r; ++ ++ assert(manager); ++ assert(scope); ++ ++ path = unit_dbus_path_from_name(scope); ++ if (!path) ++ return -ENOMEM; ++ ++ r = bus_method_call_with_reply( ++ manager->bus, ++ "org.freedesktop.systemd1", ++ path, ++ "org.freedesktop.systemd1.Scope", ++ "Abandon", ++ &reply, ++ error, ++ DBUS_TYPE_INVALID); ++ ++ if (r < 0) { ++ log_error("Failed to abandon scope %s", scope); ++ return r; ++ } ++ ++ return 1; ++} ++ + int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, DBusError *error) { + _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; + const char *w; +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 27aa335..78e6d74 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -36,6 +37,8 @@ + #include "dbus-common.h" + #include "logind-session.h" + ++#define RELEASE_SEC 20 ++ + static unsigned devt_hash_func(const void *p) { + uint64_t u = *(const dev_t*)p; + +@@ -505,7 +508,6 @@ static int session_start_scope(Session *s) { + + if (!s->scope) { + _cleanup_free_ char *description = NULL; +- const char *kill_mode; + char *scope, *job; + + description = strjoin("Session ", s->id, " of user ", s->user->name, NULL); +@@ -516,9 +518,7 @@ static int session_start_scope(Session *s) { + if (!scope) + return log_oom(); + +- kill_mode = manager_shall_kill(s->manager, s->user->name) ? "control-group" : "none"; +- +- r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-user-sessions.service", kill_mode, &error, &job); ++ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", &error, &job); + if (r < 0) { + log_error("Failed to start session scope %s: %s %s", + scope, bus_error(&error, r), error.name); +@@ -579,23 +579,22 @@ int session_start(Session *s) { + + s->started = true; + +- /* Save session data */ ++ /* Save data */ + session_save(s); + user_save(s->user); ++ if (s->seat) ++ seat_save(s->seat); + ++ /* Send signals */ + session_send_signal(s, true); + + if (s->seat) { +- seat_save(s->seat); +- + if (s->seat->active == s) + seat_send_changed(s->seat, "Sessions\0ActiveSession\0"); + else + seat_send_changed(s->seat, "Sessions\0"); + } + +- user_send_changed(s->user, "Sessions\0"); +- + return 0; + } + +@@ -611,15 +610,24 @@ static int session_stop_scope(Session *s) { + if (!s->scope) + return 0; + +- r = manager_stop_unit(s->manager, s->scope, &error, &job); +- if (r < 0) { +- log_error("Failed to stop session scope: %s", bus_error(&error, r)); +- dbus_error_free(&error); +- return r; +- } ++ if (manager_shall_kill(s->manager, s->user->name)) { ++ r = manager_stop_unit(s->manager, s->scope, &error, &job); ++ if (r < 0) { ++ log_error("Failed to stop session scope: %s", bus_error(&error, r)); ++ dbus_error_free(&error); ++ return r; ++ } + +- free(s->scope_job); +- s->scope_job = job; ++ free(s->scope_job); ++ s->scope_job = job; ++ } else { ++ r = manager_abandon_scope(s->manager, s->scope, &error); ++ if (r < 0) { ++ log_error("Failed to abandon session scope: %s", bus_error(&error, r)); ++ dbus_error_free(&error); ++ return r; ++ } ++ } + + return 0; + } +@@ -644,6 +652,19 @@ static int session_unlink_x11_socket(Session *s) { + return r < 0 ? -errno : 0; + } + ++static void session_close_timer_fd(Session *s) { ++ assert(s); ++ ++ if (s->timer_fd <= 0) ++ return; ++ ++ hashmap_remove(s->manager->timer_fds, INT_TO_PTR(s->timer_fd + 1)); ++ epoll_ctl(s->manager->epoll_fd, EPOLL_CTL_DEL, s->timer_fd, NULL); ++ ++ close_nointr(s->timer_fd); ++ s->timer_fd = -1; ++} ++ + int session_stop(Session *s) { + int r; + +@@ -652,11 +673,18 @@ int session_stop(Session *s) { + if (!s->user) + return -ESTALE; + ++ session_close_timer_fd(s); ++ ++ /* We are going down, don't care about FIFOs anymore */ ++ session_remove_fifo(s); ++ + /* Kill cgroup */ + r = session_stop_scope(s); + + session_save(s); + ++ s->stopping = true; ++ + return r; + } + +@@ -678,6 +706,8 @@ int session_finalize(Session *s) { + "MESSAGE=Removed session %s.", s->id, + NULL); + ++ session_close_timer_fd(s); ++ + /* Kill session devices */ + while ((sd = hashmap_first(s->devices))) + session_device_free(sd); +@@ -698,16 +728,64 @@ int session_finalize(Session *s) { + if (s->seat->active == s) + seat_set_active(s->seat, NULL); + +- seat_send_changed(s->seat, "Sessions\0"); + seat_save(s->seat); ++ seat_send_changed(s->seat, "Sessions\0"); + } + +- user_send_changed(s->user, "Sessions\0"); + user_save(s->user); ++ user_send_changed(s->user, "Sessions\0"); + + return r; + } + ++void session_release(Session *s) { ++ int r; ++ ++ struct itimerspec its = { .it_value.tv_sec = RELEASE_SEC }; ++ struct epoll_event ev = {}; ++ ++ assert(s); ++ ++ if (!s->started || s->stopping) ++ return; ++ ++ if (s->timer_fd >= 0) ++ return; ++ ++ s->timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC); ++ if (s->timer_fd < 0) { ++ log_error("Failed to create session release timer fd"); ++ goto out; ++ } ++ ++ r = hashmap_put(s->manager->timer_fds, INT_TO_PTR(s->timer_fd + 1), s); ++ if (r < 0) { ++ log_error("Failed to store session release timer fd"); ++ goto out; ++ } ++ ++ ev.events = EPOLLONESHOT; ++ ev.data.u32 = FD_OTHER_BASE + s->timer_fd; ++ ++ r = epoll_ctl(s->manager->epoll_fd, EPOLL_CTL_ADD, s->timer_fd, &ev); ++ if (r < 0) { ++ log_error("Failed to add session release timer fd to epoll instance"); ++ goto out; ++ } ++ ++ r = timerfd_settime(s->timer_fd, TFD_TIMER_ABSTIME, &its, NULL); ++ if (r < 0) { ++ log_error("Failed to arm timer : %m"); ++ goto out; ++ } ++ ++out: ++ if (s->timer_fd >= 0) { ++ close_nointr(s->timer_fd); ++ s->timer_fd = -1; ++ } ++} ++ + bool session_is_active(Session *s) { + assert(s); + +@@ -904,8 +982,6 @@ void session_remove_fifo(Session *s) { + } + + int session_check_gc(Session *s, bool drop_not_started) { +- int r; +- + assert(s); + + if (drop_not_started && !s->started) +@@ -915,11 +991,7 @@ int session_check_gc(Session *s, bool drop_not_started) { + return 0; + + if (s->fifo_fd >= 0) { +- r = pipe_eof(s->fifo_fd); +- if (r < 0) +- return r; +- +- if (r == 0) ++ if (pipe_eof(s->fifo_fd) <= 0) + return 1; + } + +@@ -945,15 +1017,15 @@ void session_add_to_gc_queue(Session *s) { + SessionState session_get_state(Session *s) { + assert(s); + ++ if (s->stopping || s->timer_fd >= 0) ++ return SESSION_CLOSING; ++ + if (s->closing) + return SESSION_CLOSING; + + if (s->scope_job) + return SESSION_OPENING; + +- if (s->fifo_fd < 0) +- return SESSION_CLOSING; +- + if (session_is_active(s)) + return SESSION_ACTIVE; + +diff --git a/src/login/logind-session.h b/src/login/logind-session.h +index f175a89..9b76582 100644 +--- a/src/login/logind-session.h ++++ b/src/login/logind-session.h +@@ -98,11 +98,14 @@ struct Session { + int fifo_fd; + char *fifo_path; + ++ int timer_fd; ++ + bool idle_hint; + dual_timestamp idle_hint_timestamp; + + bool in_gc_queue:1; + bool started:1; ++ bool stopping:1; + bool closing:1; + + DBusMessage *create_message; +@@ -130,6 +133,7 @@ void session_remove_fifo(Session *s); + int session_start(Session *s); + int session_stop(Session *s); + int session_finalize(Session *s); ++void session_release(Session *s); + int session_save(Session *s); + int session_load(Session *s); + int session_kill(Session *s, KillWho who, int signo); +diff --git a/src/login/logind-user.c b/src/login/logind-user.c +index 8e7256b..653574e 100644 +--- a/src/login/logind-user.c ++++ b/src/login/logind-user.c +@@ -487,6 +487,8 @@ int user_stop(User *u) { + if (k < 0) + r = k; + ++ u->stopping = true; ++ + user_save(u); + + return r; +@@ -602,22 +604,27 @@ void user_add_to_gc_queue(User *u) { + + UserState user_get_state(User *u) { + Session *i; +- bool all_closing = true; + + assert(u); + ++ if (u->stopping) ++ return USER_CLOSING; ++ + if (u->slice_job || u->service_job) + return USER_OPENING; + +- LIST_FOREACH(sessions_by_user, i, u->sessions) { +- if (session_is_active(i)) +- return USER_ACTIVE; +- if (session_get_state(i) != SESSION_CLOSING) +- all_closing = false; +- } ++ if (u->sessions) { ++ bool all_closing = true; ++ ++ LIST_FOREACH(sessions_by_user, i, u->sessions) { ++ if (session_is_active(i)) ++ return USER_ACTIVE; ++ if (session_get_state(i) != SESSION_CLOSING) ++ all_closing = false; ++ } + +- if (u->sessions) + return all_closing ? USER_CLOSING : USER_ONLINE; ++ } + + if (user_check_linger_file(u) > 0) + return USER_LINGERING; +diff --git a/src/login/logind-user.h b/src/login/logind-user.h +index a36f456..a12532e 100644 +--- a/src/login/logind-user.h ++++ b/src/login/logind-user.h +@@ -61,6 +61,7 @@ struct User { + + bool in_gc_queue:1; + bool started:1; ++ bool stopping:1; + + LIST_HEAD(Session, sessions); + LIST_FIELDS(User, gc_queue); +diff --git a/src/login/logind.c b/src/login/logind.c +index 0628032..5180be7 100644 +--- a/src/login/logind.c ++++ b/src/login/logind.c +@@ -80,10 +80,11 @@ Manager *manager_new(void) { + m->session_fds = hashmap_new(trivial_hash_func, trivial_compare_func); + m->inhibitor_fds = hashmap_new(trivial_hash_func, trivial_compare_func); + m->button_fds = hashmap_new(trivial_hash_func, trivial_compare_func); ++ m->timer_fds = hashmap_new(trivial_hash_func, trivial_compare_func); + + if (!m->devices || !m->seats || !m->sessions || !m->users || !m->inhibitors || !m->buttons || !m->busnames || + !m->user_units || !m->session_units || +- !m->session_fds || !m->inhibitor_fds || !m->button_fds) { ++ !m->session_fds || !m->inhibitor_fds || !m->button_fds || !m->timer_fds) { + manager_free(m); + return NULL; + } +@@ -149,6 +150,7 @@ void manager_free(Manager *m) { + hashmap_free(m->session_fds); + hashmap_free(m->inhibitor_fds); + hashmap_free(m->button_fds); ++ hashmap_free(m->timer_fds); + + if (m->console_active_fd >= 0) + close_nointr_nofail(m->console_active_fd); +@@ -620,6 +622,13 @@ static void manager_dispatch_other(Manager *m, int fd) { + return; + } + ++ s = hashmap_get(m->timer_fds, INT_TO_PTR(fd + 1)); ++ if (s) { ++ assert(s->timer_fd == fd); ++ session_stop(s); ++ return; ++ } ++ + i = hashmap_get(m->inhibitor_fds, INT_TO_PTR(fd + 1)); + if (i) { + assert(i->fifo_fd == fd); +@@ -942,8 +951,12 @@ void manager_gc(Manager *m, bool drop_not_started) { + LIST_REMOVE(Session, gc_queue, m->session_gc_queue, session); + session->in_gc_queue = false; + +- if (session_check_gc(session, drop_not_started) == 0) { ++ /* First, if we are not closing yet, initiate stopping */ ++ if (!session_check_gc(session, drop_not_started) && ++ session_get_state(session) != SESSION_CLOSING) + session_stop(session); ++ ++ if (!session_check_gc(session, drop_not_started)) { + session_finalize(session); + session_free(session); + } +@@ -953,8 +966,11 @@ void manager_gc(Manager *m, bool drop_not_started) { + LIST_REMOVE(User, gc_queue, m->user_gc_queue, user); + user->in_gc_queue = false; + +- if (user_check_gc(user, drop_not_started) == 0) { ++ if (!user_check_gc(user, drop_not_started) && ++ user_get_state(user) != USER_CLOSING) + user_stop(user); ++ ++ if (!user_check_gc(user, drop_not_started)) { + user_finalize(user); + user_free(user); + } +@@ -1032,6 +1048,7 @@ finish: + + return r; + } ++ + int manager_startup(Manager *m) { + int r; + Seat *seat; +diff --git a/src/login/logind.h b/src/login/logind.h +index 9e6296c..0d2248f 100644 +--- a/src/login/logind.h ++++ b/src/login/logind.h +@@ -88,6 +88,7 @@ struct Manager { + Hashmap *session_fds; + Hashmap *inhibitor_fds; + Hashmap *button_fds; ++ Hashmap *timer_fds; + + usec_t inhibit_delay_max; + +@@ -183,9 +184,10 @@ int manager_send_changed(Manager *manager, const char *properties); + + int manager_dispatch_delayed(Manager *manager); + +-int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *kill_mode, DBusError *error, char **job); ++int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, DBusError *error, char **job); + int manager_start_unit(Manager *manager, const char *unit, DBusError *error, char **job); + int manager_stop_unit(Manager *manager, const char *unit, DBusError *error, char **job); ++int manager_abandon_scope(Manager *manager, const char *scope, DBusError *error); + int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, DBusError *error); + int manager_unit_is_active(Manager *manager, const char *unit); + +diff --git a/src/login/pam-module.c b/src/login/pam-module.c +index 22d9733..7bd4783 100644 +--- a/src/login/pam-module.c ++++ b/src/login/pam-module.c +@@ -478,7 +478,7 @@ _public_ PAM_EXTERN int pam_sm_close_session( + int flags, + int argc, const char **argv) { + +- const void *p = NULL, *existing = NULL; ++ const void *existing = NULL; + const char *id; + DBusConnection *bus = NULL; + DBusMessage *m = NULL, *reply = NULL; +@@ -535,12 +535,15 @@ _public_ PAM_EXTERN int pam_sm_close_session( + } + } + ++ ++ /* Note that we are knowingly leaking the FIFO fd here. This ++ * way, logind can watch us die. If we closed it here it would ++ * not have any clue when that is completed. Given that one ++ * cannot really have multiple PAM sessions open from the same ++ * process this means we will leak one FD at max. */ + r = PAM_SUCCESS; + + finish: +- pam_get_data(handle, "systemd.session-fd", &p); +- if (p) +- close_nointr(PTR_TO_INT(p) - 1); + + dbus_error_free(&error); + diff --git a/SOURCES/0208-logind-order-all-scopes-after-both-systemd-logind.se.patch b/SOURCES/0208-logind-order-all-scopes-after-both-systemd-logind.se.patch new file mode 100644 index 0000000..53803da --- /dev/null +++ b/SOURCES/0208-logind-order-all-scopes-after-both-systemd-logind.se.patch @@ -0,0 +1,87 @@ +From 10c5a4fec72a42369af812769802be974af3a012 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 3 Mar 2014 16:07:39 +0100 +Subject: [PATCH] logind: order all scopes after both systemd-logind.service + and systemd-user-sessions.service + +This way at shutdown we can be sure that the sessions go away before the +network. + +Based-on: ba4c5d93b73ef7bba0ae0c6bf2b36a42360f7a34 +--- + src/login/logind-dbus.c | 17 ++++++++++++++--- + src/login/logind-session.c | 2 +- + src/login/logind.h | 2 +- + 3 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index 8de301e..a68e9b4 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -2545,10 +2545,11 @@ int manager_start_scope( + const char *slice, + const char *description, + const char *after, ++ const char *after2, + DBusError *error, + char **job) { + +- const char *timeout_stop_property = "TimeoutStopUSec", *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs"; ++ const char *timeout_stop_property = "TimeoutStopUSec", *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs", *after_property = "After"; + _cleanup_dbus_message_unref_ DBusMessage *m = NULL, *reply = NULL; + DBusMessageIter iter, sub, sub2, sub3, sub4; + uint64_t timeout = 500 * USEC_PER_MSEC; +@@ -2603,8 +2604,6 @@ int manager_start_scope( + } + + if (!isempty(after)) { +- const char *after_property = "After"; +- + if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) || + !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &after_property) || + !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, "as", &sub3) || +@@ -2616,6 +2615,18 @@ int manager_start_scope( + return log_oom(); + } + ++ if (!isempty(after2)) { ++ if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) || ++ !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &after_property) || ++ !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, "as", &sub3) || ++ !dbus_message_iter_open_container(&sub3, DBUS_TYPE_ARRAY, "s", &sub4) || ++ !dbus_message_iter_append_basic(&sub4, DBUS_TYPE_STRING, &after2) || ++ !dbus_message_iter_close_container(&sub3, &sub4) || ++ !dbus_message_iter_close_container(&sub2, &sub3) || ++ !dbus_message_iter_close_container(&sub, &sub2)) ++ return log_oom(); ++ } ++ + /* cgroup empty notification is not available in containers + * currently. To make this less problematic, let's shorten the + * stop timeout for sessions, so that we don't wait +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 78e6d74..2bac0a2 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -518,7 +518,7 @@ static int session_start_scope(Session *s) { + if (!scope) + return log_oom(); + +- r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", &error, &job); ++ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job); + if (r < 0) { + log_error("Failed to start session scope %s: %s %s", + scope, bus_error(&error, r), error.name); +diff --git a/src/login/logind.h b/src/login/logind.h +index 0d2248f..540572f 100644 +--- a/src/login/logind.h ++++ b/src/login/logind.h +@@ -184,7 +184,7 @@ int manager_send_changed(Manager *manager, const char *properties); + + int manager_dispatch_delayed(Manager *manager); + +-int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, DBusError *error, char **job); ++int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, DBusError *error, char **job); + int manager_start_unit(Manager *manager, const char *unit, DBusError *error, char **job); + int manager_stop_unit(Manager *manager, const char *unit, DBusError *error, char **job); + int manager_abandon_scope(Manager *manager, const char *scope, DBusError *error); diff --git a/SOURCES/0209-logind-given-that-we-can-now-relatively-safely-shutd.patch b/SOURCES/0209-logind-given-that-we-can-now-relatively-safely-shutd.patch new file mode 100644 index 0000000..547f5bf --- /dev/null +++ b/SOURCES/0209-logind-given-that-we-can-now-relatively-safely-shutd.patch @@ -0,0 +1,43 @@ +From adc1b71d84ab8b618c623749f43dc6350d75de6b Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 4 Mar 2014 17:00:54 +0100 +Subject: [PATCH] logind: given that we can now relatively safely shutdown + sessions copes without working cgroup empty notifications there's no need to + set the stop timeout of sessions scopes low + +Based-on: a50df72b37ce2a7caf7775c70d18c3f9504b9e80 +--- + src/login/logind-dbus.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index a68e9b4..6cabb7b 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -2549,10 +2549,9 @@ int manager_start_scope( + DBusError *error, + char **job) { + +- const char *timeout_stop_property = "TimeoutStopUSec", *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs", *after_property = "After"; ++ const char *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs", *after_property = "After"; + _cleanup_dbus_message_unref_ DBusMessage *m = NULL, *reply = NULL; + DBusMessageIter iter, sub, sub2, sub3, sub4; +- uint64_t timeout = 500 * USEC_PER_MSEC; + dbus_bool_t send_sighup = true; + const char *fail = "fail"; + uint32_t u; +@@ -2632,14 +2631,6 @@ int manager_start_scope( + * stop timeout for sessions, so that we don't wait + * forever. */ + +- if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) || +- !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &timeout_stop_property) || +- !dbus_message_iter_open_container(&sub2, DBUS_TYPE_VARIANT, "t", &sub3) || +- !dbus_message_iter_append_basic(&sub3, DBUS_TYPE_UINT64, &timeout) || +- !dbus_message_iter_close_container(&sub2, &sub3) || +- !dbus_message_iter_close_container(&sub, &sub2)) +- return log_oom(); +- + /* Make sure that the session shells are terminated with + * SIGHUP since bash and friends tend to ignore SIGTERM */ + if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2) || diff --git a/SOURCES/0210-utmp-make-sure-we-don-t-write-the-utmp-reboot-record.patch b/SOURCES/0210-utmp-make-sure-we-don-t-write-the-utmp-reboot-record.patch new file mode 100644 index 0000000..fdee14a --- /dev/null +++ b/SOURCES/0210-utmp-make-sure-we-don-t-write-the-utmp-reboot-record.patch @@ -0,0 +1,24 @@ +From cd31a2a77cccee55836ae77ac9f436c3764baf88 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 30 Jan 2014 14:37:23 +0100 +Subject: [PATCH] utmp: make sure we don't write the utmp reboot record twice + on each boot + +--- + src/update-utmp/update-utmp.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c +index 202aa98..3606d17 100644 +--- a/src/update-utmp/update-utmp.c ++++ b/src/update-utmp/update-utmp.c +@@ -268,9 +268,6 @@ static int on_runlevel(Context *c) { + return q; + } + +- /* Hmm, we didn't find any runlevel, that means we +- * have been rebooted */ +- r = on_reboot(c); + previous = 0; + } + diff --git a/SOURCES/0211-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch b/SOURCES/0211-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch new file mode 100644 index 0000000..e47f069 --- /dev/null +++ b/SOURCES/0211-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch @@ -0,0 +1,28 @@ +From 4c3ce66158917f3fff65e25b5dde622bff3ec6f8 Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha +Date: Thu, 6 Mar 2014 15:49:55 +0100 +Subject: [PATCH] rules: mark loop device as SYSTEMD_READY=0 if no file is + attached + +Check existence of loop/backing_file in sysfs and mark loop +devices with SYSTEMD_READY if missing. Such loop files is +uninitialized and it's not ready for use yet (there's no file +attached). +--- + rules/99-systemd.rules.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index 0e0a567..0471719 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -25,6 +25,9 @@ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}==" + # Ignore nbd devices in the "add" event, with "change" the nbd is ready + ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0" + ++# Ignore loop devices that don't have any file attached ++ACTION=="add|change", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0" ++ + # We need a hardware independent way to identify network devices. We + # use the /sys/subsystem path for this. Current vanilla kernels don't + # actually support that hierarchy right now, however upcoming kernels diff --git a/SOURCES/0212-logind-fix-reference-to-systemd-user-sessions.servic.patch b/SOURCES/0212-logind-fix-reference-to-systemd-user-sessions.servic.patch new file mode 100644 index 0000000..c4a2f33 --- /dev/null +++ b/SOURCES/0212-logind-fix-reference-to-systemd-user-sessions.servic.patch @@ -0,0 +1,22 @@ +From eed10abd7ed29316dcc0a234506117069c98f949 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Mar 2014 17:47:35 +0100 +Subject: [PATCH] logind: fix reference to systemd-user-sessions.service + +--- + src/login/logind-session.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 2bac0a2..f31961a 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -518,7 +518,7 @@ static int session_start_scope(Session *s) { + if (!scope) + return log_oom(); + +- r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-session.service", &error, &job); ++ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "systemd-logind.service", "systemd-user-sessions.service", &error, &job); + if (r < 0) { + log_error("Failed to start session scope %s: %s %s", + scope, bus_error(&error, r), error.name); diff --git a/SOURCES/0213-logind-add-forgotten-call-to-user_send_changed.patch b/SOURCES/0213-logind-add-forgotten-call-to-user_send_changed.patch new file mode 100644 index 0000000..858c260 --- /dev/null +++ b/SOURCES/0213-logind-add-forgotten-call-to-user_send_changed.patch @@ -0,0 +1,21 @@ +From 4a725025497979ad512e242335360b23fb43b349 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Mar 2014 18:11:45 +0100 +Subject: [PATCH] logind: add forgotten call to user_send_changed() + +--- + src/login/logind-session.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index f31961a..e519d35 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -587,6 +587,7 @@ int session_start(Session *s) { + + /* Send signals */ + session_send_signal(s, true); ++ user_send_changed(s->user, "Sessions\0"); + + if (s->seat) { + if (s->seat->active == s) diff --git a/SOURCES/0214-logind-save-session-after-setting-the-stopping-flag.patch b/SOURCES/0214-logind-save-session-after-setting-the-stopping-flag.patch new file mode 100644 index 0000000..8e10f41 --- /dev/null +++ b/SOURCES/0214-logind-save-session-after-setting-the-stopping-flag.patch @@ -0,0 +1,25 @@ +From 66cd858045170353359d05dd0b4d259d6059de72 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Mar 2014 18:22:55 +0100 +Subject: [PATCH] logind: save session after setting the stopping flag + +--- + src/login/logind-session.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index e519d35..3ab41e6 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -682,10 +682,9 @@ int session_stop(Session *s) { + /* Kill cgroup */ + r = session_stop_scope(s); + +- session_save(s); +- + s->stopping = true; + ++ session_save(s); + return r; + } + diff --git a/SOURCES/0215-logind-save-user-state-after-stopping-the-session.patch b/SOURCES/0215-logind-save-user-state-after-stopping-the-session.patch new file mode 100644 index 0000000..ea53156 --- /dev/null +++ b/SOURCES/0215-logind-save-user-state-after-stopping-the-session.patch @@ -0,0 +1,22 @@ +From 34c3bd12815064d0d3820ac0b30c0952ba5fd1fe Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 10 Mar 2014 18:26:34 +0100 +Subject: [PATCH] logind: save user state after stopping the session + +--- + src/login/logind-session.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 3ab41e6..2a2a670 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -685,6 +685,8 @@ int session_stop(Session *s) { + s->stopping = true; + + session_save(s); ++ user_save(s); ++ + return r; + } + diff --git a/SOURCES/0216-logind-initialize-timer_fd.patch b/SOURCES/0216-logind-initialize-timer_fd.patch new file mode 100644 index 0000000..19d5cac --- /dev/null +++ b/SOURCES/0216-logind-initialize-timer_fd.patch @@ -0,0 +1,21 @@ +From fe828286b888871e18bc68173cd281619bd7b4b2 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 11 Mar 2014 13:26:38 +0100 +Subject: [PATCH] logind: initialize timer_fd + +--- + src/login/logind-session.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 2a2a670..d7c3187 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -89,6 +89,7 @@ Session* session_new(Manager *m, const char *id) { + + s->manager = m; + s->fifo_fd = -1; ++ s->timer_fd = -1; + + return s; + } diff --git a/SOURCES/0217-service-don-t-create-extra-cgroup-for-control-proces.patch b/SOURCES/0217-service-don-t-create-extra-cgroup-for-control-proces.patch new file mode 100644 index 0000000..c7ffdb4 --- /dev/null +++ b/SOURCES/0217-service-don-t-create-extra-cgroup-for-control-proces.patch @@ -0,0 +1,46 @@ +From d09b7328c7757cebdc2fb0032361c086733bd3f7 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 10 Mar 2014 15:11:29 +0100 +Subject: [PATCH] service: don't create extra cgroup for control process when + reloading SysV service + +Unfortunately common practice in initscripts is to have reload as an +alias for restart (https://fedoraproject.org/wiki/Packaging:SysVInitScript). +In that case the newly started process will be killed immediately after +the reload process ends and its cgroup is destroyed. +--- + src/core/service.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 41e5cb5..dff5286 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -2353,7 +2353,15 @@ static void service_enter_reload(Service *s) { + !s->root_directory_start_only, + false, + false, ++#ifdef HAVE_SYSV_COMPAT ++ /* Don't create extra cgroup for SysV services. ++ * Unfortunately common practice was to have reload as an alias ++ * for restart and we are killing the new main process, when destroying ++ * cgroup for the control process*/ ++ !s->is_sysv, ++#else + true, ++#endif + &s->control_pid); + if (r < 0) + goto fail; +@@ -3174,7 +3182,10 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { + /* Immediately get rid of the cgroup, so that the + * kernel doesn't delay the cgroup empty messages for + * the service cgroup any longer than necessary */ +- service_kill_control_processes(s); ++#ifdef HAVE_SYSV_COMPAT ++ if (!s->is_sysv) ++#endif ++ service_kill_control_processes(s); + + if (s->control_command && + s->control_command->command_next && diff --git a/SOURCES/0218-logind-pass-pointer-to-User-object-to-user_save.patch b/SOURCES/0218-logind-pass-pointer-to-User-object-to-user_save.patch new file mode 100644 index 0000000..a9deb00 --- /dev/null +++ b/SOURCES/0218-logind-pass-pointer-to-User-object-to-user_save.patch @@ -0,0 +1,22 @@ +From 83062f40f3e39d089396ad7918620ecab8534179 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 11 Mar 2014 20:42:42 +0100 +Subject: [PATCH] logind: pass pointer to User object to user_save() + +--- + src/login/logind-session.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index d7c3187..b0e4bf6 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -686,7 +686,7 @@ int session_stop(Session *s) { + s->stopping = true; + + session_save(s); +- user_save(s); ++ user_save(s->user); + + return r; + } diff --git a/SOURCES/0219-fstab-generator-When-parsing-the-root-cmdline-option.patch b/SOURCES/0219-fstab-generator-When-parsing-the-root-cmdline-option.patch new file mode 100644 index 0000000..2f4467c --- /dev/null +++ b/SOURCES/0219-fstab-generator-When-parsing-the-root-cmdline-option.patch @@ -0,0 +1,26 @@ +From 42f30a9750ca939f1e805d5fb7790cd8dd3dee62 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Mon, 30 Sep 2013 00:32:33 +0200 +Subject: [PATCH] fstab-generator: When parsing the root= cmdline option, set + FsckPassNo to 1 + +[tomegun: without this we would never fsck the rootfs if it was directly +mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it +is mounted 'ro', so that should be addressed in a separate patch.] +--- + src/fstab-generator/fstab-generator.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 9efccb9..6cecb4e 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -449,7 +449,7 @@ static int parse_new_root_from_proc_cmdline(void) { + } + + log_debug("Found entry what=%s where=/sysroot type=%s", what, type); +- r = add_mount(what, "/sysroot", type, opts, 0, noauto, nofail, false, ++ r = add_mount(what, "/sysroot", type, opts, 1, noauto, nofail, false, + SPECIAL_INITRD_ROOT_FS_TARGET, "/proc/cmdline"); + + return (r < 0) ? r : 0; diff --git a/SOURCES/0220-gpt-auto-generator-Generate-explicit-dependencies-on.patch b/SOURCES/0220-gpt-auto-generator-Generate-explicit-dependencies-on.patch new file mode 100644 index 0000000..5f88f3d --- /dev/null +++ b/SOURCES/0220-gpt-auto-generator-Generate-explicit-dependencies-on.patch @@ -0,0 +1,52 @@ +From 23623890843b81c5d0bd6115ae1f458539b2d43b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Mon, 30 Sep 2013 01:34:45 +0200 +Subject: [PATCH] gpt-auto-generator: Generate explicit dependencies on + systemd-fsck@.service instead of using FsckPassNo + +[tomegun: check for OOM] +--- + src/gpt-auto-generator/gpt-auto-generator.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c +index f1749be..adbf71d 100644 +--- a/src/gpt-auto-generator/gpt-auto-generator.c ++++ b/src/gpt-auto-generator/gpt-auto-generator.c +@@ -179,7 +179,7 @@ static int add_swap(const char *path, const char *fstype) { + } + + static int add_home(const char *path, const char *fstype) { +- _cleanup_free_ char *unit = NULL, *lnk = NULL; ++ _cleanup_free_ char *unit = NULL, *lnk = NULL, *fsck = NULL; + _cleanup_fclose_ FILE *f = NULL; + + if (dir_is_empty("/home") <= 0) +@@ -197,19 +197,23 @@ static int add_home(const char *path, const char *fstype) { + return -errno; + } + ++ fsck = unit_name_from_path_instance("systemd-fsck", path, ".service"); ++ if (!fsck) ++ return log_oom(); ++ + fprintf(f, + "# Automatically generated by systemd-gpt-auto-generator\n\n" + "[Unit]\n" + "DefaultDependencies=no\n" +- "After=" SPECIAL_LOCAL_FS_PRE_TARGET "\n" ++ "Requires=%s\n" ++ "After=" SPECIAL_LOCAL_FS_PRE_TARGET " %s\n" + "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" + "Before=" SPECIAL_UMOUNT_TARGET " " SPECIAL_LOCAL_FS_TARGET "\n\n" + "[Mount]\n" + "What=%s\n" + "Where=/home\n" +- "Type=%s\n" +- "FsckPassNo=2\n", +- path, fstype); ++ "Type=%s\n", ++ fsck, fsck, path, fstype); + + fflush(f); + if (ferror(f)) { diff --git a/SOURCES/0221-fstab-generator-Generate-explicit-dependencies-on-sy.patch b/SOURCES/0221-fstab-generator-Generate-explicit-dependencies-on-sy.patch new file mode 100644 index 0000000..7404814 --- /dev/null +++ b/SOURCES/0221-fstab-generator-Generate-explicit-dependencies-on-sy.patch @@ -0,0 +1,108 @@ +From 8a9eab141ab379c658fc198fb0b0ee4ca3bdd1d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20B=C3=A4chler?= +Date: Mon, 30 Sep 2013 01:34:44 +0200 +Subject: [PATCH] fstab-generator: Generate explicit dependencies on + systemd-fsck@.service instead of using FsckPassNo + +[tomegun: + * order all fsck instances after fsck-root + * check for OOM + * added notes in the manpages] + +Conflicts: + man/systemd-fsck@.service.xml + man/systemd-fstab-generator.xml +--- + man/systemd-fsck@.service.xml | 4 +--- + man/systemd-fstab-generator.xml | 9 ++++----- + src/fstab-generator/fstab-generator.c | 21 +++++++++++++++++---- + units/systemd-fsck@.service.in | 2 +- + 4 files changed, 23 insertions(+), 13 deletions(-) + +diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml +index c653dc5..17bd1c0 100644 +--- a/man/systemd-fsck@.service.xml ++++ b/man/systemd-fsck@.service.xml +@@ -63,9 +63,7 @@ + check. systemd-fsck-root.service is + responsible for file system checks on the root + file system. The root file system check is performed +- before the other file systems. Either service is enabled +- at boot if passno in /etc/fstab for +- the file system is set to a value greater than zero. ++ before the other file systems. + + systemd-fsck will + forward file system checking progress to the +diff --git a/man/systemd-fstab-generator.xml b/man/systemd-fstab-generator.xml +index e3cf5d2..740db8f 100644 +--- a/man/systemd-fstab-generator.xml ++++ b/man/systemd-fstab-generator.xml +@@ -61,11 +61,10 @@ + reloaded. This will instantiate mount and swap units + as necessary. + +- The passno field is treated +- like a simple boolean, and the ordering information is +- discarded. However, if the root file system is +- checked, it is checked before all the other +- file systems. ++ The passno field ++ is treated like a simlpe boolean, and the ordering information ++ is discarded. However, the root filesystem is checked ++ before all the other filesystems. + + See + systemd.mount5 +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 6cecb4e..7874ff1 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -209,17 +209,30 @@ static int add_mount( + "Before=%s\n", + post); + ++ if (passno > 0) { ++ _cleanup_free_ char *fsck = NULL; ++ ++ fsck = unit_name_from_path_instance("systemd-fsck", what, ".service"); ++ if (!fsck) ++ return log_oom(); ++ ++ fprintf(f, ++ "Requires=%s\n" ++ "After=%s\n", ++ fsck, ++ fsck); ++ } ++ ++ + fprintf(f, + "\n" + "[Mount]\n" + "What=%s\n" + "Where=%s\n" +- "Type=%s\n" +- "FsckPassNo=%i\n", ++ "Type=%s\n", + what, + where, +- type, +- passno); ++ type); + + if (!isempty(opts) && + !streq(opts, "defaults")) +diff --git a/units/systemd-fsck@.service.in b/units/systemd-fsck@.service.in +index e229cdc..c12efa8 100644 +--- a/units/systemd-fsck@.service.in ++++ b/units/systemd-fsck@.service.in +@@ -10,7 +10,7 @@ Description=File System Check on %f + 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 systemd-fsck-root.service + Before=shutdown.target + + [Service] diff --git a/SOURCES/0222-fsck-root-only-run-when-requested-in-fstab.patch b/SOURCES/0222-fsck-root-only-run-when-requested-in-fstab.patch new file mode 100644 index 0000000..21d7714 --- /dev/null +++ b/SOURCES/0222-fsck-root-only-run-when-requested-in-fstab.patch @@ -0,0 +1,92 @@ +From 8610788332cb6492d8e5275b32200db4138401bb Mon Sep 17 00:00:00 2001 +From: Tom Gundersen +Date: Sat, 19 Oct 2013 11:38:42 +0200 +Subject: [PATCH] fsck-root: only run when requested in fstab + +fsck-root is redundant in case an initrd is used, or in case the rootfs +is never remounted 'rw', so the new default is the correct behavior for +most users. For the rest, they should enable it in fstab. +--- + Makefile.am | 1 - + man/systemd-fsck@.service.xml | 4 +++- + src/fstab-generator/fstab-generator.c | 31 ++++++++++++++++++++++--------- + 3 files changed, 25 insertions(+), 11 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index df63275..fa2fba6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4415,7 +4415,6 @@ SYSINIT_TARGET_WANTS += \ + systemd-update-utmp.service + LOCAL_FS_TARGET_WANTS += \ + systemd-remount-fs.service \ +- systemd-fsck-root.service \ + tmp.mount + MULTI_USER_TARGET_WANTS += \ + getty.target \ +diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml +index 17bd1c0..811392b 100644 +--- a/man/systemd-fsck@.service.xml ++++ b/man/systemd-fsck@.service.xml +@@ -63,7 +63,9 @@ + check. systemd-fsck-root.service is + responsible for file system checks on the root + file system. The root file system check is performed +- before the other file systems. ++ before the other file systems. Either service is enabled ++ at boot if passno in /etc/fstab for ++ the filesystem is set to a value greater than zero. + + systemd-fsck will + forward file system checking progress to the +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 7874ff1..c0c2992 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -210,17 +210,29 @@ static int add_mount( + post); + + if (passno > 0) { +- _cleanup_free_ char *fsck = NULL; ++ if (streq(where, "/")) { ++ lnk = strjoin(arg_dest, "/", SPECIAL_LOCAL_FS_TARGET, ".wants/", "systemd-fsck-root.service", NULL); ++ if (!lnk) ++ return log_oom(); + +- fsck = unit_name_from_path_instance("systemd-fsck", what, ".service"); +- if (!fsck) +- return log_oom(); ++ mkdir_parents_label(lnk, 0755); ++ if (symlink("systemd-fsck-root.service", lnk) < 0) { ++ log_error("Failed to create symlink %s: %m", lnk); ++ return -errno; ++ } ++ } else { ++ _cleanup_free_ char *fsck = NULL; + +- fprintf(f, +- "Requires=%s\n" +- "After=%s\n", +- fsck, +- fsck); ++ fsck = unit_name_from_path_instance("systemd-fsck", what, ".service"); ++ if (!fsck) ++ return log_oom(); ++ ++ fprintf(f, ++ "Requires=%s\n" ++ "After=%s\n", ++ fsck, ++ fsck); ++ } + } + + +@@ -248,6 +260,7 @@ static int add_mount( + + if (!noauto) { + if (post) { ++ free(lnk); + lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); + if (!lnk) + return log_oom(); diff --git a/SOURCES/0223-core-allow-PIDs-to-be-watched-by-two-units-at-the-sa.patch b/SOURCES/0223-core-allow-PIDs-to-be-watched-by-two-units-at-the-sa.patch new file mode 100644 index 0000000..62ebf31 --- /dev/null +++ b/SOURCES/0223-core-allow-PIDs-to-be-watched-by-two-units-at-the-sa.patch @@ -0,0 +1,360 @@ +From 49bfaaa65107a9d79fbb1276e44fd4e3c98b0e9c Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 7 Feb 2014 11:58:25 +0100 +Subject: [PATCH] core: allow PIDs to be watched by two units at the same time + +In some cases it is interesting to map a PID to two units at the same +time. For example, when a user logs in via a getty, which is reexeced to +/sbin/login that binary will be explicitly referenced as main pid of the +getty service, as well as implicitly referenced as part of the session +scope. + +Conflicts: + src/core/manager.c + src/core/manager.h +--- + src/core/manager.c | 201 ++++++++++++++++++++++++++++++----------------------- + src/core/manager.h | 9 ++- + src/core/unit.c | 28 ++++++-- + 3 files changed, 142 insertions(+), 96 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index db5094f..2829c95 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -525,7 +525,10 @@ int manager_new(SystemdRunningAs running_as, bool reexecuting, Manager **_m) { + if (!(m->jobs = hashmap_new(trivial_hash_func, trivial_compare_func))) + goto fail; + +- if (!(m->watch_pids = hashmap_new(trivial_hash_func, trivial_compare_func))) ++ if (!(m->watch_pids1 = hashmap_new(trivial_hash_func, trivial_compare_func))) ++ goto fail; ++ ++ if (!(m->watch_pids2 = hashmap_new(trivial_hash_func, trivial_compare_func))) + goto fail; + + m->cgroup_unit = hashmap_new(string_hash_func, string_compare_func); +@@ -740,7 +743,8 @@ void manager_free(Manager *m) { + + hashmap_free(m->units); + hashmap_free(m->jobs); +- hashmap_free(m->watch_pids); ++ hashmap_free(m->watch_pids1); ++ hashmap_free(m->watch_pids2); + hashmap_free(m->watch_bus); + + if (m->epoll_fd >= 0) +@@ -1247,6 +1251,26 @@ unsigned manager_dispatch_dbus_queue(Manager *m) { + return n; + } + ++static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, char *buf, size_t n) { ++ _cleanup_strv_free_ char **tags = NULL; ++ ++ assert(m); ++ assert(u); ++ assert(buf); ++ assert(n > 0); ++ ++ tags = strv_split(buf, "\n\r"); ++ if (!tags) { ++ log_oom(); ++ return; ++ } ++ ++ log_debug_unit(u->id, "Got notification message for unit %s", u->id); ++ ++ if (UNIT_VTABLE(u)->notify_message) ++ UNIT_VTABLE(u)->notify_message(u, pid, tags); ++} ++ + static int manager_process_notify_fd(Manager *m) { + ssize_t n; + +@@ -1259,6 +1283,8 @@ static int manager_process_notify_fd(Manager *m) { + .iov_len = sizeof(buf)-1, + }; + ++ bool found = false; ++ + union { + struct cmsghdr cmsghdr; + uint8_t buf[CMSG_SPACE(sizeof(struct ucred))]; +@@ -1272,7 +1298,6 @@ static int manager_process_notify_fd(Manager *m) { + }; + struct ucred *ucred; + Unit *u; +- _cleanup_strv_free_ char **tags = NULL; + + n = recvmsg(m->notify_watch.fd, &msghdr, MSG_DONTWAIT); + if (n <= 0) { +@@ -1295,105 +1320,105 @@ static int manager_process_notify_fd(Manager *m) { + + ucred = (struct ucred*) CMSG_DATA(&control.cmsghdr); + +- u = hashmap_get(m->watch_pids, LONG_TO_PTR(ucred->pid)); +- if (!u) { +- u = manager_get_unit_by_pid(m, ucred->pid); +- if (!u) { +- log_warning("Cannot find unit for notify message of PID %lu.", (unsigned long) ucred->pid); +- continue; +- } +- } +- + assert((size_t) n < sizeof(buf)); + buf[n] = 0; +- tags = strv_split(buf, "\n\r"); +- if (!tags) +- return log_oom(); +- +- log_debug_unit(u->id, "Got notification message for unit %s", u->id); +- +- if (UNIT_VTABLE(u)->notify_message) +- UNIT_VTABLE(u)->notify_message(u, ucred->pid, tags); +- } +- +- return 0; +-} +- +-static int manager_dispatch_sigchld(Manager *m) { +- assert(m); +- +- for (;;) { +- siginfo_t si = {}; +- Unit *u; +- int r; +- +- /* First we call waitd() for a PID and do not reap the +- * zombie. That way we can still access /proc/$PID for +- * it while it is a zombie. */ +- if (waitid(P_ALL, 0, &si, WEXITED|WNOHANG|WNOWAIT) < 0) { +- +- if (errno == ECHILD) +- break; + +- if (errno == EINTR) +- continue; +- +- return -errno; ++ u = manager_get_unit_by_pid(m, ucred->pid); ++ if (u) { ++ manager_invoke_notify_message(m, u, ucred->pid, buf, n); ++ found = true; + } + +- if (si.si_pid <= 0) +- break; +- +- if (si.si_code == CLD_EXITED || si.si_code == CLD_KILLED || si.si_code == CLD_DUMPED) { +- _cleanup_free_ char *name = NULL; +- +- get_process_comm(si.si_pid, &name); +- log_debug("Got SIGCHLD for process %lu (%s)", (unsigned long) si.si_pid, strna(name)); ++ u = hashmap_get(m->watch_pids1, LONG_TO_PTR(ucred->pid)); ++ if (u) { ++ manager_invoke_notify_message(m, u, ucred->pid, buf, n); ++ found = true; + } + +- /* Let's flush any message the dying child might still +- * have queued for us. This ensures that the process +- * still exists in /proc so that we can figure out +- * which cgroup and hence unit it belongs to. */ +- r = manager_process_notify_fd(m); +- if (r < 0) +- return r; +- +- /* And now figure out the unit this belongs to */ +- u = hashmap_get(m->watch_pids, LONG_TO_PTR(si.si_pid)); +- if (!u) +- u = manager_get_unit_by_pid(m, si.si_pid); +- +- /* And now, we actually reap the zombie. */ +- if (waitid(P_PID, si.si_pid, &si, WEXITED) < 0) { +- if (errno == EINTR) +- continue; +- +- return -errno; ++ u = hashmap_get(m->watch_pids2, LONG_TO_PTR(ucred->pid)); ++ if (u) { ++ manager_invoke_notify_message(m, u, ucred->pid, buf, n); ++ found = true; + } + +- if (si.si_code != CLD_EXITED && si.si_code != CLD_KILLED && si.si_code != CLD_DUMPED) +- continue; ++ if (!found) ++ log_warning("Cannot find unit for notify message of PID %lu.",(long unsigned) ucred->pid); ++ } + +- log_debug("Child %lu died (code=%s, status=%i/%s)", +- (long unsigned) si.si_pid, +- sigchld_code_to_string(si.si_code), +- si.si_status, +- strna(si.si_code == CLD_EXITED +- ? exit_status_to_string(si.si_status, EXIT_STATUS_FULL) +- : signal_to_string(si.si_status))); ++ return 0; ++} + +- if (!u) +- continue; ++static void invoke_sigchld_event(Manager *m, Unit *u, siginfo_t *si) { ++ assert(m); ++ assert(u); ++ assert(si); + +- log_debug_unit(u->id, +- "Child %lu belongs to %s", (long unsigned) si.si_pid, u->id); ++ log_debug_unit(u->id, "Child %lu belongs to %s",(long unsigned) si->si_pid, u->id); + +- unit_unwatch_pid(u, si.si_pid); +- UNIT_VTABLE(u)->sigchld_event(u, si.si_pid, si.si_code, si.si_status); +- } ++ unit_unwatch_pid(u, si->si_pid); ++ UNIT_VTABLE(u)->sigchld_event(u, si->si_pid, si->si_code, si->si_status); ++} + +- return 0; ++static int manager_dispatch_sigchld(Manager *m) { ++ assert(m); ++ ++ for (;;) { ++ siginfo_t si = {}; ++ ++ /* First we call waitd() for a PID and do not reap the ++ * zombie. That way we can still access /proc/$PID for ++ * it while it is a zombie. */ ++ if (waitid(P_ALL, 0, &si, WEXITED|WNOHANG|WNOWAIT) < 0) { ++ ++ if (errno == ECHILD) ++ break; ++ ++ if (errno == EINTR) ++ continue; ++ ++ return -errno; ++ } ++ ++ if (si.si_pid <= 0) ++ break; ++ ++ if (si.si_code == CLD_EXITED || si.si_code == CLD_KILLED || si.si_code == CLD_DUMPED) { ++ _cleanup_free_ char *name = NULL; ++ Unit *u; ++ ++ get_process_comm(si.si_pid, &name); ++ ++ log_debug("Child %lu (%s) died (code=%s, status=%i/%s)", ++ (long unsigned) si.si_pid, strna(name), ++ sigchld_code_to_string(si.si_code), ++ si.si_status, ++ strna(si.si_code == CLD_EXITED ++ ? exit_status_to_string(si.si_status, EXIT_STATUS_FULL) ++ : signal_to_string(si.si_status))); ++ ++ /* And now figure out the unit this belongs ++ * to, it might be multiple... */ ++ u = manager_get_unit_by_pid(m, si.si_pid); ++ if (u) ++ invoke_sigchld_event(m, u, &si); ++ u = hashmap_get(m->watch_pids1, LONG_TO_PTR(si.si_pid)); ++ if (u) ++ invoke_sigchld_event(m, u, &si); ++ u = hashmap_get(m->watch_pids2, LONG_TO_PTR(si.si_pid)); ++ if (u) ++ invoke_sigchld_event(m, u, &si); ++ } ++ ++ /* And now, we actually reap the zombie. */ ++ if (waitid(P_PID, si.si_pid, &si, WEXITED) < 0) { ++ if (errno == EINTR) ++ continue; ++ ++ return -errno; ++ } ++ } ++ ++ return 0; + } + + static int manager_start_target(Manager *m, const char *name, JobMode mode) { +diff --git a/src/core/manager.h b/src/core/manager.h +index ee42c5e..0133ea5 100644 +--- a/src/core/manager.h ++++ b/src/core/manager.h +@@ -125,7 +125,14 @@ struct Manager { + /* Units that should be realized */ + LIST_HEAD(Unit, cgroup_queue); + +- Hashmap *watch_pids; /* pid => Unit object n:1 */ ++ /* We use two hash tables here, since the same PID might be ++ * watched by two different units: once the unit that forked ++ * it off, and possibly a different unit to which it was ++ * joined as cgroup member. Since we know that it is either ++ * one or two units for each PID we just use to hashmaps ++ * here. */ ++ Hashmap *watch_pids1; /* pid => Unit object n:1 */ ++ Hashmap *watch_pids2; /* pid => Unit object n:1 */ + + char *notify_socket; + +diff --git a/src/core/unit.c b/src/core/unit.c +index 0332094..a510eb2 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -1665,16 +1665,27 @@ int unit_watch_pid(Unit *u, pid_t pid) { + assert(u); + assert(pid >= 1); + ++ /* Watch a specific PID. We only support one or two units ++ * watching each PID for now, not more. */ ++ ++ r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func); ++ if (r < 0) ++ return r; ++ + r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); + if (r < 0) + return r; + +- /* Watch a specific PID. We only support one unit watching +- * each PID for now. */ ++ r = hashmap_put(u->manager->watch_pids1, LONG_TO_PTR(pid), u); ++ if (r == -EEXIST) { ++ r = hashmap_ensure_allocated(&u->manager->watch_pids2, trivial_hash_func, trivial_compare_func); ++ if (r < 0) ++ return r; + +- r = set_put(u->pids, LONG_TO_PTR(pid)); ++ r = hashmap_put(u->manager->watch_pids2, LONG_TO_PTR(pid), u); ++ } + +- q = hashmap_put(u->manager->watch_pids, LONG_TO_PTR(pid), u); ++ q = set_put(u->pids, LONG_TO_PTR(pid)); + if (q < 0) + return q; + +@@ -1685,7 +1696,8 @@ void unit_unwatch_pid(Unit *u, pid_t pid) { + assert(u); + assert(pid >= 1); + +- hashmap_remove_value(u->manager->watch_pids, LONG_TO_PTR(pid), u); ++ hashmap_remove_value(u->manager->watch_pids1, LONG_TO_PTR(pid), u); ++ hashmap_remove_value(u->manager->watch_pids2, LONG_TO_PTR(pid), u); + set_remove(u->pids, LONG_TO_PTR(pid)); + } + +@@ -1758,8 +1770,10 @@ void unit_unwatch_all_pids(Unit *u) { + + assert(u); + +- SET_FOREACH(e, u->pids, i) +- hashmap_remove_value(u->manager->watch_pids, e, u); ++ SET_FOREACH(e, u->pids, i) { ++ hashmap_remove_value(u->manager->watch_pids1, e, u); ++ hashmap_remove_value(u->manager->watch_pids2, e, u); ++ } + + set_free(u->pids); + u->pids = NULL; diff --git a/SOURCES/0224-core-correctly-unregister-PIDs-from-PID-hashtables.patch b/SOURCES/0224-core-correctly-unregister-PIDs-from-PID-hashtables.patch new file mode 100644 index 0000000..19726e6 --- /dev/null +++ b/SOURCES/0224-core-correctly-unregister-PIDs-from-PID-hashtables.patch @@ -0,0 +1,97 @@ +From 8581dc72de05227a236b6ff3751c40f1e0be1b2f Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 6 Mar 2014 02:19:42 +0100 +Subject: [PATCH] core: correctly unregister PIDs from PID hashtables + +Conflicts: + src/core/unit.c +--- + src/core/unit.c | 41 ++++++++++++++++++----------------------- + 1 file changed, 18 insertions(+), 23 deletions(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index a510eb2..6ee34ec 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -1668,11 +1668,11 @@ int unit_watch_pid(Unit *u, pid_t pid) { + /* Watch a specific PID. We only support one or two units + * watching each PID for now, not more. */ + +- r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func); ++ r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); + if (r < 0) + return r; + +- r = set_ensure_allocated(&u->pids, trivial_hash_func, trivial_compare_func); ++ r = hashmap_ensure_allocated(&u->manager->watch_pids1, trivial_hash_func, trivial_compare_func); + if (r < 0) + return r; + +@@ -1701,7 +1701,17 @@ void unit_unwatch_pid(Unit *u, pid_t pid) { + set_remove(u->pids, LONG_TO_PTR(pid)); + } + +-static int watch_pids_in_path(Unit *u, const char *path) { ++void unit_unwatch_all_pids(Unit *u) { ++ assert(u); ++ ++ while (!set_isempty(u->pids)) ++ unit_unwatch_pid(u, PTR_TO_LONG(set_first(u->pids))); ++ ++ set_free(u->pids); ++ u->pids = NULL; ++} ++ ++static int unit_watch_pids_in_path(Unit *u, const char *path) { + _cleanup_closedir_ DIR *d = NULL; + _cleanup_fclose_ FILE *f = NULL; + int ret = 0, r; +@@ -1739,7 +1749,7 @@ static int watch_pids_in_path(Unit *u, const char *path) { + if (!p) + return -ENOMEM; + +- r = watch_pids_in_path(u, p); ++ r = unit_watch_pids_in_path(u, p); + if (r < 0 && ret >= 0) + ret = r; + } +@@ -1756,27 +1766,12 @@ static int watch_pids_in_path(Unit *u, const char *path) { + int unit_watch_all_pids(Unit *u) { + assert(u); + +- if (!u->cgroup_path) +- return -ENOENT; +- + /* Adds all PIDs from our cgroup to the set of PIDs we watch */ + +- return watch_pids_in_path(u, u->cgroup_path); +-} +- +-void unit_unwatch_all_pids(Unit *u) { +- Iterator i; +- void *e; +- +- assert(u); +- +- SET_FOREACH(e, u->pids, i) { +- hashmap_remove_value(u->manager->watch_pids1, e, u); +- hashmap_remove_value(u->manager->watch_pids2, e, u); +- } ++ if (!u->cgroup_path) ++ return -ENOENT; + +- set_free(u->pids); +- u->pids = NULL; ++ return unit_watch_pids_in_path(u, u->cgroup_path); + } + + void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { +@@ -1794,7 +1789,7 @@ void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { + continue; + + if (kill(pid, 0) < 0 && errno == ESRCH) +- set_remove(u->pids, e); ++ unit_unwatch_pid(u, pid); + } + } + diff --git a/SOURCES/0225-logind-uninitialized-timer_fd-is-set-to-1.patch b/SOURCES/0225-logind-uninitialized-timer_fd-is-set-to-1.patch new file mode 100644 index 0000000..214ad91 --- /dev/null +++ b/SOURCES/0225-logind-uninitialized-timer_fd-is-set-to-1.patch @@ -0,0 +1,22 @@ +From 855cfba6fb79066f46f02bbab09d498eda0d7cdd Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 13 Mar 2014 11:16:36 +0100 +Subject: [PATCH] logind: uninitialized timer_fd is set to -1 + +--- + src/login/logind-session.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index b0e4bf6..730f11d 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -657,7 +657,7 @@ static int session_unlink_x11_socket(Session *s) { + static void session_close_timer_fd(Session *s) { + assert(s); + +- if (s->timer_fd <= 0) ++ if (s->timer_fd < 0) + return; + + hashmap_remove(s->manager->timer_fds, INT_TO_PTR(s->timer_fd + 1)); diff --git a/SOURCES/0226-logind-add-forgotten-return-statement.patch b/SOURCES/0226-logind-add-forgotten-return-statement.patch new file mode 100644 index 0000000..dc11357 --- /dev/null +++ b/SOURCES/0226-logind-add-forgotten-return-statement.patch @@ -0,0 +1,22 @@ +From bb13793eb734f73c4faba11d4d90077c977ec673 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 13 Mar 2014 11:18:27 +0100 +Subject: [PATCH] logind: add forgotten return statement + +--- + src/login/logind-session.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index 730f11d..ece222a 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -782,6 +782,8 @@ void session_release(Session *s) { + goto out; + } + ++ return; ++ + out: + if (s->timer_fd >= 0) { + close_nointr(s->timer_fd); diff --git a/SOURCES/0227-core-remove-extra-semicolon-and-make-gcc-shut-up.patch b/SOURCES/0227-core-remove-extra-semicolon-and-make-gcc-shut-up.patch new file mode 100644 index 0000000..96c3003 --- /dev/null +++ b/SOURCES/0227-core-remove-extra-semicolon-and-make-gcc-shut-up.patch @@ -0,0 +1,22 @@ +From dce7f7c81bebf628623aad4a666fef6449294a8e Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Thu, 13 Mar 2014 11:25:45 +0100 +Subject: [PATCH] core: remove extra semicolon and make gcc shut up + +--- + 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 62ec7fe..3672338 100644 +--- a/src/core/mount.c ++++ b/src/core/mount.c +@@ -1414,7 +1414,7 @@ static int mount_add_one( + bool set_flags) { + int r; + Unit *u; +- bool delete, changed = false;; ++ bool delete, changed = false; + char *e, *w = NULL, *o = NULL, *f = NULL; + MountParameters *p; + bool load_extras = false; diff --git a/SOURCES/0228-core-fix-detection-of-dead-processes.patch b/SOURCES/0228-core-fix-detection-of-dead-processes.patch new file mode 100644 index 0000000..9c35a9b --- /dev/null +++ b/SOURCES/0228-core-fix-detection-of-dead-processes.patch @@ -0,0 +1,87 @@ +From f04488d2842544de263e245ee1a21e789ec818a8 Mon Sep 17 00:00:00 2001 +From: Yuxuan Shui +Date: Sat, 15 Feb 2014 02:38:50 +0800 +Subject: [PATCH] core: fix detection of dead processes + +Commit 5ba6985b moves the UNIT_VTABLE(u)->sigchld_event before systemd +actually reaps the zombie. Which leads to service_load_pid_file accepting +zombie as a valid pid. + +This fixes timeouts like: +[ 2746.602243] systemd[1]: chronyd.service stop-sigterm timed out. Killing. +[ 2836.852545] systemd[1]: chronyd.service still around after SIGKILL. Ignoring. +[ 2927.102187] systemd[1]: chronyd.service stop-final-sigterm timed out. Killing. +[ 3017.352560] systemd[1]: chronyd.service still around after final SIGKILL. Entering failed mode. +--- + src/core/service.c | 8 ++++++++ + src/shared/util.c | 25 +++++++++++++++++++++++++ + src/shared/util.h | 1 + + 3 files changed, 34 insertions(+) + +diff --git a/src/core/service.c b/src/core/service.c +index dff5286..3eacf3b 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -1429,6 +1429,14 @@ static int service_load_pid_file(Service *s, bool may_warn) { + return -ESRCH; + } + ++ if (get_process_state(pid) == 'Z') { ++ if (may_warn) ++ log_info_unit(UNIT(s)->id, ++ "PID "PID_FMT" read from file %s is a zombie.", ++ pid, s->pid_file); ++ return -ESRCH; ++ } ++ + if (s->main_pid_known) { + if (pid == s->main_pid) + return 0; +diff --git a/src/shared/util.c b/src/shared/util.c +index 2086847..090a204 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -558,6 +558,31 @@ char *truncate_nl(char *s) { + return s; + } + ++int get_process_state(pid_t pid) { ++ const char *p; ++ char state; ++ int r; ++ _cleanup_free_ char *line = NULL; ++ ++ assert(pid >= 0); ++ ++ p = procfs_file_alloca(pid, "stat"); ++ r = read_one_line_file(p, &line); ++ if (r < 0) ++ return r; ++ ++ p = strrchr(line, ')'); ++ if (!p) ++ return -EIO; ++ ++ p++; ++ ++ if (sscanf(p, " %c", &state) != 1) ++ return -EIO; ++ ++ return (unsigned char) state; ++} ++ + int get_process_comm(pid_t pid, char **name) { + const char *p; + +diff --git a/src/shared/util.h b/src/shared/util.h +index 222abe0..1d60687 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -215,6 +215,7 @@ char *file_in_same_dir(const char *path, const char *filename); + + int rmdir_parents(const char *path, const char *stop); + ++char get_process_state(pid_t pid); + int get_process_comm(pid_t pid, char **name); + int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line); + int get_process_exe(pid_t pid, char **name); diff --git a/SOURCES/0229-Fix-prototype-of-get_process_state.patch b/SOURCES/0229-Fix-prototype-of-get_process_state.patch new file mode 100644 index 0000000..571ba22 --- /dev/null +++ b/SOURCES/0229-Fix-prototype-of-get_process_state.patch @@ -0,0 +1,22 @@ +From 9ada721f27bbf373f407b40de1ae558397e4c851 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 14 Feb 2014 23:04:50 -0500 +Subject: [PATCH] Fix prototype of get_process_state + +--- + src/shared/util.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shared/util.h b/src/shared/util.h +index 1d60687..3a4bc98 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -215,7 +215,7 @@ char *file_in_same_dir(const char *path, const char *filename); + + int rmdir_parents(const char *path, const char *stop); + +-char get_process_state(pid_t pid); ++int get_process_state(pid_t pid); + int get_process_comm(pid_t pid, char **name); + int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line); + int get_process_exe(pid_t pid, char **name); diff --git a/SOURCES/0230-core-check-for-return-value-from-get_process_state.patch b/SOURCES/0230-core-check-for-return-value-from-get_process_state.patch new file mode 100644 index 0000000..411e573 --- /dev/null +++ b/SOURCES/0230-core-check-for-return-value-from-get_process_state.patch @@ -0,0 +1,35 @@ +From 54461c902d71e43fd5cc0010e0352903685c3974 Mon Sep 17 00:00:00 2001 +From: Yuxuan Shui +Date: Sat, 15 Feb 2014 13:20:55 +0800 +Subject: [PATCH] core: check for return value from get_process_state + +Fix for commit e10c9985bb. +--- + src/core/service.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 3eacf3b..f6fdbbc 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -1429,11 +1429,17 @@ static int service_load_pid_file(Service *s, bool may_warn) { + return -ESRCH; + } + +- if (get_process_state(pid) == 'Z') { ++ r = get_process_state(pid); ++ if (r < 0) { ++ if (may_warn) ++ log_info_unit(UNIT(s)->id, "Failed to read /proc/%d/stat: %s", ++ pid, strerror(-r)); ++ return r; ++ } else if (r == 'Z') { + if (may_warn) + log_info_unit(UNIT(s)->id, +- "PID "PID_FMT" read from file %s is a zombie.", +- pid, s->pid_file); ++ "PID %lu read from file %s is a zombie.", ++ (unsigned long) pid, s->pid_file); + return -ESRCH; + } + diff --git a/SOURCES/0231-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch b/SOURCES/0231-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch new file mode 100644 index 0000000..d412557 --- /dev/null +++ b/SOURCES/0231-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch @@ -0,0 +1,29 @@ +From 95f08deefa7c0611854d2831960e77be9a814969 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Wed, 2 Apr 2014 15:13:18 +0200 +Subject: [PATCH] unit: add waiting jobs to run queue in unit_coldplug + +When we have job installed and added to run queue for service which is still in +dead state and systemd initiates reload then after reload we never add +deserialized job to the run queue again. This is caused by check in +service_coldplug() where we check if deserialized state is something else than +dead state, which is not the case thus we never call service_set_state() and +finally unit_notify() where we would have added job to the run queue. +--- + src/core/unit.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/unit.c b/src/core/unit.c +index 6ee34ec..a4e6c18 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -2539,6 +2539,9 @@ int unit_coldplug(Unit *u) { + r = job_coldplug(u->job); + if (r < 0) + return r; ++ ++ if (u->job->state == JOB_WAITING) ++ job_add_to_run_queue(u->job); + } else if (u->deserialized_job >= 0) { + /* legacy */ + r = manager_add_job(u->manager, u->deserialized_job, u, JOB_IGNORE_REQUIREMENTS, false, NULL, NULL); diff --git a/SOURCES/0232-logind-session-save-stopping-flag.patch b/SOURCES/0232-logind-session-save-stopping-flag.patch new file mode 100644 index 0000000..e19886b --- /dev/null +++ b/SOURCES/0232-logind-session-save-stopping-flag.patch @@ -0,0 +1,60 @@ +From bd9127d97ae66b547a6e3a89a70b5045d706b68c Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 2 Apr 2014 14:41:26 +0200 +Subject: [PATCH] logind-session: save stopping flag + +--- + src/login/logind-session.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/login/logind-session.c b/src/login/logind-session.c +index ece222a..0fa290b 100644 +--- a/src/login/logind-session.c ++++ b/src/login/logind-session.c +@@ -187,12 +187,14 @@ int session_save(Session *s) { + "USER=%s\n" + "ACTIVE=%i\n" + "STATE=%s\n" +- "REMOTE=%i\n", ++ "REMOTE=%i\n" ++ "STOPPING=%i\n", + (unsigned long) s->user->uid, + s->user->name, + session_is_active(s), + session_state_to_string(session_get_state(s)), +- s->remote); ++ s->remote, ++ s->stopping); + + if (s->type >= 0) + fprintf(f, "TYPE=%s\n", session_type_to_string(s->type)); +@@ -267,7 +269,8 @@ int session_load(Session *s) { + *class = NULL, + *uid = NULL, + *realtime = NULL, +- *monotonic = NULL; ++ *monotonic = NULL, ++ *stopping = NULL; + + int k, r; + +@@ -291,6 +294,7 @@ int session_load(Session *s) { + "UID", &uid, + "REALTIME", &realtime, + "MONOTONIC", &monotonic, ++ "STOPPING", &stopping, + NULL); + + if (r < 0) { +@@ -391,6 +395,11 @@ int session_load(Session *s) { + s->timestamp.monotonic = l; + } + ++ if (stopping) { ++ k = parse_boolean(stopping); ++ if (k >= 0) ++ s->stopping = k; ++ } + return r; + } + diff --git a/SOURCES/0233-units-serial-getty-.service-add-Install-section.patch b/SOURCES/0233-units-serial-getty-.service-add-Install-section.patch new file mode 100644 index 0000000..dd560ff --- /dev/null +++ b/SOURCES/0233-units-serial-getty-.service-add-Install-section.patch @@ -0,0 +1,26 @@ +From 8ade7cd519f3cdccc81ed8c2fb2f72df48a191d7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +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 + +Resolves: #1083936 +--- + units/serial-getty@.service.m4 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 +index e32c6b7..aea078f 100644 +--- a/units/serial-getty@.service.m4 ++++ b/units/serial-getty@.service.m4 +@@ -33,3 +33,6 @@ TTYVHangup=yes + KillMode=process + IgnoreSIGPIPE=no + SendSIGHUP=yes ++ ++[Install] ++WantedBy=getty.target diff --git a/SOURCES/0234-units-order-network-online.target-after-network.targ.patch b/SOURCES/0234-units-order-network-online.target-after-network.targ.patch new file mode 100644 index 0000000..4390f79 --- /dev/null +++ b/SOURCES/0234-units-order-network-online.target-after-network.targ.patch @@ -0,0 +1,19 @@ +From dda9057e8ee63f2e525333bf7d606f22bce0f7f5 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 21 Jul 2014 15:13:15 +0200 +Subject: [PATCH] units: order network-online.target after network.target + +Resolves: #1072431 +--- + units/network-online.target | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/network-online.target b/units/network-online.target +index a40c44c..67bc4fa 100644 +--- a/units/network-online.target ++++ b/units/network-online.target +@@ -9,3 +9,4 @@ + Description=Network is Online + Documentation=man:systemd.special(7) + Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget ++After=network.target diff --git a/SOURCES/0235-util-consider-both-fuse.glusterfs-and-glusterfs-netw.patch b/SOURCES/0235-util-consider-both-fuse.glusterfs-and-glusterfs-netw.patch new file mode 100644 index 0000000..5cbe8ca --- /dev/null +++ b/SOURCES/0235-util-consider-both-fuse.glusterfs-and-glusterfs-netw.patch @@ -0,0 +1,36 @@ +From f8615ebc34fb1a960a1bd946650a8c15a9a347fa Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 25 Mar 2014 01:46:24 +0100 +Subject: [PATCH] util: consider both fuse.glusterfs and glusterfs network file + systems +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Based on a similar patch by Lukáš Nykrýn. + +Resolves: #1080229 +--- + src/shared/util.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 090a204..2974c2a 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -1625,7 +1625,14 @@ bool fstype_is_network(const char *fstype) { + "nfs\0" + "nfs4\0" + "gfs\0" +- "gfs2\0"; ++ "gfs2\0" ++ "glusterfs\0"; ++ ++ const char *x; ++ ++ x = startswith(fstype, "fuse."); ++ if (x) ++ fstype = x; + + return nulstr_contains(table, fstype); + } diff --git a/SOURCES/0236-core-make-StopWhenUnneeded-work-in-conjunction-with-.patch b/SOURCES/0236-core-make-StopWhenUnneeded-work-in-conjunction-with-.patch new file mode 100644 index 0000000..a7cb5f3 --- /dev/null +++ b/SOURCES/0236-core-make-StopWhenUnneeded-work-in-conjunction-with-.patch @@ -0,0 +1,43 @@ +From bb586b571661bd77cafe0824efecdba502c99a98 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 13 Feb 2014 02:12:27 +0100 +Subject: [PATCH] core: make StopWhenUnneeded work in conjunction with units + that fail during their start job + +https://bugzilla.redhat.com/show_bug.cgi?id=997031 + +Resolves: #986949 +--- + src/core/unit.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index a4e6c18..17792d1 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -1455,7 +1455,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su + * sucessfully, since there's no change of state in that case. Which is + * why it is handled in service_set_state() */ + if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) { +- ExecContext *ec = unit_get_exec_context(u); ++ ExecContext *ec; ++ ++ ec = unit_get_exec_context(u); + if (ec && exec_context_may_touch_console(ec)) { + if (UNIT_IS_INACTIVE_OR_FAILED(ns)) { + m->n_on_console --; +@@ -1551,12 +1553,11 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su + } + + /* stop unneeded units regardless if going down was expected or not */ +- if (UNIT_IS_ACTIVE_OR_ACTIVATING(os) && UNIT_IS_INACTIVE_OR_DEACTIVATING(ns)) ++ if (UNIT_IS_INACTIVE_OR_DEACTIVATING(ns)) + check_unneeded_dependencies(u); + + if (ns != os && ns == UNIT_FAILED) { +- log_notice_unit(u->id, +- "Unit %s entered failed state.", u->id); ++ log_notice_unit(u->id, "Unit %s entered failed state.", u->id); + unit_start_on_failure(u); + } + } diff --git a/SOURCES/0237-cgroups-agent-down-grade-log-level.patch b/SOURCES/0237-cgroups-agent-down-grade-log-level.patch new file mode 100644 index 0000000..5cc9b97 --- /dev/null +++ b/SOURCES/0237-cgroups-agent-down-grade-log-level.patch @@ -0,0 +1,41 @@ +From b0010d76a8c56900d15fab8ac1ed94d364d1e566 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 23 Jul 2014 14:08:18 +0200 +Subject: [PATCH] cgroups-agent: down-grade log level + +(cherry picked from commit 844de4355592259eebcffddfc38c63266e451cb6) + +Conflicts: + src/cgroups-agent/cgroups-agent.c + +Resolves: #1044386 +--- + src/cgroups-agent/cgroups-agent.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/cgroups-agent/cgroups-agent.c b/src/cgroups-agent/cgroups-agent.c +index a47949a..43b9b3a 100644 +--- a/src/cgroups-agent/cgroups-agent.c ++++ b/src/cgroups-agent/cgroups-agent.c +@@ -50,7 +50,11 @@ int main(int argc, char *argv[]) { + + bus = dbus_connection_open_private("unix:path=/run/systemd/private", &error); + if (!bus) { +- log_warning("Failed to get D-Bus connection: %s", bus_error_message(&error)); ++ log_warning("Failed to get D-Bus connection: %s", strerror(-r)); ++ /* If we couldn't connect we assume this was triggered ++ * while systemd got restarted/transitioned from ++ * initrd to the system, so let's ignore this */ ++ log_debug("Failed to get D-Bus connection: %s", strerror(-r)); + goto finish; + } + +@@ -73,7 +77,7 @@ int main(int argc, char *argv[]) { + } + + if (!dbus_connection_send(bus, m, NULL)) { +- log_error("Failed to send signal message on private connection."); ++ log_debug("Failed to send signal message on private connection."); + goto finish; + } + diff --git a/SOURCES/0238-random-seed-raise-POOL_SIZE_MIN-constant-to-1024.patch b/SOURCES/0238-random-seed-raise-POOL_SIZE_MIN-constant-to-1024.patch new file mode 100644 index 0000000..ccf36f5 --- /dev/null +++ b/SOURCES/0238-random-seed-raise-POOL_SIZE_MIN-constant-to-1024.patch @@ -0,0 +1,23 @@ +From 20436a1eb3a468b7bc32fe1d36cb7c4029519052 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 24 Jul 2014 11:17:36 +0200 +Subject: [PATCH] random-seed: raise POOL_SIZE_MIN constant to 1024 + +Resolves: #1066517 +--- + src/random-seed/random-seed.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c +index af79ecf..8b7bfbb 100644 +--- a/src/random-seed/random-seed.c ++++ b/src/random-seed/random-seed.c +@@ -29,7 +29,7 @@ + #include "util.h" + #include "mkdir.h" + +-#define POOL_SIZE_MIN 512 ++#define POOL_SIZE_MIN 1024 + + int main(int argc, char *argv[]) { + _cleanup_close_ int seed_fd = -1, random_fd = -1; diff --git a/SOURCES/0239-delta-do-not-use-unicode-chars-in-C-locale.patch b/SOURCES/0239-delta-do-not-use-unicode-chars-in-C-locale.patch new file mode 100644 index 0000000..c3ff191 --- /dev/null +++ b/SOURCES/0239-delta-do-not-use-unicode-chars-in-C-locale.patch @@ -0,0 +1,135 @@ +From 719f080ce2c999febe4c9289fb09e5e2e719d4d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Wed, 16 Apr 2014 23:33:41 -0400 +Subject: [PATCH] delta: do not use unicode chars in C locale + +https://bugzilla.redhat.com/show_bug.cgi?id=1088418 + +(cherry picked from commit 00a5cc3a63c125633e822f39efd9c32223169f62) + +Resolves: #1088419 +--- + src/delta/delta.c | 40 +++++++++++++++++++++++++--------------- + 1 file changed, 25 insertions(+), 15 deletions(-) + +diff --git a/src/delta/delta.c b/src/delta/delta.c +index a8dd57e..f1aea80 100644 +--- a/src/delta/delta.c ++++ b/src/delta/delta.c +@@ -85,6 +85,10 @@ static void pager_open_if_enabled(void) { + pager_open(false); + } + ++static inline const char* arrow(void) { ++ return is_locale_utf8() ? "→" : "->"; ++} ++ + static int equivalent(const char *a, const char *b) { + _cleanup_free_ char *x = NULL, *y = NULL; + +@@ -103,8 +107,9 @@ static int notify_override_masked(const char *top, const char *bottom) { + if (!(arg_flags & SHOW_MASKED)) + return 0; + +- printf("%s%s%s %s → %s\n", +- ansi_highlight_red(), "[MASKED]", ansi_highlight_off(), top, bottom); ++ printf("%s%s%s %s %s %s\n", ++ ansi_highlight_red(), "[MASKED]", ansi_highlight_off(), ++ top, arrow(), bottom); + return 1; + } + +@@ -112,8 +117,9 @@ static int notify_override_equivalent(const char *top, const char *bottom) { + if (!(arg_flags & SHOW_EQUIVALENT)) + return 0; + +- printf("%s%s%s %s → %s\n", +- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom); ++ printf("%s%s%s %s %s %s\n", ++ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), ++ top, arrow(), bottom); + return 1; + } + +@@ -121,8 +127,9 @@ static int notify_override_redirected(const char *top, const char *bottom) { + if (!(arg_flags & SHOW_REDIRECTED)) + return 0; + +- printf("%s%s%s %s → %s\n", +- ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(), top, bottom); ++ printf("%s%s%s %s %s %s\n", ++ ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(), ++ top, arrow(), bottom); + return 1; + } + +@@ -130,8 +137,9 @@ static int notify_override_overridden(const char *top, const char *bottom) { + if (!(arg_flags & SHOW_OVERRIDDEN)) + return 0; + +- printf("%s%s%s %s → %s\n", +- ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(), top, bottom); ++ printf("%s%s%s %s %s %s\n", ++ ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(), ++ top, arrow(), bottom); + return 1; + } + +@@ -139,8 +147,9 @@ static int notify_override_extended(const char *top, const char *bottom) { + if (!(arg_flags & SHOW_EXTENDED)) + return 0; + +- printf("%s%s%s %s → %s\n", +- ansi_highlight(), "[EXTENDED]", ansi_highlight_off(), top, bottom); ++ printf("%s%s%s %s %s %s\n", ++ ansi_highlight(), "[EXTENDED]", ansi_highlight_off(), ++ top, arrow(), bottom); + return 1; + } + +@@ -241,7 +250,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + return -ENOMEM; + d = p + strlen(toppath) + 1; + +- log_debug("Adding at top: %s → %s", d, p); ++ log_debug("Adding at top: %s %s %s", d, arrow(), p); + k = hashmap_put(top, d, p); + if (k >= 0) { + p = strdup(p); +@@ -253,7 +262,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + return k; + } + +- log_debug("Adding at bottom: %s → %s", d, p); ++ log_debug("Adding at bottom: %s %s %s", d, arrow(), p); + free(hashmap_remove(bottom, d)); + k = hashmap_put(bottom, d, p); + if (k < 0) { +@@ -276,7 +285,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const + if (!p) + return -ENOMEM; + +- log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p); ++ log_debug("Adding to drops: %s %s %s %s %s", ++ unit, arrow(), basename(p), arrow(), p); + k = hashmap_put(h, basename(p), p); + if (k < 0) { + free(p); +@@ -328,7 +338,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + if (!p) + return -ENOMEM; + +- log_debug("Adding at top: %s → %s", basename(p), p); ++ log_debug("Adding at top: %s %s %s", basename(p), arrow(), p); + k = hashmap_put(top, basename(p), p); + if (k >= 0) { + p = strdup(p); +@@ -339,7 +349,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch + return k; + } + +- log_debug("Adding at bottom: %s → %s", basename(p), p); ++ log_debug("Adding at bottom: %s %s %s", basename(p), arrow(), p); + free(hashmap_remove(bottom, basename(p))); + k = hashmap_put(bottom, basename(p), p); + if (k < 0) { diff --git a/SOURCES/0240-core-print-debug-instead-of-error-message.patch b/SOURCES/0240-core-print-debug-instead-of-error-message.patch new file mode 100644 index 0000000..a406895 --- /dev/null +++ b/SOURCES/0240-core-print-debug-instead-of-error-message.patch @@ -0,0 +1,32 @@ +From bcbb894a709f56ac0bccf7e5edfd59e39e8ec800 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Wed, 14 May 2014 15:13:43 +0200 +Subject: [PATCH] core: print debug instead of error message + +In case that session scope is in some other state than SCOPE_RUNNING or +SCOPE_ABANDONED we will not print error message. It might be the case +that scope is in other state because systemd realized that scope is +empty before dispatching dbus call from pam hook. Or system is going +down and stop job is runnig for the scope and changed scope state to +SCOPE_STOP_SIGTERM or SCOPE_STOP_SIGKILL. + +(cherry picked from commit f517790db5277fa71d6ae3617244f1acc4b62572) + +Resolves: #1105608 +--- + src/core/dbus-scope.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c +index 58dd9ff..71d6921 100644 +--- a/src/core/dbus-scope.c ++++ b/src/core/dbus-scope.c +@@ -76,7 +76,7 @@ DBusHandlerResult bus_scope_message_handler(Unit *u, DBusConnection *c, DBusMess + + r = scope_abandon(s); + if (r < 0) +- log_error("Failed to mark scope %s as abandoned : %s", UNIT(s)->id, strerror(-r)); ++ log_debug("Failed to mark scope %s as abandoned : Scope is not running", UNIT(s)->id); + + reply = dbus_message_new_method_return(message); + if (!reply) diff --git a/SOURCES/0241-journald-always-add-syslog-facility-for-messages-com.patch b/SOURCES/0241-journald-always-add-syslog-facility-for-messages-com.patch new file mode 100644 index 0000000..3d4c49a --- /dev/null +++ b/SOURCES/0241-journald-always-add-syslog-facility-for-messages-com.patch @@ -0,0 +1,41 @@ +From 7f85c4184fc45c3dd2c76b4867ab252c3530f84d Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Fri, 25 Jul 2014 14:38:22 +0200 +Subject: [PATCH] journald: always add syslog facility for messages coming from + kmsg + +Set SYSLOG_FACILITY field for kernel log messages too. Setting only +SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal +maybe confused by missing SYSLOG_FACILITY field for kernel log messages. + +(cherry picked from commit 36dd072cdf03dcac0fcd2d6b42f261444dc7ac88) + +Resolves: #1113215 +--- + src/journal/journald-kmsg.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c +index 9895808..e393cb7 100644 +--- a/src/journal/journald-kmsg.c ++++ b/src/journal/journald-kmsg.c +@@ -274,6 +274,9 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) { + if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0) + IOVEC_SET_STRING(iovec[n++], syslog_priority); + ++ if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0) ++ IOVEC_SET_STRING(iovec[n++], syslog_facility); ++ + if ((priority & LOG_FACMASK) == LOG_KERN) + IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel"); + else { +@@ -295,9 +298,6 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) { + if (syslog_pid) + IOVEC_SET_STRING(iovec[n++], syslog_pid); + } +- +- if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0) +- IOVEC_SET_STRING(iovec[n++], syslog_facility); + } + + message = cunescape_length_with_prefix(p, pl, "MESSAGE="); diff --git a/SOURCES/0242-Introduce-_cleanup_endmntent_.patch b/SOURCES/0242-Introduce-_cleanup_endmntent_.patch new file mode 100644 index 0000000..a195d89 --- /dev/null +++ b/SOURCES/0242-Introduce-_cleanup_endmntent_.patch @@ -0,0 +1,173 @@ +From 8e7be40d1386e6053d4663114a00e0390400350f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 3 Oct 2013 22:13:55 -0400 +Subject: [PATCH] Introduce _cleanup_endmntent_ + +(cherry picked from commit 5862d652ba14178cff46b8a8fc6c6d8392bf32b1) + +Related: #1098310 +--- + src/cryptsetup/cryptsetup.c | 19 ++++++------------- + src/fstab-generator/fstab-generator.c | 17 +++++------------ + src/remount-fs/remount-fs.c | 13 ++++--------- + src/shared/util.h | 7 +++++++ + 4 files changed, 22 insertions(+), 34 deletions(-) + +diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c +index 769c3e4..4f2f52a 100644 +--- a/src/cryptsetup/cryptsetup.c ++++ b/src/cryptsetup/cryptsetup.c +@@ -236,31 +236,24 @@ finish: + } + + static char *disk_mount_point(const char *label) { +- char *mp = NULL; + _cleanup_free_ char *device = NULL; +- FILE *f = NULL; ++ _cleanup_endmntent_ FILE *f = NULL; + struct mntent *m; + + /* Yeah, we don't support native systemd unit files here for now */ + + if (asprintf(&device, "/dev/mapper/%s", label) < 0) +- goto finish; ++ return NULL; + + f = setmntent("/etc/fstab", "r"); + if (!f) +- goto finish; ++ return NULL; + + while ((m = getmntent(f))) +- if (path_equal(m->mnt_fsname, device)) { +- mp = strdup(m->mnt_dir); +- break; +- } +- +-finish: +- if (f) +- endmntent(f); ++ if (path_equal(m->mnt_fsname, device)) ++ return strdup(m->mnt_dir); + +- return mp; ++ return NULL; + } + + static int get_password(const char *name, usec_t until, bool accept_cached, char ***passwords) { +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index c0c2992..78d7609 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -327,15 +327,12 @@ static int add_mount( + } + + static int parse_fstab(const char *prefix, bool initrd) { +- _cleanup_free_ char *fstab_path = NULL; +- FILE *f; ++ char *fstab_path; ++ _cleanup_endmntent_ FILE *f; + int r = 0; + struct mntent *me; + +- fstab_path = strjoin(strempty(prefix), "/etc/fstab", NULL); +- if (!fstab_path) +- return log_oom(); +- ++ fstab_path = strappenda(strempty(prefix), "/etc/fstab"); + f = setmntent(fstab_path, "r"); + if (!f) { + if (errno == ENOENT) +@@ -354,10 +351,8 @@ static int parse_fstab(const char *prefix, bool initrd) { + + what = fstab_node_to_udev_node(me->mnt_fsname); + where = strjoin(strempty(prefix), me->mnt_dir, NULL); +- if (!what || !where) { +- r = log_oom(); +- goto finish; +- } ++ if (!what || !where) ++ return log_oom(); + + if (is_path(where)) + path_kill_slashes(where); +@@ -395,8 +390,6 @@ static int parse_fstab(const char *prefix, bool initrd) { + r = k; + } + +-finish: +- endmntent(f); + return r; + } + +diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c +index f432718..847637a 100644 +--- a/src/remount-fs/remount-fs.c ++++ b/src/remount-fs/remount-fs.c +@@ -40,7 +40,7 @@ + + int main(int argc, char *argv[]) { + int ret = EXIT_FAILURE; +- FILE *f = NULL; ++ _cleanup_endmntent_ FILE *f = NULL; + struct mntent* me; + Hashmap *pids = NULL; + +@@ -57,13 +57,11 @@ int main(int argc, char *argv[]) { + + f = setmntent("/etc/fstab", "r"); + if (!f) { +- if (errno == ENOENT) { +- ret = EXIT_SUCCESS; +- goto finish; +- } ++ if (errno == ENOENT) ++ return EXIT_SUCCESS; + + log_error("Failed to open /etc/fstab: %m"); +- goto finish; ++ return EXIT_FAILURE; + } + + pids = hashmap_new(trivial_hash_func, trivial_compare_func); +@@ -162,8 +160,5 @@ finish: + if (pids) + hashmap_free_free(pids); + +- if (f) +- endmntent(f); +- + return ret; + } +diff --git a/src/shared/util.h b/src/shared/util.h +index 3a4bc98..5a1e1bc 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + #include "macro.h" + #include "time-util.h" +@@ -579,6 +580,11 @@ static inline void umaskp(mode_t *u) { + umask(*u); + } + ++static inline void endmntentp(FILE **f) { ++ if (*f) ++ endmntent(*f); ++} ++ + #define _cleanup_free_ _cleanup_(freep) + #define _cleanup_fclose_ _cleanup_(fclosep) + #define _cleanup_pclose_ _cleanup_(pclosep) +@@ -586,6 +592,7 @@ static inline void umaskp(mode_t *u) { + #define _cleanup_closedir_ _cleanup_(closedirp) + #define _cleanup_umask_ _cleanup_(umaskp) + #define _cleanup_globfree_ _cleanup_(globfree) ++#define _cleanup_endmntent_ _cleanup_(endmntentp) + + _malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) { + if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) diff --git a/SOURCES/0243-Introduce-_cleanup_fdset_free_.patch b/SOURCES/0243-Introduce-_cleanup_fdset_free_.patch new file mode 100644 index 0000000..a698bdb --- /dev/null +++ b/SOURCES/0243-Introduce-_cleanup_fdset_free_.patch @@ -0,0 +1,127 @@ +From 735583e63b9c109e3aaa7aecbce8d7a477988ef6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 11 Oct 2013 19:33:48 -0400 +Subject: [PATCH] Introduce _cleanup_fdset_free_ + +(cherry picked from commit 51d122af23533b0b8318911c4fc8b128ad8eafb7) + +Related: #1098310 +--- + src/core/manager.c | 22 +++++++--------------- + src/nspawn/nspawn.c | 4 +--- + src/shared/fdset.h | 7 +++++++ + 3 files changed, 15 insertions(+), 18 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 2829c95..57a88b0 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -236,7 +236,7 @@ static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned po + *p++ = '*'; + if (pos < width-1) + p = mempset(p, ' ', width-1-pos); +- p = stpcpy(p, ANSI_HIGHLIGHT_OFF); ++ strcpy(p, ANSI_HIGHLIGHT_OFF); + } + } + +@@ -257,6 +257,7 @@ static void manager_print_jobs_in_progress(Manager *m) { + /* m->n_running_jobs must be consistent with the contents of m->jobs, + * so the above loop must have succeeded in finding j. */ + assert(counter == print_nr + 1); ++ assert(j); + + cylon_pos = m->jobs_in_progress_iteration % 14; + if (cylon_pos >= 8) +@@ -2343,8 +2344,8 @@ int manager_distribute_fds(Manager *m, FDSet *fds) { + + int manager_reload(Manager *m) { + int r, q; +- FILE *f; +- FDSet *fds; ++ _cleanup_fclose_ FILE *f = NULL; ++ _cleanup_fdset_free_ FDSet *fds = NULL; + + assert(m); + +@@ -2358,20 +2359,18 @@ int manager_reload(Manager *m) { + fds = fdset_new(); + if (!fds) { + m->n_reloading --; +- r = -ENOMEM; +- goto finish; ++ return -ENOMEM; + } + + r = manager_serialize(m, f, fds, false); + if (r < 0) { + m->n_reloading --; +- goto finish; ++ return r; + } + + if (fseeko(f, 0, SEEK_SET) < 0) { + m->n_reloading --; +- r = -errno; +- goto finish; ++ return -errno; + } + + /* From here on there is no way back. */ +@@ -2415,13 +2414,6 @@ int manager_reload(Manager *m) { + + m->send_reloading_done = true; + +-finish: +- if (f) +- fclose(f); +- +- if (fds) +- fdset_free(fds); +- + return r; + } + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index f326f99..1cf67d0 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -1305,7 +1305,7 @@ int main(int argc, char *argv[]) { + bool saved_attr_valid = false; + struct winsize ws; + int kmsg_socket_pair[2] = { -1, -1 }; +- FDSet *fds = NULL; ++ _cleanup_fdset_free_ FDSet *fds = NULL; + + log_parse_environment(); + log_open(); +@@ -1813,7 +1813,5 @@ finish: + free(arg_directory); + free(arg_machine); + +- fdset_free(fds); +- + return r; + } +diff --git a/src/shared/fdset.h b/src/shared/fdset.h +index a7bd5e2..1a26005 100644 +--- a/src/shared/fdset.h ++++ b/src/shared/fdset.h +@@ -22,6 +22,7 @@ + ***/ + + #include "set.h" ++#include "util.h" + + typedef struct FDSet FDSet; + +@@ -47,3 +48,9 @@ int fdset_iterate(FDSet *s, Iterator *i); + + #define FDSET_FOREACH(fd, fds, i) \ + for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i))) ++ ++static inline void fdset_freep(FDSet **fds) { ++ if (*fds) ++ fdset_free(*fds); ++} ++#define _cleanup_fdset_free_ _cleanup_(fdset_freep) diff --git a/SOURCES/0244-Introduce-udev-object-cleanup-functions.patch b/SOURCES/0244-Introduce-udev-object-cleanup-functions.patch new file mode 100644 index 0000000..db3bda5 --- /dev/null +++ b/SOURCES/0244-Introduce-udev-object-cleanup-functions.patch @@ -0,0 +1,1291 @@ +From 0aad0e32d93d848e707a3cd0edd78c58a4c21829 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 12 Oct 2013 20:28:21 -0400 +Subject: [PATCH] Introduce udev object cleanup functions + +Conflicts: + src/backlight/backlight.c + src/gpt-auto-generator/gpt-auto-generator.c + +(cherry picked from commit 1ca208fb4f93e5869704af1812cbff7130a2fc03) + +Related: #1098310 +--- + Makefile.am | 1 + + src/backlight/backlight.c | 57 +++++------ + src/core/umount.c | 143 ++++++++++------------------ + src/cryptsetup/cryptsetup.c | 27 ++---- + src/fsck/fsck.c | 13 +-- + src/gpt-auto-generator/gpt-auto-generator.c | 121 +++++++---------------- + src/journal/journal-internal.h | 7 +- + src/login/sysfs-show.c | 22 ++--- + src/readahead/readahead-common.c | 66 +++++-------- + src/shared/fdset.h | 5 +- + src/shared/install.c | 6 +- + src/shared/set.h | 10 +- + src/shared/strv.h | 7 +- + src/shared/udev-util.h | 37 +++++++ + src/shared/util.h | 33 +++---- + src/test/test-libudev.c | 8 +- + src/test/test-udev.c | 21 ++-- + src/tmpfiles/tmpfiles.c | 5 +- + 18 files changed, 227 insertions(+), 362 deletions(-) + create mode 100644 src/shared/udev-util.h + +diff --git a/Makefile.am b/Makefile.am +index fa2fba6..ef73138 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -647,6 +647,7 @@ libsystemd_shared_la_SOURCES = \ + src/shared/sparse-endian.h \ + src/shared/util.c \ + src/shared/util.h \ ++ src/shared/udev-util.h \ + src/shared/virt.c \ + src/shared/virt.h \ + src/shared/efivars.c \ +diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c +index 9b2eada..aa80c29 100644 +--- a/src/backlight/backlight.c ++++ b/src/backlight/backlight.c +@@ -19,15 +19,15 @@ + along with systemd; If not, see . + ***/ + +-#include +- + #include "util.h" + #include "mkdir.h" + #include "fileio.h" ++#include "libudev.h" ++#include "udev-util.h" + + int main(int argc, char *argv[]) { +- struct udev *udev = NULL; +- struct udev_device *device = NULL; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *device = NULL; + _cleanup_free_ char *saved = NULL; + int r; + +@@ -45,37 +45,35 @@ int main(int argc, char *argv[]) { + r = mkdir_p("/var/lib/systemd/backlight", 0755); + if (r < 0) { + log_error("Failed to create backlight directory: %s", strerror(-r)); +- goto finish; ++ return EXIT_FAILURE; + } + + udev = udev_new(); + if (!udev) { +- r = log_oom(); +- goto finish; ++ log_oom(); ++ return EXIT_FAILURE; + } + + errno = 0; + device = udev_device_new_from_subsystem_sysname(udev, "backlight", argv[2]); + if (!device) { +- if (errno != 0) { ++ if (errno != 0) + log_error("Failed to get backlight device: %m"); +- r = -errno; +- } else +- r = log_oom(); ++ else ++ log_oom(); + +- goto finish; ++ return EXIT_FAILURE; + } + + if (!streq_ptr(udev_device_get_subsystem(device), "backlight")) { + log_error("Not a backlight device: %s", argv[2]); +- r = -ENODEV; +- goto finish; ++ return EXIT_FAILURE; + } + + saved = strappend("/var/lib/systemd/backlight/", udev_device_get_sysname(device)); + if (!saved) { +- r = log_oom(); +- goto finish; ++ log_oom(); ++ return EXIT_FAILURE; + } + + if (streq(argv[1], "load")) { +@@ -84,19 +82,17 @@ int main(int argc, char *argv[]) { + r = read_one_line_file(saved, &value); + if (r < 0) { + +- if (r == -ENOENT) { +- r = 0; +- goto finish; +- } ++ if (r == -ENOENT) ++ return EXIT_SUCCESS; + + log_error("Failed to read %s: %s", saved, strerror(-r)); +- goto finish; ++ return EXIT_FAILURE; + } + + r = udev_device_set_sysattr_value(device, "brightness", value); + if (r < 0) { + log_error("Failed to write system attribute: %s", strerror(-r)); +- goto finish; ++ return EXIT_FAILURE; + } + + } else if (streq(argv[1], "save")) { +@@ -105,28 +101,19 @@ int main(int argc, char *argv[]) { + value = udev_device_get_sysattr_value(device, "brightness"); + if (!value) { + log_error("Failed to read system attribute: %s", strerror(-r)); +- goto finish; ++ return EXIT_FAILURE; + } + + r = write_string_file(saved, value); + if (r < 0) { + log_error("Failed to write %s: %s", saved, strerror(-r)); +- goto finish; ++ return EXIT_FAILURE; + } + + } else { + log_error("Unknown verb %s.", argv[1]); +- r = -EINVAL; +- goto finish; ++ return EXIT_FAILURE; + } + +-finish: +- if (device) +- udev_device_unref(device); +- +- if (udev) +- udev_unref(udev); +- +- return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; +- ++ return EXIT_SUCCESS; + } +diff --git a/src/core/umount.c b/src/core/umount.c +index 1e95ad7..99dbe27 100644 +--- a/src/core/umount.c ++++ b/src/core/umount.c +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + + #include "list.h" + #include "mount-setup.h" +@@ -35,6 +34,8 @@ + #include "path-util.h" + #include "util.h" + #include "virt.h" ++#include "libudev.h" ++#include "udev-util.h" + + typedef struct MountPoint { + char *path; +@@ -201,145 +202,108 @@ finish: + } + + static int loopback_list_get(MountPoint **head) { +- int r; +- struct udev *udev; +- struct udev_enumerate *e = NULL; ++ _cleanup_udev_unref_ struct udev *udev; ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item = NULL, *first = NULL; + + assert(head); + +- if (!(udev = udev_new())) { +- r = -ENOMEM; +- goto finish; +- } ++ udev = udev_new(); ++ if (!udev) ++ return -ENOMEM; + +- if (!(e = udev_enumerate_new(udev))) { +- r = -ENOMEM; +- goto finish; +- } ++ e = udev_enumerate_new(udev); ++ if (!e) ++ return -ENOMEM; + + if (udev_enumerate_add_match_subsystem(e, "block") < 0 || + udev_enumerate_add_match_sysname(e, "loop*") < 0 || +- udev_enumerate_add_match_sysattr(e, "loop/backing_file", NULL) < 0) { +- r = -EIO; +- goto finish; +- } ++ udev_enumerate_add_match_sysattr(e, "loop/backing_file", NULL) < 0) ++ return -EIO; + +- if (udev_enumerate_scan_devices(e) < 0) { +- r = -EIO; +- goto finish; +- } ++ if (udev_enumerate_scan_devices(e) < 0) ++ return -EIO; + + first = udev_enumerate_get_list_entry(e); + udev_list_entry_foreach(item, first) { + MountPoint *lb; +- struct udev_device *d; ++ _cleanup_udev_device_unref_ struct udev_device *d; + char *loop; + const char *dn; + +- if (!(d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)))) { +- r = -ENOMEM; +- goto finish; +- } ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ return -ENOMEM; + +- if (!(dn = udev_device_get_devnode(d))) { +- udev_device_unref(d); ++ dn = udev_device_get_devnode(d); ++ if (!dn) + continue; +- } + + loop = strdup(dn); +- udev_device_unref(d); +- +- if (!loop) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!loop) ++ return -ENOMEM; + +- if (!(lb = new0(MountPoint, 1))) { ++ lb = new0(MountPoint, 1); ++ if (!lb) { + free(loop); +- r = -ENOMEM; +- goto finish; ++ return -ENOMEM; + } + + lb->path = loop; + LIST_PREPEND(MountPoint, mount_point, *head, lb); + } + +- r = 0; +- +-finish: +- if (e) +- udev_enumerate_unref(e); +- +- if (udev) +- udev_unref(udev); +- +- return r; ++ return 0; + } + + static int dm_list_get(MountPoint **head) { +- int r; +- struct udev *udev; +- struct udev_enumerate *e = NULL; ++ _cleanup_udev_unref_ struct udev *udev; ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *item = NULL, *first = NULL; + + assert(head); + +- if (!(udev = udev_new())) { +- r = -ENOMEM; +- goto finish; +- } ++ udev = udev_new(); ++ if (!udev) ++ return -ENOMEM; + +- if (!(e = udev_enumerate_new(udev))) { +- r = -ENOMEM; +- goto finish; +- } ++ e = udev_enumerate_new(udev); ++ if (!e) ++ return -ENOMEM; + + if (udev_enumerate_add_match_subsystem(e, "block") < 0 || +- udev_enumerate_add_match_sysname(e, "dm-*") < 0) { +- r = -EIO; +- goto finish; +- } ++ udev_enumerate_add_match_sysname(e, "dm-*") < 0) ++ return -EIO; + +- if (udev_enumerate_scan_devices(e) < 0) { +- r = -EIO; +- goto finish; +- } ++ if (udev_enumerate_scan_devices(e) < 0) ++ return -EIO; + + first = udev_enumerate_get_list_entry(e); + + udev_list_entry_foreach(item, first) { + MountPoint *m; +- struct udev_device *d; ++ _cleanup_udev_device_unref_ struct udev_device *d; + dev_t devnum; + char *node; + const char *dn; + +- if (!(d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)))) { +- r = -ENOMEM; +- goto finish; +- } ++ d = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); ++ if (!d) ++ return -ENOMEM; + + devnum = udev_device_get_devnum(d); + dn = udev_device_get_devnode(d); +- +- if (major(devnum) == 0 || !dn) { +- udev_device_unref(d); ++ if (major(devnum) == 0 || !dn) + continue; +- } + + node = strdup(dn); +- udev_device_unref(d); +- +- if (!node) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!node) ++ return -ENOMEM; + +- if (!(m = new(MountPoint, 1))) { ++ m = new(MountPoint, 1); ++ if (!m) { + free(node); +- r = -ENOMEM; +- goto finish; ++ return -ENOMEM; + } + + m->path = node; +@@ -347,16 +311,7 @@ static int dm_list_get(MountPoint **head) { + LIST_PREPEND(MountPoint, mount_point, *head, m); + } + +- r = 0; +- +-finish: +- if (e) +- udev_enumerate_unref(e); +- +- if (udev) +- udev_unref(udev); +- +- return r; ++ return 0; + } + + static int delete_loopback(const char *device) { +diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c +index 4f2f52a..0a15b50 100644 +--- a/src/cryptsetup/cryptsetup.c ++++ b/src/cryptsetup/cryptsetup.c +@@ -25,7 +25,6 @@ + #include + + #include +-#include + + #include "fileio.h" + #include "log.h" +@@ -34,6 +33,8 @@ + #include "strv.h" + #include "ask-password-api.h" + #include "def.h" ++#include "libudev.h" ++#include "udev-util.h" + + static const char *opt_type = NULL; /* CRYPT_LUKS1, CRYPT_TCRYPT or CRYPT_PLAIN */ + static char *opt_cipher = NULL; +@@ -184,7 +185,7 @@ static void log_glue(int level, const char *msg, void *usrptr) { + log_debug("%s", msg); + } + +-static char *disk_description(const char *path) { ++static char* disk_description(const char *path) { + + static const char name_fields[] = { + "ID_PART_ENTRY_NAME\0" +@@ -193,10 +194,9 @@ static char *disk_description(const char *path) { + "ID_MODEL\0" + }; + +- struct udev *udev = NULL; +- struct udev_device *device = NULL; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *device = NULL; + struct stat st; +- char *description = NULL; + const char *i; + + assert(path); +@@ -213,26 +213,17 @@ static char *disk_description(const char *path) { + + device = udev_device_new_from_devnum(udev, 'b', st.st_rdev); + if (!device) +- goto finish; ++ return NULL; + + NULSTR_FOREACH(i, name_fields) { + const char *name; + + name = udev_device_get_property_value(device, i); +- if (!isempty(name)) { +- description = strdup(name); +- break; +- } ++ if (!isempty(name)) ++ return strdup(name); + } + +-finish: +- if (device) +- udev_device_unref(device); +- +- if (udev) +- udev_unref(udev); +- +- return description; ++ return NULL; + } + + static char *disk_mount_point(const char *label) { +diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c +index f298cf7..96a79dd 100644 +--- a/src/fsck/fsck.c ++++ b/src/fsck/fsck.c +@@ -27,7 +27,6 @@ + #include + #include + +-#include + #include + + #include "util.h" +@@ -36,6 +35,8 @@ + #include "bus-errors.h" + #include "virt.h" + #include "fileio.h" ++#include "libudev.h" ++#include "udev-util.h" + + static bool arg_skip = false; + static bool arg_force = false; +@@ -251,8 +252,8 @@ int main(int argc, char *argv[]) { + int i = 0, r = EXIT_FAILURE, q; + pid_t pid; + siginfo_t status; +- struct udev *udev = NULL; +- struct udev_device *udev_device = NULL; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL; + const char *device; + bool root_directory; + int progress_pipe[2] = { -1, -1 }; +@@ -400,12 +401,6 @@ int main(int argc, char *argv[]) { + touch("/run/systemd/quotacheck"); + + finish: +- if (udev_device) +- udev_device_unref(udev_device); +- +- if (udev) +- udev_unref(udev); +- + close_pipe(progress_pipe); + + return r; +diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c +index adbf71d..8436d26 100644 +--- a/src/gpt-auto-generator/gpt-auto-generator.c ++++ b/src/gpt-auto-generator/gpt-auto-generator.c +@@ -36,6 +36,7 @@ + #include "missing.h" + #include "sd-id128.h" + #include "libudev.h" ++#include "udev-util.h" + #include "special.h" + #include "unit-name.h" + #include "virt.h" +@@ -50,10 +51,7 @@ + + static const char *arg_dest = "/tmp"; + +-static inline void blkid_free_probep(blkid_probe *b) { +- if (*b) +- blkid_free_probe(*b); +-} ++define_trivial_cleanup_func(blkid_probe, blkid_free_probe) + #define _cleanup_blkid_freep_probe_ _cleanup_(blkid_free_probep) + + static int verify_gpt_partition(const char *node, sd_id128_t *type, unsigned *nr, char **fstype) { +@@ -236,75 +234,62 @@ static int add_home(const char *path, const char *fstype) { + } + + static int enumerate_partitions(struct udev *udev, dev_t dev) { +- struct udev_enumerate *e = NULL; +- struct udev_device *parent = NULL, *d = NULL; ++ struct udev_device *parent = NULL; ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *d = NULL; + struct udev_list_entry *first, *item; + unsigned home_nr = (unsigned) -1; + _cleanup_free_ char *home = NULL, *home_fstype = NULL; + int r; + + e = udev_enumerate_new(udev); +- if (!e) { +- r = log_oom(); +- goto finish; +- } ++ if (!e) ++ return log_oom(); + + d = udev_device_new_from_devnum(udev, 'b', dev); +- if (!d) { +- r = log_oom(); +- goto finish; +- } ++ if (!d) ++ return log_oom(); + + parent = udev_device_get_parent(d); +- if (!parent) { +- r = log_oom(); +- goto finish; +- } ++ if (!parent) ++ return log_oom(); + + r = udev_enumerate_add_match_parent(e, parent); +- if (r < 0) { +- r = log_oom(); +- goto finish; +- } ++ if (r < 0) ++ return log_oom(); + + r = udev_enumerate_add_match_subsystem(e, "block"); +- if (r < 0) { +- r = log_oom(); +- goto finish; +- } ++ if (r < 0) ++ return log_oom(); + + r = udev_enumerate_scan_devices(e); + if (r < 0) { + log_error("Failed to enumerate partitions on /dev/block/%u:%u: %s", + major(dev), minor(dev), strerror(-r)); +- goto finish; ++ return r; + } + + first = udev_enumerate_get_list_entry(e); + udev_list_entry_foreach(item, first) { + _cleanup_free_ char *fstype = NULL; + const char *node = NULL; +- struct udev_device *q; ++ _cleanup_udev_device_unref_ struct udev_device *q; + sd_id128_t type_id; + unsigned nr; + + q = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); +- if (!q) { +- r = log_oom(); +- goto finish; +- } ++ if (!q) ++ return log_oom(); + + if (udev_device_get_devnum(q) == udev_device_get_devnum(d)) +- goto skip; ++ continue; + + if (udev_device_get_devnum(q) == udev_device_get_devnum(parent)) +- goto skip; ++ continue; + + node = udev_device_get_devnode(q); +- if (!node) { +- r = log_oom(); +- goto finish; +- } ++ if (!node) ++ return log_oom(); + + r = verify_gpt_partition(node, &type_id, &nr, &fstype); + if (r < 0) { +@@ -313,11 +298,10 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) { + continue; + log_error("Failed to verify GPT partition %s: %s", + node, strerror(-r)); +- udev_device_unref(q); +- goto finish; ++ return r; + } + if (r == 0) +- goto skip; ++ continue; + + if (sd_id128_equal(type_id, SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f))) + add_swap(node, fstype); +@@ -326,10 +310,8 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) { + if (!home || nr < home_nr) { + free(home); + home = strdup(node); +- if (!home) { +- r = log_oom(); +- goto finish; +- } ++ if (!home) ++ return log_oom(); + + home_nr = nr; + +@@ -338,22 +320,11 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) { + fstype = NULL; + } + } +- +- skip: +- udev_device_unref(q); + } + + if (home && home_fstype) + add_home(home, home_fstype); + +-finish: +- if (d) +- udev_device_unref(d); +- +- if (e) +- udev_enumerate_unref(e); +- +- + return r; + } + +@@ -432,44 +403,31 @@ static int get_block_device(const char *path, dev_t *dev) { + } + + static int devno_to_devnode(struct udev *udev, dev_t devno, char **ret) { +- struct udev_device *d = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *d; + const char *t; + char *n; +- int r; + + d = udev_device_new_from_devnum(udev, 'b', devno); +- if (!d) { +- r = log_oom(); +- goto finish; +- } ++ if (!d) ++ return log_oom(); + + t = udev_device_get_devnode(d); +- if (!t) { +- r = -ENODEV; +- goto finish; +- } ++ if (!t) ++ return -ENODEV; + + n = strdup(t); +- if (!n) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!n) ++ return -ENOMEM; + + *ret = n; +- r = 0; +- +-finish: +- if (d) +- udev_device_unref(d); +- +- return r; ++ return 0; + } + + int main(int argc, char *argv[]) { + _cleanup_free_ char *node = NULL; +- struct udev *udev = NULL; ++ _cleanup_udev_unref_ struct udev *udev = NULL; + dev_t devno; +- int r; ++ int r = 0; + + if (argc > 1 && argc != 4) { + log_error("This program takes three or no arguments."); +@@ -488,13 +446,11 @@ int main(int argc, char *argv[]) { + + 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; + } + +@@ -533,8 +489,5 @@ int main(int argc, char *argv[]) { + r = enumerate_partitions(udev, devno); + + finish: +- if (udev) +- udev_unref(udev); +- + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + } +diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h +index 5bc6535..1bc912c 100644 +--- a/src/journal/journal-internal.h ++++ b/src/journal/journal-internal.h +@@ -135,11 +135,8 @@ struct sd_journal { + char *journal_make_match_string(sd_journal *j); + void journal_print_header(sd_journal *j); + +-static inline void journal_closep(sd_journal **j) { +- sd_journal_close(*j); +-} +- +-#define _cleanup_journal_close_ _cleanup_(journal_closep) ++define_trivial_cleanup_func(sd_journal*, sd_journal_close) ++#define _cleanup_journal_close_ _cleanup_(sd_journal_closep) + + #define JOURNAL_FOREACH_DATA_RETVAL(j, data, l, retval) \ + for (sd_journal_restart_data(j); ((retval) = sd_journal_enumerate_data((j), &(data), &(l))) > 0; ) +diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c +index 14de7d8..9fc3054 100644 +--- a/src/login/sysfs-show.c ++++ b/src/login/sysfs-show.c +@@ -26,6 +26,7 @@ + #include "util.h" + #include "sysfs-show.h" + #include "path-util.h" ++#include "udev-util.h" + + static int show_sysfs_one( + struct udev *udev, +@@ -143,9 +144,9 @@ static int show_sysfs_one( + } + + int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { +- struct udev *udev; ++ _cleanup_udev_unref_ struct udev *udev; ++ _cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL; + struct udev_list_entry *first = NULL; +- struct udev_enumerate *e; + int r; + + if (n_columns <= 0) +@@ -162,10 +163,8 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { + return -ENOMEM; + + e = udev_enumerate_new(udev); +- if (!e) { +- r = -ENOMEM; +- goto finish; +- } ++ if (!e) ++ return ENOMEM; + + if (!streq(seat, "seat0")) + r = udev_enumerate_add_match_tag(e, seat); +@@ -173,11 +172,11 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { + r = udev_enumerate_add_match_tag(e, "seat"); + + if (r < 0) +- goto finish; ++ return r; + + r = udev_enumerate_scan_devices(e); + if (r < 0) +- goto finish; ++ return r; + + first = udev_enumerate_get_list_entry(e); + if (first) +@@ -185,12 +184,5 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { + else + printf("%s%s%s\n", prefix, draw_special_char(DRAW_TREE_RIGHT), "(none)"); + +-finish: +- if (e) +- udev_enumerate_unref(e); +- +- if (udev) +- udev_unref(udev); +- + return r; + } +diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c +index a234a89..aea1fbe 100644 +--- a/src/readahead/readahead-common.c ++++ b/src/readahead/readahead-common.c +@@ -27,13 +27,14 @@ + #include + #include + #include +-#include + + #include "log.h" + #include "readahead-common.h" + #include "util.h" + #include "missing.h" + #include "fileio.h" ++#include "libudev.h" ++#include "udev-util.h" + + int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st) { + assert(fd >= 0); +@@ -60,9 +61,9 @@ int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st) { + + int fs_on_ssd(const char *p) { + struct stat st; +- struct udev *udev = NULL; +- struct udev_device *udev_device = NULL, *look_at = NULL; +- bool b = false; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL; ++ struct udev_device *look_at = NULL; + const char *devtype, *rotational, *model, *id; + int r; + +@@ -128,7 +129,7 @@ int fs_on_ssd(const char *p) { + + udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev); + if (!udev_device) +- goto finish; ++ return false; + + devtype = udev_device_get_property_value(udev_device, "DEVTYPE"); + if (devtype && streq(devtype, "partition")) +@@ -137,46 +138,34 @@ int fs_on_ssd(const char *p) { + look_at = udev_device; + + if (!look_at) +- goto finish; ++ return false; + + /* First, try high-level property */ + id = udev_device_get_property_value(look_at, "ID_SSD"); +- if (id) { +- b = streq(id, "1"); +- goto finish; +- } ++ if (id) ++ return streq(id, "1"); + + /* Second, try kernel attribute */ + rotational = udev_device_get_sysattr_value(look_at, "queue/rotational"); +- if (rotational) { +- b = streq(rotational, "0"); +- goto finish; +- } ++ if (rotational) ++ return streq(rotational, "0"); + + /* Finally, fallback to heuristics */ + look_at = udev_device_get_parent(look_at); + if (!look_at) +- goto finish; ++ return false; + + model = udev_device_get_sysattr_value(look_at, "model"); + if (model) +- b = !!strstr(model, "SSD"); +- +-finish: +- if (udev_device) +- udev_device_unref(udev_device); +- +- if (udev) +- udev_unref(udev); ++ return !!strstr(model, "SSD"); + +- return b; ++ return false; + } + + int fs_on_read_only(const char *p) { + struct stat st; +- struct udev *udev = NULL; +- struct udev_device *udev_device = NULL; +- bool b = false; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL; + const char *read_only; + + assert(p); +@@ -187,24 +176,19 @@ int fs_on_read_only(const char *p) { + if (major(st.st_dev) == 0) + return false; + +- if (!(udev = udev_new())) ++ udev = udev_new(); ++ if (!udev) + return -ENOMEM; + +- if (!(udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev))) +- goto finish; +- +- if ((read_only = udev_device_get_sysattr_value(udev_device, "ro"))) +- if ((b = streq(read_only, "1"))) +- goto finish; +- +-finish: +- if (udev_device) +- udev_device_unref(udev_device); ++ udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev); ++ if (!udev_device) ++ return false; + +- if (udev) +- udev_unref(udev); ++ read_only = udev_device_get_sysattr_value(udev_device, "ro"); ++ if (read_only) ++ return streq(read_only, "1"); + +- return b; ++ return false; + } + + bool enough_ram(void) { +diff --git a/src/shared/fdset.h b/src/shared/fdset.h +index 1a26005..6277e46 100644 +--- a/src/shared/fdset.h ++++ b/src/shared/fdset.h +@@ -49,8 +49,5 @@ int fdset_iterate(FDSet *s, Iterator *i); + #define FDSET_FOREACH(fd, fds, i) \ + for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i))) + +-static inline void fdset_freep(FDSet **fds) { +- if (*fds) +- fdset_free(*fds); +-} ++define_trivial_cleanup_func(FDSet*, fdset_free) + #define _cleanup_fdset_free_ _cleanup_(fdset_freep) +diff --git a/src/shared/install.c b/src/shared/install.c +index 9722ed4..b9c85b7 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -44,10 +44,8 @@ typedef struct { + Hashmap *have_installed; + } InstallContext; + +-#define _cleanup_lookup_paths_free_ \ +- __attribute__((cleanup(lookup_paths_free))) +-#define _cleanup_install_context_done_ \ +- __attribute__((cleanup(install_context_done))) ++#define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free) ++#define _cleanup_install_context_done_ _cleanup_(install_context_done) + + static int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope) { + assert(paths); +diff --git a/src/shared/set.h b/src/shared/set.h +index e5d46e9..a291470 100644 +--- a/src/shared/set.h ++++ b/src/shared/set.h +@@ -28,19 +28,13 @@ + * for each set use. */ + + #include "hashmap.h" ++#include "util.h" + + typedef struct Set Set; + + Set *set_new(hash_func_t hash_func, compare_func_t compare_func); + void set_free(Set* s); +-static inline void set_freep(Set **s) { +- set_free(*s); +-} +- + void set_free_free(Set *s); +-static inline void set_free_freep(Set **s) { +- set_free_free(*s); +-} + + Set* set_copy(Set *s); + int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func); +@@ -79,5 +73,7 @@ char **set_get_strv(Set *s); + #define SET_FOREACH_BACKWARDS(e, s, i) \ + for ((i) = ITERATOR_LAST, (e) = set_iterate_backwards((s), &(i)); (e); (e) = set_iterate_backwards((s), &(i))) + ++define_trivial_cleanup_func(Set*, set_free) ++define_trivial_cleanup_func(Set*, set_free_free) + #define _cleanup_set_free_ _cleanup_(set_freep) + #define _cleanup_set_free_free_ _cleanup_(set_free_freep) +diff --git a/src/shared/strv.h b/src/shared/strv.h +index d1f2a0e..4d117f8 100644 +--- a/src/shared/strv.h ++++ b/src/shared/strv.h +@@ -24,16 +24,13 @@ + #include + #include + +-#include "macro.h" ++#include "util.h" + + char *strv_find(char **l, const char *name) _pure_; + char *strv_find_prefix(char **l, const char *name) _pure_; + + void strv_free(char **l); +-static inline void strv_freep(char ***l) { +- strv_free(*l); +-} +- ++define_trivial_cleanup_func(char**, strv_free) + #define _cleanup_strv_free_ _cleanup_(strv_freep) + + char **strv_copy(char * const *l); +diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h +new file mode 100644 +index 0000000..bff8f5f +--- /dev/null ++++ b/src/shared/udev-util.h +@@ -0,0 +1,37 @@ ++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ ++ ++#pragma once ++ ++/*** ++ This file is part of systemd. ++ ++ Copyright 2013 Zbigniew Jędrzejewski-Szmek ++ ++ systemd is free software; you can redistribute it and/or modify it ++ under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation; either version 2.1 of the License, or ++ (at your option) any later version. ++ ++ systemd is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with systemd; If not, see . ++***/ ++ ++#include "udev.h" ++#include "util.h" ++ ++define_trivial_cleanup_func(struct udev*, udev_unref) ++define_trivial_cleanup_func(struct udev_device*, udev_device_unref) ++define_trivial_cleanup_func(struct udev_enumerate*, udev_enumerate_unref) ++define_trivial_cleanup_func(struct udev_event*, udev_event_unref) ++define_trivial_cleanup_func(struct udev_rules*, udev_rules_unref) ++ ++#define _cleanup_udev_unref_ _cleanup_(udev_unrefp) ++#define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) ++#define _cleanup_udev_enumerate_unref_ _cleanup_(udev_enumerate_unrefp) ++#define _cleanup_udev_event_unref_ _cleanup_(udev_event_unrefp) ++#define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) +diff --git a/src/shared/util.h b/src/shared/util.h +index 5a1e1bc..e577ef0 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -556,42 +556,33 @@ static inline void freep(void *p) { + free(*(void**) p); + } + +-static inline void fclosep(FILE **f) { +- if (*f) +- fclose(*f); +-} +- +-static inline void pclosep(FILE **f) { +- if (*f) +- pclose(*f); +-} ++#define define_trivial_cleanup_func(type, func) \ ++ static inline void func##p(type *p) { \ ++ if (*p) \ ++ func(*p); \ ++ } \ + + static inline void closep(int *fd) { + if (*fd >= 0) + close_nointr_nofail(*fd); + } + +-static inline void closedirp(DIR **d) { +- if (*d) +- closedir(*d); +-} +- + static inline void umaskp(mode_t *u) { + umask(*u); + } + +-static inline void endmntentp(FILE **f) { +- if (*f) +- endmntent(*f); +-} ++define_trivial_cleanup_func(FILE*, fclose) ++define_trivial_cleanup_func(FILE*, pclose) ++define_trivial_cleanup_func(DIR*, closedir) ++define_trivial_cleanup_func(FILE*, endmntent) + + #define _cleanup_free_ _cleanup_(freep) +-#define _cleanup_fclose_ _cleanup_(fclosep) +-#define _cleanup_pclose_ _cleanup_(pclosep) + #define _cleanup_close_ _cleanup_(closep) +-#define _cleanup_closedir_ _cleanup_(closedirp) + #define _cleanup_umask_ _cleanup_(umaskp) + #define _cleanup_globfree_ _cleanup_(globfree) ++#define _cleanup_fclose_ _cleanup_(fclosep) ++#define _cleanup_pclose_ _cleanup_(pclosep) ++#define _cleanup_closedir_ _cleanup_(closedirp) + #define _cleanup_endmntent_ _cleanup_(endmntentp) + + _malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) { +diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c +index 716767b..ab7d5a9 100644 +--- a/src/test/test-libudev.c ++++ b/src/test/test-libudev.c +@@ -29,6 +29,7 @@ + #include + + #include "libudev.h" ++#include "udev-util.h" + #include "util.h" + + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +@@ -117,7 +118,7 @@ static void print_device(struct udev_device *device) + + static int test_device(struct udev *udev, const char *syspath) + { +- struct udev_device *device; ++ _cleanup_udev_device_unref_ struct udev_device *device; + + printf("looking at device: %s\n", syspath); + device = udev_device_new_from_syspath(udev, syspath); +@@ -126,13 +127,13 @@ static int test_device(struct udev *udev, const char *syspath) + return -1; + } + print_device(device); +- udev_device_unref(device); ++ + return 0; + } + + static int test_device_parents(struct udev *udev, const char *syspath) + { +- struct udev_device *device; ++ _cleanup_udev_device_unref_ struct udev_device *device; + struct udev_device *device_parent; + + printf("looking at device: %s\n", syspath); +@@ -153,7 +154,6 @@ static int test_device_parents(struct udev *udev, const char *syspath) + print_device(device_parent); + device_parent = udev_device_get_parent(device_parent); + } while (device_parent != NULL); +- udev_device_unref(device); + + return 0; + } +diff --git a/src/test/test-udev.c b/src/test/test-udev.c +index 52b61b4..17825f1 100644 +--- a/src/test/test-udev.c ++++ b/src/test/test-udev.c +@@ -34,6 +34,7 @@ + + #include "missing.h" + #include "udev.h" ++#include "udev-util.h" + + void udev_main_log(struct udev *udev, int priority, + const char *file, int line, const char *fn, +@@ -82,10 +83,10 @@ out: + + int main(int argc, char *argv[]) + { +- struct udev *udev; +- struct udev_event *event = NULL; +- struct udev_device *dev = NULL; +- struct udev_rules *rules = NULL; ++ _cleanup_udev_unref_ struct udev *udev = NULL; ++ _cleanup_udev_event_unref_ struct udev_event *event = NULL; ++ _cleanup_udev_device_unref_ struct udev_device *dev = NULL; ++ _cleanup_udev_rules_unref_ struct udev_rules *rules = NULL; + char syspath[UTIL_PATH_SIZE]; + const char *devpath; + const char *action; +@@ -98,7 +99,8 @@ int main(int argc, char *argv[]) + + udev = udev_new(); + if (udev == NULL) +- exit(EXIT_FAILURE); ++ return EXIT_FAILURE; ++ + log_debug("version %s\n", VERSION); + label_init("/dev"); + +@@ -160,12 +162,7 @@ int main(int argc, char *argv[]) + out: + if (event != NULL && event->fd_signal >= 0) + close(event->fd_signal); +- udev_event_unref(event); +- udev_device_unref(dev); +- udev_rules_unref(rules); + label_finish(); +- udev_unref(udev); +- if (err != 0) +- return EXIT_FAILURE; +- return EXIT_SUCCESS; ++ ++ return err ? EXIT_FAILURE : EXIT_SUCCESS; + } +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 67b13bc..309fa07 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -996,10 +996,7 @@ static void item_free(Item *i) { + free(i); + } + +-static inline void item_freep(Item **i) { +- if (*i) +- item_free(*i); +-} ++define_trivial_cleanup_func(Item*, item_free) + #define _cleanup_item_free_ _cleanup_(item_freep) + + static bool item_equal(Item *a, Item *b) { diff --git a/SOURCES/0245-fsck-modernization.patch b/SOURCES/0245-fsck-modernization.patch new file mode 100644 index 0000000..bcb1278 --- /dev/null +++ b/SOURCES/0245-fsck-modernization.patch @@ -0,0 +1,140 @@ +From 64de3526cce9ef980b37fcb5c412a2734132ad47 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 11 Nov 2013 23:32:31 -0500 +Subject: [PATCH] fsck: modernization + +(cherry picked from commit e375825da0cbdbf3be755c277f9c0dec35b41a09) + +Related: #1098310 +--- + src/fsck/fsck.c | 43 ++++++++++++++++++------------------------- + 1 file changed, 18 insertions(+), 25 deletions(-) + +diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c +index 96a79dd..9b4e555 100644 +--- a/src/fsck/fsck.c ++++ b/src/fsck/fsck.c +@@ -176,7 +176,7 @@ static double percent(int pass, unsigned long cur, unsigned long max) { + } + + static int process_progress(int fd) { +- FILE *f, *console; ++ _cleanup_fclose_ FILE *console = NULL, *f = NULL; + usec_t last = 0; + bool locked = false; + int clear = 0; +@@ -188,15 +188,13 @@ static int process_progress(int fd) { + } + + console = fopen("/dev/console", "w"); +- if (!console) { +- fclose(f); ++ if (!console) + return -ENOMEM; +- } + + while (!feof(f)) { + int pass, m; + unsigned long cur, max; +- char *device; ++ _cleanup_free_ char *device = NULL; + double p; + usec_t t; + +@@ -205,20 +203,16 @@ static int process_progress(int fd) { + + /* Only show one progress counter at max */ + if (!locked) { +- if (flock(fileno(console), LOCK_EX|LOCK_NB) < 0) { +- free(device); ++ if (flock(fileno(console), LOCK_EX|LOCK_NB) < 0) + continue; +- } + + locked = true; + } + + /* Only update once every 50ms */ + t = now(CLOCK_MONOTONIC); +- if (last + 50 * USEC_PER_MSEC > t) { +- free(device); ++ if (last + 50 * USEC_PER_MSEC > t) + continue; +- } + + last = t; + +@@ -226,8 +220,6 @@ static int process_progress(int fd) { + fprintf(console, "\r%s: fsck %3.1f%% complete...\r%n", device, p, &m); + fflush(console); + +- free(device); +- + if (m > clear) + clear = m; + } +@@ -242,8 +234,6 @@ static int process_progress(int fd) { + fflush(console); + } + +- fclose(f); +- fclose(console); + return 0; + } + +@@ -287,34 +277,37 @@ int main(int argc, char *argv[]) { + + if (stat("/", &st) < 0) { + log_error("Failed to stat() the root directory: %m"); +- goto finish; ++ return EXIT_FAILURE; + } + + /* Virtual root devices don't need an fsck */ + if (major(st.st_dev) == 0) +- return 0; ++ return EXIT_SUCCESS; + + /* check if we are already writable */ + times[0] = st.st_atim; + times[1] = st.st_mtim; + if (utimensat(AT_FDCWD, "/", times, 0) == 0) { + log_info("Root directory is writable, skipping check."); +- return 0; ++ return EXIT_SUCCESS; + } + +- if (!(udev = udev_new())) { ++ udev = udev_new(); ++ if (!udev) { + log_oom(); +- goto finish; ++ return EXIT_FAILURE; + } + +- if (!(udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev))) { ++ udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev); ++ if (!udev_device) { + log_error("Failed to detect root device."); +- goto finish; ++ return EXIT_FAILURE; + } + +- if (!(device = udev_device_get_devnode(udev_device))) { ++ device = udev_device_get_devnode(udev_device); ++ if (!device) { + log_error("Failed to detect device node of root directory."); +- goto finish; ++ return EXIT_FAILURE; + } + + root_directory = true; +@@ -323,7 +316,7 @@ int main(int argc, char *argv[]) { + if (arg_show_progress) + if (pipe(progress_pipe) < 0) { + log_error("pipe(): %m"); +- goto finish; ++ return EXIT_FAILURE; + } + + cmdline[i++] = "/sbin/fsck"; diff --git a/SOURCES/0246-fsck-fstab-generator-be-lenient-about-missing-fsck.-.patch b/SOURCES/0246-fsck-fstab-generator-be-lenient-about-missing-fsck.-.patch new file mode 100644 index 0000000..75266a0 --- /dev/null +++ b/SOURCES/0246-fsck-fstab-generator-be-lenient-about-missing-fsck.-.patch @@ -0,0 +1,212 @@ +From c9e49e522d609f39ab77cbab18b8f1389692e1b8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 12 Nov 2013 00:53:59 -0500 +Subject: [PATCH] fsck,fstab-generator: be lenient about missing fsck. + +If fstab contains 1 for passno, treat this as an error, but only warn +briefly. If fstab doesn't contain this information, don't complain at +all. + +Patch is complicated a bit by the fact that we might have the fstype specified +in fstab or on /proc/cmdline, in which case we can check if we have the appropriate +fsck tool, or not specified, or specified as auto, in which case we have to look +and check the type of the filesystem ourselves. It cannot be done before the +device appears, so it is too early in the generator phase, and it must be done +directly in fsck service. + +(cherry picked from commit 94192cdaf652c9717f15274504ed315126c07a93) + +Resolves: #1098310 +--- + src/fsck/fsck.c | 40 ++++++++++++++---- + src/fstab-generator/fstab-generator.c | 77 +++++++++++++++++++++++------------ + 2 files changed, 82 insertions(+), 35 deletions(-) + +diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c +index 9b4e555..1189fe7 100644 +--- a/src/fsck/fsck.c ++++ b/src/fsck/fsck.c +@@ -244,10 +244,11 @@ int main(int argc, char *argv[]) { + siginfo_t status; + _cleanup_udev_unref_ struct udev *udev = NULL; + _cleanup_udev_device_unref_ struct udev_device *udev_device = NULL; +- const char *device; ++ const char *device, *type; + bool root_directory; + int progress_pipe[2] = { -1, -1 }; + char dash_c[2+10+1]; ++ struct stat st; + + if (argc > 2) { + log_error("This program expects one or no arguments."); +@@ -266,11 +267,27 @@ int main(int argc, char *argv[]) { + if (!arg_force && arg_skip) + return 0; + ++ udev = udev_new(); ++ if (!udev) { ++ log_oom(); ++ return EXIT_FAILURE; ++ } ++ + if (argc > 1) { + device = argv[1]; + root_directory = false; ++ ++ if (stat(device, &st) < 0) { ++ log_error("Failed to stat '%s': %m", device); ++ return EXIT_FAILURE; ++ } ++ ++ udev_device = udev_device_new_from_devnum(udev, 'b', st.st_rdev); ++ if (!udev_device) { ++ log_error("Failed to detect device %s", device); ++ return EXIT_FAILURE; ++ } + } else { +- struct stat st; + struct timespec times[2]; + + /* Find root device */ +@@ -292,12 +309,6 @@ int main(int argc, char *argv[]) { + return EXIT_SUCCESS; + } + +- udev = udev_new(); +- if (!udev) { +- log_oom(); +- return EXIT_FAILURE; +- } +- + udev_device = udev_device_new_from_devnum(udev, 'b', st.st_dev); + if (!udev_device) { + log_error("Failed to detect root device."); +@@ -313,6 +324,19 @@ int main(int argc, char *argv[]) { + root_directory = true; + } + ++ type = udev_device_get_property_value(udev_device, "ID_FS_TYPE"); ++ if (type) { ++ const char *checker = strappenda("/sbin/fsck.", type); ++ r = access(checker, X_OK); ++ if (r < 0) { ++ if (errno == ENOENT) { ++ log_info("%s doesn't exist, not checking file system.", checker); ++ return EXIT_SUCCESS; ++ } else ++ log_warning("%s cannot be used: %m", checker); ++ } ++ } ++ + if (arg_show_progress) + if (pipe(progress_pipe) < 0) { + log_error("pipe(): %m"); +diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c +index 78d7609..fa23ac9 100644 +--- a/src/fstab-generator/fstab-generator.c ++++ b/src/fstab-generator/fstab-generator.c +@@ -147,6 +147,52 @@ static bool mount_in_initrd(struct mntent *me) { + streq(me->mnt_dir, "/usr"); + } + ++static int add_fsck(FILE *f, const char *what, const char *where, const char *type, int passno) { ++ assert(f); ++ ++ if (passno == 0) ++ return 0; ++ ++ if (type && !streq(type, "auto")) { ++ int r; ++ const char *checker; ++ ++ checker = strappenda("/sbin/fsck.", type); ++ r = access(checker, X_OK); ++ if (r < 0) { ++ log_warning("Checking was requested for %s, but %s cannot be used: %m", what, checker); ++ ++ /* treat missing check as essentially OK */ ++ return errno == ENOENT ? 0 : -errno; ++ } ++ } ++ ++ if (streq(where, "/")) { ++ char *lnk; ++ ++ lnk = strappenda(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/systemd-fsck-root.service"); ++ mkdir_parents_label(lnk, 0755); ++ if (symlink("systemd-fsck-root.service", lnk) < 0) { ++ log_error("Failed to create symlink %s: %m", lnk); ++ return -errno; ++ } ++ } else { ++ _cleanup_free_ char *fsck = NULL; ++ ++ fsck = unit_name_from_path_instance("systemd-fsck", what, ".service"); ++ if (!fsck) ++ return log_oom(); ++ ++ fprintf(f, ++ "Requires=%s\n" ++ "After=%s\n", ++ fsck, ++ fsck); ++ } ++ ++ return 0; ++} ++ + static int add_mount( + const char *what, + const char *where, +@@ -162,6 +208,7 @@ static int add_mount( + *name = NULL, *unit = NULL, *lnk = NULL, + *automount_name = NULL, *automount_unit = NULL; + _cleanup_fclose_ FILE *f = NULL; ++ int r; + + assert(what); + assert(where); +@@ -209,32 +256,9 @@ static int add_mount( + "Before=%s\n", + post); + +- if (passno > 0) { +- if (streq(where, "/")) { +- lnk = strjoin(arg_dest, "/", SPECIAL_LOCAL_FS_TARGET, ".wants/", "systemd-fsck-root.service", NULL); +- if (!lnk) +- return log_oom(); +- +- mkdir_parents_label(lnk, 0755); +- if (symlink("systemd-fsck-root.service", lnk) < 0) { +- log_error("Failed to create symlink %s: %m", lnk); +- return -errno; +- } +- } else { +- _cleanup_free_ char *fsck = NULL; +- +- fsck = unit_name_from_path_instance("systemd-fsck", what, ".service"); +- if (!fsck) +- return log_oom(); +- +- fprintf(f, +- "Requires=%s\n" +- "After=%s\n", +- fsck, +- fsck); +- } +- } +- ++ r = add_fsck(f, what, where, type, passno); ++ if (r < 0) ++ return r; + + fprintf(f, + "\n" +@@ -260,7 +284,6 @@ static int add_mount( + + if (!noauto) { + if (post) { +- free(lnk); + lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL); + if (!lnk) + return log_oom(); diff --git a/SOURCES/0247-rules-60-persistent-storage-add-nvme-pcie-ssd-scsi_i.patch b/SOURCES/0247-rules-60-persistent-storage-add-nvme-pcie-ssd-scsi_i.patch new file mode 100644 index 0000000..d883427 --- /dev/null +++ b/SOURCES/0247-rules-60-persistent-storage-add-nvme-pcie-ssd-scsi_i.patch @@ -0,0 +1,24 @@ +From 5d050e50b2028d3b29f2ecd7a6e5fe0ab543c1df Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 28 Jul 2014 16:31:32 +0200 +Subject: [PATCH] rules/60-persistent-storage: add nvme pcie ssd scsi_id ENV + +Resolves: #1042990 +--- + rules/60-persistent-storage.rules | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules +index a4d009a..c47c130 100644 +--- a/rules/60-persistent-storage.rules ++++ b/rules/60-persistent-storage.rules +@@ -42,6 +42,9 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s + KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" + ++# NVMe ++KERNEL=="nvme*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $tempnode" ++ + # firewire + KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" + KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" diff --git a/SOURCES/0248-cgls-fix-running-with-M-option.patch b/SOURCES/0248-cgls-fix-running-with-M-option.patch new file mode 100644 index 0000000..f0c728e --- /dev/null +++ b/SOURCES/0248-cgls-fix-running-with-M-option.patch @@ -0,0 +1,166 @@ +From 2b7fc0e2a0a680fe61041e569eda50f06c3f8768 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 28 Jul 2014 18:18:58 +0200 +Subject: [PATCH] cgls: fix running with -M option + +systemd-machined doesn't store cgroup path in a state file anymore. +Let's figure it out from the scope. + +Resolves: #1085455 +--- + Makefile.am | 8 +++++- + src/cgls/cgls.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 91 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index fa2fba6..a9fb792 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1830,8 +1830,14 @@ systemd_reply_password_LDADD = \ + systemd_cgls_SOURCES = \ + src/cgls/cgls.c + ++systemd_cgls_CFLAGS = \ ++ $(AM_CFLAGS) \ ++ $(DBUS_CFLAGS) ++ + systemd_cgls_LDADD = \ +- libsystemd-shared.la ++ libsystemd-shared.la \ ++ libsystemd-dbus.la \ ++ libudev.la + + # ------------------------------------------------------------------------------ + systemd_cgtop_SOURCES = \ +diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c +index c689b5c..f678657 100644 +--- a/src/cgls/cgls.c ++++ b/src/cgls/cgls.c +@@ -19,6 +19,7 @@ + along with systemd; If not, see . + ***/ + ++#include + #include + #include + #include +@@ -35,6 +36,8 @@ + #include "build.h" + #include "output-mode.h" + #include "fileio.h" ++#include "dbus-common.h" ++#include "unit-name.h" + + static bool arg_no_pager = false; + static bool arg_kernel_threads = false; +@@ -127,6 +130,10 @@ int main(int argc, char *argv[]) { + int r = 0, retval = EXIT_FAILURE; + int output_flags; + char _cleanup_free_ *root = NULL; ++ DBusConnection *bus = NULL; ++ DBusError error; ++ ++ dbus_error_init(&error); + + log_parse_environment(); + log_open(); +@@ -147,6 +154,14 @@ int main(int argc, char *argv[]) { + } + } + ++ bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error); ++ ++ if (!bus) { ++ printf("Failed to get D-Bus connection: %s", error.message); ++ retval = EXIT_FAILURE; ++ goto finish; ++ } ++ + output_flags = + arg_all * OUTPUT_SHOW_ALL | + (arg_full > 0) * OUTPUT_FULL_WIDTH; +@@ -189,8 +204,67 @@ int main(int argc, char *argv[]) { + } else { + if (arg_machine) { + char *m; ++ const char *cgroup; ++ const char *property = "ControlGroup"; ++ const char *interface = "org.freedesktop.systemd1.Scope"; ++ _cleanup_free_ char *scope = NULL; ++ _cleanup_free_ char *path = NULL; ++ _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; ++ DBusMessageIter iter, sub; ++ + m = strappenda("/run/systemd/machines/", arg_machine); +- r = parse_env_file(m, NEWLINE, "CGROUP", &root, NULL); ++ r = parse_env_file(m, NEWLINE, "SCOPE", &scope, NULL); ++ ++ if (r < 0) { ++ log_error("Failed to get machine path: %s", strerror(-r)); ++ goto finish; ++ } ++ ++ path = unit_dbus_path_from_name(scope); ++ if (!path) { ++ r = log_oom(); ++ goto finish; ++ } ++ ++ r = bus_method_call_with_reply( ++ bus, ++ "org.freedesktop.systemd1", ++ path, ++ "org.freedesktop.DBus.Properties", ++ "Get", ++ &reply, ++ &error, ++ DBUS_TYPE_STRING, &interface, ++ DBUS_TYPE_STRING, &property, ++ DBUS_TYPE_INVALID); ++ if (r < 0) { ++ log_error("Failed to query ControlGroup: %s", bus_error(&error, r)); ++ dbus_error_free(&error); ++ goto finish; ++ } ++ ++ if (!dbus_message_iter_init(reply, &iter) || ++ dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT) { ++ log_error("Failed to parse reply."); ++ r = -EINVAL; ++ goto finish; ++ } ++ ++ dbus_message_iter_recurse(&iter, &sub); ++ if (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_STRING) { ++ log_error("Failed to parse reply."); ++ r = -EINVAL; ++ goto finish; ++ } ++ ++ dbus_message_iter_get_basic(&sub, &cgroup); ++ ++ root = strdup(cgroup); ++ if (!root) { ++ r = log_oom(); ++ goto finish; ++ } ++ + } else + r = cg_get_root_path(&root); + if (r < 0) { +@@ -211,6 +285,15 @@ int main(int argc, char *argv[]) { + retval = EXIT_SUCCESS; + + finish: ++ ++ if (bus) { ++ dbus_connection_flush(bus); ++ dbus_connection_close(bus); ++ dbus_connection_unref(bus); ++ } ++ ++ dbus_error_free(&error); ++ dbus_shutdown(); + pager_close(); + + return retval; diff --git a/SOURCES/0249-units-when-spawning-a-getty-configure-TERM-explicitl.patch b/SOURCES/0249-units-when-spawning-a-getty-configure-TERM-explicitl.patch new file mode 100644 index 0000000..a220c7b --- /dev/null +++ b/SOURCES/0249-units-when-spawning-a-getty-configure-TERM-explicitl.patch @@ -0,0 +1,60 @@ +From fa600b8b075ad4c717bd5f60fd3c6b5545cc75c5 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 18 Dec 2013 17:48:31 +0100 +Subject: [PATCH] units: when spawning a getty configure TERM explicitly + +This way we can make use of our logic to automatically determine an +appropriate TERM for a specific tty. + +Conflicts: + units/console-getty.service.m4.in + units/container-getty@.service.m4.in + +(cherry picked from commit ccf22d4a104e6ed2666d6c5b4031981a84787790) + +Related: #1075729 +--- + units/console-getty.service.m4.in | 2 +- + units/getty@.service.m4 | 2 +- + units/serial-getty@.service.m4 | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in +index 2fd9dd8..8ac51a4 100644 +--- a/units/console-getty.service.m4.in ++++ b/units/console-getty.service.m4.in +@@ -15,7 +15,7 @@ After=rc-local.service + Before=getty.target + + [Service] +-ExecStart=-/sbin/agetty --noclear -s console 115200,38400,9600 ++ExecStart=-/sbin/agetty --noclear --keep-baud console 115200,38400,9600 $TERM + Type=idle + Restart=always + RestartSec=0 +diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 +index 253da85..aa853b8 100644 +--- a/units/getty@.service.m4 ++++ b/units/getty@.service.m4 +@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0 + + [Service] + # the VT is cleared by TTYVTDisallocate +-ExecStart=-/sbin/agetty --noclear %I ++ExecStart=-/sbin/agetty --noclear %I $TERM + Type=idle + Restart=always + RestartSec=0 +diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 +index aea078f..e94cdb4 100644 +--- a/units/serial-getty@.service.m4 ++++ b/units/serial-getty@.service.m4 +@@ -22,7 +22,7 @@ Before=getty.target + IgnoreOnIsolate=yes + + [Service] +-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600 ++ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600 $TERM + Type=idle + Restart=always + RestartSec=0 diff --git a/SOURCES/0250-getty-Start-getty-on-3270-terminals-available-on-Lin.patch b/SOURCES/0250-getty-Start-getty-on-3270-terminals-available-on-Lin.patch new file mode 100644 index 0000000..8bc3414 --- /dev/null +++ b/SOURCES/0250-getty-Start-getty-on-3270-terminals-available-on-Lin.patch @@ -0,0 +1,84 @@ +From 39456b9f6e692a2385bf1288a53d02dd9abac8d5 Mon Sep 17 00:00:00 2001 +From: Hendrik Brueckner +Date: Tue, 11 Mar 2014 18:41:09 +0100 +Subject: [PATCH] getty: Start getty on 3270 terminals available on Linux on + System z + +Add the first 3270 terminal device that is associated with the Linux preferred +console to the list of virtualization consoles. This is required to +automatically start a getty if the conmode=3270 kernel parameter is specified +for Linux on z/VM instances. Note that a queued upstream patch also enable +the 3270 terminal device if it is associated with the Linux preferred console. +How + +To successfully start agetty on a 3270 terminal, a change in the agetty +parameter order is required. Previously, agetty would started like this: + + /sbin/agetty --keep-baud 3270/tty1 115200,38400,9600 TERM + +The agetty program interprets the "3270/tty1" as baud rate and fails to start +with the "bad speed: 3270/tty1" error message. Fixing this in agetty is more +complex rather than reordering the command line parameters like this: + + /sbin/agetty --keep-baud 115200,38400,9600 3270/tty1 TERM + +According to agetty sources and "agetty --help", agetty accepts the "tty", +"baudrate tty", and "tty baudrate" specifications. + +P.S. The "tty: Set correct tty name in 'active' sysfs attribute" introduces + a change to display the terminal device which is associated with the + Linux preferred console. This change helps to let systemd handle this + particular case only. Without the changes of this commit, no additional + 3270 terminal device can be managed by systemd. + + https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git/commit/?id=723abd87f6e536f1353c8f64f621520bc29523a3 + +(cherry picked from commit fc6c7fe9becdd70ae6b671c396f2ad2db0b71cd7) + +Resolves: #1075729 +--- + rules/99-systemd.rules.in | 2 +- + src/getty-generator/getty-generator.c | 3 ++- + units/serial-getty@.service.m4 | 2 +- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in +index 0471719..308a074 100644 +--- a/rules/99-systemd.rules.in ++++ b/rules/99-systemd.rules.in +@@ -7,7 +7,7 @@ + + ACTION=="remove", GOTO="systemd_end" + +-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[0-9]*", TAG+="systemd" + + KERNEL=="vport*", TAG+="systemd" + +diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c +index 40374b5..5a1997f 100644 +--- a/src/getty-generator/getty-generator.c ++++ b/src/getty-generator/getty-generator.c +@@ -93,7 +93,8 @@ int main(int argc, char *argv[]) { + "xvc0\0" + "hvsi0\0" + "sclp_line0\0" +- "ttysclp0\0"; ++ "ttysclp0\0" ++ "3270!tty1\0"; + + int r = EXIT_SUCCESS; + char *active; +diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 +index e94cdb4..4ac51e7 100644 +--- a/units/serial-getty@.service.m4 ++++ b/units/serial-getty@.service.m4 +@@ -22,7 +22,7 @@ Before=getty.target + IgnoreOnIsolate=yes + + [Service] +-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600 $TERM ++ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM + Type=idle + Restart=always + RestartSec=0 diff --git a/SOURCES/0251-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch b/SOURCES/0251-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch new file mode 100644 index 0000000..fce708d --- /dev/null +++ b/SOURCES/0251-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch @@ -0,0 +1,126 @@ +From 4323a5406bb40c76076814fd998e09c58b433e7d Mon Sep 17 00:00:00 2001 +From: Miguel Angel Ajo +Date: Mon, 7 Jul 2014 14:20:36 +0200 +Subject: [PATCH] core: Added support for ERRNO NOTIFY_SOCKET message parsing + +Added StatusErrno dbus property along StatusText to allow notification of +numeric status condition while degraded service operation or any other special +situation. + +(cherry picked from commit 4774e357268e4a1e9fa82adb0563a538932a4c8e) + +Resolves: #1106457 +--- + src/core/dbus-service.c | 3 +++ + src/core/service.c | 33 +++++++++++++++++++++++++++++---- + src/core/service.h | 1 + + 3 files changed, 33 insertions(+), 4 deletions(-) + +diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c +index 696c446..edfc7ff 100644 +--- a/src/core/dbus-service.c ++++ b/src/core/dbus-service.c +@@ -64,6 +64,7 @@ + " \n" \ + " \n" \ + " \n" \ ++ " \n" \ + " \n" \ + " \n" + +@@ -96,6 +97,7 @@ const char bus_service_invalidating_properties[] = + "MainPID\0" + "ControlPID\0" + "StatusText\0" ++ "StatusErrno\0" + "Result\0"; + + static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_service_append_type, service_type, ServiceType); +@@ -144,6 +146,7 @@ static const BusProperty bus_service_properties[] = { + { "ControlPID", bus_property_append_pid, "u", offsetof(Service, control_pid) }, + { "BusName", bus_property_append_string, "s", offsetof(Service, bus_name), true }, + { "StatusText", bus_property_append_string, "s", offsetof(Service, status_text), true }, ++ { "StatusErrno", bus_property_append_int, "i", offsetof(Service, status_errno) }, + { "Result", bus_service_append_service_result,"s", offsetof(Service, result) }, + {} + }; +diff --git a/src/core/service.c b/src/core/service.c +index f6fdbbc..3f6c8ac 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3443,6 +3443,7 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) { + static void service_notify_message(Unit *u, pid_t pid, char **tags) { + Service *s = SERVICE(u); + const char *e; ++ bool notify_dbus = false; + + assert(u); + +@@ -3478,6 +3479,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + "%s: got %s", u->id, e); + service_set_main_pid(s, pid); + unit_watch_pid(UNIT(s), pid); ++ notify_dbus = true; + } + } + +@@ -3516,12 +3518,34 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + + free(s->status_text); + s->status_text = t; +- } else { ++ } else ++ t = NULL; ++ ++ if (!streq_ptr(s->status_text, t)) { + free(s->status_text); +- s->status_text = NULL; +- } ++ s->status_text = t; ++ notify_dbus = true; ++ } else ++ free(t); ++ } ++ ++ /* Interpret ERRNO= */ ++ e = strv_find_prefix(tags, "ERRNO="); ++ if (e) { ++ int status_errno; + ++ if (safe_atoi(e + 6, &status_errno) < 0) ++ log_warning_unit(u->id, "Failed to parse ERRNO= field in notification message: %s", e); ++ else { ++ log_debug_unit(u->id, "%s: got %s", u->id, e); ++ ++ if (s->status_errno != status_errno) { ++ s->status_errno = status_errno; ++ notify_dbus = true; ++ } ++ } + } ++ + if (strv_find(tags, "WATCHDOG=1")) { + log_debug_unit(u->id, + "%s: got WATCHDOG=1", u->id); +@@ -3530,7 +3554,8 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + } + + /* Notify clients about changed status or main pid */ +- unit_add_to_dbus_queue(u); ++ if (notify_dbus) ++ unit_add_to_dbus_queue(u); + } + + #ifdef HAVE_SYSV_COMPAT +diff --git a/src/core/service.h b/src/core/service.h +index ce5b5e0..fa4ef2b 100644 +--- a/src/core/service.h ++++ b/src/core/service.h +@@ -187,6 +187,7 @@ struct Service { + char *bus_name; + + char *status_text; ++ int status_errno; + + RateLimit start_limit; + StartLimitAction start_limit_action; diff --git a/SOURCES/0252-service-don-t-accept-negative-ERRNO-notification-mes.patch b/SOURCES/0252-service-don-t-accept-negative-ERRNO-notification-mes.patch new file mode 100644 index 0000000..2e2d570 --- /dev/null +++ b/SOURCES/0252-service-don-t-accept-negative-ERRNO-notification-mes.patch @@ -0,0 +1,25 @@ +From 865e6e46f235bc9c58e61024696fff216e7a2182 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 7 Jul 2014 17:32:44 +0200 +Subject: [PATCH] service: don't accept negative ERRNO= notification messages + +(cherry picked from commit 2040ccf171404b709acb0ecf1d1f17b87c5d05f0) + +Related: #1106457 +--- + src/core/service.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 3f6c8ac..814019d 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3534,7 +3534,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + if (e) { + int status_errno; + +- if (safe_atoi(e + 6, &status_errno) < 0) ++ if (safe_atoi(e + 6, &status_errno) < 0 || status_errno < 0) + log_warning_unit(u->id, "Failed to parse ERRNO= field in notification message: %s", e); + else { + log_debug_unit(u->id, "%s: got %s", u->id, e); diff --git a/SOURCES/0253-socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch b/SOURCES/0253-socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch new file mode 100644 index 0000000..4670661 --- /dev/null +++ b/SOURCES/0253-socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch @@ -0,0 +1,610 @@ +From 6744ef720b34a87ff69acb8535cf5e83db6f5e8b Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 24 Jun 2014 14:50:26 +0200 +Subject: [PATCH] socket: add SocketUser= and SocketGroup= for chown()ing + sockets in the file system + +This is relatively complex, as we cannot invoke NSS from PID 1, and thus +need to fork a helper process temporarily. + +(cherry picked from commit 3900e5fdff688dc3c273f177d9d913b7389d5561) + +Resolves: #1111761 +--- + man/systemd.socket.xml | 38 ++++-- + src/core/dbus-socket.c | 8 +- + src/core/load-fragment-gperf.gperf.m4 | 4 +- + src/core/socket.c | 220 +++++++++++++++++++++++++++------- + src/core/socket.h | 5 + + src/shared/exit-status.c | 4 + + src/shared/exit-status.h | 3 +- + 7 files changed, 224 insertions(+), 58 deletions(-) + +diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml +index 570a6fb..d146b3b 100644 +--- a/man/systemd.socket.xml ++++ b/man/systemd.socket.xml +@@ -372,16 +372,21 @@ + + + +- DirectoryMode= +- If listening on a file +- system socket or FIFO, the parent +- directories are automatically created +- if needed. This option specifies the +- file system access mode used when +- creating these directories. Takes an +- access mode in octal +- notation. Defaults to +- 0755. ++ SocketUser= ++ SocketGroup= ++ ++ Takes a UNIX ++ user/group name. When specified ++ all AF_UNIX sockets and FIFO nodes in ++ the file system are owned by the ++ specified user and group. If unset ++ (the default), the nodes are owned by ++ the root user/group (if run in system ++ context) or the invoking user/group ++ (if run in user context). If only a ++ user is specified but no group, then ++ the group is derived from the user's ++ default group. + + + +@@ -396,6 +401,19 @@ + + + ++ DirectoryMode= ++ If listening on a file ++ system socket or FIFO, the parent ++ directories are automatically created ++ if needed. This option specifies the ++ file system access mode used when ++ creating these directories. Takes an ++ access mode in octal ++ notation. Defaults to ++ 0755. ++ ++ ++ + Accept= + Takes a boolean + argument. If true, a service instance +diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c +index 30c4b63..870bcdc 100644 +--- a/src/core/dbus-socket.c ++++ b/src/core/dbus-socket.c +@@ -44,8 +44,10 @@ + BUS_CGROUP_CONTEXT_INTERFACE \ + " \n" \ + " \n" \ +- " \n" \ ++ " \n" \ ++ " \n" \ + " \n" \ ++ " \n" \ + " \n" \ + " \n" \ + " \n" \ +@@ -172,8 +174,10 @@ static const BusProperty bus_socket_properties[] = { + BUS_EXEC_COMMAND_PROPERTY("ExecStopPost", offsetof(Socket, exec_command[SOCKET_EXEC_STOP_POST]), true ), + { "ControlPID", bus_property_append_pid, "u", offsetof(Socket, control_pid) }, + { "BindToDevice", bus_property_append_string, "s", offsetof(Socket, bind_to_device), true }, +- { "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) }, ++ { "SocketUser", bus_property_append_string, "s", offsetof(Socket, user), true }, ++ { "SocketGroup", bus_property_append_string, "s", offsetof(Socket, group), true }, + { "SocketMode", bus_property_append_mode, "u", offsetof(Socket, socket_mode) }, ++ { "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) }, + { "Accept", bus_property_append_bool, "b", offsetof(Socket, accept) }, + { "KeepAlive", bus_property_append_bool, "b", offsetof(Socket, keep_alive) }, + { "Priority", bus_property_append_int, "i", offsetof(Socket, priority) }, +diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 +index d65bcc1..0991cb9 100644 +--- a/src/core/load-fragment-gperf.gperf.m4 ++++ b/src/core/load-fragment-gperf.gperf.m4 +@@ -193,8 +193,10 @@ Socket.ExecStartPost, config_parse_exec, SOCKET_EXEC + Socket.ExecStopPre, config_parse_exec, SOCKET_EXEC_STOP_PRE, offsetof(Socket, exec_command) + Socket.ExecStopPost, config_parse_exec, SOCKET_EXEC_STOP_POST, offsetof(Socket, exec_command) + Socket.TimeoutSec, config_parse_sec, 0, offsetof(Socket, timeout_usec) +-Socket.DirectoryMode, config_parse_mode, 0, offsetof(Socket, directory_mode) ++Socket.SocketUser, config_parse_unit_string_printf, 0, offsetof(Socket, user) ++Socket.SocketGroup, config_parse_unit_string_printf, 0, offsetof(Socket, group) + Socket.SocketMode, config_parse_mode, 0, offsetof(Socket, socket_mode) ++Socket.DirectoryMode, config_parse_mode, 0, offsetof(Socket, directory_mode) + Socket.Accept, config_parse_bool, 0, offsetof(Socket, accept) + Socket.MaxConnections, config_parse_unsigned, 0, offsetof(Socket, max_connections) + Socket.KeepAlive, config_parse_bool, 0, offsetof(Socket, keep_alive) +diff --git a/src/core/socket.c b/src/core/socket.c +index e673f38..32e0d35 100644 +--- a/src/core/socket.c ++++ b/src/core/socket.c +@@ -54,6 +54,7 @@ + static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = { + [SOCKET_DEAD] = UNIT_INACTIVE, + [SOCKET_START_PRE] = UNIT_ACTIVATING, ++ [SOCKET_START_CHOWN] = UNIT_ACTIVATING, + [SOCKET_START_POST] = UNIT_ACTIVATING, + [SOCKET_LISTENING] = UNIT_ACTIVE, + [SOCKET_RUNNING] = UNIT_ACTIVE, +@@ -147,6 +148,8 @@ static void socket_done(Unit *u) { + free(s->smack); + free(s->smack_ip_in); + free(s->smack_ip_out); ++ free(s->user); ++ free(s->group); + + unit_unwatch_timer(u, &s->timer_watch); + } +@@ -527,6 +530,16 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { + "%sSmackLabelIPOut: %s\n", + prefix, s->smack_ip_out); + ++ if (s->user) ++ fprintf(f, ++ "%sOwnerUser: %s\n", ++ prefix, s->user); ++ ++ if (s->group) ++ fprintf(f, ++ "%sOwnerGroup: %s\n", ++ prefix, s->user); ++ + LIST_FOREACH(port, p, s->ports) { + + if (p->type == SOCKET_SOCKET) { +@@ -1100,6 +1113,7 @@ static void socket_set_state(Socket *s, SocketState state) { + s->state = state; + + if (state != SOCKET_START_PRE && ++ state != SOCKET_START_CHOWN && + state != SOCKET_START_POST && + state != SOCKET_STOP_PRE && + state != SOCKET_STOP_PRE_SIGTERM && +@@ -1116,7 +1130,8 @@ static void socket_set_state(Socket *s, SocketState state) { + if (state != SOCKET_LISTENING) + socket_unwatch_fds(s); + +- if (state != SOCKET_START_POST && ++ if (state != SOCKET_START_CHOWN && ++ state != SOCKET_START_POST && + state != SOCKET_LISTENING && + state != SOCKET_RUNNING && + state != SOCKET_STOP_PRE && +@@ -1143,6 +1158,7 @@ static int socket_coldplug(Unit *u) { + if (s->deserialized_state != s->state) { + + if (s->deserialized_state == SOCKET_START_PRE || ++ s->deserialized_state == SOCKET_START_CHOWN || + s->deserialized_state == SOCKET_START_POST || + s->deserialized_state == SOCKET_STOP_PRE || + s->deserialized_state == SOCKET_STOP_PRE_SIGTERM || +@@ -1163,7 +1179,8 @@ static int socket_coldplug(Unit *u) { + return r; + } + +- if (s->deserialized_state == SOCKET_START_POST || ++ if (s->deserialized_state == SOCKET_START_CHOWN || ++ s->deserialized_state == SOCKET_START_POST || + s->deserialized_state == SOCKET_LISTENING || + s->deserialized_state == SOCKET_RUNNING || + s->deserialized_state == SOCKET_STOP_PRE || +@@ -1185,7 +1202,7 @@ static int socket_coldplug(Unit *u) { + static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) { + pid_t pid; + int r; +- char **argv; ++ _cleanup_strv_free_ char **argv = NULL; + + assert(s); + assert(c); +@@ -1216,11 +1233,11 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) { + NULL, + &pid); + +- strv_free(argv); + if (r < 0) + goto fail; + +- if ((r = unit_watch_pid(UNIT(s), pid)) < 0) ++ r = unit_watch_pid(UNIT(s), pid); ++ if (r < 0) + /* FIXME: we need to do something here */ + goto fail; + +@@ -1234,6 +1251,88 @@ fail: + return r; + } + ++static int socket_chown(Socket *s, pid_t *_pid) { ++ pid_t pid; ++ int r; ++ ++ r = unit_watch_timer(UNIT(s), CLOCK_MONOTONIC, true, s->timeout_usec, &s->timer_watch); ++ if (r < 0) ++ goto fail; ++ ++ pid = fork(); ++ if (pid < 0) ++ return -errno; ++ ++ if (pid == 0) { ++ SocketPort *p; ++ uid_t uid = (uid_t) -1; ++ gid_t gid = (gid_t) -1; ++ int ret; ++ ++ default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1); ++ ignore_signals(SIGPIPE, -1); ++ log_forget_fds(); ++ ++ if (!isempty(s->user)) { ++ const char *user = s->user; ++ ++ r = get_user_creds(&user, &uid, &gid, NULL, NULL); ++ if (r < 0) { ++ ret = EXIT_USER; ++ goto fail_child; ++ } ++ } ++ ++ if (!isempty(s->group)) { ++ const char *group = s->group; ++ ++ r = get_group_creds(&group, &gid); ++ if (r < 0) { ++ ret = EXIT_GROUP; ++ goto fail_child; ++ } ++ } ++ ++ LIST_FOREACH(port, p, s->ports) { ++ const char *path = NULL; ++ ++ if (p->type == SOCKET_SOCKET) ++ path = socket_address_get_path(&p->address); ++ else if (p->type == SOCKET_FIFO) ++ path = p->path; ++ ++ if (!path) ++ continue; ++ ++ if (chown(path, uid, gid) < 0) { ++ r = -errno; ++ ret = EXIT_CHOWN; ++ goto fail_child; ++ } ++ } ++ ++ _exit(0); ++ ++ fail_child: ++ log_open(); ++ log_error("Failed to chown socket at step %s: %s", exit_status_to_string(ret, EXIT_STATUS_SYSTEMD), strerror(-r)); ++ ++ _exit(ret); ++ } ++ ++ r = unit_watch_pid(UNIT(s), pid); ++ if (r < 0) ++ goto fail; ++ ++ *_pid = pid; ++ ++ return 0; ++ ++fail: ++ unit_unwatch_timer(UNIT(s), &s->timer_watch); ++ return r; ++} ++ + static void socket_enter_dead(Socket *s, SocketResult f) { + assert(s); + +@@ -1256,9 +1355,11 @@ static void socket_enter_stop_post(Socket *s, SocketResult f) { + socket_unwatch_control_pid(s); + + s->control_command_id = SOCKET_EXEC_STOP_POST; ++ s->control_command = s->exec_command[SOCKET_EXEC_STOP_POST]; + +- if ((s->control_command = s->exec_command[SOCKET_EXEC_STOP_POST])) { +- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0) ++ if (s->control_command) { ++ r = socket_spawn(s, s->control_command, &s->control_pid); ++ if (r < 0) + goto fail; + + socket_set_state(s, SOCKET_STOP_POST); +@@ -1326,9 +1427,11 @@ static void socket_enter_stop_pre(Socket *s, SocketResult f) { + socket_unwatch_control_pid(s); + + s->control_command_id = SOCKET_EXEC_STOP_PRE; ++ s->control_command = s->exec_command[SOCKET_EXEC_STOP_PRE]; + +- if ((s->control_command = s->exec_command[SOCKET_EXEC_STOP_PRE])) { +- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0) ++ if (s->control_command) { ++ r = socket_spawn(s, s->control_command, &s->control_pid); ++ if (r < 0) + goto fail; + + socket_set_state(s, SOCKET_STOP_PRE); +@@ -1376,15 +1479,13 @@ static void socket_enter_start_post(Socket *s) { + } + + socket_unwatch_control_pid(s); +- + s->control_command_id = SOCKET_EXEC_START_POST; ++ s->control_command = s->exec_command[SOCKET_EXEC_START_POST]; + +- if ((s->control_command = s->exec_command[SOCKET_EXEC_START_POST])) { ++ if (s->control_command) { + r = socket_spawn(s, s->control_command, &s->control_pid); + if (r < 0) { +- log_warning_unit(UNIT(s)->id, +- "%s failed to run 'start-post' task: %s", +- UNIT(s)->id, strerror(-r)); ++ log_warning_unit(UNIT(s)->id, "%s failed to run 'start-post' task: %s", UNIT(s)->id, strerror(-r)); + goto fail; + } + +@@ -1398,6 +1499,38 @@ fail: + socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES); + } + ++static void socket_enter_start_chown(Socket *s) { ++ int r; ++ ++ assert(s); ++ ++ r = socket_open_fds(s); ++ if (r < 0) { ++ log_warning_unit(UNIT(s)->id, "%s failed to listen on sockets: %s", UNIT(s)->id, strerror(-r)); ++ goto fail; ++ } ++ ++ if (!isempty(s->user) || !isempty(s->group)) { ++ socket_unwatch_control_pid(s); ++ s->control_command_id = SOCKET_EXEC_START_CHOWN; ++ s->control_command = NULL; ++ ++ r = socket_chown(s, &s->control_pid); ++ if (r < 0) { ++ log_warning_unit(UNIT(s)->id, "%s failed to fork 'start-chown' task: %s", UNIT(s)->id, strerror(-r)); ++ goto fail; ++ } ++ ++ socket_set_state(s, SOCKET_START_CHOWN); ++ } else ++ socket_enter_start_post(s); ++ ++ return; ++ ++fail: ++ socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES); ++} ++ + static void socket_enter_start_pre(Socket *s) { + int r; + assert(s); +@@ -1405,21 +1538,21 @@ static void socket_enter_start_pre(Socket *s) { + socket_unwatch_control_pid(s); + + s->control_command_id = SOCKET_EXEC_START_PRE; ++ s->control_command = s->exec_command[SOCKET_EXEC_START_PRE]; + +- if ((s->control_command = s->exec_command[SOCKET_EXEC_START_PRE])) { +- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0) ++ if (s->control_command) { ++ r = socket_spawn(s, s->control_command, &s->control_pid); ++ if (r < 0) + goto fail; + + socket_set_state(s, SOCKET_START_PRE); + } else +- socket_enter_start_post(s); ++ socket_enter_start_chown(s); + + return; + + fail: +- log_warning_unit(UNIT(s)->id, +- "%s failed to run 'start-pre' task: %s", +- UNIT(s)->id, strerror(-r)); ++ log_warning_unit(UNIT(s)->id, "%s failed to run 'start-pre' task: %s", UNIT(s)->id, strerror(-r)); + socket_enter_dead(s, SOCKET_FAILURE_RESOURCES); + } + +@@ -1609,6 +1742,7 @@ static int socket_start(Unit *u) { + return -EAGAIN; + + if (s->state == SOCKET_START_PRE || ++ s->state == SOCKET_START_CHOWN || + s->state == SOCKET_START_POST) + return 0; + +@@ -1669,6 +1803,7 @@ static int socket_stop(Unit *u) { + /* If there's already something running we go directly into + * kill mode. */ + if (s->state == SOCKET_START_PRE || ++ s->state == SOCKET_START_CHOWN || + s->state == SOCKET_START_POST) { + socket_enter_signal(s, SOCKET_STOP_PRE_SIGTERM, SOCKET_SUCCESS); + return -EAGAIN; +@@ -2098,11 +2233,18 @@ static void socket_sigchld_event(Unit *u, pid_t pid, int code, int status) { + + case SOCKET_START_PRE: + if (f == SOCKET_SUCCESS) +- socket_enter_start_post(s); ++ socket_enter_start_chown(s); + else + socket_enter_signal(s, SOCKET_FINAL_SIGTERM, f); + break; + ++ case SOCKET_START_CHOWN: ++ if (f == SOCKET_SUCCESS) ++ socket_enter_start_post(s); ++ else ++ socket_enter_stop_pre(s, f); ++ break; ++ + case SOCKET_START_POST: + if (f == SOCKET_SUCCESS) + socket_enter_listening(s); +@@ -2141,65 +2283,53 @@ static void socket_timer_event(Unit *u, uint64_t elapsed, Watch *w) { + switch (s->state) { + + case SOCKET_START_PRE: +- log_warning_unit(u->id, +- "%s starting timed out. Terminating.", u->id); ++ log_warning_unit(u->id, "%s starting timed out. Terminating.", u->id); + socket_enter_signal(s, SOCKET_FINAL_SIGTERM, SOCKET_FAILURE_TIMEOUT); + break; + ++ case SOCKET_START_CHOWN: + case SOCKET_START_POST: +- log_warning_unit(u->id, +- "%s starting timed out. Stopping.", u->id); ++ log_warning_unit(u->id, "%s starting timed out. Stopping.", u->id); + socket_enter_stop_pre(s, SOCKET_FAILURE_TIMEOUT); + break; + + case SOCKET_STOP_PRE: +- log_warning_unit(u->id, +- "%s stopping timed out. Terminating.", u->id); ++ log_warning_unit(u->id, "%s stopping timed out. Terminating.", u->id); + socket_enter_signal(s, SOCKET_STOP_PRE_SIGTERM, SOCKET_FAILURE_TIMEOUT); + break; + + case SOCKET_STOP_PRE_SIGTERM: + if (s->kill_context.send_sigkill) { +- log_warning_unit(u->id, +- "%s stopping timed out. Killing.", u->id); ++ log_warning_unit(u->id, "%s stopping timed out. Killing.", u->id); + socket_enter_signal(s, SOCKET_STOP_PRE_SIGKILL, SOCKET_FAILURE_TIMEOUT); + } else { +- log_warning_unit(u->id, +- "%s stopping timed out. Skipping SIGKILL. Ignoring.", +- u->id); ++ log_warning_unit(u->id, "%s stopping timed out. Skipping SIGKILL. Ignoring.", u->id); + socket_enter_stop_post(s, SOCKET_FAILURE_TIMEOUT); + } + break; + + case SOCKET_STOP_PRE_SIGKILL: +- log_warning_unit(u->id, +- "%s still around after SIGKILL. Ignoring.", u->id); ++ log_warning_unit(u->id, "%s still around after SIGKILL. Ignoring.", u->id); + socket_enter_stop_post(s, SOCKET_FAILURE_TIMEOUT); + break; + + case SOCKET_STOP_POST: +- log_warning_unit(u->id, +- "%s stopping timed out (2). Terminating.", u->id); ++ log_warning_unit(u->id, "%s stopping timed out (2). Terminating.", u->id); + socket_enter_signal(s, SOCKET_FINAL_SIGTERM, SOCKET_FAILURE_TIMEOUT); + break; + + case SOCKET_FINAL_SIGTERM: + if (s->kill_context.send_sigkill) { +- log_warning_unit(u->id, +- "%s stopping timed out (2). Killing.", u->id); ++ log_warning_unit(u->id, "%s stopping timed out (2). Killing.", u->id); + socket_enter_signal(s, SOCKET_FINAL_SIGKILL, SOCKET_FAILURE_TIMEOUT); + } else { +- log_warning_unit(u->id, +- "%s stopping timed out (2). Skipping SIGKILL. Ignoring.", +- u->id); ++ log_warning_unit(u->id, "%s stopping timed out (2). Skipping SIGKILL. Ignoring.", u->id); + socket_enter_dead(s, SOCKET_FAILURE_TIMEOUT); + } + break; + + case SOCKET_FINAL_SIGKILL: +- log_warning_unit(u->id, +- "%s still around after SIGKILL (2). Entering failed mode.", +- u->id); ++ log_warning_unit(u->id, "%s still around after SIGKILL (2). Entering failed mode.", u->id); + socket_enter_dead(s, SOCKET_FAILURE_TIMEOUT); + break; + +@@ -2333,6 +2463,7 @@ static int socket_kill(Unit *u, KillWho who, int signo, DBusError *error) { + static const char* const socket_state_table[_SOCKET_STATE_MAX] = { + [SOCKET_DEAD] = "dead", + [SOCKET_START_PRE] = "start-pre", ++ [SOCKET_START_CHOWN] = "start-chown", + [SOCKET_START_POST] = "start-post", + [SOCKET_LISTENING] = "listening", + [SOCKET_RUNNING] = "running", +@@ -2349,6 +2480,7 @@ DEFINE_STRING_TABLE_LOOKUP(socket_state, SocketState); + + static const char* const socket_exec_command_table[_SOCKET_EXEC_COMMAND_MAX] = { + [SOCKET_EXEC_START_PRE] = "StartPre", ++ [SOCKET_EXEC_START_CHOWN] = "StartChown", + [SOCKET_EXEC_START_POST] = "StartPost", + [SOCKET_EXEC_STOP_PRE] = "StopPre", + [SOCKET_EXEC_STOP_POST] = "StopPost" +diff --git a/src/core/socket.h b/src/core/socket.h +index 3d7eadc..6a24883 100644 +--- a/src/core/socket.h ++++ b/src/core/socket.h +@@ -32,6 +32,7 @@ typedef struct Socket Socket; + typedef enum SocketState { + SOCKET_DEAD, + SOCKET_START_PRE, ++ SOCKET_START_CHOWN, + SOCKET_START_POST, + SOCKET_LISTENING, + SOCKET_RUNNING, +@@ -48,6 +49,7 @@ typedef enum SocketState { + + typedef enum SocketExecCommand { + SOCKET_EXEC_START_PRE, ++ SOCKET_EXEC_START_CHOWN, + SOCKET_EXEC_START_POST, + SOCKET_EXEC_STOP_PRE, + SOCKET_EXEC_STOP_POST, +@@ -151,6 +153,9 @@ struct Socket { + char *smack; + char *smack_ip_in; + char *smack_ip_out; ++ ++ char *user; ++ char *group; + }; + + /* Called from the service code when collecting fds */ +diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c +index 45131f2..f15fdba 100644 +--- a/src/shared/exit-status.c ++++ b/src/shared/exit-status.c +@@ -130,6 +130,10 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) { + + case EXIT_SECCOMP: + return "SECCOMP"; ++ ++ case EXIT_CHOWN: ++ return "CHOWN"; ++ + } + } + +diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h +index 1f035a3..52dd3d0 100644 +--- a/src/shared/exit-status.h ++++ b/src/shared/exit-status.h +@@ -67,7 +67,8 @@ typedef enum ExitStatus { + EXIT_NETWORK, + EXIT_NAMESPACE, + EXIT_NO_NEW_PRIVILEGES, +- EXIT_SECCOMP ++ EXIT_SECCOMP, ++ EXIT_CHOWN + } ExitStatus; + + typedef enum ExitStatusLevel { diff --git a/SOURCES/0254-selinux-Check-access-vector-for-enable-and-disable-p.patch b/SOURCES/0254-selinux-Check-access-vector-for-enable-and-disable-p.patch new file mode 100644 index 0000000..05bd7d7 --- /dev/null +++ b/SOURCES/0254-selinux-Check-access-vector-for-enable-and-disable-p.patch @@ -0,0 +1,83 @@ +From 1ea0879cf79412e27b8becdb2bbc7e0abd301a66 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 12 Aug 2014 12:58:47 +0200 +Subject: [PATCH] selinux: Check access vector for enable and disable perm for + each unit file + +--- + src/core/dbus-manager.c | 28 ++++++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 4 deletions(-) + +diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c +index 6d16c2a..cebc730 100644 +--- a/src/core/dbus-manager.c ++++ b/src/core/dbus-manager.c +@@ -1581,6 +1581,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "SetDefaultTarget")) { + + char **l = NULL; ++ char **i; + DBusMessageIter iter; + UnitFileScope scope = m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER; + UnitFileChange *changes = NULL; +@@ -1588,8 +1589,6 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + dbus_bool_t runtime, force; + int carries_install_info = -1; + +- SELINUX_ACCESS_CHECK(connection, message, streq(member, "MaskUnitFiles") ? "disable" : "enable"); +- + if (!dbus_message_iter_init(message, &iter)) + goto oom; + +@@ -1601,6 +1600,17 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + return bus_send_error_reply(connection, message, NULL, r); + } + ++ STRV_FOREACH(i, l) { ++ Unit *u; ++ ++ r = manager_load_unit(m, *i, NULL, NULL, &u); ++ if (r < 0) { ++ dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s does not exist.", *i); ++ return bus_send_error_reply(connection, message, &error, -ENOENT); ++ } ++ SELINUX_UNIT_ACCESS_CHECK(u, connection, message, streq(member, "MaskUnitFiles") ? "disable" : "enable"); ++ } ++ + if (!dbus_message_iter_next(&iter) || + bus_iter_get_basic_and_next(&iter, DBUS_TYPE_BOOLEAN, &runtime, true) < 0 || + bus_iter_get_basic_and_next(&iter, DBUS_TYPE_BOOLEAN, &force, false) < 0) { +@@ -1644,14 +1654,13 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "UnmaskUnitFiles")) { + + char **l = NULL; ++ char **i; + DBusMessageIter iter; + UnitFileScope scope = m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER; + UnitFileChange *changes = NULL; + unsigned n_changes = 0; + dbus_bool_t runtime; + +- SELINUX_ACCESS_CHECK(connection, message, streq(member, "UnmaskUnitFiles") ? "enable" : "disable"); +- + if (!dbus_message_iter_init(message, &iter)) + goto oom; + +@@ -1669,6 +1678,17 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, + return bus_send_error_reply(connection, message, NULL, -EIO); + } + ++ STRV_FOREACH(i, l) { ++ Unit *u; ++ ++ r = manager_load_unit(m, *i, NULL, NULL, &u); ++ if (r < 0) { ++ dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s does not exist.", *i); ++ return bus_send_error_reply(connection, message, &error, -ENOENT); ++ } ++ SELINUX_UNIT_ACCESS_CHECK(u, connection, message, streq(member, "UnmaskUnitFiles") ? "enable" : "disable"); ++ } ++ + if (streq(member, "DisableUnitFiles")) + r = unit_file_disable(scope, runtime, NULL, l, &changes, &n_changes); + else if (streq(member, "UnmaskUnitFiles")) diff --git a/SOURCES/0255-systemctl-show-StatusErrno-value-in-systemctl-status.patch b/SOURCES/0255-systemctl-show-StatusErrno-value-in-systemctl-status.patch new file mode 100644 index 0000000..527e21e --- /dev/null +++ b/SOURCES/0255-systemctl-show-StatusErrno-value-in-systemctl-status.patch @@ -0,0 +1,45 @@ +From eb075b31eb70910508309c6319d0cc37d454ff59 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 7 Jul 2014 17:33:26 +0200 +Subject: [PATCH] systemctl: show StatusErrno value in "systemctl status" + +(cherry picked from commit b4af5a803aa71a57733ca46fef29b7afb20a626c) + +Conflicts: + src/systemctl/systemctl.c + +Related: #1106457 +--- + src/systemctl/systemctl.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index d29133c..c738daf 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -2480,6 +2480,7 @@ typedef struct UnitStatusInfo { + const char *status_text; + const char *pid_file; + bool running:1; ++ int status_errno; + + usec_t start_timestamp; + usec_t exit_timestamp; +@@ -2751,6 +2752,8 @@ static void print_status_info(UnitStatusInfo *i, + + if (i->status_text) + printf(" Status: \"%s\"\n", i->status_text); ++ if (i->status_errno > 0) ++ printf(" Error: %i (%s)\n", i->status_errno, strerror(i->status_errno)); + + if (i->control_group && + (i->main_pid > 0 || i->control_pid > 0 || cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, i->control_group, false) == 0)) { +@@ -2963,6 +2966,8 @@ static int status_property(const char *name, DBusMessageIter *iter, UnitStatusIn + i->exit_code = (int) j; + else if (streq(name, "ExecMainStatus")) + i->exit_status = (int) j; ++ else if (streq(name, "StatusErrno")) ++ i->status_errno = (int) j; + + break; + } diff --git a/SOURCES/0256-service-flush-status-text-and-errno-values-each-time.patch b/SOURCES/0256-service-flush-status-text-and-errno-values-each-time.patch new file mode 100644 index 0000000..28b558a --- /dev/null +++ b/SOURCES/0256-service-flush-status-text-and-errno-values-each-time.patch @@ -0,0 +1,30 @@ +From 5078832417b89cfe92ad87133ecb4179a995db31 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 7 Jul 2014 17:33:46 +0200 +Subject: [PATCH] service: flush status text and errno values each time a + service is started + +We shouldn't show status texts from previous service starts + +(cherry picked from commit 8cfdb077b8e3da1c47fc1d735d051f21f33144c1) + +Related: #1106457 +--- + src/core/service.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/core/service.c b/src/core/service.c +index 814019d..a6d046c 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -2579,6 +2579,10 @@ static int service_start(Unit *u) { + s->main_pid_alien = false; + s->forbid_restart = false; + ++ free(s->status_text); ++ s->status_text = NULL; ++ s->status_errno = 0; ++ + service_enter_start_pre(s); + return 0; + } diff --git a/SOURCES/0257-service-don-t-free-status_text-twice.patch b/SOURCES/0257-service-don-t-free-status_text-twice.patch new file mode 100644 index 0000000..fc2db4d --- /dev/null +++ b/SOURCES/0257-service-don-t-free-status_text-twice.patch @@ -0,0 +1,24 @@ +From 3b6a01f5fc0a4770d9c55a1c7fb1addc231f3021 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Mon, 18 Aug 2014 16:12:45 +0200 +Subject: [PATCH] service: don't free status_text twice + +Related: #1106457 +--- + src/core/service.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/core/service.c b/src/core/service.c +index a6d046c..4366e1b 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3519,9 +3519,6 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + + log_debug_unit(u->id, + "%s: got %s", u->id, e); +- +- free(s->status_text); +- s->status_text = t; + } else + t = NULL; + diff --git a/SOURCES/0258-util-add-files_same-helper-function.patch b/SOURCES/0258-util-add-files_same-helper-function.patch new file mode 100644 index 0000000..5f34fda --- /dev/null +++ b/SOURCES/0258-util-add-files_same-helper-function.patch @@ -0,0 +1,71 @@ +From b6fbffe3d4a9435cc8560ee0271c7e6e763e89c1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 6 Mar 2014 09:12:57 +0100 +Subject: [PATCH] util: add files_same() helper function + +files_same() returns + 1, if the files are the same + 0, if the files have different inode/dev numbers + errno, for any stat error + + (cherry picked from commit 9d9951a460a90ef0e1e0384742cefdcf85193f8c) + + Related: #1111199 +--- + src/shared/util.c | 24 ++++++++++++++++-------- + src/shared/util.h | 2 ++ + 2 files changed, 18 insertions(+), 8 deletions(-) + +diff --git a/src/shared/util.c b/src/shared/util.c +index 2974c2a..fb1e6d1 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -3311,19 +3311,27 @@ bool on_tty(void) { + return cached_on_tty; + } + +-int running_in_chroot(void) { +- struct stat a = {}, b = {}; ++int files_same(const char *filea, const char *fileb) { ++ struct stat a, b; + +- /* Only works as root */ +- if (stat("/proc/1/root", &a) < 0) ++ if (stat(filea, &a) < 0) + return -errno; + +- if (stat("/", &b) < 0) ++ if (stat(fileb, &b) < 0) + return -errno; + +- return +- a.st_dev != b.st_dev || +- a.st_ino != b.st_ino; ++ return a.st_dev == b.st_dev && ++ a.st_ino == b.st_ino; ++} ++ ++int running_in_chroot(void) { ++ int ret; ++ ++ ret = files_same("/proc/1/root", "/"); ++ if (ret < 0) ++ return ret; ++ ++ return ret == 0; + } + + char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) { +diff --git a/src/shared/util.h b/src/shared/util.h +index e577ef0..631a385 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -403,6 +403,8 @@ static inline const char *ansi_highlight_off(void) { + return on_tty() ? ANSI_HIGHLIGHT_OFF : ""; + } + ++int files_same(const char *filea, const char *fileb); ++ + int running_in_chroot(void); + + char *ellipsize(const char *s, size_t length, unsigned percent); diff --git a/SOURCES/0259-systemctl-for-switch-root-check-if-we-switch-to-a-sy.patch b/SOURCES/0259-systemctl-for-switch-root-check-if-we-switch-to-a-sy.patch new file mode 100644 index 0000000..e465adb --- /dev/null +++ b/SOURCES/0259-systemctl-for-switch-root-check-if-we-switch-to-a-sy.patch @@ -0,0 +1,109 @@ +From cad8ec5980d63253586d9f884649c45eed0667a1 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 6 Mar 2014 16:35:02 +0100 +Subject: [PATCH] systemctl: for switch-root check, if we switch to a systemd + init + +If "systemctl switch-root" is called with a specific "INIT" or +/proc/cmdline contains "init=", then systemd would not serialize +itsself. + +Let systemctl check, if the new init is in the standard systemd +installation path and if so, clear the INIT parameter, +to let systemd serialize itsself. + +Conflicts: + src/systemctl/systemctl.c + +(cherry picked from commit f39d4a08e746e703d562076a0f622eb91dbdcd3e) + +Related: #1111199 +--- + src/shared/util.h | 13 +++++++++++++ + src/systemctl/systemctl.c | 35 ++++++++++++++++++++++++++--------- + 2 files changed, 39 insertions(+), 9 deletions(-) + +diff --git a/src/shared/util.h b/src/shared/util.h +index 631a385..d11fa07 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -726,6 +726,19 @@ int unlink_noerrno(const char *path); + _c_; \ + }) + ++#define strappenda3(a, b, c) \ ++ ({ \ ++ const char *_a_ = (a), *_b_ = (b), *_c_ = (c); \ ++ char *_d_; \ ++ size_t _x_, _y_, _z_; \ ++ _x_ = strlen(_a_); \ ++ _y_ = strlen(_b_); \ ++ _z_ = strlen(_c_); \ ++ _d_ = alloca(_x_ + _y_ + _z_ + 1); \ ++ strcpy(stpcpy(stpcpy(_d_, _a_), _b_), _c_); \ ++ _d_; \ ++ }) ++ + #define procfs_file_alloca(pid, field) \ + ({ \ + pid_t _pid_ = (pid); \ +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index c738daf..1ca4fd3 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4143,9 +4143,10 @@ static int show_enviroment(DBusConnection *bus, char **args) { + } + + static int switch_root(DBusConnection *bus, char **args) { ++ _cleanup_free_ char *cmdline_init = NULL; ++ const char *root, *init; + unsigned l; +- const char *root; +- _cleanup_free_ char *init = NULL; ++ int r; + + l = strv_length(args); + if (l < 2 || l > 3) { +@@ -4156,19 +4157,35 @@ static int switch_root(DBusConnection *bus, char **args) { + root = args[1]; + + if (l >= 3) +- init = strdup(args[2]); ++ init = args[2]; + else { +- parse_env_file("/proc/cmdline", WHITESPACE, +- "init", &init, +- NULL); ++ r = parse_env_file("/proc/cmdline", WHITESPACE, ++ "init", &cmdline_init, ++ NULL); ++ if (r < 0) ++ log_debug("Failed to parse /proc/cmdline: %s", strerror(-r)); + +- if (!init) +- init = strdup(""); ++ init = cmdline_init; + } + if (!init) + return log_oom(); + +- log_debug("switching root - root: %s; init: %s", root, init); ++ if (isempty(init)) ++ init = NULL; ++ ++ if (init) { ++ const char *root_systemd_path = NULL, *root_init_path = NULL; ++ ++ root_systemd_path = strappenda(root, "/" SYSTEMD_BINARY_PATH); ++ root_init_path = strappenda3(root, "/", init); ++ ++ /* If the passed init is actually the same as the ++ * systemd binary, then let's suppress it. */ ++ if (files_same(root_init_path, root_systemd_path) > 0) ++ init = NULL; ++ } ++ ++ log_debug("Switching root - root: %s; init: %s", root, strna(init)); + + return bus_method_call_with_reply( + bus, diff --git a/SOURCES/0260-shared-include-root-when-canonicalizing-conf-paths.patch b/SOURCES/0260-shared-include-root-when-canonicalizing-conf-paths.patch new file mode 100644 index 0000000..0f85289 --- /dev/null +++ b/SOURCES/0260-shared-include-root-when-canonicalizing-conf-paths.patch @@ -0,0 +1,197 @@ +From b7f7813318b370d9ecf3833f92c5258d362d9441 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Fri, 31 Jan 2014 15:35:04 -0800 +Subject: [PATCH] shared: include root when canonicalizing conf paths + +The conf_files_list family accepts an alternate root path to prefix all +directories in the list but path_strv_canonicalize_uniq doesn't use it. +This results in the suspicious behavior of resolving directory symlinks +based on the contents of / instead of the alternate root. + +This adds a prefix argument to path_strv_canonicalize which will now +prepend the prefix, if given, to every path in the list. To avoid +answering what a relative path means when called with a root prefix +path_strv_canonicalize is now path_strv_canonicalize_absolute and only +considers absolute paths. Fortunately all users of already call +path_strv_canonicalize with a list of absolute paths. + +(cherry picked from commit 112cfb181453e38d3ef4a74fba23abbb53392002) + +Related: #1111199 +--- + src/shared/conf-files.c | 10 +++------- + src/shared/path-lookup.c | 6 +++--- + src/shared/path-util.c | 29 +++++++++++++++++++---------- + src/shared/path-util.h | 4 ++-- + src/shared/util.c | 2 +- + src/udev/udev-rules.c | 2 +- + 6 files changed, 29 insertions(+), 24 deletions(-) + +diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c +index ed4070c..3d5b1df 100644 +--- a/src/shared/conf-files.c ++++ b/src/shared/conf-files.c +@@ -37,12 +37,8 @@ + #include "hashmap.h" + #include "conf-files.h" + +-static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) { ++static int files_add(Hashmap *h, const char *dirpath, const char *suffix) { + _cleanup_closedir_ DIR *dir = NULL; +- _cleanup_free_ char *dirpath = NULL; +- +- if (asprintf(&dirpath, "%s%s", root ? root : "", path) < 0) +- return -ENOMEM; + + dir = opendir(dirpath); + if (!dir) { +@@ -104,7 +100,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const + assert(suffix); + + /* This alters the dirs string array */ +- if (!path_strv_canonicalize_uniq(dirs)) ++ if (!path_strv_canonicalize_absolute_uniq(dirs, root)) + return -ENOMEM; + + fh = hashmap_new(string_hash_func, string_compare_func); +@@ -112,7 +108,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const + return -ENOMEM; + + STRV_FOREACH(p, dirs) { +- r = files_add(fh, root, *p, suffix); ++ r = files_add(fh, *p, suffix); + if (r == -ENOMEM) { + hashmap_free_free(fh); + return r; +diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c +index 1a47ea9..03c1380 100644 +--- a/src/shared/path-lookup.c ++++ b/src/shared/path-lookup.c +@@ -316,7 +316,7 @@ int lookup_paths_init( + } + } + +- if (!path_strv_canonicalize(p->unit_path)) ++ if (!path_strv_canonicalize_absolute(p->unit_path, NULL)) + return -ENOMEM; + + strv_uniq(p->unit_path); +@@ -372,10 +372,10 @@ int lookup_paths_init( + return -ENOMEM; + } + +- if (!path_strv_canonicalize(p->sysvinit_path)) ++ if (!path_strv_canonicalize_absolute(p->sysvinit_path, NULL)) + return -ENOMEM; + +- if (!path_strv_canonicalize(p->sysvrcnd_path)) ++ if (!path_strv_canonicalize_absolute(p->sysvrcnd_path, NULL)) + return -ENOMEM; + + strv_uniq(p->sysvinit_path); +diff --git a/src/shared/path-util.c b/src/shared/path-util.c +index 45099ee..de291a5 100644 +--- a/src/shared/path-util.c ++++ b/src/shared/path-util.c +@@ -165,7 +165,7 @@ char **path_strv_make_absolute_cwd(char **l) { + return l; + } + +-char **path_strv_canonicalize(char **l) { ++char **path_strv_canonicalize_absolute(char **l, const char *prefix) { + char **s; + unsigned k = 0; + bool enomem = false; +@@ -180,13 +180,21 @@ char **path_strv_canonicalize(char **l) { + STRV_FOREACH(s, l) { + char *t, *u; + +- t = path_make_absolute_cwd(*s); +- free(*s); +- *s = NULL; +- +- if (!t) { +- enomem = true; ++ if (!path_is_absolute(*s)) + continue; ++ ++ if (prefix) { ++ t = strappend(prefix, *s); ++ free(*s); ++ *s = NULL; ++ ++ if (!t) { ++ enomem = true; ++ continue; ++ } ++ } else { ++ t = *s; ++ *s = NULL; + } + + errno = 0; +@@ -196,7 +204,7 @@ char **path_strv_canonicalize(char **l) { + u = t; + else { + free(t); +- if (errno == ENOMEM || !errno) ++ if (errno == ENOMEM || errno == 0) + enomem = true; + + continue; +@@ -215,11 +223,12 @@ char **path_strv_canonicalize(char **l) { + return l; + } + +-char **path_strv_canonicalize_uniq(char **l) { ++char **path_strv_canonicalize_absolute_uniq(char **l, const char *prefix) { ++ + if (strv_isempty(l)) + return l; + +- if (!path_strv_canonicalize(l)) ++ if (!path_strv_canonicalize_absolute(l, prefix)) + return NULL; + + return strv_uniq(l); +diff --git a/src/shared/path-util.h b/src/shared/path-util.h +index 0a42de7..c69cd1f 100644 +--- a/src/shared/path-util.h ++++ b/src/shared/path-util.h +@@ -43,8 +43,8 @@ char* path_startswith(const char *path, const char *prefix) _pure_; + bool path_equal(const char *a, const char *b) _pure_; + + char** path_strv_make_absolute_cwd(char **l); +-char** path_strv_canonicalize(char **l); +-char** path_strv_canonicalize_uniq(char **l); ++char** path_strv_canonicalize_absolute(char **l, const char *prefix); ++char** path_strv_canonicalize_absolute_uniq(char **l, const char *prefix); + + int path_is_mount_point(const char *path, bool allow_symlink); + int path_is_read_only_fs(const char *path); +diff --git a/src/shared/util.c b/src/shared/util.c +index fb1e6d1..a5163fb 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -5681,7 +5681,7 @@ static int search_and_fopen_internal(const char *path, const char *mode, char ** + assert(mode); + assert(_f); + +- if (!path_strv_canonicalize_uniq(search)) ++ if (!path_strv_canonicalize_absolute_uniq(search, NULL)) + return -ENOMEM; + + STRV_FOREACH(i, search) { +diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c +index 6f8b127..9092b08 100644 +--- a/src/udev/udev-rules.c ++++ b/src/udev/udev-rules.c +@@ -1630,7 +1630,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) + log_error("failed to build config directory array"); + return udev_rules_unref(rules); + } +- if (!path_strv_canonicalize(rules->dirs)) { ++ if (!path_strv_canonicalize_absolute(rules->dirs, NULL)) { + log_error("failed to canonicalize config directories\n"); + return udev_rules_unref(rules); + } diff --git a/SOURCES/0261-shared-add-root-argument-to-search_and_fopen.patch b/SOURCES/0261-shared-add-root-argument-to-search_and_fopen.patch new file mode 100644 index 0000000..a9c965e --- /dev/null +++ b/SOURCES/0261-shared-add-root-argument-to-search_and_fopen.patch @@ -0,0 +1,144 @@ +From 123a76e6190cb2a4669d39e12983f46e27b11163 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Thu, 13 Mar 2014 21:32:12 -0700 +Subject: [PATCH] shared: add root argument to search_and_fopen + +This adds the same root argument to search_and_fopen that +conf_files_list already has. Tools that use those two functions as a +pair can now be easily modified to load configuration files from an +alternate root filesystem tree. + +Conflicts: + src/shared/util.h + +(cherry picked from commit 4cf7ea556aa1e74f9b34d4467f36d46a1bb25da3) + +Related: #1111199 +--- + src/binfmt/binfmt.c | 2 +- + src/modules-load/modules-load.c | 2 +- + src/shared/util.c | 12 ++++++------ + src/shared/util.h | 4 ++-- + src/sysctl/sysctl.c | 2 +- + src/tmpfiles/tmpfiles.c | 2 +- + 6 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c +index 5a42b3d..3fff89a 100644 +--- a/src/binfmt/binfmt.c ++++ b/src/binfmt/binfmt.c +@@ -85,7 +85,7 @@ static int apply_file(const char *path, bool ignore_enoent) { + + assert(path); + +- r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); ++ r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f); + if (r < 0) { + if (ignore_enoent && r == -ENOENT) + return 0; +diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c +index 49ee420..cba7c55 100644 +--- a/src/modules-load/modules-load.c ++++ b/src/modules-load/modules-load.c +@@ -181,7 +181,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent + assert(ctx); + assert(path); + +- r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); ++ r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f); + if (r < 0) { + if (ignore_enoent && r == -ENOENT) + return 0; +diff --git a/src/shared/util.c b/src/shared/util.c +index a5163fb..e313ea9 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -5674,14 +5674,14 @@ int on_ac_power(void) { + return found_online || !found_offline; + } + +-static int search_and_fopen_internal(const char *path, const char *mode, char **search, FILE **_f) { ++static int search_and_fopen_internal(const char *path, const char *mode, const char *root, char **search, FILE **_f) { + char **i; + + assert(path); + assert(mode); + assert(_f); + +- if (!path_strv_canonicalize_absolute_uniq(search, NULL)) ++ if (!path_strv_canonicalize_absolute_uniq(search, root)) + return -ENOMEM; + + STRV_FOREACH(i, search) { +@@ -5705,7 +5705,7 @@ static int search_and_fopen_internal(const char *path, const char *mode, char ** + return -ENOENT; + } + +-int search_and_fopen(const char *path, const char *mode, const char **search, FILE **_f) { ++int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f) { + _cleanup_strv_free_ char **copy = NULL; + + assert(path); +@@ -5728,10 +5728,10 @@ int search_and_fopen(const char *path, const char *mode, const char **search, FI + if (!copy) + return -ENOMEM; + +- return search_and_fopen_internal(path, mode, copy, _f); ++ return search_and_fopen_internal(path, mode, root, copy, _f); + } + +-int search_and_fopen_nulstr(const char *path, const char *mode, const char *search, FILE **_f) { ++int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f) { + _cleanup_strv_free_ char **s = NULL; + + if (path_is_absolute(path)) { +@@ -5750,7 +5750,7 @@ int search_and_fopen_nulstr(const char *path, const char *mode, const char *sear + if (!s) + return -ENOMEM; + +- return search_and_fopen_internal(path, mode, s, _f); ++ return search_and_fopen_internal(path, mode, root, s, _f); + } + + int create_tmp_dir(char template[], char** dir_name) { +diff --git a/src/shared/util.h b/src/shared/util.h +index d11fa07..3f30917 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -628,8 +628,8 @@ char *strip_tab_ansi(char **p, size_t *l); + + int on_ac_power(void); + +-int search_and_fopen(const char *path, const char *mode, const char **search, FILE **_f); +-int search_and_fopen_nulstr(const char *path, const char *mode, const char *search, FILE **_f); ++int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f); ++int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f); + int create_tmp_dir(char template[], char** dir_name); + + #define FOREACH_LINE(line, f, on_error) \ +diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c +index 878c923..a9d4d53 100644 +--- a/src/sysctl/sysctl.c ++++ b/src/sysctl/sysctl.c +@@ -123,7 +123,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno + + assert(path); + +- r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f); ++ r = search_and_fopen_nulstr(path, "re", NULL, conf_file_dirs, &f); + if (r < 0) { + if (ignore_enoent && r == -ENOENT) + return 0; +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 309fa07..32f9088 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -1368,7 +1368,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) { + + assert(fn); + +- r = search_and_fopen_nulstr(fn, "re", conf_file_dirs, &f); ++ r = search_and_fopen_nulstr(fn, "re", NULL, conf_file_dirs, &f); + if (r < 0) { + if (ignore_enoent && r == -ENOENT) + return 0; diff --git a/SOURCES/0262-machine-id-add-root-option-to-operate-on-an-alternat.patch b/SOURCES/0262-machine-id-add-root-option-to-operate-on-an-alternat.patch new file mode 100644 index 0000000..08ff1fd --- /dev/null +++ b/SOURCES/0262-machine-id-add-root-option-to-operate-on-an-alternat.patch @@ -0,0 +1,264 @@ +From 99c06d718c91c91d0992869777c15b457f95443a Mon Sep 17 00:00:00 2001 +From: Greg KH +Date: Fri, 14 Mar 2014 04:43:04 +0000 +Subject: [PATCH] machine-id: add --root option to operate on an alternate fs + tree + +This makes it possible to initialize the /etc/machine-id file on an +arbitrary filesystem hierarchy. This helps systems that wish to run +this at image creation time in a subdirectory, or from initramfs before +pivot-root is called. + +[tomegun: converted to using _cleanup_free_ macros] + +Conflicts: + man/systemd-machine-id-setup.xml + src/machine-id-setup/machine-id-setup-main.c + +(cherry picked from commit 92f2f92edcad46ce4098ee26504edca0a1dad68e) + +Related: #1111199 +--- + man/systemd-machine-id-setup.xml | 23 +++++++-------- + src/core/machine-id-setup.c | 44 ++++++++++++++++++---------- + src/core/machine-id-setup.h | 2 +- + src/core/main.c | 2 +- + src/machine-id-setup/machine-id-setup-main.c | 17 ++++++++--- + 5 files changed, 53 insertions(+), 35 deletions(-) + +diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml +index 7b3aa7e..b879b40 100644 +--- a/man/systemd-machine-id-setup.xml ++++ b/man/systemd-machine-id-setup.xml +@@ -21,7 +21,8 @@ + along with systemd; If not, see . + --> + +- ++ + + + systemd-machine-id-setup +@@ -96,19 +97,15 @@ + + + +- +- +- +- Prints a short help +- text and exits. +- +- +- +- +- +- Prints a short version +- string and exits. ++ ++ Takes a directory path ++ as an argument. All paths will be ++ prefixed with the given alternate ROOT ++ path, including config search paths. ++ + ++ ++ + + + +diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c +index 18e015f..291930e 100644 +--- a/src/core/machine-id-setup.c ++++ b/src/core/machine-id-setup.c +@@ -59,18 +59,22 @@ static int shorten_uuid(char destination[36], const char *source) { + return -EINVAL; + } + +-static int generate(char id[34]) { ++static int generate(char id[34], const char *root) { + int fd, r; + unsigned char *p; + sd_id128_t buf; + char *q; + ssize_t k; + const char *vm_id; ++ _cleanup_free_ char *dbus_machine_id = NULL; + + assert(id); + ++ if (asprintf(&dbus_machine_id, "%s/var/lib/dbus/machine-id", root) < 0) ++ return log_oom(); ++ + /* First, try reading the D-Bus machine id, unless it is a symlink */ +- fd = open("/var/lib/dbus/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); ++ fd = open(dbus_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); + if (fd >= 0) { + k = loop_read(fd, id, 33, false); + close_nointr_nofail(fd); +@@ -150,12 +154,20 @@ static int generate(char id[34]) { + return 0; + } + +-int machine_id_setup(void) { ++int machine_id_setup(const char *root) { + _cleanup_close_ int fd = -1; + int r; + bool writable; + struct stat st; + char id[34]; /* 32 + \n + \0 */ ++ _cleanup_free_ char *etc_machine_id = NULL; ++ _cleanup_free_ char *run_machine_id = NULL; ++ ++ if (asprintf(&etc_machine_id, "%s/etc/machine-id", root) < 0) ++ return log_oom(); ++ ++ if (asprintf(&run_machine_id, "%s/run/machine-id", root) < 0) ++ return log_oom(); + + RUN_WITH_UMASK(0000) { + /* We create this 0444, to indicate that this isn't really +@@ -163,13 +175,13 @@ int machine_id_setup(void) { + * will be owned by root it doesn't matter much, but maybe + * people look. */ + +- fd = open("/etc/machine-id", O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444); ++ fd = open(etc_machine_id, O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY, 0444); + if (fd >= 0) + writable = true; + else { +- fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY); ++ fd = open(etc_machine_id, O_RDONLY|O_CLOEXEC|O_NOCTTY); + if (fd < 0) { +- log_error("Cannot open /etc/machine-id: %m"); ++ log_error("Cannot open %s: %m", etc_machine_id); + return -errno; + } + +@@ -193,7 +205,7 @@ int machine_id_setup(void) { + /* Hmm, so, the id currently stored is not useful, then let's + * generate one */ + +- r = generate(id); ++ r = generate(id, root); + if (r < 0) + return r; + +@@ -211,27 +223,27 @@ int machine_id_setup(void) { + * /run/machine-id as a replacement */ + + RUN_WITH_UMASK(0022) { +- r = write_string_file("/run/machine-id", id); ++ r = write_string_file(run_machine_id, id); + } + if (r < 0) { +- log_error("Cannot write /run/machine-id: %s", strerror(-r)); +- unlink("/run/machine-id"); ++ log_error("Cannot write %s: %s", run_machine_id, strerror(-r)); ++ unlink(run_machine_id); + return r; + } + + /* And now, let's mount it over */ +- r = mount("/run/machine-id", "/etc/machine-id", NULL, MS_BIND, NULL); ++ r = mount(run_machine_id, etc_machine_id, NULL, MS_BIND, NULL); + if (r < 0) { +- log_error("Failed to mount /etc/machine-id: %m"); +- unlink_noerrno("/run/machine-id"); ++ log_error("Failed to mount %s: %m", etc_machine_id); ++ unlink_noerrno(run_machine_id); + return -errno; + } + +- log_info("Installed transient /etc/machine-id file."); ++ log_info("Installed transient %s file.", etc_machine_id); + + /* Mark the mount read-only */ +- if (mount(NULL, "/etc/machine-id", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL) < 0) +- log_warning("Failed to make transient /etc/machine-id read-only: %m"); ++ if (mount(NULL, etc_machine_id, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL) < 0) ++ log_warning("Failed to make transient %s read-only: %m", etc_machine_id); + + return 0; + } +diff --git a/src/core/machine-id-setup.h b/src/core/machine-id-setup.h +index b9e6b4d..b0583ee 100644 +--- a/src/core/machine-id-setup.h ++++ b/src/core/machine-id-setup.h +@@ -21,4 +21,4 @@ + along with systemd; If not, see . + ***/ + +-int machine_id_setup(void); ++int machine_id_setup(const char *root); +diff --git a/src/core/main.c b/src/core/main.c +index 00fd394..afd5f6f 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -1503,7 +1503,7 @@ int main(int argc, char *argv[]) { + kmod_setup(); + #endif + hostname_setup(); +- machine_id_setup(); ++ machine_id_setup(""); + loopback_setup(); + + test_mtab(); +diff --git a/src/machine-id-setup/machine-id-setup-main.c b/src/machine-id-setup/machine-id-setup-main.c +index eb2d514..f4dc705 100644 +--- a/src/machine-id-setup/machine-id-setup-main.c ++++ b/src/machine-id-setup/machine-id-setup-main.c +@@ -29,12 +29,15 @@ + #include "log.h" + #include "build.h" + ++static const char *arg_root = ""; ++ + static int help(void) { + + printf("%s [OPTIONS...]\n\n" + "Initialize /etc/machine-id from a random source.\n\n" + " -h --help Show this help\n" +- " --version Show package version\n", ++ " --version Show package version\n" ++ " --root Filesystem root\n", + program_invocation_short_name); + + return 0; +@@ -43,13 +46,15 @@ static int help(void) { + static int parse_argv(int argc, char *argv[]) { + + enum { +- ARG_VERSION = 0x100 ++ ARG_VERSION = 0x100, ++ ARG_ROOT, + }; + + static const struct option options[] = { + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, ARG_VERSION }, +- { NULL, 0, NULL, 0 } ++ { "root", required_argument, NULL, ARG_ROOT }, ++ {} + }; + + int c; +@@ -70,6 +75,10 @@ static int parse_argv(int argc, char *argv[]) { + puts(SYSTEMD_FEATURES); + return 0; + ++ case ARG_ROOT: ++ arg_root = optarg; ++ break; ++ + case '?': + return -EINVAL; + +@@ -97,5 +106,5 @@ int main(int argc, char *argv[]) { + if (r <= 0) + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + +- return machine_id_setup() < 0 ? EXIT_FAILURE : EXIT_SUCCESS; ++ return machine_id_setup(arg_root) < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + } diff --git a/SOURCES/0263-conf-files-fix-when-for-root-logic.patch b/SOURCES/0263-conf-files-fix-when-for-root-logic.patch new file mode 100644 index 0000000..ac43e75 --- /dev/null +++ b/SOURCES/0263-conf-files-fix-when-for-root-logic.patch @@ -0,0 +1,51 @@ +From b5f15b581d886a332de50512c0fe75d1acc0c1ee Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 17 Jun 2014 01:56:44 +0200 +Subject: [PATCH] conf-files: fix when for --root= logic + +This is based on parts of similar patches from Michael Marineau and +Lukas Nykryn, but simply uses strappenda3(). + +(cherry picked from commit cebed5005b5ede17fc52ab50c054fca73bc938b8) + +Related: #1111199 +--- + src/shared/conf-files.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c +index 3d5b1df..4ec8bed 100644 +--- a/src/shared/conf-files.c ++++ b/src/shared/conf-files.c +@@ -37,10 +37,20 @@ + #include "hashmap.h" + #include "conf-files.h" + +-static int files_add(Hashmap *h, const char *dirpath, const char *suffix) { ++static int files_add(Hashmap *h, const char *dirpath, const char *suffix, const char *root) { + _cleanup_closedir_ DIR *dir = NULL; + +- dir = opendir(dirpath); ++ assert(dirpath); ++ assert(suffix); ++ ++ if (isempty(root)) ++ dir = opendir(dirpath); ++ else { ++ const char *p; ++ ++ p = strappenda3(root, "/", dirpath); ++ dir = opendir(p); ++ } + if (!dir) { + if (errno == ENOENT) + return 0; +@@ -108,7 +118,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const + return -ENOMEM; + + STRV_FOREACH(p, dirs) { +- r = files_add(fh, *p, suffix); ++ r = files_add(fh, *p, suffix, root); + if (r == -ENOMEM) { + hashmap_free_free(fh); + return r; diff --git a/SOURCES/0264-Make-systemctl-root-look-for-files-in-the-proper-pla.patch b/SOURCES/0264-Make-systemctl-root-look-for-files-in-the-proper-pla.patch new file mode 100644 index 0000000..1922225 --- /dev/null +++ b/SOURCES/0264-Make-systemctl-root-look-for-files-in-the-proper-pla.patch @@ -0,0 +1,341 @@ +From 022406c6dcaa5e9201a30b95f3e86328739e3892 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 24 Apr 2014 01:44:10 -0400 +Subject: [PATCH] Make systemctl --root look for files in the proper places + +Running systemctl enable/disable/set-default/... with the --root +option under strace reveals that it accessed various files and +directories in the main fs, and not underneath the specified root. +This can lead to correct results only when the layout and +configuration in the container are identical, which often is not the +case. Fix this by adding the specified root to all file access +operations. + +This patch does not handle some corner cases: symlinks which point +outside of the specified root might be interpreted differently than +they would be by the kernel if the specified root was the real root. +But systemctl does not create such symlinks by itself, and I think +this is enough of a corner case not to be worth the additional +complexity of reimplementing link chasing in systemd. + +Also, simplify the code in a few places and remove an hypothetical +memory leak on error. + +Conflicts: + TODO + src/shared/install.c + +(cherry picked from commit 12ed81d9c88406234c20e9261ae8c8b992d8bc4d) + +Related: #1111199 +--- + src/core/manager.c | 2 ++ + src/shared/install.c | 34 +++++++++++++++++++++----------- + src/shared/path-lookup.c | 12 ++++-------- + src/shared/path-lookup.h | 8 +++++++- + src/shared/path-util.c | 49 ++++++++++++++++++++++++++++++++++++----------- + src/systemctl/systemctl.c | 2 +- + 6 files changed, 75 insertions(+), 32 deletions(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 57a88b0..a2810b4 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -891,6 +891,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { + + r = lookup_paths_init( + &m->lookup_paths, m->running_as, true, ++ NULL, + m->generator_unit_path, + m->generator_unit_path_early, + m->generator_unit_path_late); +@@ -2383,6 +2384,7 @@ int manager_reload(Manager *m) { + + q = lookup_paths_init( + &m->lookup_paths, m->running_as, true, ++ NULL, + m->generator_unit_path, + m->generator_unit_path_early, + m->generator_unit_path_late); +diff --git a/src/shared/install.c b/src/shared/install.c +index b9c85b7..672dcc2 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -47,7 +47,9 @@ typedef struct { + #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free) + #define _cleanup_install_context_done_ _cleanup_(install_context_done) + +-static int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope) { ++static int lookup_paths_init_from_scope(LookupPaths *paths, ++ UnitFileScope scope, ++ const char *root_dir) { + assert(paths); + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); +@@ -57,6 +59,7 @@ static int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope) + return lookup_paths_init(paths, + scope == UNIT_FILE_SYSTEM ? SYSTEMD_SYSTEM : SYSTEMD_USER, + scope == UNIT_FILE_USER, ++ root_dir, + NULL, NULL, NULL); + } + +@@ -705,7 +708,7 @@ int unit_file_link( + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1476,7 +1479,7 @@ int unit_file_enable( + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1516,7 +1519,7 @@ int unit_file_disable( + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1578,7 +1581,7 @@ int unit_file_set_default( + if (unit_name_to_type(file) != UNIT_TARGET) + return -EINVAL; + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1613,7 +1616,11 @@ int unit_file_get_default( + char **p; + int r; + +- r = lookup_paths_init_from_scope(&paths, scope); ++ assert(scope >= 0); ++ assert(scope < _UNIT_FILE_SCOPE_MAX); ++ assert(name); ++ ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1665,12 +1672,13 @@ UnitFileState unit_file_get_state( + if (!unit_name_is_valid(name, true)) + return -EINVAL; + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + + STRV_FOREACH(i, paths.unit_path) { + struct stat st; ++ char *partial; + + free(path); + path = NULL; +@@ -1679,10 +1687,14 @@ UnitFileState unit_file_get_state( + asprintf(&path, "%s/%s/%s", root_dir, *i, name); + else + asprintf(&path, "%s/%s", *i, name); +- + if (!path) + return -ENOMEM; + ++ if (root_dir) ++ partial = path + strlen(root_dir) + 1; ++ else ++ partial = path; ++ + /* + * Search for a unit file in our default paths, to + * be sure, that there are no broken symlinks. +@@ -1714,7 +1726,7 @@ UnitFileState unit_file_get_state( + else if (r > 0) + return state; + +- r = unit_file_can_install(&paths, root_dir, path, true); ++ r = unit_file_can_install(&paths, root_dir, partial, true); + if (r < 0 && errno != ENOENT) + return r; + else if (r > 0) +@@ -1822,7 +1834,7 @@ int unit_file_preset( + assert(scope >= 0); + assert(scope < _UNIT_FILE_SCOPE_MAX); + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +@@ -1891,7 +1903,7 @@ int unit_file_get_list( + if (root_dir && scope != UNIT_FILE_SYSTEM) + return -EINVAL; + +- r = lookup_paths_init_from_scope(&paths, scope); ++ r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; + +diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c +index 03c1380..b62f302 100644 +--- a/src/shared/path-lookup.c ++++ b/src/shared/path-lookup.c +@@ -239,6 +239,7 @@ int lookup_paths_init( + LookupPaths *p, + SystemdRunningAs running_as, + bool personal, ++ const char *root_dir, + const char *generator, + const char *generator_early, + const char *generator_late) { +@@ -316,11 +317,9 @@ int lookup_paths_init( + } + } + +- if (!path_strv_canonicalize_absolute(p->unit_path, NULL)) ++ if (!path_strv_canonicalize_absolute_uniq(p->unit_path, root_dir)) + return -ENOMEM; + +- strv_uniq(p->unit_path); +- + if (!strv_isempty(p->unit_path)) { + _cleanup_free_ char *t = strv_join(p->unit_path, "\n\t"); + if (!t) +@@ -372,15 +371,12 @@ int lookup_paths_init( + return -ENOMEM; + } + +- if (!path_strv_canonicalize_absolute(p->sysvinit_path, NULL)) ++ if (!path_strv_canonicalize_absolute_uniq(p->sysvinit_path, root_dir)) + return -ENOMEM; + +- if (!path_strv_canonicalize_absolute(p->sysvrcnd_path, NULL)) ++ if (!path_strv_canonicalize_absolute_uniq(p->sysvrcnd_path, root_dir)) + return -ENOMEM; + +- strv_uniq(p->sysvinit_path); +- strv_uniq(p->sysvrcnd_path); +- + if (!strv_isempty(p->sysvinit_path)) { + _cleanup_free_ char *t = strv_join(p->sysvinit_path, "\n\t"); + if (!t) +diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h +index 9dee85f..0db9bfb 100644 +--- a/src/shared/path-lookup.h ++++ b/src/shared/path-lookup.h +@@ -41,5 +41,11 @@ SystemdRunningAs systemd_running_as_from_string(const char *s) _pure_; + + int user_config_home(char **config_home); + +-int lookup_paths_init(LookupPaths *p, SystemdRunningAs running_as, bool personal, const char *generator, const char *generator_early, const char *generator_late); ++int lookup_paths_init(LookupPaths *p, ++ SystemdRunningAs running_as, ++ bool personal, ++ const char *root_dir, ++ const char *generator, ++ const char *generator_early, ++ const char *generator_late); + void lookup_paths_free(LookupPaths *p); +diff --git a/src/shared/path-util.c b/src/shared/path-util.c +index de291a5..0aa5d61 100644 +--- a/src/shared/path-util.c ++++ b/src/shared/path-util.c +@@ -179,36 +179,63 @@ char **path_strv_canonicalize_absolute(char **l, const char *prefix) { + + STRV_FOREACH(s, l) { + char *t, *u; ++ _cleanup_free_ char *orig = NULL; + +- if (!path_is_absolute(*s)) ++ if (!path_is_absolute(*s)) { ++ free(*s); + continue; ++ } + + if (prefix) { +- t = strappend(prefix, *s); +- free(*s); +- *s = NULL; +- ++ orig = *s; ++ t = strappend(prefix, orig); + if (!t) { + enomem = true; + continue; + } +- } else { ++ } else + t = *s; +- *s = NULL; +- } + + errno = 0; + u = canonicalize_file_name(t); + if (!u) { +- if (errno == ENOENT) +- u = t; +- else { ++ if (errno == ENOENT) { ++ if (prefix) { ++ u = orig; ++ orig = NULL; ++ free(t); ++ } else ++ u = t; ++ } else { + free(t); + if (errno == ENOMEM || errno == 0) + enomem = true; + + continue; + } ++ } else if (prefix) { ++ char *x; ++ ++ free(t); ++ x = path_startswith(u, prefix); ++ if (x) { ++ /* restore the slash if it was lost */ ++ if (!startswith(x, "/")) ++ *(--x) = '/'; ++ ++ t = strdup(x); ++ free(u); ++ if (!t) { ++ enomem = true; ++ continue; ++ } ++ u = t; ++ } else { ++ /* canonicalized path goes outside of ++ * prefix, keep the original path instead */ ++ u = orig; ++ orig = NULL; ++ } + } else + free(t); + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 1ca4fd3..1cbcd20 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4258,7 +4258,7 @@ static int enable_sysv_units(const char *verb, char **args) { + /* Processes all SysV units, and reshuffles the array so that + * afterwards only the native units remain */ + +- r = lookup_paths_init(&paths, SYSTEMD_SYSTEM, false, NULL, NULL, NULL); ++ r = lookup_paths_init(&paths, SYSTEMD_SYSTEM, false, arg_root, NULL, NULL, NULL); + if (r < 0) + return r; + diff --git a/SOURCES/0265-tmpfiles-fix-memory-leak-of-exclude_prefixes.patch b/SOURCES/0265-tmpfiles-fix-memory-leak-of-exclude_prefixes.patch new file mode 100644 index 0000000..edeb5cf --- /dev/null +++ b/SOURCES/0265-tmpfiles-fix-memory-leak-of-exclude_prefixes.patch @@ -0,0 +1,43 @@ +From 0ec33b41e2fddd714851b444d85c4bd8a4fae879 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 30 Jan 2014 21:40:27 -0500 +Subject: [PATCH] tmpfiles: fix memory leak of exclude_prefixes + +Missed in 5c795114. + +(cherry picked from commit 498f8a39e66a62d015ac78e67e2504658bbba5f2) + +Related: #1111199 +--- + src/tmpfiles/tmpfiles.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 32f9088..1337d02 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -1332,12 +1332,12 @@ static int parse_argv(int argc, char *argv[]) { + break; + + case ARG_PREFIX: +- if (strv_extend(&include_prefixes, optarg) < 0) ++ if (strv_push(&include_prefixes, optarg) < 0) + return log_oom(); + break; + + case ARG_EXCLUDE_PREFIX: +- if (strv_extend(&exclude_prefixes, optarg) < 0) ++ if (strv_push(&exclude_prefixes, optarg) < 0) + return log_oom(); + break; + +@@ -1498,7 +1498,8 @@ finish: + hashmap_free(items); + hashmap_free(globs); + +- strv_free(include_prefixes); ++ free(include_prefixes); ++ free(exclude_prefixes); + + set_free_free(unix_sockets); + diff --git a/SOURCES/0266-tmpfiles-add-root-option-to-operate-on-an-alternate-.patch b/SOURCES/0266-tmpfiles-add-root-option-to-operate-on-an-alternate-.patch new file mode 100644 index 0000000..7210d8b --- /dev/null +++ b/SOURCES/0266-tmpfiles-add-root-option-to-operate-on-an-alternate-.patch @@ -0,0 +1,150 @@ +From 14f32b5e62d7f0973302080488a0f0fce897b2d0 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Thu, 13 Mar 2014 21:32:13 -0700 +Subject: [PATCH] tmpfiles: add --root option to operate on an alternate fs + tree + +This makes it possible to initialize or cleanup an arbitrary filesystem +hierarchy in the same way that it would be during system boot. + +Conflicts: + src/tmpfiles/tmpfiles.c + +(cherry picked from commit cf9a4abdc24c43565d0890fcb88c00169057c0c4) + +Resolves: #1111199 +--- + man/systemd-tmpfiles.xml | 12 ++++++++++-- + src/tmpfiles/tmpfiles.c | 29 +++++++++++++++++++++++++---- + 2 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml +index 64f9cf9..8d1db16 100644 +--- a/man/systemd-tmpfiles.xml ++++ b/man/systemd-tmpfiles.xml +@@ -139,19 +139,27 @@ + + + +- ++ + Only apply rules that + apply to paths with the specified + prefix. This option can be specified + multiple times. + + +- ++ + Ignore rules that + apply to paths with the specified + prefix. This option can be specified + multiple times. + ++ ++ ++ Takes a directory path ++ as an argument. All paths will be ++ prefixed with the given alternate root ++ path, including config search paths. ++ ++ + + + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 1337d02..ff51062 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -110,6 +110,7 @@ static bool arg_boot = false; + + static char **include_prefixes = NULL; + static char **exclude_prefixes = NULL; ++static char *arg_root = NULL; + + static const char conf_file_dirs[] = + "/etc/tmpfiles.d\0" +@@ -1186,6 +1187,15 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + if (!should_include_path(i->path)) + return 0; + ++ if (arg_root) { ++ char *p = strappend(arg_root, i->path); ++ if (!p) ++ return log_oom(); ++ ++ free(i->path); ++ i->path = p; ++ } ++ + if (user && !streq(user, "-")) { + const char *u = user; + +@@ -1274,7 +1284,8 @@ static int help(void) { + " --remove Remove marked files/directories\n" + " --boot Execute actions only safe at boot\n" + " --prefix=PATH Only apply rules that apply to paths with the specified prefix\n" +- " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n", ++ " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n" ++ " --root=PATH Operate on an alternate filesystem root\n", + program_invocation_short_name); + + return 0; +@@ -1289,6 +1300,7 @@ static int parse_argv(int argc, char *argv[]) { + ARG_BOOT, + ARG_PREFIX, + ARG_EXCLUDE_PREFIX, ++ ARG_ROOT, + }; + + static const struct option options[] = { +@@ -1299,7 +1311,8 @@ static int parse_argv(int argc, char *argv[]) { + { "boot", no_argument, NULL, ARG_BOOT }, + { "prefix", required_argument, NULL, ARG_PREFIX }, + { "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX }, +- { NULL, 0, NULL, 0 } ++ { "root", required_argument, NULL, ARG_ROOT }, ++ {} + }; + + int c; +@@ -1341,6 +1354,13 @@ static int parse_argv(int argc, char *argv[]) { + return log_oom(); + break; + ++ case ARG_ROOT: ++ arg_root = path_make_absolute_cwd(optarg); ++ if (!arg_root) ++ return log_oom(); ++ path_kill_slashes(arg_root); ++ break; ++ + case '?': + return -EINVAL; + +@@ -1368,7 +1388,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) { + + assert(fn); + +- r = search_and_fopen_nulstr(fn, "re", NULL, conf_file_dirs, &f); ++ r = search_and_fopen_nulstr(fn, "re", arg_root, conf_file_dirs, &f); + if (r < 0) { + if (ignore_enoent && r == -ENOENT) + return 0; +@@ -1469,7 +1489,7 @@ int main(int argc, char *argv[]) { + _cleanup_strv_free_ char **files = NULL; + char **f; + +- r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs); ++ r = conf_files_list_nulstr(&files, ".conf", arg_root, conf_file_dirs); + if (r < 0) { + log_error("Failed to enumerate tmpfiles.d files: %s", strerror(-r)); + goto finish; +@@ -1500,6 +1520,7 @@ finish: + + free(include_prefixes); + free(exclude_prefixes); ++ free(arg_root); + + set_free_free(unix_sockets); + diff --git a/SOURCES/0267-conf-files-include-root-in-returned-file-paths.patch b/SOURCES/0267-conf-files-include-root-in-returned-file-paths.patch new file mode 100644 index 0000000..21f7c01 --- /dev/null +++ b/SOURCES/0267-conf-files-include-root-in-returned-file-paths.patch @@ -0,0 +1,89 @@ +From c73f2c0db1e35c80ea3cff7b1eb2bece09be4793 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Thu, 19 Jun 2014 19:07:04 -0700 +Subject: [PATCH] conf-files: include root in returned file paths + +This restores the original root handling logic that was present prior to +112cfb18 when path expansion moved to path_strv_canonicalize_absolute. +That behavior partially went away in 12ed81d9. + +Alternatively all users of conf_files_list* could be updated to +concatenate the paths themselves as unit_file_query_preset did but since +no user needs the un-concatenated form that is pointless duplication. + +Conflicts: + src/shared/install.c + +(cherry picked from commit cba2ef02722114da2b730d57f1e3bb43013d8921) + +Related: #1111199 +--- + src/shared/conf-files.c | 16 ++++++---------- + src/shared/install.c | 6 +++--- + 2 files changed, 9 insertions(+), 13 deletions(-) + +diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c +index 4ec8bed..fc5f1fe 100644 +--- a/src/shared/conf-files.c ++++ b/src/shared/conf-files.c +@@ -37,20 +37,16 @@ + #include "hashmap.h" + #include "conf-files.h" + +-static int files_add(Hashmap *h, const char *dirpath, const char *suffix, const char *root) { ++static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) { + _cleanup_closedir_ DIR *dir = NULL; ++ char *dirpath; + +- assert(dirpath); ++ assert(path); + assert(suffix); + +- if (isempty(root)) +- dir = opendir(dirpath); +- else { +- const char *p; ++ dirpath = strappenda(root ? root : "", path); + +- p = strappenda3(root, "/", dirpath); +- dir = opendir(p); +- } ++ dir = opendir(dirpath); + if (!dir) { + if (errno == ENOENT) + return 0; +@@ -118,7 +114,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const + return -ENOMEM; + + STRV_FOREACH(p, dirs) { +- r = files_add(fh, *p, suffix, root); ++ r = files_add(fh, root, *p, suffix); + if (r == -ENOMEM) { + hashmap_free_free(fh); + return r; +diff --git a/src/shared/install.c b/src/shared/install.c +index 672dcc2..871de78 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -1740,7 +1740,7 @@ UnitFileState unit_file_get_state( + + int unit_file_query_preset(UnitFileScope scope, const char *name) { + _cleanup_strv_free_ char **files = NULL; +- char **i; ++ char **p; + int r; + + assert(scope >= 0); +@@ -1768,10 +1768,10 @@ int unit_file_query_preset(UnitFileScope scope, const char *name) { + if (r < 0) + return r; + +- STRV_FOREACH(i, files) { ++ STRV_FOREACH(p, files) { + _cleanup_fclose_ FILE *f; + +- f = fopen(*i, "re"); ++ f = fopen(*p, "re"); + if (!f) { + if (errno == ENOENT) + continue; diff --git a/SOURCES/0268-install-make-sure-that-root-mode-doesn-t-make-us-con.patch b/SOURCES/0268-install-make-sure-that-root-mode-doesn-t-make-us-con.patch new file mode 100644 index 0000000..82a76c2 --- /dev/null +++ b/SOURCES/0268-install-make-sure-that-root-mode-doesn-t-make-us-con.patch @@ -0,0 +1,148 @@ +From 8d32393e5a3fbc12371edf69830d0258a097211f Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 17 Jun 2014 00:53:49 +0200 +Subject: [PATCH] install: make sure that --root= mode doesn't make us consider + all units outside of search path + +(cherry picked from commit 8f294b45cbb627d31342f6a79444be59ce7e2274) + +Related: #1111199 +--- + src/shared/install.c | 41 +++++++++++++++++++++++++++++++++++++---- + src/shared/util.c | 16 ---------------- + src/shared/util.h | 1 - + 3 files changed, 37 insertions(+), 21 deletions(-) + +diff --git a/src/shared/install.c b/src/shared/install.c +index 871de78..7dad66d 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -47,6 +47,37 @@ typedef struct { + #define _cleanup_lookup_paths_free_ _cleanup_(lookup_paths_free) + #define _cleanup_install_context_done_ _cleanup_(install_context_done) + ++static int in_search_path(const char *path, char **search, const char *root_dir) { ++ _cleanup_free_ char *parent = NULL; ++ char **i; ++ int r; ++ ++ assert(path); ++ ++ r = path_get_parent(path, &parent); ++ if (r < 0) ++ return r; ++ ++ STRV_FOREACH(i, search) { ++ _cleanup_free_ char *buf = NULL; ++ const char *p; ++ ++ if (root_dir) { ++ buf = strjoin(root_dir, "/", *i, NULL); ++ if (!buf) ++ return -ENOMEM; ++ ++ p = buf; ++ } else ++ p = *i; ++ ++ if (path_equal(parent, p)) ++ return 1; ++ } ++ ++ return 0; ++} ++ + static int lookup_paths_init_from_scope(LookupPaths *paths, + UnitFileScope scope, + const char *root_dir) { +@@ -741,7 +772,7 @@ int unit_file_link( + continue; + } + +- q = in_search_path(*i, paths.unit_path); ++ q = in_search_path(*i, paths.unit_path, root_dir); + if (q < 0) + return q; + +@@ -1296,6 +1327,7 @@ static int install_info_symlink_link( + InstallInfo *i, + LookupPaths *paths, + const char *config_path, ++ const char *root_dir, + bool force, + UnitFileChange **changes, + unsigned *n_changes) { +@@ -1308,7 +1340,7 @@ static int install_info_symlink_link( + assert(config_path); + assert(i->path); + +- r = in_search_path(i->path, paths->unit_path); ++ r = in_search_path(i->path, paths->unit_path, root_dir); + if (r != 0) + return r; + +@@ -1323,6 +1355,7 @@ static int install_info_apply( + InstallInfo *i, + LookupPaths *paths, + const char *config_path, ++ const char *root_dir, + bool force, + UnitFileChange **changes, + unsigned *n_changes) { +@@ -1343,7 +1376,7 @@ static int install_info_apply( + if (r == 0) + r = q; + +- q = install_info_symlink_link(i, paths, config_path, force, changes, n_changes); ++ q = install_info_symlink_link(i, paths, config_path, root_dir, force, changes, n_changes); + if (r == 0) + r = q; + +@@ -1383,7 +1416,7 @@ static int install_context_apply( + } else if (r >= 0) + r += q; + +- q = install_info_apply(i, paths, config_path, force, changes, n_changes); ++ q = install_info_apply(i, paths, config_path, root_dir, force, changes, n_changes); + if (r >= 0 && q < 0) + r = q; + } +diff --git a/src/shared/util.c b/src/shared/util.c +index e313ea9..fc1f765 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -4490,22 +4490,6 @@ int dirent_ensure_type(DIR *d, struct dirent *de) { + return 0; + } + +-int in_search_path(const char *path, char **search) { +- char **i; +- _cleanup_free_ char *parent = NULL; +- int r; +- +- r = path_get_parent(path, &parent); +- if (r < 0) +- return r; +- +- STRV_FOREACH(i, search) +- if (path_equal(parent, *i)) +- return 1; +- +- return 0; +-} +- + int get_files_in_directory(const char *path, char ***list) { + _cleanup_closedir_ DIR *d = NULL; + size_t bufsize = 0, n = 0; +diff --git a/src/shared/util.h b/src/shared/util.h +index 3f30917..ec18d2c 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -475,7 +475,6 @@ int glob_extend(char ***strv, const char *path); + + int dirent_ensure_type(DIR *d, struct dirent *de); + +-int in_search_path(const char *path, char **search); + int get_files_in_directory(const char *path, char ***list); + + char *strjoin(const char *x, ...) _sentinel_; diff --git a/SOURCES/0269-shared-install-do-not-prefix-created-symlink-with-ro.patch b/SOURCES/0269-shared-install-do-not-prefix-created-symlink-with-ro.patch new file mode 100644 index 0000000..8060501 --- /dev/null +++ b/SOURCES/0269-shared-install-do-not-prefix-created-symlink-with-ro.patch @@ -0,0 +1,130 @@ +From 6dadf44d7062c38c3f4f782da3cd88114dceb959 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 21 Apr 2014 19:17:40 -0400 +Subject: [PATCH] shared/install: do not prefix created symlink with root path + +Before: /var/tmp/inst1//etc/systemd/system/default.target -> /var/tmp/inst1//usr/lib/systemd/system/graphical.target +After: /var/tmp/inst1/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target + +(cherry picked from commit 62b002337727093c21d020c730bd65971f7783a7) + +Related: #1111199 +--- + src/shared/install.c | 89 +++++++++++++++++++++++++--------------------------- + 1 file changed, 43 insertions(+), 46 deletions(-) + +diff --git a/src/shared/install.c b/src/shared/install.c +index 7dad66d..955a9bc 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -1073,67 +1073,64 @@ static int unit_file_search( + assert(info); + assert(paths); + +- if (info->path) +- return unit_file_load(c, info, info->path, allow_symlink); ++ if (info->path) { ++ char *full_path = NULL; ++ ++ if (!isempty(root_dir)) ++ full_path = strappenda(root_dir, info->path); ++ ++ return unit_file_load(c, info, full_path ?: info->path, allow_symlink); ++ } + + assert(info->name); + + STRV_FOREACH(p, paths->unit_path) { +- char *path = NULL; +- +- if (isempty(root_dir)) +- asprintf(&path, "%s/%s", *p, info->name); +- else +- asprintf(&path, "%s/%s/%s", root_dir, *p, info->name); ++ _cleanup_free_ char *path = NULL, *full_path = NULL; + ++ path = strjoin(*p, "/", info->name, NULL); + if (!path) + return -ENOMEM; + +- r = unit_file_load(c, info, path, allow_symlink); ++ if (!isempty(root_dir)) { ++ full_path = strappend(root_dir, path); ++ if (!full_path) ++ return -ENOMEM; ++ } + +- if (r >= 0) ++ r = unit_file_load(c, info, full_path ?: path, allow_symlink); ++ if (r >= 0) { + info->path = path; +- else { +- if (r == -ENOENT && unit_name_is_instance(info->name)) { +- /* Unit file doesn't exist, however instance enablement was requested. +- * We will check if it is possible to load template unit file. */ +- char *template = NULL, +- *template_path = NULL, +- *template_dir = NULL; +- +- template = unit_name_template(info->name); +- if (!template) { +- free(path); +- return -ENOMEM; +- } ++ path = NULL; ++ } else if (r == -ENOENT && unit_name_is_instance(info->name)) { ++ /* Unit file doesn't exist, however instance enablement was requested. ++ * We will check if it is possible to load template unit file. */ ++ _cleanup_free_ char *template = NULL, *template_dir = NULL; ++ ++ template = unit_name_template(info->name); ++ if (!template) ++ return -ENOMEM; + +- /* We will reuse path variable since we don't need it anymore. */ +- template_dir = path; +- *(strrchr(path, '/') + 1) = '\0'; ++ /* We will reuse path variable since we don't need it anymore. */ ++ template_dir = path; ++ *(strrchr(template_dir, '/') + 1) = '\0'; + +- template_path = strjoin(template_dir, template, NULL); +- if (!template_path) { +- free(path); +- free(template); +- return -ENOMEM; +- } ++ path = strappend(template_dir, template); ++ if (!path) ++ return -ENOMEM; + +- /* Let's try to load template unit. */ +- r = unit_file_load(c, info, template_path, allow_symlink); +- if (r >= 0) { +- info->path = strdup(template_path); +- if (!info->path) { +- free(path); +- free(template); +- free(template_path); +- return -ENOMEM; +- } +- } ++ if (!isempty(root_dir)) { ++ free(full_path); ++ full_path = strappend(root_dir, path); ++ if (!full_path) ++ return -ENOMEM; ++ } + +- free(template); +- free(template_path); ++ /* Let's try to load template unit. */ ++ r = unit_file_load(c, info, full_path ?: path, allow_symlink); ++ if (r >= 0) { ++ info->path = path; ++ path = NULL; + } +- free(path); + } + + if (r != -ENOENT && r != -ELOOP) diff --git a/SOURCES/0270-systemctl-fail-in-the-case-that-no-unit-files-were-f.patch b/SOURCES/0270-systemctl-fail-in-the-case-that-no-unit-files-were-f.patch new file mode 100644 index 0000000..392e694 --- /dev/null +++ b/SOURCES/0270-systemctl-fail-in-the-case-that-no-unit-files-were-f.patch @@ -0,0 +1,56 @@ +From 9e42758bf5dcaff2120856556ef1c3cafff7d581 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 19 Aug 2014 20:53:29 +0200 +Subject: [PATCH] systemctl: fail in the case that no unit files were found + +Previously systemctl died with message + +-bash-4.2# systemctl --root /rawhi list-unit-files +(src/systemctl/systemctl.c:868) Out of memory. + +in the case that no unit files were found in the --root +or the directory did not exist. + +So lets return ENOENT in the case that --root does not exist +and empty list in the case that there are no unit files. + +(cherry picked from commit fdbdf6ec29bda40763d7d3e7bb2a63e2f5d60c4c) + +Related: #1111199 +--- + src/shared/install.c | 6 ++++++ + src/systemctl/systemctl.c | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/shared/install.c b/src/shared/install.c +index 955a9bc..598323a 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -1933,6 +1933,12 @@ int unit_file_get_list( + if (root_dir && scope != UNIT_FILE_SYSTEM) + return -EINVAL; + ++ if (root_dir) { ++ r = access(root_dir, F_OK); ++ if (r < 0) ++ return -errno; ++ } ++ + r = lookup_paths_init_from_scope(&paths, scope, root_dir); + if (r < 0) + return r; +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 1cbcd20..90a80bd 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -862,6 +862,10 @@ static int list_unit_files(DBusConnection *bus, char **args) { + } + + n_units = hashmap_size(h); ++ ++ if (n_units == 0) ++ return 0; ++ + units = new(UnitFileList, n_units); + if (!units) { + unit_file_list_free(h); diff --git a/SOURCES/0271-units-make-ExecStopPost-action-part-of-ExecStart.patch b/SOURCES/0271-units-make-ExecStopPost-action-part-of-ExecStart.patch new file mode 100644 index 0000000..f2dd649 --- /dev/null +++ b/SOURCES/0271-units-make-ExecStopPost-action-part-of-ExecStart.patch @@ -0,0 +1,54 @@ +From 9af28110933ae9cdd96477dd2911c19295bc74ce Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 8 Jul 2014 17:42:23 +0200 +Subject: [PATCH] units: make ExecStopPost action part of ExecStart + +Currently after exiting rescue shell we isolate default target. User +might want to isolate to some other target than default one. However +issuing systemctl isolate command to desired target would bring system +to default target as a consequence of running ExecStopPost action. + +Having common ancestor for rescue shell and possible followup systemctl +default command should fix this. If user exits rescue shell we will +proceed with isolating default target, otherwise, on manual isolate, +parent shell process is terminated and we don't isolate default target, +but target chosen by user. + +Suggested-by: Michal Schmidt + +(cherry picked from commit d3381512282f2ca1c7669f77fb736a90fdce6982) + +Resolves: #1036276 +--- + units/emergency.service.in | 3 +-- + units/rescue.service.m4.in | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/units/emergency.service.in b/units/emergency.service.in +index 94c090f..91fc1bb 100644 +--- a/units/emergency.service.in ++++ b/units/emergency.service.in +@@ -17,8 +17,7 @@ Environment=HOME=/root + WorkingDirectory=/root + ExecStartPre=-/bin/plymouth quit + ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.' +-ExecStart=-/sbin/sulogin +-ExecStopPost=@SYSTEMCTL@ --fail --no-block default ++ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" + Type=idle + StandardInput=tty-force + StandardOutput=inherit +diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in +index 552ef89..ef54369 100644 +--- a/units/rescue.service.m4.in ++++ b/units/rescue.service.m4.in +@@ -18,8 +18,7 @@ Environment=HOME=/root + WorkingDirectory=/root + ExecStartPre=-/bin/plymouth quit + ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.' +-ExecStart=-/sbin/sulogin +-ExecStopPost=-@SYSTEMCTL@ --fail --no-block default ++ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" + Type=idle + StandardInput=tty-force + StandardOutput=inherit diff --git a/SOURCES/0272-systemctl-fix-broken-list-unit-files-with-root.patch b/SOURCES/0272-systemctl-fix-broken-list-unit-files-with-root.patch new file mode 100644 index 0000000..6c211b2 --- /dev/null +++ b/SOURCES/0272-systemctl-fix-broken-list-unit-files-with-root.patch @@ -0,0 +1,40 @@ +From 736a7f8c5d6c711ece23b0f347d3b89ac7464b08 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 26 Aug 2014 13:33:08 +0200 +Subject: [PATCH] systemctl: fix broken list-unit-files with --root + +(cherry picked from commit 81fc054dc7c365545bca86d78bf36a12658cedb3) + +Related: #1111199 + +Conflicts: + src/shared/install.c +--- + src/shared/install.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/shared/install.c b/src/shared/install.c +index 598323a..2c8f907 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -1973,6 +1973,7 @@ int unit_file_get_list( + union dirent_storage buffer; + UnitFileList __attribute__((cleanup(unitfilelist_free))) + *f = NULL; ++ _cleanup_free_ char *path = NULL; + + r = readdir_r(d, &buffer.de, &de); + if (r != 0) +@@ -2027,7 +2028,11 @@ int unit_file_get_list( + goto found; + } + +- r = unit_file_can_install(&paths, root_dir, f->path, true); ++ path = path_make_absolute(de->d_name, *i); ++ if (!path) ++ return -ENOMEM; ++ ++ r = unit_file_can_install(&paths, root_dir, path, true); + if (r == -EINVAL || /* Invalid setting? */ + r == -EBADMSG || /* Invalid format? */ + r == -ENOENT /* Included file not found? */) diff --git a/SOURCES/0273-machine-id-only-look-into-KVM-uuid-when-we-are-not-r.patch b/SOURCES/0273-machine-id-only-look-into-KVM-uuid-when-we-are-not-r.patch new file mode 100644 index 0000000..f84f577 --- /dev/null +++ b/SOURCES/0273-machine-id-only-look-into-KVM-uuid-when-we-are-not-r.patch @@ -0,0 +1,87 @@ +From a777218d241e52279039da5a2ba9b5a69576583c Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 28 Apr 2014 18:11:40 +0200 +Subject: [PATCH] machine-id: only look into KVM uuid when we are not running + in a container + +Resolves: #1123452 + +(cherry picked from commit 0b36bbc42d3a408531517a02acaf56105b863d55) + +Conflicts: + src/core/machine-id-setup.c +--- + src/core/machine-id-setup.c | 53 +++++++++++++++++++++++---------------------- + 1 file changed, 27 insertions(+), 26 deletions(-) + +diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c +index 291930e..8cfcf51 100644 +--- a/src/core/machine-id-setup.c ++++ b/src/core/machine-id-setup.c +@@ -92,32 +92,9 @@ static int generate(char id[34], const char *root) { + } + } + +- /* If that didn't work, see if we are running in qemu/kvm and a +- * machine ID was passed in via -uuid on the qemu/kvm command +- * line */ +- +- r = detect_vm(&vm_id); +- if (r > 0 && streq(vm_id, "kvm")) { +- char uuid[37]; +- +- fd = open("/sys/class/dmi/id/product_uuid", O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); +- if (fd >= 0) { +- k = loop_read(fd, uuid, 36, false); +- close_nointr_nofail(fd); +- +- if (k >= 36) { +- r = shorten_uuid(id, uuid); +- if (r >= 0) { +- log_info("Initializing machine ID from KVM UUID."); +- return 0; +- } +- } +- } +- } +- +- /* If that didn't work either, see if we are running in a +- * container, and a machine ID was passed in via +- * $container_uuid the way libvirt/LXC does it */ ++ /* If that didn't work, see if we are running in a container, ++ * and a machine ID was passed in via $container_uuid the way ++ * libvirt/LXC does it */ + r = detect_container(NULL); + if (r > 0) { + _cleanup_free_ char *e = NULL; +@@ -132,6 +109,30 @@ static int generate(char id[34], const char *root) { + } + } + } ++ ++ } else { ++ /* If we are not running in a container, see if we are ++ * running in qemu/kvm and a machine ID was passed in ++ * via -uuid on the qemu/kvm command line */ ++ ++ r = detect_vm(&vm_id); ++ if (r > 0 && streq(vm_id, "kvm")) { ++ char uuid[37]; ++ ++ fd = open("/sys/class/dmi/id/product_uuid", O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); ++ if (fd >= 0) { ++ k = loop_read(fd, uuid, 36, false); ++ close_nointr_nofail(fd); ++ ++ if (k >= 36) { ++ r = shorten_uuid(id, uuid); ++ if (r >= 0) { ++ log_info("Initializing machine ID from KVM UUID."); ++ return 0; ++ } ++ } ++ } ++ } + } + + /* If that didn't work, generate a random machine id */ diff --git a/SOURCES/0274-util-reset-signals-when-we-fork-off-agents.patch b/SOURCES/0274-util-reset-signals-when-we-fork-off-agents.patch new file mode 100644 index 0000000..a55fd51 --- /dev/null +++ b/SOURCES/0274-util-reset-signals-when-we-fork-off-agents.patch @@ -0,0 +1,70 @@ +From 72be8870f1ab5d8753d966ee6c81f88734053a95 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 26 Aug 2014 21:04:21 +0200 +Subject: [PATCH] util: reset signals when we fork off agents + +If we invoke agents, we should make sure we actually can kill them +again. I mean, it's probably not our job to cleanup the signals if our +tools are invoked in weird contexts, but at least we should make sure, +that the subprocesses we invoke and intend to control work as intended. + +Also see: + +http://lists.freedesktop.org/archives/systemd-devel/2014-August/022460.html + +(cherry picked from commit 8a7c93d858c342744adf481565d8bb03b9713dcf) + +Resolves: #1134818 +--- + src/shared/util.c | 18 ++++++++++++++++++ + src/shared/util.h | 1 + + 2 files changed, 19 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index fc1f765..e4448ff 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -935,6 +935,18 @@ int reset_all_signal_handlers(void) { + return 0; + } + ++int reset_signal_mask(void) { ++ sigset_t ss; ++ ++ if (sigemptyset(&ss) < 0) ++ return -errno; ++ ++ if (sigprocmask(SIG_SETMASK, &ss, NULL) < 0) ++ return -errno; ++ ++ return 0; ++} ++ + char *strstrip(char *s) { + char *e; + +@@ -5028,6 +5040,12 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa + /* Don't leak fds to the agent */ + close_all_fds(except, n_except); + ++ /* Make sure we actually can kill the agent, if we need to, in ++ * case somebody invoked us from a shell script that trapped ++ * SIGTERM or so... */ ++ reset_all_signal_handlers(); ++ reset_signal_mask(); ++ + stdout_is_tty = isatty(STDOUT_FILENO); + stderr_is_tty = isatty(STDERR_FILENO); + +diff --git a/src/shared/util.h b/src/shared/util.h +index ec18d2c..5a9bc99 100644 +--- a/src/shared/util.h ++++ b/src/shared/util.h +@@ -207,6 +207,7 @@ int readlink_and_make_absolute(const char *p, char **r); + int readlink_and_canonicalize(const char *p, char **r); + + int reset_all_signal_handlers(void); ++int reset_signal_mask(void); + + char *strstrip(char *s); + char *delete_chars(char *s, const char *bad); diff --git a/SOURCES/0275-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch b/SOURCES/0275-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch new file mode 100644 index 0000000..5cdd581 --- /dev/null +++ b/SOURCES/0275-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch @@ -0,0 +1,95 @@ +From f0fdbdb003cb3e8d8188c1c01701b510505b5b8b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Wed, 27 Aug 2014 21:42:20 +0200 +Subject: [PATCH] util: fix minimal race where we might miss SIGTERMs when + forking off an agent + +Before forking, block all signals, and unblock them afterwards. This way +the child will have them blocked, and we won't lose them. + +(cherry picked from commit 8a7c93d858c342744adf481565d8bb03b9713dcf) + +Related: #1134818 +--- + src/shared/util.c | 35 +++++++++++++++++++++++------------ + 1 file changed, 23 insertions(+), 12 deletions(-) + +diff --git a/src/shared/util.c b/src/shared/util.c +index e4448ff..9f25b15 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -5002,9 +5002,9 @@ int fd_inc_rcvbuf(int fd, size_t n) { + } + + int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...) { +- pid_t parent_pid, agent_pid; +- int fd; + bool stdout_is_tty, stderr_is_tty; ++ pid_t parent_pid, agent_pid; ++ sigset_t ss, saved_ss; + unsigned n, i; + va_list ap; + char **l; +@@ -5012,16 +5012,25 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa + assert(pid); + assert(path); + +- parent_pid = getpid(); +- + /* Spawns a temporary TTY agent, making sure it goes away when + * we go away */ + ++ parent_pid = getpid(); ++ ++ /* First we temporarily block all signals, so that the new ++ * child has them blocked initially. This way, we can be sure ++ * that SIGTERMs are not lost we might send to the agent. */ ++ assert_se(sigfillset(&ss) >= 0); ++ assert_se(sigprocmask(SIG_SETMASK, &ss, &saved_ss) >= 0); ++ + agent_pid = fork(); +- if (agent_pid < 0) ++ if (agent_pid < 0) { ++ assert_se(sigprocmask(SIG_SETMASK, &saved_ss, NULL) >= 0); + return -errno; ++ } + + if (agent_pid != 0) { ++ assert_se(sigprocmask(SIG_SETMASK, &saved_ss, NULL) >= 0); + *pid = agent_pid; + return 0; + } +@@ -5032,24 +5041,26 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa + if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0) + _exit(EXIT_FAILURE); + ++ /* Make sure we actually can kill the agent, if we need to, in ++ * case somebody invoked us from a shell script that trapped ++ * SIGTERM or so... */ ++ reset_all_signal_handlers(); ++ reset_signal_mask(); ++ + /* Check whether our parent died before we were able +- * to set the death signal */ ++ * to set the death signal and unblock the signals */ + if (getppid() != parent_pid) + _exit(EXIT_SUCCESS); + + /* Don't leak fds to the agent */ + close_all_fds(except, n_except); + +- /* Make sure we actually can kill the agent, if we need to, in +- * case somebody invoked us from a shell script that trapped +- * SIGTERM or so... */ +- reset_all_signal_handlers(); +- reset_signal_mask(); +- + stdout_is_tty = isatty(STDOUT_FILENO); + stderr_is_tty = isatty(STDERR_FILENO); + + if (!stdout_is_tty || !stderr_is_tty) { ++ int fd; ++ + /* Detach from stdout/stderr. and reopen + * /dev/tty for them. This is important to + * ensure that when systemctl is started via diff --git a/SOURCES/0276-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch b/SOURCES/0276-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch new file mode 100644 index 0000000..89c26df --- /dev/null +++ b/SOURCES/0276-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch @@ -0,0 +1,163 @@ +From 426a65ac5d56264b1890539eff96a1fa1d460217 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Wed, 14 May 2014 00:34:49 +0200 +Subject: [PATCH] udev: do not skip the execution of RUN when renaming a + network device fails + +(cherry picked from commit 1ea972174baba40dbc80c51cbfc4edc49764b59b) + +Resolves: #1102135 +--- + src/test/test-udev.c | 5 ++--- + src/udev/udev-event.c | 9 ++++----- + src/udev/udev.h | 2 +- + src/udev/udevadm-test.c | 13 +++++-------- + src/udev/udevd.c | 13 ++++++------- + 5 files changed, 18 insertions(+), 24 deletions(-) + +diff --git a/src/test/test-udev.c b/src/test/test-udev.c +index 17825f1..3fcf728 100644 +--- a/src/test/test-udev.c ++++ b/src/test/test-udev.c +@@ -156,9 +156,8 @@ int main(int argc, char *argv[]) + } + } + +- err = udev_event_execute_rules(event, rules, &sigmask_orig); +- if (err == 0) +- udev_event_execute_run(event, NULL); ++ udev_event_execute_rules(event, rules, &sigmask_orig); ++ udev_event_execute_run(event, NULL); + out: + if (event != NULL && event->fd_signal >= 0) + close(event->fd_signal); +diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c +index 3db2cb7..d69d7ba 100644 +--- a/src/udev/udev-event.c ++++ b/src/udev/udev-event.c +@@ -776,13 +776,12 @@ static int rename_netif(struct udev_event *event) + return err; + } + +-int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) ++void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) + { + struct udev_device *dev = event->dev; +- int err = 0; + + if (udev_device_get_subsystem(dev) == NULL) +- return -1; ++ return; + + if (streq(udev_device_get_action(dev), "remove")) { + udev_device_read_db(dev, NULL); +@@ -816,9 +815,10 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, + event->name != NULL && !streq(event->name, udev_device_get_sysname(dev))) { + char syspath[UTIL_PATH_SIZE]; + char *pos; ++ int err; + + err = rename_netif(event); +- if (err == 0) { ++ if (err >= 0) { + log_debug("renamed netif to '%s'\n", event->name); + + /* remember old name */ +@@ -881,7 +881,6 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, + udev_device_unref(event->dev_db); + event->dev_db = NULL; + } +- return err; + } + + void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask) +diff --git a/src/udev/udev.h b/src/udev/udev.h +index 8395926..900b1d6 100644 +--- a/src/udev/udev.h ++++ b/src/udev/udev.h +@@ -83,7 +83,7 @@ int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string, + int udev_event_spawn(struct udev_event *event, + const char *cmd, char **envp, const sigset_t *sigmask, + char *result, size_t ressize); +-int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset); ++void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset); + void udev_event_execute_run(struct udev_event *event, const sigset_t *sigset); + int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]); + +diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c +index df1409b..dc292c2 100644 +--- a/src/udev/udevadm-test.c ++++ b/src/udev/udevadm-test.c +@@ -42,7 +42,6 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) + struct udev_rules *rules = NULL; + struct udev_list_entry *entry; + sigset_t mask, sigmask_orig; +- int err; + int rc = 0; + + static const struct option options[] = { +@@ -141,18 +140,16 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) + goto out; + } + +- err = udev_event_execute_rules(event, rules, &sigmask_orig); ++ udev_event_execute_rules(event, rules, &sigmask_orig); + + udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev)) + printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry)); + +- if (err == 0) { +- udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) { +- char program[UTIL_PATH_SIZE]; ++ udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) { ++ char program[UTIL_PATH_SIZE]; + +- udev_event_apply_format(event, udev_list_entry_get_name(entry), program, sizeof(program)); +- printf("run: '%s'\n", program); +- } ++ udev_event_apply_format(event, udev_list_entry_get_name(entry), program, sizeof(program)); ++ printf("run: '%s'\n", program); + } + out: + if (event != NULL && event->fd_signal >= 0) +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 7c6c5d6..3d5feb4 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -272,7 +272,7 @@ static void worker_new(struct event *event) + for (;;) { + struct udev_event *udev_event; + struct worker_message msg; +- int err; ++ int err = 0; + + log_debug("seq %llu running\n", udev_device_get_seqnum(dev)); + udev_event = udev_event_new(dev); +@@ -288,13 +288,12 @@ static void worker_new(struct event *event) + udev_event->exec_delay = exec_delay; + + /* apply rules, create node, symlinks */ +- err = udev_event_execute_rules(udev_event, rules, &sigmask_orig); ++ udev_event_execute_rules(udev_event, rules, &sigmask_orig); + +- if (err == 0) +- udev_event_execute_run(udev_event, &sigmask_orig); ++ udev_event_execute_run(udev_event, &sigmask_orig); + + /* apply/restore inotify watch */ +- if (err == 0 && udev_event->inotify_watch) { ++ if (udev_event->inotify_watch) { + udev_watch_begin(udev, dev); + udev_device_update_db(dev); + } +@@ -304,8 +303,8 @@ static void worker_new(struct event *event) + + /* send udevd the result of the event execution */ + memset(&msg, 0, sizeof(struct worker_message)); +- if (err != 0) +- msg.exitcode = err; ++ ++ msg.exitcode = err; + msg.pid = getpid(); + send(worker_watch[WRITE_END], &msg, sizeof(struct worker_message), 0); + diff --git a/SOURCES/0277-man-mention-System-Administrator-s-Guide-in-systemct.patch b/SOURCES/0277-man-mention-System-Administrator-s-Guide-in-systemct.patch new file mode 100644 index 0000000..7e82917 --- /dev/null +++ b/SOURCES/0277-man-mention-System-Administrator-s-Guide-in-systemct.patch @@ -0,0 +1,33 @@ +From 28d352847cea4cacab45fe56e9f452eb45bc0708 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 28 Aug 2014 15:12:10 +0200 +Subject: [PATCH] man: mention System Administrator's Guide in systemctl + manpage + +Resolves: #978948 +--- + man/systemctl.xml | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/man/systemctl.xml b/man/systemctl.xml +index 25b03d8..d1fda61 100644 +--- a/man/systemctl.xml ++++ b/man/systemctl.xml +@@ -1350,6 +1350,17 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service + + + ++ Examples ++ ++ For examples how to use systemctl in comparsion ++ with old service and chkconfig command please see: ++ ++ Managing System Services ++ ++ ++ ++ ++ + See Also + + systemd1, diff --git a/SOURCES/0278-vconsole-also-copy-character-maps-not-just-fonts-fro.patch b/SOURCES/0278-vconsole-also-copy-character-maps-not-just-fonts-fro.patch new file mode 100644 index 0000000..2bd6874 --- /dev/null +++ b/SOURCES/0278-vconsole-also-copy-character-maps-not-just-fonts-fro.patch @@ -0,0 +1,57 @@ +From e39ab9b0f4d2cbc9fab10c64c2527908526ea86e Mon Sep 17 00:00:00 2001 +From: Carl Schaefer +Date: Mon, 23 Jun 2014 18:23:48 +0200 +Subject: [PATCH] vconsole: also copy character maps (not just fonts) from vt1 + to vt2, vt3, ... + +https://bugs.freedesktop.org/show_bug.cgi?id=78796 + +(cherry picked from commit ff452e76e2c0f89a32542b7179bb2fd538335933) + +Resolves: #1002450 +--- + src/vconsole/vconsole-setup.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index 1bbf737..7196ddf 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -180,6 +180,10 @@ static int font_load(const char *vc, const char *font, const char *map, const ch + */ + static void font_copy_to_all_vcs(int fd) { + struct vt_stat vcs = {}; ++ unsigned char map8[E_TABSZ]; ++ unsigned short map16[E_TABSZ]; ++ struct unimapdesc unimapd; ++ struct unipair unipairs[USHRT_MAX]; + int i, r; + + /* get active, and 16 bit mask of used VT numbers */ +@@ -209,6 +213,26 @@ static void font_copy_to_all_vcs(int fd) { + cfo.op = KD_FONT_OP_COPY; + cfo.height = vcs.v_active-1; /* tty1 == index 0 */ + ioctl(vcfd, KDFONTOP, &cfo); ++ ++ /* copy map of 8bit chars */ ++ if (ioctl(fd, GIO_SCRNMAP, map8) >= 0) ++ ioctl(vcfd, PIO_SCRNMAP, map8); ++ ++ /* copy map of 8bit chars -> 16bit Unicode values */ ++ if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0) ++ ioctl(vcfd, PIO_UNISCRNMAP, map16); ++ ++ /* copy unicode translation table */ ++ /* unimapd is a ushort count and a pointer to an ++ array of struct unipair { ushort, ushort } */ ++ unimapd.entries = unipairs; ++ unimapd.entry_ct = USHRT_MAX; ++ if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) { ++ struct unimapinit adv = { 0, 0, 0 }; ++ ++ ioctl(vcfd, PIO_UNIMAPCLR, &adv); ++ ioctl(vcfd, PIO_UNIMAP, &unimapd); ++ } + } + } + diff --git a/SOURCES/0279-vconsole-setup-run-setfont-before-loadkeys.patch b/SOURCES/0279-vconsole-setup-run-setfont-before-loadkeys.patch new file mode 100644 index 0000000..2a543f3 --- /dev/null +++ b/SOURCES/0279-vconsole-setup-run-setfont-before-loadkeys.patch @@ -0,0 +1,99 @@ +From a5236c816e1b8f7a56b2b4b0fa5ac2d5998e5b84 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 1 Jul 2014 22:20:11 -0400 +Subject: [PATCH] vconsole-setup: run setfont before loadkeys + +https://bugs.freedesktop.org/show_bug.cgi?id=80685 + +(cherry picked from commit abee28c56d523e55751b0c007d0bf812cc285c00) + +Conflicts: + src/vconsole/vconsole-setup.c + +Related: #1002450 +--- + src/vconsole/vconsole-setup.c | 49 ++++++++++++++++++++----------------------- + 1 file changed, 23 insertions(+), 26 deletions(-) + +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index 7196ddf..25d15af 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -238,12 +238,10 @@ static void font_copy_to_all_vcs(int fd) { + + int main(int argc, char **argv) { + const char *vc; +- char *vc_keymap = NULL; +- char *vc_keymap_toggle = NULL; +- char *vc_font = NULL; +- char *vc_font_map = NULL; +- char *vc_font_unimap = NULL; +- int fd = -1; ++ _cleanup_free_ char ++ *vc_keymap = NULL, *vc_keymap_toggle = NULL, ++ *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL; ++ _cleanup_close_ int fd = -1; + bool utf8; + pid_t font_pid = 0, keymap_pid = 0; + bool font_copy = false; +@@ -265,12 +263,12 @@ int main(int argc, char **argv) { + fd = open_terminal(vc, O_RDWR|O_CLOEXEC); + if (fd < 0) { + log_error("Failed to open %s: %m", vc); +- goto finish; ++ return EXIT_FAILURE; + } + + if (!is_vconsole(fd)) { + log_error("Device %s is not a virtual console.", vc); +- goto finish; ++ return EXIT_FAILURE; + } + + utf8 = is_locale_utf8(); +@@ -305,28 +303,27 @@ int main(int argc, char **argv) { + else + disable_utf8(fd); + +- r = EXIT_FAILURE; +- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 && +- font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) +- r = EXIT_SUCCESS; +- +-finish: +- if (keymap_pid > 0) +- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); ++ r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid); ++ if (r < 0) { ++ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); ++ return EXIT_FAILURE; ++ } + +- if (font_pid > 0) { ++ if (font_pid > 0) + wait_for_terminate_and_warn(KBD_SETFONT, font_pid); +- if (font_copy) +- font_copy_to_all_vcs(fd); ++ ++ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid); ++ if (r < 0) { ++ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); ++ return EXIT_FAILURE; + } + +- free(vc_keymap); +- free(vc_font); +- free(vc_font_map); +- free(vc_font_unimap); ++ if (keymap_pid > 0) ++ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); + +- if (fd >= 0) +- close_nointr_nofail(fd); ++ /* Only copy the font when we started setfont successfully */ ++ if (font_copy && font_pid > 0) ++ font_copy_to_all_vcs(fd); + +- return r; ++ return EXIT_SUCCESS; + } diff --git a/SOURCES/0280-vconsole-setup-fix-inverted-error-messages.patch b/SOURCES/0280-vconsole-setup-fix-inverted-error-messages.patch new file mode 100644 index 0000000..b48682d --- /dev/null +++ b/SOURCES/0280-vconsole-setup-fix-inverted-error-messages.patch @@ -0,0 +1,38 @@ +From ef543bf1d0011c0c7bfe38e097c1ef53e7027591 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 7 Jul 2014 08:55:30 -0400 +Subject: [PATCH] vconsole-setup: fix inverted error messages + +Introduced in abee28c56d. + +Pointed-out-by: Werner Fink + +(cherry picked from commit 3dde3f819732aaa66ab8e881305488adaea17641) + +Related: #1002450 +--- + src/vconsole/vconsole-setup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index 25d15af..645b1e6 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -305,7 +305,7 @@ int main(int argc, char **argv) { + + r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid); + if (r < 0) { +- log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); ++ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); + return EXIT_FAILURE; + } + +@@ -314,7 +314,7 @@ int main(int argc, char **argv) { + + r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid); + if (r < 0) { +- log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); ++ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); + return EXIT_FAILURE; + } + diff --git a/SOURCES/0281-systemd-detect-virt-detect-s390-virtualization.patch b/SOURCES/0281-systemd-detect-virt-detect-s390-virtualization.patch new file mode 100644 index 0000000..33c6bfa --- /dev/null +++ b/SOURCES/0281-systemd-detect-virt-detect-s390-virtualization.patch @@ -0,0 +1,75 @@ +From 50bb38a3dc24eb252097e958387d5a7075717a5a Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Fri, 18 Jul 2014 09:13:36 -0400 +Subject: [PATCH] systemd-detect-virt: detect s390 virtualization + +A system that is running on a logical partition (LPAR) provided by +PR/SM has access to physical hardware (except CPU). It is true that +PR/SM abstracts the hardware, but only for sharing purposes. + +Details are statet at: + +http://publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eicaz/eicazzlpar.htm + +-->-- +In other words, PR/SM transforms physical resources into virtual resources so +that many logical partitions can share the same physical resources. +--<-- + +Still, from the OS point of view, the shared virtual resource is real +hardware. ConditionVirtualization must be set to false if the OS runs +directly on PR/SM (e.g. in an LPAR). + +[zj: reorder code so that variables are not allocated when #if-def is +false. Add commit message.] + +Conflicts: + src/shared/virt.c + +(cherry picked from commit f41925b4e442a34c93ad120ef1426c974a047ed1) + +Resolves: #1139149 +--- + man/systemd.unit.xml | 1 + + src/shared/virt.c | 16 ++++++++++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml +index 4704352..c500953 100644 +--- a/man/systemd.unit.xml ++++ b/man/systemd.unit.xml +@@ -969,6 +969,7 @@ + virtualization solution, or one of + qemu, + kvm, ++ zvm, + vmware, + microsoft, + oracle, +diff --git a/src/shared/virt.c b/src/shared/virt.c +index 4f8134a..5466d97 100644 +--- a/src/shared/virt.c ++++ b/src/shared/virt.c +@@ -175,6 +175,22 @@ int detect_vm(const char **id) { + return 1; + } + ++#if defined(__s390__) ++ { ++ _cleanup_free_ char *t = NULL; ++ ++ r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t); ++ if (r >= 0) { ++ if (streq(t, "z/VM")) ++ _id = "zvm"; ++ else ++ _id = "kvm"; ++ ++ return 1; ++ } ++ } ++#endif ++ + return 0; + } + diff --git a/SOURCES/60-alias-kmsg.rules b/SOURCES/60-alias-kmsg.rules new file mode 100644 index 0000000..9c7236a --- /dev/null +++ b/SOURCES/60-alias-kmsg.rules @@ -0,0 +1,10 @@ +SUBSYSTEM!="block", GOTO="log_end" +KERNEL=="loop*|ram*", GOTO="log_end" +ACTION=="remove", GOTO="log_end" +ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="log_end" +ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="log_end" + +IMPORT{cmdline}="udev.alias" +ENV{udev.alias}=="1", RUN+="/bin/sh -c 'echo udev-alias: $name \($links\) > /dev/kmsg'" + +LABEL="log_end" diff --git a/SOURCES/99-default-disable.preset b/SOURCES/99-default-disable.preset new file mode 100644 index 0000000..1f29b50 --- /dev/null +++ b/SOURCES/99-default-disable.preset @@ -0,0 +1 @@ +disable * diff --git a/SOURCES/listen.conf b/SOURCES/listen.conf new file mode 100644 index 0000000..3d68da0 --- /dev/null +++ b/SOURCES/listen.conf @@ -0,0 +1 @@ +$SystemLogSocketName /run/systemd/journal/syslog diff --git a/SOURCES/rc.local b/SOURCES/rc.local new file mode 100644 index 0000000..8e633ff --- /dev/null +++ b/SOURCES/rc.local @@ -0,0 +1,13 @@ +#!/bin/bash +# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES +# +# It is highly advisable to create own systemd services or udev rules +# to run scripts during boot instead of using this file. +# +# In constrast to previous versions due to parallel execution during boot +# this script will NOT be run after all other services. +# +# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure +# that this script will be executed during boot. + +touch /var/lock/subsys/local diff --git a/SOURCES/systemd-sysv-convert b/SOURCES/systemd-sysv-convert new file mode 100755 index 0000000..1c3f1a9 --- /dev/null +++ b/SOURCES/systemd-sysv-convert @@ -0,0 +1,148 @@ +#!/usr/bin/python +# -*- Mode: Python; python-indent: 8; indent-tabs-mode: t -*- + +import sys, os, argparse, errno + +def find_service(service, runlevel): + priority = -1 + + for l in os.listdir("/etc/rc%i.d" % runlevel): + if len(l) < 4: + continue + + if l[0] != 'S' or l[3:] != service: + continue + + p = int(l[1:3]) + + if p >= 0 and p <= 99 and p >= priority: + priority = p; + + return priority + +def lookup_database(services): + try: + database = open("/var/lib/systemd/sysv-convert/database", "r") + except IOError, e: + if e.errno != errno.ENOENT: + raise e + + return {} + + found = {} + k = 0 + + for line in database: + service, r, p = line.strip().split("\t", 3) + k += 1 + + try: + runlevel = int(r) + priority = int(p) + except ValueError, e: + sys.stderr.write("Failed to parse database line %i. Ignoring." % k) + continue + + if runlevel not in (2, 3, 4, 5): + sys.stderr.write("Runlevel out of bounds in database line %i. Ignoring." % k) + continue + + if priority < 0 or priority > 99: + sys.stderr.write("Priority out of bounds in database line %i. Ignoring." % k) + continue + + if service not in services: + continue + + if service not in found: + found[service] = {} + + if runlevel not in found[service] or found[service][runlevel] < priority: + found[service][runlevel] = priority + + return found + +def mkdir_p(path): + try: + os.makedirs(path, 0755) + except OSError, e: + if e.errno != errno.EEXIST: + raise e + +if os.geteuid() != 0: + sys.stderr.write("Need to be root.\n") + sys.exit(1) + +parser = argparse.ArgumentParser(description='Save and Restore SysV Service Runlevel Information') + +parser.add_argument('services', metavar='SERVICE', type=str, nargs='+', + help='Service names') + +parser.add_argument('--save', dest='save', action='store_const', + const=True, default=False, + help='Save SysV runlevel information for one or more services') + +parser.add_argument('--show', dest='show', action='store_const', + const=True, default=False, + help='Show saved SysV runlevel information for one or more services') + +parser.add_argument('--apply', dest='apply', action='store_const', + const=True, default=False, + help='Apply saved SysV runlevel information for one or more services to systemd counterparts') + +a = parser.parse_args() + +if a.save: + for service in a.services: + if not os.access("/etc/rc.d/init.d/%s" % service, os.F_OK): + sys.stderr.write("SysV service %s does not exist.\n" % service) + sys.exit(1) + + mkdir_p("/var/lib/systemd/sysv-convert") + database = open("/var/lib/systemd/sysv-convert/database", "a") + + for runlevel in (2, 3, 4, 5): + priority = find_service(service, runlevel) + + if priority >= 0: + database.write("%s\t%s\t%s\n" % (service, runlevel, priority)) + +elif a.show: + found = lookup_database(a.services) + + if len(found) <= 0: + sys.stderr.write("No information about passed services found.\n") + sys.exit(1) + + for service, data in found.iteritems(): + for runlevel, priority in data.iteritems(): + sys.stdout.write("SysV service %s enabled in runlevel %s at priority %s\n" % (service, runlevel, priority)) + +elif a.apply: + for service in a.services: + if not os.access("/lib/systemd/system/%s.service" % service, os.F_OK): + sys.stderr.write("systemd service %s.service does not exist.\n" % service) + sys.exit(1) + + found = lookup_database(a.services) + + if len(found) <= 0: + sys.stderr.write("No information about passed services found.\n") + sys.exit(1) + + for service, data in found.iteritems(): + for runlevel in data.iterkeys(): + + sys.stderr.write("ln -sf /lib/systemd/system/%s.service /etc/systemd/system/runlevel%i.target.wants/%s.service\n" % (service, runlevel, service)) + + mkdir_p("/etc/systemd/system/runlevel%i.target.wants" % runlevel) + + try: + os.symlink("/lib/systemd/system/%s.service" % service, + "/etc/systemd/system/runlevel%i.target.wants/%s.service" % (runlevel, service)) + except OSError, e: + if e.errno != errno.EEXIST: + raise e + +else: + parser.print_help() diff --git a/SOURCES/yum-protect-systemd.conf b/SOURCES/yum-protect-systemd.conf new file mode 100644 index 0000000..24ad079 --- /dev/null +++ b/SOURCES/yum-protect-systemd.conf @@ -0,0 +1 @@ +systemd diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec new file mode 100644 index 0000000..f4d4b55 --- /dev/null +++ b/SPECS/systemd.spec @@ -0,0 +1,2034 @@ +# PIE is broken on s390 (#868839, #872148) +%ifnarch s390 s390x +%global _hardened_build 1 +%endif + +# We ship a .pc file but don't want to have a dep on pkg-config. We +# strip the automatically generated dep here and instead co-own the +# directory. +%global __requires_exclude pkg-config + +Name: systemd +Url: http://www.freedesktop.org/wiki/Software/systemd +Version: 208 +Release: 99.atomic.0%{?dist} +# For a breakdown of the licensing, see README +License: LGPLv2+ and MIT and GPLv2+ +Summary: A System and Service Manager + +Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz +# RHEL7 default preset policy +Source1: 99-default-disable.preset +# SysV convert script. +Source2: systemd-sysv-convert +# Stop-gap, just to ensure things work fine with rsyslog without having to change the package right-away +Source3: listen.conf +# Prevent accidental removal of the systemd package +Source4: yum-protect-systemd.conf +# ship /etc/rc.d/rc.local https://bugzilla.redhat.com/show_bug.cgi?id=968401 +Source5: rc.local +#https://bugzilla.redhat.com/show_bug.cgi?id=1032711 +Source6: 60-alias-kmsg.rules + +# RHEL-specific: +Patch0001: 0001-units-add-Install-section-to-tmp.mount.patch +Patch0002: 0002-man-explain-NAME-in-systemctl-man-page.patch +Patch0003: 0003-fix-lingering-references-to-var-lib-backlight-random.patch +Patch0004: 0004-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch +Patch0005: 0005-journald-add-missing-error-check.patch +Patch0006: 0006-bus-fix-potentially-uninitialized-memory-access.patch +Patch0007: 0007-dbus-fix-return-value-of-dispatch_rqueue.patch +Patch0008: 0008-modules-load-fix-error-handling.patch +Patch0009: 0009-efi-never-call-qsort-on-potentially-NULL-arrays.patch +Patch0010: 0010-strv-don-t-access-potentially-NULL-string-arrays.patch +Patch0011: 0011-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch +Patch0012: 0012-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch +Patch0013: 0013-gpt-auto-generator-exit-immediately-if-in-container.patch +Patch0014: 0014-systemd-order-remote-mounts-from-mountinfo-before-re.patch +Patch0015: 0015-manager-when-verifying-whether-clients-may-change-en.patch +Patch0016: 0016-mount-check-for-NULL-before-reading-pm-what.patch +Patch0017: 0017-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch +Patch0018: 0018-systemd-serialize-deserialize-forbid_restart-value.patch +Patch0019: 0019-core-unify-the-way-we-denote-serialization-attribute.patch +Patch0020: 0020-journald-fix-minor-memory-leak.patch +Patch0021: 0021-journald-remove-rotated-file-from-hashmap-when-rotat.patch +Patch0022: 0022-udevadm.xml-document-resolve-names-option-for-test.patch +Patch0023: 0023-dbus-common-avoid-leak-in-error-path.patch +Patch0024: 0024-drop-ins-check-return-value.patch +Patch0025: 0025-shared-util-Fix-glob_extend-argument.patch +Patch0026: 0026-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch +Patch0027: 0027-man-document-the-b-special-boot-option.patch +Patch0028: 0028-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch +Patch0029: 0029-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch +Patch0030: 0030-Configurable-Timeouts-Restarts-default-values.patch +Patch0031: 0031-manager-configurable-StartLimit-default-values.patch +Patch0032: 0032-sysctl-bring-back-etc-sysctl.conf.patch +Patch0033: 0033-systemd-treat-reload-failure-as-failure.patch +Patch0034: 0034-journal-when-appending-to-journal-file-allocate-larg.patch +Patch0035: 0035-journal-optimize-bisection-logic-a-bit-by-caching-th.patch +Patch0036: 0036-journal-fix-iteration-when-we-go-backwards-from-the-.patch +Patch0037: 0037-journal-allow-journal_file_copy_entry-to-work-on-non.patch +Patch0038: 0038-journal-simplify-pre-allocation-logic.patch +Patch0039: 0039-journald-mention-how-long-we-needed-to-flush-to-var-.patch +Patch0040: 0040-Never-call-qsort-on-potentially-NULL-arrays.patch +Patch0041: 0041-localed-match-converted-keymaps-before-legacy.patch +Patch0042: 0042-core-socket-fix-SO_REUSEPORT.patch +Patch0043: 0043-activate-fix-crash-when-s-is-passed.patch +Patch0044: 0044-systemd-python-fix-booted-and-add-two-functions-to-d.patch +Patch0045: 0045-util.c-check-if-return-value-from-ttyname_r-is-0-ins.patch +Patch0046: 0046-activate-mention-E-in-the-help-text.patch +Patch0047: 0047-docs-remove-unneeded-the-s-in-gudev-docs.patch +Patch0048: 0048-man-explicitly-say-when-multiple-units-can-be-specif.patch +Patch0049: 0049-util-fix-handling-of-trailing-whitespace-in-split_qu.patch +Patch0050: 0050-man-Improve-the-description-of-parameter-X-in-tmpfil.patch +Patch0051: 0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch +Patch0052: 0052-udev-net_id-Introduce-predictable-network-names-for-.patch +Patch0053: 0053-tmpfiles-don-t-allow-label_fix-to-print-ENOENT-when-.patch +Patch0054: 0054-delta-ensure-that-d_type-will-be-set-on-every-fs.patch +Patch0055: 0055-shell-completion-dump-has-moved-to-systemd-analyze.patch +Patch0056: 0056-shell-completion-remove-load-from-systemctl.patch +Patch0057: 0057-Fix-SELinux-check-for-transient-units.-1008864.patch +Patch0058: 0058-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch +Patch0059: 0059-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch +Patch0060: 0060-systemctl-fix-name-mangling-for-sysv-units.patch +Patch0061: 0061-execute-more-debugging-messages.patch +Patch0062: 0062-logind-fix-bus-introspection-data-for-TakeControl.patch +Patch0063: 0063-utf8-fix-utf8_is_printable.patch +Patch0064: 0064-keymap-Fix-Samsung-900X-34-C.patch +Patch0065: 0065-do-not-accept-garbage-from-acpi-firmware-performance.patch +Patch0066: 0066-login-fix-invalid-free-in-sd_session_get_vt.patch +Patch0067: 0067-login-make-sd_session_get_vt-actually-work.patch +Patch0068: 0068-Make-sure-that-we-don-t-dereference-NULL.patch +Patch0069: 0069-gitignore-ignore-clang-analyze-output.patch +Patch0070: 0070-man-add-more-markup-to-udevadm-8.patch +Patch0071: 0071-Fix-bad-assert-in-show_pid_array.patch +Patch0072: 0072-Never-call-qsort-on-potentially-NULL-arrays.patch +Patch0073: 0073-rules-expose-loop-block-devices-to-systemd.patch +Patch0074: 0074-rules-don-t-limit-some-of-the-rules-to-the-add-actio.patch +Patch0075: 0075-hwdb-update.patch +Patch0076: 0076-rules-remove-pointless-MODE-settings.patch +Patch0077: 0077-catalog-remove-links-to-non-existent-wiki-pages.patch +Patch0078: 0078-udev-builtin-path_id-add-support-for-bcma-bus.patch +Patch0079: 0079-libudev-default-log_priority-to-INFO.patch +Patch0080: 0080-nspawn-only-pass-in-slice-setting-if-it-is-set.patch +Patch0081: 0081-zsh-completion-add-systemd-run.patch +Patch0082: 0082-systemctl-fix-typo-in-help-text.patch +Patch0083: 0083-detect_virtualization-returns-NULL-pass-empty-string.patch +Patch0084: 0084-udev-builtin-keyboard-Fix-large-scan-codes-on-32-bit.patch +Patch0085: 0085-nspawn-log-out-of-memory-errors.patch +Patch0086: 0086-man-fix-typo.patch +Patch0087: 0087-man-do-not-use-term-in-para.patch +Patch0088: 0088-shutdown-trim-the-cgroup-tree-on-loop-iteration.patch +Patch0089: 0089-run-support-system-to-match-other-commands-even-if-r.patch +Patch0090: 0090-acpi-fpdt-break-on-zero-or-negative-length-read.patch +Patch0091: 0091-man-add-rationale-into-systemd-halt-8.patch +Patch0092: 0092-systemd-python-convert-keyword-value-to-string.patch +Patch0093: 0093-Make-hibernation-test-work-for-swap-files.patch +Patch0094: 0094-man-add-docs-for-sd_is_special-and-some-man-page-sym.patch +Patch0095: 0095-systemctl-return-r-instead-of-always-returning-0.patch +Patch0096: 0096-journal-fix-minor-memory-leak.patch +Patch0097: 0097-man-units-fix-installation-of-systemd-nspawn-.servic.patch +Patch0098: 0098-systemd-fix-memory-leak-in-cgroup-code.patch +Patch0099: 0099-button-don-t-exit-if-we-cannot-handle-a-button-press.patch +Patch0100: 0100-timer-properly-format-relative-timestamps-in-the-fut.patch +Patch0101: 0101-timer-consider-usec_t-1-an-invalid-timestamp.patch +Patch0102: 0102-Resolve-dev-console-to-the-active-tty-instead-of-jus.patch +Patch0103: 0103-Only-disable-output-on-console-during-boot-if-needed.patch +Patch0104: 0104-Fix-possible-lack-of-status-messages-on-shutdown-reb.patch +Patch0105: 0105-random-seed-improve-debugging-messages-a-bit.patch +Patch0106: 0106-Fix-RemainAfterExit-services-keeping-a-hold-on-conso.patch +Patch0107: 0107-keymap-Add-Toshiba-Satellite-U940.patch +Patch0108: 0108-calendar-support-yearly-and-annually-names-the-same-.patch +Patch0109: 0109-hashmap-be-a-bit-more-conservative-with-pre-allocati.patch +Patch0110: 0110-manager-don-t-do-plymouth-in-a-container.patch +Patch0111: 0111-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch0112: 0112-automount-log-info-about-triggering-process.patch +Patch0113: 0113-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch0114: 0114-journal-fail-silently-in-sd_j_sendv-if-journal-is-un.patch +Patch0115: 0115-Fix-memory-leak-in-stdout-journal-streams.patch +Patch0116: 0116-man-document-is-enabled-output.patch +Patch0117: 0117-hostnamed-avoid-using-NULL-in-error-path.patch +Patch0118: 0118-core-do-not-segfault-if-swap-activity-happens-when-p.patch +Patch0119: 0119-kernel-install-add-h-help.patch +Patch0120: 0120-kernel-install-fix-help-output.patch +Patch0121: 0121-man-improve-wording-and-comma-usage-in-systemd.journ.patch +Patch0122: 0122-drop-several-entries-from-kbd-model-map-whose-kbd-la.patch +Patch0123: 0123-correct-name-of-Tajik-kbd-layout-in-kbd-model-map.patch +Patch0124: 0124-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch0125: 0125-Ensure-unit-is-journaled-for-short-lived-or-oneshot-.patch +Patch0126: 0126-core-manager-remove-infinite-loop.patch +Patch0127: 0127-util-check-for-overflow-in-greedy_realloc.patch +Patch0128: 0128-journald-use-a-bit-more-cleanup-magic.patch +Patch0129: 0129-activate-clean-up-inherited-descriptors.patch +Patch0130: 0130-man-explain-in-more-detail-how-SYSTEMD_READY-influen.patch +Patch0131: 0131-units-don-t-run-readahead-done-timers-in-containers.patch +Patch0132: 0132-nspawn-complain-and-continue-if-machine-has-same-id.patch +Patch0133: 0133-man-beef-up-ExecStart-description.patch +Patch0134: 0134-man-remove-advice-to-avoid-setting-the-same-var-more.patch +Patch0135: 0135-systemctl-add-the-plain-option-to-the-help-message.patch +Patch0136: 0136-Fix-a-few-resource-leaks-in-error-paths.patch +Patch0137: 0137-Fix-a-few-signed-unsigned-format-string-issues.patch +Patch0138: 0138-journal-file-protect-against-alloca-0.patch +Patch0139: 0139-man-describe-journalctl-show-cursor.patch +Patch0140: 0140-journal-fix-against-theoretical-undefined-behavior.patch +Patch0141: 0141-journald-downgrade-warning-message-when-dev-kmsg-doe.patch +Patch0142: 0142-journal-file.c-remove-redundant-assignment-of-variab.patch +Patch0143: 0143-login-Don-t-stop-a-running-user-manager-from-garbage.patch +Patch0144: 0144-log-when-we-log-to-dev-console-and-got-disconnected-.patch +Patch0145: 0145-loginctl-when-showing-device-tree-of-seats-with-no-d.patch +Patch0146: 0146-man-be-more-explicit-about-option-arguments-that-tak.patch +Patch0147: 0147-man-add-DOI-for-refereed-article-on-Forward-Secure-S.patch +Patch0148: 0148-keymap-Refactor-Acer-tables.patch +Patch0149: 0149-logind-remove-dead-variable.patch +Patch0150: 0150-hwdb-update.patch +Patch0151: 0151-delta-replace-readdir_r-with-readdir.patch +Patch0152: 0152-delta-fix-delta-for-drop-ins.patch +Patch0153: 0153-delta-if-prefix-is-specified-only-show-overrides-the.patch +Patch0154: 0154-man-units-tmpfiles.d-5-cleanup.patch +Patch0155: 0155-tmpfiles-introduce-the-concept-of-unsafe-operations.patch +Patch0156: 0156-sleep-config-fix-useless-check-for-swapfile-type.patch +Patch0157: 0157-man-resolve-word-omissions.patch +Patch0158: 0158-man-improvements-to-comma-placement.patch +Patch0159: 0159-man-grammar-and-wording-improvements.patch +Patch0160: 0160-man-document-fail-nofail-auto-noauto.patch +Patch0161: 0161-man-fix-description-of-is-enabled-returned-value.patch +Patch0162: 0162-man-fix-Type-reference.patch +Patch0163: 0163-man-fix-Type-reference-v2.patch +Patch0164: 0164-hwdb-Update-database-of-Bluetooth-company-identifier.patch +Patch0165: 0165-man-add-a-note-about-propagating-signals.patch +Patch0166: 0166-man-include-autoconf-snippet-in-daemon-7.patch +Patch0167: 0167-systemd-python-fix-setting-of-exception-codes.patch +Patch0168: 0168-systemd-python-fix-listen_fds-under-Python-2.patch +Patch0169: 0169-man-expand-on-some-more-subtle-points-in-systemd.soc.patch +Patch0170: 0170-tmpfiles-rename-unsafe-to-boot.patch +Patch0171: 0171-sleep-config-Dereference-pointer-before-check-for-NU.patch +Patch0172: 0172-sleep-config-fix-double-free.patch +Patch0173: 0173-core-service-check-if-mainpid-matches-only-if-it-is-.patch +Patch0174: 0174-man-typo-fix.patch +Patch0175: 0175-swap-remove-if-else-with-the-same-data-path.patch +Patch0176: 0176-hwdb-update.patch +Patch0177: 0177-journal-Add-missing-byte-order-conversions.patch +Patch0178: 0178-hwdb-change-key-mappings-for-Samsung-90X3A.patch +Patch0179: 0179-hwdb-add-Samsung-700G.patch +Patch0180: 0180-hwdb-remove-duplicate-entry-for-Samsung-700Z.patch +Patch0181: 0181-hwdb-fix-match-for-Thinkpad-X201-tablet.patch +Patch0182: 0182-keymap-Recognize-different-Toshiba-Satellite-capital.patch +Patch0183: 0183-sleep.c-fix-typo.patch +Patch0184: 0184-man-mention-which-variables-will-be-expanded-in-Exec.patch +Patch0185: 0185-hwdb-Add-support-for-Toshiba-Satellite-P75-A7200-key.patch +Patch0186: 0186-journal-fix-access-to-munmapped-memory-in-sd_journal.patch +Patch0187: 0187-gpt-auto-generator-skip-nonexistent-devices.patch +Patch0188: 0188-gpt-auto-generator-use-EBADSLT-code-when-unable-to-d.patch +Patch0189: 0189-nspawn-explicitly-terminate-machines-when-we-exit-ns.patch +Patch0190: 0190-bash-completion-journalctl-file.patch +Patch0191: 0191-journalctl-zsh-completion-fix-several-issues-in-help.patch +Patch0192: 0192-cgroup-run-PID-1-in-the-root-cgroup.patch +Patch0193: 0193-pam-retrieve-value-of-debug-param-first.patch +Patch0194: 0194-utils-silence-the-compiler-warning.patch +Patch0195: 0195-s390-getty-generator-initialize-essential-system-ter.patch +Patch0196: 0196-pam-use-correct-log-level.patch +Patch0197: 0197-pam-do-not-set-XDG_RUNTIME_DIR-unconditionally.patch +Patch0198: 0198-selinux-Don-t-attempt-to-load-policy-in-initramfs-if.patch +Patch0199: 0199-kernel-install-add-fedora-specific-callouts-to-new-k.patch +Patch0200: 0200-remove-user-.service.patch +Patch0201: 0201-Fix-bad-assert-in-show_pid_array.patch +Patch0202: 0202-mount-don-t-send-out-PropertiesChanged-message-if-ac.patch +Patch0203: 0203-udev-rules-setup-tty-permissions-and-group-for-sclp_.patch +Patch0204: 0204-cdrom_id-use-the-old-MMC-fallback.patch +Patch0205: 0205-core-introduce-new-stop-protocol-for-unit-scopes.patch +Patch0206: 0206-core-watch-SIGCHLD-more-closely-to-track-processes-o.patch +Patch0207: 0207-logind-rework-session-shutdown-logic.patch +Patch0208: 0208-logind-order-all-scopes-after-both-systemd-logind.se.patch +Patch0209: 0209-logind-given-that-we-can-now-relatively-safely-shutd.patch +Patch0210: 0210-utmp-make-sure-we-don-t-write-the-utmp-reboot-record.patch +Patch0211: 0211-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch +Patch0212: 0212-logind-fix-reference-to-systemd-user-sessions.servic.patch +Patch0213: 0213-logind-add-forgotten-call-to-user_send_changed.patch +Patch0214: 0214-logind-save-session-after-setting-the-stopping-flag.patch +Patch0215: 0215-logind-save-user-state-after-stopping-the-session.patch +Patch0216: 0216-logind-initialize-timer_fd.patch +Patch0217: 0217-service-don-t-create-extra-cgroup-for-control-proces.patch +Patch0218: 0218-logind-pass-pointer-to-User-object-to-user_save.patch +Patch0219: 0219-fstab-generator-When-parsing-the-root-cmdline-option.patch +Patch0220: 0220-gpt-auto-generator-Generate-explicit-dependencies-on.patch +Patch0221: 0221-fstab-generator-Generate-explicit-dependencies-on-sy.patch +Patch0222: 0222-fsck-root-only-run-when-requested-in-fstab.patch +Patch0223: 0223-core-allow-PIDs-to-be-watched-by-two-units-at-the-sa.patch +Patch0224: 0224-core-correctly-unregister-PIDs-from-PID-hashtables.patch +Patch0225: 0225-logind-uninitialized-timer_fd-is-set-to-1.patch +Patch0226: 0226-logind-add-forgotten-return-statement.patch +Patch0227: 0227-core-remove-extra-semicolon-and-make-gcc-shut-up.patch +Patch0228: 0228-core-fix-detection-of-dead-processes.patch +Patch0229: 0229-Fix-prototype-of-get_process_state.patch +Patch0230: 0230-core-check-for-return-value-from-get_process_state.patch +Patch0231: 0231-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch +Patch0232: 0232-logind-session-save-stopping-flag.patch +Patch0233: 0233-units-serial-getty-.service-add-Install-section.patch +Patch0234: 0234-units-order-network-online.target-after-network.targ.patch +Patch0235: 0235-util-consider-both-fuse.glusterfs-and-glusterfs-netw.patch +Patch0236: 0236-core-make-StopWhenUnneeded-work-in-conjunction-with-.patch +Patch0237: 0237-cgroups-agent-down-grade-log-level.patch +Patch0238: 0238-random-seed-raise-POOL_SIZE_MIN-constant-to-1024.patch +Patch0239: 0239-delta-do-not-use-unicode-chars-in-C-locale.patch +Patch0240: 0240-core-print-debug-instead-of-error-message.patch +Patch0241: 0241-journald-always-add-syslog-facility-for-messages-com.patch +Patch0242: 0242-Introduce-_cleanup_endmntent_.patch +Patch0243: 0243-Introduce-_cleanup_fdset_free_.patch +Patch0244: 0244-Introduce-udev-object-cleanup-functions.patch +Patch0245: 0245-fsck-modernization.patch +Patch0246: 0246-fsck-fstab-generator-be-lenient-about-missing-fsck.-.patch +Patch0247: 0247-rules-60-persistent-storage-add-nvme-pcie-ssd-scsi_i.patch +Patch0248: 0248-cgls-fix-running-with-M-option.patch +Patch0249: 0249-units-when-spawning-a-getty-configure-TERM-explicitl.patch +Patch0250: 0250-getty-Start-getty-on-3270-terminals-available-on-Lin.patch +Patch0251: 0251-core-Added-support-for-ERRNO-NOTIFY_SOCKET-message-p.patch +Patch0252: 0252-service-don-t-accept-negative-ERRNO-notification-mes.patch +Patch0253: 0253-socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch +Patch0254: 0254-selinux-Check-access-vector-for-enable-and-disable-p.patch +Patch0255: 0255-systemctl-show-StatusErrno-value-in-systemctl-status.patch +Patch0256: 0256-service-flush-status-text-and-errno-values-each-time.patch +Patch0257: 0257-service-don-t-free-status_text-twice.patch +Patch0258: 0258-util-add-files_same-helper-function.patch +Patch0259: 0259-systemctl-for-switch-root-check-if-we-switch-to-a-sy.patch +Patch0260: 0260-shared-include-root-when-canonicalizing-conf-paths.patch +Patch0261: 0261-shared-add-root-argument-to-search_and_fopen.patch +Patch0262: 0262-machine-id-add-root-option-to-operate-on-an-alternat.patch +Patch0263: 0263-conf-files-fix-when-for-root-logic.patch +Patch0264: 0264-Make-systemctl-root-look-for-files-in-the-proper-pla.patch +Patch0265: 0265-tmpfiles-fix-memory-leak-of-exclude_prefixes.patch +Patch0266: 0266-tmpfiles-add-root-option-to-operate-on-an-alternate-.patch +Patch0267: 0267-conf-files-include-root-in-returned-file-paths.patch +Patch0268: 0268-install-make-sure-that-root-mode-doesn-t-make-us-con.patch +Patch0269: 0269-shared-install-do-not-prefix-created-symlink-with-ro.patch +Patch0270: 0270-systemctl-fail-in-the-case-that-no-unit-files-were-f.patch +Patch0271: 0271-units-make-ExecStopPost-action-part-of-ExecStart.patch +Patch0272: 0272-systemctl-fix-broken-list-unit-files-with-root.patch +Patch0273: 0273-machine-id-only-look-into-KVM-uuid-when-we-are-not-r.patch +Patch0274: 0274-util-reset-signals-when-we-fork-off-agents.patch +Patch0275: 0275-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch +Patch0276: 0276-udev-do-not-skip-the-execution-of-RUN-when-renaming-.patch +Patch0277: 0277-man-mention-System-Administrator-s-Guide-in-systemct.patch +Patch0278: 0278-vconsole-also-copy-character-maps-not-just-fonts-fro.patch +Patch0279: 0279-vconsole-setup-run-setfont-before-loadkeys.patch +Patch0280: 0280-vconsole-setup-fix-inverted-error-messages.patch +Patch0281: 0281-systemd-detect-virt-detect-s390-virtualization.patch +Patch0282: 0001-systemctl-unbreak-switchroot.patch +Patch0283: 0001-systemd-detect-virt-fix-detect-s390-virtualization.patch +Patch0284: 0001-core-make-sure-to-serialize-jobs-for-all-units.patch + + +%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} + +BuildRequires: libcap-devel +BuildRequires: tcp_wrappers-devel +BuildRequires: pam-devel +BuildRequires: libselinux-devel +BuildRequires: audit-libs-devel +BuildRequires: cryptsetup-devel +BuildRequires: dbus-devel +BuildRequires: libacl-devel +BuildRequires: pciutils-devel +BuildRequires: glib2-devel +BuildRequires: gobject-introspection-devel +BuildRequires: libblkid-devel +BuildRequires: xz-devel +BuildRequires: kmod-devel +BuildRequires: libgcrypt-devel +BuildRequires: qrencode-devel +BuildRequires: libmicrohttpd-devel +BuildRequires: libxslt +BuildRequires: docbook-style-xsl +BuildRequires: pkgconfig +BuildRequires: intltool +BuildRequires: gperf +BuildRequires: gtk-doc +BuildRequires: python2-devel +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: git + +Requires(post): coreutils +Requires(post): gawk +Requires(post): sed +Requires(post): acl +Requires(pre): coreutils +Requires(pre): /usr/bin/getent +Requires(pre): /usr/sbin/groupadd +Requires: dbus +Requires: nss-myhostname +Requires: %{name}-libs = %{version}-%{release} +Requires: kmod >= 14 +Requires: redhat-release >= 7.0 + +Provides: /bin/systemctl +Provides: /sbin/shutdown +Provides: syslog +Provides: systemd-units = %{version}-%{release} +# part of system since f18, drop at f20 +Provides: udev = %{version} +Obsoletes: udev < 183 +Conflicts: dracut < 027 +# f18 version, drop at f20 +Conflicts: plymouth < 0.8.5.1 +# For the journal-gateway split in F20, drop at F22 +Obsoletes: systemd < 204-10 +# Ensures correct multilib updates added F18, drop at F20 +Conflicts: systemd < 185-4 +# added F18, drop at F20 +Obsoletes: system-setup-keyboard < 0.9 +Provides: system-setup-keyboard = 0.9 +# nss-myhostname got integrated in F19, drop at F21 +Obsoletes: nss-myhostname < 0.4 +Provides: nss-myhostname = 0.4 +# systemd-analyze got merged in F19, drop at F21 +Obsoletes: systemd-analyze < 198 +Provides: systemd-analyze = 198 +Obsoletes: upstart < 1.2-3 +Obsoletes: upstart-sysvinit < 1.2-3 +Conflicts: upstart-sysvinit +Obsoletes: hal +Obsoletes: ConsoleKit + +%description +systemd is a system and service manager for Linux, compatible with +SysV and LSB init scripts. systemd provides aggressive parallelization +capabilities, uses socket and D-Bus activation for starting services, +offers on-demand starting of daemons, keeps track of processes using +Linux cgroups, supports snapshotting and restoring of the system +state, maintains mount and automount points and implements an +elaborate transactional dependency-based service control logic. It can +work as a drop-in replacement for sysvinit. + +%package libs +Summary: systemd libraries +License: LGPLv2+ and MIT +Obsoletes: libudev < 183 +Obsoletes: systemd < 185-4 +Conflicts: systemd < 185-4 + +%description libs +Libraries for systemd and udev, as well as the systemd PAM module. + +%package devel +Summary: Development headers for systemd +License: LGPLv2+ and MIT +Requires: %{name} = %{version}-%{release} +Provides: libudev-devel = %{version} +Obsoletes: libudev-devel < 183 + +%description devel +Development headers and auxiliary files for developing applications for systemd. + +%package sysv +Summary: SysV tools for systemd +License: LGPLv2+ +Requires: %{name} = %{version}-%{release} + +%description sysv +SysV compatibility tools for systemd + +%package python +Summary: Python Bindings for systemd +License: LGPLv2+ +Requires: %{name} = %{version}-%{release} + +%description python +This package contains python binds for systemd APIs + +%package -n libgudev1 +Summary: Libraries for adding libudev support to applications that use glib +Conflicts: filesystem < 3 +License: LGPLv2+ +Requires: %{name} = %{version}-%{release} + +%description -n libgudev1 +This package contains the libraries that make it easier to use libudev +functionality from applications that use glib. + +%package -n libgudev1-devel +Summary: Header files for adding libudev support to applications that use glib +Requires: libgudev1 = %{version}-%{release} +License: LGPLv2+ + +%description -n libgudev1-devel +This package contains the header and pkg-config files for developing +glib-based applications using libudev functionality. + +%package journal-gateway +Summary: Gateway for serving journal events over the network using HTTP +Requires: %{name} = %{version}-%{release} +License: LGPLv2+ +Requires(pre): /usr/bin/getent +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +# For the journal-gateway split in F20, drop at F22 +Obsoletes: systemd < 204-10 + +%description journal-gateway +systemd-journal-gatewayd serves journal events over the network using HTTP. + +%prep +%setup -q + +git init +git config user.email "systemd-maint@redhat.com" +git config user.name "Fedora systemd team" +git add . +git commit -a -q -m "%{version} baseline." + +# Apply all the patches. +git am \ + --exclude .gitignore \ + --exclude docs/.gitignore \ + --exclude docs/gudev/.gitignore \ + --exclude docs/libudev/.gitignore \ + --exclude docs/sysvinit/.gitignore \ + --exclude docs/var-log/.gitignore \ + --exclude hwdb/.gitignore \ + --exclude m4/.gitignore \ + --exclude man/.gitignore \ + --exclude po/.gitignore \ + --exclude rules/.gitignore \ + --exclude src/.gitignore \ + --exclude src/analyze/.gitignore \ + --exclude src/core/.gitignore \ + --exclude src/gudev/.gitignore \ + --exclude src/hostname/.gitignore \ + --exclude src/journal/.gitignore \ + --exclude src/libsystemd-daemon/.gitignore \ + --exclude src/libsystemd-id128/.gitignore \ + --exclude src/libudev/.gitignore \ + --exclude src/locale/.gitignore \ + --exclude src/login/.gitignore \ + --exclude src/python-systemd/.gitignore \ + --exclude src/python-systemd/docs/* \ + --exclude src/timedate/.gitignore \ + --exclude src/udev/.gitignore \ + --exclude src/udev/scsi_id/.gitignore \ + --exclude sysctl.d/.gitignore \ + --exclude test/.gitignore \ + --exclude units/.gitignore \ + --exclude units/user/.gitignore \ + %{patches} + + +%build +autoreconf + +%configure \ + --libexecdir=%{_prefix}/lib \ + --enable-gtk-doc \ + --disable-static \ + --with-sysvinit-path=/etc/rc.d/init.d \ + --with-rc-local-script-path-start=/etc/rc.d/rc.local +make %{?_smp_mflags} V=1 + +%install +%make_install +find %{buildroot} \( -name '*.a' -o -name '*.la' \) -delete + +# udev links +mkdir -p %{buildroot}/%{_sbindir} +ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm + +# Create SysV compatibility symlinks. systemctl/systemd are smart +# enough to detect in which way they are called. +ln -s ../lib/systemd/systemd %{buildroot}%{_sbindir}/init +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/reboot +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/halt +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/poweroff +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/shutdown +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit +ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel + +# legacy links +ln -s loginctl %{buildroot}%{_bindir}/systemd-loginctl + +# We create all wants links manually at installation time to make sure +# they are not owned and hence overriden by rpm after the used deleted +# them. +rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants + +# Make sure the ghost-ing below works +touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel2.target +touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel3.target +touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel4.target +touch %{buildroot}%{_sysconfdir}/systemd/system/runlevel5.target + +# Make sure these directories are properly owned +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants + +# Make sure the user generators dir exists too +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-generators +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-generators + +# Create new-style configuration files so that we can ghost-own them +touch %{buildroot}%{_sysconfdir}/hostname +touch %{buildroot}%{_sysconfdir}/vconsole.conf +touch %{buildroot}%{_sysconfdir}/locale.conf +touch %{buildroot}%{_sysconfdir}/machine-id +touch %{buildroot}%{_sysconfdir}/machine-info +touch %{buildroot}%{_sysconfdir}/localtime +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf + +# Install default preset policy +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/ +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset/ +install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/ + +# Make sure the shutdown/sleep drop-in dirs exist +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ + +# Make sure the NTP units dir exists +mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/ + +# Make sure directories in /var exist +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog +touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database +touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin + +# Install SysV conversion tool for systemd +install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/ + +# Install rsyslog fragment +mkdir -p %{buildroot}%{_sysconfdir}/rsyslog.d/ +install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rsyslog.d/ + +# Install yum protection fragment +mkdir -p %{buildroot}%{_sysconfdir}/yum/protected.d/ +install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/yum/protected.d/systemd.conf + +# Install rc.local +mkdir -p %{buildroot}%{_sysconfdir}/rc.d/ +install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rc.d/rc.local +ln -s rc.d/rc.local %{buildroot}%{_sysconfdir}/rc.local + +# To avoid making life hard for Rawhide-using developers, don't package the +# kernel.core_pattern setting until systemd-coredump is a part of an actual +# systemd release and it's made clear how to get the core dumps out of the +# journal. +rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf + +# For now remove /var/log/README since we are not enabling persistant +# logging yet. +rm -f %{buildroot}%{_localstatedir}/log/README + +# No tmp-on-tmpfs by default in RHEL7. bz#876122 +rm -f %{buildroot}%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount + +# No gpt-auto-generator in RHEL7 +rm -f %{buildroot}%{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator + +install -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/%{_udevrulesdir}/ + +%pre +getent group cdrom >/dev/null 2>&1 || groupadd -r -g 11 cdrom >/dev/null 2>&1 || : +getent group tape >/dev/null 2>&1 || groupadd -r -g 33 tape >/dev/null 2>&1 || : +getent group dialout >/dev/null 2>&1 || groupadd -r -g 18 dialout >/dev/null 2>&1 || : +getent group floppy >/dev/null 2>&1 || groupadd -r -g 19 floppy >/dev/null 2>&1 || : +getent group systemd-journal >/dev/null 2>&1 || groupadd -r -g 190 systemd-journal 2>&1 || : + +systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service >/dev/null 2>&1 || : + +# Rename configuration files that changed their names +mv -n %{_sysconfdir}/systemd/systemd-logind.conf %{_sysconfdir}/systemd/logind.conf >/dev/null 2>&1 || : +mv -n %{_sysconfdir}/systemd/systemd-journald.conf %{_sysconfdir}/systemd/journald.conf >/dev/null 2>&1 || : + +%pretrans -p +--# Migrate away from systemd-timedated-ntp.target. +--# Take note which ntp services, if any, were pulled in by it. +--# We'll enable them the usual way in %%post. +--# Remove this after upgrades from F17 are no longer supported. +function migrate_ntp() + --# Are we upgrading from a version that had systemd-timedated-ntp.target? + t = posix.stat("/usr/lib/systemd/system/systemd-timedated-ntp.target", "type") + if t ~= "regular" then return end + + --# Was the target enabled? + t = posix.stat("/etc/systemd/system/multi-user.target.wants/systemd-timedated-ntp.target", "type") + if t ~= "link" then return end + + --# filesystem provides /var/lib/rpm-state since F17 GA + r,msg,errno = posix.mkdir("/var/lib/rpm-state/systemd") + if r == nil and errno ~= 17 then return end --# EEXIST is fine. + + --# Save the list of ntp services pulled by the target. + f = io.open("/var/lib/rpm-state/systemd/ntp-units", "w") + if f == nil then return end + + files = posix.dir("/usr/lib/systemd/system/systemd-timedated-ntp.target.wants") + for i,name in ipairs(files) do + if name ~= "." and name ~= ".." then + s = string.format("%s\n", name) + f:write(s) + end + end + + f:close() +end + +migrate_ntp() +return 0 + +%post +systemd-machine-id-setup >/dev/null 2>&1 || : +/usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || : +systemctl daemon-reexec >/dev/null 2>&1 || : +systemctl start systemd-udevd.service >/dev/null 2>&1 || : +udevadm hwdb --update >/dev/null 2>&1 || : +journalctl --update-catalog >/dev/null 2>&1 || : +systemd-tmpfiles --create >/dev/null 2>&1 || : + +if [ $1 -eq 1 ] ; then + # Try to read default runlevel from the old inittab if it exists + runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) + if [ -z "$runlevel" ] ; then + target="/usr/lib/systemd/system/graphical.target" + else + target="/usr/lib/systemd/system/runlevel$runlevel.target" + fi + + # And symlink what we found to the new-style default.target + ln -sf "$target" /etc/systemd/system/default.target >/dev/null 2>&1 || : + + # Services we install by default, and which are controlled by presets. + systemctl preset \ + getty@tty1.service \ + remote-fs.target \ + systemd-readahead-replay.service \ + systemd-readahead-collect.service >/dev/null 2>&1 || : +else + # This systemd service does not exist anymore, we now do it + # internally in PID 1 + rm -f /etc/systemd/system/sysinit.target.wants/hwclock-load.service >/dev/null 2>&1 || : + + # This systemd target does not exist anymore. It's been replaced + # by ntp-units.d. + rm -f /etc/systemd/system/multi-user.target.wants/systemd-timedated-ntp.target >/dev/null 2>&1 || : + + # Enable the units recorded by %%pretrans + if [ -e /var/lib/rpm-state/systemd/ntp-units ] ; then + while read service; do + systemctl enable "$service" >/dev/null 2>&1 || : + done < /var/lib/rpm-state/systemd/ntp-units + rm -r /var/lib/rpm-state/systemd/ntp-units >/dev/null 2>&1 || : + fi +fi + +# Migrate /etc/sysconfig/clock +if [ ! -L /etc/localtime -a -e /etc/sysconfig/clock ] ; then + . /etc/sysconfig/clock >/dev/null 2>&1 || : + if [ -n "$ZONE" -a -e "/usr/share/zoneinfo/$ZONE" ] ; then + ln -sf "../usr/share/zoneinfo/$ZONE" /etc/localtime >/dev/null 2>&1 || : + fi +fi +rm -f /etc/sysconfig/clock >/dev/null 2>&1 || : + +# Migrate /etc/sysconfig/i18n +if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_PAPER + unset LC_NAME + unset LC_ADDRESS + unset LC_TELEPHONE + unset LC_MEASUREMENT + unset LC_IDENTIFICATION + . /etc/sysconfig/i18n >/dev/null 2>&1 || : + [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf 2>&1 || : + [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf 2>&1 || : + [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf 2>&1 || : + [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf 2>&1 || : +fi + +# Migrate /etc/sysconfig/keyboard +if [ -e /etc/sysconfig/keyboard -a ! -e /etc/vconsole.conf ]; then + unset SYSFONT + unset SYSFONTACM + unset UNIMAP + unset KEYMAP + [ -e /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n >/dev/null 2>&1 || : + . /etc/sysconfig/keyboard >/dev/null 2>&1 || : + [ -n "$SYSFONT" ] && echo FONT=$SYSFONT > /etc/vconsole.conf 2>&1 || : + [ -n "$SYSFONTACM" ] && echo FONT_MAP=$SYSFONTACM >> /etc/vconsole.conf 2>&1 || : + [ -n "$UNIMAP" ] && echo FONT_UNIMAP=$UNIMAP >> /etc/vconsole.conf 2>&1 || : + [ -n "$KEYTABLE" ] && echo KEYMAP=$KEYTABLE >> /etc/vconsole.conf 2>&1 || : +fi +rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || : +rm -f /etc/sysconfig/keyboard >/dev/null 2>&1 || : + +# Migrate HOSTNAME= from /etc/sysconfig/network +if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then + unset HOSTNAME + . /etc/sysconfig/network >/dev/null 2>&1 || : + [ -n "$HOSTNAME" ] && echo $HOSTNAME > /etc/hostname 2>&1 || : +fi +sed -i '/^HOSTNAME=/d' /etc/sysconfig/network >/dev/null 2>&1 || : + +# Migrate the old systemd-setup-keyboard X11 configuration fragment +if [ ! -e /etc/X11/xorg.conf.d/00-keyboard.conf ] ; then + mv /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf /etc/X11/xorg.conf.d/00-keyboard.conf >/dev/null 2>&1 || : +else + rm -f /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf >/dev/null 2>&1 || : +fi + +# sed-fu to add myhostname to the hosts line of /etc/nsswitch.conf +if [ -f /etc/nsswitch.conf ] ; then + sed -i.bak -e ' + /^hosts:/ !b + /\/ b + s/[[:blank:]]*$/ myhostname/ + ' /etc/nsswitch.conf >/dev/null 2>&1 || : +fi + +%posttrans +# Convert old /etc/sysconfig/desktop settings +preferred= +if [ -f /etc/sysconfig/desktop ]; then + . /etc/sysconfig/desktop + if [ "$DISPLAYMANAGER" = GNOME ]; then + preferred=gdm + elif [ "$DISPLAYMANAGER" = KDE ]; then + preferred=kdm + elif [ "$DISPLAYMANAGER" = WDM ]; then + preferred=wdm + elif [ "$DISPLAYMANAGER" = XDM ]; then + preferred=xdm + elif [ -n "$DISPLAYMANAGER" ]; then + preferred=${DISPLAYMANAGER##*/} + fi +fi +if [ -z "$preferred" ]; then + if [ -x /usr/sbin/gdm ]; then + preferred=gdm + elif [ -x /usr/bin/kdm ]; then + preferred=kdm + fi +fi +if [ -n "$preferred" -a -r "/usr/lib/systemd/system/$preferred.service" ]; then + # This is supposed to fail when the symlink already exists + ln -s "/usr/lib/systemd/system/$preferred.service" /etc/systemd/system/display-manager.service >/dev/null 2>&1 || : +fi + +%postun +if [ $1 -ge 1 ] ; then + systemctl daemon-reload > /dev/null 2>&1 || : + systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : +fi + +%preun +if [ $1 -eq 0 ] ; then + systemctl disable \ + getty@.service \ + remote-fs.target \ + systemd-readahead-replay.service \ + systemd-readahead-collect.service >/dev/null 2>&1 || : + + rm -f /etc/systemd/system/default.target >/dev/null 2>&1 || : + + if [ -f /etc/nsswitch.conf ] ; then + sed -i.bak -e ' + /^hosts:/ !b + s/[[:blank:]]\+myhostname\>// + ' /etc/nsswitch.conf >/dev/null 2>&1 || : + fi +fi + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post -n libgudev1 -p /sbin/ldconfig +%postun -n libgudev1 -p /sbin/ldconfig + +%pre journal-gateway +getent group systemd-journal-gateway >/dev/null 2>&1 || groupadd -r -g 191 systemd-journal-gateway 2>&1 || : +getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g systemd-journal-gateway -d %{_prefix}/lib/systemd -s /sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : + +%post journal-gateway +%systemd_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service + +%preun journal-gateway +%systemd_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service + +%postun journal-gateway +%systemd_postun_with_restart systemd-journal-gatewayd.service + +%files +%doc %{_docdir}/systemd +%dir %{_sysconfdir}/systemd +%dir %{_sysconfdir}/systemd/system +%dir %{_sysconfdir}/systemd/user +%dir %{_sysconfdir}/tmpfiles.d +%dir %{_sysconfdir}/sysctl.d +%dir %{_sysconfdir}/modules-load.d +%dir %{_sysconfdir}/binfmt.d +%dir %{_sysconfdir}/udev +%dir %{_sysconfdir}/udev/rules.d +%dir %{_prefix}/lib/systemd +%dir %{_prefix}/lib/systemd/system-generators +%dir %{_prefix}/lib/systemd/user-generators +%dir %{_prefix}/lib/systemd/system-preset +%dir %{_prefix}/lib/systemd/user-preset +%dir %{_prefix}/lib/systemd/system-shutdown +%dir %{_prefix}/lib/systemd/system-sleep +%dir %{_prefix}/lib/systemd/catalog +%dir %{_prefix}/lib/systemd/ntp-units.d +%dir %{_prefix}/lib/tmpfiles.d +%dir %{_prefix}/lib/sysctl.d +%dir %{_prefix}/lib/modules-load.d +%dir %{_prefix}/lib/binfmt.d +%dir %{_datadir}/systemd +%dir %{_datadir}/pkgconfig +%dir %{_localstatedir}/lib/systemd +%dir %{_localstatedir}/lib/systemd/catalog +%dir %{_localstatedir}/lib/systemd/coredump +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf +%config(noreplace) %{_sysconfdir}/systemd/system.conf +%config(noreplace) %{_sysconfdir}/systemd/user.conf +%config(noreplace) %{_sysconfdir}/systemd/logind.conf +%config(noreplace) %{_sysconfdir}/systemd/journald.conf +%config(noreplace) %{_sysconfdir}/systemd/bootchart.conf +%config(noreplace) %{_sysconfdir}/udev/udev.conf +%config(noreplace) %{_sysconfdir}/rsyslog.d/listen.conf +%config(noreplace) %{_sysconfdir}/yum/protected.d/systemd.conf +%config(noreplace) %{_sysconfdir}/pam.d/systemd-user +%ghost %{_sysconfdir}/udev/hwdb.bin +%{_rpmconfigdir}/macros.d/macros.systemd +%{_sysconfdir}/xdg/systemd +%{_sysconfdir}/rc.d/init.d/README +%ghost %config(noreplace) %{_sysconfdir}/hostname +%ghost %config(noreplace) %{_sysconfdir}/localtime +%ghost %config(noreplace) %{_sysconfdir}/vconsole.conf +%ghost %config(noreplace) %{_sysconfdir}/locale.conf +%ghost %config(noreplace) %{_sysconfdir}/machine-id +%ghost %config(noreplace) %{_sysconfdir}/machine-info +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf +%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-system-setup-keyboard.conf +%ghost %{_localstatedir}/lib/systemd/catalog/database +%{_bindir}/systemctl +%{_bindir}/systemd-notify +%{_bindir}/systemd-analyze +%{_bindir}/systemd-ask-password +%{_bindir}/systemd-tty-ask-password-agent +%{_bindir}/systemd-machine-id-setup +%{_bindir}/loginctl +%{_bindir}/systemd-loginctl +%{_bindir}/journalctl +%{_bindir}/machinectl +%{_bindir}/systemd-tmpfiles +%{_bindir}/systemd-nspawn +%{_bindir}/systemd-stdio-bridge +%{_bindir}/systemd-cat +%{_bindir}/systemd-cgls +%{_bindir}/systemd-cgtop +%{_bindir}/systemd-delta +%{_bindir}/systemd-run +%caps(cap_dac_override,cap_sys_ptrace=pe) %{_bindir}/systemd-detect-virt +%{_bindir}/systemd-inhibit +%{_bindir}/hostnamectl +%{_bindir}/localectl +%{_bindir}/timedatectl +%{_bindir}/bootctl +%{_bindir}/systemd-coredumpctl +%{_bindir}/udevadm +%{_bindir}/kernel-install +%{_prefix}/lib/systemd/systemd +%exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* +%{_prefix}/lib/systemd/system +%{_prefix}/lib/systemd/user +%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd +%{_prefix}/lib/systemd/systemd-* +%{_prefix}/lib/udev +%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator +%{_prefix}/lib/systemd/system-generators/systemd-getty-generator +%{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator +%{_prefix}/lib/systemd/system-generators/systemd-fstab-generator +%{_prefix}/lib/systemd/system-generators/systemd-system-update-generator +%{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator +%{_prefix}/lib/tmpfiles.d/systemd.conf +%{_prefix}/lib/tmpfiles.d/x11.conf +%{_prefix}/lib/tmpfiles.d/legacy.conf +%{_prefix}/lib/tmpfiles.d/tmp.conf +%{_prefix}/lib/tmpfiles.d/systemd-nologin.conf +%{_prefix}/lib/sysctl.d/50-default.conf +%{_prefix}/lib/systemd/system-preset/99-default-disable.preset +%{_prefix}/lib/systemd/catalog/systemd.catalog +%{_prefix}/lib/kernel/install.d/50-depmod.install +%{_prefix}/lib/kernel/install.d/90-loaderentry.install +%{_sbindir}/init +%{_sbindir}/reboot +%{_sbindir}/halt +%{_sbindir}/poweroff +%{_sbindir}/shutdown +%{_sbindir}/telinit +%{_sbindir}/runlevel +%{_sbindir}/udevadm +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man7/* +%exclude %{_mandir}/man8/systemd-journal-gatewayd.* +%{_mandir}/man8/* +%{_datadir}/systemd/kbd-model-map +%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service +%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.*.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml +%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy +%{_datadir}/pkgconfig/systemd.pc +%{_datadir}/pkgconfig/udev.pc +%{_datadir}/bash-completion/completions/hostnamectl +%{_datadir}/bash-completion/completions/journalctl +%{_datadir}/bash-completion/completions/localectl +%{_datadir}/bash-completion/completions/loginctl +%{_datadir}/bash-completion/completions/systemctl +%{_datadir}/bash-completion/completions/systemd-coredumpctl +%{_datadir}/bash-completion/completions/timedatectl +%{_datadir}/bash-completion/completions/udevadm +%{_datadir}/bash-completion/completions/systemd-analyze +%{_datadir}/bash-completion/completions/kernel-install +%{_datadir}/bash-completion/completions/systemd-run +%{_datadir}/zsh/site-functions/* +%ghost %{_localstatedir}/lib/random-seed +%ghost %dir %{_localstatedir}/var/lib/systemd/ +%ghost %dir %{_localstatedir}/var/lib/systemd/coredump +%ghost %dir %{_localstatedir}/var/lib/systemd/catalog +%ghost %{_localstatedir}/var/lib/systemd/catalog/database +%ghost %dir %{_localstatedir}/var/lib/backlight/ +%config(noreplace) %{_sysconfdir}/rc.d/rc.local +%{_sysconfdir}/rc.local + +# Make sure we don't remove runlevel targets from F14 alpha installs, +# but make sure we don't create then anew. +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel2.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel3.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target +%ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target + +%files libs +%{_libdir}/security/pam_systemd.so +%{_libdir}/libnss_myhostname.so.2 +%{_libdir}/libsystemd-daemon.so.* +%{_libdir}/libsystemd-login.so.* +%{_libdir}/libsystemd-journal.so.* +%{_libdir}/libsystemd-id128.so.* +%{_libdir}/libudev.so.* + +%files devel +%dir %{_includedir}/systemd +%{_libdir}/libsystemd-daemon.so +%{_libdir}/libsystemd-login.so +%{_libdir}/libsystemd-journal.so +%{_libdir}/libsystemd-id128.so +%{_libdir}/libudev.so +%{_includedir}/systemd/sd-daemon.h +%{_includedir}/systemd/sd-login.h +%{_includedir}/systemd/sd-journal.h +%{_includedir}/systemd/sd-id128.h +%{_includedir}/systemd/sd-messages.h +%{_includedir}/systemd/sd-shutdown.h +%{_includedir}/libudev.h +%{_libdir}/pkgconfig/libsystemd-daemon.pc +%{_libdir}/pkgconfig/libsystemd-login.pc +%{_libdir}/pkgconfig/libsystemd-journal.pc +%{_libdir}/pkgconfig/libsystemd-id128.pc +%{_libdir}/pkgconfig/libudev.pc +%{_mandir}/man3/* +%dir %{_datadir}/gtk-doc/html/libudev +%{_datadir}/gtk-doc/html/libudev/* + +%files sysv +%{_bindir}/systemd-sysv-convert + +%files python +%{python_sitearch}/systemd/__init__.py +%{python_sitearch}/systemd/__init__.pyc +%{python_sitearch}/systemd/__init__.pyo +%{python_sitearch}/systemd/_journal.so +%{python_sitearch}/systemd/_reader.so +%{python_sitearch}/systemd/_daemon.so +%{python_sitearch}/systemd/id128.so +%{python_sitearch}/systemd/login.so +%{python_sitearch}/systemd/journal.py +%{python_sitearch}/systemd/journal.pyc +%{python_sitearch}/systemd/journal.pyo +%{python_sitearch}/systemd/daemon.py +%{python_sitearch}/systemd/daemon.pyc +%{python_sitearch}/systemd/daemon.pyo + +%files -n libgudev1 +%{_libdir}/libgudev-1.0.so.* +%{_libdir}/girepository-1.0/GUdev-1.0.typelib + +%files -n libgudev1-devel +%{_libdir}/libgudev-1.0.so +%dir %{_includedir}/gudev-1.0 +%dir %{_includedir}/gudev-1.0/gudev +%{_includedir}/gudev-1.0/gudev/*.h +%{_datadir}/gir-1.0/GUdev-1.0.gir +%dir %{_datadir}/gtk-doc/html/gudev +%{_datadir}/gtk-doc/html/gudev/* +%{_libdir}/pkgconfig/gudev-1.0* + +%files journal-gateway +%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* +%{_prefix}/lib/systemd/systemd-journal-gatewayd +%{_mandir}/man8/systemd-journal-gatewayd.* +%{_datadir}/systemd/gatewayd + +%changelog +* Thu Jan 15 2015 Colin Walters - 208-99.atomic.0 +- Increase version to override RHEL7.1 version + +* Fri Dec 19 2014 Colin Walters - 208-13.atomic.4 +- Rebuild for 7.1 + +* Fri Sep 12 2014 Lukas Nykryn - 208-11.1.5 +- units/serial-getty@.service: add [Install] section (#1083936) +- units: order network-online.target after network.target (#1072431) +- util: consider both fuse.glusterfs and glusterfs network file systems (#1080229) +- core: make StopWhenUnneeded work in conjunction with units that fail during their start job (#986949) +- cgroups-agent: down-grade log level (#1044386) +- random-seed: raise POOL_SIZE_MIN constant to 1024 (#1066517) +- delta: do not use unicode chars in C locale (#1088419) +- core: print debug instead of error message (#1105608) +- journald: always add syslog facility for messages coming from kmsg (#1113215) +- fsck,fstab-generator: be lenient about missing fsck. (#1098310) +- rules/60-persistent-storage: add nvme pcie ssd scsi_id ENV (#1042990) +- cgls: fix running with -M option (#1085455) +- getty: Start getty on 3270 terminals available on Linux on System z (#1075729) +- core: Added support for ERRNO NOTIFY_SOCKET message parsing (#1106457) +- socket: add SocketUser= and SocketGroup= for chown()ing sockets in the file system (#1111761) +- tmpfiles: add --root option to operate on an alternate fs tree (#1111199) +- units: make ExecStopPost action part of ExecStart (#1036276) +- machine-id: only look into KVM uuid when we are not running in a container (#1123452) +- util: reset signals when we fork off agents (#1134818) +- udev: do not skip the execution of RUN when renaming a network device fails (#1102135) +- man: mention System Administrator's Guide in systemctl manpage (#978948) +- vconsole: also copy character maps (not just fonts) from vt1 to vt2, vt3, ... (#1002450) +- systemd-detect-virt: detect s390 virtualization (#1139149) + +* Wed Apr 02 2014 Lukáš Nykrýn - 208-11 +- logind-session: save stopping flag (#1082692) +- unit: add waiting jobs to run queue in unit_coldplug (#1083159) + +* Fri Mar 28 2014 Harald Hoyer 208-10 +- require redhat-release >= 7.0 +Resolves: rhbz#1070114 + +* Fri Mar 14 2014 Lukáš Nykrýn - 208-9 +- fixes crashes in logind and systemd (#1073994) +- run fsck before mouting root in initramfs (#1056661) + +* Thu Mar 06 2014 Lukáš Nykrýn - 208-8 +- rules: mark loop device as SYSTEMD_READY=0 if no file is attached (#1067422) +- utmp: make sure we don't write the utmp reboot record twice on each boot (#1053600) +- rework session shutdown logic (#1047614) +- introduce new stop protocol for unit scopes (#1064976) + +* Wed Mar 05 2014 Lukáš Nykrýn - 208-7 +- setup tty permissions and group for /dev/sclp_line0 (#1070310) +- cdrom_id: use the old MMC fallback (#1038015) +- mount: don't send out PropertiesChanged message if actually nothing got changed (#1069718) + +* Wed Feb 26 2014 Lukáš Nykrýn - 208-6 +- fix boot if SELINUX=permissive in configuration file and trying to boot in enforcing=1 (#907841) + +* Tue Feb 25 2014 Lukáš Nykrýn - 208-5 +- reintroduce 60-alias-kmsg.rules (#1032711) + +* Mon Feb 17 2014 Lukáš Nykrýn - 208-4 +- fstab-generator: revert wrongly applied patch + +* Fri Feb 14 2014 Lukáš Nykrýn - 208-3 +- dbus-manager: fix selinux check for enable/disable + +* Wed Feb 12 2014 Michal Sekletar - 208-2 +- require redhat-release package +- call systemd-tmpfiles after package installation (#1059345) +- move preset policy out of systemd package (#903690) + +* Tue Feb 11 2014 Michal Sekletar - 208-1 +- rebase to systemd-208 (#1063332) +- do not create symlink /etc/systemd/system/syslog.service (#1055421) + +* Fri Jan 24 2014 Daniel Mach - 207-14 +- Mass rebuild 2014-01-24 + +* Thu Jan 16 2014 Lukáš Nykrýn - 207-13 +- fix SELinux check for transient units (#1008864) + +* Wed Jan 15 2014 Lukáš Nykrýn - 207-12 +- shell-completion: remove load and dump from systemctl (#1048066) +- delta: ensure that d_type will be set on every fs (#1050795) +- tmpfiles: don't allow label_fix to print ENOENT when we want to ignore it (#1044871) +- udev/net_id: Introduce predictable network names for Linux on System z (#870859) +- coredumpctl: in case of error free pattern after print (#1052786) + +* Fri Dec 27 2013 Daniel Mach - 207-11 +- Mass rebuild 2013-12-27 + +* Thu Dec 19 2013 Lukas Nykryn - 207-10 +- cgroup_show: don't call show_pid_array on empty arrays + +* Wed Dec 18 2013 Lukas Nykryn - 207-9 +- treat reload failure as failure (#1036848) +- improve journal performance (#1029604) +- backport bugfixes (#1043525) +- fix handling of trailing whitespace in split_quoted (#984832) +- localed: match converted keymaps before legacy (#903776) +- improve the description of parameter X in tmpfiles.d page (#1029604) +- obsolete ConsoleKit (#1039761) +- make rc.local more backward comaptible (#1039465) + +* Tue Nov 19 2013 Lukas Nykryn - 207-8 +- tmpfiles: introduce m (#1030961) + +* Tue Nov 12 2013 Lukas Nykryn - 207-7 +- introduce DefaultStartLimit (#821723) + +* Mon Nov 11 2013 Harald Hoyer 207-6 +- changed systemd-journal-gateway login shell to /sbin/nologin +- backported a lot of bugfixes +- udev: path_id - fix by-path link generation for scm devices +Resolves: rhbz#888707 + +* Tue Nov 05 2013 Lukas Nykryn - 207-5 +- create /etc/rc.d/rc.local (#968401) +- cgroup: always enable memory.use_hierarchy= for all cgroups (#1011575) +- remove user@.service (#1019738) +- drop some out-of-date references to cgroup settings (#1000004) +- explain NAME in systemctl man page (#978954) + +* Tue Oct 15 2013 Lukas Nykryn - 207-4 +- core: whenever a new PID is passed to us, make sure we watch it + +* Tue Oct 01 2013 Lukas Nykryn - 207-3 +- presets: add tuned.service + +* Thu Sep 19 2013 Lukas Nykryn - 207-2 +- Advertise hibernation only if there's enough free swap +- swap: create .wants symlink to 'auto' swap devices +- Verify validity of session name when received from outside +- polkit: Avoid race condition in scraping /proc +Resolves: rhbz#1005142 + +* Fri Sep 13 2013 Harald Hoyer 207-1 +- version 207 + +* Fri Sep 06 2013 Harald Hoyer 206-8 +- support "debug" kernel command line parameter +- journald: fix fd leak in journal_file_empty +- journald: fix vacuuming of archived journals +- libudev: enumerate - do not try to match against an empty subsystem +- cgtop: fixup the online help +- libudev: fix memleak when enumerating childs + +* Wed Aug 28 2013 Harald Hoyer 206-7 +- fixed cgroup hashmap corruption +Resolves: rhbz#997742 rhbz#995197 + +* Fri Aug 23 2013 Harald Hoyer 206-6 +- cgroup.c: check return value of unit_realize_cgroup_now() +Resolves: rhbz#997742 rhbz#995197 + +* Thu Aug 22 2013 Harald Hoyer 206-5 +- obsolete upstart +Resolves: rhbz#978014 +- obsolete hal +Resolves: rhbz#975589 +- service: always unwatch PIDs before forgetting old ones +Resolves: rhbz#995197 +- units: disable kmod-static-nodes.service in containers +- use CAP_MKNOD ConditionCapability +- fstab-generator: read rd.fstab=on/off switch correctly +- backlight: add minimal tool to save/restore screen brightness +- backlight: instead of syspath use sysname for identifying +- sysctl: allow overwriting of values specified in "later" +- systemd-python: fix initialization of _Reader objects +- udevd: simplify sigterm check +- libudev: fix hwdb validation to look for the *new* file +- units: make fsck units remain after exit +- udev: replace CAP_MKNOD by writable /sys condition +- libudev-enumerate.c:udev_enumerate_get_list_entry() fixed +- journal: fix parsing of facility in syslog messages + +* Fri Aug 09 2013 Harald Hoyer 206-4 +- journal: handle multiline syslog messages +- man: Fix copy&paste error +- core: synchronously block when logging +- journal: immediately sync to disk as soon as we receieve an EMERG/ALERT/CRIT message +- initctl: use irreversible jobs when switching runlevels +- udev: log error if chmod/chown of static dev nodes fails +- udev: static_node - don't touch permissions uneccessarily +- tmpfiles: support passing --prefix multiple times +- tmpfiles: introduce --exclude-prefix +- tmpfiles-setup: exclude /dev prefixes files +- logind: update state file after generating the session fifo, not before +- journalctl: use _COMM= match for scripts +- man: systemd.unit: fix volatile path +- man: link up scope+slice units from systemd.unit(5) +- man: there is no session mode, only user mode +- journal: fix hashmap leak in mmap-cache +- systemd-delta: Only print colors when on a tty +- systemd: fix segv in snapshot creation +- udev: hwdb - try reading modalias for usb before falling back to the composed one +- udevd: respect the log-level set in /etc/udev/udev.conf +- fstab-generator: respect noauto/nofail when adding sysroot mount + +* Fri Aug 02 2013 Lukáš Nykrýn - 206-3 +- add dependency on kmod >= 14 +- remove /var/log/journal to make journal non-persistant (#989750) +- add hypervkvpd.service to presets (#924321) + +* Thu Aug 01 2013 Lukáš Nykrýn - 206-2 +- 80-net-name-slot.rules: only rename network interfaces on ACTION==add + +* Tue Jul 23 2013 Kay Sievers - 206-1 +- New upstream release + Resolves (#984152) + +* Wed Jul 3 2013 Lennart Poettering - 205-1 +- New upstream release + +* Wed Jun 26 2013 Michal Schmidt 204-10 +- Split systemd-journal-gateway subpackage (#908081). + +* Mon Jun 24 2013 Michal Schmidt 204-9 +- Rename nm_dispatcher to NetworkManager-dispatcher in default preset (#977433) + +* Fri Jun 14 2013 Harald Hoyer 204-8 +- fix, which helps to sucessfully browse journals with + duplicated seqnums + +* Fri Jun 14 2013 Harald Hoyer 204-7 +- fix duplicate message ID bug +Resolves: rhbz#974132 + +* Thu Jun 06 2013 Harald Hoyer 204-6 +- introduce 99-default-disable.preset + +* Thu Jun 6 2013 Lennart Poettering - 204-5 +- Rename 90-display-manager.preset to 85-display-manager.preset so that it actually takes precedence over 90-default.preset's "disable *" line (#903690) + +* Tue May 28 2013 Harald Hoyer 204-4 +- Fix kernel-install (#965897) + +* Wed May 22 2013 Kay Sievers - 204-3 +- Fix kernel-install (#965897) + +* Thu May 9 2013 Lennart Poettering - 204-2 +- New upstream release +- disable isdn by default (#959793) + +* Tue May 07 2013 Harald Hoyer 203-2 +- forward port kernel-install-grubby.patch + +* Tue May 7 2013 Lennart Poettering - 203-1 +- New upstream release + +* Wed Apr 24 2013 Harald Hoyer 202-3 +- fix ENOENT for getaddrinfo +- Resolves: rhbz#954012 rhbz#956035 +- crypt-setup-generator: correctly check return of strdup +- logind-dbus: initialize result variable +- prevent library underlinking + +* Fri Apr 19 2013 Harald Hoyer 202-2 +- nspawn create empty /etc/resolv.conf if necessary +- python wrapper: add sd_journal_add_conjunction() +- fix s390 booting +- Resolves: rhbz#953217 + +* Thu Apr 18 2013 Lennart Poettering - 202-1 +- New upstream release + +* Tue Apr 09 2013 Michal Schmidt - 201-2 +- Automatically discover whether to run autoreconf and add autotools and git + BuildRequires based on the presence of patches to be applied. +- Use find -delete. + +* Mon Apr 8 2013 Lennart Poettering - 201-1 +- New upstream release + +* Mon Apr 8 2013 Lennart Poettering - 200-4 +- Update preset file + +* Fri Mar 29 2013 Lennart Poettering - 200-3 +- Remove NetworkManager-wait-online.service from presets file again, it should default to off + +* Fri Mar 29 2013 Lennart Poettering - 200-2 +- New upstream release + +* Tue Mar 26 2013 Lennart Poettering - 199-2 +- Add NetworkManager-wait-online.service to the presets file + +* Tue Mar 26 2013 Lennart Poettering - 199-1 +- New upstream release + +* Mon Mar 18 2013 Michal Schmidt 198-7 +- Drop /usr/s?bin/ prefixes. + +* Fri Mar 15 2013 Harald Hoyer 198-6 +- run autogen to pickup all changes + +* Fri Mar 15 2013 Harald Hoyer 198-5 +- do not mount anything, when not running as pid 1 +- add initrd.target for systemd in the initrd + +* Wed Mar 13 2013 Harald Hoyer 198-4 +- fix switch-root and local-fs.target problem +- patch kernel-install to use grubby, if available + +* Fri Mar 08 2013 Harald Hoyer 198-3 +- add Conflict with dracut < 026 because of the new switch-root isolate + +* Thu Mar 7 2013 Lennart Poettering - 198-2 +- Create required users + +* Thu Mar 7 2013 Lennart Poettering - 198-1 +- New release +- Enable journal persistancy by default + +* Sun Feb 10 2013 Peter Robinson 197-3 +- Bump for ARM + +* Fri Jan 18 2013 Michal Schmidt - 197-2 +- Added qemu-guest-agent.service to presets (Lennart, #885406). +- Add missing pygobject3-base to systemd-analyze deps (Lennart). +- Do not require hwdata, it is all in the hwdb now (Kay). +- Drop dependency on dbus-python. + +* Tue Jan 8 2013 Lennart Poettering - 197-1 +- New upstream release + +* Mon Dec 10 2012 Michal Schmidt - 196-4 +- Enable rngd.service by default (#857765). + +* Mon Dec 10 2012 Michal Schmidt - 196-3 +- Disable hardening on s390(x) because PIE is broken there and produces + text relocations with __thread (#868839). + +* Wed Dec 05 2012 Michal Schmidt - 196-2 +- added spice-vdagentd.service to presets (Lennart, #876237) +- BR cryptsetup-devel instead of the legacy cryptsetup-luks-devel provide name + (requested by Milan Brož). +- verbose make to see the actual build flags + +* Wed Nov 21 2012 Lennart Poettering - 196-1 +- New upstream release + +* Tue Nov 20 2012 Lennart Poettering - 195-8 +- https://bugzilla.redhat.com/show_bug.cgi?id=873459 +- https://bugzilla.redhat.com/show_bug.cgi?id=878093 + +* Thu Nov 15 2012 Michal Schmidt - 195-7 +- Revert udev killing cgroup patch for F18 Beta. +- https://bugzilla.redhat.com/show_bug.cgi?id=873576 + +* Fri Nov 09 2012 Michal Schmidt - 195-6 +- Fix cyclical dep between systemd and systemd-libs. +- Avoid broken build of test-journal-syslog. +- https://bugzilla.redhat.com/show_bug.cgi?id=873387 +- https://bugzilla.redhat.com/show_bug.cgi?id=872638 + +* Thu Oct 25 2012 Kay Sievers - 195-5 +- require 'sed', limit HOSTNAME= match + +* Wed Oct 24 2012 Michal Schmidt - 195-4 +- add dmraid-activation.service to the default preset +- add yum protected.d fragment +- https://bugzilla.redhat.com/show_bug.cgi?id=869619 +- https://bugzilla.redhat.com/show_bug.cgi?id=869717 + +* Wed Oct 24 2012 Kay Sievers - 195-3 +- Migrate /etc/sysconfig/ i18n, keyboard, network files/variables to + systemd native files + +* Tue Oct 23 2012 Lennart Poettering - 195-2 +- Provide syslog because the journal is fine as a syslog implementation + +* Tue Oct 23 2012 Lennart Poettering - 195-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=831665 +- https://bugzilla.redhat.com/show_bug.cgi?id=847720 +- https://bugzilla.redhat.com/show_bug.cgi?id=858693 +- https://bugzilla.redhat.com/show_bug.cgi?id=863481 +- https://bugzilla.redhat.com/show_bug.cgi?id=864629 +- https://bugzilla.redhat.com/show_bug.cgi?id=864672 +- https://bugzilla.redhat.com/show_bug.cgi?id=864674 +- https://bugzilla.redhat.com/show_bug.cgi?id=865128 +- https://bugzilla.redhat.com/show_bug.cgi?id=866346 +- https://bugzilla.redhat.com/show_bug.cgi?id=867407 +- https://bugzilla.redhat.com/show_bug.cgi?id=868603 + +* Wed Oct 10 2012 Michal Schmidt - 194-2 +- Add scriptlets for migration away from systemd-timedated-ntp.target + +* Wed Oct 3 2012 Lennart Poettering - 194-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=859614 +- https://bugzilla.redhat.com/show_bug.cgi?id=859655 + +* Fri Sep 28 2012 Lennart Poettering - 193-1 +- New upstream release + +* Tue Sep 25 2012 Lennart Poettering - 192-1 +- New upstream release + +* Fri Sep 21 2012 Lennart Poettering - 191-2 +- Fix journal mmap header prototype definition to fix compilation on 32bit + +* Fri Sep 21 2012 Lennart Poettering - 191-1 +- New upstream release +- Enable all display managers by default, as discussed with Adam Williamson + +* Thu Sep 20 2012 Lennart Poettering - 190-1 +- New upstream release +- Take possession of /etc/localtime, and remove /etc/sysconfig/clock +- https://bugzilla.redhat.com/show_bug.cgi?id=858780 +- https://bugzilla.redhat.com/show_bug.cgi?id=858787 +- https://bugzilla.redhat.com/show_bug.cgi?id=858771 +- https://bugzilla.redhat.com/show_bug.cgi?id=858754 +- https://bugzilla.redhat.com/show_bug.cgi?id=858746 +- https://bugzilla.redhat.com/show_bug.cgi?id=858266 +- https://bugzilla.redhat.com/show_bug.cgi?id=858224 +- https://bugzilla.redhat.com/show_bug.cgi?id=857670 +- https://bugzilla.redhat.com/show_bug.cgi?id=856975 +- https://bugzilla.redhat.com/show_bug.cgi?id=855863 +- https://bugzilla.redhat.com/show_bug.cgi?id=851970 +- https://bugzilla.redhat.com/show_bug.cgi?id=851275 +- https://bugzilla.redhat.com/show_bug.cgi?id=851131 +- https://bugzilla.redhat.com/show_bug.cgi?id=847472 +- https://bugzilla.redhat.com/show_bug.cgi?id=847207 +- https://bugzilla.redhat.com/show_bug.cgi?id=846483 +- https://bugzilla.redhat.com/show_bug.cgi?id=846085 +- https://bugzilla.redhat.com/show_bug.cgi?id=845973 +- https://bugzilla.redhat.com/show_bug.cgi?id=845194 +- https://bugzilla.redhat.com/show_bug.cgi?id=845028 +- https://bugzilla.redhat.com/show_bug.cgi?id=844630 +- https://bugzilla.redhat.com/show_bug.cgi?id=839736 +- https://bugzilla.redhat.com/show_bug.cgi?id=835848 +- https://bugzilla.redhat.com/show_bug.cgi?id=831740 +- https://bugzilla.redhat.com/show_bug.cgi?id=823485 +- https://bugzilla.redhat.com/show_bug.cgi?id=821813 +- https://bugzilla.redhat.com/show_bug.cgi?id=807886 +- https://bugzilla.redhat.com/show_bug.cgi?id=802198 +- https://bugzilla.redhat.com/show_bug.cgi?id=767795 +- https://bugzilla.redhat.com/show_bug.cgi?id=767561 +- https://bugzilla.redhat.com/show_bug.cgi?id=752774 +- https://bugzilla.redhat.com/show_bug.cgi?id=732874 +- https://bugzilla.redhat.com/show_bug.cgi?id=858735 + +* Thu Sep 13 2012 Lennart Poettering - 189-4 +- Don't pull in pkg-config as dep +- https://bugzilla.redhat.com/show_bug.cgi?id=852828 + +* Wed Sep 12 2012 Lennart Poettering - 189-3 +- Update preset policy +- Rename preset policy file from 99-default.preset to 90-default.preset so that people can order their own stuff after the Fedora default policy if they wish + +* Thu Aug 23 2012 Lennart Poettering - 189-2 +- Update preset policy +- https://bugzilla.redhat.com/show_bug.cgi?id=850814 + +* Thu Aug 23 2012 Lennart Poettering - 189-1 +- New upstream release + +* Thu Aug 16 2012 Ray Strode 188-4 +- more scriptlet fixes + (move dm migration logic to %posttrans so the service + files it's looking for are available at the time + the logic is run) + +* Sat Aug 11 2012 Lennart Poettering - 188-3 +- Remount file systems MS_PRIVATE before switching roots +- https://bugzilla.redhat.com/show_bug.cgi?id=847418 + +* Wed Aug 08 2012 Rex Dieter - 188-2 +- fix scriptlets + +* Wed Aug 8 2012 Lennart Poettering - 188-1 +- New upstream release +- Enable gdm and avahi by default via the preset file +- Convert /etc/sysconfig/desktop to display-manager.service symlink +- Enable hardened build + +* Mon Jul 30 2012 Kay Sievers - 187-3 +- Obsolete: system-setup-keyboard + +* Wed Jul 25 2012 Kalev Lember - 187-2 +- Run ldconfig for the new -libs subpackage + +* Thu Jul 19 2012 Lennart Poettering - 187-1 +- New upstream release + +* Mon Jul 09 2012 Harald Hoyer 186-2 +- fixed dracut conflict version + +* Tue Jul 3 2012 Lennart Poettering - 186-1 +- New upstream release + +* Fri Jun 22 2012 Nils Philippsen - 185-7.gite7aee75 +- add obsoletes/conflicts so multilib systemd -> systemd-libs updates work + +* Thu Jun 14 2012 Michal Schmidt - 185-6.gite7aee75 +- Update to current git + +* Wed Jun 06 2012 Kay Sievers - 185-5.gita2368a3 +- disable plymouth in configure, to drop the .wants/ symlinks + +* Wed Jun 06 2012 Michal Schmidt - 185-4.gita2368a3 +- Update to current git snapshot + - Add systemd-readahead-analyze + - Drop upstream patch +- Split systemd-libs +- Drop duplicate doc files +- Fixed License headers of subpackages + +* Wed Jun 06 2012 Ray Strode - 185-3 +- Drop plymouth files +- Conflict with old plymouth + +* Tue Jun 05 2012 Kay Sievers - 185-2 +- selinux udev labeling fix +- conflict with older dracut versions for new udev file names + +* Mon Jun 04 2012 Kay Sievers - 185-1 +- New upstream release + - udev selinux labeling fixes + - new man pages + - systemctl help + +* Thu May 31 2012 Lennart Poettering - 184-1 +- New upstream release + +* Thu May 24 2012 Kay Sievers - 183-1 +- New upstream release including udev merge. + +* Wed Mar 28 2012 Michal Schmidt - 44-4 +- Add triggers from Bill Nottingham to correct the damage done by + the obsoleted systemd-units's preun scriptlet (#807457). + +* Mon Mar 26 2012 Dennis Gilmore - 44-3 +- apply patch from upstream so we can build systemd on arm and ppc +- and likely the rest of the secondary arches + +* Tue Mar 20 2012 Michal Schmidt - 44-2 +- Don't build the gtk parts anymore. They're moving into systemd-ui. +- Remove a dead patch file. + +* Fri Mar 16 2012 Lennart Poettering - 44-1 +- New upstream release +- Closes #798760, #784921, #783134, #768523, #781735 + +* Mon Feb 27 2012 Dennis Gilmore - 43-2 +- don't conflict with fedora-release systemd never actually provided +- /etc/os-release so there is no actual conflict + +* Wed Feb 15 2012 Lennart Poettering - 43-1 +- New upstream release +- Closes #789758, #790260, #790522 + +* Sat Feb 11 2012 Lennart Poettering - 42-1 +- New upstream release +- Save a bit of entropy during system installation (#789407) +- Don't own /etc/os-release anymore, leave that to fedora-release + +* Thu Feb 9 2012 Adam Williamson - 41-2 +- rebuild for fixed binutils + +* Thu Feb 9 2012 Lennart Poettering - 41-1 +- New upstream release + +* Tue Feb 7 2012 Lennart Poettering - 40-1 +- New upstream release + +* Thu Jan 26 2012 Kay Sievers - 39-3 +- provide /sbin/shutdown + +* Wed Jan 25 2012 Harald Hoyer 39-2 +- increment release + +* Wed Jan 25 2012 Kay Sievers - 39-1.1 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Wed Jan 25 2012 Lennart Poettering - 39-1 +- New upstream release + +* Sun Jan 22 2012 Michal Schmidt - 38-6.git9fa2f41 +- Update to a current git snapshot. +- Resolves: #781657 + +* Sun Jan 22 2012 Michal Schmidt - 38-5 +- Build against libgee06. Reenable gtk tools. +- Delete unused patches. +- Add easy building of git snapshots. +- Remove legacy spec file elements. +- Don't mention implicit BuildRequires. +- Configure with --disable-static. +- Merge -units into the main package. +- Move section 3 manpages to -devel. +- Fix unowned directory. +- Run ldconfig in scriptlets. +- Split systemd-analyze to a subpackage. + +* Sat Jan 21 2012 Dan Horák - 38-4 +- fix build on big-endians + +* Wed Jan 11 2012 Lennart Poettering - 38-3 +- Disable building of gtk tools for now + +* Wed Jan 11 2012 Lennart Poettering - 38-2 +- Fix a few (build) dependencies + +* Wed Jan 11 2012 Lennart Poettering - 38-1 +- New upstream release + +* Tue Nov 15 2011 Michal Schmidt - 37-4 +- Run authconfig if /etc/pam.d/system-auth is not a symlink. +- Resolves: #753160 + +* Wed Nov 02 2011 Michal Schmidt - 37-3 +- Fix remote-fs-pre.target and its ordering. +- Resolves: #749940 + +* Wed Oct 19 2011 Michal Schmidt - 37-2 +- A couple of fixes from upstream: +- Fix a regression in bash-completion reported in Bodhi. +- Fix a crash in isolating. +- Resolves: #717325 + +* Tue Oct 11 2011 Lennart Poettering - 37-1 +- New upstream release +- Resolves: #744726, #718464, #713567, #713707, #736756 + +* Thu Sep 29 2011 Michal Schmidt - 36-5 +- Undo the workaround. Kay says it does not belong in systemd. +- Unresolves: #741655 + +* Thu Sep 29 2011 Michal Schmidt - 36-4 +- Workaround for the crypto-on-lvm-on-crypto disk layout +- Resolves: #741655 + +* Sun Sep 25 2011 Michal Schmidt - 36-3 +- Revert an upstream patch that caused ordering cycles +- Resolves: #741078 + +* Fri Sep 23 2011 Lennart Poettering - 36-2 +- Add /etc/timezone to ghosted files + +* Fri Sep 23 2011 Lennart Poettering - 36-1 +- New upstream release +- Resolves: #735013, #736360, #737047, #737509, #710487, #713384 + +* Thu Sep 1 2011 Lennart Poettering - 35-1 +- New upstream release +- Update post scripts +- Resolves: #726683, #713384, #698198, #722803, #727315, #729997, #733706, #734611 + +* Thu Aug 25 2011 Lennart Poettering - 34-1 +- New upstream release + +* Fri Aug 19 2011 Harald Hoyer 33-2 +- fix ABRT on service file reloading +- Resolves: rhbz#732020 + +* Wed Aug 3 2011 Lennart Poettering - 33-1 +- New upstream release + +* Fri Jul 29 2011 Lennart Poettering - 32-1 +- New upstream release + +* Wed Jul 27 2011 Lennart Poettering - 31-2 +- Fix access mode of modprobe file, restart logind after upgrade + +* Wed Jul 27 2011 Lennart Poettering - 31-1 +- New upstream release + +* Wed Jul 13 2011 Lennart Poettering - 30-1 +- New upstream release + +* Thu Jun 16 2011 Lennart Poettering - 29-1 +- New upstream release + +* Mon Jun 13 2011 Michal Schmidt - 28-4 +- Apply patches from current upstream. +- Fixes memory size detection on 32-bit with >4GB RAM (BZ712341) + +* Wed Jun 08 2011 Michal Schmidt - 28-3 +- Apply patches from current upstream +- https://bugzilla.redhat.com/show_bug.cgi?id=709909 +- https://bugzilla.redhat.com/show_bug.cgi?id=710839 +- https://bugzilla.redhat.com/show_bug.cgi?id=711015 + +* Sat May 28 2011 Lennart Poettering - 28-2 +- Pull in nss-myhostname + +* Thu May 26 2011 Lennart Poettering - 28-1 +- New upstream release + +* Wed May 25 2011 Lennart Poettering - 26-2 +- Bugfix release +- https://bugzilla.redhat.com/show_bug.cgi?id=707507 +- https://bugzilla.redhat.com/show_bug.cgi?id=707483 +- https://bugzilla.redhat.com/show_bug.cgi?id=705427 +- https://bugzilla.redhat.com/show_bug.cgi?id=707577 + +* Sat Apr 30 2011 Lennart Poettering - 26-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=699394 +- https://bugzilla.redhat.com/show_bug.cgi?id=698198 +- https://bugzilla.redhat.com/show_bug.cgi?id=698674 +- https://bugzilla.redhat.com/show_bug.cgi?id=699114 +- https://bugzilla.redhat.com/show_bug.cgi?id=699128 + +* Thu Apr 21 2011 Lennart Poettering - 25-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=694788 +- https://bugzilla.redhat.com/show_bug.cgi?id=694321 +- https://bugzilla.redhat.com/show_bug.cgi?id=690253 +- https://bugzilla.redhat.com/show_bug.cgi?id=688661 +- https://bugzilla.redhat.com/show_bug.cgi?id=682662 +- https://bugzilla.redhat.com/show_bug.cgi?id=678555 +- https://bugzilla.redhat.com/show_bug.cgi?id=628004 + +* Wed Apr 6 2011 Lennart Poettering - 24-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=694079 +- https://bugzilla.redhat.com/show_bug.cgi?id=693289 +- https://bugzilla.redhat.com/show_bug.cgi?id=693274 +- https://bugzilla.redhat.com/show_bug.cgi?id=693161 + +* Tue Apr 5 2011 Lennart Poettering - 23-1 +- New upstream release +- Include systemd-sysv-convert + +* Fri Apr 1 2011 Lennart Poettering - 22-1 +- New upstream release + +* Wed Mar 30 2011 Lennart Poettering - 21-2 +- The quota services are now pulled in by mount points, hence no need to enable them explicitly + +* Tue Mar 29 2011 Lennart Poettering - 21-1 +- New upstream release + +* Mon Mar 28 2011 Matthias Clasen - 20-2 +- Apply upstream patch to not send untranslated messages to plymouth + +* Tue Mar 8 2011 Lennart Poettering - 20-1 +- New upstream release + +* Tue Mar 1 2011 Lennart Poettering - 19-1 +- New upstream release + +* Wed Feb 16 2011 Lennart Poettering - 18-1 +- New upstream release + +* Mon Feb 14 2011 Bill Nottingham - 17-6 +- bump upstart obsoletes (#676815) + +* Wed Feb 9 2011 Tom Callaway - 17-5 +- add macros.systemd file for %%{_unitdir} + +* Wed Feb 09 2011 Fedora Release Engineering - 17-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 9 2011 Lennart Poettering - 17-3 +- Fix popen() of systemctl, #674916 + +* Mon Feb 7 2011 Bill Nottingham - 17-2 +- add epoch to readahead obsolete + +* Sat Jan 22 2011 Lennart Poettering - 17-1 +- New upstream release + +* Tue Jan 18 2011 Lennart Poettering - 16-2 +- Drop console.conf again, since it is not shipped in pamtmp.conf + +* Sat Jan 8 2011 Lennart Poettering - 16-1 +- New upstream release + +* Thu Nov 25 2010 Lennart Poettering - 15-1 +- New upstream release + +* Thu Nov 25 2010 Lennart Poettering - 14-1 +- Upstream update +- Enable hwclock-load by default +- Obsolete readahead +- Enable /var/run and /var/lock on tmpfs + +* Fri Nov 19 2010 Lennart Poettering - 13-1 +- new upstream release + +* Wed Nov 17 2010 Bill Nottingham 12-3 +- Fix clash + +* Wed Nov 17 2010 Lennart Poettering - 12-2 +- Don't clash with initscripts for now, so that we don't break the builders + +* Wed Nov 17 2010 Lennart Poettering - 12-1 +- New upstream release + +* Fri Nov 12 2010 Matthias Clasen - 11-2 +- Rebuild with newer vala, libnotify + +* Thu Oct 7 2010 Lennart Poettering - 11-1 +- New upstream release + +* Wed Sep 29 2010 Jesse Keating - 10-6 +- Rebuilt for gcc bug 634757 + +* Thu Sep 23 2010 Bill Nottingham - 10-5 +- merge -sysvinit into main package + +* Mon Sep 20 2010 Bill Nottingham - 10-4 +- obsolete upstart-sysvinit too + +* Fri Sep 17 2010 Bill Nottingham - 10-3 +- Drop upstart requires + +* Tue Sep 14 2010 Lennart Poettering - 10-2 +- Enable audit +- https://bugzilla.redhat.com/show_bug.cgi?id=633771 + +* Tue Sep 14 2010 Lennart Poettering - 10-1 +- New upstream release +- https://bugzilla.redhat.com/show_bug.cgi?id=630401 +- https://bugzilla.redhat.com/show_bug.cgi?id=630225 +- https://bugzilla.redhat.com/show_bug.cgi?id=626966 +- https://bugzilla.redhat.com/show_bug.cgi?id=623456 + +* Fri Sep 3 2010 Bill Nottingham - 9-3 +- move fedora-specific units to initscripts; require newer version thereof + +* Fri Sep 3 2010 Lennart Poettering - 9-2 +- Add missing tarball + +* Fri Sep 3 2010 Lennart Poettering - 9-1 +- New upstream version +- Closes 501720, 614619, 621290, 626443, 626477, 627014, 627785, 628913 + +* Fri Aug 27 2010 Lennart Poettering - 8-3 +- Reexecute after installation, take ownership of /var/run/user +- https://bugzilla.redhat.com/show_bug.cgi?id=627457 +- https://bugzilla.redhat.com/show_bug.cgi?id=627634 + +* Thu Aug 26 2010 Lennart Poettering - 8-2 +- Properly create default.target link + +* Wed Aug 25 2010 Lennart Poettering - 8-1 +- New upstream release + +* Thu Aug 12 2010 Lennart Poettering - 7-3 +- Fix https://bugzilla.redhat.com/show_bug.cgi?id=623561 + +* Thu Aug 12 2010 Lennart Poettering - 7-2 +- Fix https://bugzilla.redhat.com/show_bug.cgi?id=623430 + +* Tue Aug 10 2010 Lennart Poettering - 7-1 +- New upstream release + +* Fri Aug 6 2010 Lennart Poettering - 6-2 +- properly hide output on package installation +- pull in coreutils during package installtion + +* Fri Aug 6 2010 Lennart Poettering - 6-1 +- New upstream release +- Fixes #621200 + +* Wed Aug 4 2010 Lennart Poettering - 5-2 +- Add tarball + +* Wed Aug 4 2010 Lennart Poettering - 5-1 +- Prepare release 5 + +* Tue Jul 27 2010 Bill Nottingham - 4-4 +- Add 'sysvinit-userspace' provide to -sysvinit package to fix upgrade/install (#618537) + +* Sat Jul 24 2010 Lennart Poettering - 4-3 +- Add libselinux to build dependencies + +* Sat Jul 24 2010 Lennart Poettering - 4-2 +- Use the right tarball + +* Sat Jul 24 2010 Lennart Poettering - 4-1 +- New upstream release, and make default + +* Tue Jul 13 2010 Lennart Poettering - 3-3 +- Used wrong tarball + +* Tue Jul 13 2010 Lennart Poettering - 3-2 +- Own /cgroup jointly with libcgroup, since we don't dpend on it anymore + +* Tue Jul 13 2010 Lennart Poettering - 3-1 +- New upstream release + +* Fri Jul 9 2010 Lennart Poettering - 2-0 +- New upstream release + +* Wed Jul 7 2010 Lennart Poettering - 1-0 +- First upstream release + +* Tue Jun 29 2010 Lennart Poettering - 0-0.7.20100629git4176e5 +- New snapshot +- Split off -units package where other packages can depend on without pulling in the whole of systemd + +* Tue Jun 22 2010 Lennart Poettering - 0-0.6.20100622gita3723b +- Add missing libtool dependency. + +* Tue Jun 22 2010 Lennart Poettering - 0-0.5.20100622gita3723b +- Update snapshot + +* Mon Jun 14 2010 Rahul Sundaram - 0-0.4.20100614git393024 +- Pull the latest snapshot that fixes a segfault. Resolves rhbz#603231 + +* Fri Jun 11 2010 Rahul Sundaram - 0-0.3.20100610git2f198e +- More minor fixes as per review + +* Thu Jun 10 2010 Rahul Sundaram - 0-0.2.20100610git2f198e +- Spec improvements from David Hollis + +* Wed Jun 09 2010 Rahul Sundaram - 0-0.1.20090609git2f198e +- Address review comments + +* Tue Jun 01 2010 Rahul Sundaram - 0-0.0.git2010-06-02 +- Initial spec (adopted from Kay Sievers)