diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-16 21:23:20 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-16 21:23:20 +0100 |
commit | fab849d1daed0ba7f2ac497d07985c3dbb692543 (patch) | |
tree | 10baa743a5340b42ad538dd19d48669ccac209b1 /sys-apps/systemd/files | |
parent | 73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff) |
gentoo resync : 16.06.2019
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r-- | sys-apps/systemd/files/239-debug-extra.patch | 40 | ||||
-rw-r--r-- | sys-apps/systemd/files/242-gcc-9.patch | 128 | ||||
-rw-r--r-- | sys-apps/systemd/files/gentoo-generator-path.patch | 27 |
3 files changed, 128 insertions, 67 deletions
diff --git a/sys-apps/systemd/files/239-debug-extra.patch b/sys-apps/systemd/files/239-debug-extra.patch deleted file mode 100644 index 19db590257cf..000000000000 --- a/sys-apps/systemd/files/239-debug-extra.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 8f6b442a78d0b485f044742ad90b2e8271b4e68e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Sun, 19 Aug 2018 19:11:30 +0200 -Subject: [PATCH] meson: rename -Ddebug to -Ddebug-extra - -Meson added -Doptimization and -Ddebug options, which obviously causes -a conflict with our -Ddebug options. Let's rename it. - -Fixes #9883. ---- - meson.build | 2 +- - meson_options.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/meson.build b/meson.build -index f79ac4b12e7..2209c935ad6 100644 ---- a/meson.build -+++ b/meson.build -@@ -763,7 +763,7 @@ substs.set('DEBUGTTY', get_option('debug-tty')) - - enable_debug_hashmap = false - enable_debug_mmap_cache = false --foreach name : get_option('debug') -+foreach name : get_option('debug-extra') - if name == 'hashmap' - enable_debug_hashmap = true - elif name == 'mmap-cache' -diff --git a/meson_options.txt b/meson_options.txt -index e3140c8c110..7b1f61bf464 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -45,7 +45,7 @@ option('debug-shell', type : 'string', value : '/bin/sh', - description : 'path to debug shell binary') - option('debug-tty', type : 'string', value : '/dev/tty9', - description : 'specify the tty device for debug shell') --option('debug', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [], -+option('debug-extra', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [], - description : 'enable extra debugging') - option('memory-accounting-default', type : 'boolean', - description : 'enable MemoryAccounting= by default') diff --git a/sys-apps/systemd/files/242-gcc-9.patch b/sys-apps/systemd/files/242-gcc-9.patch index e12d65718238..e9f690a65be5 100644 --- a/sys-apps/systemd/files/242-gcc-9.patch +++ b/sys-apps/systemd/files/242-gcc-9.patch @@ -33,3 +33,131 @@ index 533193ac932..6fc82940033 100644 else log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled)); +From bcb846f30f9ca8f42e79d109706aee9f2032261b Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Wed, 22 May 2019 10:31:01 -0400 +Subject: [PATCH] shared/machine-image: avoid passing NULL to log_debug_errno + +Fixes: https://github.com/systemd/systemd/issues/12534 +--- + src/shared/machine-image.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c +index 6b9d8fb97a6..6a6d952b424 100644 +--- a/src/shared/machine-image.c ++++ b/src/shared/machine-image.c +@@ -201,11 +201,13 @@ static int image_make( + Image **ret) { + + _cleanup_free_ char *pretty_buffer = NULL; ++ _cleanup_free_ char *cwd = NULL; + struct stat stbuf; + bool read_only; + int r; + + assert(dfd >= 0 || dfd == AT_FDCWD); ++ assert(path || dfd == AT_FDCWD); + assert(filename); + + /* We explicitly *do* follow symlinks here, since we want to allow symlinking trees, raw files and block +@@ -221,6 +223,9 @@ static int image_make( + st = &stbuf; + } + ++ if (!path) ++ safe_getcwd(&cwd); ++ + read_only = + (path && path_startswith(path, "/usr")) || + (faccessat(dfd, filename, W_OK, AT_EACCESS) < 0 && errno == EROFS); +@@ -359,7 +364,7 @@ static int image_make( + + block_fd = openat(dfd, filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY); + if (block_fd < 0) +- log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path, filename); ++ log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); + else { + /* Refresh stat data after opening the node */ + if (fstat(block_fd, &stbuf) < 0) +@@ -373,13 +378,13 @@ static int image_make( + int state = 0; + + if (ioctl(block_fd, BLKROGET, &state) < 0) +- log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path, filename); ++ log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); + else if (state) + read_only = true; + } + + if (ioctl(block_fd, BLKGETSIZE64, &size) < 0) +- log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path, filename); ++ log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); + + block_fd = safe_close(block_fd); + } +From 2570578d908a8e010828fa1f88826b1c45d534ff Mon Sep 17 00:00:00 2001 +From: Lennart Poettering <lennart@poettering.net> +Date: Fri, 24 May 2019 10:54:09 +0200 +Subject: [PATCH] machine-image: openat() doesn't operate on the cwd if the + first argument is specified + +A fix-up for bcb846f30f9ca8f42e79d109706aee9f2032261b. +--- + src/shared/machine-image.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c +index 6a6d952b424..55e5f08f91e 100644 +--- a/src/shared/machine-image.c ++++ b/src/shared/machine-image.c +@@ -200,8 +200,7 @@ static int image_make( + const struct stat *st, + Image **ret) { + +- _cleanup_free_ char *pretty_buffer = NULL; +- _cleanup_free_ char *cwd = NULL; ++ _cleanup_free_ char *pretty_buffer = NULL, *parent = NULL; + struct stat stbuf; + bool read_only; + int r; +@@ -223,8 +222,12 @@ static int image_make( + st = &stbuf; + } + +- if (!path) +- safe_getcwd(&cwd); ++ if (!path) { ++ if (dfd == AT_FDCWD) ++ (void) safe_getcwd(&parent); ++ else ++ (void) fd_get_path(dfd, &parent); ++ } + + read_only = + (path && path_startswith(path, "/usr")) || +@@ -364,7 +367,7 @@ static int image_make( + + block_fd = openat(dfd, filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY); + if (block_fd < 0) +- log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); ++ log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(parent), filename); + else { + /* Refresh stat data after opening the node */ + if (fstat(block_fd, &stbuf) < 0) +@@ -378,13 +381,13 @@ static int image_make( + int state = 0; + + if (ioctl(block_fd, BLKROGET, &state) < 0) +- log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); ++ log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(parent), filename); + else if (state) + read_only = true; + } + + if (ioctl(block_fd, BLKGETSIZE64, &size) < 0) +- log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename); ++ log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(parent), filename); + + block_fd = safe_close(block_fd); + } diff --git a/sys-apps/systemd/files/gentoo-generator-path.patch b/sys-apps/systemd/files/gentoo-generator-path.patch deleted file mode 100644 index 6912b481f20b..000000000000 --- a/sys-apps/systemd/files/gentoo-generator-path.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d9287b10d714175521e3bcd6c53de4819b1357c5 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert <floppym@gentoo.org> -Date: Mon, 17 Jul 2017 11:21:25 -0400 -Subject: [PATCH 1/3] path-lookup: look for generators in - {,/usr}/lib/systemd/system-generators - -Bug: https://bugs.gentoo.org/625402 ---- - src/shared/path-lookup.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c -index e2b3f8b74..1ee0e1cdb 100644 ---- a/src/shared/path-lookup.c -+++ b/src/shared/path-lookup.c -@@ -821,6 +821,8 @@ char **generator_binary_paths(UnitFileScope scope) { - return strv_new("/run/systemd/system-generators", - "/etc/systemd/system-generators", - "/usr/local/lib/systemd/system-generators", -+ "/usr/lib/systemd/system-generators", -+ "/lib/systemd/system-generators", - SYSTEM_GENERATOR_PATH, - NULL); - --- -2.14.0 - |