summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /sys-apps/systemd/files
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r--sys-apps/systemd/files/241-version-dep.patch111
-rw-r--r--sys-apps/systemd/files/241-wrapper-msan-unpoinson.patch76
-rw-r--r--sys-apps/systemd/files/243-rc1-cryptsetup.patch148
-rw-r--r--sys-apps/systemd/files/243-rc1-revert-logind-remove-unused-check.patch31
-rw-r--r--sys-apps/systemd/files/243-rc1-udev-properties.patch53
-rw-r--r--sys-apps/systemd/files/gentoo-uucp-group-r1.patch11
6 files changed, 232 insertions, 198 deletions
diff --git a/sys-apps/systemd/files/241-version-dep.patch b/sys-apps/systemd/files/241-version-dep.patch
deleted file mode 100644
index 55abea989316..000000000000
--- a/sys-apps/systemd/files/241-version-dep.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 60722ad778d005790231038eecc4ba3034c1a0fc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sun, 24 Feb 2019 22:49:38 +0100
-Subject: [PATCH] meson: declare version.h as dep for various targets that
- include build.h
-
-Should fix #11565.
----
- meson.build | 19 +++++++++++++------
- src/core/meson.build | 3 ++-
- src/udev/meson.build | 1 +
- 3 files changed, 16 insertions(+), 7 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index ed787d47492..82ecb4d0e69 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1634,7 +1634,8 @@ exe = executable('systemd-analyze',
- include_directories : includes,
- link_with : [libcore,
- libshared],
-- dependencies : [threads,
-+ dependencies : [versiondep,
-+ threads,
- librt,
- libseccomp,
- libselinux,
-@@ -2180,7 +2181,8 @@ if conf.get('ENABLE_IMPORTD') == 1
- systemd_pull_sources,
- include_directories : includes,
- link_with : [libshared],
-- dependencies : [libcurl,
-+ dependencies : [versiondep,
-+ libcurl,
- libz,
- libbzip2,
- libxz,
-@@ -2229,7 +2231,8 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
- systemd_journal_upload_sources,
- include_directories : includes,
- link_with : [libshared],
-- dependencies : [threads,
-+ dependencies : [versiondep,
-+ threads,
- libcurl,
- libgnutls,
- libxz,
-@@ -2555,6 +2558,7 @@ exe = executable('systemd-stdio-bridge',
- 'src/stdio-bridge/stdio-bridge.c',
- include_directories : includes,
- link_with : [libshared],
-+ dependencies : [versiondep],
- install_rpath : rootlibexecdir,
- install : true)
- public_programs += exe
-@@ -2638,7 +2642,8 @@ exe = executable('systemd-udevd',
- link_with : [libudev_core,
- libsystemd_network,
- libudev_static],
-- dependencies : [threads,
-+ dependencies : [versiondep,
-+ threads,
- libkmod,
- libidn,
- libacl,
-@@ -2655,7 +2660,8 @@ exe = executable('udevadm',
- link_with : [libudev_core,
- libsystemd_network,
- libudev_static],
-- dependencies : [threads,
-+ dependencies : [versiondep,
-+ threads,
- libkmod,
- libidn,
- libacl,
-@@ -2795,7 +2801,8 @@ foreach tuple : tests
- sources,
- include_directories : incs,
- link_with : link_with,
-- dependencies : dependencies,
-+ dependencies : [versiondep,
-+ dependencies],
- c_args : defs,
- build_by_default : want_tests != 'false',
- install_rpath : rootlibexecdir,
-diff --git a/src/core/meson.build b/src/core/meson.build
-index 85021bdc010..88fb093732b 100644
---- a/src/core/meson.build
-+++ b/src/core/meson.build
-@@ -150,7 +150,8 @@ libcore = static_library(
- load_fragment_gperf_c,
- load_fragment_gperf_nulstr_c,
- include_directories : includes,
-- dependencies : [threads,
-+ dependencies : [versiondep,
-+ threads,
- librt,
- libseccomp,
- libpam,
-diff --git a/src/udev/meson.build b/src/udev/meson.build
-index 2de88c0d93b..01e4c09f57f 100644
---- a/src/udev/meson.build
-+++ b/src/udev/meson.build
-@@ -180,6 +180,7 @@ foreach prog : [['ata_id/ata_id.c'],
- prog,
- include_directories : includes,
- c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
-+ dependencies : [versiondep],
- link_with : [libudev_static],
- install_rpath : udev_rpath,
- install : true,
diff --git a/sys-apps/systemd/files/241-wrapper-msan-unpoinson.patch b/sys-apps/systemd/files/241-wrapper-msan-unpoinson.patch
deleted file mode 100644
index e337b4f4ca52..000000000000
--- a/sys-apps/systemd/files/241-wrapper-msan-unpoinson.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From c322f379e6ca972f1c4d3409ac97828b1b838d5d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Fri, 22 Feb 2019 13:07:00 +0100
-Subject: [PATCH] Add wrapper for __msan_unpoinson() to reduce #ifdeffery
-
-This isn't really necessary for the subsequent commit, but I expect that we'll
-need to unpoison more often once we turn on msan in CI, so I think think this
-change makes sense in the long run.
----
- src/basic/alloc-util.h | 10 ++++++++++
- src/basic/random-util.c | 11 ++---------
- 2 files changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
-index 893a1238ff..78ee34bb71 100644
---- a/src/basic/alloc-util.h
-+++ b/src/basic/alloc-util.h
-@@ -8,6 +8,10 @@
-
- #include "macro.h"
-
-+#if HAS_FEATURE_MEMORY_SANITIZER
-+# include <sanitizer/msan_interface.h>
-+#endif
-+
- typedef void (*free_func_t)(void *p);
-
- /* If for some reason more than 4M are allocated on the stack, let's abort immediately. It's better than
-@@ -160,3 +164,9 @@ void* greedy_realloc0(void **p, size_t *allocated, size_t need, size_t size);
- (ptr) = NULL; \
- _ptr_; \
- })
-+
-+#if HAS_FEATURE_MEMORY_SANITIZER
-+# define msan_unpoison(r, s) __msan_unpoison(r, s)
-+#else
-+# define msan_unpoison(r, s)
-+#endif
-diff --git a/src/basic/random-util.c b/src/basic/random-util.c
-index f7decf60b6..ca25fd2420 100644
---- a/src/basic/random-util.c
-+++ b/src/basic/random-util.c
-@@ -23,16 +23,13 @@
- # include <linux/random.h>
- #endif
-
-+#include "alloc-util.h"
- #include "fd-util.h"
- #include "io-util.h"
- #include "missing.h"
- #include "random-util.h"
- #include "time-util.h"
-
--#if HAS_FEATURE_MEMORY_SANITIZER
--#include <sanitizer/msan_interface.h>
--#endif
--
- int rdrand(unsigned long *ret) {
-
- #if defined(__i386__) || defined(__x86_64__)
-@@ -58,11 +55,7 @@ int rdrand(unsigned long *ret) {
- "setc %1"
- : "=r" (*ret),
- "=qm" (err));
--
--#if HAS_FEATURE_MEMORY_SANITIZER
-- __msan_unpoison(&err, sizeof(err));
--#endif
--
-+ msan_unpoison(&err, sizeof(err));
- if (!err)
- return -EAGAIN;
-
---
-2.22.0
-
diff --git a/sys-apps/systemd/files/243-rc1-cryptsetup.patch b/sys-apps/systemd/files/243-rc1-cryptsetup.patch
new file mode 100644
index 000000000000..e922d4d29cbd
--- /dev/null
+++ b/sys-apps/systemd/files/243-rc1-cryptsetup.patch
@@ -0,0 +1,148 @@
+From f4ea8432e67110b73b07dd0e47a5339d83b350fb Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Wed, 31 Jul 2019 09:38:15 +0200
+Subject: [PATCH] cryptsetup-generator: fix coverity issue
+
+Fixes coverity issue 1403772
+---
+ src/cryptsetup/cryptsetup-generator.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
+index c51bb9ae189..960f4762b7d 100644
+--- a/src/cryptsetup/cryptsetup-generator.c
++++ b/src/cryptsetup/cryptsetup-generator.c
+@@ -46,30 +46,30 @@ STATIC_DESTRUCTOR_REGISTER(arg_disks, hashmap_freep);
+ STATIC_DESTRUCTOR_REGISTER(arg_default_options, freep);
+ STATIC_DESTRUCTOR_REGISTER(arg_default_keyfile, freep);
+
+-static int split_keyspec(const char *keyspec, char **keyfile, char **keydev) {
++static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_keydev) {
+ _cleanup_free_ char *kfile = NULL, *kdev = NULL;
+- char *c;
++ const char *c;
+
+ assert(keyspec);
+- assert(keyfile);
+- assert(keydev);
++ assert(ret_keyfile);
++ assert(ret_keydev);
+
+ c = strrchr(keyspec, ':');
+ if (c) {
+ kfile = strndup(keyspec, c-keyspec);
+ kdev = strdup(c + 1);
+- if (!*kfile || !*kdev)
++ if (!kfile || !kdev)
+ return log_oom();
+ } else {
+ /* No keydev specified */
+ kfile = strdup(keyspec);
+ kdev = NULL;
+- if (!*kfile)
++ if (!kfile)
+ return log_oom();
+ }
+
+- *keyfile = TAKE_PTR(kfile);
+- *keydev = TAKE_PTR(kdev);
++ *ret_keyfile = TAKE_PTR(kfile);
++ *ret_keydev = TAKE_PTR(kdev);
+
+ return 0;
+ }
+From 5d2100dc4c32abbce4109e75cbfbbef6e1b2b7b1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 1 Aug 2019 08:13:13 +0200
+Subject: [PATCH] cryptsetup: use unabbrieviated variable names
+
+Now that "ret_" has been added to the output variables, we can name
+the internal variables without artificial abbrevs.
+---
+ src/cryptsetup/cryptsetup-generator.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
+index 960f4762b7d..84483143945 100644
+--- a/src/cryptsetup/cryptsetup-generator.c
++++ b/src/cryptsetup/cryptsetup-generator.c
+@@ -47,7 +47,7 @@ STATIC_DESTRUCTOR_REGISTER(arg_default_options, freep);
+ STATIC_DESTRUCTOR_REGISTER(arg_default_keyfile, freep);
+
+ static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_keydev) {
+- _cleanup_free_ char *kfile = NULL, *kdev = NULL;
++ _cleanup_free_ char *keyfile = NULL, *keydev = NULL;
+ const char *c;
+
+ assert(keyspec);
+@@ -56,20 +56,20 @@ static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_key
+
+ c = strrchr(keyspec, ':');
+ if (c) {
+- kfile = strndup(keyspec, c-keyspec);
+- kdev = strdup(c + 1);
+- if (!kfile || !kdev)
++ keyfile = strndup(keyspec, c-keyspec);
++ keydev = strdup(c + 1);
++ if (!keyfile || !keydev)
+ return log_oom();
+ } else {
+ /* No keydev specified */
+- kfile = strdup(keyspec);
+- kdev = NULL;
+- if (!kfile)
++ keyfile = strdup(keyspec);
++ keydev = NULL;
++ if (!keyfile)
+ return log_oom();
+ }
+
+- *ret_keyfile = TAKE_PTR(kfile);
+- *ret_keydev = TAKE_PTR(kdev);
++ *ret_keyfile = TAKE_PTR(keyfile);
++ *ret_keydev = TAKE_PTR(keydev);
+
+ return 0;
+ }
+From fef716b28be6e866b8afe995805d5ebe2af6bbfa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Thu, 1 Aug 2019 08:15:43 +0200
+Subject: [PATCH] cryptsetup: don't assert on variable which is optional
+
+https://github.com/systemd/systemd/commit/50d2eba27b9bfc77ef6b40e5721713846815418b#commitcomment-34519739
+
+In add_crypttab_devices() split_keyspec is called on the keyfile argument,
+which may be NULL.
+---
+ src/cryptsetup/cryptsetup-generator.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
+index 84483143945..4815ded753f 100644
+--- a/src/cryptsetup/cryptsetup-generator.c
++++ b/src/cryptsetup/cryptsetup-generator.c
+@@ -50,10 +50,14 @@ static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_key
+ _cleanup_free_ char *keyfile = NULL, *keydev = NULL;
+ const char *c;
+
+- assert(keyspec);
+ assert(ret_keyfile);
+ assert(ret_keydev);
+
++ if (!keyspec) {
++ *ret_keyfile = *ret_keydev = NULL;
++ return 0;
++ }
++
+ c = strrchr(keyspec, ':');
+ if (c) {
+ keyfile = strndup(keyspec, c-keyspec);
+@@ -567,7 +571,7 @@ static int add_crypttab_devices(void) {
+ }
+
+ for (;;) {
+- _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keydev = NULL, *keyfile = NULL, *keyspec = NULL, *options = NULL;
++ _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL, *keyfile = NULL, *keydev = NULL;
+ crypto_device *d = NULL;
+ char *l, *uuid;
+ int k;
diff --git a/sys-apps/systemd/files/243-rc1-revert-logind-remove-unused-check.patch b/sys-apps/systemd/files/243-rc1-revert-logind-remove-unused-check.patch
new file mode 100644
index 000000000000..30a20c17661d
--- /dev/null
+++ b/sys-apps/systemd/files/243-rc1-revert-logind-remove-unused-check.patch
@@ -0,0 +1,31 @@
+From 18f689b1fa35c53580da62bfce875fb15d20d448 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sun, 4 Aug 2019 05:43:34 +0900
+Subject: [PATCH] Revert "logind: remove unused check"
+
+This reverts commit f2330acda408a34451d5e15380fcdd225a672473.
+
+Fixes #13255.
+---
+ src/login/logind-action.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/login/logind-action.c b/src/login/logind-action.c
+index fa92f4870a2..140953eec10 100644
+--- a/src/login/logind-action.c
++++ b/src/login/logind-action.c
+@@ -61,8 +61,12 @@ int manager_handle_action(
+ int r;
+
+ assert(m);
+- /* We should be called only with valid actions different than HANDLE_IGNORE. */
+- assert(handle > HANDLE_IGNORE && handle < _HANDLE_ACTION_MAX);
++
++ /* If the key handling is turned off, don't do anything */
++ if (handle == HANDLE_IGNORE) {
++ log_debug("Refusing operation, as it is turned off.");
++ return 0;
++ }
+
+ if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) {
+ /* If the last system suspend or startup is too close,
diff --git a/sys-apps/systemd/files/243-rc1-udev-properties.patch b/sys-apps/systemd/files/243-rc1-udev-properties.patch
new file mode 100644
index 000000000000..5e2ffa1868a3
--- /dev/null
+++ b/sys-apps/systemd/files/243-rc1-udev-properties.patch
@@ -0,0 +1,53 @@
+From 41c81c4a626fda0969fc09ddeb8addb7aae6e4d9 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sun, 4 Aug 2019 06:08:06 +0900
+Subject: [PATCH] udev: do not try to import properties on commented out lines
+
+Fixes #13257.
+---
+ src/udev/udev-rules.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index 3473a7eb7e5..1642f105354 100644
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -1401,8 +1401,10 @@ static int get_property_from_string(char *line, char **ret_key, char **ret_value
+ key = skip_leading_chars(line, NULL);
+
+ /* comment or empty line */
+- if (IN_SET(key[0], '#', '\0'))
++ if (IN_SET(key[0], '#', '\0')) {
++ *ret_key = *ret_value = NULL;
+ return 0;
++ }
+
+ /* split key/value */
+ val = strchr(key, '=');
+@@ -1429,7 +1431,7 @@ static int get_property_from_string(char *line, char **ret_key, char **ret_value
+
+ *ret_key = key;
+ *ret_value = val;
+- return 0;
++ return 1;
+ }
+
+ static int import_parent_into_properties(sd_device *dev, const char *filter) {
+@@ -1681,6 +1683,8 @@ static int udev_rule_apply_token_to_event(
+ line);
+ continue;
+ }
++ if (r == 0)
++ continue;
+
+ r = device_add_property(dev, key, value);
+ if (r < 0)
+@@ -1719,6 +1723,8 @@ static int udev_rule_apply_token_to_event(
+ line);
+ continue;
+ }
++ if (r == 0)
++ continue;
+
+ r = device_add_property(dev, key, value);
+ if (r < 0)
diff --git a/sys-apps/systemd/files/gentoo-uucp-group-r1.patch b/sys-apps/systemd/files/gentoo-uucp-group-r1.patch
deleted file mode 100644
index 9c53b8b18ab9..000000000000
--- a/sys-apps/systemd/files/gentoo-uucp-group-r1.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/rules/50-udev-default.rules.in
-+++ b/rules/50-udev-default.rules.in
-@@ -22,7 +22,7 @@
- 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]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
-+KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
-
- SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
-