diff --git a/srcpkgs/elogind/patches/Use-getenv-when-secure-versions-are-not-available.patch b/srcpkgs/elogind/patches/Use-getenv-when-secure-versions-are-not-available.patch deleted file mode 100644 index de786bc8cba..00000000000 --- a/srcpkgs/elogind/patches/Use-getenv-when-secure-versions-are-not-available.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- src/shared/musl_missing.h -+++ src/shared/musl_missing.h -@@ -41,9 +41,10 @@ extern char *program_invocation_short_name; - * + test if the effective capability bit was set on the executable file - * + test if the process has a nonempty permitted capability set - */ --#if !defined(HAVE_SECURE_GETENV) && !defined(HAVE___SECURE_GETENV) -+#if ! HAVE_SECURE_GETENV && ! HAVE___SECURE_GETENV - # define secure_getenv(name) \ - (issetugid() ? NULL : getenv(name)) -+# undef HAVE_SECURE_GETENV - # define HAVE_SECURE_GETENV 1 - #endif // HAVE_[__]SECURE_GETENV - diff --git a/srcpkgs/elogind/patches/Use-utmp-headers-when-available.patch b/srcpkgs/elogind/patches/Use-utmp-headers-when-available.patch deleted file mode 100644 index f2992ed00de..00000000000 --- a/srcpkgs/elogind/patches/Use-utmp-headers-when-available.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/shared/musl_missing.h -+++ src/shared/musl_missing.h -@@ -88,7 +88,7 @@ typedef __compar_fn_t comparison_fn_t; - #endif - - /* Make musl utmp/wtmp stubs visible if needed. */ --#ifdef HAVE_UTMP -+#if ENABLE_UTMP - # include - # include - # include diff --git a/srcpkgs/elogind/patches/elogind-235.2-legacy-cgroupmode.patch b/srcpkgs/elogind/patches/elogind-235.2-legacy-cgroupmode.patch deleted file mode 100644 index 259dc85c967..00000000000 --- a/srcpkgs/elogind/patches/elogind-235.2-legacy-cgroupmode.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 003ece760231aba0c661e2390dfd11075d72a8da Mon Sep 17 00:00:00 2001 -From: Sven Eden -Date: Thu, 18 Jan 2018 23:01:12 +0100 -Subject: [PATCH] Prep v235.3 : Fix cgroup hierarchy detection code - -There is no sub-grouping with elogind, so /sys/fs/cgroup/elogind is -not needed to be mounted as cgroup fs in legacy mode. - -Fixes Bug https://bugs.gentoo.org/644834 ---- - src/basic/cgroup-util.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index 7f86c532c..cb60108ef 100644 ---- src/basic/cgroup-util.c -+++ src/basic/cgroup-util.c -@@ -2550,28 +2550,31 @@ static int cg_unified_update(void) { - - if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) - unified_cache = CGROUP_UNIFIED_ALL; -+#if 0 /// The handling of cgroups is a bit different with elogind - else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) { -+#else -+ else if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC) -+ || F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) { -+#endif // 0 - if (statfs("/sys/fs/cgroup/unified/", &fs) == 0 && - F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { - unified_cache = CGROUP_UNIFIED_SYSTEMD; - unified_systemd_v232 = false; - #if 0 /// elogind uses its own name - } else if (statfs("/sys/fs/cgroup/systemd/", &fs) == 0 && -- F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { -- unified_cache = CGROUP_UNIFIED_SYSTEMD; -- unified_systemd_v232 = true; -- } else { -- if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0) -- return -errno; - #else - } else if (statfs("/sys/fs/cgroup/elogind/", &fs) == 0 && -+#endif // 0 - F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) { - unified_cache = CGROUP_UNIFIED_SYSTEMD; - unified_systemd_v232 = true; - } else { --#endif // 0 -+#if 0 /// There is no sub-grouping within elogind -+ if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0) -+ return -errno; - if (!F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC)) - return -ENOMEDIUM; -+#endif // 0 - unified_cache = CGROUP_UNIFIED_NONE; - } - } else diff --git a/srcpkgs/elogind/patches/fix-test-hexdecot.patch b/srcpkgs/elogind/patches/fix-test-hexdecot.patch deleted file mode 100644 index 9f3fd78c9b1..00000000000 --- a/srcpkgs/elogind/patches/fix-test-hexdecot.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- src/shared/musl_missing.h -+++ src/shared/musl_missing.h -@@ -55,13 +55,14 @@ extern char *program_invocation_short_name; - - /* strndupa may already be defined in another compatibility header */ - #if !defined(strndupa) --#define strndupa(src, n) \ -- (__extension__ ({const char *in = (src); \ -- size_t len = strnlen(in, (n)) + 1; \ -- char *out = (char *) alloca(len); \ -- out[len-1] = '\0'; \ -- (char *) memcpy(out, in, len-1);}) \ -- ) -+#define strndupa(x_src, x_n) \ -+ (__extension__ ( { \ -+ const char* x_in = (x_src); \ -+ size_t x_len = strnlen(x_in, (x_n)) + 1; \ -+ char* x_out = (char *) alloca(x_len); \ -+ x_out[x_len-1] = '\0'; \ -+ (char *) memcpy(x_out, x_in, x_len-1); \ -+ } ) ) - #endif - - /* See http://man7.org/linux/man-pages/man3/canonicalize_file_name.3.html */ ---- src/test/test-hexdecoct.c -+++ src/test/test-hexdecoct.c -@@ -22,6 +22,9 @@ - #include "macro.h" - #include "string-util.h" - -+/// Additional includes needed by elogind -+#include "musl_missing.h" -+ - static void test_hexchar(void) { - assert_se(hexchar(0xa) == 'a'); - assert_se(hexchar(0x0) == '0'); - diff --git a/srcpkgs/elogind/patches/fix-test-parse-util.patch b/srcpkgs/elogind/patches/fix-test-parse-util.patch deleted file mode 100644 index b5292d320cd..00000000000 --- a/srcpkgs/elogind/patches/fix-test-parse-util.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- src/test/test-parse-util.c -+++ src/test/test-parse-util.c -@@ -526,7 +526,10 @@ static void test_safe_atod(void) { - assert_se(r == -EINVAL); - - errno = 0; -+/// elogind supports musl_libc, and their strtod doesn't seem to use the set locale. -+#if defined(__GLIBC__) - assert_se(fabs(strtod("0,5", &e) - 0.5) < 0.00001); -+#endif // __GLIBC__ - } - - /* And check again, reset */ - diff --git a/srcpkgs/elogind/patches/fix-usage-of-__register_atfork.patch b/srcpkgs/elogind/patches/fix-usage-of-__register_atfork.patch deleted file mode 100644 index 9a411ebc218..00000000000 --- a/srcpkgs/elogind/patches/fix-usage-of-__register_atfork.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- src/basic/process-util.c -+++ src/basic/process-util.c -@@ -1022,8 +1022,10 @@ static void reset_cached_pid(void) { - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against - * libpthread, as it is part of glibc anyway. */ -+#ifdef __GLIBC__ - extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle); - extern void* __dso_handle __attribute__ ((__weak__)); -+#endif - - pid_t getpid_cached(void) { - pid_t current_value; ---- src/shared/musl_missing.h -+++ src/shared/musl_missing.h -@@ -24,6 +24,7 @@ void elogind_set_program_name(const char* pcall); - #include - #include - #include -+#include /* for pthread_atfork */ - - #define strerror_r(e, m, k) (strerror_r(e, m, k) < 0 ? strdup("strerror_r() failed") : m); - -@@ -99,6 +100,12 @@ typedef __compar_fn_t comparison_fn_t; - # endif - #endif // HAVE_UTMP - -+/* -+ * Systemd makes use of glibc __register_atfork which is not availble on musl -+ * it is mostly equivalent to pthread_atfork, so we link against pthread -+ */ -+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child) -+ - #endif // !defined(__GLIBC__) - - #endif // ELOGIND_BASIC_MUSL_MISSING_H_INCLUDED diff --git a/srcpkgs/elogind/patches/guard-against-usage-of-specific-glibc-functions.patch b/srcpkgs/elogind/patches/guard-against-usage-of-specific-glibc-functions.patch deleted file mode 100644 index 01e54de03e8..00000000000 --- a/srcpkgs/elogind/patches/guard-against-usage-of-specific-glibc-functions.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- src/test/test-sizeof.c -+++ src/test/test-sizeof.c -@@ -48,8 +48,10 @@ int main(void) { - info(unsigned); - info(long unsigned); - info(long long unsigned); -+#ifdef __GLIBC__ - info(__syscall_ulong_t); - info(__syscall_slong_t); -+#endif - - info(float); - info(double); -@@ -59,7 +61,9 @@ int main(void) { - info(ssize_t); - info(time_t); - info(usec_t); -+#ifdef __GLIBC__ - info(__time_t); -+#endif - info(pid_t); - info(gid_t); - diff --git a/srcpkgs/elogind/template b/srcpkgs/elogind/template index b5daee3d748..5b2589479bc 100644 --- a/srcpkgs/elogind/template +++ b/srcpkgs/elogind/template @@ -1,7 +1,7 @@ # Template file for 'elogind' pkgname=elogind -version=235.2 -revision=3 +version=235.3 +revision=1 build_style=meson hostmakedepends="intltool pkg-config gperf docbook-xsl gettext-devel shadow m4 libxslt git" makedepends="libcap-devel libmount-devel libseccomp-devel libblkid-devel pam-devel gettext-devel eudev-libudev-devel acl-devel glib-devel" @@ -11,13 +11,14 @@ maintainer="Enno Boland " license="GPL-2, LGPL-2" homepage="https://github.com/elogind/elogind" distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz" -checksum=db5d7362ab7fd74a1ea863247f90f3b821cdb3e4433ba049a2fdcf5bf62b0fb9 +checksum=986c78f0504533eaf9dbbe8302ca7c3bbd63a44c12f3577e4094f2f2a2b06355 conf_files="/etc/elogind/logind.conf" configure_args+=" -Drootlibexecdir=/usr/libexec/elogind -Dhalt-path=/usr/bin/halt -Dreboot-path=/usr/bin/reboot - -Dkexec-path=/usr/bin/kexec" + -Dkexec-path=/usr/bin/kexec + -Ddefault-hierarchy=legacy" pre_build() { case "$XBPS_TARGET_MACHINE" in @@ -50,6 +51,8 @@ post_install() { vinstall ./src/systemd/sd-id128.h 644 usr/include vinstall ./src/systemd/_sd-common.h 644 usr/include vinstall $FILESDIR/elogind.wrapper 755 usr/libexec/elogind + vmkdir etc/dracut.conf.d + echo "install_items+=\"/usr/libexec/elogind/elogind-uaccess-command\"" >> ${DESTDIR}/etc/dracut.conf.d/elogind.conf } elogind-devel_package() {