summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2023-09-23 17:16:25 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2023-09-23 17:17:33 -0700
commit003194957fafdd2832863e8bd445085189e2a743 (patch)
tree47beb8e90d97821abf2870cb5c4ee6422295e0c9 /sys-process/systemd-cron
parentnet-vpn/tor: sort deps (diff)
downloadgentoo-003194957fafdd2832863e8bd445085189e2a743.tar.gz
gentoo-003194957fafdd2832863e8bd445085189e2a743.tar.bz2
gentoo-003194957fafdd2832863e8bd445085189e2a743.zip
sys-process/systemd-cron: revbump 2.1.3, fix SIGABRT with cxx assertions
Happens on hardened toolchain systems. Issue: https://github.com/systemd-cron/systemd-cron/issues/134 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-process/systemd-cron')
-rw-r--r--sys-process/systemd-cron/files/systemd-cron-2.1.3-MAYBE_DUPA_SIGABRT.patch30
-rw-r--r--sys-process/systemd-cron/systemd-cron-2.1.3-r1.ebuild (renamed from sys-process/systemd-cron/systemd-cron-2.1.3.ebuild)3
2 files changed, 33 insertions, 0 deletions
diff --git a/sys-process/systemd-cron/files/systemd-cron-2.1.3-MAYBE_DUPA_SIGABRT.patch b/sys-process/systemd-cron/files/systemd-cron-2.1.3-MAYBE_DUPA_SIGABRT.patch
new file mode 100644
index 000000000000..93d44a15c8f2
--- /dev/null
+++ b/sys-process/systemd-cron/files/systemd-cron-2.1.3-MAYBE_DUPA_SIGABRT.patch
@@ -0,0 +1,30 @@
+From acd77f59d58d9ec812f64c833a5e029b9dbae92a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
+Date: Sun, 24 Sep 2023 01:27:09 +0200
+Subject: [PATCH] MAYBE_DUPA needs to work around helpful toolchains that make
+ string_view::operator[] actually be ::at()
+
+Closes: #134
+---
+ src/include/libvoreutils.hpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/include/libvoreutils.hpp b/src/include/libvoreutils.hpp
+index 02fad8e..eaa7adc 100644
+--- a/src/include/libvoreutils.hpp
++++ b/src/include/libvoreutils.hpp
+@@ -361,10 +361,10 @@ namespace vore {
+ #endif
+
+
+-#define MAYBE_DUPA(strv) \
+- __extension__({ \
+- auto && _strv = strv; \
+- _strv[_strv.size()] ? strndupa(_strv.data(), _strv.size()) : _strv.data(); \
++#define MAYBE_DUPA(strv) \
++ __extension__({ \
++ auto && _strv = strv; \
++ _strv.data()[_strv.size()] ? strndupa(_strv.data(), _strv.size()) : _strv.data(); \
+ })
+
+
diff --git a/sys-process/systemd-cron/systemd-cron-2.1.3.ebuild b/sys-process/systemd-cron/systemd-cron-2.1.3-r1.ebuild
index 752240ab8359..892d8b5f3d04 100644
--- a/sys-process/systemd-cron/systemd-cron-2.1.3.ebuild
+++ b/sys-process/systemd-cron/systemd-cron-2.1.3-r1.ebuild
@@ -50,6 +50,9 @@ src_prepare() {
"${S}/test/test-generator" || die
fi
+ # https://github.com/systemd-cron/systemd-cron/issues/134
+ # https://github.com/systemd-cron/systemd-cron/commit/acd77f59d58d9ec812f64c833a5e029b9dbae92a
+ eapply "${FILESDIR}/${P}-MAYBE_DUPA_SIGABRT.patch"
eapply_user
}