diff --git a/.systemd.metadata b/.systemd.metadata index b58f4e8..ddc02ad 100644 --- a/.systemd.metadata +++ b/.systemd.metadata @@ -1 +1 @@ -ea1a538bc3d29f7c6f7f0a0aa5c070b9018c5527 SOURCES/systemd-207.tar.xz +e1a4e213d5d1e3498bca851347f2f07fdb9b4e1f SOURCES/systemd-208.tar.xz diff --git a/SOURCES/0001-RHEL-units-add-Install-section-to-tmp.mount.patch b/SOURCES/0001-RHEL-units-add-Install-section-to-tmp.mount.patch deleted file mode 100644 index d70f7a5..0000000 --- a/SOURCES/0001-RHEL-units-add-Install-section-to-tmp.mount.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2e987a0ac284a1cd1ab4f8e335abcae91c976f15 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 15 Feb 2013 09:07:57 +0100 -Subject: [PATCH] RHEL: units: add [Install] section to tmp.mount - -Related: #908253 ---- - units/tmp.mount | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/units/tmp.mount b/units/tmp.mount -index 99a3ba3..79e1c76 100644 ---- a/units/tmp.mount -+++ b/units/tmp.mount -@@ -18,3 +18,9 @@ What=tmpfs - Where=/tmp - Type=tmpfs - Options=mode=1777,strictatime -+ -+# tmp.mount is statically enabled in upstream. In RHEL tmp-on-tmpfs is not used -+# by default, but there are cases where it is necessary (anaconda, live images, -+# read-only root). Make 'systemctl enable tmp.mount' work: -+[Install] -+WantedBy=local-fs.target 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-kernel-install-add-fedora-specific-callouts-to-new-k.patch b/SOURCES/0002-kernel-install-add-fedora-specific-callouts-to-new-k.patch deleted file mode 100644 index ef90378..0000000 --- a/SOURCES/0002-kernel-install-add-fedora-specific-callouts-to-new-k.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b81d902a8ec4e81c6ddda0208307ee77d4e0858b 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 fb2ee57..f491947 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:" >&2 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-core-cgroup-first-print-then-free.patch b/SOURCES/0003-core-cgroup-first-print-then-free.patch deleted file mode 100644 index dc4eecf..0000000 --- a/SOURCES/0003-core-cgroup-first-print-then-free.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 89ad78921a404dc82f22862f2354707199ea1616 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 13 Sep 2013 14:31:17 +0200 -Subject: [PATCH] core/cgroup: first print then free - ---- - src/core/cgroup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 3eeb475..513450a 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -395,8 +395,8 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) { - is_in_hash = true; - - if (r < 0) { -- free(path); - log_error("cgroup %s exists already: %s", path, strerror(-r)); -+ free(path); - return r; - } - 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/0004-swap-fix-reverse-dependencies.patch b/SOURCES/0004-swap-fix-reverse-dependencies.patch deleted file mode 100644 index 63674d1..0000000 --- a/SOURCES/0004-swap-fix-reverse-dependencies.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0f84fab56d31f53b2970bdee64e254c4518618a7 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Fri, 13 Sep 2013 14:46:18 +0200 -Subject: [PATCH] swap: fix reverse dependencies - -Make sure swap.target correctly requires/wants the swap units. - -This fixes https://bugs.freedesktop.org/show_bug.cgi?id=69291. - -Reported-by: Hussam Al-Tayeb ---- - src/core/swap.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/swap.c b/src/core/swap.c -index 57d15eb..3950860 100644 ---- a/src/core/swap.c -+++ b/src/core/swap.c -@@ -220,7 +220,7 @@ static int swap_add_default_dependencies(Swap *s) { - } - - if (!noauto) { -- r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, (nofail ? UNIT_WANTED_BY : UNIT_REQUIRED_BY), -+ r = unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, (nofail ? UNIT_WANTS : UNIT_REQUIRES), - SPECIAL_SWAP_TARGET, NULL, true); - if (r < 0) - return r; 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/0005-update-TODO.patch b/SOURCES/0005-update-TODO.patch deleted file mode 100644 index 911db49..0000000 --- a/SOURCES/0005-update-TODO.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d0746c1d17407a17c18f26876d9ca0f6f20b29b0 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 13 Sep 2013 04:13:47 +0200 -Subject: [PATCH] update TODO - ---- - TODO | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/TODO b/TODO -index 08d4914..5354692 100644 ---- a/TODO -+++ b/TODO -@@ -58,6 +58,8 @@ CGroup Rework Completion: - - Features: - -+* Move backlight and random-seed into /var/lib/systemd -+ - * When a Type=forking service fails and needed another service that - service is not cleaned up again when it has StopWhenUnneeded=yes - http://lists.freedesktop.org/archives/systemd-devel/2013-July/012141.html 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/0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch b/SOURCES/0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch deleted file mode 100644 index 2d242c5..0000000 --- a/SOURCES/0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d12ed80037b482f7da136abbd7abce9c9219ef8e Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Thu, 15 Aug 2013 08:47:59 +0800 -Subject: [PATCH] cryptsetup-generator: don't create tmp+swap units - ---- - src/cryptsetup/cryptsetup-generator.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index 81b7708..967c5e6 100644 ---- a/src/cryptsetup/cryptsetup-generator.c -+++ b/src/cryptsetup/cryptsetup-generator.c -@@ -72,13 +72,20 @@ static int create_disk( - - _cleanup_free_ char *p = NULL, *n = NULL, *d = NULL, *u = NULL, *from = NULL, *to = NULL, *e = NULL; - _cleanup_fclose_ FILE *f = NULL; -- bool noauto, nofail; -+ bool noauto, nofail, tmp, swap; - - assert(name); - assert(device); - - noauto = has_option(options, "noauto"); - nofail = has_option(options, "nofail"); -+ tmp = has_option(options, "tmp"); -+ swap = has_option(options, "swap"); -+ -+ if (tmp && swap) { -+ log_error("Device '%s' cannot be both 'tmp' and 'swap'. Ignoring.", name); -+ return -EINVAL; -+ } - - n = unit_name_from_path_instance("systemd-cryptsetup", name, ".service"); - if (!n) -@@ -151,12 +158,12 @@ static int create_disk( - name, u, strempty(password), strempty(options), - name); - -- if (has_option(options, "tmp")) -+ if (tmp) - fprintf(f, - "ExecStartPost=/sbin/mke2fs '/dev/mapper/%s'\n", - name); - -- if (has_option(options, "swap")) -+ if (swap) - fprintf(f, - "ExecStartPost=/sbin/mkswap '/dev/mapper/%s'\n", - name); diff --git a/SOURCES/0007-cryptsetup-generator-allow-specifying-options-in-pro.patch b/SOURCES/0007-cryptsetup-generator-allow-specifying-options-in-pro.patch deleted file mode 100644 index 98f140e..0000000 --- a/SOURCES/0007-cryptsetup-generator-allow-specifying-options-in-pro.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 61ca2800f3a1666478bdc01fc796d36c917a5032 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Sun, 18 Aug 2013 14:59:00 +0800 -Subject: [PATCH] cryptsetup-generator: allow specifying options in - /proc/cmdline -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The main usecase for this is to make it possible to use cryptsetup in -the initrd without it having to include a host-specific /etc/crypttab. - -Tested-by: Thomas Bächler ---- - man/systemd-cryptsetup-generator.xml | 23 ++++++++++ - src/cryptsetup/cryptsetup-generator.c | 79 +++++++++++++++++++++++++++++++++-- - 2 files changed, 98 insertions(+), 4 deletions(-) - -diff --git a/man/systemd-cryptsetup-generator.xml b/man/systemd-cryptsetup-generator.xml -index 215ac2d..d6b7e49 100644 ---- a/man/systemd-cryptsetup-generator.xml -+++ b/man/systemd-cryptsetup-generator.xml -@@ -137,6 +137,29 @@ - will be activated in the initrd or the real root. - - -+ -+ -+ luks.options= -+ rd.luks.options= -+ -+ Takes a LUKS super -+ block UUID followed by an '=' and a string -+ of options separated by commas as argument. -+ This will override the options for the given -+ UUID. -+ If only a list of options, without an -+ UUID, is specified, they apply to any UUIDs not -+ specified elsewhere, and without an entry in -+ /etc/crypttab. -+ rd.luks.options= -+ is honored only by initial RAM disk -+ (initrd) while -+ luks.options= is -+ honored by both the main system and -+ the initrd. -+ -+ -+ - - luks.key= - rd.luks.key= -diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index 967c5e6..ba6efa6 100644 ---- a/src/cryptsetup/cryptsetup-generator.c -+++ b/src/cryptsetup/cryptsetup-generator.c -@@ -240,7 +240,7 @@ static int create_disk( - return 0; - } - --static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cmdline_keyfile) { -+static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char ***arg_proc_cmdline_options, char **arg_proc_cmdline_keyfile) { - _cleanup_free_ char *line = NULL; - char *w = NULL, *state = NULL; - int r; -@@ -307,7 +307,20 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm - return log_oom(); - } - -+ } else if (startswith(word, "luks.options=")) { -+ if (strv_extend(arg_proc_cmdline_options, word + 13) < 0) -+ return log_oom(); -+ -+ } else if (startswith(word, "rd.luks.options=")) { -+ -+ if (in_initrd()) { -+ if (strv_extend(arg_proc_cmdline_options, word + 16) < 0) -+ return log_oom(); -+ } -+ - } else if (startswith(word, "luks.key=")) { -+ if (*arg_proc_cmdline_keyfile) -+ free(*arg_proc_cmdline_keyfile); - *arg_proc_cmdline_keyfile = strdup(word + 9); - if (!*arg_proc_cmdline_keyfile) - return log_oom(); -@@ -337,6 +350,7 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm - int main(int argc, char *argv[]) { - _cleanup_strv_free_ char **arg_proc_cmdline_disks_done = NULL; - _cleanup_strv_free_ char **arg_proc_cmdline_disks = NULL; -+ _cleanup_strv_free_ char **arg_proc_cmdline_options = NULL; - _cleanup_free_ char *arg_proc_cmdline_keyfile = NULL; - _cleanup_fclose_ FILE *f = NULL; - unsigned n = 0; -@@ -357,7 +371,7 @@ int main(int argc, char *argv[]) { - - umask(0022); - -- if (parse_proc_cmdline(&arg_proc_cmdline_disks, &arg_proc_cmdline_keyfile) < 0) -+ if (parse_proc_cmdline(&arg_proc_cmdline_disks, &arg_proc_cmdline_options, &arg_proc_cmdline_keyfile) < 0) - return EXIT_FAILURE; - - if (!arg_enabled) -@@ -412,6 +426,26 @@ int main(int argc, char *argv[]) { - continue; - } - -+ if (arg_proc_cmdline_options) { -+ /* -+ If options are specified on the kernel commandline, let them override -+ the ones from crypttab. -+ */ -+ STRV_FOREACH(i, arg_proc_cmdline_options) { -+ _cleanup_free_ char *proc_uuid = NULL, *proc_options = NULL; -+ const char *p = *i; -+ -+ k = sscanf(p, "%m[0-9a-fA-F-]=%ms", &proc_uuid, &proc_options); -+ if (k == 2 && streq(proc_uuid, device + 5)) { -+ if (options) -+ free(options); -+ options = strdup(p); -+ if (!proc_options) -+ return log_oom(); -+ } -+ } -+ } -+ - if (arg_proc_cmdline_disks) { - /* - If luks UUIDs are specified on the kernel command line, use them as a filter -@@ -452,7 +486,7 @@ next: - on the kernel command line and not yet written. - */ - -- _cleanup_free_ char *name = NULL, *device = NULL; -+ _cleanup_free_ char *name = NULL, *device = NULL, *options = NULL; - const char *p = *i; - - if (startswith(p, "luks-")) -@@ -467,7 +501,44 @@ next: - if (!name || !device) - return log_oom(); - -- if (create_disk(name, device, arg_proc_cmdline_keyfile, "timeout=0") < 0) -+ if (arg_proc_cmdline_options) { -+ /* -+ If options are specified on the kernel commandline, use them. -+ */ -+ char **j; -+ -+ STRV_FOREACH(j, arg_proc_cmdline_options) { -+ _cleanup_free_ char *proc_uuid = NULL, *proc_options = NULL; -+ const char *s = *j; -+ int k; -+ -+ k = sscanf(s, "%m[0-9a-fA-F-]=%ms", &proc_uuid, &proc_options); -+ if (k == 2) { -+ if (streq(proc_uuid, device + 5)) { -+ if (options) -+ free(options); -+ options = strdup(proc_options); -+ if (!options) -+ return log_oom(); -+ } -+ } else if (!options) { -+ /* -+ Fall back to options without a specified UUID -+ */ -+ options = strdup(s); -+ if (!options) -+ return log_oom(); -+ } -+ } -+ } -+ -+ if (!options) { -+ options = strdup("timeout=0"); -+ if (!options) -+ return log_oom(); -+ } -+ -+ if (create_disk(name, device, arg_proc_cmdline_keyfile, options) < 0) - r = EXIT_FAILURE; - } - 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-automount-rename-repeat_unmont-to-repeat_unmount.patch b/SOURCES/0008-automount-rename-repeat_unmont-to-repeat_unmount.patch deleted file mode 100644 index 7541077..0000000 --- a/SOURCES/0008-automount-rename-repeat_unmont-to-repeat_unmount.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 091169fa11a366ab42fb6f71c22e8ed95868f804 Mon Sep 17 00:00:00 2001 -From: David Mackey -Date: Thu, 12 Sep 2013 19:45:49 -0700 -Subject: [PATCH] automount: rename repeat_unmont to repeat_unmount - -Trivial cleanup of repeat_unmount() spelling. ---- - src/core/automount.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/core/automount.c b/src/core/automount.c -index a20d534..6762392 100644 ---- a/src/core/automount.c -+++ b/src/core/automount.c -@@ -66,7 +66,7 @@ static void automount_init(Unit *u) { - UNIT(a)->ignore_on_isolate = true; - } - --static void repeat_unmout(const char *path) { -+static void repeat_unmount(const char *path) { - assert(path); - - for (;;) { -@@ -100,7 +100,7 @@ static void unmount_autofs(Automount *a) { - if (a->where && - (UNIT(a)->manager->exit_code != MANAGER_RELOAD && - UNIT(a)->manager->exit_code != MANAGER_REEXECUTE)) -- repeat_unmout(a->where); -+ repeat_unmount(a->where); - } - - static void automount_done(Unit *u) { -@@ -575,7 +575,7 @@ fail: - close_nointr_nofail(ioctl_fd); - - if (mounted) -- repeat_unmout(a->where); -+ repeat_unmount(a->where); - - log_error_unit(UNIT(a)->id, - "Failed to initialize automounter: %s", strerror(-r)); 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-cgroup-add-the-missing-setting-of-variable-s-value.patch b/SOURCES/0009-cgroup-add-the-missing-setting-of-variable-s-value.patch deleted file mode 100644 index 2b0aafe..0000000 --- a/SOURCES/0009-cgroup-add-the-missing-setting-of-variable-s-value.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 8799f0a37ef24fe2709b6e7fdb4ca2c1c9586718 Mon Sep 17 00:00:00 2001 -From: Gao feng -Date: Fri, 13 Sep 2013 11:17:05 +0800 -Subject: [PATCH] cgroup: add the missing setting of variable's value - -set the value of variable "r" to the return value -of cg_set_attribute. ---- - src/core/cgroup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 513450a..9804227 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -264,7 +264,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha - log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); - - sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit); -- cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); -+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); - if (r < 0) - log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); - } 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-cgroup-correct-the-log-information.patch b/SOURCES/0010-cgroup-correct-the-log-information.patch deleted file mode 100644 index 2b7839b..0000000 --- a/SOURCES/0010-cgroup-correct-the-log-information.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 9b69c0d07b0db38c181e35e52bcea0eb0dd21818 Mon Sep 17 00:00:00 2001 -From: Gao feng -Date: Fri, 13 Sep 2013 11:17:06 +0800 -Subject: [PATCH] cgroup: correct the log information - -it should be memory.soft_limit_in_bytes. ---- - src/core/cgroup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 9804227..08cb64b 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -266,7 +266,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha - sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit); - r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); - if (r < 0) -- log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); -+ log_error("Failed to set memory.soft_limit_in_bytes on %s: %s", path, strerror(-r)); - } - - if (mask & CGROUP_DEVICE) { 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-cgroup-fix-incorrectly-setting-memory-cgroup.patch b/SOURCES/0011-cgroup-fix-incorrectly-setting-memory-cgroup.patch deleted file mode 100644 index 3f8b175..0000000 --- a/SOURCES/0011-cgroup-fix-incorrectly-setting-memory-cgroup.patch +++ /dev/null @@ -1,43 +0,0 @@ -From c7e5130d5b3983986bfe95918c75e083fa90dd47 Mon Sep 17 00:00:00 2001 -From: Gao feng -Date: Fri, 13 Sep 2013 14:43:04 +0800 -Subject: [PATCH] cgroup: fix incorrectly setting memory cgroup - -If the memory_limit of unit is -1, we should write "-1" -to the file memory.limit_in_bytes. not the (unit64_t) -1. - -otherwise the memory.limit_in_bytes will be set to zero. ---- - src/core/cgroup.c | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 08cb64b..1f41efc 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -257,14 +257,21 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha - - if (mask & CGROUP_MEMORY) { - char buf[DECIMAL_STR_MAX(uint64_t) + 1]; -+ if (c->memory_limit != (uint64_t) -1) { -+ sprintf(buf, "%" PRIu64 "\n", c->memory_limit); -+ r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf); -+ } else -+ r = cg_set_attribute("memory", path, "memory.limit_in_bytes", "-1"); - -- sprintf(buf, "%" PRIu64 "\n", c->memory_limit); -- r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf); - if (r < 0) - log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); - -- sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit); -- r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); -+ if (c->memory_soft_limit != (uint64_t) -1) { -+ sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit); -+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); -+ } else -+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", "-1"); -+ - if (r < 0) - log_error("Failed to set memory.soft_limit_in_bytes on %s: %s", path, strerror(-r)); - } 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-random-seed-we-should-return-errno-of-failed-loop_wr.patch b/SOURCES/0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch deleted file mode 100644 index 31317ef..0000000 --- a/SOURCES/0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 198884f22dc432a98e3d4423434b9e97d67f2da8 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 13 Sep 2013 14:12:55 +0200 -Subject: [PATCH] random-seed: we should return errno of failed loop_write - ---- - 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 4776c07..afbd500 100644 ---- a/src/random-seed/random-seed.c -+++ b/src/random-seed/random-seed.c -@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) { - r = loop_write(seed_fd, buf, (size_t) k, false); - if (r <= 0) { - log_error("Failed to write new random seed file: %s", r < 0 ? strerror(-r) : "short write"); -- r = k == 0 ? -EIO : (int) k; -+ r = r == 0 ? -EIO : r; - } - } - 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/0013-update-TODO.patch b/SOURCES/0013-update-TODO.patch deleted file mode 100644 index 53c15ec..0000000 --- a/SOURCES/0013-update-TODO.patch +++ /dev/null @@ -1,24 +0,0 @@ -From f11f72532fd9a05149714229cb7559b8e3fa802a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 13 Sep 2013 14:28:17 +0200 -Subject: [PATCH] update TODO - ---- - TODO | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/TODO b/TODO -index 5354692..9943b3e 100644 ---- a/TODO -+++ b/TODO -@@ -60,6 +60,10 @@ Features: - - * Move backlight and random-seed into /var/lib/systemd - -+* If we try to find a unit via a danglign symlink generate a clean -+ error. Currently we just ignore it and read the unit from the search -+ path anyway. -+ - * When a Type=forking service fails and needed another service that - service is not cleaned up again when it has StopWhenUnneeded=yes - http://lists.freedesktop.org/archives/systemd-devel/2013-July/012141.html diff --git a/SOURCES/0014-libudev-fix-move_later-comparison.patch b/SOURCES/0014-libudev-fix-move_later-comparison.patch deleted file mode 100644 index 4301b0c..0000000 --- a/SOURCES/0014-libudev-fix-move_later-comparison.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 3b93bf5a35b0bb7111754fbae75e7654b775506d Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 13 Sep 2013 14:12:54 +0200 -Subject: [PATCH] libudev: fix move_later comparison - -At the beginning move_later is set to -1, but it is set to different -value only if expression !move_later is true. ---- - src/libudev/libudev-enumerate.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c -index bc1e37d..8146f27 100644 ---- a/src/libudev/libudev-enumerate.c -+++ b/src/libudev/libudev-enumerate.c -@@ -300,7 +300,7 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume - /* skip to be delayed devices, and move the to - * the point where the prefix changes. We can - * only move one item at a time. */ -- if (!move_later) { -+ if (move_later == -1) { - move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath); - - if (move_later_prefix > 0) { 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-man-document-luks.options-kernel-commandline.patch b/SOURCES/0015-man-document-luks.options-kernel-commandline.patch deleted file mode 100644 index 542a589..0000000 --- a/SOURCES/0015-man-document-luks.options-kernel-commandline.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 583f4eb5d443bc09502d6973f08755173db43fd8 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Fri, 13 Sep 2013 21:03:55 +0200 -Subject: [PATCH] man: document luks.options kernel commandline - -This should have been part of commit 7ab064a6d ---- - man/kernel-command-line.xml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml -index a4b7d13..cc267a3 100644 ---- a/man/kernel-command-line.xml -+++ b/man/kernel-command-line.xml -@@ -250,6 +250,8 @@ - rd.luks.crypttab= - luks.uuid= - rd.luks.uuid= -+ luks.options= -+ rd.luks.options= - luks.key= - rd.luks.key= - 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-keymap-remove-some-commented-out-lines.patch b/SOURCES/0016-keymap-remove-some-commented-out-lines.patch deleted file mode 100644 index 0a5896d..0000000 --- a/SOURCES/0016-keymap-remove-some-commented-out-lines.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f559cb147ae336f62a9020fa909b70ea90e43886 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Wed, 28 Aug 2013 17:23:59 -0400 -Subject: [PATCH] keymap: remove some commented out lines - ---- - hwdb/60-keyboard.hwdb | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb -index eca3f55..53e83ad 100644 ---- a/hwdb/60-keyboard.hwdb -+++ b/hwdb/60-keyboard.hwdb -@@ -894,11 +894,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*200E[45]*:pvr* - # Series 5 - keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* - KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings --#KEYBOARD_KEY_89=!brightnessdown # Fn+F2 --#KEYBOARD_KEY_88=!brightnessup # Fn+F3 --#KEYBOARD_KEY_82=!switchvideomode # Fn+F4 video output --#KEYBOARD_KEY_f9=!f23 # Fn+F5 touchpad turn OFF --#KEYBOARD_KEY_f7=!f22 # Fn+F5 touchpad turn ON - KEYBOARD_KEY_a0=!mute # Fn+F6 mute - KEYBOARD_KEY_ae=!volumedown # Fn+F7 - KEYBOARD_KEY_b0=!volumeup # Fn+F8 -@@ -906,7 +901,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* - KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up - KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer - KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch --# KEYBOARD_KEY_ba=!ejectcd # Fn+DEL eject cd - - # Series 9 - keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr* 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-Advertise-hibernation-only-if-there-s-enough-free-sw.patch b/SOURCES/0017-Advertise-hibernation-only-if-there-s-enough-free-sw.patch deleted file mode 100644 index 3ce4abf..0000000 --- a/SOURCES/0017-Advertise-hibernation-only-if-there-s-enough-free-sw.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 3559039a97e1d3e28dd9b38202d3499652a58036 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Fri, 13 Sep 2013 19:41:52 -0400 -Subject: [PATCH] Advertise hibernation only if there's enough free swap - -Condition that is checked is taken from upower: - active(anon) < free swap * 0.98 - -This is really stupid, because the kernel knows the situation better, -e.g. there could be two swap files, and then hibernation would be -impossible despite passing this check, or the kernel could start -supporting compressed swap and/or compressed hibernation images, and -then this this check would be too stringent. Nevertheless, until -we have something better, this should at least return a true negative -if there's no swap. - -Logging of capabilities in the journal is changed to not strip leading -zeros. I consider this more readable anyway. - -http://cgit.freedesktop.org/upower/tree/src/up-daemon.c#n613 -https://bugzilla.redhat.com/show_bug.cgi?id=1007059 ---- - src/shared/fileio.c | 34 ++++++++++++++++++++++++++++++++++ - src/shared/fileio.h | 2 ++ - src/shared/logs-show.c | 2 +- - src/shared/sleep-config.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- - src/shared/util.c | 23 +---------------------- - src/test/test-fileio.c | 20 ++++++++++++++++++++ - src/test/test-sleep.c | 16 ++++++++-------- - 7 files changed, 110 insertions(+), 32 deletions(-) - -diff --git a/src/shared/fileio.c b/src/shared/fileio.c -index 77fd059..4e2b444 100644 ---- a/src/shared/fileio.c -+++ b/src/shared/fileio.c -@@ -648,3 +648,37 @@ int executable_is_script(const char *path, char **interpreter) { - *interpreter = ans; - return 1; - } -+ -+/** -+ * Retrieve one field from a file like /proc/self/status. -+ * pattern should start with '\n' and end with ':'. Whitespace -+ * after ':' will be skipped. field must be freed afterwards. -+ */ -+int get_status_field(const char *filename, const char *pattern, char **field) { -+ _cleanup_free_ char *status = NULL; -+ char *t; -+ size_t len; -+ int r; -+ -+ assert(filename); -+ assert(field); -+ -+ r = read_full_file(filename, &status, NULL); -+ if (r < 0) -+ return r; -+ -+ t = strstr(status, pattern); -+ if (!t) -+ return -ENOENT; -+ -+ t += strlen(pattern); -+ t += strspn(t, WHITESPACE); -+ -+ len = strcspn(t, WHITESPACE); -+ -+ *field = strndup(t, len); -+ if (!*field) -+ return -ENOMEM; -+ -+ return 0; -+} -diff --git a/src/shared/fileio.h b/src/shared/fileio.h -index a0aae28..59e4150 100644 ---- a/src/shared/fileio.h -+++ b/src/shared/fileio.h -@@ -37,3 +37,5 @@ int load_env_file(const char *fname, const char *separator, char ***l); - int write_env_file(const char *fname, char **l); - - int executable_is_script(const char *path, char **interpreter); -+ -+int get_status_field(const char *filename, const char *pattern, char **field); -diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c -index 87633e7..f50777c 100644 ---- a/src/shared/logs-show.c -+++ b/src/shared/logs-show.c -@@ -201,7 +201,7 @@ static int output_short( - assert(j); - - /* Set the threshold to one bigger than the actual print -- * treshold, so that if the line is actually longer than what -+ * threshold, so that if the line is actually longer than what - * we're willing to print, ellipsization will occur. This way - * we won't output a misleading line without any indication of - * truncation. -diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c -index cd3238b..5ec7cce 100644 ---- a/src/shared/sleep-config.c -+++ b/src/shared/sleep-config.c -@@ -163,6 +163,46 @@ int can_sleep_disk(char **types) { - return false; - } - -+#define HIBERNATION_SWAP_THRESHOLD 0.98 -+ -+static bool enough_memory_for_hibernation(void) { -+ _cleanup_free_ char *active = NULL, *swapfree = NULL; -+ unsigned long long act, swap; -+ int r; -+ -+ r = get_status_field("/proc/meminfo", "\nSwapFree:", &swapfree); -+ if (r < 0) { -+ log_error("Failed to retrieve SwapFree from /proc/meminfo: %s", strerror(-r)); -+ return false; -+ } -+ -+ r = safe_atollu(swapfree, &swap); -+ if (r < 0) { -+ log_error("Failed to parse SwapFree from /proc/meminfo: %s: %s", -+ swapfree, strerror(-r)); -+ return false; -+ } -+ -+ r = get_status_field("/proc/meminfo", "\nActive(anon):", &active); -+ if (r < 0) { -+ log_error("Failed to retrieve Active(anon) from /proc/meminfo: %s", strerror(-r)); -+ return false; -+ } -+ -+ r = safe_atollu(active, &act); -+ if (r < 0) { -+ log_error("Failed to parse Active(anon) from /proc/meminfo: %s: %s", -+ active, strerror(-r)); -+ return false; -+ } -+ -+ r = act <= swap * HIBERNATION_SWAP_THRESHOLD; -+ log_debug("Hibernation is %spossible, Active(anon)=%llu kB, SwapFree=%llu kB, threshold=%.2g%%", -+ r ? "" : "im", act, swap, 100*HIBERNATION_SWAP_THRESHOLD); -+ -+ return r; -+} -+ - int can_sleep(const char *verb) { - _cleanup_strv_free_ char **modes = NULL, **states = NULL; - int r; -@@ -175,5 +215,8 @@ int can_sleep(const char *verb) { - if (r < 0) - return false; - -- return can_sleep_state(states) && can_sleep_disk(modes); -+ if (!can_sleep_state(states) || !can_sleep_disk(modes)) -+ return false; -+ -+ return streq(verb, "suspend") || enough_memory_for_hibernation(); - } -diff --git a/src/shared/util.c b/src/shared/util.c -index 9a075fa..f6f3b18 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -694,9 +694,6 @@ int is_kernel_thread(pid_t pid) { - - int get_process_capeff(pid_t pid, char **capeff) { - const char *p; -- _cleanup_free_ char *status = NULL; -- char *t = NULL; -- int r; - - assert(capeff); - assert(pid >= 0); -@@ -706,25 +703,7 @@ int get_process_capeff(pid_t pid, char **capeff) { - else - p = procfs_file_alloca(pid, "status"); - -- r = read_full_file(p, &status, NULL); -- if (r < 0) -- return r; -- -- t = strstr(status, "\nCapEff:\t"); -- if (!t) -- return -ENOENT; -- -- for (t += strlen("\nCapEff:\t"); t[0] == '0'; t++) -- continue; -- -- if (t[0] == '\n') -- t--; -- -- *capeff = strndup(t, strchr(t, '\n') - t); -- if (!*capeff) -- return -ENOMEM; -- -- return 0; -+ return get_status_field(p, "\nCapEff:", capeff); - } - - int get_process_exe(pid_t pid, char **name) { -diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c -index 1184e7e..4a4ed79 100644 ---- a/src/test/test-fileio.c -+++ b/src/test/test-fileio.c -@@ -229,9 +229,29 @@ static void test_executable_is_script(void) { - unlink(t); - } - -+static void test_status_field(void) { -+ _cleanup_free_ char *t = NULL, *p = NULL, *s = NULL; -+ unsigned long long total, buffers; -+ -+ assert_se(get_status_field("/proc/self/status", "\nThreads:", &t) == 0); -+ puts(t); -+ assert_se(streq(t, "1")); -+ -+ assert_se(get_status_field("/proc/meminfo", "MemTotal:", &p) == 0); -+ puts(p); -+ assert_se(safe_atollu(p, &total) == 0); -+ -+ assert_se(get_status_field("/proc/meminfo", "\nBuffers:", &s) == 0); -+ puts(s); -+ assert_se(safe_atollu(s, &buffers) == 0); -+ -+ assert(buffers < total); -+} -+ - int main(int argc, char *argv[]) { - test_parse_env_file(); - test_parse_multiline_env_file(); - test_executable_is_script(); -+ test_status_field(); - return 0; - } -diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c -index c3cb9c5..545dfab 100644 ---- a/src/test/test-sleep.c -+++ b/src/test/test-sleep.c -@@ -40,14 +40,14 @@ int main(int argc, char* argv[]) { - **shutdown = strv_new("shutdown", NULL), - **freez = strv_new("freeze", NULL); - -- log_info("Can Standby: %s", yes_no(can_sleep_state(standby) > 0)); -- log_info("Can Suspend: %s", yes_no(can_sleep_state(mem) > 0)); -- log_info("Can Hibernate: %s", yes_no(can_sleep_state(disk) > 0)); -- log_info("Can Hibernate+Suspend (Hybrid-Sleep): %s", yes_no(can_sleep_disk(suspend) > 0)); -- log_info("Can Hibernate+Reboot: %s", yes_no(can_sleep_disk(reboot) > 0)); -- log_info("Can Hibernate+Platform: %s", yes_no(can_sleep_disk(platform) > 0)); -- log_info("Can Hibernate+Shutdown: %s", yes_no(can_sleep_disk(shutdown) > 0)); -- log_info("Can Freeze: %s", yes_no(can_sleep_disk(freez) > 0)); -+ log_info("Standby configured: %s", yes_no(can_sleep_state(standby) > 0)); -+ log_info("Suspend configured: %s", yes_no(can_sleep_state(mem) > 0)); -+ log_info("Hibernate configured: %s", yes_no(can_sleep_state(disk) > 0)); -+ log_info("Hibernate+Suspend (Hybrid-Sleep) configured: %s", yes_no(can_sleep_disk(suspend) > 0)); -+ log_info("Hibernate+Reboot configured: %s", yes_no(can_sleep_disk(reboot) > 0)); -+ log_info("Hibernate+Platform configured: %s", yes_no(can_sleep_disk(platform) > 0)); -+ log_info("Hibernate+Shutdown configured: %s", yes_no(can_sleep_disk(shutdown) > 0)); -+ log_info("Freeze configured: %s", yes_no(can_sleep_state(freez) > 0)); - - log_info("Suspend configured and possible: %s", yes_no(can_sleep("suspend") > 0)); - log_info("Hibernation configured and possible: %s", yes_no(can_sleep("hibernate") > 0)); 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-README-add-SCSI-BSG-option.patch b/SOURCES/0018-README-add-SCSI-BSG-option.patch deleted file mode 100644 index 0653ac8..0000000 --- a/SOURCES/0018-README-add-SCSI-BSG-option.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 64a94f1e45890eaeb5880dbd2044265e17023067 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 15 Sep 2013 07:29:25 +0200 -Subject: [PATCH] README: add SCSI BSG option - ---- - README | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/README b/README -index a16f342..b39cd37 100644 ---- a/README -+++ b/README -@@ -64,6 +64,10 @@ REQUIREMENTS: - Mount and bind mount handling might require it: - CONFIG_FHANDLE - -+ Support for some SCSI devices serial number retrieval, to -+ create additional symlinks in /dev/disk/ and /dev/tape: -+ CONFIG_BLK_DEV_BSG -+ - Optional but strongly recommended: - CONFIG_IPV6 - CONFIG_AUTOFS4_FS 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/0019-swap-create-.wants-symlink-to-auto-swap-devices.patch b/SOURCES/0019-swap-create-.wants-symlink-to-auto-swap-devices.patch deleted file mode 100644 index 0c3dd14..0000000 --- a/SOURCES/0019-swap-create-.wants-symlink-to-auto-swap-devices.patch +++ /dev/null @@ -1,87 +0,0 @@ -From c1f9c15f319f7dfb96bcbf2c3cf879f2b4457350 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Mon, 16 Sep 2013 01:08:32 +0200 -Subject: [PATCH] swap: create .wants symlink to 'auto' swap devices - -As we load unit files lazily, we need to make sure something pulls in swap -units that should be started automatically, otherwise the default dependencies -will never be applied. - -This partially reinstates code removed in -commit 64347fc2b983f33e7efb0fd2bb44e133fb9f30f4. - -Also don't order swap devices after swap.target when they are 'nofail'. ---- - src/core/swap.c | 8 ++++++-- - src/fstab-generator/fstab-generator.c | 18 ++++++++++++++++-- - 2 files changed, 22 insertions(+), 4 deletions(-) - -diff --git a/src/core/swap.c b/src/core/swap.c -index 3950860..76c7d45 100644 ---- a/src/core/swap.c -+++ b/src/core/swap.c -@@ -220,8 +220,12 @@ static int swap_add_default_dependencies(Swap *s) { - } - - if (!noauto) { -- r = unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, (nofail ? UNIT_WANTS : UNIT_REQUIRES), -- SPECIAL_SWAP_TARGET, NULL, true); -+ if (nofail) -+ r = unit_add_dependency_by_name_inverse(UNIT(s), -+ UNIT_WANTS, SPECIAL_SWAP_TARGET, NULL, true); -+ else -+ r = unit_add_two_dependencies_by_name_inverse(UNIT(s), -+ UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SWAP_TARGET, NULL, true); - if (r < 0) - return r; - } -diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c -index 6ebe8aa..b73dfa4 100644 ---- a/src/fstab-generator/fstab-generator.c -+++ b/src/fstab-generator/fstab-generator.c -@@ -66,6 +66,7 @@ static int mount_find_pri(struct mntent *me, int *ret) { - static int add_swap(const char *what, struct mntent *me) { - _cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL; - _cleanup_fclose_ FILE *f = NULL; -+ bool noauto; - int r, pri = -1; - - assert(what); -@@ -77,6 +78,8 @@ static int add_swap(const char *what, struct mntent *me) { - return pri; - } - -+ noauto = !!hasmntopt(me, "noauto"); -+ - name = unit_name_from_path(what, ".swap"); - if (!name) - return log_oom(); -@@ -97,8 +100,7 @@ static int add_swap(const char *what, struct mntent *me) { - fprintf(f, - "# Automatically generated by systemd-fstab-generator\n\n" - "[Unit]\n" -- "SourcePath=/etc/fstab\n" -- "\n" -+ "SourcePath=/etc/fstab\n\n" - "[Swap]\n" - "What=%s\n", - what); -@@ -114,6 +116,18 @@ static int add_swap(const char *what, struct mntent *me) { - return -errno; - } - -+ if (!noauto) { -+ lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL); -+ if (!lnk) -+ return log_oom(); -+ -+ mkdir_parents_label(lnk, 0755); -+ if (symlink(unit, lnk) < 0) { -+ log_error("Failed to create symlink %s: %m", lnk); -+ return -errno; -+ } -+ } -+ - return 0; - } - diff --git a/SOURCES/0020-cgroup-add-missing-equals-for-BlockIOWeight.patch b/SOURCES/0020-cgroup-add-missing-equals-for-BlockIOWeight.patch deleted file mode 100644 index b8d63a7..0000000 --- a/SOURCES/0020-cgroup-add-missing-equals-for-BlockIOWeight.patch +++ /dev/null @@ -1,22 +0,0 @@ -From f93999bbdbc9e16322d77bda2a4e44c20040808d Mon Sep 17 00:00:00 2001 -From: Gao feng -Date: Mon, 16 Sep 2013 09:57:33 +0800 -Subject: [PATCH] cgroup: add missing equals for BlockIOWeight - ---- - src/core/cgroup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 1f41efc..9277dd6 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -92,7 +92,7 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) { - "%sBlockIOAccounting=%s\n" - "%sMemoryAccounting=%s\n" - "%sCPUShares=%lu\n" -- "%sBlockIOWeight%lu\n" -+ "%sBlockIOWeight=%lu\n" - "%sMemoryLimit=%" PRIu64 "\n" - "%sMemorySoftLimit=%" PRIu64 "\n" - "%sDevicePolicy=%s\n", 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-Assume-that-proc-meminfo-can-be-missing.patch b/SOURCES/0021-Assume-that-proc-meminfo-can-be-missing.patch deleted file mode 100644 index e834c09..0000000 --- a/SOURCES/0021-Assume-that-proc-meminfo-can-be-missing.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0fdb6640bb9de89ca739676bbbb43d3a05a42f50 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sun, 15 Sep 2013 08:40:16 -0400 -Subject: [PATCH] Assume that /proc/meminfo can be missing - -Travis tests are failing, probably because /proc/meminfo is not available -in the test environment. The same might be true in some virtualized systems, -so just treat missing /proc/meminfo as a sign that hibernation is not -possible. ---- - src/shared/sleep-config.c | 3 ++- - src/test/test-fileio.c | 6 +++++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c -index 5ec7cce..148c4dc 100644 ---- a/src/shared/sleep-config.c -+++ b/src/shared/sleep-config.c -@@ -172,7 +172,8 @@ static bool enough_memory_for_hibernation(void) { - - r = get_status_field("/proc/meminfo", "\nSwapFree:", &swapfree); - if (r < 0) { -- log_error("Failed to retrieve SwapFree from /proc/meminfo: %s", strerror(-r)); -+ log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, -+ "Failed to retrieve SwapFree from /proc/meminfo: %s", strerror(-r)); - return false; - } - -diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c -index 4a4ed79..3511f3a 100644 ---- a/src/test/test-fileio.c -+++ b/src/test/test-fileio.c -@@ -232,12 +232,16 @@ static void test_executable_is_script(void) { - static void test_status_field(void) { - _cleanup_free_ char *t = NULL, *p = NULL, *s = NULL; - unsigned long long total, buffers; -+ int r; - - assert_se(get_status_field("/proc/self/status", "\nThreads:", &t) == 0); - puts(t); - assert_se(streq(t, "1")); - -- assert_se(get_status_field("/proc/meminfo", "MemTotal:", &p) == 0); -+ r = get_status_field("/proc/meminfo", "MemTotal:", &p); -+ if (r == -ENOENT) -+ return; -+ assert(r == 0); - puts(p); - assert_se(safe_atollu(p, &total) == 0); - 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-transaction.c-do-not-point-users-to-logs-when-unit-n.patch b/SOURCES/0022-transaction.c-do-not-point-users-to-logs-when-unit-n.patch deleted file mode 100644 index e3555ef..0000000 --- a/SOURCES/0022-transaction.c-do-not-point-users-to-logs-when-unit-n.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a38c3d5d4e94c7e11db1ca22126bb11c6b029886 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sun, 15 Sep 2013 12:15:38 -0400 -Subject: [PATCH] transaction.c: do not point users to logs when unit not found - -The logs are unlikely to contain any useful information in this case. - -Also, change "walked on cycle path" to "found dependency on", which -is less technical and indicates the direction. With the old message, -I was never sure if prior units depended on later ones, or vice versa. - -https://bugzilla.redhat.com/show_bug.cgi?id=996133 -https://bugzilla.redhat.com/show_bug.cgi?id=997082 ---- - src/core/transaction.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/core/transaction.c b/src/core/transaction.c -index 27efef7..203070f 100644 ---- a/src/core/transaction.c -+++ b/src/core/transaction.c -@@ -344,7 +344,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi - assert(!j->transaction_prev); - - /* Does a recursive sweep through the ordering graph, looking -- * for a cycle. If we find cycle we try to break it. */ -+ * for a cycle. If we find a cycle we try to break it. */ - - /* Have we seen this before? */ - if (j->generation == generation) { -@@ -371,7 +371,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi - - /* logging for j not k here here to provide consistent narrative */ - log_info_unit(j->unit->id, -- "Walked on cycle path to %s/%s", -+ "Found dependency on %s/%s", - k->unit->id, job_type_to_string(k->type)); - - if (!delete && -@@ -860,7 +860,7 @@ int transaction_add_job_and_dependencies( - return -EINVAL; - } - -- if (type != JOB_STOP && (unit->load_state == UNIT_ERROR || unit->load_state == UNIT_NOT_FOUND)) { -+ if (type != JOB_STOP && unit->load_state == UNIT_ERROR) { - dbus_set_error(e, BUS_ERROR_LOAD_FAILED, - "Unit %s failed to load: %s. " - "See system logs and 'systemctl status %s' for details.", -@@ -870,6 +870,14 @@ int transaction_add_job_and_dependencies( - return -EINVAL; - } - -+ if (type != JOB_STOP && unit->load_state == UNIT_NOT_FOUND) { -+ dbus_set_error(e, BUS_ERROR_LOAD_FAILED, -+ "Unit %s failed to load: %s.", -+ unit->id, -+ strerror(-unit->load_error)); -+ return -EINVAL; -+ } -+ - if (type != JOB_STOP && unit->load_state == UNIT_MASKED) { - dbus_set_error(e, BUS_ERROR_MASKED, "Unit %s is masked.", unit->id); - return -EADDRNOTAVAIL; 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-Verify-validity-of-session-name-when-received-from-o.patch b/SOURCES/0023-Verify-validity-of-session-name-when-received-from-o.patch deleted file mode 100644 index d13a554..0000000 --- a/SOURCES/0023-Verify-validity-of-session-name-when-received-from-o.patch +++ /dev/null @@ -1,283 +0,0 @@ -From 45f0d8e103c57e9e5e9d92bba1dc2d50b49806de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sun, 15 Sep 2013 22:26:56 -0400 -Subject: [PATCH] Verify validity of session name when received from outside - -Only ASCII letters and digits are allowed. ---- - Makefile.am | 14 +++++++++++--- - TODO | 3 --- - src/login/login-shared.c | 8 ++++++++ - src/login/login-shared.h | 3 +++ - src/login/logind-dbus.c | 1 + - src/login/logind-session.c | 1 + - src/login/logind-session.h | 1 + - src/login/logind.c | 6 ++++++ - src/login/sd-login.c | 12 +++++++----- - src/shared/cgroup-util.c | 4 +--- - src/shared/def.h | 5 +++++ - src/shared/env-util.c | 5 ++--- - src/shared/replace-var.c | 3 ++- - src/shared/unit-name.c | 5 ++--- - 14 files changed, 50 insertions(+), 21 deletions(-) - create mode 100644 src/login/login-shared.c - create mode 100644 src/login/login-shared.h - -diff --git a/Makefile.am b/Makefile.am -index 7b7539a..6014521 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2324,7 +2324,10 @@ if HAVE_ACL - libudev_core_la_SOURCES += \ - src/udev/udev-builtin-uaccess.c \ - src/login/logind-acl.c \ -- src/login/sd-login.c -+ src/login/sd-login.c \ -+ src/systemd/sd-login.h \ -+ src/login/login-shared.c \ -+ src/login/login-shared.h - - libudev_core_la_LIBADD += \ - libsystemd-acl.la -@@ -3759,7 +3762,9 @@ libsystemd_logind_core_la_SOURCES = \ - src/login/logind-session-dbus.c \ - src/login/logind-seat-dbus.c \ - src/login/logind-user-dbus.c \ -- src/login/logind-acl.h -+ src/login/logind-acl.h \ -+ src/login/login-shared.c \ -+ src/login/login-shared.h - - libsystemd_logind_core_la_CFLAGS = \ - $(AM_CFLAGS) \ -@@ -3860,7 +3865,10 @@ tests += \ - test-login-tables - - libsystemd_login_la_SOURCES = \ -- src/login/sd-login.c -+ src/login/sd-login.c \ -+ src/systemd/sd-login.h \ -+ src/login/login-shared.c \ -+ src/login/login-shared.h - - libsystemd_login_la_CFLAGS = \ - $(AM_CFLAGS) \ -diff --git a/TODO b/TODO -index 9943b3e..bfeaa81 100644 ---- a/TODO -+++ b/TODO -@@ -142,9 +142,6 @@ Features: - - * journald: make sure ratelimit is actually really per-service with the new cgroup changes - --* libsystemd-logind: sd_session_is_active() and friends: verify -- validity of session name before appending it to a path -- - * gparted needs to disable auto-activation of mount units somehow, or - maybe we should stop doing auto-activation of this after boot - entirely. https://bugzilla.gnome.org/show_bug.cgi?id=701676 -diff --git a/src/login/login-shared.c b/src/login/login-shared.c -new file mode 100644 -index 0000000..ff13c28 ---- /dev/null -+++ b/src/login/login-shared.c -@@ -0,0 +1,8 @@ -+#include "login-shared.h" -+#include "def.h" -+ -+bool session_id_valid(const char *id) { -+ assert(id); -+ -+ return id + strspn(id, LETTERS DIGITS) == '\0'; -+} -diff --git a/src/login/login-shared.h b/src/login/login-shared.h -new file mode 100644 -index 0000000..728ef00 ---- /dev/null -+++ b/src/login/login-shared.h -@@ -0,0 +1,3 @@ -+#include -+ -+bool session_id_valid(const char *id); -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 345df9f..d052e74 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -554,6 +554,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) { - * the audit data and let's better register a new - * ID */ - if (hashmap_get(m->sessions, id)) { -+ log_warning("Existing logind session ID %s used by new audit session, ignoring", id); - audit_id = 0; - - free(id); -diff --git a/src/login/logind-session.c b/src/login/logind-session.c -index a726fb1..2d22a68 100644 ---- a/src/login/logind-session.c -+++ b/src/login/logind-session.c -@@ -41,6 +41,7 @@ Session* session_new(Manager *m, const char *id) { - - assert(m); - assert(id); -+ assert(session_id_valid(id)); - - s = new0(Session, 1); - if (!s) -diff --git a/src/login/logind-session.h b/src/login/logind-session.h -index edaae8d..9cf6485 100644 ---- a/src/login/logind-session.h -+++ b/src/login/logind-session.h -@@ -29,6 +29,7 @@ typedef enum KillWho KillWho; - #include "logind.h" - #include "logind-seat.h" - #include "logind-user.h" -+#include "login-shared.h" - - typedef enum SessionState { - SESSION_OPENING, /* Session scope is being created */ -diff --git a/src/login/logind.c b/src/login/logind.c -index 9094567..4ef92b8 100644 ---- a/src/login/logind.c -+++ b/src/login/logind.c -@@ -684,6 +684,12 @@ int manager_enumerate_sessions(Manager *m) { - if (!dirent_is_file(de)) - continue; - -+ if (!session_id_valid(de->d_name)) { -+ log_warning("Invalid session file name '%s', ignoring.", de->d_name); -+ r = -EINVAL; -+ continue; -+ } -+ - k = manager_add_session(m, de->d_name, &s); - if (k < 0) { - log_error("Failed to add session by file name %s: %s", de->d_name, strerror(-k)); -diff --git a/src/login/sd-login.c b/src/login/sd-login.c -index 8a7838d..71d8c29 100644 ---- a/src/login/sd-login.c -+++ b/src/login/sd-login.c -@@ -31,6 +31,7 @@ - #include "sd-login.h" - #include "strv.h" - #include "fileio.h" -+#include "login-shared.h" - - _public_ int sd_pid_get_session(pid_t pid, char **session) { - if (pid < 0) -@@ -226,17 +227,19 @@ static int file_of_session(const char *session, char **_p) { - - assert(_p); - -- if (session) -+ if (session) { -+ if (!session_id_valid(session)) -+ return -EINVAL; -+ - p = strappend("/run/systemd/sessions/", session); -- else { -- char *buf; -+ } else { -+ _cleanup_free_ char *buf = NULL; - - r = sd_pid_get_session(0, &buf); - if (r < 0) - return r; - - p = strappend("/run/systemd/sessions/", buf); -- free(buf); - } - - if (!p) -@@ -255,7 +258,6 @@ _public_ int sd_session_is_active(const char *session) { - return r; - - r = parse_env_file(p, NEWLINE, "ACTIVE", &s, NULL); -- - if (r < 0) - return r; - -diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c -index 1d545e0..0bffebd 100644 ---- a/src/shared/cgroup-util.c -+++ b/src/shared/cgroup-util.c -@@ -1511,9 +1511,7 @@ char *cg_unescape(const char *p) { - } - - #define CONTROLLER_VALID \ -- "0123456789" \ -- "abcdefghijklmnopqrstuvwxyz" \ -- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ -+ DIGITS LETTERS \ - "_" - - bool cg_controller_is_valid(const char *p, bool allow_named) { -diff --git a/src/shared/def.h b/src/shared/def.h -index 5abb544..edd0bcf 100644 ---- a/src/shared/def.h -+++ b/src/shared/def.h -@@ -33,3 +33,8 @@ - - #define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT - #define SIGNALS_IGNORE SIGPIPE -+ -+#define DIGITS "0123456789" -+#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz" -+#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -+#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS -diff --git a/src/shared/env-util.c b/src/shared/env-util.c -index 6a52fb9..5e29629 100644 ---- a/src/shared/env-util.c -+++ b/src/shared/env-util.c -@@ -27,11 +27,10 @@ - #include "utf8.h" - #include "util.h" - #include "env-util.h" -+#include "def.h" - - #define VALID_CHARS_ENV_NAME \ -- "0123456789" \ -- "abcdefghijklmnopqrstuvwxyz" \ -- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ -+ DIGITS LETTERS \ - "_" - - #ifndef ARG_MAX -diff --git a/src/shared/replace-var.c b/src/shared/replace-var.c -index e11c57a..478fc43 100644 ---- a/src/shared/replace-var.c -+++ b/src/shared/replace-var.c -@@ -24,6 +24,7 @@ - #include "macro.h" - #include "util.h" - #include "replace-var.h" -+#include "def.h" - - /* - * Generic infrastructure for replacing @FOO@ style variables in -@@ -40,7 +41,7 @@ static int get_variable(const char *b, char **r) { - if (*b != '@') - return 0; - -- k = strspn(b + 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"); -+ k = strspn(b + 1, UPPERCASE_LETTERS "_"); - if (k <= 0 || b[k+1] != '@') - return 0; - -diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c -index 1baa6eb..8f6c28e 100644 ---- a/src/shared/unit-name.c -+++ b/src/shared/unit-name.c -@@ -26,11 +26,10 @@ - #include "path-util.h" - #include "util.h" - #include "unit-name.h" -+#include "def.h" - - #define VALID_CHARS \ -- "0123456789" \ -- "abcdefghijklmnopqrstuvwxyz" \ -- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ -+ DIGITS LETTERS \ - ":-_.\\" - - static const char* const unit_type_table[_UNIT_TYPE_MAX] = { 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/0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch b/SOURCES/0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch deleted file mode 100644 index a1145df..0000000 --- a/SOURCES/0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c4f1b97f45f1685c0a4bcba8c6724ce17bb6af19 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Mon, 16 Sep 2013 11:22:35 -0400 -Subject: [PATCH] udev-rules: avoid erroring on trailing whitespace - -https://bugs.archlinux.org/task/36950 ---- - src/udev/udev-rules.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index f14158b..6f8b127 100644 ---- a/src/udev/udev-rules.c -+++ b/src/udev/udev-rules.c -@@ -1068,6 +1068,12 @@ static int add_rule(struct udev_rules *rules, char *line, - enum operation_type op; - - if (get_key(rules->udev, &linepos, &key, &op, &value) != 0) { -+ /* Avoid erroring on trailing whitespace. This is probably rare -+ * so save the work for the error case instead of always trying -+ * to strip the trailing whitespace with strstrip(). */ -+ while (isblank(*linepos)) -+ linepos++; -+ - /* If we aren't at the end of the line, this is a parsing error. - * Make a best effort to describe where the problem is. */ - if (*linepos != '\n') { diff --git a/SOURCES/0025-keymap-Add-Samsung-Series-5-Ultra.patch b/SOURCES/0025-keymap-Add-Samsung-Series-5-Ultra.patch deleted file mode 100644 index 7004c85..0000000 --- a/SOURCES/0025-keymap-Add-Samsung-Series-5-Ultra.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 3d2b4b62bfc73a38dce90be5cebdc924db42f63c Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Mon, 16 Sep 2013 14:25:44 -0500 -Subject: [PATCH] keymap: Add Samsung Series 5 [Ultra] - -Also consolidate the wlan key into the "all Samsung" rule to avoid repetition. - -Thanks to Mauro Carvalho Chehab! - -https://bugzilla.redhat.com/show_bug.cgi?id=989103 ---- - hwdb/60-keyboard.hwdb | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb -index 53e83ad..3862b4c 100644 ---- a/hwdb/60-keyboard.hwdb -+++ b/hwdb/60-keyboard.hwdb -@@ -882,6 +882,8 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn* - KEYBOARD_KEY_b1=!prog2 # Fn+F7 run Samsung Magic Doctor (keypressed event is generated twice) - KEYBOARD_KEY_b3=!prog3 # Fn+F8 switch power mode (battery/dynamic/performance) - KEYBOARD_KEY_b4=!wlan # Fn+F9 (X60P) -+ KEYBOARD_KEY_c5=!prog3 # Fn+F8 switch power mode (battery/dynamic/performance) -+ KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch - KEYBOARD_KEY_f7=!f22 # Fn+F10 Touchpad on - KEYBOARD_KEY_f9=!f23 # Fn+F10 Touchpad off - -@@ -889,9 +891,18 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn* - keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*300E[457]*:pvr* - keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*200E[45]*:pvr* - KEYBOARD_KEY_ce=! # Fn+F1 launch control setting -- KEYBOARD_KEY_d5=! # Fn+F12 Wi-Fi toggle - - # Series 5 -+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*530U*:pvr* -+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings -+ KEYBOARD_KEY_a8=! # Fn Lock - Function lock on -+ KEYBOARD_KEY_a9=! # Fn Lock - Function lock off -+ -+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr* -+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings -+ KEYBOARD_KEY_a8=! # Fn Lock - Function lock on -+ 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_KEY_ce=!prog1 # Fn+F1 launch settings - KEYBOARD_KEY_a0=!mute # Fn+F6 mute -@@ -900,7 +911,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr* - KEYBOARD_KEY_97=!kbdillumdown # Fn+F9 keyboard backlight down - KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up - KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer -- KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch - - # Series 9 - keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr* -@@ -936,9 +946,6 @@ 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*700T*:pvr* - KEYBOARD_KEY_ad=leftmeta - --keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn535U*:pvr* -- KEYBOARD_KEY_d5=!wlan -- - ########################################################### - # SONY - ########################################################### 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/0026-login-fix-login_is_valid-test.patch b/SOURCES/0026-login-fix-login_is_valid-test.patch deleted file mode 100644 index 2d2a8eb..0000000 --- a/SOURCES/0026-login-fix-login_is_valid-test.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 87e08d21857b2b2e59f3480e6d0538b535a5897c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 16 Sep 2013 11:04:20 -0500 -Subject: [PATCH] login: fix login_is_valid test - ---- - Makefile.am | 10 +++++++++- - src/login/login-shared.c | 23 ++++++++++++++++++++++- - src/login/login-shared.h | 21 +++++++++++++++++++++ - src/login/test-login-shared.c | 38 ++++++++++++++++++++++++++++++++++++++ - 4 files changed, 90 insertions(+), 2 deletions(-) - create mode 100644 src/login/test-login-shared.c - -diff --git a/Makefile.am b/Makefile.am -index 6014521..eae001b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -3836,6 +3836,13 @@ test_login_LDADD = \ - libsystemd-login-internal.la \ - libsystemd-shared.la - -+test_login_shared_SOURCES = \ -+ src/login/test-login-shared.c -+ -+test_login_shared_LDADD = \ -+ libsystemd-login-internal.la \ -+ libsystemd-shared.la -+ - test_inhibit_SOURCES = \ - src/login/test-inhibit.c - -@@ -3862,7 +3869,8 @@ manual_tests += \ - test-inhibit - - tests += \ -- test-login-tables -+ test-login-tables \ -+ test-login-shared - - libsystemd_login_la_SOURCES = \ - src/login/sd-login.c \ -diff --git a/src/login/login-shared.c b/src/login/login-shared.c -index ff13c28..054c775 100644 ---- a/src/login/login-shared.c -+++ b/src/login/login-shared.c -@@ -1,8 +1,29 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ 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 "login-shared.h" - #include "def.h" - - bool session_id_valid(const char *id) { - assert(id); - -- return id + strspn(id, LETTERS DIGITS) == '\0'; -+ return id[0] && id[strspn(id, LETTERS DIGITS)] == '\0'; - } -diff --git a/src/login/login-shared.h b/src/login/login-shared.h -index 728ef00..b2787c9 100644 ---- a/src/login/login-shared.h -+++ b/src/login/login-shared.h -@@ -1,3 +1,24 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ 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 - - bool session_id_valid(const char *id); -diff --git a/src/login/test-login-shared.c b/src/login/test-login-shared.c -new file mode 100644 -index 0000000..2df6029 ---- /dev/null -+++ b/src/login/test-login-shared.c -@@ -0,0 +1,38 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ 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 "macro.h" -+#include "login-shared.h" -+ -+static void test_session_id_valid(void) { -+ assert_se(session_id_valid("c1")); -+ assert_se(session_id_valid("1234")); -+ -+ assert_se(!session_id_valid("1-2")); -+ assert_se(!session_id_valid("")); -+ assert_se(!session_id_valid("\tid")); -+} -+ -+int main(int argc, char* argv[]) { -+ test_session_id_valid(); -+ -+ return 0; -+} 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/0027-polkit-Avoid-race-condition-in-scraping-proc.patch b/SOURCES/0027-polkit-Avoid-race-condition-in-scraping-proc.patch deleted file mode 100644 index b1b1cc3..0000000 --- a/SOURCES/0027-polkit-Avoid-race-condition-in-scraping-proc.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 88e8824997b26b821530384bb944e15a63e81301 Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Thu, 22 Aug 2013 13:55:21 -0400 -Subject: [PATCH] polkit: Avoid race condition in scraping /proc - -If a calling process execve()s a setuid program, it can appear to be -uid 0. Since we're receiving requests over DBus, avoid this by simply -passing system-bus-name as a subject. - -https://bugzilla.redhat.com/show_bug.cgi?id=1005142 ---- - src/shared/polkit.c | 31 +++++-------------------------- - 1 file changed, 5 insertions(+), 26 deletions(-) - -diff --git a/src/shared/polkit.c b/src/shared/polkit.c -index cea7074..1c5e9e3 100644 ---- a/src/shared/polkit.c -+++ b/src/shared/polkit.c -@@ -38,12 +38,8 @@ int verify_polkit( - - #ifdef ENABLE_POLKIT - DBusMessage *m = NULL, *reply = NULL; -- const char *unix_process = "unix-process", *pid = "pid", *starttime = "start-time", *cancel_id = ""; -+ const char *system_bus_name = "system-bus-name", *name = "name", *cancel_id = ""; - uint32_t flags = interactive ? 1 : 0; -- pid_t pid_raw; -- uint32_t pid_u32; -- unsigned long long starttime_raw; -- uint64_t starttime_u64; - DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant; - int r; - dbus_bool_t authorized = FALSE, challenge = FALSE; -@@ -68,14 +64,6 @@ int verify_polkit( - - #ifdef ENABLE_POLKIT - -- pid_raw = bus_get_unix_process_id(c, sender, error); -- if (pid_raw == 0) -- return -EINVAL; -- -- r = get_starttime_of_pid(pid_raw, &starttime_raw); -- if (r < 0) -- return r; -- - m = dbus_message_new_method_call( - "org.freedesktop.PolicyKit1", - "/org/freedesktop/PolicyKit1/Authority", -@@ -86,22 +74,13 @@ int verify_polkit( - - dbus_message_iter_init_append(m, &iter_msg); - -- pid_u32 = (uint32_t) pid_raw; -- starttime_u64 = (uint64_t) starttime_raw; -- - if (!dbus_message_iter_open_container(&iter_msg, DBUS_TYPE_STRUCT, NULL, &iter_struct) || -- !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &unix_process) || -+ !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &system_bus_name) || - !dbus_message_iter_open_container(&iter_struct, DBUS_TYPE_ARRAY, "{sv}", &iter_array) || - !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) || -- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &pid) || -- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "u", &iter_variant) || -- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT32, &pid_u32) || -- !dbus_message_iter_close_container(&iter_dict, &iter_variant) || -- !dbus_message_iter_close_container(&iter_array, &iter_dict) || -- !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) || -- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &starttime) || -- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "t", &iter_variant) || -- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT64, &starttime_u64) || -+ !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &name) || -+ !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "s", &iter_variant) || -+ !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_STRING, &sender) || - !dbus_message_iter_close_container(&iter_dict, &iter_variant) || - !dbus_message_iter_close_container(&iter_array, &iter_dict) || - !dbus_message_iter_close_container(&iter_struct, &iter_array) || diff --git a/SOURCES/0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch b/SOURCES/0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch deleted file mode 100644 index 0323c04..0000000 --- a/SOURCES/0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f47d0b042f6d0a1661dff9816410162693d1daa2 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Oct 2013 05:06:56 +0200 -Subject: [PATCH] core: whenever a new PID is passed to us, make sure we watch - it - ---- - src/core/service.c | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) - -diff --git a/src/core/service.c b/src/core/service.c -index 246a86e..5953f45 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -191,7 +191,13 @@ static int service_set_main_pid(Service *s, pid_t pid) { - if (pid == getpid()) - return -EINVAL; - -- service_unwatch_main_pid(s); -+ if (s->main_pid == pid && s->main_pid_known) -+ return 0; -+ -+ if (s->main_pid != pid) { -+ service_unwatch_main_pid(s); -+ exec_status_start(&s->main_exec_status, pid); -+ } - - s->main_pid = pid; - s->main_pid_known = true; -@@ -205,8 +211,6 @@ static int service_set_main_pid(Service *s, pid_t pid) { - } else - s->main_pid_alien = false; - -- exec_status_start(&s->main_exec_status, pid); -- - return 0; - } - -@@ -2698,8 +2702,10 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, - - if (parse_pid(value, &pid) < 0) - log_debug_unit(u->id, "Failed to parse main-pid value %s", value); -- else -- service_set_main_pid(s, (pid_t) pid); -+ else { -+ service_set_main_pid(s, pid); -+ unit_watch_pid(UNIT(s), pid); -+ } - } else if (streq(key, "main-pid-known")) { - int b; - -@@ -3391,6 +3397,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { - log_debug_unit(u->id, - "%s: got %s", u->id, e); - service_set_main_pid(s, pid); -+ unit_watch_pid(UNIT(s), pid); - } - } - -@@ -3687,8 +3694,10 @@ static void service_bus_query_pid_done( - (s->state == SERVICE_START || - s->state == SERVICE_START_POST || - s->state == SERVICE_RUNNING || -- s->state == SERVICE_RELOAD)) -+ s->state == SERVICE_RELOAD)){ - service_set_main_pid(s, pid); -+ unit_watch_pid(UNIT(s), pid); -+ } - } - - int service_set_socket_fd(Service *s, int fd, Socket *sock) { 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-remove-user-.service.patch b/SOURCES/0029-remove-user-.service.patch deleted file mode 100644 index e61dcff..0000000 --- a/SOURCES/0029-remove-user-.service.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 40810e62f4df958b2465dcc1923b8b827fb778e8 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 eae001b..25bfd91 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -435,7 +435,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 \ -@@ -484,7 +483,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 adbe638..9cc186b 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/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/0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch b/SOURCES/0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch deleted file mode 100644 index 266f504..0000000 --- a/SOURCES/0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 8986b8ccd7ea39d75246b72f497a4131a278f3bb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Sep 2013 16:02:31 -0500 -Subject: [PATCH] cgroup: always enable memory.use_hierarchy= for all cgroups - in the memory hierarchy - -The non-hierarchial mode contradicts the whole idea of a cgroup tree so -let's not support this. In the future the kernel will only support the -hierarchial logic anyway. ---- - src/core/cgroup.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 9277dd6..7f29afb 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -678,6 +678,9 @@ int manager_setup_cgroup(Manager *m) { - /* 6. Figure out which controllers are supported */ - m->cgroup_supported = cg_mask_supported(); - -+ /* 7. Always enable hierarchial support if it exists... */ -+ cg_set_attribute("memory", "/", "memory.use_hierarchy", "1"); -+ - return 0; - } - diff --git a/SOURCES/0031-logind-return-EINVAL-when-PID-is-wrong.patch b/SOURCES/0031-logind-return-EINVAL-when-PID-is-wrong.patch deleted file mode 100644 index 4a7f024..0000000 --- a/SOURCES/0031-logind-return-EINVAL-when-PID-is-wrong.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 07c3b93b709a601398ce5e06d48f215d097ed959 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Tue, 24 Sep 2013 16:27:20 +0200 -Subject: [PATCH] logind: return -EINVAL when PID is wrong - -dbus-send --print-reply --system --dest=org.freedesktop.login1 -/org/freedesktop/login1 org.freedesktop.login1.Manager.GetUserByPID -uint32:0 -causes -systemd-logind[29843]: Assertion 'pid >= 1' failed at -src/login/logind.c:938, function manager_get_user_by_pid(). Aborting. ---- - src/login/logind.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/login/logind.c b/src/login/logind.c -index 4ef92b8..afc737c 100644 ---- a/src/login/logind.c -+++ b/src/login/logind.c -@@ -914,9 +914,11 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { - int r; - - assert(m); -- assert(pid >= 1); - assert(session); - -+ if (pid < 1) -+ return -EINVAL; -+ - r = cg_pid_get_unit(pid, &unit); - if (r < 0) - return r; -@@ -935,9 +937,11 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user) { - int r; - - assert(m); -- assert(pid >= 1); - assert(user); - -+ if (pid < 1) -+ return -EINVAL; -+ - r = cg_pid_get_slice(pid, &unit); - if (r < 0) - return r; 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-core-drop-some-out-of-date-references-to-cgroup-sett.patch b/SOURCES/0032-core-drop-some-out-of-date-references-to-cgroup-sett.patch deleted file mode 100644 index 84e5fa1..0000000 --- a/SOURCES/0032-core-drop-some-out-of-date-references-to-cgroup-sett.patch +++ /dev/null @@ -1,197 +0,0 @@ -From 873b06ca6f97f7288c98647fa5e761847122a382 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 26 Sep 2013 22:49:44 +0200 -Subject: [PATCH] core: drop some out-of-date references to cgroup settings - ---- - man/systemd-cgtop.xml | 36 +++++++++++++++--------------------- - man/systemd-system.conf.xml | 27 +-------------------------- - man/systemd.unit.xml | 5 ++++- - src/core/dbus-manager.c | 27 --------------------------- - src/core/system.conf | 3 +-- - src/core/user.conf | 1 - - 6 files changed, 21 insertions(+), 78 deletions(-) - -diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml -index 0e9e5e6..51549c4 100644 ---- a/man/systemd-cgtop.xml -+++ b/man/systemd-cgtop.xml -@@ -73,30 +73,23 @@ - only accounted for control groups in the - cpuacct hierarchy, memory usage - only for those in memory and disk -- I/O usage for those in -- blkio. systemd1 -- by default places all services in their own control -- group in the cpuacct hierarchy, but -- not in memory nor -- blkio. If resource monitoring for -- these resources is required, it is recommended to add -- blkio and memory -- to the DefaultControllers= setting -- in /etc/systemd/system.conf (see -- systemd-system.conf5 -- for details). Alternatively, it is possible to enable -- resource accounting individually for services, by -- making use of the ControlGroup= -- option in the unit files (See -- systemd.exec5 -+ I/O usage for those in blkio. If -+ resource monitoring for these resources is required, -+ it is recommended to add the -+ CPUAccounting=1, -+ MemoryAccounting=1 and -+ BlockIOAccounting=1 settings in the -+ unit files in question (See -+ systemd.cgroup5 - for details). - - To emphasize this: unless -- blkio and memory -- are enabled for the services in question with either -- of the options suggested above no resource accounting -- will be available for system services and the data shown -- by systemd-cgtop will be -+ CPUAccounting=1, -+ MemoryAccounting=1 and -+ BlockIOAccounting=1 are enabled for -+ the services in question no resource accounting will -+ be available for system services and the data shown by -+ systemd-cgtop will be - incomplete. - - -@@ -281,6 +274,7 @@ - systemd1, - systemctl1, - systemd-cgls1, -+ systemd.cgroup5, - top1 - - -diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml -index c52e590..e8cf8a9 100644 ---- a/man/systemd-system.conf.xml -+++ b/man/systemd-system.conf.xml -@@ -104,32 +104,7 @@ - - - -- DefaultControllers=cpu -- -- Configures in which -- control group hierarchies to create -- per-service cgroups automatically, in -- addition to the -- name=systemd named -- hierarchy. Defaults to -- cpu. Takes a -- space-separated list of controller -- names. Pass the empty string to ensure -- that systemd does not touch any -- hierarchies but its own. -- -- Note that the default value of -- 'cpu' will make realtime scheduling -- unavailable to system services. See -- My -- Service Can't Get Realtime! -- for more -- information. -- -- -- -- JoinControllers=cpu,cpuacct,cpuset net_cls,netprio -+ JoinControllers=cpu,cpuacct net_cls,netprio - - Configures controllers - that shall be mounted in a single -diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml -index d61426a..5c8b8e8 100644 ---- a/man/systemd.unit.xml -+++ b/man/systemd.unit.xml -@@ -1241,7 +1241,10 @@ - - %R - Parent directory of the control group path where units are placed. -- For system instances this usually resolves to /, except in containers, where this resolves to the container's root directory. This specifier is particularly useful in the ControlGroup= setting (see systemd.exec5). -+ For system instances this usually -+ resolves to /, except in -+ containers, where this resolves to the -+ container's root directory. - - - %t -diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c -index 75e2e45..676a07f 100644 ---- a/src/core/dbus-manager.c -+++ b/src/core/dbus-manager.c -@@ -103,32 +103,6 @@ - " \n" \ - " \n" \ - " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " " \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " " \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ -- " \n" \ - " \n" \ - " \n" \ - " \n" \ -@@ -316,7 +290,6 @@ - " \n" \ - " \n" \ - " \n" \ -- " \n" \ - " \n" \ - " \n" \ - " \n" \ -diff --git a/src/core/system.conf b/src/core/system.conf -index f2817bc..7b03c87 100644 ---- a/src/core/system.conf -+++ b/src/core/system.conf -@@ -17,10 +17,9 @@ - #ShowStatus=yes - #CrashChVT=1 - #CPUAffinity=1 2 --#DefaultControllers=cpu - #DefaultStandardOutput=journal - #DefaultStandardError=inherit --#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio -+#JoinControllers=cpu,cpuacct net_cls,net_prio - #RuntimeWatchdogSec=0 - #ShutdownWatchdogSec=10min - #CapabilityBoundingSet= -diff --git a/src/core/user.conf b/src/core/user.conf -index 4252451..4a0129a 100644 ---- a/src/core/user.conf -+++ b/src/core/user.conf -@@ -12,6 +12,5 @@ - #LogTarget=console - #LogColor=yes - #LogLocation=no --#DefaultControllers=cpu - #DefaultStandardOutput=inherit - #DefaultStandardError=inherit 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-man-explain-NAME-in-systemctl-man-page.patch b/SOURCES/0033-man-explain-NAME-in-systemctl-man-page.patch deleted file mode 100644 index 931639e..0000000 --- a/SOURCES/0033-man-explain-NAME-in-systemctl-man-page.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 29acf51b6a3ea9305752c9c4dacf1289a1edacb5 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 b043581..51c34b7 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/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/0034-journald-accept-EPOLLERR-from-dev-kmsg.patch b/SOURCES/0034-journald-accept-EPOLLERR-from-dev-kmsg.patch deleted file mode 100644 index decdec9..0000000 --- a/SOURCES/0034-journald-accept-EPOLLERR-from-dev-kmsg.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 21deaace3a2ce9531443279a7c36a0fc068bdea7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 19 Sep 2013 16:57:57 -0500 -Subject: [PATCH] journald: accept EPOLLERR from /dev/kmsg - -Also print out unexpected epoll events explictly. ---- - src/journal/journald-server.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c -index ba211b3..c252710 100644 ---- a/src/journal/journald-server.c -+++ b/src/journal/journald-server.c -@@ -1075,7 +1075,8 @@ int process_event(Server *s, struct epoll_event *ev) { - ssize_t n; - - if (ev->events != EPOLLIN) { -- log_error("Got invalid event from epoll."); -+ log_error("Got invalid event from epoll for %s: %"PRIx32, -+ "signal fd", ev->events); - return -EIO; - } - -@@ -1128,8 +1129,12 @@ int process_event(Server *s, struct epoll_event *ev) { - } else if (ev->data.fd == s->dev_kmsg_fd) { - int r; - -- if (ev->events != EPOLLIN) { -- log_error("Got invalid event from epoll."); -+ if (ev->events & EPOLLERR) -+ log_warning("/dev/kmsg buffer overrun, some messages lost."); -+ -+ if (!(ev->events & EPOLLIN)) { -+ log_error("Got invalid event from epoll for %s: %"PRIx32, -+ "/dev/kmsg", ev->events); - return -EIO; - } - -@@ -1143,7 +1148,9 @@ int process_event(Server *s, struct epoll_event *ev) { - ev->data.fd == s->syslog_fd) { - - if (ev->events != EPOLLIN) { -- log_error("Got invalid event from epoll."); -+ log_error("Got invalid event from epoll for %s: %"PRIx32, -+ ev->data.fd == s->native_fd ? "native fd" : "syslog fd", -+ ev->events); - return -EIO; - } - -@@ -1264,7 +1271,8 @@ int process_event(Server *s, struct epoll_event *ev) { - } else if (ev->data.fd == s->stdout_fd) { - - if (ev->events != EPOLLIN) { -- log_error("Got invalid event from epoll."); -+ log_error("Got invalid event from epoll for %s: %"PRIx32, -+ "stdout fd", ev->events); - return -EIO; - } - -@@ -1275,6 +1283,8 @@ int process_event(Server *s, struct epoll_event *ev) { - StdoutStream *stream; - - if ((ev->events|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) { -+ log_error("Got invalid event from epoll for %s: %"PRIx32, -+ "stdout stream", ev->events); - log_error("Got invalid event from epoll."); - return -EIO; - } 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/0035-journald-avoid-NSS-in-journald.patch b/SOURCES/0035-journald-avoid-NSS-in-journald.patch deleted file mode 100644 index fb5de56..0000000 --- a/SOURCES/0035-journald-avoid-NSS-in-journald.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 6359b8041144a0571853b1dcad55ad60922af55d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 17 Sep 2013 16:42:36 -0500 -Subject: [PATCH] journald: avoid NSS in journald - -In order to avoid a deadlock between journald looking up the -"systemd-journal" group name, and nscd (or anyother NSS backing daemon) -logging something back to the journal avoid all NSS in journald the same -way as we avoid it from PID 1. - -With this change we rely on the kernel file system logic to adjust the -group of created journal files via the SETGID bit on the journal -directory. To ensure that it is always set, even after the user created -it with a simply "mkdir" on the shell we fix it up via tmpfiles on boot. ---- - src/journal/journald-server.c | 25 ++----------------------- - src/journal/journald-server.h | 3 --- - tmpfiles.d/systemd.conf | 3 +++ - 3 files changed, 5 insertions(+), 26 deletions(-) - -diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c -index c252710..8007b05 100644 ---- a/src/journal/journald-server.c -+++ b/src/journal/journald-server.c -@@ -180,25 +180,6 @@ static uint64_t available_space(Server *s, bool verbose) { - return s->cached_available_space; - } - --static void server_read_file_gid(Server *s) { -- const char *g = "systemd-journal"; -- int r; -- -- assert(s); -- -- if (s->file_gid_valid) -- return; -- -- r = get_group_creds(&g, &s->file_gid); -- if (r < 0) -- log_warning("Failed to resolve '%s' group: %s", g, strerror(-r)); -- -- /* if we couldn't read the gid, then it will be 0, but that's -- * fine and we shouldn't try to resolve the group again, so -- * let's just pretend it worked right-away. */ -- s->file_gid_valid = true; --} -- - void server_fix_perms(Server *s, JournalFile *f, uid_t uid) { - int r; - #ifdef HAVE_ACL -@@ -209,11 +190,9 @@ void server_fix_perms(Server *s, JournalFile *f, uid_t uid) { - - assert(f); - -- server_read_file_gid(s); -- -- r = fchmod_and_fchown(f->fd, 0640, 0, s->file_gid); -+ r = fchmod(f->fd, 0640); - if (r < 0) -- log_warning("Failed to fix access mode/rights on %s, ignoring: %s", f->path, strerror(-r)); -+ log_warning("Failed to fix access mode on %s, ignoring: %s", f->path, strerror(-r)); - - #ifdef HAVE_ACL - if (uid <= 0) -diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h -index e856ef2..0393e38 100644 ---- a/src/journal/journald-server.h -+++ b/src/journal/journald-server.h -@@ -97,9 +97,6 @@ typedef struct Server { - usec_t max_file_usec; - usec_t oldest_file_usec; - -- gid_t file_gid; -- bool file_gid_valid; -- - LIST_HEAD(StdoutStream, stdout_streams); - unsigned n_stdout_streams; - -diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf -index 4924b4e..c397c71 100644 ---- a/tmpfiles.d/systemd.conf -+++ b/tmpfiles.d/systemd.conf -@@ -23,3 +23,6 @@ d /run/systemd/machines 0755 root root - - d /run/systemd/shutdown 0755 root root - - - F /run/nologin 0644 - - - "System is booting up." -+ -+m /var/log/journal 2755 root systemd-journal - - -+m /var/log/journal/%m 2755 root systemd-journal - - 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/0036-libudev-add-missing-global-to-symbol-export.patch b/SOURCES/0036-libudev-add-missing-global-to-symbol-export.patch deleted file mode 100644 index 0afb8f6..0000000 --- a/SOURCES/0036-libudev-add-missing-global-to-symbol-export.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 23e9bb8dc174e2418c852361ee4ca7dc0474b879 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 17 Sep 2013 16:37:42 -0500 -Subject: [PATCH] libudev: add missing 'global' to symbol export - ---- - src/libudev/libudev.sym | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/libudev/libudev.sym b/src/libudev/libudev.sym -index 8e09430..1e6f885 100644 ---- a/src/libudev/libudev.sym -+++ b/src/libudev/libudev.sym -@@ -109,5 +109,6 @@ global: - } LIBUDEV_189; - - LIBUDEV_199 { -+global: - udev_device_set_sysattr_value; - } LIBUDEV_196; diff --git a/SOURCES/0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch b/SOURCES/0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch deleted file mode 100644 index 262b269..0000000 --- a/SOURCES/0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch +++ /dev/null @@ -1,206 +0,0 @@ -From cb6800ec93c7d49f5f43355fef44f6797759cc0a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 17 Sep 2013 18:04:40 -0500 -Subject: [PATCH] gpt-auto-generator: do not assume that /dev/block/%u:%u is - useable - -The generator might run before udev, and udev sets up the /dev/block/ -symlinks, hence we cannot use them from the gpt generator. Instead, -manually translate a major/minor to a device node. ---- - src/gpt-auto-generator/gpt-auto-generator.c | 109 +++++++++++++++++++--------- - 1 file changed, 74 insertions(+), 35 deletions(-) - -diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c -index 880661e..ca54925 100644 ---- a/src/gpt-auto-generator/gpt-auto-generator.c -+++ b/src/gpt-auto-generator/gpt-auto-generator.c -@@ -55,18 +55,13 @@ static inline void blkid_free_probep(blkid_probe *b) { - } - #define _cleanup_blkid_freep_probe_ _cleanup_(blkid_free_probep) - --static int verify_gpt_partition(dev_t dev, sd_id128_t *type, unsigned *nr, char **fstype) { -- _cleanup_free_ char *t = NULL; -+static int verify_gpt_partition(const char *node, sd_id128_t *type, unsigned *nr, char **fstype) { - _cleanup_blkid_freep_probe_ blkid_probe b = NULL; - const char *v; - int r; - -- r = asprintf(&t, "/dev/block/%u:%u", major(dev), minor(dev)); -- if (r < 0) -- return -ENOMEM; -- - errno = 0; -- b = blkid_new_probe_from_filename(t); -+ b = blkid_new_probe_from_filename(node); - if (!b) - return errno != 0 ? -errno : -ENOMEM; - -@@ -237,8 +232,7 @@ static int add_home(const char *path, const char *fstype) { - return 0; - } - --static int enumerate_partitions(dev_t dev) { -- struct udev *udev; -+static int enumerate_partitions(struct udev *udev, dev_t dev) { - struct udev_enumerate *e = NULL; - struct udev_device *parent = NULL, *d = NULL; - struct udev_list_entry *first, *item; -@@ -246,10 +240,6 @@ static int enumerate_partitions(dev_t dev) { - _cleanup_free_ char *home = NULL, *home_fstype = NULL; - int r; - -- udev = udev_new(); -- if (!udev) -- return log_oom(); -- - e = udev_enumerate_new(udev); - if (!e) { - r = log_oom(); -@@ -294,7 +284,6 @@ static int enumerate_partitions(dev_t dev) { - struct udev_device *q; - sd_id128_t type_id; - unsigned nr; -- dev_t sub; - - q = udev_device_new_from_syspath(udev, udev_list_entry_get_name(item)); - if (!q) { -@@ -314,12 +303,10 @@ static int enumerate_partitions(dev_t dev) { - goto finish; - } - -- sub = udev_device_get_devnum(q); -- -- r = verify_gpt_partition(sub, &type_id, &nr, &fstype); -+ r = verify_gpt_partition(node, &type_id, &nr, &fstype); - if (r < 0) { -- log_error("Failed to verify GPT partition /dev/block/%u:%u: %s", -- major(sub), minor(sub), strerror(-r)); -+ log_error("Failed to verify GPT partition %s: %s", -+ node, strerror(-r)); - udev_device_unref(q); - goto finish; - } -@@ -360,8 +347,6 @@ finish: - if (e) - udev_enumerate_unref(e); - -- if (udev) -- udev_unref(udev); - - return r; - } -@@ -440,13 +425,50 @@ static int get_block_device(const char *path, dev_t *dev) { - return 0; - } - -+static int devno_to_devnode(struct udev *udev, dev_t devno, char **ret) { -+ struct udev_device *d = NULL; -+ const char *t; -+ char *n; -+ int r; -+ -+ d = udev_device_new_from_devnum(udev, 'b', devno); -+ if (!d) { -+ r = log_oom(); -+ goto finish; -+ } -+ -+ t = udev_device_get_devnode(d); -+ if (!t) { -+ r = -ENODEV; -+ goto finish; -+ } -+ -+ n = strdup(t); -+ if (!n) { -+ r = -ENOMEM; -+ goto finish; -+ } -+ -+ *ret = n; -+ r = 0; -+ -+finish: -+ if (d) -+ udev_device_unref(d); -+ -+ return r; -+} -+ - int main(int argc, char *argv[]) { -- dev_t dev; -+ _cleanup_free_ char *node = NULL; -+ struct udev *udev = NULL; -+ dev_t devno; - int r; - - if (argc > 1 && argc != 4) { - log_error("This program takes three or no arguments."); -- return EXIT_FAILURE; -+ r = -EINVAL; -+ goto finish; - } - - if (argc > 1) -@@ -458,31 +480,48 @@ int main(int argc, char *argv[]) { - - umask(0022); - -- if (in_initrd()) -- return EXIT_SUCCESS; -+ if (in_initrd()) { -+ r = 0; -+ goto finish; -+ } - -- r = get_block_device("/", &dev); -+ r = get_block_device("/", &devno); - if (r < 0) { - log_error("Failed to determine block device of root file system: %s", strerror(-r)); -- return EXIT_FAILURE; -+ goto finish; - } - if (r == 0) { - log_debug("Root file system not on a (single) block device."); -- return EXIT_SUCCESS; -+ goto finish; -+ } -+ -+ udev = udev_new(); -+ if (!udev) { -+ r = log_oom(); -+ goto finish; -+ } -+ -+ r = devno_to_devnode(udev, devno, &node); -+ if (r < 0) { -+ log_error("Failed to determine block device node from major/minor: %s", strerror(-r)); -+ goto finish; - } - -- log_debug("Root device /dev/block/%u:%u.", major(dev), minor(dev)); -+ log_debug("Root device %s.", node); - -- r = verify_gpt_partition(dev, NULL, NULL, NULL); -+ r = verify_gpt_partition(node, NULL, NULL, NULL); - if (r < 0) { -- log_error("Failed to verify GPT partition /dev/block/%u:%u: %s", -- major(dev), minor(dev), strerror(-r)); -- return EXIT_FAILURE; -+ log_error("Failed to verify GPT partition %s: %s", node, strerror(-r)); -+ goto finish; - } - if (r == 0) -- return EXIT_SUCCESS; -+ goto finish; -+ -+ r = enumerate_partitions(udev, devno); - -- r = enumerate_partitions(dev); -+finish: -+ if (udev) -+ udev_unref(udev); - - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; - } 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/0038-logind-put-correct-user-object-paths-in-introspectio.patch b/SOURCES/0038-logind-put-correct-user-object-paths-in-introspectio.patch deleted file mode 100644 index 1ff1c8b..0000000 --- a/SOURCES/0038-logind-put-correct-user-object-paths-in-introspectio.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 31ad5f9f7291e5f97e62402f3198c9a5161548c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= -Date: Fri, 20 Sep 2013 18:14:02 +0300 -Subject: [PATCH] logind: put correct user object paths in introspection data - -Sync with user_bus_path() in logind-user-dbus.c ---- - src/login/logind-dbus.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index d052e74..77dda10 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -2256,7 +2256,7 @@ static DBusHandlerResult manager_message_handler( - } - - HASHMAP_FOREACH(user, m->users, i) -- fprintf(f, "", (unsigned long long) user->uid); -+ fprintf(f, "", (unsigned long long) user->uid); - - HASHMAP_FOREACH(session, m->sessions, i) { - p = bus_path_escape(session->id); diff --git a/SOURCES/0039-Fix-obsolete-references-to-systemd-random-seed-load..patch b/SOURCES/0039-Fix-obsolete-references-to-systemd-random-seed-load..patch deleted file mode 100644 index fba35b4..0000000 --- a/SOURCES/0039-Fix-obsolete-references-to-systemd-random-seed-load..patch +++ /dev/null @@ -1,38 +0,0 @@ -From fc8c5e4ff8248fa5548de63a5b96d1d9cf2be425 Mon Sep 17 00:00:00 2001 -From: Eelco Dolstra -Date: Sun, 22 Sep 2013 20:38:24 +0200 -Subject: [PATCH] Fix obsolete references to systemd-random-seed-load.service - -This service was merged with systemd-random-seed-save.service in -c35b956d34bbb8bb208e49e45de2c103ca11911c. ---- - src/cryptsetup/cryptsetup-generator.c | 2 +- - units/systemd-random-seed.service.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index ba6efa6..8792e6b 100644 ---- a/src/cryptsetup/cryptsetup-generator.c -+++ b/src/cryptsetup/cryptsetup-generator.c -@@ -129,7 +129,7 @@ static int create_disk( - if (streq(password, "/dev/urandom") || - streq(password, "/dev/random") || - streq(password, "/dev/hw_random")) -- fputs("After=systemd-random-seed-load.service\n", f); -+ fputs("After=systemd-random-seed.service\n", f); - else if (!streq(password, "-") && - !streq(password, "none")) - fprintf(f, -diff --git a/units/systemd-random-seed.service.in b/units/systemd-random-seed.service.in -index 0c21a04..1879b2f 100644 ---- a/units/systemd-random-seed.service.in -+++ b/units/systemd-random-seed.service.in -@@ -7,7 +7,7 @@ - - [Unit] - Description=Load/Save Random Seed --Documentation=man:systemd-random-seed-load.service(8) man:random(4) -+Documentation=man:systemd-random-seed.service(8) man:random(4) - DefaultDependencies=no - RequiresMountsFor=@RANDOM_SEED@ - Conflicts=shutdown.target 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/0040-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch b/SOURCES/0040-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch deleted file mode 100644 index eaa35ea..0000000 --- a/SOURCES/0040-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 91d2bf71864a1cb9f1228b65b126f5d74d8e09b9 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Sep 2013 16:02:31 -0500 -Subject: [PATCH] cgroup: always enable memory.use_hierarchy= for all cgroups - in the memory hierarchy - -The non-hierarchial mode contradicts the whole idea of a cgroup tree so -let's not support this. In the future the kernel will only support the -hierarchial logic anyway. ---- - src/core/cgroup.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 7f29afb..24a2306 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -256,8 +256,9 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha - } - - if (mask & CGROUP_MEMORY) { -- char buf[DECIMAL_STR_MAX(uint64_t) + 1]; - if (c->memory_limit != (uint64_t) -1) { -+ char buf[DECIMAL_STR_MAX(uint64_t) + 1]; -+ - sprintf(buf, "%" PRIu64 "\n", c->memory_limit); - r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf); - } else diff --git a/SOURCES/0041-journalctl-1-s-adm-systemd-journal.patch b/SOURCES/0041-journalctl-1-s-adm-systemd-journal.patch deleted file mode 100644 index f82532f..0000000 --- a/SOURCES/0041-journalctl-1-s-adm-systemd-journal.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 07da21cf4de7428cc2016333f8ae774fcab6e9fd Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Tue, 24 Sep 2013 14:39:40 -0400 -Subject: [PATCH] journalctl(1): s/adm/systemd-journal/ - ---- - man/journalctl.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/journalctl.xml b/man/journalctl.xml -index a5778bf..b5a0c53 100644 ---- a/man/journalctl.xml -+++ b/man/journalctl.xml -@@ -104,7 +104,7 @@ - - All users are granted access to their private - per-user journals. However, by default, only root and -- users who are members of the adm -+ users who are members of the systemd-journal - group get access to the system journal and the - journals of other users. - 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-cgroup-if-we-do-a-cgroup-operation-then-do-something.patch b/SOURCES/0042-cgroup-if-we-do-a-cgroup-operation-then-do-something.patch deleted file mode 100644 index 627c665..0000000 --- a/SOURCES/0042-cgroup-if-we-do-a-cgroup-operation-then-do-something.patch +++ /dev/null @@ -1,422 +0,0 @@ -From 9c9e7b8fffbb21009d39a90076542e553a5c2190 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 23 Sep 2013 21:56:05 -0500 -Subject: [PATCH] cgroup: if we do a cgroup operation then do something on all - supported controllers - -Previously we did operations like attach, trim or migrate only on the -controllers that were enabled for a specific unit. With this changes we -will now do them for all supproted controllers, and fall back to all -possible prefix paths if the specified paths do not exist. - -This fixes issues if a controller is being disabled for a unit where it -was previously enabled, and makes sure that all processes stay as "far -down" the tree as groups exist. ---- - src/core/cgroup.c | 8 +-- - src/core/execute.c | 4 +- - src/core/mount.c | 2 +- - src/core/scope.c | 2 +- - src/core/service.c | 2 +- - src/core/socket.c | 2 +- - src/core/swap.c | 2 +- - src/shared/cgroup-util.c | 154 ++++++++++++++++++++++++++++++----------------- - src/shared/cgroup-util.h | 12 ++-- - 9 files changed, 118 insertions(+), 70 deletions(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 24a2306..2f1e4a3 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -409,13 +409,13 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) { - } - - /* First, create our own group */ -- r = cg_create_with_mask(mask, path); -+ r = cg_create_everywhere(u->manager->cgroup_supported, mask, path); - if (r < 0) - log_error("Failed to create cgroup %s: %s", path, strerror(-r)); - - /* Then, possibly move things over */ -- if (u->cgroup_path && !streq(path, u->cgroup_path)) { -- r = cg_migrate_with_mask(mask, u->cgroup_path, path); -+ 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)); - } -@@ -549,7 +549,7 @@ void unit_destroy_cgroup(Unit *u) { - if (!u->cgroup_path) - return; - -- r = cg_trim_with_mask(u->cgroup_mask, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE)); -+ r = cg_trim_everywhere(u->manager->cgroup_supported, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE)); - if (r < 0) - log_debug("Failed to destroy cgroup %s: %s", u->cgroup_path, strerror(-r)); - -diff --git a/src/core/execute.c b/src/core/execute.c -index 43b571e..789122e 100644 ---- a/src/core/execute.c -+++ b/src/core/execute.c -@@ -1016,7 +1016,7 @@ int exec_spawn(ExecCommand *command, - bool apply_chroot, - bool apply_tty_stdin, - bool confirm_spawn, -- CGroupControllerMask cgroup_mask, -+ CGroupControllerMask cgroup_supported, - const char *cgroup_path, - const char *unit_id, - int idle_pipe[4], -@@ -1197,7 +1197,7 @@ int exec_spawn(ExecCommand *command, - } - - if (cgroup_path) { -- err = cg_attach_with_mask(cgroup_mask, cgroup_path, 0); -+ err = cg_attach_everywhere(cgroup_supported, cgroup_path, 0); - if (err < 0) { - r = EXIT_CGROUP; - goto fail_child; -diff --git a/src/core/mount.c b/src/core/mount.c -index 5c18d4e..78c5c1e 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -888,7 +888,7 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) { - true, - true, - UNIT(m)->manager->confirm_spawn, -- UNIT(m)->cgroup_mask, -+ UNIT(m)->manager->cgroup_supported, - UNIT(m)->cgroup_path, - UNIT(m)->id, - NULL, -diff --git a/src/core/scope.c b/src/core/scope.c -index b94f3ff..50e5dba 100644 ---- a/src/core/scope.c -+++ b/src/core/scope.c -@@ -257,7 +257,7 @@ static int scope_start(Unit *u) { - return r; - } - -- r = cg_attach_many_with_mask(u->cgroup_mask, u->cgroup_path, s->pids); -+ r = cg_attach_many_everywhere(u->manager->cgroup_supported, u->cgroup_path, s->pids); - if (r < 0) - return r; - -diff --git a/src/core/service.c b/src/core/service.c -index 5953f45..fc04196 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -1826,7 +1826,7 @@ static int service_spawn( - apply_chroot, - apply_tty_stdin, - UNIT(s)->manager->confirm_spawn, -- UNIT(s)->cgroup_mask, -+ UNIT(s)->manager->cgroup_supported, - path, - UNIT(s)->id, - s->type == SERVICE_IDLE ? UNIT(s)->manager->idle_pipe : NULL, -diff --git a/src/core/socket.c b/src/core/socket.c -index 2130e48..25c2a51 100644 ---- a/src/core/socket.c -+++ b/src/core/socket.c -@@ -1241,7 +1241,7 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) { - true, - true, - UNIT(s)->manager->confirm_spawn, -- UNIT(s)->cgroup_mask, -+ UNIT(s)->manager->cgroup_supported, - UNIT(s)->cgroup_path, - UNIT(s)->id, - NULL, -diff --git a/src/core/swap.c b/src/core/swap.c -index 76c7d45..d225485 100644 ---- a/src/core/swap.c -+++ b/src/core/swap.c -@@ -625,7 +625,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) { - true, - true, - UNIT(s)->manager->confirm_spawn, -- UNIT(s)->cgroup_mask, -+ UNIT(s)->manager->cgroup_supported, - UNIT(s)->cgroup_path, - UNIT(s)->id, - NULL, -diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c -index 0bffebd..2e630d4 100644 ---- a/src/shared/cgroup-util.c -+++ b/src/shared/cgroup-util.c -@@ -435,6 +435,46 @@ int cg_migrate_recursive( - return ret; - } - -+int cg_migrate_recursive_fallback( -+ const char *cfrom, -+ const char *pfrom, -+ const char *cto, -+ const char *pto, -+ bool ignore_self, -+ bool rem) { -+ -+ int r; -+ -+ assert(cfrom); -+ assert(pfrom); -+ assert(cto); -+ assert(pto); -+ -+ r = cg_migrate_recursive(cfrom, pfrom, cto, pto, ignore_self, rem); -+ if (r < 0) { -+ char prefix[strlen(pto) + 1]; -+ -+ /* This didn't work? Then let's try all prefixes of the destination */ -+ -+ strcpy(prefix, pto); -+ for (;;) { -+ char *slash; -+ -+ slash = strrchr(prefix, '/'); -+ if (!slash) -+ break; -+ -+ *slash = 0; -+ -+ r = cg_migrate_recursive(cfrom, pfrom, cto, prefix, ignore_self, rem); -+ if (r >= 0) -+ break; -+ } -+ } -+ -+ return r; -+} -+ - static const char *normalize_controller(const char *controller) { - - assert(controller); -@@ -607,6 +647,39 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { - return write_string_file(fs, c); - } - -+int cg_attach_fallback(const char *controller, const char *path, pid_t pid) { -+ int r; -+ -+ assert(controller); -+ assert(path); -+ assert(pid >= 0); -+ -+ r = cg_attach(controller, path, pid); -+ if (r < 0) { -+ char prefix[strlen(path) + 1]; -+ -+ /* This didn't work? Then let's try all prefixes of -+ * the destination */ -+ -+ strcpy(prefix, path); -+ for (;;) { -+ char *slash; -+ -+ slash = strrchr(prefix, '/'); -+ if (!slash) -+ break; -+ -+ *slash = 0; -+ -+ r = cg_attach(controller, prefix, pid); -+ if (r >= 0) -+ break; -+ } -+ } -+ -+ return r; -+} -+ - int cg_set_group_access( - const char *controller, - const char *path, -@@ -1607,7 +1680,7 @@ static const char mask_names[] = - "memory\0" - "devices\0"; - --int cg_create_with_mask(CGroupControllerMask mask, const char *path) { -+int cg_create_everywhere(CGroupControllerMask supported, CGroupControllerMask mask, const char *path) { - CGroupControllerMask bit = 1; - const char *n; - int r; -@@ -1623,102 +1696,75 @@ int cg_create_with_mask(CGroupControllerMask mask, const char *path) { - - /* Then, do the same in the other hierarchies */ - NULSTR_FOREACH(n, mask_names) { -- if (bit & mask) -+ if (mask & bit) - cg_create(n, path); -- else -+ else if (supported & bit) - cg_trim(n, path, true); - - bit <<= 1; - } - -- return r; -+ return 0; - } - --int cg_attach_with_mask(CGroupControllerMask mask, const char *path, pid_t pid) { -+int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid) { - CGroupControllerMask bit = 1; - const char *n; - int r; - - r = cg_attach(SYSTEMD_CGROUP_CONTROLLER, path, pid); -+ if (r < 0) -+ return r; - - NULSTR_FOREACH(n, mask_names) { -- if (bit & mask) -- cg_attach(n, path, pid); -- else { -- char prefix[strlen(path) + 1], *slash; -- -- /* OK, this one is a bit harder... Now we need -- * to add to the closest parent cgroup we -- * can find */ -- strcpy(prefix, path); -- while ((slash = strrchr(prefix, '/'))) { -- int q; -- *slash = 0; -- -- q = cg_attach(n, prefix, pid); -- if (q >= 0) -- break; -- } -- } -+ if (supported & bit) -+ cg_attach_fallback(n, path, pid); - - bit <<= 1; - } - -- return r; -+ return 0; - } - --int cg_attach_many_with_mask(CGroupControllerMask mask, const char *path, Set* pids) { -+int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids) { - Iterator i; - void *pidp; - int r = 0; - - SET_FOREACH(pidp, pids, i) { - pid_t pid = PTR_TO_LONG(pidp); -- int k; -+ int q; - -- k = cg_attach_with_mask(mask, path, pid); -- if (k < 0) -- r = k; -+ q = cg_attach_everywhere(supported, path, pid); -+ if (q < 0) -+ r = q; - } - - return r; - } - --int cg_migrate_with_mask(CGroupControllerMask mask, const char *from, const char *to) { -+int cg_migrate_everywhere(CGroupControllerMask supported, const char *from, const char *to) { - CGroupControllerMask bit = 1; - const char *n; - int r; - -- if (path_equal(from, to)) -- return 0; -- -- r = cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, from, SYSTEMD_CGROUP_CONTROLLER, to, false, true); -+ if (!path_equal(from, to)) { -+ r = cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, from, SYSTEMD_CGROUP_CONTROLLER, to, false, true); -+ if (r < 0) -+ return r; -+ } - - NULSTR_FOREACH(n, mask_names) { -- if (bit & mask) -- cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, to, n, to, false, false); -- else { -- char prefix[strlen(to) + 1], *slash; -- -- strcpy(prefix, to); -- while ((slash = strrchr(prefix, '/'))) { -- int q; -- -- *slash = 0; -- -- q = cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, to, n, prefix, false, false); -- if (q >= 0) -- break; -- } -- } -+ if (supported & bit) -+ cg_migrate_recursive_fallback(SYSTEMD_CGROUP_CONTROLLER, to, n, to, false, false); - - bit <<= 1; - } - -- return r; -+ return 0; - } - --int cg_trim_with_mask(CGroupControllerMask mask, const char *path, bool delete_root) { -+int cg_trim_everywhere(CGroupControllerMask supported, const char *path, bool delete_root) { - CGroupControllerMask bit = 1; - const char *n; - int r; -@@ -1728,13 +1774,13 @@ int cg_trim_with_mask(CGroupControllerMask mask, const char *path, bool delete_r - return r; - - NULSTR_FOREACH(n, mask_names) { -- if (bit & mask) -+ if (supported & bit) - cg_trim(n, path, delete_root); - - bit <<= 1; - } - -- return r; -+ return 0; - } - - CGroupControllerMask cg_mask_supported(void) { -diff --git a/src/shared/cgroup-util.h b/src/shared/cgroup-util.h -index 0fc93c1..0963450 100644 ---- a/src/shared/cgroup-util.h -+++ b/src/shared/cgroup-util.h -@@ -64,6 +64,7 @@ int cg_kill_recursive_and_wait(const char *controller, const char *path, bool re - - int cg_migrate(const char *cfrom, const char *pfrom, const char *cto, const char *pto, bool ignore_self); - int cg_migrate_recursive(const char *cfrom, const char *pfrom, const char *cto, const char *pto, bool ignore_self, bool remove); -+int cg_migrate_recursive_fallback(const char *cfrom, const char *pfrom, const char *cto, const char *pto, bool ignore_self, bool rem); - - int cg_split_spec(const char *spec, char **controller, char **path); - int cg_join_spec(const char *controller, const char *path, char **spec); -@@ -81,6 +82,7 @@ int cg_delete(const char *controller, const char *path); - - int cg_create(const char *controller, const char *path); - int cg_attach(const char *controller, const char *path, pid_t pid); -+int cg_attach_fallback(const char *controller, const char *path, pid_t pid); - int cg_create_and_attach(const char *controller, const char *path, pid_t pid); - - int cg_set_attribute(const char *controller, const char *path, const char *attribute, const char *value); -@@ -126,10 +128,10 @@ bool cg_controller_is_valid(const char *p, bool allow_named); - - int cg_slice_to_path(const char *unit, char **ret); - --int cg_create_with_mask(CGroupControllerMask mask, const char *path); --int cg_attach_with_mask(CGroupControllerMask mask, const char *path, pid_t pid); --int cg_attach_many_with_mask(CGroupControllerMask mask, const char *path, Set* pids); --int cg_migrate_with_mask(CGroupControllerMask mask, const char *from, const char *to); --int cg_trim_with_mask(CGroupControllerMask mask, const char *path, bool delete_root); -+int cg_create_everywhere(CGroupControllerMask supported, CGroupControllerMask mask, const char *path); -+int cg_attach_everywhere(CGroupControllerMask supported, const char *path, pid_t pid); -+int cg_attach_many_everywhere(CGroupControllerMask supported, const char *path, Set* pids); -+int cg_migrate_everywhere(CGroupControllerMask supported, const char *from, const char *to); -+int cg_trim_everywhere(CGroupControllerMask supported, const char *path, bool delete_root); - - CGroupControllerMask cg_mask_supported(void); 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/0043-core-rework-how-we-match-mount-units-against-each-ot.patch b/SOURCES/0043-core-rework-how-we-match-mount-units-against-each-ot.patch deleted file mode 100644 index 6376705..0000000 --- a/SOURCES/0043-core-rework-how-we-match-mount-units-against-each-ot.patch +++ /dev/null @@ -1,1156 +0,0 @@ -From f0af1f20acc04b744f4ce1ed4b028e84576541d7 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 26 Sep 2013 20:14:24 +0200 -Subject: [PATCH] core: rework how we match mount units against each other - -Previously to automatically create dependencies between mount units we -matched every mount unit agains all others resulting in O(n^2) -complexity. On setups with large amounts of mount units this might make -things slow. - -This change replaces the matching code to use a hashtable that is keyed -by a path prefix, and points to a set of units that require that path to -be around. When a new mount unit is installed it is hence sufficient to -simply look up this set of units via its own file system paths to know -which units to order after itself. - -This patch also changes all unit types to only create automatic mount -dependencies via the RequiresMountsFor= logic, and this is exposed to -the outside to make things more transparent. - -With this change we still have some O(n) complexities in place when -handling mounts, but that's currently unavoidable due to kernel APIs, -and still substantially better than O(n^2) as before. - -https://bugs.freedesktop.org/show_bug.cgi?id=69740 ---- - src/core/automount.c | 33 +---- - src/core/automount.h | 2 - - src/core/load-fragment-gperf.gperf.m4 | 2 +- - src/core/load-fragment.c | 47 ++++--- - src/core/manager.c | 44 +++++- - src/core/manager.h | 12 +- - src/core/mount.c | 255 +++++++++------------------------- - src/core/path.c | 32 +---- - src/core/path.h | 4 - - src/core/socket.c | 49 ++----- - src/core/socket.h | 4 - - src/core/swap.c | 40 +----- - src/core/swap.h | 2 - - src/core/unit.c | 162 +++++++++++++++++---- - src/core/unit.h | 6 +- - src/shared/socket-util.c | 8 +- - src/shared/socket-util.h | 2 +- - 17 files changed, 309 insertions(+), 395 deletions(-) - -diff --git a/src/core/automount.c b/src/core/automount.c -index 6762392..d1379e0 100644 ---- a/src/core/automount.c -+++ b/src/core/automount.c -@@ -117,42 +117,17 @@ static void automount_done(Unit *u) { - a->tokens = NULL; - } - --int automount_add_one_mount_link(Automount *a, Mount *m) { -+static int automount_add_mount_links(Automount *a) { -+ _cleanup_free_ char *parent = NULL; - int r; - - assert(a); -- assert(m); -- -- if (UNIT(a)->load_state != UNIT_LOADED || -- UNIT(m)->load_state != UNIT_LOADED) -- return 0; -- -- if (!path_startswith(a->where, m->where)) -- return 0; - -- if (path_equal(a->where, m->where)) -- return 0; -- -- r = unit_add_two_dependencies(UNIT(a), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true); -+ r = path_get_parent(a->where, &parent); - if (r < 0) - return r; - -- return 0; --} -- --static int automount_add_mount_links(Automount *a) { -- Unit *other; -- int r; -- -- assert(a); -- -- LIST_FOREACH(units_by_type, other, UNIT(a)->manager->units_by_type[UNIT_MOUNT]) { -- r = automount_add_one_mount_link(a, MOUNT(other)); -- if (r < 0) -- return r; -- } -- -- return 0; -+ return unit_require_mounts_for(UNIT(a), parent); - } - - static int automount_add_default_dependencies(Automount *a) { -diff --git a/src/core/automount.h b/src/core/automount.h -index 0c6b8a7..a7a25d3 100644 ---- a/src/core/automount.h -+++ b/src/core/automount.h -@@ -62,8 +62,6 @@ extern const UnitVTable automount_vtable; - - int automount_send_ready(Automount *a, int status); - --int automount_add_one_mount_link(Automount *a, Mount *m); -- - const char* automount_state_to_string(AutomountState i) _const_; - AutomountState automount_state_from_string(const char *s) _pure_; - -diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 -index 33c6880..3f064a9 100644 ---- a/src/core/load-fragment-gperf.gperf.m4 -+++ b/src/core/load-fragment-gperf.gperf.m4 -@@ -117,7 +117,7 @@ Unit.PropagateReloadTo, config_parse_unit_deps, UNIT_PROPAG - Unit.ReloadPropagatedFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 - Unit.PropagateReloadFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 - Unit.PartOf, config_parse_unit_deps, UNIT_PART_OF, 0 --Unit.RequiresMountsFor, config_parse_unit_requires_mounts_for, 0, offsetof(Unit, requires_mounts_for) -+Unit.RequiresMountsFor, config_parse_unit_requires_mounts_for, 0, 0 - Unit.StopWhenUnneeded, config_parse_bool, 0, offsetof(Unit, stop_when_unneeded) - Unit.RefuseManualStart, config_parse_bool, 0, offsetof(Unit, refuse_manual_start) - Unit.RefuseManualStop, config_parse_bool, 0, offsetof(Unit, refuse_manual_stop) -diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c -index f4a268c..ed8602f 100644 ---- a/src/core/load-fragment.c -+++ b/src/core/load-fragment.c -@@ -1742,33 +1742,48 @@ int config_parse_unit_condition_null(const char *unit, - DEFINE_CONFIG_PARSE_ENUM(config_parse_notify_access, notify_access, NotifyAccess, "Failed to parse notify access specifier"); - DEFINE_CONFIG_PARSE_ENUM(config_parse_start_limit_action, start_limit_action, StartLimitAction, "Failed to parse start limit action specifier"); - --int config_parse_unit_requires_mounts_for(const char *unit, -- const char *filename, -- unsigned line, -- const char *section, -- const char *lvalue, -- int ltype, -- const char *rvalue, -- void *data, -- void *userdata) { -+int config_parse_unit_requires_mounts_for( -+ const char *unit, -+ const char *filename, -+ unsigned line, -+ const char *section, -+ const char *lvalue, -+ int ltype, -+ const char *rvalue, -+ void *data, -+ void *userdata) { - - Unit *u = userdata; -+ char *state; -+ size_t l; -+ char *w; - int r; -- bool empty_before; - - assert(filename); - assert(lvalue); - assert(rvalue); - assert(data); - -- empty_before = !u->requires_mounts_for; -+ FOREACH_WORD_QUOTED(w, l, rvalue, state) { -+ _cleanup_free_ char *n; -+ -+ n = strndup(w, l); -+ if (!n) -+ return log_oom(); - -- r = config_parse_path_strv(unit, filename, line, section, lvalue, ltype, -- rvalue, data, userdata); -+ if (!utf8_is_valid(n)) { -+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, -+ "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); -+ continue; -+ } - -- /* Make it easy to find units with requires_mounts set */ -- if (empty_before && u->requires_mounts_for) -- LIST_PREPEND(Unit, has_requires_mounts_for, u->manager->has_requires_mounts_for, u); -+ r = unit_require_mounts_for(u, n); -+ if (r < 0) { -+ log_syntax(unit, LOG_ERR, filename, line, r, -+ "Failed to add required mount for, ignoring: %s", rvalue); -+ continue; -+ } -+ } - - return r; - } -diff --git a/src/core/manager.c b/src/core/manager.c -index 669af15..dadbedd 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -771,6 +771,9 @@ void manager_free(Manager *m) { - for (i = 0; i < RLIMIT_NLIMITS; i++) - free(m->rlimit[i]); - -+ assert(hashmap_isempty(m->units_requiring_mounts_for)); -+ hashmap_free(m->units_requiring_mounts_for); -+ - free(m); - } - -@@ -783,9 +786,11 @@ int manager_enumerate(Manager *m) { - /* Let's ask every type to load all units from disk/kernel - * that it might know */ - for (c = 0; c < _UNIT_TYPE_MAX; c++) -- if (unit_vtable[c]->enumerate) -- if ((q = unit_vtable[c]->enumerate(m)) < 0) -+ if (unit_vtable[c]->enumerate) { -+ q = unit_vtable[c]->enumerate(m); -+ if (q < 0) - r = q; -+ } - - manager_dispatch_load_queue(m); - return r; -@@ -2765,6 +2770,41 @@ void manager_status_printf(Manager *m, bool ephemeral, const char *status, const - va_end(ap); - } - -+int manager_get_unit_by_path(Manager *m, const char *path, const char *suffix, Unit **_found) { -+ _cleanup_free_ char *p = NULL; -+ Unit *found; -+ -+ assert(m); -+ assert(path); -+ assert(suffix); -+ assert(_found); -+ -+ p = unit_name_from_path(path, suffix); -+ if (!p) -+ return -ENOMEM; -+ -+ found = manager_get_unit(m, p); -+ if (!found) { -+ *_found = NULL; -+ return 0; -+ } -+ -+ *_found = found; -+ return 1; -+} -+ -+Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path) { -+ char p[strlen(path)+1]; -+ -+ assert(m); -+ assert(path); -+ -+ strcpy(p, path); -+ path_kill_slashes(p); -+ -+ return hashmap_get(m->units_requiring_mounts_for, streq(p, "/") ? "" : p); -+} -+ - void watch_init(Watch *w) { - assert(w); - -diff --git a/src/core/manager.h b/src/core/manager.h -index 3969553..a3049b5 100644 ---- a/src/core/manager.h -+++ b/src/core/manager.h -@@ -103,9 +103,6 @@ struct Manager { - * type we maintain a per type linked list */ - LIST_HEAD(Unit, units_by_type[_UNIT_TYPE_MAX]); - -- /* To optimize iteration of units that have requires_mounts_for set */ -- LIST_HEAD(Unit, has_requires_mounts_for); -- - /* Units that need to be loaded */ - LIST_HEAD(Unit, load_queue); /* this is actually more a stack than a queue, but uh. */ - -@@ -251,6 +248,11 @@ struct Manager { - - char *switch_root; - char *switch_root_init; -+ -+ /* This maps all possible path prefixes to the units needing -+ * them. It's a hashmap with a path string as key and a Set as -+ * value where Unit objects are contained. */ -+ Hashmap *units_requiring_mounts_for; - }; - - int manager_new(SystemdRunningAs running_as, bool reexecuting, Manager **m); -@@ -263,6 +265,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds); - Job *manager_get_job(Manager *m, uint32_t id); - Unit *manager_get_unit(Manager *m, const char *name); - -+int manager_get_unit_by_path(Manager *m, const char *path, const char *suffix, Unit **_found); -+ - int manager_get_job_from_dbus_path(Manager *m, const char *s, Job **_j); - - int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DBusError *e, Unit **_ret); -@@ -316,4 +320,6 @@ void manager_recheck_journal(Manager *m); - void manager_set_show_status(Manager *m, bool b); - void manager_status_printf(Manager *m, bool ephemeral, const char *status, const char *format, ...) _printf_attr_(4,5); - -+Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path); -+ - void watch_init(Watch *w); -diff --git a/src/core/mount.c b/src/core/mount.c -index 78c5c1e..3d46557 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -157,138 +157,58 @@ _pure_ static MountParameters* get_mount_parameters(Mount *m) { - } - - static int mount_add_mount_links(Mount *m) { -- Unit *other; -- int r; -+ _cleanup_free_ char *parent = NULL; - MountParameters *pm; -- -- assert(m); -- -- pm = get_mount_parameters_fragment(m); -- -- /* Adds in links to other mount points that might lie below or -- * above us in the hierarchy */ -- -- LIST_FOREACH(units_by_type, other, UNIT(m)->manager->units_by_type[UNIT_MOUNT]) { -- Mount *n = MOUNT(other); -- MountParameters *pn; -- -- if (n == m) -- continue; -- -- if (UNIT(n)->load_state != UNIT_LOADED) -- continue; -- -- pn = get_mount_parameters_fragment(n); -- -- if (path_startswith(m->where, n->where)) { -- -- if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(n), true)) < 0) -- return r; -- -- if (pn) -- if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(n), true)) < 0) -- return r; -- -- } else if (path_startswith(n->where, m->where)) { -- -- if ((r = unit_add_dependency(UNIT(n), UNIT_AFTER, UNIT(m), true)) < 0) -- return r; -- -- if (pm) -- if ((r = unit_add_dependency(UNIT(n), UNIT_REQUIRES, UNIT(m), true)) < 0) -- return r; -- -- } else if (pm && pm->what && path_startswith(pm->what, n->where)) { -- -- if ((r = unit_add_dependency(UNIT(m), UNIT_AFTER, UNIT(n), true)) < 0) -- return r; -- -- if ((r = unit_add_dependency(UNIT(m), UNIT_REQUIRES, UNIT(n), true)) < 0) -- return r; -- -- } else if (pn && pn->what && path_startswith(pn->what, m->where)) { -- -- if ((r = unit_add_dependency(UNIT(n), UNIT_AFTER, UNIT(m), true)) < 0) -- return r; -- -- if ((r = unit_add_dependency(UNIT(n), UNIT_REQUIRES, UNIT(m), true)) < 0) -- return r; -- } -- } -- -- return 0; --} -- --static int mount_add_swap_links(Mount *m) { - Unit *other; -+ Iterator i; -+ Set *s; - int r; - - assert(m); - -- LIST_FOREACH(units_by_type, other, UNIT(m)->manager->units_by_type[UNIT_SWAP]) { -- r = swap_add_one_mount_link(SWAP(other), m); -+ if (!path_equal(m->where, "/")) { -+ /* Adds in links to other mount points that might lie further -+ * up in the hierarchy */ -+ r = path_get_parent(m->where, &parent); - if (r < 0) - return r; -- } - -- return 0; --} -- --static int mount_add_path_links(Mount *m) { -- Unit *other; -- int r; -- -- assert(m); -- -- LIST_FOREACH(units_by_type, other, UNIT(m)->manager->units_by_type[UNIT_PATH]) { -- r = path_add_one_mount_link(PATH(other), m); -+ r = unit_require_mounts_for(UNIT(m), parent); - if (r < 0) - return r; - } - -- return 0; --} -- --static int mount_add_automount_links(Mount *m) { -- Unit *other; -- int r; -- -- assert(m); -- -- LIST_FOREACH(units_by_type, other, UNIT(m)->manager->units_by_type[UNIT_AUTOMOUNT]) { -- r = automount_add_one_mount_link(AUTOMOUNT(other), m); -+ /* Adds in links to other mount points that might be needed -+ * 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)) { -+ r = unit_require_mounts_for(UNIT(m), pm->what); - if (r < 0) - return r; - } - -- return 0; --} -+ /* Adds in links to other units that use this path or paths -+ * further down in the hierarchy */ -+ s = manager_get_units_requiring_mounts_for(UNIT(m)->manager, m->where); -+ SET_FOREACH(other, s, i) { - --static int mount_add_socket_links(Mount *m) { -- Unit *other; -- int r; -+ if (other->load_state != UNIT_LOADED) -+ continue; - -- assert(m); -+ if (other == UNIT(m)) -+ continue; - -- LIST_FOREACH(units_by_type, other, UNIT(m)->manager->units_by_type[UNIT_SOCKET]) { -- r = socket_add_one_mount_link(SOCKET(other), m); -+ r = unit_add_dependency(other, UNIT_AFTER, UNIT(m), true); - if (r < 0) - return r; -- } - -- return 0; --} -- --static int mount_add_requires_mounts_links(Mount *m) { -- Unit *other; -- int r; -- -- assert(m); -- -- LIST_FOREACH(has_requires_mounts_for, other, UNIT(m)->manager->has_requires_mounts_for) { -- r = unit_add_one_mount_link(other, m); -- if (r < 0) -- return r; -+ if (UNIT(m)->fragment_path) { -+ /* If we have fragment configuration, then make this dependency required */ -+ r = unit_add_dependency(other, UNIT_REQUIRES, UNIT(m), true); -+ if (r < 0) -+ return r; -+ } - } - - return 0; -@@ -567,8 +487,9 @@ static int mount_fix_timeouts(Mount *m) { - } - - static int mount_verify(Mount *m) { -+ _cleanup_free_ char *e = NULL; - bool b; -- char *e; -+ - assert(m); - - if (UNIT(m)->load_state != UNIT_LOADED) -@@ -577,12 +498,11 @@ static int mount_verify(Mount *m) { - if (!m->from_fragment && !m->from_proc_self_mountinfo) - return -ENOENT; - -- if (!(e = unit_name_from_path(m->where, ".mount"))) -+ e = unit_name_from_path(m->where, ".mount"); -+ if (!e) - return -ENOMEM; - - b = unit_has_name(UNIT(m), e); -- free(e); -- - if (!b) { - log_error_unit(UNIT(m)->id, - "%s's Where setting doesn't match unit name. Refusing.", -@@ -646,26 +566,6 @@ static int mount_add_extras(Mount *m) { - if (r < 0) - return r; - -- r = mount_add_socket_links(m); -- if (r < 0) -- return r; -- -- r = mount_add_swap_links(m); -- if (r < 0) -- return r; -- -- r = mount_add_path_links(m); -- if (r < 0) -- return r; -- -- r = mount_add_requires_mounts_links(m); -- if (r < 0) -- return r; -- -- r = mount_add_automount_links(m); -- if (r < 0) -- return r; -- - r = mount_add_quota_links(m); - if (r < 0) - return r; -@@ -1650,79 +1550,56 @@ fail: - static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { - int r = 0; - unsigned i; -- char *device, *path, *options, *options2, *fstype, *d, *p, *o; - - assert(m); - - rewind(m->proc_self_mountinfo); - - for (i = 1;; i++) { -+ _cleanup_free_ char *device = NULL, *path = NULL, *options = NULL, *options2 = NULL, *fstype = NULL, *d = NULL, *p = NULL, *o = NULL; - int k; - -- device = path = options = options2 = fstype = d = p = o = NULL; -- -- if ((k = fscanf(m->proc_self_mountinfo, -- "%*s " /* (1) mount id */ -- "%*s " /* (2) parent id */ -- "%*s " /* (3) major:minor */ -- "%*s " /* (4) root */ -- "%ms " /* (5) mount point */ -- "%ms" /* (6) mount options */ -- "%*[^-]" /* (7) optional fields */ -- "- " /* (8) separator */ -- "%ms " /* (9) file system type */ -- "%ms" /* (10) mount source */ -- "%ms" /* (11) mount options 2 */ -- "%*[^\n]", /* some rubbish at the end */ -- &path, -- &options, -- &fstype, -- &device, -- &options2)) != 5) { -- -- if (k == EOF) -- break; -- -+ k = fscanf(m->proc_self_mountinfo, -+ "%*s " /* (1) mount id */ -+ "%*s " /* (2) parent id */ -+ "%*s " /* (3) major:minor */ -+ "%*s " /* (4) root */ -+ "%ms " /* (5) mount point */ -+ "%ms" /* (6) mount options */ -+ "%*[^-]" /* (7) optional fields */ -+ "- " /* (8) separator */ -+ "%ms " /* (9) file system type */ -+ "%ms" /* (10) mount source */ -+ "%ms" /* (11) mount options 2 */ -+ "%*[^\n]", /* some rubbish at the end */ -+ &path, -+ &options, -+ &fstype, -+ &device, -+ &options2); -+ -+ if (k == EOF) -+ break; -+ -+ if (k != 5) { - log_warning("Failed to parse /proc/self/mountinfo:%u.", i); -- goto clean_up; -+ continue; - } - - o = strjoin(options, ",", options2, NULL); -- if (!o) { -- r = -ENOMEM; -- goto finish; -- } -+ if (!o) -+ return log_oom(); - -- if (!(d = cunescape(device)) || -- !(p = cunescape(path))) { -- r = -ENOMEM; -- goto finish; -- } -+ d = cunescape(device); -+ p = cunescape(path); -+ if (!d || !p) -+ return log_oom(); - -- if ((k = mount_add_one(m, d, p, o, fstype, 0, set_flags)) < 0) -+ k = mount_add_one(m, d, p, o, fstype, 0, set_flags); -+ if (k < 0) - r = k; -- --clean_up: -- free(device); -- free(path); -- free(options); -- free(options2); -- free(fstype); -- free(d); -- free(p); -- free(o); - } - --finish: -- free(device); -- free(path); -- free(options); -- free(options2); -- free(fstype); -- free(d); -- free(p); -- free(o); -- - return r; - } - -diff --git a/src/core/path.c b/src/core/path.c -index 8a09deb..99e2fed 100644 ---- a/src/core/path.c -+++ b/src/core/path.c -@@ -241,10 +241,6 @@ static bool path_spec_check_good(PathSpec *s, bool initial) { - return good; - } - --static bool path_spec_startswith(PathSpec *s, const char *what) { -- return path_startswith(s->path, what); --} -- - static void path_spec_mkdir(PathSpec *s, mode_t mode) { - int r; - -@@ -301,38 +297,14 @@ static void path_done(Unit *u) { - path_free_specs(p); - } - --int path_add_one_mount_link(Path *p, Mount *m) { -+static int path_add_mount_links(Path *p) { - PathSpec *s; - int r; - - assert(p); -- assert(m); -- -- if (UNIT(p)->load_state != UNIT_LOADED || -- UNIT(m)->load_state != UNIT_LOADED) -- return 0; - - LIST_FOREACH(spec, s, p->specs) { -- if (!path_spec_startswith(s, m->where)) -- continue; -- -- r = unit_add_two_dependencies(UNIT(p), UNIT_AFTER, UNIT_REQUIRES, -- UNIT(m), true); -- if (r < 0) -- return r; -- } -- -- return 0; --} -- --static int path_add_mount_links(Path *p) { -- Unit *other; -- int r; -- -- assert(p); -- -- LIST_FOREACH(units_by_type, other, UNIT(p)->manager->units_by_type[UNIT_MOUNT]) { -- r = path_add_one_mount_link(p, MOUNT(other)); -+ r = unit_require_mounts_for(UNIT(p), s->path); - if (r < 0) - return r; - } -diff --git a/src/core/path.h b/src/core/path.h -index 6adab58..dec3df7 100644 ---- a/src/core/path.h -+++ b/src/core/path.h -@@ -90,10 +90,6 @@ struct Path { - PathResult result; - }; - --/* Called from the mount code figure out if a mount is a dependency of -- * any of the paths of this path object */ --int path_add_one_mount_link(Path *p, Mount *m); -- - void path_free_specs(Path *p); - - extern const UnitVTable path_vtable; -diff --git a/src/core/socket.c b/src/core/socket.c -index 25c2a51..778f8c8 100644 ---- a/src/core/socket.c -+++ b/src/core/socket.c -@@ -258,53 +258,24 @@ static int socket_verify(Socket *s) { - return 0; - } - --static bool socket_needs_mount(Socket *s, const char *prefix) { -+static int socket_add_mount_links(Socket *s) { - SocketPort *p; -- -- assert(s); -- -- LIST_FOREACH(port, p, s->ports) { -- -- if (p->type == SOCKET_SOCKET) { -- if (socket_address_needs_mount(&p->address, prefix)) -- return true; -- } else if (p->type == SOCKET_FIFO || p->type == SOCKET_SPECIAL) { -- if (path_startswith(p->path, prefix)) -- return true; -- } -- } -- -- return false; --} -- --int socket_add_one_mount_link(Socket *s, Mount *m) { - int r; - - assert(s); -- assert(m); - -- if (UNIT(s)->load_state != UNIT_LOADED || -- UNIT(m)->load_state != UNIT_LOADED) -- return 0; -- -- if (!socket_needs_mount(s, m->where)) -- return 0; -- -- r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true); -- if (r < 0) -- return r; -- -- return 0; --} -+ LIST_FOREACH(port, p, s->ports) { -+ const char *path = NULL; - --static int socket_add_mount_links(Socket *s) { -- Unit *other; -- int r; -+ if (p->type == SOCKET_SOCKET) -+ path = socket_address_get_path(&p->address); -+ else if (p->type == SOCKET_FIFO || p->type == SOCKET_SPECIAL) -+ path = p->path; - -- assert(s); -+ if (!path) -+ continue; - -- LIST_FOREACH(units_by_type, other, UNIT(s)->manager->units_by_type[UNIT_MOUNT]) { -- r = socket_add_one_mount_link(s, MOUNT(other)); -+ r = unit_require_mounts_for(UNIT(s), path); - if (r < 0) - return r; - } -diff --git a/src/core/socket.h b/src/core/socket.h -index 5733322..3d7eadc 100644 ---- a/src/core/socket.h -+++ b/src/core/socket.h -@@ -156,10 +156,6 @@ struct Socket { - /* Called from the service code when collecting fds */ - int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds); - --/* Called from the mount code figure out if a mount is a dependency of -- * any of the sockets of this socket */ --int socket_add_one_mount_link(Socket *s, Mount *m); -- - /* Called from the service code when a per-connection service ended */ - void socket_connection_unref(Socket *s); - -diff --git a/src/core/swap.c b/src/core/swap.c -index d225485..6f86a86 100644 ---- a/src/core/swap.c -+++ b/src/core/swap.c -@@ -137,42 +137,6 @@ static void swap_done(Unit *u) { - unit_unwatch_timer(u, &s->timer_watch); - } - --int swap_add_one_mount_link(Swap *s, Mount *m) { -- int r; -- -- assert(s); -- assert(m); -- -- if (UNIT(s)->load_state != UNIT_LOADED || -- UNIT(m)->load_state != UNIT_LOADED) -- return 0; -- -- if (is_device_path(s->what)) -- return 0; -- -- if (!path_startswith(s->what, m->where)) -- return 0; -- -- r = unit_add_two_dependencies(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true); -- if (r < 0) -- return r; -- -- return 0; --} -- --static int swap_add_mount_links(Swap *s) { -- Unit *other; -- int r; -- -- assert(s); -- -- LIST_FOREACH(units_by_type, other, UNIT(s)->manager->units_by_type[UNIT_MOUNT]) -- if ((r = swap_add_one_mount_link(s, MOUNT(other))) < 0) -- return r; -- -- return 0; --} -- - static int swap_add_device_links(Swap *s) { - SwapParameters *p; - -@@ -300,11 +264,11 @@ static int swap_load(Unit *u) { - if ((r = unit_set_description(u, s->what)) < 0) - return r; - -- r = swap_add_device_links(s); -+ r = unit_require_mounts_for(UNIT(s), s->what); - if (r < 0) - return r; - -- r = swap_add_mount_links(s); -+ r = swap_add_device_links(s); - if (r < 0) - return r; - -diff --git a/src/core/swap.h b/src/core/swap.h -index 7e48c0e..dd89535 100644 ---- a/src/core/swap.h -+++ b/src/core/swap.h -@@ -107,8 +107,6 @@ struct Swap { - - extern const UnitVTable swap_vtable; - --int swap_add_one_mount_link(Swap *s, Mount *m); -- - int swap_dispatch_reload(Manager *m); - int swap_fd_event(Manager *m, int events); - -diff --git a/src/core/unit.c b/src/core/unit.c -index ab313b9..4b97710 100644 ---- a/src/core/unit.c -+++ b/src/core/unit.c -@@ -374,6 +374,34 @@ static void unit_remove_transient(Unit *u) { - } - } - -+static void unit_free_requires_mounts_for(Unit *u) { -+ char **j; -+ -+ STRV_FOREACH(j, u->requires_mounts_for) { -+ char s[strlen(*j) + 1]; -+ -+ PATH_FOREACH_PREFIX_MORE(s, *j) { -+ char *y; -+ Set *x; -+ -+ x = hashmap_get2(u->manager->units_requiring_mounts_for, s, (void**) &y); -+ if (!x) -+ continue; -+ -+ set_remove(x, u); -+ -+ if (set_isempty(x)) { -+ hashmap_remove(u->manager->units_requiring_mounts_for, y); -+ free(y); -+ set_free(x); -+ } -+ } -+ } -+ -+ strv_free(u->requires_mounts_for); -+ u->requires_mounts_for = NULL; -+} -+ - void unit_free(Unit *u) { - UnitDependency d; - Iterator i; -@@ -390,6 +418,8 @@ void unit_free(Unit *u) { - if (UNIT_VTABLE(u)->done) - UNIT_VTABLE(u)->done(u); - -+ unit_free_requires_mounts_for(u); -+ - SET_FOREACH(t, u->names, i) - hashmap_remove_value(u->manager->units, t, u); - -@@ -408,11 +438,6 @@ void unit_free(Unit *u) { - for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++) - bidi_set_free(u, u->dependencies[d]); - -- if (u->requires_mounts_for) { -- LIST_REMOVE(Unit, has_requires_mounts_for, u->manager->has_requires_mounts_for, u); -- strv_free(u->requires_mounts_for); -- } -- - if (u->type != _UNIT_TYPE_INVALID) - LIST_REMOVE(Unit, units_by_type, u->manager->units_by_type[u->type], u); - -@@ -2659,40 +2684,39 @@ void unit_ref_unset(UnitRef *ref) { - ref->unit = NULL; - } - --int unit_add_one_mount_link(Unit *u, Mount *m) { -+int unit_add_mount_links(Unit *u) { - char **i; -+ int r; - - assert(u); -- assert(m); -- -- if (u->load_state != UNIT_LOADED || -- UNIT(m)->load_state != UNIT_LOADED) -- return 0; - - STRV_FOREACH(i, u->requires_mounts_for) { -+ char prefix[strlen(*i) + 1]; - -- if (UNIT(m) == u) -- continue; -+ PATH_FOREACH_PREFIX_MORE(prefix, *i) { -+ Unit *m; - -- if (!path_startswith(*i, m->where)) -- continue; -- -- return unit_add_two_dependencies(u, UNIT_AFTER, UNIT_REQUIRES, UNIT(m), true); -- } -- -- return 0; --} -+ r = manager_get_unit_by_path(u->manager, prefix, ".mount", &m); -+ if (r < 0) -+ return r; -+ if (r == 0) -+ continue; -+ if (m == u) -+ continue; - --int unit_add_mount_links(Unit *u) { -- Unit *other; -- int r; -+ if (m->load_state != UNIT_LOADED) -+ continue; - -- assert(u); -+ r = unit_add_dependency(u, UNIT_AFTER, m, true); -+ if (r < 0) -+ return r; - -- LIST_FOREACH(units_by_type, other, u->manager->units_by_type[UNIT_MOUNT]) { -- r = unit_add_one_mount_link(u, MOUNT(other)); -- if (r < 0) -- return r; -+ if (m->fragment_path) { -+ r = unit_add_dependency(u, UNIT_REQUIRES, m, true); -+ if (r < 0) -+ return r; -+ } -+ } - } - - return 0; -@@ -3012,6 +3036,86 @@ int unit_kill_context( - return wait_for_exit; - } - -+int unit_require_mounts_for(Unit *u, const char *path) { -+ char prefix[strlen(path) + 1], *p; -+ int r; -+ -+ assert(u); -+ assert(path); -+ -+ /* Registers a unit for requiring a certain path and all its -+ * prefixes. We keep a simple array of these paths in the -+ * unit, since its usually short. However, we build a prefix -+ * table for all possible prefixes so that new appearing mount -+ * units can easily determine which units to make themselves a -+ * dependency of. */ -+ -+ p = strdup(path); -+ if (!p) -+ return -ENOMEM; -+ -+ path_kill_slashes(p); -+ -+ if (!path_is_absolute(p)) { -+ free(p); -+ return -EINVAL; -+ } -+ -+ if (!path_is_safe(p)) { -+ free(p); -+ return -EPERM; -+ } -+ -+ if (strv_contains(u->requires_mounts_for, p)) { -+ free(p); -+ return 0; -+ } -+ -+ r = strv_push(&u->requires_mounts_for, p); -+ if (r < 0) { -+ free(p); -+ return r; -+ } -+ -+ PATH_FOREACH_PREFIX_MORE(prefix, p) { -+ Set *x; -+ -+ x = hashmap_get(u->manager->units_requiring_mounts_for, prefix); -+ if (!x) { -+ char *q; -+ -+ if (!u->manager->units_requiring_mounts_for) { -+ u->manager->units_requiring_mounts_for = hashmap_new(string_hash_func, string_compare_func); -+ if (!u->manager->units_requiring_mounts_for) -+ return -ENOMEM; -+ } -+ -+ q = strdup(prefix); -+ if (!q) -+ return -ENOMEM; -+ -+ x = set_new(NULL, NULL); -+ if (!x) { -+ free(q); -+ return -ENOMEM; -+ } -+ -+ r = hashmap_put(u->manager->units_requiring_mounts_for, q, x); -+ if (r < 0) { -+ free(q); -+ set_free(x); -+ return r; -+ } -+ } -+ -+ r = set_put(x, u); -+ if (r < 0) -+ return r; -+ } -+ -+ return 0; -+} -+ - static const char* const unit_active_state_table[_UNIT_ACTIVE_STATE_MAX] = { - [UNIT_ACTIVE] = "active", - [UNIT_RELOADING] = "reloading", -diff --git a/src/core/unit.h b/src/core/unit.h -index 0caea18..6dd750f 100644 ---- a/src/core/unit.h -+++ b/src/core/unit.h -@@ -173,7 +173,6 @@ struct Unit { - - /* Counterparts in the cgroup filesystem */ - char *cgroup_path; -- bool cgroup_realized; - CGroupControllerMask cgroup_mask; - - UnitRef slice; -@@ -255,6 +254,8 @@ struct Unit { - bool no_gc:1; - - bool in_audit:1; -+ -+ bool cgroup_realized:1; - }; - - struct UnitStatusMessageFormats { -@@ -589,7 +590,6 @@ void unit_ref_unset(UnitRef *ref); - #define UNIT_DEREF(ref) ((ref).unit) - #define UNIT_ISSET(ref) (!!(ref).unit) - --int unit_add_one_mount_link(Unit *u, Mount *m); - int unit_add_mount_links(Unit *u); - - int unit_exec_context_defaults(Unit *u, ExecContext *c); -@@ -609,6 +609,8 @@ int unit_kill_context(Unit *u, KillContext *c, bool sigkill, pid_t main_pid, pid - - int unit_make_transient(Unit *u); - -+int unit_require_mounts_for(Unit *u, const char *path); -+ - const char *unit_active_state_to_string(UnitActiveState i) _const_; - UnitActiveState unit_active_state_from_string(const char *s) _pure_; - -diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c -index c583d3d..9224208 100644 ---- a/src/shared/socket-util.c -+++ b/src/shared/socket-util.c -@@ -486,16 +486,16 @@ bool socket_address_is_netlink(const SocketAddress *a, const char *s) { - return socket_address_equal(a, &b); - } - --bool socket_address_needs_mount(const SocketAddress *a, const char *prefix) { -+const char* socket_address_get_path(const SocketAddress *a) { - assert(a); - - if (socket_address_family(a) != AF_UNIX) -- return false; -+ return NULL; - - if (a->sockaddr.un.sun_path[0] == 0) -- return false; -+ return NULL; - -- return path_startswith(a->sockaddr.un.sun_path, prefix); -+ return a->sockaddr.un.sun_path; - } - - bool socket_ipv6_is_supported(void) { -diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h -index 7829a33..e0b85ad 100644 ---- a/src/shared/socket-util.h -+++ b/src/shared/socket-util.h -@@ -92,7 +92,7 @@ int make_socket_fd(const char* address, int flags); - - bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _pure_; - --bool socket_address_needs_mount(const SocketAddress *a, const char *prefix); -+const char* socket_address_get_path(const SocketAddress *a); - - const char* socket_address_bind_ipv6_only_to_string(SocketAddressBindIPv6Only b) _const_; - SocketAddressBindIPv6Only socket_address_bind_ipv6_only_from_string(const char *s) _pure_; diff --git a/SOURCES/0044-logind-never-consider-a-closing-session-relevant-for.patch b/SOURCES/0044-logind-never-consider-a-closing-session-relevant-for.patch deleted file mode 100644 index 86aea72..0000000 --- a/SOURCES/0044-logind-never-consider-a-closing-session-relevant-for.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 48797bdc98bb45dbd1aa7150bac5eff0acd31d58 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 26 Sep 2013 21:32:47 +0200 -Subject: [PATCH] logind: never consider a closing session relevant for PK - checks - -https://bugzilla.redhat.com/show_bug.cgi?id=1010215 ---- - src/login/logind-dbus.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 77dda10..9f4c120 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -957,6 +957,7 @@ static int have_multiple_sessions( - * count, and non-login sessions do not count either. */ - HASHMAP_FOREACH(session, m->sessions, i) - if (session->class == SESSION_USER && -+ !session->closing && - session->user->uid != uid) - return true; - 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-man-drop-references-to-cgroup-wher-appropriate.patch b/SOURCES/0045-man-drop-references-to-cgroup-wher-appropriate.patch deleted file mode 100644 index c2a207f..0000000 --- a/SOURCES/0045-man-drop-references-to-cgroup-wher-appropriate.patch +++ /dev/null @@ -1,436 +0,0 @@ -From a8c3f5121fac2cc4f8e3221a5a06b63d2e9c6f02 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 27 Sep 2013 00:05:07 +0200 -Subject: [PATCH] man: drop references to "cgroup" wher appropriate - -Since cgroups are mostly now an implementation detail of systemd lets -deemphasize it a bit in the man pages. This renames systemd.cgroup(5) to -systemd.resource-control(5) and uses the term "resource control" rather -than "cgroup" where appropriate. - -This leaves the word "cgroup" in at a couple of places though, like for -example systemd-cgtop and systemd-cgls where cgroup stuff is at the core -of what is happening. - -Conflicts: - man/systemd.exec.xml ---- - Makefile-man.am | 2 +- - man/loginctl.xml | 4 ++-- - man/machinectl.xml | 4 ++-- - man/pam_systemd.xml | 2 +- - man/systemctl.xml | 14 ++++++------- - man/systemd-cgls.xml | 6 +++--- - man/systemd-cgtop.xml | 4 ++-- - man/systemd.exec.xml | 5 +++-- - man/systemd.mount.xml | 6 +++--- - ...emd.cgroup.xml => systemd.resource-control.xml} | 24 ++++++++++------------ - man/systemd.scope.xml | 2 +- - man/systemd.service.xml | 6 +++--- - man/systemd.slice.xml | 22 ++++++++++---------- - man/systemd.socket.xml | 12 +++++------ - man/systemd.swap.xml | 6 +++--- - 15 files changed, 59 insertions(+), 60 deletions(-) - rename man/{systemd.cgroup.xml => systemd.resource-control.xml} (96%) - -diff --git a/Makefile-man.am b/Makefile-man.am -index 1f63595..c8a4342 100644 ---- a/Makefile-man.am -+++ b/Makefile-man.am -@@ -78,7 +78,6 @@ MANPAGES += \ - man/systemd-update-utmp.service.8 \ - man/systemd.1 \ - man/systemd.automount.5 \ -- man/systemd.cgroup.5 \ - man/systemd.device.5 \ - man/systemd.exec.5 \ - man/systemd.journal-fields.7 \ -@@ -86,6 +85,7 @@ MANPAGES += \ - man/systemd.mount.5 \ - man/systemd.path.5 \ - man/systemd.preset.5 \ -+ man/systemd.resource-control.5 \ - man/systemd.scope.5 \ - man/systemd.service.5 \ - man/systemd.slice.5 \ -diff --git a/man/loginctl.xml b/man/loginctl.xml -index ef0dfc0..1b54ff7 100644 ---- a/man/loginctl.xml -+++ b/man/loginctl.xml -@@ -117,8 +117,8 @@ - - - -- Do not ellipsize cgroup -- members. -+ Do not ellipsize -+ process tree entries. - - - -diff --git a/man/machinectl.xml b/man/machinectl.xml -index 5efa3a5..2ed9f2e 100644 ---- a/man/machinectl.xml -+++ b/man/machinectl.xml -@@ -117,8 +117,8 @@ - - - -- Do not ellipsize cgroup -- members. -+ Do not ellipsize -+ process tree entries. - - - -diff --git a/man/pam_systemd.xml b/man/pam_systemd.xml -index 951ae20..0e25a4a 100644 ---- a/man/pam_systemd.xml -+++ b/man/pam_systemd.xml -@@ -55,7 +55,7 @@ - Description - - pam_systemd registers user -- sessions in the systemd login manager -+ sessions with the systemd login manager - systemd-logind.service8, - and hence the systemd control group hierarchy. - -diff --git a/man/systemctl.xml b/man/systemctl.xml -index 51c34b7..a70c964 100644 ---- a/man/systemctl.xml -+++ b/man/systemctl.xml -@@ -187,7 +187,7 @@ systemctl start foo - - - -- Do not ellipsize unit names, cgroup members, and -+ Do not ellipsize unit names, process tree entries, and - truncate unit descriptions in the output of - list-units and - list-jobs. -@@ -724,14 +724,14 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - - Set the specified unit properties at runtime where - this is supported. This allows changing configuration -- parameter properties such as resource management controls at -+ parameter properties such as resource control settings at - runtime. Not all properties may be changed at runtime, but -- many resource management settings (primarily those in -- systemd.cgroup5) -+ many resource control settings (primarily those in -+ systemd.resource-control5) - may. The changes are applied instantly, and stored on disk - for future boots, unless is -- passed, in which case the settings only apply until the next -- reboot. The syntax of the property assignment follows -+ passed, in which case the settings only apply until the -+ next reboot. The syntax of the property assignment follows - closely the syntax of assignments in unit files. - - Example: systemctl set-property foobar.service CPUShares=777 -@@ -1299,7 +1299,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - journalctl1, - loginctl1, - systemd.unit5, -- systemd.cgroup5, -+ systemd.resource-management5, - systemd.special7, - wall1, - systemd.preset5 -diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml -index fcaf894..432706b 100644 ---- a/man/systemd-cgls.xml -+++ b/man/systemd-cgls.xml -@@ -116,8 +116,8 @@ - - - -- Do not ellipsize cgroup -- members. -+ Do not ellipsize -+ process tree members. - - - -@@ -132,7 +132,7 @@ - - - -- Limit cgroups shown to -+ Limit control groups shown to - the part corresponding to the - container MACHINE. - -diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml -index 51549c4..7faedfb 100644 ---- a/man/systemd-cgtop.xml -+++ b/man/systemd-cgtop.xml -@@ -80,7 +80,7 @@ - MemoryAccounting=1 and - BlockIOAccounting=1 settings in the - unit files in question (See -- systemd.cgroup5 -+ systemd.resource-control5 - for details). - - To emphasize this: unless -@@ -274,7 +274,7 @@ - systemd1, - systemctl1, - systemd-cgls1, -- systemd.cgroup5, -+ systemd.resource-control5, - top1 - - -diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml -index 5721dc1..28d7fd4 100644 ---- a/man/systemd.exec.xml -+++ b/man/systemd.exec.xml -@@ -1017,8 +1017,9 @@ - systemd.swap5, - systemd.mount5, - systemd.kill5, -- systemd.cgroup5, -- systemd.directives7 -+ systemd.resource-control5, -+ systemd.directives7, -+ exec3 - - - -diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml -index e5b5c3c..48af1ca 100644 ---- a/man/systemd.mount.xml -+++ b/man/systemd.mount.xml -@@ -76,8 +76,8 @@ - systemd.kill5, - which define the way the processes are terminated, and - in -- systemd.cgroup5, -- which configure control group settings for the -+ systemd.resource-control5, -+ which configure resource control settings for the - processes of the service. Note that the User= and - Group= options are not particularly useful for mount - units specifying a Type= option or -@@ -302,7 +302,7 @@ - systemd.unit5, - systemd.exec5, - systemd.kill5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.service5, - systemd.device5, - proc5, -diff --git a/man/systemd.cgroup.xml b/man/systemd.resource-control.xml -similarity index 96% -rename from man/systemd.cgroup.xml -rename to man/systemd.resource-control.xml -index cc0eb15..2427f208 100644 ---- a/man/systemd.cgroup.xml -+++ b/man/systemd.resource-control.xml -@@ -22,9 +22,9 @@ You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see . - --> - -- -+ - -- systemd.cgroup -+ systemd.resource-control - systemd - - -@@ -38,13 +38,13 @@ along with systemd; If not, see . - - - -- systemd.cgroup -+ systemd.resource-control - 5 - - - -- systemd.cgroup -- Control Group configuration unit settings -+ systemd.resource-control -+ Resource control unit settings - - - -@@ -63,12 +63,10 @@ along with systemd; If not, see . - - Unit configuration files for services, slices, scopes, - sockets, mount points, and swap devices share a subset of -- configuration options which configure the control group settings -- for spawned processes. -- -- Control Groups is a concept for organizing processes in a -- hierarch tree of named groups for the purpose of resource -- management. -+ configuration options for resource control of spawned -+ processes. Internally, this relies on the the Control Groups -+ kernel concept for organizing processes in a hierarchial tree of -+ named groups for the purpose of resource management. - - This man page lists the configuration options shared by - those six unit types. See -@@ -82,7 +80,7 @@ along with systemd; If not, see . - and - systemd.swap5 - for more information on the specific unit configuration files. The -- execution-specific configuration options are configured in the -+ resource control configuration options are configured in the - [Slice], [Scope], [Service], [Socket], [Mount], or [Swap] - sections, depending on the unit type. - -@@ -91,7 +89,7 @@ along with systemd; If not, see . - Options - - Units of the types listed above can have settings -- for cgroup configuration: -+ for resource control configuration: - - - -diff --git a/man/systemd.scope.xml b/man/systemd.scope.xml -index e8fa1ae..9813e0a 100644 ---- a/man/systemd.scope.xml -+++ b/man/systemd.scope.xml -@@ -86,7 +86,7 @@ along with systemd; If not, see . - systemd1, - systemd-run1, - systemd.unit5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.service5, - systemd.directives7. - -diff --git a/man/systemd.service.xml b/man/systemd.service.xml -index 8eda85f..45f96fa 100644 ---- a/man/systemd.service.xml -+++ b/man/systemd.service.xml -@@ -76,8 +76,8 @@ - systemd.kill5, - which define the way the processes of the service are - terminated, and in -- systemd.cgroup5, -- which configure control group settings for the -+ systemd.resource-control5, -+ which configure resource control settings for the - processes of the service. - - Unless DefaultDependencies= -@@ -1006,7 +1006,7 @@ - systemctl8, - systemd.unit5, - systemd.exec5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.kill5, - systemd.directives7 - -diff --git a/man/systemd.slice.xml b/man/systemd.slice.xml -index b7b0622..4d27ddf 100644 ---- a/man/systemd.slice.xml -+++ b/man/systemd.slice.xml -@@ -58,14 +58,14 @@ along with systemd; If not, see . - .slice encodes information about a slice which - is a concept for hierarchially managing resources of a group of - processes. This management is performed by creating a node in the -- control group tree. Units that manage processes (primarilly scope -- and service units) may be assigned to a specific slice. For each -- slice, certain resource limits may the be set that apply to all -- processes of all units contained in that slice. Slices are -- organized hierarchially in a tree. The name of the slice encodes -- the location in the tree. The name consists of a dash-separated -- series of names, which describes the path to the slice from the -- root slice. The root slice is named, -+ Linux Control Group (cgroup) tree. Units that manage processes -+ (primarilly scope and service units) may be assigned to a specific -+ slice. For each slice, certain resource limits may the be set that -+ apply to all processes of all units contained in that -+ slice. Slices are organized hierarchially in a tree. The name of -+ the slice encodes the location in the tree. The name consists of a -+ dash-separated series of names, which describes the path to the -+ slice from the root slice. The root slice is named, - -.slice. Example: - foo-bar.slice is a slice that is located - within foo.slice, which in turn is located in -@@ -89,9 +89,9 @@ along with systemd; If not, see . - files. The common configuration items are configured - in the generic [Unit] and [Install] sections. The - slice specific configuration options are configured in -- the [Slice] section. Currently, only generic cgroup settings -+ the [Slice] section. Currently, only generic resource control settings - as described in -- systemd.cgroup7 are allowed. -+ systemd.resource-control7 are allowed. - - - Unless DefaultDependencies=false -@@ -110,7 +110,7 @@ along with systemd; If not, see . - - systemd1, - systemd.unit5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.service5, - systemd.scope5, - systemd.special7, -diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml -index 419a38c..8c88d9f 100644 ---- a/man/systemd.socket.xml -+++ b/man/systemd.socket.xml -@@ -78,11 +78,11 @@ - commands are executed - in, and in - systemd.kill5, -- which define the way the processes are -- terminated, and in -- systemd.cgroup5, -- which configure control group settings for the -- processes of the service. -+ which define the way the processes are terminated, and -+ in -+ systemd.resource-control5, -+ which configure resource control settings for the -+ processes of the socket. - - For each socket file a matching service file - (see -@@ -712,7 +712,7 @@ - systemd.unit5, - systemd.exec5, - systemd.kill5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.service5, - systemd.directives7 - -diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml -index 18ef5b0..813ae6c 100644 ---- a/man/systemd.swap.xml -+++ b/man/systemd.swap.xml -@@ -76,8 +76,8 @@ - systemd.kill5, - which define the way the processes are - terminated, and in -- systemd.cgroup5, -- which configure control group settings for the -+ systemd.resource-control5, -+ which configure resource control settings for the - processes of the service. - - Swap units must be named after the devices -@@ -206,7 +206,7 @@ - systemd.unit5, - systemd.exec5, - systemd.kill5, -- systemd.cgroup5, -+ systemd.resource-control5, - systemd.device5, - systemd.mount5, - swapon8, 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/0046-systemctl-make-sure-set-property-mangles-unit-names.patch b/SOURCES/0046-systemctl-make-sure-set-property-mangles-unit-names.patch deleted file mode 100644 index 1c5dc03..0000000 --- a/SOURCES/0046-systemctl-make-sure-set-property-mangles-unit-names.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 86ccda12838942a4df2c974bad9386a60835ba67 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 27 Sep 2013 00:11:54 +0200 -Subject: [PATCH] systemctl: make sure set-property mangles unit names - ---- - src/systemctl/systemctl.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 57e5bb9..16da293 100644 ---- a/src/systemctl/systemctl.c -+++ b/src/systemctl/systemctl.c -@@ -3828,7 +3828,8 @@ static int append_assignment(DBusMessageIter *iter, const char *assignment) { - - static int set_property(DBusConnection *bus, char **args) { - -- _cleanup_free_ DBusMessage *m = NULL, *reply = NULL; -+ _cleanup_dbus_message_unref_ DBusMessage *m = NULL, *reply = NULL; -+ _cleanup_free_ char *n = NULL; - DBusMessageIter iter, sub; - dbus_bool_t runtime; - DBusError error; -@@ -3849,7 +3850,11 @@ static int set_property(DBusConnection *bus, char **args) { - - runtime = arg_runtime; - -- if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &args[1]) || -+ n = unit_name_mangle(args[1]); -+ if (!n) -+ return log_oom(); -+ -+ if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &n) || - !dbus_message_iter_append_basic(&iter, DBUS_TYPE_BOOLEAN, &runtime) || - !dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(sv)", &sub)) - return log_oom(); diff --git a/SOURCES/0047-dbus-fix-introspection-for-TimerSlackNSec.patch b/SOURCES/0047-dbus-fix-introspection-for-TimerSlackNSec.patch deleted file mode 100644 index b6f2a1f..0000000 --- a/SOURCES/0047-dbus-fix-introspection-for-TimerSlackNSec.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 21062f680e6aff80a41ebb3d90543c310f6c22e6 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 27 Sep 2013 00:35:36 +0200 -Subject: [PATCH] dbus: fix introspection for TimerSlackNSec - ---- - src/core/dbus-execute.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h -index 5a6a559..79bf308 100644 ---- a/src/core/dbus-execute.h -+++ b/src/core/dbus-execute.h -@@ -63,7 +63,7 @@ - " \n" \ - " \n" \ - " \n" \ -- " \n" \ -+ " \n" \ - " \n" \ - " \n" \ - " \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/0048-swap-properly-expose-timeout-property-on-the-bus.patch b/SOURCES/0048-swap-properly-expose-timeout-property-on-the-bus.patch deleted file mode 100644 index 93150d9..0000000 --- a/SOURCES/0048-swap-properly-expose-timeout-property-on-the-bus.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 83ee5d7f274a3a365fd0f4855ec14e444bc56321 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 27 Sep 2013 02:02:21 +0200 -Subject: [PATCH] swap: properly expose timeout property on the bus - ---- - src/core/dbus-swap.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/core/dbus-swap.c b/src/core/dbus-swap.c -index 86fcf16..06edfdc 100644 ---- a/src/core/dbus-swap.c -+++ b/src/core/dbus-swap.c -@@ -95,6 +95,7 @@ static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_swap_append_swap_result, swap_result, - static const BusProperty bus_swap_properties[] = { - { "What", bus_property_append_string, "s", offsetof(Swap, what), true }, - { "Priority", bus_swap_append_priority, "i", 0 }, -+ { "TimeoutUSec",bus_property_append_usec, "t", offsetof(Swap, timeout_usec)}, - BUS_EXEC_COMMAND_PROPERTY("ExecActivate", offsetof(Swap, exec_command[SWAP_EXEC_ACTIVATE]), false), - BUS_EXEC_COMMAND_PROPERTY("ExecDeactivate", offsetof(Swap, exec_command[SWAP_EXEC_DEACTIVATE]), false), - { "ControlPID", bus_property_append_pid, "u", offsetof(Swap, control_pid) }, diff --git a/SOURCES/0049-build-sys-restore-detection-of-sphinx.patch b/SOURCES/0049-build-sys-restore-detection-of-sphinx.patch deleted file mode 100644 index 41ee8fe..0000000 --- a/SOURCES/0049-build-sys-restore-detection-of-sphinx.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2127292995c93c4324cc15a8034e009fb78eb5a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Fri, 27 Sep 2013 08:24:00 +0200 -Subject: [PATCH] build-sys: restore detection of sphinx - ---- - configure.ac | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configure.ac b/configure.ac -index d3f853f..c7f4f1b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -185,6 +185,7 @@ AS_IF([test "x$enable_python_devel" != "xno"], [ - [have_python_devel=no])]) - AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes], - [AC_MSG_ERROR([*** python-devel support requested but libraries not found])]) -+ AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) - ]) - AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) - -@@ -1051,6 +1052,7 @@ AC_MSG_RESULT([ - SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} - Build Python: ${PYTHON} - Installation Python: ${PYTHON_BINARY} -+ sphinx binary: ${SPHINX_BUILD} - firmware path: ${FIRMWARE_PATH} - PAM modules dir: ${with_pamlibdir} - PAM configuration dir: ${with_pamconfdir} 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/0050-util-add-macro-for-iterating-through-all-prefixes-of.patch b/SOURCES/0050-util-add-macro-for-iterating-through-all-prefixes-of.patch deleted file mode 100644 index 5846c39..0000000 --- a/SOURCES/0050-util-add-macro-for-iterating-through-all-prefixes-of.patch +++ /dev/null @@ -1,119 +0,0 @@ -From c9f59a78c0016b37730cec831e1eec139ca4a561 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 25 Sep 2013 20:58:23 +0200 -Subject: [PATCH] util: add macro for iterating through all prefixes of a path - -Syntactic sugar in a macro PATH_FOREACH_PREFIX. ---- - src/shared/cgroup-util.c | 26 ++++---------------------- - src/shared/path-util.h | 3 +++ - src/test/test-path-util.c | 27 +++++++++++++++++++++++++++ - 3 files changed, 34 insertions(+), 22 deletions(-) - -diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c -index 2e630d4..dc0fe85 100644 ---- a/src/shared/cgroup-util.c -+++ b/src/shared/cgroup-util.c -@@ -456,23 +456,14 @@ int cg_migrate_recursive_fallback( - - /* This didn't work? Then let's try all prefixes of the destination */ - -- strcpy(prefix, pto); -- for (;;) { -- char *slash; -- -- slash = strrchr(prefix, '/'); -- if (!slash) -- break; -- -- *slash = 0; -- -+ PATH_FOREACH_PREFIX(prefix, pto) { - r = cg_migrate_recursive(cfrom, pfrom, cto, prefix, ignore_self, rem); - if (r >= 0) - break; - } - } - -- return r; -+ return 0; - } - - static const char *normalize_controller(const char *controller) { -@@ -661,23 +652,14 @@ int cg_attach_fallback(const char *controller, const char *path, pid_t pid) { - /* This didn't work? Then let's try all prefixes of - * the destination */ - -- strcpy(prefix, path); -- for (;;) { -- char *slash; -- -- slash = strrchr(prefix, '/'); -- if (!slash) -- break; -- -- *slash = 0; -- -+ PATH_FOREACH_PREFIX(prefix, path) { - r = cg_attach(controller, prefix, pid); - if (r >= 0) - break; - } - } - -- return r; -+ return 0; - } - - int cg_set_group_access( -diff --git a/src/shared/path-util.h b/src/shared/path-util.h -index 9452931..03f2cf2 100644 ---- a/src/shared/path-util.h -+++ b/src/shared/path-util.h -@@ -51,3 +51,6 @@ int path_is_read_only_fs(const char *path); - int path_is_os_tree(const char *path); - - int find_binary(const char *name, char **filename); -+ -+#define PATH_FOREACH_PREFIX(prefix, path) \ -+ for (char *_slash = strrchr(path_kill_slashes(strcpy(prefix, path)), '/'); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/')) -diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c -index b0aeb11..e303e48 100644 ---- a/src/test/test-path-util.c -+++ b/src/test/test-path-util.c -@@ -106,8 +106,35 @@ static void test_find_binary(void) { - assert(find_binary("xxxx-xxxx", &p) == -ENOENT); - } - -+static void test_prefixes(void) { -+ static const char* values[] = { "/a/b/c", "/a/b", "/a", "", NULL}; -+ unsigned i = 0; -+ char s[PATH_MAX]; -+ -+ PATH_FOREACH_PREFIX(s, "/a/b/c/d") { -+ log_error("---%s---", s); -+ assert_se(streq(s, values[i++])); -+ } -+ -+ assert_se(values[i] == NULL); -+ -+ i = 0; -+ PATH_FOREACH_PREFIX(s, "////a////b////c///d///////") -+ assert_se(streq(s, values[i++])); -+ -+ assert_se(values[i] == NULL); -+ -+ PATH_FOREACH_PREFIX(s, "////") -+ assert_se(streq(s, "")); -+ -+ PATH_FOREACH_PREFIX(s, "") -+ assert_not_reached("wut?"); -+ -+} -+ - int main(void) { - test_path(); - test_find_binary(); -+ test_prefixes(); - return 0; - } 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/0051-util-properly-handle-the-root-dir-in-PATH_FOREACH_PR.patch b/SOURCES/0051-util-properly-handle-the-root-dir-in-PATH_FOREACH_PR.patch deleted file mode 100644 index a3deb42..0000000 --- a/SOURCES/0051-util-properly-handle-the-root-dir-in-PATH_FOREACH_PR.patch +++ /dev/null @@ -1,94 +0,0 @@ -From dc5e623cbd6c4250d514ec1c9d67c338cd71934c Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 26 Sep 2013 19:58:33 +0200 -Subject: [PATCH] util: properly handle the root dir in PATH_FOREACH_PREFIX - -Also add PATH_FOREACH_PREFIX_MORE which includes the specified dir -itself in the iteration ---- - src/shared/path-util.h | 9 ++++++++- - src/test/test-path-util.c | 34 ++++++++++++++++++++++++++++++---- - 2 files changed, 38 insertions(+), 5 deletions(-) - -diff --git a/src/shared/path-util.h b/src/shared/path-util.h -index 03f2cf2..0a42de7 100644 ---- a/src/shared/path-util.h -+++ b/src/shared/path-util.h -@@ -52,5 +52,12 @@ int path_is_os_tree(const char *path); - - int find_binary(const char *name, char **filename); - -+/* Iterates through the path prefixes of the specified path, going up -+ * the tree, to root. Also returns "" (and not "/"!) for the root -+ * directory. Excludes the specified directory itself */ - #define PATH_FOREACH_PREFIX(prefix, path) \ -- for (char *_slash = strrchr(path_kill_slashes(strcpy(prefix, path)), '/'); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/')) -+ for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); streq(prefix, "/") ? NULL : strrchr(prefix, '/'); }); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/')) -+ -+/* Same as PATH_FOREACH_PREFIX but also includes the specified path itself */ -+#define PATH_FOREACH_PREFIX_MORE(prefix, path) \ -+ for (char *_slash = ({ path_kill_slashes(strcpy(prefix, path)); if (streq(prefix, "/")) prefix[0] = 0; strrchr(prefix, 0); }); _slash && !(*_slash = 0); _slash = strrchr((prefix), '/')) -diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c -index e303e48..ed3b315 100644 ---- a/src/test/test-path-util.c -+++ b/src/test/test-path-util.c -@@ -107,29 +107,55 @@ static void test_find_binary(void) { - } - - static void test_prefixes(void) { -- static const char* values[] = { "/a/b/c", "/a/b", "/a", "", NULL}; -- unsigned i = 0; -+ static const char* values[] = { "/a/b/c/d", "/a/b/c", "/a/b", "/a", "", NULL}; -+ unsigned i; - char s[PATH_MAX]; -+ bool b; - -- PATH_FOREACH_PREFIX(s, "/a/b/c/d") { -+ i = 0; -+ PATH_FOREACH_PREFIX_MORE(s, "/a/b/c/d") { - log_error("---%s---", s); - assert_se(streq(s, values[i++])); - } -+ assert_se(values[i] == NULL); - -+ i = 1; -+ PATH_FOREACH_PREFIX(s, "/a/b/c/d") { -+ log_error("---%s---", s); -+ assert_se(streq(s, values[i++])); -+ } - assert_se(values[i] == NULL); - - i = 0; -- PATH_FOREACH_PREFIX(s, "////a////b////c///d///////") -+ PATH_FOREACH_PREFIX_MORE(s, "////a////b////c///d///////") - assert_se(streq(s, values[i++])); -+ assert_se(values[i] == NULL); - -+ i = 1; -+ PATH_FOREACH_PREFIX(s, "////a////b////c///d///////") -+ assert_se(streq(s, values[i++])); - assert_se(values[i] == NULL); - - PATH_FOREACH_PREFIX(s, "////") -+ assert_not_reached("Wut?"); -+ -+ b = false; -+ PATH_FOREACH_PREFIX_MORE(s, "////") { -+ assert_se(!b); - assert_se(streq(s, "")); -+ b = true; -+ } -+ assert_se(b); - - PATH_FOREACH_PREFIX(s, "") - assert_not_reached("wut?"); - -+ b = false; -+ PATH_FOREACH_PREFIX_MORE(s, "") { -+ assert(!b); -+ assert(streq(s, "")); -+ b = true; -+ } - } - - int main(void) { diff --git a/SOURCES/0052-cgroup-get-rid-of-MemorySoftLimit.patch b/SOURCES/0052-cgroup-get-rid-of-MemorySoftLimit.patch deleted file mode 100644 index 025b012..0000000 --- a/SOURCES/0052-cgroup-get-rid-of-MemorySoftLimit.patch +++ /dev/null @@ -1,245 +0,0 @@ -From 5ba4f4d42db066c3a9255768d5c38d841127bd07 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 17 Sep 2013 14:58:00 -0500 -Subject: [PATCH] cgroup: get rid of MemorySoftLimit= - -The cgroup attribute memory.soft_limit_in_bytes is unlikely to stay -around in the kernel for good, so let's not expose it for now. We can -readd something like it later when the kernel guys decided on a final -API for this. - -Conflicts: - TODO ---- - TODO | 9 +++++++++ - man/systemd.resource-control.xml | 15 +++++---------- - src/core/cgroup.c | 16 ++-------------- - src/core/cgroup.h | 1 - - src/core/dbus-cgroup.c | 10 ++-------- - src/core/dbus-cgroup.h | 1 - - src/core/load-fragment-gperf.gperf.m4 | 1 - - src/core/load-fragment.c | 7 ++----- - src/systemctl/systemctl.c | 2 +- - 9 files changed, 21 insertions(+), 41 deletions(-) - -diff --git a/TODO b/TODO -index bfeaa81..4c3e14f 100644 ---- a/TODO -+++ b/TODO -@@ -58,6 +58,15 @@ CGroup Rework Completion: - - Features: - -+* always set memory.user_hierarchy for all cgroups we create -+ -+* After coming back from hibernation reset hibernation swap partition -+ -+* mounts: do not test each mount unit against each other mount unit to -+ determine prefixes. Instead generated list of all prefixes and -+ interate through that to bring down complexity from O(n^2) to O(n) -+ when loading units -+ - * Move backlight and random-seed into /var/lib/systemd - - * If we try to find a unit via a danglign symlink generate a clean -diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml -index 2427f208..de017a7 100644 ---- a/man/systemd.resource-control.xml -+++ b/man/systemd.resource-control.xml -@@ -134,22 +134,17 @@ along with systemd; If not, see . - - - MemoryLimit=bytes -- MemorySoftLimit=bytes - - -- Specify the hard and soft limits on maximum memory -- usage of the executed processes. The "hard" limit specifies -- how much process and kernel memory can be used by tasks in -- this unit, when there is no memory contention. If the kernel -- detects memory contention, memory reclaim will be performed -- until the memory usage is within the "soft" limit. Takes a -+ Specify the limit on maximum memory usage of the -+ executed processes. The limit specifies how much process and -+ kernel memory can be used by tasks in this unit. Takes a - memory size in bytes. If the value is suffixed with K, M, G - or T, the specified memory size is parsed as Kilobytes, - Megabytes, Gigabytes, or Terabytes (with the base 1024), - respectively. This controls the -- memory.limit_in_bytes and -- memory.soft_limit_in_bytes control group -- attributes. For details about these control group attributes, -+ memory.limit_in_bytes control group -+ attribute. For details about this control group attribute, - see memory.txt. - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 2f1e4a3..8bf4d89 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -33,7 +33,7 @@ void cgroup_context_init(CGroupContext *c) { - * structure is preinitialized to 0 */ - - c->cpu_shares = 1024; -- c->memory_limit = c->memory_soft_limit = (uint64_t) -1; -+ c->memory_limit = (uint64_t) -1; - c->blockio_weight = 1000; - } - -@@ -94,7 +94,6 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) { - "%sCPUShares=%lu\n" - "%sBlockIOWeight=%lu\n" - "%sMemoryLimit=%" PRIu64 "\n" -- "%sMemorySoftLimit=%" PRIu64 "\n" - "%sDevicePolicy=%s\n", - prefix, yes_no(c->cpu_accounting), - prefix, yes_no(c->blockio_accounting), -@@ -102,7 +101,6 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) { - prefix, c->cpu_shares, - prefix, c->blockio_weight, - prefix, c->memory_limit, -- prefix, c->memory_soft_limit, - prefix, cgroup_device_policy_to_string(c->device_policy)); - - LIST_FOREACH(device_allow, a, c->device_allow) -@@ -266,15 +264,6 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha - - if (r < 0) - log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); -- -- if (c->memory_soft_limit != (uint64_t) -1) { -- sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit); -- r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf); -- } else -- r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", "-1"); -- -- if (r < 0) -- log_error("Failed to set memory.soft_limit_in_bytes on %s: %s", path, strerror(-r)); - } - - if (mask & CGROUP_DEVICE) { -@@ -337,8 +326,7 @@ CGroupControllerMask cgroup_context_get_mask(CGroupContext *c) { - mask |= CGROUP_BLKIO; - - if (c->memory_accounting || -- c->memory_limit != (uint64_t) -1 || -- c->memory_soft_limit != (uint64_t) -1) -+ c->memory_limit != (uint64_t) -1) - mask |= CGROUP_MEMORY; - - if (c->device_allow || c->device_policy != CGROUP_AUTO) -diff --git a/src/core/cgroup.h b/src/core/cgroup.h -index 786bd71..0a079e9 100644 ---- a/src/core/cgroup.h -+++ b/src/core/cgroup.h -@@ -77,7 +77,6 @@ struct CGroupContext { - LIST_HEAD(CGroupBlockIODeviceBandwidth, blockio_device_bandwidths); - - uint64_t memory_limit; -- uint64_t memory_soft_limit; - - CGroupDevicePolicy device_policy; - LIST_HEAD(CGroupDeviceAllow, device_allow); -diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c -index 1f2a396..9ebcad9 100644 ---- a/src/core/dbus-cgroup.c -+++ b/src/core/dbus-cgroup.c -@@ -133,7 +133,6 @@ const BusProperty bus_cgroup_context_properties[] = { - { "BlockIOWriteBandwidth", bus_cgroup_append_device_bandwidths, "a(st)", 0 }, - { "MemoryAccounting", bus_property_append_bool, "b", offsetof(CGroupContext, memory_accounting) }, - { "MemoryLimit", bus_property_append_uint64, "t", offsetof(CGroupContext, memory_limit) }, -- { "MemorySoftLimit", bus_property_append_uint64, "t", offsetof(CGroupContext, memory_soft_limit) }, - { "DevicePolicy", bus_cgroup_append_device_policy, "s", offsetof(CGroupContext, device_policy) }, - { "DeviceAllow", bus_cgroup_append_device_allow, "a(ss)", 0 }, - {} -@@ -418,21 +417,16 @@ int bus_cgroup_set_property( - - return 1; - -- } else if (streq(name, "MemoryLimit") || streq(name, "MemorySoftLimit")) { -+ } else if (streq(name, "MemoryLimit")) { - - if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_UINT64) - return -EINVAL; - - if (mode != UNIT_CHECK) { - uint64_t limit; -- - dbus_message_iter_get_basic(i, &limit); - -- if (streq(name, "MemoryLimit")) -- c->memory_limit = limit; -- else -- c->memory_soft_limit = limit; -- -+ c->memory_limit = limit; - unit_write_drop_in_private_format(u, mode, name, "%s=%" PRIu64, name, limit); - } - -diff --git a/src/core/dbus-cgroup.h b/src/core/dbus-cgroup.h -index 4ce1e7e..e5ac4c3 100644 ---- a/src/core/dbus-cgroup.h -+++ b/src/core/dbus-cgroup.h -@@ -37,7 +37,6 @@ - " \n" \ - " \n" \ - " \n" \ -- " \n" \ - " \n" \ - " \n" - -diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 -index 3f064a9..31fb7bc 100644 ---- a/src/core/load-fragment-gperf.gperf.m4 -+++ b/src/core/load-fragment-gperf.gperf.m4 -@@ -89,7 +89,6 @@ $1.CPUAccounting, config_parse_bool, 0, - $1.CPUShares, config_parse_cpu_shares, 0, offsetof($1, cgroup_context) - $1.MemoryAccounting, config_parse_bool, 0, offsetof($1, cgroup_context.memory_accounting) - $1.MemoryLimit, config_parse_memory_limit, 0, offsetof($1, cgroup_context) --$1.MemorySoftLimit, config_parse_memory_limit, 0, offsetof($1, cgroup_context) - $1.DeviceAllow, config_parse_device_allow, 0, offsetof($1, cgroup_context) - $1.DevicePolicy, config_parse_device_policy, 0, offsetof($1, cgroup_context.device_policy) - $1.BlockIOAccounting, config_parse_bool, 0, offsetof($1, cgroup_context.blockio_accounting) -diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c -index ed8602f..6e0a180 100644 ---- a/src/core/load-fragment.c -+++ b/src/core/load-fragment.c -@@ -2015,14 +2015,11 @@ int config_parse_memory_limit( - void *userdata) { - - CGroupContext *c = data; -- uint64_t *limit; - off_t bytes; - int r; - -- limit = streq(lvalue, "MemoryLimit") ? &c->memory_limit : &c->memory_soft_limit; -- - if (isempty(rvalue)) { -- *limit = (uint64_t) -1; -+ c->memory_limit = (uint64_t) -1; - return 0; - } - -@@ -2035,7 +2032,7 @@ int config_parse_memory_limit( - return 0; - } - -- *limit = (uint64_t) bytes; -+ c->memory_limit = (uint64_t) bytes; - return 0; - } - -diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 16da293..1080065 100644 ---- a/src/systemctl/systemctl.c -+++ b/src/systemctl/systemctl.c -@@ -3657,7 +3657,7 @@ static int append_assignment(DBusMessageIter *iter, const char *assignment) { - !dbus_message_iter_append_basic(&sub, DBUS_TYPE_BOOLEAN, &b)) - return log_oom(); - -- } else if (streq(field, "MemoryLimit") || streq(field, "MemorySoftLimit")) { -+ } else if (streq(field, "MemoryLimit")) { - off_t bytes; - uint64_t u; - 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-set-IgnoreOnIsolate-true-for-systemd-cryptsetup-.ser.patch b/SOURCES/0053-set-IgnoreOnIsolate-true-for-systemd-cryptsetup-.ser.patch deleted file mode 100644 index 28c3c71..0000000 --- a/SOURCES/0053-set-IgnoreOnIsolate-true-for-systemd-cryptsetup-.ser.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0ac89decd89110fa64fe1f9ff7ff5a271026a272 Mon Sep 17 00:00:00 2001 -From: Andrey Borzenkov -Date: Sun, 29 Sep 2013 15:37:30 +0400 -Subject: [PATCH] set IgnoreOnIsolate=true for systemd-cryptsetup@.service - -When crypttab contains noauto, cryptsetup service does not have any -explicit dependencies. If service is started later manually (directly or via -mount dependency) it will be stopped on isolate. - -mount units already have IgnoreOnIsolate set by default. Set it by -default for cryptsetup units as well. ---- - src/cryptsetup/cryptsetup-generator.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index 8792e6b..e1798a3 100644 ---- a/src/cryptsetup/cryptsetup-generator.c -+++ b/src/cryptsetup/cryptsetup-generator.c -@@ -118,6 +118,7 @@ static int create_disk( - "Conflicts=umount.target\n" - "DefaultDependencies=no\n" - "BindsTo=dev-mapper-%i.device\n" -+ "IgnoreOnIsolate=true\n" - "After=systemd-readahead-collect.service systemd-readahead-replay.service\n", - f); - 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/0054-main-don-t-free-fds-array-twice.patch b/SOURCES/0054-main-don-t-free-fds-array-twice.patch deleted file mode 100644 index d9fdedc..0000000 --- a/SOURCES/0054-main-don-t-free-fds-array-twice.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 32eda9ada3dade4c9f6a8a176ee326ccdd61fda8 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Oct 2013 00:06:48 +0200 -Subject: [PATCH] main: don't free fds array twice - ---- - src/core/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/core/main.c b/src/core/main.c -index 72bd542..662d16d 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -1567,6 +1567,7 @@ int main(int argc, char *argv[]) { - /* This will close all file descriptors that were opened, but - * not claimed by any unit. */ - fdset_free(fds); -+ fds = NULL; - - if (serialization) { - fclose(serialization); diff --git a/SOURCES/0055-local-fix-memory-leak-when-putting-together-locale-s.patch b/SOURCES/0055-local-fix-memory-leak-when-putting-together-locale-s.patch deleted file mode 100644 index e17e503..0000000 --- a/SOURCES/0055-local-fix-memory-leak-when-putting-together-locale-s.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 64d6d09b47d22db8a82373229c828e7cf1373955 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Oct 2013 00:08:30 +0200 -Subject: [PATCH] local: fix memory leak when putting together locale settings - -Also, we need to use proper strv_env_xyz() calls when putting together -the environment array, since otherwise settings won't be properly -overriden. - -And let's get rid of strv_appendf(), is overkill and there was only one -user. ---- - src/core/locale-setup.c | 31 +++++++++++++++++++++++++++---- - src/core/manager.c | 4 +++- - src/shared/strv.c | 15 --------------- - src/shared/strv.h | 1 - - 4 files changed, 30 insertions(+), 21 deletions(-) - -diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c -index 31374ac..276deb9 100644 ---- a/src/core/locale-setup.c -+++ b/src/core/locale-setup.c -@@ -29,6 +29,7 @@ - #include "virt.h" - #include "fileio.h" - #include "strv.h" -+#include "env-util.h" - - enum { - /* We don't list LC_ALL here on purpose. People should be -@@ -69,7 +70,7 @@ static const char * const variable_names[_VARIABLE_MAX] = { - }; - - int locale_setup(char ***environment) { -- char **env; -+ char **add; - char *variables[_VARIABLE_MAX] = {}; - int r = 0, i; - -@@ -119,22 +120,44 @@ int locale_setup(char ***environment) { - log_warning("Failed to read /etc/locale.conf: %s", strerror(-r)); - } - -+ add = NULL; - for (i = 0; i < _VARIABLE_MAX; i++) { -+ char *s; -+ - if (!variables[i]) - continue; - -- env = strv_appendf(*environment, "%s=%s", variable_names[i], variables[i]); -- if (!env) { -+ s = strjoin(variable_names[i], "=", variables[i], NULL); -+ if (!s) { -+ r = -ENOMEM; -+ goto finish; -+ } -+ -+ if (strv_push(&add, s) < 0) { -+ free(s); -+ r = -ENOMEM; -+ goto finish; -+ } -+ } -+ -+ if (!strv_isempty(add)) { -+ char **e; -+ -+ e = strv_env_merge(2, *environment, add); -+ if (!e) { - r = -ENOMEM; - goto finish; - } - -- *environment = env; -+ strv_free(*environment); -+ *environment = e; - } - - r = 0; - - finish: -+ strv_free(add); -+ - for (i = 0; i < _VARIABLE_MAX; i++) - free(variables[i]); - -diff --git a/src/core/manager.c b/src/core/manager.c -index dadbedd..30b49ff 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -2666,14 +2666,16 @@ void manager_undo_generators(Manager *m) { - } - - int manager_environment_add(Manager *m, char **environment) { -- - char **e = NULL; - assert(m); -+ - e = strv_env_merge(2, m->environment, environment); - if (!e) - return -ENOMEM; -+ - strv_free(m->environment); - m->environment = e; -+ - return 0; - } - -diff --git a/src/shared/strv.c b/src/shared/strv.c -index 2df478f..adeee28 100644 ---- a/src/shared/strv.c -+++ b/src/shared/strv.c -@@ -424,21 +424,6 @@ fail: - return NULL; - } - --char **strv_appendf(char **l, const char *format, ...) { -- va_list ap; -- _cleanup_free_ char *s = NULL; -- int r; -- -- va_start(ap, format); -- r = vasprintf(&s, format, ap); -- va_end(ap); -- -- if (r < 0) -- return NULL; -- -- return strv_append(l, s); --} -- - int strv_push(char ***l, char *value) { - char **c; - unsigned n; -diff --git a/src/shared/strv.h b/src/shared/strv.h -index 4e80ea6..d1f2a0e 100644 ---- a/src/shared/strv.h -+++ b/src/shared/strv.h -@@ -42,7 +42,6 @@ unsigned strv_length(char * const *l) _pure_; - char **strv_merge(char **a, char **b); - char **strv_merge_concat(char **a, char **b, const char *suffix); - char **strv_append(char **l, const char *s); --char **strv_appendf(char **l, const char *format, ...) _printf_attr_(2, 3); - int strv_extend(char ***l, const char *value); - int strv_push(char ***l, char *value); - 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-hashmap-size-hashmap-bucket-array-dynamically.patch b/SOURCES/0056-hashmap-size-hashmap-bucket-array-dynamically.patch deleted file mode 100644 index 2d3c916..0000000 --- a/SOURCES/0056-hashmap-size-hashmap-bucket-array-dynamically.patch +++ /dev/null @@ -1,470 +0,0 @@ -From 6b28d81fea017382e098c24514ae229fcb0a4a7d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Oct 2013 00:13:18 +0200 -Subject: [PATCH] hashmap: size hashmap bucket array dynamically - -Instead of fixing the hashmap bucket array to 127 entries dynamically -size it, starting with a smaller one of 31. As soon as a fill level of -75% is reached, quadruple the size, and so on. - -This should siginficantly optimize the lookup time in large tables -(from O(n) back to O(1)), and save memory on smaller tables (which most -are). ---- - src/shared/hashmap.c | 152 ++++++++++++++++++++++++++++++++++++------------ - src/shared/hashmap.h | 1 + - src/test/test-hashmap.c | 28 ++++++++- - 3 files changed, 143 insertions(+), 38 deletions(-) - -diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c -index 4ea1a0f..6330792 100644 ---- a/src/shared/hashmap.c -+++ b/src/shared/hashmap.c -@@ -28,7 +28,7 @@ - #include "hashmap.h" - #include "macro.h" - --#define NBUCKETS 127 -+#define INITIAL_N_BUCKETS 31 - - struct hashmap_entry { - const void *key; -@@ -42,13 +42,13 @@ struct Hashmap { - compare_func_t compare_func; - - struct hashmap_entry *iterate_list_head, *iterate_list_tail; -- unsigned n_entries; -+ -+ struct hashmap_entry ** buckets; -+ unsigned n_buckets, n_entries; - - bool from_pool; - }; - --#define BY_HASH(h) ((struct hashmap_entry**) ((uint8_t*) (h) + ALIGN(sizeof(Hashmap)))) -- - struct pool { - struct pool *next; - unsigned n_tiles; -@@ -64,6 +64,11 @@ static void *first_entry_tile = NULL; - static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t tile_size) { - 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*)); -+ - if (*first_tile) { - void *r; - -@@ -173,7 +178,7 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { - - b = is_main_thread(); - -- size = ALIGN(sizeof(Hashmap)) + NBUCKETS * sizeof(struct hashmap_entry*); -+ size = ALIGN(sizeof(Hashmap)) + INITIAL_N_BUCKETS * sizeof(struct hashmap_entry*); - - if (b) { - h = allocate_tile(&first_hashmap_pool, &first_hashmap_tile, size); -@@ -191,23 +196,30 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { - h->hash_func = hash_func ? hash_func : trivial_hash_func; - h->compare_func = compare_func ? compare_func : trivial_compare_func; - -+ h->n_buckets = INITIAL_N_BUCKETS; - h->n_entries = 0; - h->iterate_list_head = h->iterate_list_tail = NULL; - -+ h->buckets = (struct hashmap_entry**) ((uint8_t*) h + ALIGN(sizeof(Hashmap))); -+ - h->from_pool = b; - - return h; - } - - int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t compare_func) { -+ Hashmap *q; -+ - assert(h); - - if (*h) - return 0; - -- if (!(*h = hashmap_new(hash_func, compare_func))) -+ q = hashmap_new(hash_func, compare_func); -+ if (!q) - return -ENOMEM; - -+ *h = q; - return 0; - } - -@@ -216,11 +228,11 @@ static void link_entry(Hashmap *h, struct hashmap_entry *e, unsigned hash) { - assert(e); - - /* Insert into hash table */ -- e->bucket_next = BY_HASH(h)[hash]; -+ e->bucket_next = h->buckets[hash]; - e->bucket_previous = NULL; -- if (BY_HASH(h)[hash]) -- BY_HASH(h)[hash]->bucket_previous = e; -- BY_HASH(h)[hash] = e; -+ if (h->buckets[hash]) -+ h->buckets[hash]->bucket_previous = e; -+ h->buckets[hash] = e; - - /* Insert into iteration list */ - e->iterate_previous = h->iterate_list_tail; -@@ -260,7 +272,7 @@ static void unlink_entry(Hashmap *h, struct hashmap_entry *e, unsigned hash) { - if (e->bucket_previous) - e->bucket_previous->bucket_next = e->bucket_next; - else -- BY_HASH(h)[hash] = e->bucket_next; -+ h->buckets[hash] = e->bucket_next; - - assert(h->n_entries >= 1); - h->n_entries--; -@@ -272,7 +284,7 @@ static void remove_entry(Hashmap *h, struct hashmap_entry *e) { - assert(h); - assert(e); - -- hash = h->hash_func(e->key) % NBUCKETS; -+ hash = h->hash_func(e->key) % h->n_buckets; - - unlink_entry(h, e, hash); - -@@ -291,6 +303,9 @@ void hashmap_free(Hashmap*h) { - - hashmap_clear(h); - -+ if (h->buckets != (struct hashmap_entry**) ((uint8_t*) h + ALIGN(sizeof(Hashmap)))) -+ free(h->buckets); -+ - if (h->from_pool) - deallocate_tile(&first_hashmap_tile, h); - else -@@ -357,22 +372,72 @@ void hashmap_clear_free_free(Hashmap *h) { - static struct hashmap_entry *hash_scan(Hashmap *h, unsigned hash, const void *key) { - struct hashmap_entry *e; - assert(h); -- assert(hash < NBUCKETS); -+ assert(hash < h->n_buckets); - -- for (e = BY_HASH(h)[hash]; e; e = e->bucket_next) -+ for (e = h->buckets[hash]; e; e = e->bucket_next) - if (h->compare_func(e->key, key) == 0) - return e; - - return NULL; - } - -+static bool resize_buckets(Hashmap *h) { -+ unsigned m; -+ struct hashmap_entry **n, *i; -+ -+ assert(h); -+ -+ if (_likely_(h->n_entries*4 < h->n_buckets*3)) -+ return false; -+ -+ /* Increase by four */ -+ m = (h->n_entries+1)*4-1; -+ -+ /* If we hit OOM we simply risk packed hashmaps... */ -+ n = new0(struct hashmap_entry*, m); -+ if (!n) -+ return false; -+ -+ for (i = h->iterate_list_head; i; i = i->iterate_next) { -+ unsigned hash, x; -+ -+ hash = h->hash_func(i->key); -+ -+ /* First, drop from old bucket table */ -+ if (i->bucket_next) -+ i->bucket_next->bucket_previous = i->bucket_previous; -+ -+ if (i->bucket_previous) -+ i->bucket_previous->bucket_next = i->bucket_next; -+ else -+ h->buckets[hash % h->n_buckets] = i->bucket_next; -+ -+ /* Then, add to new backet table */ -+ x = hash % m; -+ -+ i->bucket_next = n[x]; -+ i->bucket_previous = NULL; -+ if (n[x]) -+ n[x]->bucket_previous = i; -+ n[x] = i; -+ } -+ -+ if (h->buckets != (struct hashmap_entry**) ((uint8_t*) h + ALIGN(sizeof(Hashmap)))) -+ free(h->buckets); -+ -+ h->buckets = n; -+ h->n_buckets = m; -+ -+ return true; -+} -+ - int hashmap_put(Hashmap *h, const void *key, void *value) { - struct hashmap_entry *e; - unsigned hash; - - assert(h); - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (e) { - if (e->value == value) -@@ -380,6 +445,9 @@ int hashmap_put(Hashmap *h, const void *key, void *value) { - return -EEXIST; - } - -+ if (resize_buckets(h)) -+ hash = h->hash_func(key) % h->n_buckets; -+ - if (h->from_pool) - e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry)); - else -@@ -402,7 +470,7 @@ int hashmap_replace(Hashmap *h, const void *key, void *value) { - - assert(h); - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (e) { - e->key = key; -@@ -419,7 +487,7 @@ int hashmap_update(Hashmap *h, const void *key, void *value) { - - assert(h); - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (!e) - return -ENOENT; -@@ -435,7 +503,7 @@ void* hashmap_get(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (!e) - return NULL; -@@ -450,7 +518,7 @@ void* hashmap_get2(Hashmap *h, const void *key, void **key2) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (!e) - return NULL; -@@ -467,7 +535,7 @@ bool hashmap_contains(Hashmap *h, const void *key) { - if (!h) - return false; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - - if (!hash_scan(h, hash, key)) - return false; -@@ -483,7 +551,7 @@ void* hashmap_remove(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - - if (!(e = hash_scan(h, hash, key))) - return NULL; -@@ -501,11 +569,11 @@ int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, - if (!h) - return -ENOENT; - -- old_hash = h->hash_func(old_key) % NBUCKETS; -+ old_hash = h->hash_func(old_key) % h->n_buckets; - if (!(e = hash_scan(h, old_hash, old_key))) - return -ENOENT; - -- new_hash = h->hash_func(new_key) % NBUCKETS; -+ new_hash = h->hash_func(new_key) % h->n_buckets; - if (hash_scan(h, new_hash, new_key)) - return -EEXIST; - -@@ -526,11 +594,11 @@ int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_ - if (!h) - return -ENOENT; - -- old_hash = h->hash_func(old_key) % NBUCKETS; -+ old_hash = h->hash_func(old_key) % h->n_buckets; - if (!(e = hash_scan(h, old_hash, old_key))) - return -ENOENT; - -- new_hash = h->hash_func(new_key) % NBUCKETS; -+ new_hash = h->hash_func(new_key) % h->n_buckets; - if ((k = hash_scan(h, new_hash, new_key))) - if (e != k) - remove_entry(h, k); -@@ -552,9 +620,10 @@ void* hashmap_remove_value(Hashmap *h, const void *key, void *value) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - -- if (!(e = hash_scan(h, hash, key))) -+ e = hash_scan(h, hash, key); -+ if (!e) - return NULL; - - if (e->value != value) -@@ -642,9 +711,10 @@ void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - -- if (!(e = hash_scan(h, hash, key))) -+ e = hash_scan(h, hash, key); -+ if (!e) - return NULL; - - *i = (Iterator) e; -@@ -723,6 +793,14 @@ unsigned hashmap_size(Hashmap *h) { - return h->n_entries; - } - -+unsigned hashmap_buckets(Hashmap *h) { -+ -+ if (!h) -+ return 0; -+ -+ return h->n_buckets; -+} -+ - bool hashmap_isempty(Hashmap *h) { - - if (!h) -@@ -766,12 +844,12 @@ void hashmap_move(Hashmap *h, Hashmap *other) { - - n = e->iterate_next; - -- h_hash = h->hash_func(e->key) % NBUCKETS; -+ h_hash = h->hash_func(e->key) % h->n_buckets; - - if (hash_scan(h, h_hash, e->key)) - continue; - -- other_hash = other->hash_func(e->key) % NBUCKETS; -+ other_hash = other->hash_func(e->key) % other->n_buckets; - - unlink_entry(other, e, other_hash); - link_entry(h, e, h_hash); -@@ -787,12 +865,13 @@ int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key) { - - assert(h); - -- h_hash = h->hash_func(key) % NBUCKETS; -+ h_hash = h->hash_func(key) % h->n_buckets; - if (hash_scan(h, h_hash, key)) - return -EEXIST; - -- other_hash = other->hash_func(key) % NBUCKETS; -- if (!(e = hash_scan(other, other_hash, key))) -+ other_hash = other->hash_func(key) % other->n_buckets; -+ e = hash_scan(other, other_hash, key); -+ if (!e) - return -ENOENT; - - unlink_entry(other, e, other_hash); -@@ -806,7 +885,8 @@ Hashmap *hashmap_copy(Hashmap *h) { - - assert(h); - -- if (!(copy = hashmap_new(h->hash_func, h->compare_func))) -+ copy = hashmap_new(h->hash_func, h->compare_func); -+ if (!copy) - return NULL; - - if (hashmap_merge(copy, h) < 0) { -@@ -845,7 +925,7 @@ void *hashmap_next(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % NBUCKETS; -+ hash = h->hash_func(key) % h->n_buckets; - e = hash_scan(h, hash, key); - if (!e) - return NULL; -diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h -index 15b7e27..3d4f672 100644 ---- a/src/shared/hashmap.h -+++ b/src/shared/hashmap.h -@@ -76,6 +76,7 @@ int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key); - - unsigned hashmap_size(Hashmap *h) _pure_; - bool hashmap_isempty(Hashmap *h) _pure_; -+unsigned hashmap_buckets(Hashmap *h) _pure_; - - void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key); - void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key); -diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c -index 2aead79..349e8e5 100644 ---- a/src/test/test-hashmap.c -+++ b/src/test/test-hashmap.c -@@ -467,6 +467,30 @@ static void test_hashmap_get(void) { - hashmap_free_free(m); - } - -+static void test_hashmap_many(void) { -+ Hashmap *h; -+ unsigned i; -+ -+#define N_ENTRIES 100000 -+ -+ assert_se(h = hashmap_new(NULL, NULL)); -+ -+ for (i = 1; i < N_ENTRIES*3; i+=3) { -+ assert_se(hashmap_put(h, UINT_TO_PTR(i), UINT_TO_PTR(i)) >= 0); -+ assert_se(PTR_TO_UINT(hashmap_get(h, UINT_TO_PTR(i))) == i); -+ } -+ -+ for (i = 1; i < N_ENTRIES*3; i++) -+ assert_se(hashmap_contains(h, UINT_TO_PTR(i)) == (i % 3 == 1)); -+ -+ log_info("%u <= %u * 0.75 = %g", hashmap_size(h), hashmap_buckets(h), hashmap_buckets(h) * 0.75); -+ -+ assert_se(hashmap_size(h) <= hashmap_buckets(h) * 0.75); -+ assert_se(hashmap_size(h) == N_ENTRIES); -+ -+ hashmap_free(h); -+} -+ - static void test_uint64_compare_func(void) { - assert_se(uint64_compare_func("a", "a") == 0); - assert_se(uint64_compare_func("a", "b") == -1); -@@ -484,8 +508,7 @@ static void test_string_compare_func(void) { - assert_se(string_compare_func("fred", "fred") == 0); - } - --int main(int argc, const char *argv[]) --{ -+int main(int argc, const char *argv[]) { - test_hashmap_copy(); - test_hashmap_get_strv(); - test_hashmap_move_one(); -@@ -502,6 +525,7 @@ int main(int argc, const char *argv[]) - test_hashmap_isempty(); - test_hashmap_get(); - test_hashmap_size(); -+ test_hashmap_many(); - test_uint64_compare_func(); - test_trivial_compare_func(); - test_string_compare_func(); 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/0057-smack-setup-fix-path-to-Smack-CIPSO-mappings.patch b/SOURCES/0057-smack-setup-fix-path-to-Smack-CIPSO-mappings.patch deleted file mode 100644 index 701d29c..0000000 --- a/SOURCES/0057-smack-setup-fix-path-to-Smack-CIPSO-mappings.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d235f3854b80b7e3bedd96391bd9ea8db5b8ff93 Mon Sep 17 00:00:00 2001 -From: Patrick McCarty -Date: Mon, 30 Sep 2013 17:43:38 -0700 -Subject: [PATCH] smack-setup: fix path to Smack/CIPSO mappings - -The correct path to the dir with CIPSO mappings is /etc/smack/cipso.d/; -/etc/smack/cipso is a file that can include these mappings as well, -though it is no longer supported in upstream libsmack. ---- - src/core/smack-setup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index d67a84a..1434dea 100644 ---- a/src/core/smack-setup.c -+++ b/src/core/smack-setup.c -@@ -40,7 +40,7 @@ - #include "label.h" - - #define SMACK_CONFIG "/etc/smack/accesses.d/" --#define CIPSO_CONFIG "/etc/smack/cipso/" -+#define CIPSO_CONFIG "/etc/smack/cipso.d/" - - #ifdef HAVE_SMACK - 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/0058-fix-lingering-references-to-var-lib-backlight-random.patch b/SOURCES/0058-fix-lingering-references-to-var-lib-backlight-random.patch deleted file mode 100644 index 498eca3..0000000 --- a/SOURCES/0058-fix-lingering-references-to-var-lib-backlight-random.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 43c6d0a4d2fec97929de9aef0a36815d82ad22ac 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/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/0059-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch b/SOURCES/0059-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch deleted file mode 100644 index dbcb754..0000000 --- a/SOURCES/0059-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c201b69ff022a9527323d2445b11861ccbf3cfad 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/0060-journald-add-missing-error-check.patch b/SOURCES/0060-journald-add-missing-error-check.patch deleted file mode 100644 index 8dff9a2..0000000 --- a/SOURCES/0060-journald-add-missing-error-check.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 69538099422c80bfef9c8761645c0a3fc64cc803 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/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-bus-fix-potentially-uninitialized-memory-access.patch b/SOURCES/0061-bus-fix-potentially-uninitialized-memory-access.patch deleted file mode 100644 index ac10649..0000000 --- a/SOURCES/0061-bus-fix-potentially-uninitialized-memory-access.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 6ea4084c96dd151eca88b3277148e249e3eebe38 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/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-dbus-fix-return-value-of-dispatch_rqueue.patch b/SOURCES/0062-dbus-fix-return-value-of-dispatch_rqueue.patch deleted file mode 100644 index 010cdd1..0000000 --- a/SOURCES/0062-dbus-fix-return-value-of-dispatch_rqueue.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 26a238ce83143c6bac8afa4639ba4dcfd9d48ca7 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/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-modules-load-fix-error-handling.patch b/SOURCES/0063-modules-load-fix-error-handling.patch deleted file mode 100644 index 8859cae..0000000 --- a/SOURCES/0063-modules-load-fix-error-handling.patch +++ /dev/null @@ -1,24 +0,0 @@ -From caf4ebe6cde955a39445b7a94f1173fef3d40d95 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/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-efi-never-call-qsort-on-potentially-NULL-arrays.patch b/SOURCES/0064-efi-never-call-qsort-on-potentially-NULL-arrays.patch deleted file mode 100644 index d4518da..0000000 --- a/SOURCES/0064-efi-never-call-qsort-on-potentially-NULL-arrays.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 8744e02186cd7253aebc84043de7455ef0044e2d 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 8d004ba..99340c9 100644 ---- a/src/shared/efivars.c -+++ b/src/shared/efivars.c -@@ -383,7 +383,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/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/0065-strv-don-t-access-potentially-NULL-string-arrays.patch b/SOURCES/0065-strv-don-t-access-potentially-NULL-string-arrays.patch deleted file mode 100644 index 450fb66..0000000 --- a/SOURCES/0065-strv-don-t-access-potentially-NULL-string-arrays.patch +++ /dev/null @@ -1,24 +0,0 @@ -From fb197fc897370c0ea840099e1c8da6353ea12514 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/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/0066-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch b/SOURCES/0066-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch deleted file mode 100644 index 6f6f40a..0000000 --- a/SOURCES/0066-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 56c6d3913e4cd7160b14f9f8a9c7b232444a5235 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/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/0067-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch b/SOURCES/0067-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch deleted file mode 100644 index 68c461f..0000000 --- a/SOURCES/0067-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 6a89a85811f364d1df7c5a6f992132bec693273d 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 c397c71..ae292a0 100644 ---- a/tmpfiles.d/systemd.conf -+++ b/tmpfiles.d/systemd.conf -@@ -26,3 +26,5 @@ F /run/nologin 0644 - - - "System is booting up." - - 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/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/0068-gpt-auto-generator-exit-immediately-if-in-container.patch b/SOURCES/0068-gpt-auto-generator-exit-immediately-if-in-container.patch deleted file mode 100644 index 461eb0b..0000000 --- a/SOURCES/0068-gpt-auto-generator-exit-immediately-if-in-container.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b5515ebda086ada98da101c72455668a91841749 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/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/0069-systemd-order-remote-mounts-from-mountinfo-before-re.patch b/SOURCES/0069-systemd-order-remote-mounts-from-mountinfo-before-re.patch deleted file mode 100644 index 11bc34e..0000000 --- a/SOURCES/0069-systemd-order-remote-mounts-from-mountinfo-before-re.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e6d71d64929cff5bbcfe56dc185062f86fd2a202 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/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/0070-manager-when-verifying-whether-clients-may-change-en.patch b/SOURCES/0070-manager-when-verifying-whether-clients-may-change-en.patch deleted file mode 100644 index 6a0ac45..0000000 --- a/SOURCES/0070-manager-when-verifying-whether-clients-may-change-en.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d36d41d6a28ae21da6e6e032f9988049bad0cea3 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/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/0071-mount-check-for-NULL-before-reading-pm-what.patch b/SOURCES/0071-mount-check-for-NULL-before-reading-pm-what.patch deleted file mode 100644 index ca14af6..0000000 --- a/SOURCES/0071-mount-check-for-NULL-before-reading-pm-what.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1f8cb5185ca41b891ebfa2e6aed093be49b958ce 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/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/0072-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch b/SOURCES/0072-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch deleted file mode 100644 index de392ad..0000000 --- a/SOURCES/0072-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 37d5a05d8444e816937fb6736b35a9bc7de0865d 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/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/0073-systemd-serialize-deserialize-forbid_restart-value.patch b/SOURCES/0073-systemd-serialize-deserialize-forbid_restart-value.patch deleted file mode 100644 index adcc980..0000000 --- a/SOURCES/0073-systemd-serialize-deserialize-forbid_restart-value.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 901779a7633bcb9831e14fd80eb6db0a22c39f22 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 fc04196..7a78060 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -2653,6 +2653,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; - } - -@@ -2789,6 +2792,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/0074-core-unify-the-way-we-denote-serialization-attribute.patch b/SOURCES/0074-core-unify-the-way-we-denote-serialization-attribute.patch deleted file mode 100644 index 840ea8f..0000000 --- a/SOURCES/0074-core-unify-the-way-we-denote-serialization-attribute.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5a09d8f3a0b610beaef3445abb57f45daae6f10f 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 7a78060..cfc8ba6 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -2654,7 +2654,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; - } -@@ -2792,12 +2792,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/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/0075-journald-fix-minor-memory-leak.patch b/SOURCES/0075-journald-fix-minor-memory-leak.patch deleted file mode 100644 index 627a2e1..0000000 --- a/SOURCES/0075-journald-fix-minor-memory-leak.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e5440ffff5a2dd4f46a7f19fd2e9af4abe3e0121 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/0076-journald-remove-rotated-file-from-hashmap-when-rotat.patch b/SOURCES/0076-journald-remove-rotated-file-from-hashmap-when-rotat.patch deleted file mode 100644 index bd20427..0000000 --- a/SOURCES/0076-journald-remove-rotated-file-from-hashmap-when-rotat.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 42ca19f57176c4b89fc318b5612e644f66ff8d37 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 8007b05..2ae0591 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/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/0077-udevadm.xml-document-resolve-names-option-for-test.patch b/SOURCES/0077-udevadm.xml-document-resolve-names-option-for-test.patch deleted file mode 100644 index 3b9a3da..0000000 --- a/SOURCES/0077-udevadm.xml-document-resolve-names-option-for-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b83f0d2ac4845071541737428e9e7b15aa12c982 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/0078-dbus-common-avoid-leak-in-error-path.patch b/SOURCES/0078-dbus-common-avoid-leak-in-error-path.patch deleted file mode 100644 index c49dbab..0000000 --- a/SOURCES/0078-dbus-common-avoid-leak-in-error-path.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 8ce4a7267b3e22e1633f2cfdc1898e52c54fb254 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/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-drop-ins-check-return-value.patch b/SOURCES/0079-drop-ins-check-return-value.patch deleted file mode 100644 index a7088f4..0000000 --- a/SOURCES/0079-drop-ins-check-return-value.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 49a1b4948c3da7828c4b3765782e43f8a26c2929 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/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/0080-shared-util-Fix-glob_extend-argument.patch b/SOURCES/0080-shared-util-Fix-glob_extend-argument.patch deleted file mode 100644 index e0a7153..0000000 --- a/SOURCES/0080-shared-util-Fix-glob_extend-argument.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ebdc476db9419b36a046e8870ee6bb4bc6f57dc3 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 f6f3b18..3d4ca7c 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -4370,7 +4370,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/0081-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch b/SOURCES/0081-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch deleted file mode 100644 index df97a46..0000000 --- a/SOURCES/0081-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 3a01553871713888812f234b62a40e892f9f2b8c 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/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-man-document-the-b-special-boot-option.patch b/SOURCES/0082-man-document-the-b-special-boot-option.patch deleted file mode 100644 index 70dc3b3..0000000 --- a/SOURCES/0082-man-document-the-b-special-boot-option.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 051ee7b5173acc07875f6cf5b0c839302f9ce04d 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 97ef768..89939f3 100644 ---- a/man/systemd.xml -+++ b/man/systemd.xml -@@ -1149,6 +1149,7 @@ - - - -+ -b - emergency - - Boot into emergency 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/0083-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch b/SOURCES/0083-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch deleted file mode 100644 index ab3c202..0000000 --- a/SOURCES/0083-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 1d007bd94d09c955d548f4425a591f5a3bf032e4 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 5eca82a..ea99920 100644 ---- a/src/tmpfiles/tmpfiles.c -+++ b/src/tmpfiles/tmpfiles.c -@@ -273,12 +273,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/0084-move-utf8-functions-from-libudev-private.h-to-utf8.h.patch b/SOURCES/0084-move-utf8-functions-from-libudev-private.h-to-utf8.h.patch deleted file mode 100644 index 1130387..0000000 --- a/SOURCES/0084-move-utf8-functions-from-libudev-private.h-to-utf8.h.patch +++ /dev/null @@ -1,514 +0,0 @@ -From 1bd14ab0b60de49c8546f22d90996b95423b9eeb Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Tue, 17 Sep 2013 15:39:09 -0400 -Subject: [PATCH] move utf8 functions from libudev-private.h to utf8.h - -There's now some more obvious overlap amongst the two utf8 validation -functions, but no more than there already was previously. - -This also adds some menial tests for anyone who wants to do more -merging of these two in the future. ---- - .gitignore | 2 + - Makefile.am | 10 +++ - src/libudev/libudev-util.c | 171 +-------------------------------------------- - src/shared/utf8.c | 151 +++++++++++++++++++++++++++++++++++++++ - src/shared/utf8.h | 4 ++ - src/test/test-utf8.c | 59 ++++++++++++++++ - 6 files changed, 229 insertions(+), 168 deletions(-) - create mode 100644 src/test/test-utf8.c - -diff --git a/.gitignore b/.gitignore -index 61bc2a3..deeee53 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -124,6 +124,7 @@ - /test-list - /test-log - /test-login -+/test-login-shared - /test-loopback - /test-mmap-cache - /test-ns -@@ -143,6 +144,7 @@ - /test-udev - /test-unit-file - /test-unit-name -+/test-utf8 - /test-util - /test-watchdog - /timedatectl -diff --git a/Makefile.am b/Makefile.am -index 25bfd91..6dd33ad 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1121,6 +1121,7 @@ tests += \ - test-strxcpyx \ - test-unit-name \ - test-unit-file \ -+ test-utf8 \ - test-util \ - test-date \ - test-sleep \ -@@ -1223,6 +1224,15 @@ test_unit_file_CFLAGS = \ - test_unit_file_LDADD = \ - libsystemd-core.la - -+test_utf8_SOURCES = \ -+ src/test/test-utf8.c -+ -+test_utf8_CFLAGS = \ -+ $(AM_CFLAGS) -+ -+test_utf8_LDADD = \ -+ libsystemd-shared.la -+ - test_util_SOURCES = \ - src/test/test-util.c - -diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c -index 714dc50..d54430c 100644 ---- a/src/libudev/libudev-util.c -+++ b/src/libudev/libudev-util.c -@@ -34,6 +34,7 @@ - - #include "libudev.h" - #include "libudev-private.h" -+#include "utf8.h" - - /** - * SECTION:libudev-util -@@ -306,129 +307,6 @@ void util_remove_trailing_chars(char *path, char c) - path[--len] = '\0'; - } - --/* count of characters used to encode one unicode char */ --static int utf8_encoded_expected_len(const char *str) --{ -- unsigned char c = (unsigned char)str[0]; -- -- if (c < 0x80) -- return 1; -- if ((c & 0xe0) == 0xc0) -- return 2; -- if ((c & 0xf0) == 0xe0) -- return 3; -- if ((c & 0xf8) == 0xf0) -- return 4; -- if ((c & 0xfc) == 0xf8) -- return 5; -- if ((c & 0xfe) == 0xfc) -- return 6; -- return 0; --} -- --/* decode one unicode char */ --static int utf8_encoded_to_unichar(const char *str) --{ -- int unichar; -- int len; -- int i; -- -- len = utf8_encoded_expected_len(str); -- switch (len) { -- case 1: -- return (int)str[0]; -- case 2: -- unichar = str[0] & 0x1f; -- break; -- case 3: -- unichar = (int)str[0] & 0x0f; -- break; -- case 4: -- unichar = (int)str[0] & 0x07; -- break; -- case 5: -- unichar = (int)str[0] & 0x03; -- break; -- case 6: -- unichar = (int)str[0] & 0x01; -- break; -- default: -- return -1; -- } -- -- for (i = 1; i < len; i++) { -- if (((int)str[i] & 0xc0) != 0x80) -- return -1; -- unichar <<= 6; -- unichar |= (int)str[i] & 0x3f; -- } -- -- return unichar; --} -- --/* expected size used to encode one unicode char */ --static int utf8_unichar_to_encoded_len(int unichar) --{ -- if (unichar < 0x80) -- return 1; -- if (unichar < 0x800) -- return 2; -- if (unichar < 0x10000) -- return 3; -- if (unichar < 0x200000) -- return 4; -- if (unichar < 0x4000000) -- return 5; -- return 6; --} -- --/* check if unicode char has a valid numeric range */ --static int utf8_unichar_valid_range(int unichar) --{ -- if (unichar > 0x10ffff) -- return 0; -- if ((unichar & 0xfffff800) == 0xd800) -- return 0; -- if ((unichar > 0xfdcf) && (unichar < 0xfdf0)) -- return 0; -- if ((unichar & 0xffff) == 0xffff) -- return 0; -- return 1; --} -- --/* validate one encoded unicode char and return its length */ --static int utf8_encoded_valid_unichar(const char *str) --{ -- int len; -- int unichar; -- int i; -- -- len = utf8_encoded_expected_len(str); -- if (len == 0) -- return -1; -- -- /* ascii is valid */ -- if (len == 1) -- return 1; -- -- /* check if expected encoded chars are available */ -- for (i = 0; i < len; i++) -- if ((str[i] & 0x80) != 0x80) -- return -1; -- -- unichar = utf8_encoded_to_unichar(str); -- -- /* check if encoded length matches encoded value */ -- if (utf8_unichar_to_encoded_len(unichar) != len) -- return -1; -- -- /* check if value has valid range */ -- if (!utf8_unichar_valid_range(unichar)) -- return -1; -- -- return len; --} -- - int util_replace_whitespace(const char *str, char *to, size_t len) - { - size_t i, j; -@@ -457,17 +335,6 @@ int util_replace_whitespace(const char *str, char *to, size_t len) - return 0; - } - --static int is_whitelisted(char c, const char *white) --{ -- if ((c >= '0' && c <= '9') || -- (c >= 'A' && c <= 'Z') || -- (c >= 'a' && c <= 'z') || -- strchr("#+-.:=@_", c) != NULL || -- (white != NULL && strchr(white, c) != NULL)) -- return 1; -- return 0; --} -- - /* allow chars in whitelist, plain ascii, hex-escaping and valid utf8 */ - int util_replace_chars(char *str, const char *white) - { -@@ -477,7 +344,7 @@ int util_replace_chars(char *str, const char *white) - while (str[i] != '\0') { - int len; - -- if (is_whitelisted(str[i], white)) { -+ if (is_utf8_encoding_whitelisted(str[i], white)) { - i++; - continue; - } -@@ -525,39 +392,7 @@ int util_replace_chars(char *str, const char *white) - **/ - _public_ int udev_util_encode_string(const char *str, char *str_enc, size_t len) - { -- size_t i, j; -- -- if (str == NULL || str_enc == NULL) -- return -1; -- -- for (i = 0, j = 0; str[i] != '\0'; i++) { -- int seqlen; -- -- seqlen = utf8_encoded_valid_unichar(&str[i]); -- if (seqlen > 1) { -- if (len-j < (size_t)seqlen) -- goto err; -- memcpy(&str_enc[j], &str[i], seqlen); -- j += seqlen; -- i += (seqlen-1); -- } else if (str[i] == '\\' || !is_whitelisted(str[i], NULL)) { -- if (len-j < 4) -- goto err; -- sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); -- j += 4; -- } else { -- if (len-j < 1) -- goto err; -- str_enc[j] = str[i]; -- j++; -- } -- } -- if (len-j < 1) -- goto err; -- str_enc[j] = '\0'; -- return 0; --err: -- return -1; -+ return udev_encode_string(str, str_enc, len); - } - - /* -diff --git a/src/shared/utf8.c b/src/shared/utf8.c -index 655cc77..1a68394 100644 ---- a/src/shared/utf8.c -+++ b/src/shared/utf8.c -@@ -317,3 +317,154 @@ char *utf16_to_utf8(const void *s, size_t length) { - - return r; - } -+ -+/* count of characters used to encode one unicode char */ -+static int utf8_encoded_expected_len(const char *str) { -+ unsigned char c = (unsigned char)str[0]; -+ -+ if (c < 0x80) -+ return 1; -+ if ((c & 0xe0) == 0xc0) -+ return 2; -+ if ((c & 0xf0) == 0xe0) -+ return 3; -+ if ((c & 0xf8) == 0xf0) -+ return 4; -+ if ((c & 0xfc) == 0xf8) -+ return 5; -+ if ((c & 0xfe) == 0xfc) -+ return 6; -+ return 0; -+} -+ -+/* decode one unicode char */ -+static int utf8_encoded_to_unichar(const char *str) { -+ int unichar; -+ int len; -+ int i; -+ -+ len = utf8_encoded_expected_len(str); -+ switch (len) { -+ case 1: -+ return (int)str[0]; -+ case 2: -+ unichar = str[0] & 0x1f; -+ break; -+ case 3: -+ unichar = (int)str[0] & 0x0f; -+ break; -+ case 4: -+ unichar = (int)str[0] & 0x07; -+ break; -+ case 5: -+ unichar = (int)str[0] & 0x03; -+ break; -+ case 6: -+ unichar = (int)str[0] & 0x01; -+ break; -+ default: -+ return -1; -+ } -+ -+ for (i = 1; i < len; i++) { -+ if (((int)str[i] & 0xc0) != 0x80) -+ return -1; -+ unichar <<= 6; -+ unichar |= (int)str[i] & 0x3f; -+ } -+ -+ return unichar; -+} -+ -+/* expected size used to encode one unicode char */ -+static int utf8_unichar_to_encoded_len(int unichar) { -+ if (unichar < 0x80) -+ return 1; -+ if (unichar < 0x800) -+ return 2; -+ if (unichar < 0x10000) -+ return 3; -+ if (unichar < 0x200000) -+ return 4; -+ if (unichar < 0x4000000) -+ return 5; -+ return 6; -+} -+ -+/* validate one encoded unicode char and return its length */ -+int utf8_encoded_valid_unichar(const char *str) { -+ int len; -+ int unichar; -+ int i; -+ -+ len = utf8_encoded_expected_len(str); -+ if (len == 0) -+ return -1; -+ -+ /* ascii is valid */ -+ if (len == 1) -+ return 1; -+ -+ /* check if expected encoded chars are available */ -+ for (i = 0; i < len; i++) -+ if ((str[i] & 0x80) != 0x80) -+ return -1; -+ -+ unichar = utf8_encoded_to_unichar(str); -+ -+ /* check if encoded length matches encoded value */ -+ if (utf8_unichar_to_encoded_len(unichar) != len) -+ return -1; -+ -+ /* check if value has valid range */ -+ if (!is_unicode_valid(unichar)) -+ return -1; -+ -+ return len; -+} -+ -+int is_utf8_encoding_whitelisted(char c, const char *white) { -+ if ((c >= '0' && c <= '9') || -+ (c >= 'A' && c <= 'Z') || -+ (c >= 'a' && c <= 'z') || -+ strchr("#+-.:=@_", c) != NULL || -+ (white != NULL && strchr(white, c) != NULL)) -+ return 1; -+ return 0; -+} -+ -+int udev_encode_string(const char *str, char *str_enc, size_t len) { -+ size_t i, j; -+ -+ if (str == NULL || str_enc == NULL) -+ return -1; -+ -+ for (i = 0, j = 0; str[i] != '\0'; i++) { -+ int seqlen; -+ -+ seqlen = utf8_encoded_valid_unichar(&str[i]); -+ if (seqlen > 1) { -+ if (len-j < (size_t)seqlen) -+ goto err; -+ memcpy(&str_enc[j], &str[i], seqlen); -+ j += seqlen; -+ i += (seqlen-1); -+ } else if (str[i] == '\\' || !is_utf8_encoding_whitelisted(str[i], NULL)) { -+ if (len-j < 4) -+ goto err; -+ sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); -+ j += 4; -+ } else { -+ if (len-j < 1) -+ goto err; -+ str_enc[j] = str[i]; -+ j++; -+ } -+ } -+ if (len-j < 1) -+ goto err; -+ str_enc[j] = '\0'; -+ return 0; -+err: -+ return -1; -+} -diff --git a/src/shared/utf8.h b/src/shared/utf8.h -index f805ea6..7a5608c 100644 ---- a/src/shared/utf8.h -+++ b/src/shared/utf8.h -@@ -34,3 +34,7 @@ char *utf8_filter(const char *s); - char *ascii_filter(const char *s); - - char *utf16_to_utf8(const void *s, size_t length); -+ -+int utf8_encoded_valid_unichar(const char *str); -+int is_utf8_encoding_whitelisted(char c, const char *white); -+int udev_encode_string(const char *str, char *str_enc, size_t len); -diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c -new file mode 100644 -index 0000000..d2b9771 ---- /dev/null -+++ b/src/test/test-utf8.c -@@ -0,0 +1,59 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2013 Dave Reisner -+ -+ 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 "utf8.h" -+#include "util.h" -+ -+/* helpers for test_udev_encode_string */ -+static char *do_encode_string(const char *in) { -+ size_t out_len = strlen(in) * 4; -+ char *out = malloc(out_len); -+ -+ assert_se(out); -+ assert_se(udev_encode_string(in, out, out_len) >= 0); -+ puts(out); -+ -+ return out; -+} -+ -+static bool expect_encoded_as(const char *in, const char *expected) { -+ _cleanup_free_ char *encoded = do_encode_string(in); -+ return streq(encoded, expected); -+} -+ -+static void test_udev_encode_string(void) { -+ assert_se(expect_encoded_as("systemd sucks", "systemd\\x20sucks")); -+ 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")); -+} -+ -+static void test_utf8_is_valid(void) { -+ assert_se(utf8_is_valid("ascii is valid unicode")); -+ assert_se(utf8_is_valid("\341\204\242")); -+ assert_se(!utf8_is_valid("\341\204")); -+} -+ -+int main(int argc, char *argv[]) { -+ test_utf8_is_valid(); -+ test_udev_encode_string(); -+} 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-Use-udev_encode_string-in-fstab_node_to_udev_node.patch b/SOURCES/0085-Use-udev_encode_string-in-fstab_node_to_udev_node.patch deleted file mode 100644 index fb9d269..0000000 --- a/SOURCES/0085-Use-udev_encode_string-in-fstab_node_to_udev_node.patch +++ /dev/null @@ -1,113 +0,0 @@ -From b6c9f1408abaebffc4b8151fa5615075767f4a92 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Tue, 17 Sep 2013 15:47:08 -0400 -Subject: [PATCH] Use udev_encode_string in fstab_node_to_udev_node - -Resolves a longstanding bug which caused this function to wrongly -handle (escape) valid utf8 characters. ---- - src/shared/util.c | 20 +++++++++----------- - src/test/test-util.c | 36 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 45 insertions(+), 11 deletions(-) - -diff --git a/src/shared/util.c b/src/shared/util.c -index 3d4ca7c..766957a 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -73,6 +73,7 @@ - #include "hashmap.h" - #include "env-util.h" - #include "fileio.h" -+#include "utf8.h" - - int saved_argc = 0; - char **saved_argv = NULL; -@@ -3495,26 +3496,23 @@ int signal_from_string_try_harder(const char *s) { - } - - static char *tag_to_udev_node(const char *tagvalue, const char *by) { -- char *dn, *t, *u; -- int r; -- -- /* FIXME: to follow udev's logic 100% we need to leave valid -- * UTF8 chars unescaped */ -+ _cleanup_free_ char *t = NULL, *u = NULL; -+ char *dn; -+ size_t enc_len; - - u = unquote(tagvalue, "\"\'"); - if (u == NULL) - return NULL; - -- t = xescape(u, "/ "); -- free(u); -- -+ enc_len = strlen(u) * 4; -+ t = new(char, enc_len); - if (t == NULL) - return NULL; - -- r = asprintf(&dn, "/dev/disk/by-%s/%s", by, t); -- free(t); -+ if (udev_encode_string(u, t, enc_len) < 0) -+ return NULL; - -- if (r < 0) -+ if (asprintf(&dn, "/dev/disk/by-%s/%s", by, t) < 0) - return NULL; - - return dn; -diff --git a/src/test/test-util.c b/src/test/test-util.c -index dd7768d..ad13d53 100644 ---- a/src/test/test-util.c -+++ b/src/test/test-util.c -@@ -547,6 +547,41 @@ static void test_split_pair(void) { - assert_se(streq(b, "=")); - } - -+static void test_fstab_node_to_udev_node(void) { -+ char *n; -+ -+ n = fstab_node_to_udev_node("LABEL=applé/jack"); -+ puts(n); -+ assert_se(streq(n, "/dev/disk/by-label/applé\\x2fjack")); -+ free(n); -+ -+ n = fstab_node_to_udev_node("PARTLABEL=pinkié pie"); -+ puts(n); -+ assert_se(streq(n, "/dev/disk/by-partlabel/pinkié\\x20pie")); -+ free(n); -+ -+ n = fstab_node_to_udev_node("UUID=037b9d94-148e-4ee4-8d38-67bfe15bb535"); -+ puts(n); -+ assert_se(streq(n, "/dev/disk/by-uuid/037b9d94-148e-4ee4-8d38-67bfe15bb535")); -+ free(n); -+ -+ n = fstab_node_to_udev_node("PARTUUID=037b9d94-148e-4ee4-8d38-67bfe15bb535"); -+ puts(n); -+ assert_se(streq(n, "/dev/disk/by-partuuid/037b9d94-148e-4ee4-8d38-67bfe15bb535")); -+ free(n); -+ -+ -+ n = fstab_node_to_udev_node("PONIES=awesome"); -+ puts(n); -+ assert_se(streq(n, "PONIES=awesome")); -+ free(n); -+ -+ n = fstab_node_to_udev_node("/dev/xda1"); -+ puts(n); -+ assert_se(streq(n, "/dev/xda1")); -+ free(n); -+} -+ - int main(int argc, char *argv[]) { - test_streq_ptr(); - test_first_word(); -@@ -582,6 +617,7 @@ int main(int argc, char *argv[]) { - test_strrep(); - test_parse_user_at_host(); - test_split_pair(); -+ test_fstab_node_to_udev_node(); - - return 0; - } 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-Fix-buffer-overrun-when-enumerating-files.patch b/SOURCES/0086-Fix-buffer-overrun-when-enumerating-files.patch deleted file mode 100644 index 06024b3..0000000 --- a/SOURCES/0086-Fix-buffer-overrun-when-enumerating-files.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 29328cbda5daea22f02e4ca94ca75783f22efc61 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sun, 29 Sep 2013 14:40:58 +0200 -Subject: [PATCH] Fix buffer overrun when enumerating files - -https://bugs.freedesktop.org/show_bug.cgi?id=69887 - -Based-on-a-patch-by: Hans Petter Jansson ---- - src/shared/util.c | 79 +++++++++++++++++----------------------------------- - src/test/test-util.c | 10 +++++++ - 2 files changed, 36 insertions(+), 53 deletions(-) - -diff --git a/src/shared/util.c b/src/shared/util.c -index 766957a..4f80cc8 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -4412,38 +4412,31 @@ int dirent_ensure_type(DIR *d, struct dirent *de) { - } - - int in_search_path(const char *path, char **search) { -- char **i, *parent; -+ char **i; -+ _cleanup_free_ char *parent = NULL; - int r; - - r = path_get_parent(path, &parent); - if (r < 0) - return r; - -- r = 0; -- -- STRV_FOREACH(i, search) { -- if (path_equal(parent, *i)) { -- r = 1; -- break; -- } -- } -- -- free(parent); -+ STRV_FOREACH(i, search) -+ if (path_equal(parent, *i)) -+ return 1; - -- return r; -+ return 0; - } - - int get_files_in_directory(const char *path, char ***list) { -- DIR *d; -- int r = 0; -- unsigned n = 0; -- char **l = NULL; -+ _cleanup_closedir_ DIR *d = NULL; -+ size_t bufsize = 0, n = 0; -+ _cleanup_strv_free_ char **l = NULL; - - assert(path); - - /* Returns all files in a directory in *list, and the number - * of files as return value. If list is NULL returns only the -- * number */ -+ * number. */ - - d = opendir(path); - if (!d) -@@ -4455,11 +4448,9 @@ int get_files_in_directory(const char *path, char ***list) { - int k; - - k = readdir_r(d, &buf.de, &de); -- if (k != 0) { -- r = -k; -- goto finish; -- } -- -+ assert(k >= 0); -+ if (k > 0) -+ return -k; - if (!de) - break; - -@@ -4469,43 +4460,25 @@ int get_files_in_directory(const char *path, char ***list) { - continue; - - if (list) { -- if ((unsigned) r >= n) { -- char **t; -- -- n = MAX(16, 2*r); -- t = realloc(l, sizeof(char*) * n); -- if (!t) { -- r = -ENOMEM; -- goto finish; -- } -- -- l = t; -- } -- -- assert((unsigned) r < n); -+ /* one extra slot is needed for the terminating NULL */ -+ if (!GREEDY_REALLOC(l, bufsize, n + 2)) -+ return -ENOMEM; - -- l[r] = strdup(de->d_name); -- if (!l[r]) { -- r = -ENOMEM; -- goto finish; -- } -+ l[n] = strdup(de->d_name); -+ if (!l[n]) -+ return -ENOMEM; - -- l[++r] = NULL; -+ l[++n] = NULL; - } else -- r++; -+ n++; - } - --finish: -- if (d) -- closedir(d); -- -- if (r >= 0) { -- if (list) -- *list = l; -- } else -- strv_free(l); -+ if (list) { -+ *list = l; -+ l = NULL; /* avoid freeing */ -+ } - -- return r; -+ return n; - } - - char *strjoin(const char *x, ...) { -diff --git a/src/test/test-util.c b/src/test/test-util.c -index ad13d53..c5762ed 100644 ---- a/src/test/test-util.c -+++ b/src/test/test-util.c -@@ -27,6 +27,7 @@ - #include - - #include "util.h" -+#include "strv.h" - - static void test_streq_ptr(void) { - assert_se(streq_ptr(NULL, NULL)); -@@ -582,6 +583,14 @@ static void test_fstab_node_to_udev_node(void) { - free(n); - } - -+static void test_get_files_in_directory(void) { -+ _cleanup_strv_free_ char **l = NULL, **t = NULL; -+ -+ assert_se(get_files_in_directory("/tmp", &l) >= 0); -+ assert_se(get_files_in_directory(".", &l) >= 0); -+ assert_se(get_files_in_directory(".", NULL) >= 0); -+} -+ - int main(int argc, char *argv[]) { - test_streq_ptr(); - test_first_word(); -@@ -618,6 +627,7 @@ int main(int argc, char *argv[]) { - test_parse_user_at_host(); - test_split_pair(); - test_fstab_node_to_udev_node(); -+ test_get_files_in_directory(); - - return 0; - } 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/0087-shared-utf8-merge-implementations-remove-cruft.patch b/SOURCES/0087-shared-utf8-merge-implementations-remove-cruft.patch deleted file mode 100644 index 685e5e7..0000000 --- a/SOURCES/0087-shared-utf8-merge-implementations-remove-cruft.patch +++ /dev/null @@ -1,401 +0,0 @@ -From 3fde78dba9ad834ab264ad6888672833874b9101 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Wed, 18 Sep 2013 11:52:14 -0400 -Subject: [PATCH] shared/utf8: merge implementations, remove cruft - -This unifies the utf8 handling code which was previously duplicated in -udev and systemd. ---- - TODO | 1 - - src/shared/utf8.c | 279 +++++++++++++-------------------------------------- - src/shared/utf8.h | 3 +- - src/test/test-utf8.c | 9 ++ - 4 files changed, 81 insertions(+), 211 deletions(-) - -diff --git a/TODO b/TODO -index 4c3e14f..8b7325e 100644 ---- a/TODO -+++ b/TODO -@@ -599,7 +599,6 @@ Features: - * udev: - - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n) - - move to LGPL -- - unify utf8 validator code with shared/ - - kill scsi_id - - add trigger --subsystem-match=usb/usb_device device - -diff --git a/src/shared/utf8.c b/src/shared/utf8.c -index 1a68394..732f0f0 100644 ---- a/src/shared/utf8.c -+++ b/src/shared/utf8.c -@@ -51,8 +51,6 @@ - #include "utf8.h" - #include "util.h" - --#define FILTER_CHAR '_' -- - static inline bool is_unicode_valid(uint32_t ch) { - - if (ch >= 0x110000) /* End of unicode space */ -@@ -67,17 +65,6 @@ static inline bool is_unicode_valid(uint32_t ch) { - return true; - } - --static inline bool is_continuation_char(uint8_t ch) { -- if ((ch & 0xc0) != 0x80) /* 10xxxxxx */ -- return false; -- return true; --} -- --static inline void merge_continuation_char(uint32_t *u_ch, uint8_t ch) { -- *u_ch <<= 6; -- *u_ch |= ch & 0x3f; --} -- - static bool is_unicode_control(uint32_t ch) { - - /* -@@ -90,163 +77,97 @@ static bool is_unicode_control(uint32_t ch) { - (0x7F <= ch && ch <= 0x9F); - } - --bool utf8_is_printable(const char* str, size_t length) { -- uint32_t val = 0; -- uint32_t min = 0; -- const uint8_t *p; -+/* count of characters used to encode one unicode char */ -+static int utf8_encoded_expected_len(const char *str) { -+ unsigned char c = (unsigned char)str[0]; - -- assert(str); -+ if (c < 0x80) -+ return 1; -+ if ((c & 0xe0) == 0xc0) -+ return 2; -+ if ((c & 0xf0) == 0xe0) -+ return 3; -+ if ((c & 0xf8) == 0xf0) -+ return 4; -+ if ((c & 0xfc) == 0xf8) -+ return 5; -+ if ((c & 0xfe) == 0xfc) -+ return 6; -+ return 0; -+} - -- for (p = (const uint8_t*) str; length; p++, length--) { -- if (*p < 128) { -- val = *p; -- } else { -- if ((*p & 0xe0) == 0xc0) { /* 110xxxxx two-char seq. */ -- min = 128; -- val = (uint32_t) (*p & 0x1e); -- goto ONE_REMAINING; -- } else if ((*p & 0xf0) == 0xe0) { /* 1110xxxx three-char seq.*/ -- min = (1 << 11); -- val = (uint32_t) (*p & 0x0f); -- goto TWO_REMAINING; -- } else if ((*p & 0xf8) == 0xf0) { /* 11110xxx four-char seq */ -- min = (1 << 16); -- val = (uint32_t) (*p & 0x07); -- } else -- return false; -- -- p++; -- length--; -- if (!length || !is_continuation_char(*p)) -- return false; -- merge_continuation_char(&val, *p); -- -- TWO_REMAINING: -- p++; -- length--; -- if (!is_continuation_char(*p)) -- return false; -- merge_continuation_char(&val, *p); -- -- ONE_REMAINING: -- p++; -- length--; -- if (!is_continuation_char(*p)) -- return false; -- merge_continuation_char(&val, *p); -- -- if (val < min) -- return false; -- } -+/* decode one unicode char */ -+static int utf8_encoded_to_unichar(const char *str) { -+ int unichar; -+ int len; -+ int i; - -- if (is_unicode_control(val)) -- return false; -+ len = utf8_encoded_expected_len(str); -+ switch (len) { -+ case 1: -+ return (int)str[0]; -+ case 2: -+ unichar = str[0] & 0x1f; -+ break; -+ case 3: -+ unichar = (int)str[0] & 0x0f; -+ break; -+ case 4: -+ unichar = (int)str[0] & 0x07; -+ break; -+ case 5: -+ unichar = (int)str[0] & 0x03; -+ break; -+ case 6: -+ unichar = (int)str[0] & 0x01; -+ break; -+ default: -+ return -1; - } - -- return true; -+ for (i = 1; i < len; i++) { -+ if (((int)str[i] & 0xc0) != 0x80) -+ return -1; -+ unichar <<= 6; -+ unichar |= (int)str[i] & 0x3f; -+ } -+ -+ return unichar; - } - --static char* utf8_validate(const char *str, char *output) { -- uint32_t val = 0; -- uint32_t min = 0; -- const uint8_t *p, *last; -- int size; -- uint8_t *o; -+bool utf8_is_printable(const char* str, size_t length) { -+ const uint8_t *p; - - assert(str); - -- o = (uint8_t*) output; -- for (p = (const uint8_t*) str; *p; p++) { -- if (*p < 128) { -- if (o) -- *o = *p; -- } else { -- last = p; -- -- if ((*p & 0xe0) == 0xc0) { /* 110xxxxx two-char seq. */ -- size = 2; -- min = 128; -- val = (uint32_t) (*p & 0x1e); -- goto ONE_REMAINING; -- } else if ((*p & 0xf0) == 0xe0) { /* 1110xxxx three-char seq.*/ -- size = 3; -- min = (1 << 11); -- val = (uint32_t) (*p & 0x0f); -- goto TWO_REMAINING; -- } else if ((*p & 0xf8) == 0xf0) { /* 11110xxx four-char seq */ -- size = 4; -- min = (1 << 16); -- val = (uint32_t) (*p & 0x07); -- } else -- goto error; -- -- p++; -- if (!is_continuation_char(*p)) -- goto error; -- merge_continuation_char(&val, *p); -- -- TWO_REMAINING: -- p++; -- if (!is_continuation_char(*p)) -- goto error; -- merge_continuation_char(&val, *p); -- -- ONE_REMAINING: -- p++; -- if (!is_continuation_char(*p)) -- goto error; -- merge_continuation_char(&val, *p); -- -- if (val < min) -- goto error; -- -- if (!is_unicode_valid(val)) -- goto error; -- -- if (o) { -- memcpy(o, last, (size_t) size); -- o += size; -- } -- -- continue; -- -- error: -- if (o) { -- *o = FILTER_CHAR; -- p = last; /* We retry at the next character */ -- } else -- goto failure; -- } -+ for (p = (const uint8_t*) str; length; p++) { -+ int encoded_len = utf8_encoded_valid_unichar((const char *)p); -+ int32_t val = utf8_encoded_to_unichar((const char*)p); - -- if (o) -- o++; -- } -+ if (encoded_len < 0 || val < 0 || is_unicode_control(val)) -+ return false; - -- if (o) { -- *o = '\0'; -- return output; -+ length -= encoded_len; - } - -- return (char*) str; -- --failure: -- return NULL; --} -- --char* utf8_is_valid (const char *str) { -- return utf8_validate(str, NULL); -+ return true; - } - --char* utf8_filter (const char *str) { -- char *new_str; -+const char *utf8_is_valid(const char *str) { -+ const uint8_t *p; - - assert(str); - -- new_str = malloc(strlen(str) + 1); -- if (!new_str) -- return NULL; -+ for (p = (const uint8_t*) str; *p; ) { -+ int len = utf8_encoded_valid_unichar((const char *)p); -+ -+ if (len < 0) -+ return NULL; -+ -+ p += len; -+ } - -- return utf8_validate(str, new_str); -+ return str; - } - - char *ascii_is_valid(const char *str) { -@@ -318,64 +239,6 @@ char *utf16_to_utf8(const void *s, size_t length) { - return r; - } - --/* count of characters used to encode one unicode char */ --static int utf8_encoded_expected_len(const char *str) { -- unsigned char c = (unsigned char)str[0]; -- -- if (c < 0x80) -- return 1; -- if ((c & 0xe0) == 0xc0) -- return 2; -- if ((c & 0xf0) == 0xe0) -- return 3; -- if ((c & 0xf8) == 0xf0) -- return 4; -- if ((c & 0xfc) == 0xf8) -- return 5; -- if ((c & 0xfe) == 0xfc) -- return 6; -- return 0; --} -- --/* decode one unicode char */ --static int utf8_encoded_to_unichar(const char *str) { -- int unichar; -- int len; -- int i; -- -- len = utf8_encoded_expected_len(str); -- switch (len) { -- case 1: -- return (int)str[0]; -- case 2: -- unichar = str[0] & 0x1f; -- break; -- case 3: -- unichar = (int)str[0] & 0x0f; -- break; -- case 4: -- unichar = (int)str[0] & 0x07; -- break; -- case 5: -- unichar = (int)str[0] & 0x03; -- break; -- case 6: -- unichar = (int)str[0] & 0x01; -- break; -- default: -- return -1; -- } -- -- for (i = 1; i < len; i++) { -- if (((int)str[i] & 0xc0) != 0x80) -- return -1; -- unichar <<= 6; -- unichar |= (int)str[i] & 0x3f; -- } -- -- return unichar; --} -- - /* expected size used to encode one unicode char */ - static int utf8_unichar_to_encoded_len(int unichar) { - if (unichar < 0x80) -diff --git a/src/shared/utf8.h b/src/shared/utf8.h -index 7a5608c..22e1346 100644 ---- a/src/shared/utf8.h -+++ b/src/shared/utf8.h -@@ -25,12 +25,11 @@ - - #include "macro.h" - --char *utf8_is_valid(const char *s) _pure_; -+const char *utf8_is_valid(const char *s) _pure_; - char *ascii_is_valid(const char *s) _pure_; - - bool utf8_is_printable(const char* str, size_t length) _pure_; - --char *utf8_filter(const char *s); - char *ascii_filter(const char *s); - - char *utf16_to_utf8(const void *s, size_t length); -diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c -index d2b9771..26cc37b 100644 ---- a/src/test/test-utf8.c -+++ b/src/test/test-utf8.c -@@ -47,6 +47,12 @@ static void test_udev_encode_string(void) { - assert_se(expect_encoded_as("s/ash/ng", "s\\x2fash\\x2fng")); - } - -+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)); -+} -+ - static void test_utf8_is_valid(void) { - assert_se(utf8_is_valid("ascii is valid unicode")); - assert_se(utf8_is_valid("\341\204\242")); -@@ -55,5 +61,8 @@ static void test_utf8_is_valid(void) { - - int main(int argc, char *argv[]) { - test_utf8_is_valid(); -+ test_utf8_is_printable(); - test_udev_encode_string(); -+ -+ return 0; - } diff --git a/SOURCES/0088-device-nodes-move-device-node-specific-code-to-own-f.patch b/SOURCES/0088-device-nodes-move-device-node-specific-code-to-own-f.patch deleted file mode 100644 index 4aac24b..0000000 --- a/SOURCES/0088-device-nodes-move-device-node-specific-code-to-own-f.patch +++ /dev/null @@ -1,418 +0,0 @@ -From a6b1359b406410ca48160deb442a62f73f3b7508 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Wed, 18 Sep 2013 12:12:04 -0400 -Subject: [PATCH] device-nodes: move device node specific code to own file - -In the process, rename udev_encode_string which is poorly named for what -it does. It deals specifically with encoding names that udev creates and -has its own rules: utf8 is valid but some ascii is not (e.g. path -separators), and everything else is simply escaped. Rename it to -encode_devnode_name. ---- - .gitignore | 1 + - Makefile.am | 14 ++++++++- - src/libudev/libudev-util.c | 5 +-- - src/shared/device-nodes.c | 74 ++++++++++++++++++++++++++++++++++++++++++++ - src/shared/device-nodes.h | 23 ++++++++++++++ - src/shared/utf8.c | 46 --------------------------- - src/shared/utf8.h | 2 -- - src/shared/util.c | 4 +-- - src/test/test-device-nodes.c | 55 ++++++++++++++++++++++++++++++++ - src/test/test-utf8.c | 28 +---------------- - 10 files changed, 172 insertions(+), 80 deletions(-) - create mode 100644 src/shared/device-nodes.c - create mode 100644 src/shared/device-nodes.h - create mode 100644 src/test/test-device-nodes.c - -diff --git a/.gitignore b/.gitignore -index deeee53..8115d4d 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -101,6 +101,7 @@ - /test-cgroup-util - /test-daemon - /test-date -+/test-device-nodes - /test-efivars - /test-engine - /test-env-replace -diff --git a/Makefile.am b/Makefile.am -index 6dd33ad..aa16522 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -640,6 +640,8 @@ libsystemd_shared_la_SOURCES = \ - src/shared/list.h \ - src/shared/macro.h \ - src/shared/def.h \ -+ src/shared/device-nodes.c \ -+ src/shared/device-nodes.h \ - src/shared/sparse-endian.h \ - src/shared/util.c \ - src/shared/util.h \ -@@ -1135,7 +1137,8 @@ tests += \ - test-time \ - test-hashmap \ - test-list \ -- test-tables -+ test-tables \ -+ test-device-nodes - - EXTRA_DIST += \ - test/sched_idle_bad.service \ -@@ -1147,6 +1150,15 @@ EXTRA_DIST += \ - EXTRA_DIST += \ - src/test/test-helper.h - -+test_device_nodes_SOURCES = \ -+ src/test/test-device-nodes.c -+ -+test_device_nodes_CFLAGS = \ -+ $(AM_CFLAGS) -+ -+test_device_nodes_LDADD = \ -+ libsystemd-shared.la -+ - test_engine_SOURCES = \ - src/test/test-engine.c - -diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c -index d54430c..b5b9db6 100644 ---- a/src/libudev/libudev-util.c -+++ b/src/libudev/libudev-util.c -@@ -32,6 +32,7 @@ - #include - #include - -+#include "device-nodes.h" - #include "libudev.h" - #include "libudev-private.h" - #include "utf8.h" -@@ -344,7 +345,7 @@ int util_replace_chars(char *str, const char *white) - while (str[i] != '\0') { - int len; - -- if (is_utf8_encoding_whitelisted(str[i], white)) { -+ if (whitelisted_char_for_devnode(str[i], white)) { - i++; - continue; - } -@@ -392,7 +393,7 @@ int util_replace_chars(char *str, const char *white) - **/ - _public_ int udev_util_encode_string(const char *str, char *str_enc, size_t len) - { -- return udev_encode_string(str, str_enc, len); -+ return encode_devnode_name(str, str_enc, len); - } - - /* -diff --git a/src/shared/device-nodes.c b/src/shared/device-nodes.c -new file mode 100644 -index 0000000..986553e ---- /dev/null -+++ b/src/shared/device-nodes.c -@@ -0,0 +1,74 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2012 Lennart Poettering -+ -+ 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 -+#include -+#include -+#include -+ -+#include "device-nodes.h" -+#include "utf8.h" -+ -+int whitelisted_char_for_devnode(char c, const char *white) { -+ if ((c >= '0' && c <= '9') || -+ (c >= 'A' && c <= 'Z') || -+ (c >= 'a' && c <= 'z') || -+ strchr("#+-.:=@_", c) != NULL || -+ (white != NULL && strchr(white, c) != NULL)) -+ return 1; -+ return 0; -+} -+ -+int encode_devnode_name(const char *str, char *str_enc, size_t len) { -+ size_t i, j; -+ -+ if (str == NULL || str_enc == NULL) -+ return -1; -+ -+ for (i = 0, j = 0; str[i] != '\0'; i++) { -+ int seqlen; -+ -+ seqlen = utf8_encoded_valid_unichar(&str[i]); -+ if (seqlen > 1) { -+ if (len-j < (size_t)seqlen) -+ goto err; -+ memcpy(&str_enc[j], &str[i], seqlen); -+ j += seqlen; -+ i += (seqlen-1); -+ } else if (str[i] == '\\' || !whitelisted_char_for_devnode(str[i], NULL)) { -+ if (len-j < 4) -+ goto err; -+ sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); -+ j += 4; -+ } else { -+ if (len-j < 1) -+ goto err; -+ str_enc[j] = str[i]; -+ j++; -+ } -+ } -+ if (len-j < 1) -+ goto err; -+ str_enc[j] = '\0'; -+ return 0; -+err: -+ return -1; -+} -diff --git a/src/shared/device-nodes.h b/src/shared/device-nodes.h -new file mode 100644 -index 0000000..a98195a ---- /dev/null -+++ b/src/shared/device-nodes.h -@@ -0,0 +1,23 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2012 Lennart Poettering -+ -+ 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 . -+***/ -+ -+int encode_devnode_name(const char *str, char *str_enc, size_t len); -+int whitelisted_char_for_devnode(char c, const char *additional); -diff --git a/src/shared/utf8.c b/src/shared/utf8.c -index 732f0f0..c3d97cc 100644 ---- a/src/shared/utf8.c -+++ b/src/shared/utf8.c -@@ -285,49 +285,3 @@ int utf8_encoded_valid_unichar(const char *str) { - - return len; - } -- --int is_utf8_encoding_whitelisted(char c, const char *white) { -- if ((c >= '0' && c <= '9') || -- (c >= 'A' && c <= 'Z') || -- (c >= 'a' && c <= 'z') || -- strchr("#+-.:=@_", c) != NULL || -- (white != NULL && strchr(white, c) != NULL)) -- return 1; -- return 0; --} -- --int udev_encode_string(const char *str, char *str_enc, size_t len) { -- size_t i, j; -- -- if (str == NULL || str_enc == NULL) -- return -1; -- -- for (i = 0, j = 0; str[i] != '\0'; i++) { -- int seqlen; -- -- seqlen = utf8_encoded_valid_unichar(&str[i]); -- if (seqlen > 1) { -- if (len-j < (size_t)seqlen) -- goto err; -- memcpy(&str_enc[j], &str[i], seqlen); -- j += seqlen; -- i += (seqlen-1); -- } else if (str[i] == '\\' || !is_utf8_encoding_whitelisted(str[i], NULL)) { -- if (len-j < 4) -- goto err; -- sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); -- j += 4; -- } else { -- if (len-j < 1) -- goto err; -- str_enc[j] = str[i]; -- j++; -- } -- } -- if (len-j < 1) -- goto err; -- str_enc[j] = '\0'; -- return 0; --err: -- return -1; --} -diff --git a/src/shared/utf8.h b/src/shared/utf8.h -index 22e1346..96a03ea 100644 ---- a/src/shared/utf8.h -+++ b/src/shared/utf8.h -@@ -35,5 +35,3 @@ char *ascii_filter(const char *s); - char *utf16_to_utf8(const void *s, size_t length); - - int utf8_encoded_valid_unichar(const char *str); --int is_utf8_encoding_whitelisted(char c, const char *white); --int udev_encode_string(const char *str, char *str_enc, size_t len); -diff --git a/src/shared/util.c b/src/shared/util.c -index 4f80cc8..4711d91 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -73,7 +73,7 @@ - #include "hashmap.h" - #include "env-util.h" - #include "fileio.h" --#include "utf8.h" -+#include "device-nodes.h" - - int saved_argc = 0; - char **saved_argv = NULL; -@@ -3509,7 +3509,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) { - if (t == NULL) - return NULL; - -- if (udev_encode_string(u, t, enc_len) < 0) -+ if (encode_devnode_name(u, t, enc_len) < 0) - return NULL; - - if (asprintf(&dn, "/dev/disk/by-%s/%s", by, t) < 0) -diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c -new file mode 100644 -index 0000000..2f3dedb ---- /dev/null -+++ b/src/test/test-device-nodes.c -@@ -0,0 +1,55 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2013 Dave Reisner -+ -+ 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 -+ -+#include "device-nodes.h" -+#include "util.h" -+ -+/* helpers for test_encode_devnode_name */ -+static char *do_encode_string(const char *in) { -+ size_t out_len = strlen(in) * 4; -+ char *out = malloc(out_len); -+ -+ assert_se(out); -+ assert_se(encode_devnode_name(in, out, out_len) >= 0); -+ puts(out); -+ -+ return out; -+} -+ -+static bool expect_encoded_as(const char *in, const char *expected) { -+ _cleanup_free_ char *encoded = do_encode_string(in); -+ return streq(encoded, expected); -+} -+ -+static void test_encode_devnode_name(void) { -+ assert_se(expect_encoded_as("systemd sucks", "systemd\\x20sucks")); -+ 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")); -+} -+ -+int main(int argc, char *argv[]) { -+ test_encode_devnode_name(); -+ -+ return 0; -+} -diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c -index 26cc37b..b5a833e 100644 ---- a/src/test/test-utf8.c -+++ b/src/test/test-utf8.c -@@ -19,34 +19,9 @@ - along with systemd; If not, see . - ***/ - -- - #include "utf8.h" - #include "util.h" - --/* helpers for test_udev_encode_string */ --static char *do_encode_string(const char *in) { -- size_t out_len = strlen(in) * 4; -- char *out = malloc(out_len); -- -- assert_se(out); -- assert_se(udev_encode_string(in, out, out_len) >= 0); -- puts(out); -- -- return out; --} -- --static bool expect_encoded_as(const char *in, const char *expected) { -- _cleanup_free_ char *encoded = do_encode_string(in); -- return streq(encoded, expected); --} -- --static void test_udev_encode_string(void) { -- assert_se(expect_encoded_as("systemd sucks", "systemd\\x20sucks")); -- 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")); --} -- - 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)); -@@ -55,14 +30,13 @@ static void test_utf8_is_printable(void) { - - static void test_utf8_is_valid(void) { - assert_se(utf8_is_valid("ascii is valid unicode")); -- assert_se(utf8_is_valid("\341\204\242")); -+ assert_se(utf8_is_valid("\342\204\242")); - assert_se(!utf8_is_valid("\341\204")); - } - - int main(int argc, char *argv[]) { - test_utf8_is_valid(); - test_utf8_is_printable(); -- test_udev_encode_string(); - - return 0; - } 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/0089-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch b/SOURCES/0089-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch deleted file mode 100644 index b7146f4..0000000 --- a/SOURCES/0089-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 665bb7f5ec052d5e78bb298f1f2fc181ba03c411 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 4711d91..e69d1ff 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -3504,7 +3504,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/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/0090-udev-path_id-fix-by-path-link-generation-for-scm-dev.patch b/SOURCES/0090-udev-path_id-fix-by-path-link-generation-for-scm-dev.patch deleted file mode 100644 index 81471cb..0000000 --- a/SOURCES/0090-udev-path_id-fix-by-path-link-generation-for-scm-dev.patch +++ /dev/null @@ -1,25 +0,0 @@ -From dd6fb603d74e958f6a24b07f8792f07a576111ee Mon Sep 17 00:00:00 2001 -From: Sebastian Ott -Date: Tue, 17 Sep 2013 19:16:08 +0200 -Subject: [PATCH] udev: path_id - fix by-path link generation for scm devices - -Set some_transport = true to prevent scm devices from being ignored. - -Suggested-by: Harald Hoyer -Signed-off-by: Sebastian Ott ---- - src/udev/udev-builtin-path_id.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c -index da02731..0659967 100644 ---- a/src/udev/udev-builtin-path_id.c -+++ b/src/udev/udev-builtin-path_id.c -@@ -531,6 +531,7 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool - } else if (streq(subsys, "scm")) { - path_prepend(&path, "scm-%s", udev_device_get_sysname(parent)); - parent = skip_subsystem(parent, "scm"); -+ some_transport = true; - } - - parent = udev_device_get_parent(parent); diff --git a/SOURCES/0091-hashmap-randomize-hash-functions-a-bit.patch b/SOURCES/0091-hashmap-randomize-hash-functions-a-bit.patch deleted file mode 100644 index 5c7b270..0000000 --- a/SOURCES/0091-hashmap-randomize-hash-functions-a-bit.patch +++ /dev/null @@ -1,374 +0,0 @@ -From 9bf25f9e532dad32d71e95a85c413996d4bd58ac Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Oct 2013 23:11:23 +0200 -Subject: [PATCH] hashmap: randomize hash functions a bit - ---- - configure.ac | 2 +- - src/shared/hashmap.c | 104 +++++++++++++++++++++++++++++++-------------------- - src/shared/util.c | 19 ++++++++++ - src/shared/util.h | 1 + - 4 files changed, 85 insertions(+), 41 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c7f4f1b..2ae0411 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -804,7 +804,7 @@ have_myhostname=no - AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support])) - if test "x$enable_myhostname" != "xno"; then - AC_HEADER_STDC -- AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h]) -+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h]) - - AC_C_CONST - AC_TYPE_SIZE_T -diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c -index 6330792..f06fce6 100644 ---- a/src/shared/hashmap.c -+++ b/src/shared/hashmap.c -@@ -24,6 +24,10 @@ - #include - #include - -+#ifdef HAVE_SYS_AUXV_H -+#include -+#endif -+ - #include "util.h" - #include "hashmap.h" - #include "macro.h" -@@ -46,6 +50,7 @@ struct Hashmap { - struct hashmap_entry ** buckets; - unsigned n_buckets, n_entries; - -+ unsigned random_xor; - bool from_pool; - }; - -@@ -171,10 +176,15 @@ int uint64_compare_func(const void *_a, const void *_b) { - return a < b ? -1 : (a > b ? 1 : 0); - } - -+static unsigned bucket_hash(Hashmap *h, const void *p) { -+ return (h->hash_func(p) ^ h->random_xor) % h->n_buckets; -+} -+ - Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { - bool b; - Hashmap *h; - size_t size; -+ void *auxv; - - b = is_main_thread(); - -@@ -204,6 +214,19 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { - - h->from_pool = b; - -+ /* Let's randomize our hash functions a bit so that they are -+ * harder to guess for clients. For this, start out by cheaply -+ * using some bits the kernel passed into the process using -+ * the auxiliary vector. If the hashmap grows later on we will -+ * rehash everything using a new random XOR mask from -+ * /dev/random. */ -+#ifdef HAVE_SYS_AUXV_H -+ auxv = (void*) getauxval(AT_RANDOM); -+ h->random_xor = auxv ? *(unsigned*) auxv : random_u(); -+#else -+ h->random_xor = random_u(); -+#endif -+ - return h; - } - -@@ -284,8 +307,7 @@ static void remove_entry(Hashmap *h, struct hashmap_entry *e) { - assert(h); - assert(e); - -- hash = h->hash_func(e->key) % h->n_buckets; -- -+ hash = bucket_hash(h, e->key); - unlink_entry(h, e, hash); - - if (h->from_pool) -@@ -368,7 +390,6 @@ void hashmap_clear_free_free(Hashmap *h) { - } - } - -- - static struct hashmap_entry *hash_scan(Hashmap *h, unsigned hash, const void *key) { - struct hashmap_entry *e; - assert(h); -@@ -382,8 +403,8 @@ static struct hashmap_entry *hash_scan(Hashmap *h, unsigned hash, const void *ke - } - - static bool resize_buckets(Hashmap *h) { -- unsigned m; - struct hashmap_entry **n, *i; -+ unsigned m, nxor; - - assert(h); - -@@ -398,6 +419,11 @@ static bool resize_buckets(Hashmap *h) { - if (!n) - return false; - -+ /* Let's use a different randomized xor value for the -+ * extension, so that people cannot guess what we are using -+ * here forever */ -+ nxor = random_u(); -+ - for (i = h->iterate_list_head; i; i = i->iterate_next) { - unsigned hash, x; - -@@ -410,10 +436,10 @@ static bool resize_buckets(Hashmap *h) { - if (i->bucket_previous) - i->bucket_previous->bucket_next = i->bucket_next; - else -- h->buckets[hash % h->n_buckets] = i->bucket_next; -+ h->buckets[(hash ^ h->random_xor) % h->n_buckets] = i->bucket_next; - - /* Then, add to new backet table */ -- x = hash % m; -+ x = (hash ^ nxor) % m; - - i->bucket_next = n[x]; - i->bucket_previous = NULL; -@@ -427,6 +453,7 @@ static bool resize_buckets(Hashmap *h) { - - h->buckets = n; - h->n_buckets = m; -+ h->random_xor = nxor; - - return true; - } -@@ -437,7 +464,7 @@ int hashmap_put(Hashmap *h, const void *key, void *value) { - - assert(h); - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (e) { - if (e->value == value) -@@ -446,7 +473,7 @@ int hashmap_put(Hashmap *h, const void *key, void *value) { - } - - if (resize_buckets(h)) -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - - if (h->from_pool) - e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry)); -@@ -470,7 +497,7 @@ int hashmap_replace(Hashmap *h, const void *key, void *value) { - - assert(h); - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (e) { - e->key = key; -@@ -487,7 +514,7 @@ int hashmap_update(Hashmap *h, const void *key, void *value) { - - assert(h); - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (!e) - return -ENOENT; -@@ -503,7 +530,7 @@ void* hashmap_get(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (!e) - return NULL; -@@ -518,7 +545,7 @@ void* hashmap_get2(Hashmap *h, const void *key, void **key2) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (!e) - return NULL; -@@ -535,12 +562,8 @@ bool hashmap_contains(Hashmap *h, const void *key) { - if (!h) - return false; - -- hash = h->hash_func(key) % h->n_buckets; -- -- if (!hash_scan(h, hash, key)) -- return false; -- -- return true; -+ hash = bucket_hash(h, key); -+ return !!hash_scan(h, hash, key); - } - - void* hashmap_remove(Hashmap *h, const void *key) { -@@ -551,9 +574,9 @@ void* hashmap_remove(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -- -- if (!(e = hash_scan(h, hash, key))) -+ hash = bucket_hash(h, key); -+ e = hash_scan(h, hash, key); -+ if (!e) - return NULL; - - data = e->value; -@@ -569,11 +592,12 @@ int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, - if (!h) - return -ENOENT; - -- old_hash = h->hash_func(old_key) % h->n_buckets; -- if (!(e = hash_scan(h, old_hash, old_key))) -+ old_hash = bucket_hash(h, old_key); -+ e = hash_scan(h, old_hash, old_key); -+ if (!e) - return -ENOENT; - -- new_hash = h->hash_func(new_key) % h->n_buckets; -+ new_hash = bucket_hash(h, new_key); - if (hash_scan(h, new_hash, new_key)) - return -EEXIST; - -@@ -594,12 +618,14 @@ int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_ - if (!h) - return -ENOENT; - -- old_hash = h->hash_func(old_key) % h->n_buckets; -- if (!(e = hash_scan(h, old_hash, old_key))) -+ old_hash = bucket_hash(h, old_key); -+ e = hash_scan(h, old_hash, old_key); -+ if (!e) - return -ENOENT; - -- new_hash = h->hash_func(new_key) % h->n_buckets; -- if ((k = hash_scan(h, new_hash, new_key))) -+ new_hash = bucket_hash(h, new_key); -+ k = hash_scan(h, new_hash, new_key); -+ if (k) - if (e != k) - remove_entry(h, k); - -@@ -620,7 +646,7 @@ void* hashmap_remove_value(Hashmap *h, const void *key, void *value) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - - e = hash_scan(h, hash, key); - if (!e) -@@ -711,7 +737,7 @@ void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - - e = hash_scan(h, hash, key); - if (!e) -@@ -820,9 +846,9 @@ int hashmap_merge(Hashmap *h, Hashmap *other) { - for (e = other->iterate_list_head; e; e = e->iterate_next) { - int r; - -- if ((r = hashmap_put(h, e->key, e->value)) < 0) -- if (r != -EEXIST) -- return r; -+ r = hashmap_put(h, e->key, e->value); -+ if (r < 0 && r != -EEXIST) -+ return r; - } - - return 0; -@@ -844,13 +870,11 @@ void hashmap_move(Hashmap *h, Hashmap *other) { - - n = e->iterate_next; - -- h_hash = h->hash_func(e->key) % h->n_buckets; -- -+ h_hash = bucket_hash(h, e->key); - if (hash_scan(h, h_hash, e->key)) - continue; - -- other_hash = other->hash_func(e->key) % other->n_buckets; -- -+ other_hash = bucket_hash(other, e->key); - unlink_entry(other, e, other_hash); - link_entry(h, e, h_hash); - } -@@ -865,11 +889,11 @@ int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key) { - - assert(h); - -- h_hash = h->hash_func(key) % h->n_buckets; -+ h_hash = bucket_hash(h, key); - if (hash_scan(h, h_hash, key)) - return -EEXIST; - -- other_hash = other->hash_func(key) % other->n_buckets; -+ other_hash = bucket_hash(other, key); - e = hash_scan(other, other_hash, key); - if (!e) - return -ENOENT; -@@ -925,7 +949,7 @@ void *hashmap_next(Hashmap *h, const void *key) { - if (!h) - return NULL; - -- hash = h->hash_func(key) % h->n_buckets; -+ hash = bucket_hash(h, key); - e = hash_scan(h, hash, key); - if (!e) - return NULL; -diff --git a/src/shared/util.c b/src/shared/util.c -index e69d1ff..95fe35e 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -2420,6 +2420,25 @@ fallback: - return random() * RAND_MAX + random(); - } - -+unsigned random_u(void) { -+ _cleanup_close_ int fd; -+ unsigned u; -+ ssize_t r; -+ -+ fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY); -+ if (fd < 0) -+ goto fallback; -+ -+ r = loop_read(fd, &u, sizeof(u), true); -+ if (r != sizeof(u)) -+ goto fallback; -+ -+ return u; -+ -+fallback: -+ return random() * RAND_MAX + random(); -+} -+ - void rename_process(const char name[8]) { - assert(name); - -diff --git a/src/shared/util.h b/src/shared/util.h -index 63f4e3d..1b845b3 100644 ---- a/src/shared/util.h -+++ b/src/shared/util.h -@@ -253,6 +253,7 @@ int make_null_stdio(void); - int make_console_stdio(void); - - unsigned long long random_ull(void); -+unsigned random_u(void); - - /* For basic lookup tables with strictly enumerated entries */ - #define __DEFINE_STRING_TABLE_LOOKUP(name,type,scope) \ 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-Configurable-Timeouts-Restarts-default-values.patch b/SOURCES/0092-Configurable-Timeouts-Restarts-default-values.patch deleted file mode 100644 index 6267d66..0000000 --- a/SOURCES/0092-Configurable-Timeouts-Restarts-default-values.patch +++ /dev/null @@ -1,293 +0,0 @@ -From b78b223c1f2cfb6bdeac4dc22748e7289c4537da 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 45f96fa..1e94f82 100644 ---- a/man/systemd.service.xml -+++ b/man/systemd.service.xml -@@ -523,7 +523,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. -@@ -544,7 +545,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 662d16d..b72d7f4 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 cfc8ba6..ea47f8c 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 778f8c8..247f2fb 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 6f86a86..392cb17 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/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/0093-manager-configurable-StartLimit-default-values.patch b/SOURCES/0093-manager-configurable-StartLimit-default-values.patch deleted file mode 100644 index c564dda..0000000 --- a/SOURCES/0093-manager-configurable-StartLimit-default-values.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 4490d065a987d464fed86b2d48d607766c192bfe 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 1e94f82..7200fb9 100644 ---- a/man/systemd.service.xml -+++ b/man/systemd.service.xml -@@ -862,12 +862,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 b72d7f4..4911768 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 ea47f8c..cefb253 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/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/0094-sysctl-bring-back-etc-sysctl.conf.patch b/SOURCES/0094-sysctl-bring-back-etc-sysctl.conf.patch deleted file mode 100644 index 9b8e129..0000000 --- a/SOURCES/0094-sysctl-bring-back-etc-sysctl.conf.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c5e66155b5d6bb57aa1c93bdab988e61c3e41bbe 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/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/0095-tmpfiles-add-a-new-m-line-type-that-adjusts-user-gro.patch b/SOURCES/0095-tmpfiles-add-a-new-m-line-type-that-adjusts-user-gro.patch deleted file mode 100644 index a65c0b5..0000000 --- a/SOURCES/0095-tmpfiles-add-a-new-m-line-type-that-adjusts-user-gro.patch +++ /dev/null @@ -1,158 +0,0 @@ -From cb869b77802b536aab1716714cdd5478d891d3f4 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 17 Sep 2013 16:33:30 -0500 -Subject: [PATCH] tmpfiles: add a new "m" line type that adjusts - user/group/mode of a file if it exists - ---- - man/systemd-tmpfiles.xml | 2 +- - man/tmpfiles.d.xml | 11 +++++++++++ - src/tmpfiles/tmpfiles.c | 39 +++++++++++++++++++++++++++++++-------- - 3 files changed, 43 insertions(+), 9 deletions(-) - -diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml -index 281ab3c..ba727e1 100644 ---- a/man/systemd-tmpfiles.xml -+++ b/man/systemd-tmpfiles.xml -@@ -165,7 +165,7 @@ - See Also - - systemd1, -- tmpfiles.d5, -+ tmpfiles.d5 - - - -diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml -index cdc87c9..98e3690 100644 ---- a/man/tmpfiles.d.xml -+++ b/man/tmpfiles.d.xml -@@ -152,6 +152,17 @@ L /tmp/foobar - - - - /dev/null - - - -+ m -+ If the -+ specified file path exists -+ adjust its access mode, group -+ and user to the specified -+ values and reset the SELinux -+ label. If it doesn't exist do -+ nothing. -+ -+ -+ - x - Ignore a path - during cleaning. Use this type -diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index ea99920..49e6529 100644 ---- a/src/tmpfiles/tmpfiles.c -+++ b/src/tmpfiles/tmpfiles.c -@@ -68,6 +68,7 @@ typedef enum ItemType { - CREATE_SYMLINK = 'L', - CREATE_CHAR_DEVICE = 'c', - CREATE_BLOCK_DEVICE = 'b', -+ ADJUST_MODE = 'm', - - /* These ones take globs */ - IGNORE_PATH = 'x', -@@ -256,8 +257,8 @@ static int dir_cleanup( - dev_t rootdev, - bool mountpoint, - int maxdepth, -- bool keep_this_level) --{ -+ bool keep_this_level) { -+ - struct dirent *dent; - struct timespec times[2]; - bool deleted = false; -@@ -431,12 +432,16 @@ finish: - return r; - } - --static int item_set_perms(Item *i, const char *path) { -+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) { -- log_error("chmod(%s) failed: %m", path); -- return -errno; -+ if (errno != ENOENT || !ignore_enoent) { -+ log_error("chmod(%s) failed: %m", path); -+ return -errno; -+ } - } - - if (i->uid_set || i->gid_set) -@@ -444,11 +449,18 @@ static int item_set_perms(Item *i, const char *path) { - i->uid_set ? i->uid : (uid_t) -1, - i->gid_set ? i->gid : (gid_t) -1) < 0) { - -- log_error("chown(%s) failed: %m", path); -- return -errno; -+ if (errno != ENOENT || !ignore_enoent) { -+ log_error("chown(%s) failed: %m", path); -+ return -errno; -+ } - } - -- return label_fix(path, false, false); -+ r = label_fix(path, false, false); -+ return r == -ENOENT && ignore_enoent ? 0 : r; -+} -+ -+static int item_set_perms(Item *i, const char *path) { -+ return item_set_perms_full(i, path, false); - } - - static int write_one_file(Item *i, const char *path) { -@@ -644,6 +656,7 @@ static int create_item(Item *i) { - if (r < 0) - return r; - break; -+ - case WRITE_FILE: - r = glob_item(i, write_one_file); - if (r < 0) -@@ -651,6 +664,13 @@ static int create_item(Item *i) { - - break; - -+ case ADJUST_MODE: -+ r = item_set_perms_full(i, i->path, true); -+ if (r < 0) -+ return r; -+ -+ break; -+ - case TRUNCATE_DIRECTORY: - case CREATE_DIRECTORY: - -@@ -821,6 +841,7 @@ static int remove_item_instance(Item *i, const char *instance) { - case RELABEL_PATH: - case RECURSIVE_RELABEL_PATH: - case WRITE_FILE: -+ case ADJUST_MODE: - break; - - case REMOVE_PATH: -@@ -866,6 +887,7 @@ static int remove_item(Item *i) { - case RELABEL_PATH: - case RECURSIVE_RELABEL_PATH: - case WRITE_FILE: -+ case ADJUST_MODE: - break; - - case REMOVE_PATH: -@@ -1093,6 +1115,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { - case RECURSIVE_REMOVE_PATH: - case RELABEL_PATH: - case RECURSIVE_RELABEL_PATH: -+ case ADJUST_MODE: - break; - - case CREATE_SYMLINK: 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/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/85-display-manager.preset b/SOURCES/85-display-manager.preset deleted file mode 100644 index c1d3069..0000000 --- a/SOURCES/85-display-manager.preset +++ /dev/null @@ -1,10 +0,0 @@ -# We enable all display managers by default. Since only one can -# actually be enabled at the same time the one which is installed -# first wins - -enable gdm.service -enable lightdm.service -enable slim.service -enable lxdm.service -enable kdm.service -enable xdm.service diff --git a/SOURCES/90-default.preset b/SOURCES/90-default.preset deleted file mode 100644 index 41ec976..0000000 --- a/SOURCES/90-default.preset +++ /dev/null @@ -1,106 +0,0 @@ -# Also see: -# https://fedoraproject.org/wiki/Starting_services_by_default - -# systemd -enable remote-fs.target -enable getty@tty1.service -enable systemd-readahead-replay.service -enable systemd-readahead-collect.service - -# System stuff -enable sshd.service -enable atd.* -enable crond.* -enable chronyd.service -enable rpcbind.* -enable NetworkManager.service -enable NetworkManager-dispatcher.service -enable ModemManager.service -enable auditd.service -enable restorecond.service -enable bluetooth.* -enable avahi-daemon.* -enable cups.* - -# The various syslog implementations -enable rsyslog.* -enable syslog-ng.* -enable sysklogd.* - -# Network facing -enable firewalld.service -enable libvirtd.service -enable xinetd.service -enable ladvd.service - -# Storage -enable multipathd.service -enable libstoragemgmt.service -enable lvm2-monitor.* -enable lvm2-lvmetad.* -enable dm-event.* -enable dmraid-activation.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=855372 -enable mdmonitor.service -enable mdmonitor-takeover.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=876237 -enable spice-vdagentd.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=885406 -enable qemu-guest-agent.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=928726 -enable dnf-makecache.timer - -# https://bugzilla.redhat.com/show_bug.cgi?id=929403 -enable initial-setup-graphical.service -enable initial-setup-text.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=957135 -enable vmtoolsd.service - -#https://bugzilla.redhat.com/show_bug.cgi?id=995987 -enable kdump.service - -#https://bugzilla.redhat.com/show_bug.cgi?id=1009970 -enable tuned.service - -# Hardware -enable gpm.* -enable gpsd.* -enable irqbalance.service -enable lm_sensors.service -enable mcelog.* -enable acpid.* -enable smartd.service -enable pcscd.socket -enable rngd.service - -# Other stuff -enable abrtd.service -enable abrt-ccpp.service -enable abrt-oops.service -enable abrt-xorg.service -enable abrt-vmcore.service -enable lttng-sessiond.service -enable ksm.service -enable ksmtuned.service -enable rootfs-resize.service -enable sysstat.service -enable uuidd.service -enable xendomains.service -enable xenstored.service -enable xenconsoled.service -enable hypervkvpd.service -enable hypervvssd.service - -# Desktop stuff -enable accounts-daemon.service -enable rtkit-daemon.service -enable upower.service -enable udisks2.service -enable polkit.service -enable packagekit-offline-update.service -enable PackageKit.service diff --git a/SOURCES/rc.local b/SOURCES/rc.local index 87f017f..8e633ff 100644 --- a/SOURCES/rc.local +++ b/SOURCES/rc.local @@ -10,4 +10,4 @@ # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. -exit 0 +touch /var/lock/subsys/local diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index b0f4033..67dad2f 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -10,124 +10,259 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 207 -Release: 8%{?dist} +Version: 208 +Release: 11%{?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 - -# Fedora's default preset policy -Source1: 90-default.preset -Source7: 99-default-disable.preset -Source5: 85-display-manager.preset -# Feodora's SysV convert script. meh. +# 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 -Source4: listen.conf +Source3: listen.conf # Prevent accidental removal of the systemd package -Source6: yum-protect-systemd.conf +Source4: yum-protect-systemd.conf # ship /etc/rc.d/rc.local https://bugzilla.redhat.com/show_bug.cgi?id=968401 -Source8: rc.local - +Source5: rc.local +#https://bugzilla.redhat.com/show_bug.cgi?id=1032711 +Source6: 60-alias-kmsg.rules # RHEL-specific: -Patch0001: 0001-RHEL-units-add-Install-section-to-tmp.mount.patch -Patch0002: 0002-kernel-install-add-fedora-specific-callouts-to-new-k.patch -Patch0003: 0003-core-cgroup-first-print-then-free.patch -Patch0004: 0004-swap-fix-reverse-dependencies.patch -Patch0005: 0005-update-TODO.patch -Patch0006: 0006-cryptsetup-generator-don-t-create-tmp-swap-units.patch -Patch0007: 0007-cryptsetup-generator-allow-specifying-options-in-pro.patch -Patch0008: 0008-automount-rename-repeat_unmont-to-repeat_unmount.patch -Patch0009: 0009-cgroup-add-the-missing-setting-of-variable-s-value.patch -Patch0010: 0010-cgroup-correct-the-log-information.patch -Patch0011: 0011-cgroup-fix-incorrectly-setting-memory-cgroup.patch -Patch0012: 0012-random-seed-we-should-return-errno-of-failed-loop_wr.patch -Patch0013: 0013-update-TODO.patch -Patch0014: 0014-libudev-fix-move_later-comparison.patch -Patch0015: 0015-man-document-luks.options-kernel-commandline.patch -Patch0016: 0016-keymap-remove-some-commented-out-lines.patch -Patch0017: 0017-Advertise-hibernation-only-if-there-s-enough-free-sw.patch -Patch0018: 0018-README-add-SCSI-BSG-option.patch -Patch0019: 0019-swap-create-.wants-symlink-to-auto-swap-devices.patch -Patch0020: 0020-cgroup-add-missing-equals-for-BlockIOWeight.patch -Patch0021: 0021-Assume-that-proc-meminfo-can-be-missing.patch -Patch0022: 0022-transaction.c-do-not-point-users-to-logs-when-unit-n.patch -Patch0023: 0023-Verify-validity-of-session-name-when-received-from-o.patch -Patch0024: 0024-udev-rules-avoid-erroring-on-trailing-whitespace.patch -Patch0025: 0025-keymap-Add-Samsung-Series-5-Ultra.patch -Patch0026: 0026-login-fix-login_is_valid-test.patch -Patch0027: 0027-polkit-Avoid-race-condition-in-scraping-proc.patch -Patch0028: 0028-core-whenever-a-new-PID-is-passed-to-us-make-sure-we.patch -Patch0029: 0029-remove-user-.service.patch -Patch0030: 0030-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch -Patch0031: 0031-logind-return-EINVAL-when-PID-is-wrong.patch -Patch0032: 0032-core-drop-some-out-of-date-references-to-cgroup-sett.patch -Patch0033: 0033-man-explain-NAME-in-systemctl-man-page.patch -Patch0034: 0034-journald-accept-EPOLLERR-from-dev-kmsg.patch -Patch0035: 0035-journald-avoid-NSS-in-journald.patch -Patch0036: 0036-libudev-add-missing-global-to-symbol-export.patch -Patch0037: 0037-gpt-auto-generator-do-not-assume-that-dev-block-u-u-.patch -Patch0038: 0038-logind-put-correct-user-object-paths-in-introspectio.patch -Patch0039: 0039-Fix-obsolete-references-to-systemd-random-seed-load..patch -Patch0040: 0040-cgroup-always-enable-memory.use_hierarchy-for-all-cg.patch -Patch0041: 0041-journalctl-1-s-adm-systemd-journal.patch -Patch0042: 0042-cgroup-if-we-do-a-cgroup-operation-then-do-something.patch -Patch0043: 0043-core-rework-how-we-match-mount-units-against-each-ot.patch -Patch0044: 0044-logind-never-consider-a-closing-session-relevant-for.patch -Patch0045: 0045-man-drop-references-to-cgroup-wher-appropriate.patch -Patch0046: 0046-systemctl-make-sure-set-property-mangles-unit-names.patch -Patch0047: 0047-dbus-fix-introspection-for-TimerSlackNSec.patch -Patch0048: 0048-swap-properly-expose-timeout-property-on-the-bus.patch -Patch0049: 0049-build-sys-restore-detection-of-sphinx.patch -Patch0050: 0050-util-add-macro-for-iterating-through-all-prefixes-of.patch -Patch0051: 0051-util-properly-handle-the-root-dir-in-PATH_FOREACH_PR.patch -Patch0052: 0052-cgroup-get-rid-of-MemorySoftLimit.patch -Patch0053: 0053-set-IgnoreOnIsolate-true-for-systemd-cryptsetup-.ser.patch -Patch0054: 0054-main-don-t-free-fds-array-twice.patch -Patch0055: 0055-local-fix-memory-leak-when-putting-together-locale-s.patch -Patch0056: 0056-hashmap-size-hashmap-bucket-array-dynamically.patch -Patch0057: 0057-smack-setup-fix-path-to-Smack-CIPSO-mappings.patch -Patch0058: 0058-fix-lingering-references-to-var-lib-backlight-random.patch -Patch0059: 0059-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch -Patch0060: 0060-journald-add-missing-error-check.patch -Patch0061: 0061-bus-fix-potentially-uninitialized-memory-access.patch -Patch0062: 0062-dbus-fix-return-value-of-dispatch_rqueue.patch -Patch0063: 0063-modules-load-fix-error-handling.patch -Patch0064: 0064-efi-never-call-qsort-on-potentially-NULL-arrays.patch -Patch0065: 0065-strv-don-t-access-potentially-NULL-string-arrays.patch -Patch0066: 0066-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch -Patch0067: 0067-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch -Patch0068: 0068-gpt-auto-generator-exit-immediately-if-in-container.patch -Patch0069: 0069-systemd-order-remote-mounts-from-mountinfo-before-re.patch -Patch0070: 0070-manager-when-verifying-whether-clients-may-change-en.patch -Patch0071: 0071-mount-check-for-NULL-before-reading-pm-what.patch -Patch0072: 0072-core-do-not-add-what-to-RequiresMountsFor-for-networ.patch -Patch0073: 0073-systemd-serialize-deserialize-forbid_restart-value.patch -Patch0074: 0074-core-unify-the-way-we-denote-serialization-attribute.patch -Patch0075: 0075-journald-fix-minor-memory-leak.patch -Patch0076: 0076-journald-remove-rotated-file-from-hashmap-when-rotat.patch -Patch0077: 0077-udevadm.xml-document-resolve-names-option-for-test.patch -Patch0078: 0078-dbus-common-avoid-leak-in-error-path.patch -Patch0079: 0079-drop-ins-check-return-value.patch -Patch0080: 0080-shared-util-Fix-glob_extend-argument.patch -Patch0081: 0081-Fix-for-SIGSEGV-in-systemd-bootchart-on-short-living.patch -Patch0082: 0082-man-document-the-b-special-boot-option.patch -Patch0083: 0083-tmpfiles-log-unaccessible-FUSE-mount-points-only-as-.patch -Patch0084: 0084-move-utf8-functions-from-libudev-private.h-to-utf8.h.patch -Patch0085: 0085-Use-udev_encode_string-in-fstab_node_to_udev_node.patch -Patch0086: 0086-Fix-buffer-overrun-when-enumerating-files.patch -Patch0087: 0087-shared-utf8-merge-implementations-remove-cruft.patch -Patch0088: 0088-device-nodes-move-device-node-specific-code-to-own-f.patch -Patch0089: 0089-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch -Patch0090: 0090-udev-path_id-fix-by-path-link-generation-for-scm-dev.patch -Patch0091: 0091-hashmap-randomize-hash-functions-a-bit.patch -Patch0092: 0092-Configurable-Timeouts-Restarts-default-values.patch -Patch0093: 0093-manager-configurable-StartLimit-default-values.patch -Patch0094: 0094-sysctl-bring-back-etc-sysctl.conf.patch -Patch0095: 0095-tmpfiles-add-a-new-m-line-type-that-adjusts-user-gro.patch +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 %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -155,12 +290,11 @@ BuildRequires: intltool BuildRequires: gperf BuildRequires: gtk-doc BuildRequires: python2-devel -%if %{num_patches} BuildRequires: automake BuildRequires: autoconf BuildRequires: libtool BuildRequires: git -%endif + Requires(post): coreutils Requires(post): gawk Requires(post): sed @@ -172,6 +306,7 @@ Requires: dbus Requires: nss-myhostname Requires: %{name}-libs = %{version}-%{release} Requires: kmod >= 14 +Requires: redhat-release >= 7.0 Provides: /bin/systemctl Provides: /sbin/shutdown @@ -200,6 +335,7 @@ 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 @@ -281,55 +417,52 @@ Obsoletes: systemd < 204-10 systemd-journal-gatewayd serves journal events over the network using HTTP. %prep -%setup -q - -%if %{num_patches} - 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/.gitignore \ - --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} -%endif +%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 -%if %{num_patches} - autoreconf -%endif +autoreconf %configure \ --libexecdir=%{_prefix}/lib \ @@ -391,12 +524,10 @@ touch %{buildroot}%{_sysconfdir}/localtime mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf -# Install Fedora default preset policy +# 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/ -install -m 0644 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/system-preset/ -install -m 0644 %{SOURCE7} %{buildroot}%{_prefix}/lib/systemd/system-preset/ # Make sure the shutdown/sleep drop-in dirs exist mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ @@ -416,15 +547,15 @@ install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/ # Install rsyslog fragment mkdir -p %{buildroot}%{_sysconfdir}/rsyslog.d/ -install -m 0644 %{SOURCE4} %{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 %{SOURCE6} %{buildroot}%{_sysconfdir}/yum/protected.d/systemd.conf +install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/yum/protected.d/systemd.conf # Install rc.local mkdir -p %{buildroot}%{_sysconfdir}/rc.d/ -install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/rc.d/rc.local +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 @@ -443,6 +574,8 @@ 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 || : @@ -499,10 +632,7 @@ 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 || : - -# Stop-gap until rsyslog.rpm does this on its own. (This is supposed -# to fail when the link already exists) -ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/syslog.service >/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 @@ -793,9 +923,8 @@ getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g %{_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/85-display-manager.preset -%{_prefix}/lib/systemd/system-preset/90-default.preset %{_prefix}/lib/systemd/system-preset/99-default-disable.preset %{_prefix}/lib/systemd/catalog/systemd.catalog %{_prefix}/lib/kernel/install.d/50-depmod.install @@ -932,6 +1061,79 @@ getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g %{_datadir}/systemd/gatewayd %changelog +* 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)