From f39c6dab71f5188f95650d367ece1df4f263e474 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Sep 2022 23:20:40 +0100 Subject: gentoo auto-resync : 18:09:2022 - 23:20:40 --- .../250.4-test-systemd-tmpfiles.standalone.patch | 40 ------ sys-apps/systemd-utils/files/251-glibc-2.36.patch | 154 --------------------- .../files/251-revert-fortify-source-3-fix.patch | 40 ++++++ 3 files changed, 40 insertions(+), 194 deletions(-) delete mode 100644 sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch delete mode 100644 sys-apps/systemd-utils/files/251-glibc-2.36.patch create mode 100644 sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch (limited to 'sys-apps/systemd-utils/files') diff --git a/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch b/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch deleted file mode 100644 index a915cbb43115..000000000000 --- a/sys-apps/systemd-utils/files/250.4-test-systemd-tmpfiles.standalone.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 55bf689308ed00692494d3623bd2064f33c9bbbe Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Sun, 17 Apr 2022 09:48:28 -0400 -Subject: [PATCH] Add test support for systemd-tmpfiles.standalone - ---- - meson.build | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 458370e83d..d60be1b050 100644 ---- a/meson.build -+++ b/meson.build -@@ -3451,7 +3451,7 @@ if conf.get('ENABLE_TMPFILES') == 1 - endif - - if have_standalone_binaries -- public_programs += executable( -+ exe = executable( - 'systemd-tmpfiles.standalone', - systemd_tmpfiles_sources, - include_directories : includes, -@@ -3463,6 +3463,14 @@ if conf.get('ENABLE_TMPFILES') == 1 - dependencies : [libacl], - install : true, - install_dir : rootbindir) -+ public_programs += exe -+ -+ if want_tests != 'false' -+ test('test-systemd-tmpfiles.standalone', -+ test_systemd_tmpfiles_py, -+ # https://github.com/mesonbuild/meson/issues/2681 -+ args : exe.full_path()) -+ endif - endif - endif - --- -2.35.1 - diff --git a/sys-apps/systemd-utils/files/251-glibc-2.36.patch b/sys-apps/systemd-utils/files/251-glibc-2.36.patch deleted file mode 100644 index 65693d747ca3..000000000000 --- a/sys-apps/systemd-utils/files/251-glibc-2.36.patch +++ /dev/null @@ -1,154 +0,0 @@ -https://bugs.gentoo.org/863218 -https://github.com/systemd/systemd/issues/23984 -https://github.com/systemd/systemd/commit/3657d3a01c7e25ff86d7a4642065b367c4ff7484 -https://github.com/systemd/systemd/commit/0a58cd00454cc7b57b04f3a4a334584d743d7f7a - -From: Rudi Heitbaum -Date: Sat, 23 Jul 2022 10:38:49 +0000 -Subject: [PATCH] glibc: Remove #include to resolve - fsconfig_command/mount_attr conflict with glibc 2.36 - ---- a/meson.build -+++ b/meson.build -@@ -511,7 +511,6 @@ decl_headers = ''' - #include - #include - #include --#include - ''' - - foreach decl : ['char16_t', -@@ -523,6 +522,17 @@ foreach decl : ['char16_t', - # We get -1 if the size cannot be determined - have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0 - -+ if decl == 'struct mount_attr' -+ if have -+ want_linux_fs_h = false -+ else -+ have = cc.sizeof(decl, -+ prefix : decl_headers + '#include ', -+ args : '-D_GNU_SOURCE') > 0 -+ want_linux_fs_h = have -+ endif -+ endif -+ - if decl == 'struct statx' - if have - want_linux_stat_h = false -@@ -538,6 +548,7 @@ foreach decl : ['char16_t', - endforeach - - conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h) -+conf.set10('WANT_LINUX_FS_H', want_linux_fs_h) - - foreach ident : ['secure_getenv', '__secure_getenv'] - conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident)) ---- a/src/basic/fd-util.c -+++ b/src/basic/fd-util.c -@@ -3,7 +3,9 @@ - #include - #include - #include -+#if WANT_LINUX_FS_H - #include -+#endif - #include - #include - #include ---- a/src/core/namespace.c -+++ b/src/core/namespace.c -@@ -7,7 +7,9 @@ - #include - #include - #include -+#if WANT_LINUX_FS_H - #include -+#endif - - #include "alloc-util.h" - #include "base-filesystem.h" ---- a/src/shared/mount-util.c -+++ b/src/shared/mount-util.c -@@ -7,7 +7,9 @@ - #include - #include - #include -+#if WANT_LINUX_FS_H - #include -+#endif - - #include "alloc-util.h" - #include "chase-symlinks.h" - -From 0a58cd00454cc7b57b04f3a4a334584d743d7f7a Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Tue, 26 Jul 2022 20:03:12 +0900 -Subject: [PATCH] home: drop conflicted headers - -Fixes #24117. ---- a/src/basic/missing_fs.h -+++ b/src/basic/missing_fs.h -@@ -64,3 +64,8 @@ - #ifndef FS_PROJINHERIT_FL - #define FS_PROJINHERIT_FL 0x20000000 - #endif -+ -+/* linux/fscrypt.h */ -+#ifndef FS_KEY_DESCRIPTOR_SIZE -+#define FS_KEY_DESCRIPTOR_SIZE 8 -+#endif ---- a/src/home/homework-cifs.c -+++ b/src/home/homework-cifs.c -@@ -1,5 +1,10 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - -+#include -+#if WANT_LINUX_FS_H -+#include -+#endif -+ - #include "dirent-util.h" - #include "fd-util.h" - #include "fileio.h" ---- a/src/home/homework-luks.c -+++ b/src/home/homework-luks.c -@@ -4,7 +4,6 @@ - #include - #include - #include --#include - #include - - #if HAVE_VALGRIND_MEMCHECK_H ---- a/src/home/homework-mount.c -+++ b/src/home/homework-mount.c -@@ -2,7 +2,9 @@ - - #include - #include -+#if WANT_LINUX_FS_H - #include -+#endif - - #include "alloc-util.h" - #include "fd-util.h" ---- a/src/home/homework.h -+++ b/src/home/homework.h -@@ -1,13 +1,14 @@ - /* SPDX-License-Identifier: LGPL-2.1-or-later */ - #pragma once - --#include - #include - - #include "sd-id128.h" - -+#include "cryptsetup-util.h" - #include "homework-password-cache.h" - #include "loop-util.h" -+#include "missing_fs.h" /* for FS_KEY_DESCRIPTOR_SIZE, do not include linux/fs.h */ - #include "missing_keyctl.h" - #include "missing_syscall.h" - #include "user-record.h" - diff --git a/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch b/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch new file mode 100644 index 000000000000..bbe45f85dcf2 --- /dev/null +++ b/sys-apps/systemd-utils/files/251-revert-fortify-source-3-fix.patch @@ -0,0 +1,40 @@ +From: Sam James +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 */ -- cgit v1.2.3