summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-apps/systemd/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r--sys-apps/systemd/files/249.9-cross-compile.patch23
-rw-r--r--sys-apps/systemd/files/251-format-string.patch25
-rw-r--r--sys-apps/systemd/files/251-rc2-colorterm.patch57
-rw-r--r--sys-apps/systemd/files/251-revert-fortify-source-3-fix.patch40
4 files changed, 65 insertions, 80 deletions
diff --git a/sys-apps/systemd/files/249.9-cross-compile.patch b/sys-apps/systemd/files/249.9-cross-compile.patch
deleted file mode 100644
index e063d303c7d8..000000000000
--- a/sys-apps/systemd/files/249.9-cross-compile.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 3d7fd38ea938ab194366f40ed7aa413ad33f2fad Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Tue, 21 Dec 2021 20:10:09 +0900
-Subject: [PATCH] meson: fix cross compiling
-
-(cherry picked from commit 3112d756a36993900b70fbff98e69a2a43b970a8)
----
- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 02495d16c9..c76cab535d 100644
---- a/meson.build
-+++ b/meson.build
-@@ -442,7 +442,7 @@ conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>'))
- conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>'))
- conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>'))
- conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
--conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('((struct timex *)0)->freq', prefix : '#include <sys/timex.h>'))
-+conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('typeof(((struct timex *)0)->freq)', prefix : '#include <sys/timex.h>'))
-
- decl_headers = '''
- #include <uchar.h>
diff --git a/sys-apps/systemd/files/251-format-string.patch b/sys-apps/systemd/files/251-format-string.patch
new file mode 100644
index 000000000000..f36cc5d657f3
--- /dev/null
+++ b/sys-apps/systemd/files/251-format-string.patch
@@ -0,0 +1,25 @@
+From 08e86b15fc22a8e9f1ee0a791dfd35b2fc25e4c4 Mon Sep 17 00:00:00 2001
+From: Daan De Meyer <daan.j.demeyer@gmail.com>
+Date: Sun, 22 May 2022 14:36:07 +0200
+Subject: [PATCH] coredump: Fix format string type mismatch
+
+Fixes #23471
+---
+ src/coredump/coredump.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
+index c9747416ad3c..994d968d871b 100644
+--- a/src/coredump/coredump.c
++++ b/src/coredump/coredump.c
+@@ -512,8 +512,8 @@ static int save_external_coredump(
+
+ if (truncated)
+ log_struct(LOG_INFO,
+- LOG_MESSAGE("Core file was truncated to %zu bytes.", max_size),
+- "SIZE_LIMIT=%zu", max_size,
++ LOG_MESSAGE("Core file was truncated to %"PRIu64" bytes.", max_size),
++ "SIZE_LIMIT=%"PRIu64, max_size,
+ "MESSAGE_ID=" SD_MESSAGE_TRUNCATED_CORE_STR);
+
+ r = fix_permissions(fd, tmp, fn, context, uid);
diff --git a/sys-apps/systemd/files/251-rc2-colorterm.patch b/sys-apps/systemd/files/251-rc2-colorterm.patch
deleted file mode 100644
index 167329b63cde..000000000000
--- a/sys-apps/systemd/files/251-rc2-colorterm.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 34c2d32cf97ddc41348960687e52db6637faf1df Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Fri, 6 May 2022 18:19:21 +0200
-Subject: [PATCH] shared/terminal-util: don't use $COLORTERM to force colors
-
-Fixup for a5efbf468c96190c9562bc8121eda32310dfd112: if $COLORTERM was set, we'd
-unconditionally turn on colors, which is unexpected and wrong. It even breaks
-our own tests when executed in gnome-terminal.
----
- src/basic/terminal-util.c | 27 ++++++++++++++++++---------
- 1 file changed, 18 insertions(+), 9 deletions(-)
-
-diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
-index 8ddcfe23230f..a142ba2dfb51 100644
---- a/src/basic/terminal-util.c
-+++ b/src/basic/terminal-util.c
-@@ -1278,12 +1278,7 @@ ColorMode get_color_mode(void) {
- /* We only check for the presence of the variable; value is ignored. */
- cached_color_mode = COLOR_OFF;
-
-- else if (STRPTR_IN_SET(getenv("COLORTERM"),
-- "truecolor",
-- "24bit"))
-- cached_color_mode = COLOR_24BIT;
--
-- else if (getpid_cached() == 1)
-+ else if (getpid_cached() == 1) {
- /* PID1 outputs to the console without holding it open all the time.
- *
- * Note that the Linux console can only display 16 colors. We still enable 256 color
-@@ -1292,9 +1287,23 @@ ColorMode get_color_mode(void) {
- * map them to the closest color in the 16 color palette (since kernel 3.16). Doing
- * 256 colors is nice for people who invoke systemd in a container or via a serial
- * link or such, and use a true 256 color terminal to do so. */
-- cached_color_mode = getenv_terminal_is_dumb() ? COLOR_OFF : COLOR_256;
-- else
-- cached_color_mode = terminal_is_dumb() ? COLOR_OFF : COLOR_256;
-+ if (getenv_terminal_is_dumb())
-+ cached_color_mode = COLOR_OFF;
-+ } else {
-+ if (terminal_is_dumb())
-+ cached_color_mode = COLOR_OFF;
-+ }
-+
-+ if (cached_color_mode < 0) {
-+ /* We failed to figure out any reason to *disable* colors.
-+ * Let's see how many colors we shall use. */
-+ if (STRPTR_IN_SET(getenv("COLORTERM"),
-+ "truecolor",
-+ "24bit"))
-+ cached_color_mode = COLOR_24BIT;
-+ else
-+ cached_color_mode = COLOR_256;
-+ }
- }
-
- return cached_color_mode;
diff --git a/sys-apps/systemd/files/251-revert-fortify-source-3-fix.patch b/sys-apps/systemd/files/251-revert-fortify-source-3-fix.patch
new file mode 100644
index 000000000000..bbe45f85dcf2
--- /dev/null
+++ b/sys-apps/systemd/files/251-revert-fortify-source-3-fix.patch
@@ -0,0 +1,40 @@
+From: Sam James <sam@gentoo.org>
+Date: Tue, 24 May 2022 23:21:50 +0100
+Subject: [PATCH] Revert "Support -D_FORTIFY_SOURCE=3 by using
+ __builtin_dynamic_object_size."
+
+Breaks Clang (even without F_S=3).
+
+This reverts commit 0bd292567a543d124cd303f7dd61169a209cae64.
+
+Bug: https://bugs.gentoo.org/841770
+Bug: https://github.com/systemd/systemd/issues/23150
+--- a/src/basic/alloc-util.h
++++ b/src/basic/alloc-util.h
+@@ -174,23 +174,13 @@ void* greedy_realloc0(void **p, size_t need, size_t size);
+ * is compatible with _FORTIFY_SOURCES. If _FORTIFY_SOURCES is used many memory operations will take the
+ * object size as returned by __builtin_object_size() into account. Hence, let's return the smaller size of
+ * malloc_usable_size() and __builtin_object_size() here, so that we definitely operate in safe territory by
+- * both the compiler's and libc's standards. Note that _FORTIFY_SOURCES=3 handles also dynamically allocated
+- * objects and thus it's safer using __builtin_dynamic_object_size if _FORTIFY_SOURCES=3 is used (#22801).
+- * Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
++ * both the compiler's and libc's standards. Note that __builtin_object_size() evaluates to SIZE_MAX if the
++ * size cannot be determined, hence the MIN() expression should be safe with dynamically sized memory,
++ * too. Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
+ * __builtin_object_size() returns SIZE_MAX too, hence we also return a sensible value of 0 in this corner
+ * case. */
+-
+-#if defined __has_builtin
+-# if __has_builtin(__builtin_dynamic_object_size)
+-# define MALLOC_SIZEOF_SAFE(x) \
+- MIN(malloc_usable_size(x), __builtin_dynamic_object_size(x, 0))
+-# endif
+-#endif
+-
+-#ifndef MALLOC_SIZEOF_SAFE
+ #define MALLOC_SIZEOF_SAFE(x) \
+ MIN(malloc_usable_size(x), __builtin_object_size(x, 0))
+-#endif
+
+ /* Inspired by ELEMENTSOF() but operates on malloc()'ed memory areas: typesafely returns the number of items
+ * that fit into the specified memory block */