diff options
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/Manifest.gz | bin | 9250 -> 9249 bytes | |||
-rw-r--r-- | sys-auth/elogind/Manifest | 10 | ||||
-rw-r--r-- | sys-auth/elogind/elogind-252.9.ebuild | 178 | ||||
-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-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 |
11 files changed, 449 insertions, 0 deletions
diff --git a/sys-auth/Manifest.gz b/sys-auth/Manifest.gz Binary files differindex 9ad9e4b1a565..7621fa2470b1 100644 --- a/sys-auth/Manifest.gz +++ b/sys-auth/Manifest.gz diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest index b4d1545619d8..e8ee143f3f1a 100644 --- a/sys-auth/elogind/Manifest +++ b/sys-auth/elogind/Manifest @@ -4,9 +4,19 @@ AUX elogind-246.10-clang-undefined-symbol.patch 1090 BLAKE2B aaad5048696084e0a01 AUX elogind-246.10-loong.patch 1493 BLAKE2B 40fbeae11f4f8387e0880e0ad91dc42577e0e8b160a0d916471ae852b5e40ff425b85668c04cb1e54c7f7087d05f3fcf0216938616b07bb413dfcc7be2220f34 SHA512 befb95281c83ec0421a16e26402c58a49d8a3c9e3100c8c164c1537073be5af2416ac2561271d7e4965d88c2693e8e2face3ca0b486bbef2f00216fa0c20396f AUX elogind-246.10-musl-selinux.patch 3857 BLAKE2B 831b48c0b7eff35099325ca586ac39ed4c477c9298aa740da85d82c05625aeeab47aff4b19eb10318834f9d6e8256079e9c148c19f66d65b2a7433e2baeecf51 SHA512 9db4f7e1c4bcf7bbf743c89ce36162b3976f116ca0257081d6e74f46dab67b6f9bd3db8e33b06dd6a334fa1d20d513a631220924028ec330af815434adac85c3 AUX elogind-246.10-revert-polkit-automagic.patch 1345 BLAKE2B 115c8f38f23b140b5f232cb80fa2486ad90895a0fad3717d79302ac2205fa260d35aab9fdbc98bf490790749b109d32f59cfee166da26a9457676943cf6a57b7 SHA512 84e7b8e09ffd41bd0ea466e4f7fbc333c42544d9ed6877b881dc68c55607e81406ca977c3c0c045db8e151f76df1c7c813395ccb73b6e38583ddd40c642244f1 +AUX elogind-252.9-musl-getdents.patch 1806 BLAKE2B 5d79695d51a06785bd2d83e57d0379c38f812890e567e96b6ccc00aa61feedb987c5a34b754b4682fe50d6bda8870290f026f800d91f4a9b445d784884db191d SHA512 d684b546762ca6a133e7b4395be514dfb1516c9e8e28c97ea216f4fa1bb66caa64db90cff19f68ac2cc2c5eb347ef813b9e030245c9fe1159f7d40ad8d63e666 +AUX elogind-252.9-musl-gshadow.patch 357 BLAKE2B ed804dee44af417163b7a286f83393457720712bbb2feabc202221925f2fa44149530a9b0adb30063e7d6f9846abb7a350644b4edc5c3f77da3d21b0eda62a6a SHA512 b69598c6ff56155b8f73bb4684bca6fd66011a9088e0007499617621d2f2b8b5683efabb414d1376a27f931d5372cfda845ad50e4e2efa498391529a22909108 +AUX elogind-252.9-musl-more-strerror_r.patch 1707 BLAKE2B e04bd210bb1d8b9e9a2c10e0f23ddb75fe24dbc4f233c59a32693947a5a6cc77d891299819dae125de869a9b261462f68ff78aaebf97d12a0648187856761404 SHA512 d79d8fb6149299b24d6935d1e8feff194daf67318d45dd8e93087e715f08863a6152261ee2c0b5eff89b01c7189117605309be43184104ba571fbb8425e2f364 +AUX elogind-252.9-musl-rlim-max.patch 768 BLAKE2B e1ac4fb26cc6fc27c2e817ee909314cc3cf8c01043a6eb634ca0f37a230c0af2bb427e0e9f5a13eaa5f4b4b85ead3f88293ef65c81ce75a8a77b402d0e016e23 SHA512 aca575a32e3bb209a5ddd20055b667c92fb4c1e70954a589243db4b145764b35c0067d0a9569b67ff707f85c0a8bea7c86da4b3813fec48e5267bd653b642e81 +AUX elogind-252.9-musl-sigfillset.patch 230 BLAKE2B ed25a1d56c1461cd99124c9fa85a9fa02ada74df62be1e401ebaa2f3346496556416567adf2a1aca22e30f2e5095a92fde72ba0ec3e99072284db678056ac9c8 SHA512 28884612bee898c775f51a27ad26a5478ade3a1608cb528d7797a01ad3606a71379e7486a39246032d736810ad7c8e2925ba25d5f72d39473a14e6e23fcffe3e +AUX elogind-252.9-musl-statx.patch 781 BLAKE2B 8d5ea4a9eaec8b25871ed381cc9ba8c24e1d5149a52d78e71907a47992e865464a0c443f3b6dd8137c93b31f9c61e1607032cf83976c3bf4fa84a8d80772cd03 SHA512 f7f22edfea8062c6bfaa2e7b706368ab87b026bc486a2f34627bb82cd362883279ccd9e8436208b0904b86e80b3fa977695ca79a19e1dd9e7218dbb1eb8610e0 +AUX elogind-252.9-musl-strerror_r.patch 3228 BLAKE2B dcc1d43af2c73e17da2cd0e22f60b98061c6fbaeba629abb969e130d7ef884c08341909ca01bdfc615aea147d6e6d8a3edea0cbf41ae981f270f23638478e491 SHA512 6b60da7b045a7004da09b910a192c3e9a00ef7507cb108d9639e18cc81e8bb56e37d3c8db1efee37334c15cddaca480f0cf25d7532cf2381f9981e9d2033bc44 +AUX elogind-252.9-nodocs.patch 870 BLAKE2B ea5a025554999f96c59ab88e3d7c54a331a82cd44ea268a6b131f81b9527939c1da1e2ba74b6635a02b1a0d4167d605614f49b46b39e4769f65eb4c6acfd706a SHA512 027f1d419f9d473835806b4d5da9b129677f23175ab332431260f63eebfd7d31657c3868442ac33798795f61136da2cf6912b1a61c7737fd458146284f35f5b2 AUX elogind.conf.in 218 BLAKE2B 7ee0a72c4a628a233fdbb2d3104487859aaa7e5c4f2624e5a4eafb37ed90fb8f64349b1a8acc92e69ec618496bb7f6263b7a5d0fe15a1afe1c03f5955743f079 SHA512 2c62ab28d7db9cd52489069f80363159000385a25dd7f2afe5a03598a0b7a1f61af7c18df71f6286e72f5966e55b62a4029e30cb786dd813bb201b9e20adccd7 AUX elogind.init 490 BLAKE2B 71c102f89a71a2963da50b153d8696a9480d81caa48e8422e7f39614e9bfb0b09037bc4dea202c3735e170140752429dd54747b99941d861453b4714dcb98819 SHA512 60fe1cb55ec0f605f06fb3744a0300accebfc14c4ecd24b7db2e8b0cb1537e816a4a4ccbc4b2eeac45e2f3ca8942dd10d24bdcd814cccbc2ceed198b2657238a AUX elogind.init-r1 503 BLAKE2B 7e54688c91f78b46411edff04dd8544dea778864d34ec00a4f0f2c166b4062ebc6b01f201f1b7d1f22f6781c51ac22f924136c83c0b0cdb29d6aadf640a6c0e8 SHA512 97d78afe1c0833f3f632272904bd8338869639facb79cd2fae6a4bf58fc5b2dd960484e1f9945152ff13d075216cf4b48b6b234eb7738fbbf445eee2c20e88f2 DIST elogind-246.10.tar.gz 1559256 BLAKE2B 17a8146ee08c8ccf167f25d89b1d4525050ed0b0baaad0d36924ad3c40ffc820ef1528b33557cf285ad06c9ac9c440137428c5a235a2acf563e56f2f8f07e208 SHA512 9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b +DIST elogind-252.9.tar.gz 1922777 BLAKE2B dd566125e407b3479a44b007890f97c9c87a325b3fed2d3505499d2163f113affd998e14b1c1fc50b9b86b0d155b51dae344dcc1cddafb6a48c631d0a0f00c9a SHA512 eed620cbc2f03bfeae6a80c9a421c21d3293fa40adffb96c7e4d86508c06712041f6623fb2bac15ecbb85faca4b5674ea6423b3067840809fb27d023fd9e5ffd EBUILD elogind-246.10-r3.ebuild 4203 BLAKE2B 654babe35a2da1cfa838dd707173d06cdc4a6e68cf1ce545816d73e33e2c1b537696bff8396e7045a8e411bb10b7afcc6189afb43e34099b25339a653aebb6fd SHA512 2c9a2a223e086af696b421ef43508fc897d86c1fb11de6d2eb48f0f098127e9d4e2105801f75f7a92038c389c194b919c4e37122c441d152f88cff672c9d8617 +EBUILD elogind-252.9.ebuild 5040 BLAKE2B 1490d731ae04e2b5590371f538a798c6a3747cd041795461e59a39d168c150411a72634a6828115714928c5264b3a6545bad9c64ae969964443e66ab8c1f3779 SHA512 de0b9243e747c97b0da22521256241e59f11c3c4753d200bfd8d768eed932a461563c99fef58195437b98e4b6c159fb420747805f473576e11cad15103833da8 MISC metadata.xml 643 BLAKE2B 8304073654ac908cfb0e65493afc49a3f4925ba1c4adb8d571b57ddf3d7cf22a8e79dfbc6e3e3eb4fd8fe7f23f2edf2e1f0df908342add9c39e488bc1676ba39 SHA512 8c745c007f86f8c6a867a8c6e747111c4cc3e8f0faf4ad50b2dc4bf92b756b5d3f7b15af9a51e1c7353a45afeced6ad56b420f2af76706fe7d8e542db50ac952 diff --git a/sys-auth/elogind/elogind-252.9.ebuild b/sys-auth/elogind/elogind-252.9.ebuild new file mode 100644 index 000000000000..6303be6caa2b --- /dev/null +++ b/sys-auth/elogind/elogind-252.9.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{10..11} ) + +if [[ ${PV} = *9999* ]]; then + 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 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +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 +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 + 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 ) + sys-apps/util-linux + sys-libs/libcap + virtual/libudev:= + acl? ( sys-apps/acl ) + pam? ( sys-libs/pam ) + selinux? ( sys-libs/libselinux ) +" +RDEPEND="${DEPEND} + !sys-apps/systemd +" +PDEPEND=" + sys-apps/dbus + policykit? ( sys-auth/polkit ) +" + +DOCS=( README.md) + +PATCHES=( + "${FILESDIR}/${P}-nodocs.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" + + use kernel_linux && linux-info_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() { + if use cgroup-hybrid; then + cgroupmode="hybrid" + else + cgroupmode="unified" + fi + + python_setup + + local emesonargs=( + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" + -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html" + -Dpamlibdir=$(getpam_mod_dir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)"/rules.d + --libdir="${EPREFIX}"/usr/$(get_libdir) + -Drootlibdir="${EPREFIX}"/$(get_libdir) + -Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind + -Drootprefix="${EPREFIX}/" + -Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions" + -Dman=auto + -Dsmack=true + -Dcgroup-controller=openrc + -Ddefault-hierarchy=${cgroupmode} + -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() { + meson_src_install + + newinitd "${FILESDIR}"/${PN}.init-r1 ${PN} + + sed -e "s|@libdir@|$(get_libdir)|" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die + newconfd ${PN}.conf ${PN} +} + +pkg_postinst() { + if ! use pam; then + ewarn "${PN} will not be managing user logins/seats without USE=\"pam\"!" + ewarn "In other words, it will be useless for most applications." + ewarn + fi + if ! use policykit; then + ewarn "loginctl will not be able to perform privileged operations without" + ewarn "USE=\"policykit\"! That means e.g. no suspend or hibernate." + ewarn + fi + if [[ "$(rc-config list boot | grep elogind)" != "" ]]; then + elog "elogind is currently started from boot runlevel." + elif [[ "$(rc-config list default | grep elogind)" != "" ]]; then + ewarn "elogind is currently started from default runlevel." + ewarn "Please remove elogind from the default runlevel and" + ewarn "add it to the boot runlevel by:" + ewarn "# rc-update del elogind default" + ewarn "# rc-update add elogind boot" + else + elog "elogind is currently not started from any runlevel." + elog "You may add it to the boot runlevel by:" + elog "# rc-update add elogind boot" + elog + elog "Alternatively, you can leave elogind out of any" + elog "runlevel. It will then be started automatically" + if use pam; then + elog "when the first service calls it via dbus, or" + elog "the first user logs into the system." + else + 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-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-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', |