diff options
Diffstat (limited to 'sys-auth/elogind')
-rw-r--r-- | sys-auth/elogind/Manifest | 1 | ||||
-rw-r--r-- | sys-auth/elogind/elogind-246.10-r3.ebuild (renamed from sys-auth/elogind/elogind-246.10-r2.ebuild) | 6 | ||||
-rw-r--r-- | sys-auth/elogind/elogind-252.9.ebuild (renamed from sys-auth/elogind/elogind-246.10-r1.ebuild) | 67 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-246.10-musl-selinux.patch | 99 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-getdents.patch | 35 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-gshadow.patch | 14 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-lfs.patch | 51 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-more-strerror_r.patch | 44 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-rlim-max.patch | 13 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-sigfillset.patch | 12 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-statx.patch | 26 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-musl-strerror_r.patch | 89 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-252.9-nodocs.patch | 28 | ||||
-rw-r--r-- | sys-auth/elogind/metadata.xml | 8 |
14 files changed, 464 insertions, 29 deletions
diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest index 871cbc88d9f3..3ce9fb1e8ab7 100644 --- a/sys-auth/elogind/Manifest +++ b/sys-auth/elogind/Manifest @@ -1 +1,2 @@ DIST elogind-246.10.tar.gz 1559256 BLAKE2B 17a8146ee08c8ccf167f25d89b1d4525050ed0b0baaad0d36924ad3c40ffc820ef1528b33557cf285ad06c9ac9c440137428c5a235a2acf563e56f2f8f07e208 SHA512 9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b +DIST elogind-252.9.tar.gz 1922777 BLAKE2B dd566125e407b3479a44b007890f97c9c87a325b3fed2d3505499d2163f113affd998e14b1c1fc50b9b86b0d155b51dae344dcc1cddafb6a48c631d0a0f00c9a SHA512 eed620cbc2f03bfeae6a80c9a421c21d3293fa40adffb96c7e4d86508c06712041f6623fb2bac15ecbb85faca4b5674ea6423b3067840809fb27d023fd9e5ffd diff --git a/sys-auth/elogind/elogind-246.10-r2.ebuild b/sys-auth/elogind/elogind-246.10-r3.ebuild index 614ab85f2f98..6dab1913be28 100644 --- a/sys-auth/elogind/elogind-246.10-r2.ebuild +++ b/sys-auth/elogind/elogind-246.10-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -27,7 +27,6 @@ BDEPEND=" app-text/docbook-xml-dtd:4.5 app-text/docbook-xsl-stylesheets dev-util/gperf - dev-util/intltool virtual/pkgconfig " DEPEND=" @@ -55,6 +54,7 @@ PATCHES=( "${FILESDIR}/${P}-revert-polkit-automagic.patch" "${FILESDIR}/${P}-clang-undefined-symbol.patch" "${FILESDIR}/${P}-loong.patch" + "${FILESDIR}/${P}-musl-selinux.patch" ) pkg_setup() { @@ -92,7 +92,7 @@ src_configure() { -Ddefault-kill-user-processes=false -Dacl=$(usex acl true false) -Daudit=$(usex audit true false) - --buildtype $(usex debug debug release) + -Dbuildtype=$(usex debug debug release) -Dhtml=$(usex doc auto false) -Dpam=$(usex pam true false) -Dselinux=$(usex selinux true false) diff --git a/sys-auth/elogind/elogind-246.10-r1.ebuild b/sys-auth/elogind/elogind-252.9.ebuild index 545f56aa84e4..8ca3fd96ae06 100644 --- a/sys-auth/elogind/elogind-246.10-r1.ebuild +++ b/sys-auth/elogind/elogind-252.9.ebuild @@ -1,33 +1,37 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +PYTHON_COMPAT=( python3_{10..12} ) + if [[ ${PV} = *9999* ]]; then - EGIT_BRANCH="v241-stable" + EGIT_BRANCH="v252-stable" EGIT_REPO_URI="https://github.com/elogind/elogind.git" inherit git-r3 else SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi -inherit linux-info meson pam udev xdg-utils +inherit linux-info meson pam python-any-r1 udev xdg-utils DESCRIPTION="The systemd project's logind, extracted to a standalone package" HOMEPAGE="https://github.com/elogind/elogind" LICENSE="CC0-1.0 LGPL-2.1+ public-domain" SLOT="0" -IUSE="+acl audit debug doc +pam +policykit selinux" +IUSE="+acl audit +cgroup-hybrid debug doc +pam +policykit selinux test" +RESTRICT="!test? ( test )" BDEPEND=" app-text/docbook-xml-dtd:4.2 app-text/docbook-xml-dtd:4.5 app-text/docbook-xsl-stylesheets dev-util/gperf - dev-util/intltool virtual/pkgconfig + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') " DEPEND=" audit? ( sys-process/audit ) @@ -46,14 +50,18 @@ PDEPEND=" policykit? ( sys-auth/polkit ) " -DOCS=( README.md src/libelogind/sd-bus/GVARIANT-SERIALIZATION ) +DOCS=( README.md) PATCHES=( - "${FILESDIR}/${PN}-243.7-nodocs.patch" - "${FILESDIR}/${PN}-241.4-broken-test.patch" # bug 699116 - "${FILESDIR}/${P}-revert-polkit-automagic.patch" + "${FILESDIR}/${P}-nodocs.patch" + "${FILESDIR}/${PN}-252.9-musl-lfs.patch" ) +python_check_deps() { + python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" && + python_has_version "dev-python/lxml[${PYTHON_USEDEP}]" +} + pkg_setup() { local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD" @@ -61,20 +69,36 @@ pkg_setup() { } src_prepare() { + if use elibc_musl; then + # Some of musl-specific patches break build on the + # glibc systems (like getdents), therefore those are + # only used when the build is done for musl. + PATCHES+=( + "${FILESDIR}/${P}-musl-sigfillset.patch" + "${FILESDIR}/${P}-musl-statx.patch" + "${FILESDIR}/${P}-musl-rlim-max.patch" + "${FILESDIR}/${P}-musl-getdents.patch" + "${FILESDIR}/${P}-musl-gshadow.patch" + "${FILESDIR}/${P}-musl-strerror_r.patch" + "${FILESDIR}/${P}-musl-more-strerror_r.patch" + ) + fi + default xdg_environment_reset } src_configure() { - local rccgroupmode="$(grep rc_cgroup_mode "${EPREFIX}"/etc/rc.conf | cut -d '"' -f 2)" - local cgroupmode="legacy" - - if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then + if use cgroup-hybrid; then cgroupmode="hybrid" - elif [[ "xunified" = "x${rccgroupmode}" ]] ; then + else cgroupmode="unified" fi + python_setup + + EMESON_BUILDTYPE="$(usex debug debug release)" + local emesonargs=( -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html" @@ -92,19 +116,18 @@ src_configure() { -Ddefault-kill-user-processes=false -Dacl=$(usex acl true false) -Daudit=$(usex audit true false) - --buildtype $(usex debug debug release) -Dhtml=$(usex doc auto false) -Dpam=$(usex pam true false) -Dselinux=$(usex selinux true false) + -Dtests=$(usex test true false) -Dutmp=$(usex elibc_musl false true) + -Dmode=release ) meson_src_configure } src_install() { - DOCS+=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION ) - meson_src_install newinitd "${FILESDIR}"/${PN}.init-r1 ${PN} @@ -146,4 +169,12 @@ pkg_postinst() { elog "when the first service calls it via dbus." fi fi + + for version in ${REPLACING_VERSIONS}; do + if ver_test "${version}" -lt 252.9; then + elog "Starting with release 252.9 the sleep configuration is now done" + elog "in the /etc/elogind/sleep.conf. Should you use non-default sleep" + elog "configuration remember to migrate those to new configuration file." + fi + done } diff --git a/sys-auth/elogind/files/elogind-246.10-musl-selinux.patch b/sys-auth/elogind/files/elogind-246.10-musl-selinux.patch new file mode 100644 index 000000000000..c36861b983e2 --- /dev/null +++ b/sys-auth/elogind/files/elogind-246.10-musl-selinux.patch @@ -0,0 +1,99 @@ +https://bugs.gentoo.org/888912 +https://github.com/elogind/elogind/commit/ab72a46f3104f44a32ef7bec7439aa9d3b5f0fdc + +Rebased version to apply to 246.10 by concord@. + +From ab72a46f3104f44a32ef7bec7439aa9d3b5f0fdc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Fri, 9 Oct 2020 16:48:03 +0200 +Subject: [PATCH] basic/selinux: work around mallinfo deprecation + +Latest glibc has deprecated mallinfo(), so it might become unavailable at some point +in the future. There is malloc_info(), but it returns XML, ffs. I think the information +that we get from mallinfo() is quite useful, so let's use mallinfo() if available, and +not otherwise. +--- a/meson.build ++++ b/meson.build +@@ -617,6 +617,7 @@ foreach ident : [ + #include <unistd.h> + #include <signal.h> + #include <sys/wait.h>'''], ++ ['mallinfo', '''#include <malloc.h>'''], + ] + + have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') +--- a/src/basic/macro.h ++++ b/src/basic/macro.h +@@ -93,6 +93,10 @@ + #endif + + /* Temporarily disable some warnings */ ++#define DISABLE_WARNING_DEPRECATED_DECLARATIONS \ ++ _Pragma("GCC diagnostic push"); \ ++ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") ++ + #define DISABLE_WARNING_FORMAT_NONLITERAL \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") +--- a/src/basic/selinux-util.c ++++ b/src/basic/selinux-util.c +@@ -72,12 +72,21 @@ void mac_selinux_retest(void) { + #endif + } + ++#if HAVE_MALLINFO ++static struct mallinfo mallinfo_nowarn(void) { ++ /* glibc has deprecated mallinfo(), but the replacement malloc_info() returns an XML blob ;=[ */ ++DISABLE_WARNING_DEPRECATED_DECLARATIONS ++ return mallinfo(); ++REENABLE_WARNING ++} ++#else ++# warning "mallinfo() is missing, add mallinfo2() support instead." ++#endif ++ + int mac_selinux_init(void) { + #if HAVE_SELINUX + usec_t before_timestamp, after_timestamp; +- struct mallinfo before_mallinfo, after_mallinfo; + char timespan[FORMAT_TIMESPAN_MAX]; +- int l; + + selinux_set_callback(SELINUX_CB_POLICYLOAD, (union selinux_callback) mac_selinux_reload); + +@@ -87,7 +96,9 @@ int mac_selinux_init(void) { + if (!mac_selinux_use()) + return 0; + +- before_mallinfo = mallinfo(); ++#if HAVE_MALLINFO ++ struct mallinfo before_mallinfo = mallinfo_nowarn(); ++#endif + before_timestamp = now(CLOCK_MONOTONIC); + + label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0); +@@ -95,14 +107,17 @@ int mac_selinux_init(void) { + return log_enforcing_errno(errno, "Failed to initialize SELinux labeling handle: %m"); + + after_timestamp = now(CLOCK_MONOTONIC); +- after_mallinfo = mallinfo(); +- +- l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0; ++#if HAVE_MALLINFO ++ struct mallinfo after_mallinfo = mallinfo_nowarn(); ++ int l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0; + + log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.", + format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0), +- (l+1023)/1024); +- ++ DIV_ROUND_UP(l, 1024)); ++#else ++ log_debug("Successfully loaded SELinux database in %s.", ++ format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0)); ++#endif + #endif + return 0; + } +-- +2.40.1 diff --git a/sys-auth/elogind/files/elogind-252.9-musl-getdents.patch b/sys-auth/elogind/files/elogind-252.9-musl-getdents.patch new file mode 100644 index 000000000000..35b7670787a0 --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-getdents.patch @@ -0,0 +1,35 @@ +From dab02796780f00d689cc1c7a0ba81abe7c5f28d0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 21 Jan 2022 15:15:11 -0800 +Subject: [PATCH] pass correct parameters to getdents64 + +Fixes +../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +../git/src/basic/stat-util.c:102:28: error: incompatible pointer types passing 'union (unnamed union at ../git/src/basic/stat-util.c:78:9) *' to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(fd, &buffer, sizeof(buffer)); + ^~~~~~~ + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> + +--- + src/basic/recurse-dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c +index d16ca98..31f6154 100644 +--- a/src/basic/recurse-dir.c ++++ b/src/basic/recurse-dir.c +@@ -54,7 +54,7 @@ int readdir_all(int dir_fd, + bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); + assert(bs > de->buffer_size); + +- n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); ++ n = getdents(dir_fd, (struct dirent*)((uint8_t*) de->buffer + de->buffer_size), bs - de->buffer_size); + if (n < 0) + return -errno; + if (n == 0) diff --git a/sys-auth/elogind/files/elogind-252.9-musl-gshadow.patch b/sys-auth/elogind/files/elogind-252.9-musl-gshadow.patch new file mode 100644 index 000000000000..95613cb66f6e --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-gshadow.patch @@ -0,0 +1,14 @@ +just like the other part it's already patched in, not actually used +-- +diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h +index 7a41be7..3a970a6 100644 +--- a/src/shared/user-record-nss.h ++++ b/src/shared/user-record-nss.h +@@ -2,7 +2,6 @@ + #pragma once + + #include <grp.h> +-#include <gshadow.h> + #include <pwd.h> + #include <shadow.h> + diff --git a/sys-auth/elogind/files/elogind-252.9-musl-lfs.patch b/sys-auth/elogind/files/elogind-252.9-musl-lfs.patch new file mode 100644 index 000000000000..4faa929c447a --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-lfs.patch @@ -0,0 +1,51 @@ +https://github.com/systemd/systemd/pull/27599 + +From d096e05c625ea825eb4d781216ded717b7f71cca Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Wed, 10 May 2023 01:47:13 +0100 +Subject: [PATCH] dirent: conditionalize dirent assert based on dirent64 + existence + +>=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native" +functions are already LFS-aware. + +Check for dirent64 in meson.build and only assert if it exists. + +Bug: https://bugs.gentoo.org/905900 +Closes: https://github.com/systemd/systemd/pull/25809 +--- a/meson.build ++++ b/meson.build +@@ -599,6 +599,7 @@ decl_headers = ''' + # define _GNU_SOURCE 1 + # endif // _GNU_SOURCE + #endif // 1 ++#include <dirent.h> + #include <uchar.h> + #include <sys/mount.h> + #include <sys/stat.h> +@@ -608,6 +609,7 @@ foreach decl : ['char16_t', + 'char32_t', + 'struct mount_attr', + 'struct statx', ++ 'struct dirent64', + ] + + # We get -1 if the size cannot be determined +--- a/src/basic/dirent-util.h ++++ b/src/basic/dirent-util.h +@@ -39,6 +39,7 @@ struct dirent *readdir_no_dot(DIR *dirp); + /* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and + * we want them to be interchangeable to make getdents64() work, hence verify that. */ + assert_cc(_FILE_OFFSET_BITS == 64); ++#if HAVE_STRUCT_DIRENT64 + assert_cc(sizeof(struct dirent) == sizeof(struct dirent64)); + assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino)); + assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino)); +@@ -50,6 +51,7 @@ assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type)); + assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type)); + assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name)); + assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name)); ++#endif + + #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz) \ + for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \ diff --git a/sys-auth/elogind/files/elogind-252.9-musl-more-strerror_r.patch b/sys-auth/elogind/files/elogind-252.9-musl-more-strerror_r.patch new file mode 100644 index 000000000000..3cfafae4cbfe --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-more-strerror_r.patch @@ -0,0 +1,44 @@ +Patch-Source: https://github.com/chimera-linux/cports/blob/6ff62886181bc1325a1431157a80993497fd561b/main/udev/patches/0001-errno-util-Make-STRERROR-portable-for-musl.patch +-- +From f66b5c802ce0a3310f5580cfc1b02446f8087568 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Jan 2023 23:39:46 -0800 +Subject: [PATCH] errno-util: Make STRERROR portable for musl + +Sadly, systemd has decided to use yet another GNU extention in a macro +lets make this such that we can use XSI compliant strerror_r() for +non-glibc hosts + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/basic/errno-util.h | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h +index 091f99c590..eb5c1f9961 100644 +--- a/src/basic/errno-util.h ++++ b/src/basic/errno-util.h +@@ -14,8 +14,16 @@ + * https://stackoverflow.com/questions/34880638/compound-literal-lifetime-and-if-blocks + * + * Note that we use the GNU variant of strerror_r() here. */ +-#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) +- ++static inline const char * STRERROR(int errnum); ++ ++static inline const char * STRERROR(int errnum) { ++#ifdef __GLIBC__ ++ return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN); ++#else ++ static __thread char buf[ERRNO_BUF_LEN]; ++ return strerror_r(abs(errnum), buf, ERRNO_BUF_LEN) ? "unknown error" : buf; ++#endif ++} + /* A helper to print an error message or message for functions that return 0 on EOF. + * Note that we can't use ({ … }) to define a temporary variable, so errnum is + * evaluated twice. */ +-- +2.39.1 + diff --git a/sys-auth/elogind/files/elogind-252.9-musl-rlim-max.patch b/sys-auth/elogind/files/elogind-252.9-musl-rlim-max.patch new file mode 100644 index 000000000000..de8f290f16b8 --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-rlim-max.patch @@ -0,0 +1,13 @@ +diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c +index afd74ac..3a731f4 100644 +--- a/src/basic/rlimit-util.c ++++ b/src/basic/rlimit-util.c +@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { + fixed.rlim_max == highest.rlim_max) + return 0; + +- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); ++ log_debug("Failed at setting rlimit %ju for resource RLIMIT_%s. Will attempt setting value %ju instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); + + return RET_NERRNO(setrlimit(resource, &fixed)); + } diff --git a/sys-auth/elogind/files/elogind-252.9-musl-sigfillset.patch b/sys-auth/elogind/files/elogind-252.9-musl-sigfillset.patch new file mode 100644 index 000000000000..787eeac9bc80 --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-sigfillset.patch @@ -0,0 +1,12 @@ +diff --git a/src/basic/async.h b/src/basic/async.h +index cf80acf..d22e77d 100644 +--- a/src/basic/async.h ++++ b/src/basic/async.h +@@ -2,6 +2,7 @@ + #pragma once + + #include <sys/types.h> ++#include <signal.h> + + #include "macro.h" + diff --git a/sys-auth/elogind/files/elogind-252.9-musl-statx.patch b/sys-auth/elogind/files/elogind-252.9-musl-statx.patch new file mode 100644 index 000000000000..60a8942161df --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-statx.patch @@ -0,0 +1,26 @@ +diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c +index ab8744b..59ff466 100644 +--- a/src/basic/mountpoint-util.c ++++ b/src/basic/mountpoint-util.c +@@ -11,7 +11,7 @@ + //#include "filesystems.h" + #include "fs-util.h" + #include "missing_stat.h" +-//#include "missing_syscall.h" ++#include "missing_syscall.h" + //#include "mkdir.h" + #include "mountpoint-util.h" + #include "nulstr-util.h" +diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c +index d8e0693..f8324ed 100644 +--- a/src/basic/stat-util.c ++++ b/src/basic/stat-util.c +@@ -18,7 +18,7 @@ + #include "macro.h" + //#include "missing_fs.h" + #include "missing_magic.h" +-//#include "missing_syscall.h" ++#include "missing_syscall.h" + #include "nulstr-util.h" + //#include "parse-util.h" + #include "stat-util.h" diff --git a/sys-auth/elogind/files/elogind-252.9-musl-strerror_r.patch b/sys-auth/elogind/files/elogind-252.9-musl-strerror_r.patch new file mode 100644 index 000000000000..04570f5fb3f4 --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-musl-strerror_r.patch @@ -0,0 +1,89 @@ +fix strerror_r use instead of whatever this define is meant to be doing +-- +From 0542d27ebbb250c09bdcfcf9f2ea3d27426fe522 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Tue, 10 Jul 2018 15:40:17 +0800 +Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi + strerror_r + +XSI-compliant strerror_r and GNU-specifi strerror_r are different. + + int strerror_r(int errnum, char *buf, size_t buflen); + /* XSI-compliant */ + + char *strerror_r(int errnum, char *buf, size_t buflen); + /* GNU-specific */ + +We need to distinguish between them. Otherwise, we'll get an int value +assigned to (char *) variable, resulting in segment fault. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + +--- + src/libsystemd/sd-bus/bus-error.c | 5 +++++ + src/libsystemd/sd-journal/journal-send.c | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/basic/musl_missing.h b/src/basic/musl_missing.h +index 41c66c9..a2e1d7e 100644 +--- a/src/basic/musl_missing.h ++++ b/src/basic/musl_missing.h +@@ -26,8 +26,6 @@ void elogind_set_program_name(const char* pcall); + #include <unistd.h> + #include <pthread.h> /* for pthread_atfork */ + +-#define strerror_r(e, m, k) (strerror_r(e, m, k) < 0 ? strdup("strerror_r() failed") : m); +- + /* + * Possibly TODO according to http://man7.org/linux/man-pages/man3/getenv.3.html + * + test if the process's effective user ID does not match its real user ID or +diff --git a/src/libelogind/sd-bus/bus-error.c b/src/libelogind/sd-bus/bus-error.c +index 4d687cf..1459396 100644 +--- a/src/libelogind/sd-bus/bus-error.c ++++ b/src/libelogind/sd-bus/bus-error.c +@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { + return; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(error, m, k); ++ x = m; ++#else + x = strerror_r(error, m, k); ++#endif + if (errno == ERANGE || strlen(x) >= k - 1) { + free(m); + k *= 2; +@@ -594,8 +599,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static + + if (e && e->message) + return e->message; +- ++#ifndef __GLIBC__ ++ strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++ return buf; ++#else + return strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++#endif + } + + static bool map_ok(const sd_bus_error_map *map) { +diff --git a/src/libelogind/sd-journal/journal-send.c b/src/libelogind/sd-journal/journal-send.c +index 4010197..1d49868 100644 +--- a/src/libelogind/sd-journal/journal-send.c ++++ b/src/libelogind/sd-journal/journal-send.c +@@ -444,7 +444,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + diff --git a/sys-auth/elogind/files/elogind-252.9-nodocs.patch b/sys-auth/elogind/files/elogind-252.9-nodocs.patch new file mode 100644 index 000000000000..4be92f95fa24 --- /dev/null +++ b/sys-auth/elogind/files/elogind-252.9-nodocs.patch @@ -0,0 +1,28 @@ +diff --git a/meson.build b/meson.build +index 694a2fd97..9b97cafef 100644 +--- a/meson.build ++++ b/meson.build +@@ -4528,15 +4528,11 @@ subdir('shell-completion/zsh') + # install_dir : xinitrcdir) + # endif + #endif // 0 +-install_data('LICENSE.GPL2', +- 'LICENSE.LGPL2.1', + #if 0 /// elogind has upgraded to markdown, and the NEWS file is useless + # 'NEWS', + # 'README', + #else // 0 +- 'README.md', + #endif // 0 +- 'docs/CODING_STYLE.md', + #if 0 /// irrelevant for elogind + # 'docs/DISTRO_PORTING.md', + # 'docs/ENVIRONMENT.md', +@@ -4545,7 +4541,6 @@ install_data('LICENSE.GPL2', + # 'docs/TRANSLATORS.md', + # 'docs/UIDS-GIDS.md', + #endif // 0 +- install_dir : docdir) + + #if 0 /// irrelevant for elogind + # install_subdir('LICENSES', diff --git a/sys-auth/elogind/metadata.xml b/sys-auth/elogind/metadata.xml index fb46725b3a1d..43950e1cc395 100644 --- a/sys-auth/elogind/metadata.xml +++ b/sys-auth/elogind/metadata.xml @@ -4,14 +4,6 @@ <maintainer type="person"> <email>asturm@gentoo.org</email> </maintainer> - <maintainer type="person"> - <email>kensington@gentoo.org</email> - <name>Michael Palimaka</name> - </maintainer> - <maintainer type="person"> - <email>slashbeast@gentoo.org</email> - <name>Piotr Karbowski</name> - </maintainer> <use> <flag name="cgroup-hybrid">Use hybrid cgroup hierarchy (OpenRC's default) instead of unified.</flag> </use> |