diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 01:59:18 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-20 01:59:18 +0100 |
commit | 9ed0c42eb618229fa6f45e10155ee535e1f605a2 (patch) | |
tree | 1cee221ce6610b86c942bdb5bd12aee04ac18642 /sys-apps/systemd/files | |
parent | adab5aeec61fe929e5a817ec8034d98caab9ddbe (diff) |
gentoo auto-resync : 20:10:2022 - 01:59:18
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r-- | sys-apps/systemd/files/251-glibc-2.36.patch | 154 | ||||
-rw-r--r-- | sys-apps/systemd/files/252-rc1-cryptsetup.patch | 226 |
2 files changed, 0 insertions, 380 deletions
diff --git a/sys-apps/systemd/files/251-glibc-2.36.patch b/sys-apps/systemd/files/251-glibc-2.36.patch deleted file mode 100644 index 65693d747ca3..000000000000 --- a/sys-apps/systemd/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 <rudi@heitbaum.com> -Date: Sat, 23 Jul 2022 10:38:49 +0000 -Subject: [PATCH] glibc: Remove #include <linux/fs.h> to resolve - fsconfig_command/mount_attr conflict with glibc 2.36 - ---- a/meson.build -+++ b/meson.build -@@ -511,7 +511,6 @@ decl_headers = ''' - #include <uchar.h> - #include <sys/mount.h> - #include <sys/stat.h> --#include <linux/fs.h> - ''' - - 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 <linux/fs.h>', -+ 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 <errno.h> - #include <fcntl.h> - #include <linux/btrfs.h> -+#if WANT_LINUX_FS_H - #include <linux/fs.h> -+#endif - #include <linux/magic.h> - #include <sys/ioctl.h> - #include <sys/resource.h> ---- a/src/core/namespace.c -+++ b/src/core/namespace.c -@@ -7,7 +7,9 @@ - #include <sys/file.h> - #include <sys/mount.h> - #include <unistd.h> -+#if WANT_LINUX_FS_H - #include <linux/fs.h> -+#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 <sys/statvfs.h> - #include <unistd.h> - #include <linux/loop.h> -+#if WANT_LINUX_FS_H - #include <linux/fs.h> -+#endif - - #include "alloc-util.h" - #include "chase-symlinks.h" - -From 0a58cd00454cc7b57b04f3a4a334584d743d7f7a Mon Sep 17 00:00:00 2001 -From: Yu Watanabe <watanabe.yu+github@gmail.com> -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 <sys/mount.h> -+#if WANT_LINUX_FS_H -+#include <linux/fs.h> -+#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 <poll.h> - #include <sys/file.h> - #include <sys/ioctl.h> --#include <sys/mount.h> - #include <sys/xattr.h> - - #if HAVE_VALGRIND_MEMCHECK_H ---- a/src/home/homework-mount.c -+++ b/src/home/homework-mount.c -@@ -2,7 +2,9 @@ - - #include <sched.h> - #include <sys/mount.h> -+#if WANT_LINUX_FS_H - #include <linux/fs.h> -+#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 <linux/fs.h> - #include <sys/vfs.h> - - #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/files/252-rc1-cryptsetup.patch b/sys-apps/systemd/files/252-rc1-cryptsetup.patch deleted file mode 100644 index 54b4ce1ea0aa..000000000000 --- a/sys-apps/systemd/files/252-rc1-cryptsetup.patch +++ /dev/null @@ -1,226 +0,0 @@ -From bbf73b00697e77ca35ae60109418da77f257be52 Mon Sep 17 00:00:00 2001 -From: Daan De Meyer <daan.j.demeyer@gmail.com> -Date: Tue, 11 Oct 2022 20:35:34 +0200 -Subject: [PATCH 1/2] cryptsetup-util: Always define dlopen_cryptsetup() - ---- - src/shared/cryptsetup-util.c | 118 ++++++++++++++++++----------------- - src/shared/cryptsetup-util.h | 4 +- - 2 files changed, 63 insertions(+), 59 deletions(-) - -diff --git a/src/shared/cryptsetup-util.c b/src/shared/cryptsetup-util.c -index da6dcb2f093a..401e7a3f9c7d 100644 ---- a/src/shared/cryptsetup-util.c -+++ b/src/shared/cryptsetup-util.c -@@ -50,63 +50,6 @@ int (*sym_crypt_token_max)(const char *type); - crypt_token_info (*sym_crypt_token_status)(struct crypt_device *cd, int token, const char **type); - int (*sym_crypt_volume_key_get)(struct crypt_device *cd, int keyslot, char *volume_key, size_t *volume_key_size, const char *passphrase, size_t passphrase_size); - --int dlopen_cryptsetup(void) { -- int r; -- -- r = dlopen_many_sym_or_warn( -- &cryptsetup_dl, "libcryptsetup.so.12", LOG_DEBUG, -- DLSYM_ARG(crypt_activate_by_passphrase), --#if HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY -- DLSYM_ARG(crypt_activate_by_signed_key), --#endif -- DLSYM_ARG(crypt_activate_by_volume_key), -- DLSYM_ARG(crypt_deactivate_by_name), -- DLSYM_ARG(crypt_format), -- DLSYM_ARG(crypt_free), -- DLSYM_ARG(crypt_get_cipher), -- DLSYM_ARG(crypt_get_cipher_mode), -- DLSYM_ARG(crypt_get_data_offset), -- DLSYM_ARG(crypt_get_device_name), -- DLSYM_ARG(crypt_get_dir), -- DLSYM_ARG(crypt_get_type), -- DLSYM_ARG(crypt_get_uuid), -- DLSYM_ARG(crypt_get_verity_info), -- DLSYM_ARG(crypt_get_volume_key_size), -- DLSYM_ARG(crypt_init), -- DLSYM_ARG(crypt_init_by_name), -- DLSYM_ARG(crypt_keyslot_add_by_volume_key), -- DLSYM_ARG(crypt_keyslot_destroy), -- DLSYM_ARG(crypt_keyslot_max), -- DLSYM_ARG(crypt_load), -- DLSYM_ARG(crypt_resize), -- DLSYM_ARG(crypt_resume_by_passphrase), -- DLSYM_ARG(crypt_set_data_device), -- DLSYM_ARG(crypt_set_debug_level), -- DLSYM_ARG(crypt_set_log_callback), --#if HAVE_CRYPT_SET_METADATA_SIZE -- DLSYM_ARG(crypt_set_metadata_size), --#endif -- DLSYM_ARG(crypt_set_pbkdf_type), -- DLSYM_ARG(crypt_suspend), -- DLSYM_ARG(crypt_token_json_get), -- DLSYM_ARG(crypt_token_json_set), --#if HAVE_CRYPT_TOKEN_MAX -- DLSYM_ARG(crypt_token_max), --#endif -- DLSYM_ARG(crypt_token_status), -- DLSYM_ARG(crypt_volume_key_get)); -- if (r <= 0) -- return r; -- -- /* Redirect the default logging calls of libcryptsetup to our own logging infra. (Note that -- * libcryptsetup also maintains per-"struct crypt_device" log functions, which we'll also set -- * whenever allocating a "struct crypt_device" context. Why set both? To be defensive: maybe some -- * other code loaded into this process also changes the global log functions of libcryptsetup, who -- * knows? And if so, we still want our own objects to log via our own infra, at the very least.) */ -- cryptsetup_enable_logging(NULL); -- return 1; --} -- - static void cryptsetup_log_glue(int level, const char *msg, void *usrptr) { - - switch (level) { -@@ -246,6 +189,67 @@ int cryptsetup_add_token_json(struct crypt_device *cd, JsonVariant *v) { - } - #endif - -+int dlopen_cryptsetup(void) { -+#if HAVE_LIBCRYPTSETUP -+ int r; -+ -+ r = dlopen_many_sym_or_warn( -+ &cryptsetup_dl, "libcryptsetup.so.12", LOG_DEBUG, -+ DLSYM_ARG(crypt_activate_by_passphrase), -+#if HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY -+ DLSYM_ARG(crypt_activate_by_signed_key), -+#endif -+ DLSYM_ARG(crypt_activate_by_volume_key), -+ DLSYM_ARG(crypt_deactivate_by_name), -+ DLSYM_ARG(crypt_format), -+ DLSYM_ARG(crypt_free), -+ DLSYM_ARG(crypt_get_cipher), -+ DLSYM_ARG(crypt_get_cipher_mode), -+ DLSYM_ARG(crypt_get_data_offset), -+ DLSYM_ARG(crypt_get_device_name), -+ DLSYM_ARG(crypt_get_dir), -+ DLSYM_ARG(crypt_get_type), -+ DLSYM_ARG(crypt_get_uuid), -+ DLSYM_ARG(crypt_get_verity_info), -+ DLSYM_ARG(crypt_get_volume_key_size), -+ DLSYM_ARG(crypt_init), -+ DLSYM_ARG(crypt_init_by_name), -+ DLSYM_ARG(crypt_keyslot_add_by_volume_key), -+ DLSYM_ARG(crypt_keyslot_destroy), -+ DLSYM_ARG(crypt_keyslot_max), -+ DLSYM_ARG(crypt_load), -+ DLSYM_ARG(crypt_resize), -+ DLSYM_ARG(crypt_resume_by_passphrase), -+ DLSYM_ARG(crypt_set_data_device), -+ DLSYM_ARG(crypt_set_debug_level), -+ DLSYM_ARG(crypt_set_log_callback), -+#if HAVE_CRYPT_SET_METADATA_SIZE -+ DLSYM_ARG(crypt_set_metadata_size), -+#endif -+ DLSYM_ARG(crypt_set_pbkdf_type), -+ DLSYM_ARG(crypt_suspend), -+ DLSYM_ARG(crypt_token_json_get), -+ DLSYM_ARG(crypt_token_json_set), -+#if HAVE_CRYPT_TOKEN_MAX -+ DLSYM_ARG(crypt_token_max), -+#endif -+ DLSYM_ARG(crypt_token_status), -+ DLSYM_ARG(crypt_volume_key_get)); -+ if (r <= 0) -+ return r; -+ -+ /* Redirect the default logging calls of libcryptsetup to our own logging infra. (Note that -+ * libcryptsetup also maintains per-"struct crypt_device" log functions, which we'll also set -+ * whenever allocating a "struct crypt_device" context. Why set both? To be defensive: maybe some -+ * other code loaded into this process also changes the global log functions of libcryptsetup, who -+ * knows? And if so, we still want our own objects to log via our own infra, at the very least.) */ -+ cryptsetup_enable_logging(NULL); -+ return 1; -+#else -+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "cryptsetup support is not compiled in."); -+#endif -+} -+ - int cryptsetup_get_keyslot_from_token(JsonVariant *v) { - int keyslot, r; - JsonVariant *w; -diff --git a/src/shared/cryptsetup-util.h b/src/shared/cryptsetup-util.h -index b1ce07ec8a50..b390dc9a5cbb 100644 ---- a/src/shared/cryptsetup-util.h -+++ b/src/shared/cryptsetup-util.h -@@ -65,8 +65,6 @@ static inline int crypt_token_max(_unused_ const char *type) { - extern crypt_token_info (*sym_crypt_token_status)(struct crypt_device *cd, int token, const char **type); - extern int (*sym_crypt_volume_key_get)(struct crypt_device *cd, int keyslot, char *volume_key, size_t *volume_key_size, const char *passphrase, size_t passphrase_size); - --int dlopen_cryptsetup(void); -- - DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct crypt_device *, crypt_free, NULL); - DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct crypt_device *, sym_crypt_free, NULL); - -@@ -91,6 +89,8 @@ static inline void sym_crypt_freep(struct crypt_device** cd) {} - - #endif - -+int dlopen_cryptsetup(void); -+ - int cryptsetup_get_keyslot_from_token(JsonVariant *v); - - static inline const char *mangle_none(const char *s) { - -From 86bebe385f6e35ecec708e44dae2b896f5bfa770 Mon Sep 17 00:00:00 2001 -From: Daan De Meyer <daan.j.demeyer@gmail.com> -Date: Tue, 11 Oct 2022 20:36:03 +0200 -Subject: [PATCH 2/2] repart: Always define VerityMode from/to string functions - ---- - src/partition/repart.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/partition/repart.c b/src/partition/repart.c -index a0f7d4164500..dd544d6415a9 100644 ---- a/src/partition/repart.c -+++ b/src/partition/repart.c -@@ -255,12 +255,11 @@ static const char *verity_mode_table[_VERITY_MODE_MAX] = { - - #if HAVE_LIBCRYPTSETUP - DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE); --DEFINE_PRIVATE_STRING_TABLE_LOOKUP(verity_mode, VerityMode); - #else - DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE); --DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(verity_mode, VerityMode); - #endif - -+DEFINE_PRIVATE_STRING_TABLE_LOOKUP(verity_mode, VerityMode); - - static uint64_t round_down_size(uint64_t v, uint64_t p) { - return (v / p) * p; -From 748367c72368031ca0ef32fadd394c4bcacc126a Mon Sep 17 00:00:00 2001 -From: David Seifert <soap@gentoo.org> -Date: Wed, 12 Oct 2022 21:47:29 +0200 -Subject: [PATCH] gpt-auto: allow using without cryptsetup - -Fixes #24978 ---- - src/gpt-auto-generator/gpt-auto-generator.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c -index 31377d877d5c..5584eb22af1a 100644 ---- a/src/gpt-auto-generator/gpt-auto-generator.c -+++ b/src/gpt-auto-generator/gpt-auto-generator.c -@@ -571,11 +571,15 @@ static int add_root_rw(DissectedPartition *p) { - - #if ENABLE_EFI - static int add_root_cryptsetup(void) { -+#if HAVE_LIBCRYPTSETUP - - /* If a device /dev/gpt-auto-root-luks appears, then make it pull in systemd-cryptsetup-root.service, which - * sets it up, and causes /dev/gpt-auto-root to appear which is all we are looking for. */ - - return add_cryptsetup("root", "/dev/gpt-auto-root-luks", true, false, NULL); -+#else -+ return 0; -+#endif - } - #endif - |