summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-12 08:41:54 +0100
commit4df3bf9762850b34cd1ead5c80374d1a0fc3362e (patch)
tree3080c5cb7ad17abcb63776a9f21c4947845546a6 /sys-apps/systemd/files
parent814f4cf860e299a046b649eaee5463427984c09c (diff)
gentoo resync : 12.07.2021
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r--sys-apps/systemd/files/249-hostnamed-error-variable.patch50
-rw-r--r--sys-apps/systemd/files/249-libudev-static.patch26
2 files changed, 76 insertions, 0 deletions
diff --git a/sys-apps/systemd/files/249-hostnamed-error-variable.patch b/sys-apps/systemd/files/249-hostnamed-error-variable.patch
new file mode 100644
index 000000000000..7fe7af73a003
--- /dev/null
+++ b/sys-apps/systemd/files/249-hostnamed-error-variable.patch
@@ -0,0 +1,50 @@
+From 105a4245ff13d588e1e848e8ee3cffd6185bd0ae Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus@fastmail.com>
+Date: Thu, 8 Jul 2021 00:23:21 +0200
+Subject: [PATCH] hostnamed: correct variable with errno in fallback_chassis
+
+fixes assertion failure on arm:
+
+systemd-hostnamed[642]: Assertion '(_error) != 0' failed at src/hostname/hostnamed.c:207, function fallback_chassis(). Aborting.
+---
+ src/hostname/hostnamed.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
+index bd535ddc4d80..36702f2fb0cd 100644
+--- a/src/hostname/hostnamed.c
++++ b/src/hostname/hostnamed.c
+@@ -204,14 +204,14 @@ static const char* fallback_chassis(void) {
+
+ r = read_one_line_file("/sys/class/dmi/id/chassis_type", &type);
+ if (r < 0) {
+- log_debug_errno(v, "Failed to read DMI chassis type, ignoring: %m");
++ log_debug_errno(r, "Failed to read DMI chassis type, ignoring: %m");
+ goto try_acpi;
+ }
+
+ r = safe_atou(type, &t);
+ free(type);
+ if (r < 0) {
+- log_debug_errno(v, "Failed to parse DMI chassis type, ignoring: %m");
++ log_debug_errno(r, "Failed to parse DMI chassis type, ignoring: %m");
+ goto try_acpi;
+ }
+
+@@ -260,14 +260,14 @@ static const char* fallback_chassis(void) {
+ try_acpi:
+ r = read_one_line_file("/sys/firmware/acpi/pm_profile", &type);
+ if (r < 0) {
+- log_debug_errno(v, "Failed read ACPI PM profile, ignoring: %m");
++ log_debug_errno(r, "Failed read ACPI PM profile, ignoring: %m");
+ return NULL;
+ }
+
+ r = safe_atou(type, &t);
+ free(type);
+ if (r < 0) {
+- log_debug_errno(v, "Failed parse ACPI PM profile, ignoring: %m");
++ log_debug_errno(r, "Failed parse ACPI PM profile, ignoring: %m");
+ return NULL;
+ }
+
diff --git a/sys-apps/systemd/files/249-libudev-static.patch b/sys-apps/systemd/files/249-libudev-static.patch
new file mode 100644
index 000000000000..73375b716e9b
--- /dev/null
+++ b/sys-apps/systemd/files/249-libudev-static.patch
@@ -0,0 +1,26 @@
+From f2c57d4f3805775e0ffdc80ce578eaa737017d31 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 9 Jul 2021 13:05:23 -0400
+Subject: [PATCH] libudev: add "Libs.private: -lrt -pthread" to libudev.pc
+
+This resolves a failure when linking cryptsetup.static against libudev.a.
+
+```
+libtool: link: x86_64-pc-linux-gnu-gcc -Wall -O2 -pipe -march=amdfam10 -static -O2 -o cryptsetup.static lib/utils_crypt.o lib/utils_loop.o lib/utils_io.o lib/utils_blkid.o src/utils_tools.o src/utils_password.o src/utils_luks2.o src/utils_blockdev.o src/cryptsetup.o -pthread -pthread -Wl,--as-needed ./.libs/libcryptsetup.a -largon2 -lrt -ljson-c -lpopt -luuid -lblkid -lssl -lcrypto -lz -ldl -ldevmapper -lm -lpthread -ludev -pthread
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libudev.a(src_libsystemd_sd-daemon_sd-daemon.c.o): in function `sd_is_mq':
+(.text.sd_is_mq+0x3a): undefined reference to `mq_getattr'
+```
+---
+ src/libudev/libudev.pc.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libudev/libudev.pc.in b/src/libudev/libudev.pc.in
+index 89028aaa6bf2..1d6487fa4084 100644
+--- a/src/libudev/libudev.pc.in
++++ b/src/libudev/libudev.pc.in
+@@ -16,4 +16,5 @@ Name: libudev
+ Description: Library to access udev device information
+ Version: {{PROJECT_VERSION}}
+ Libs: -L${libdir} -ludev
++Libs.private: -lrt -pthread
+ Cflags: -I${includedir}