diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-01-19 20:11:46 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-01-19 20:11:46 +0000 |
commit | 5b5df25227111ef465caf5c52bcfb66dac3219cd (patch) | |
tree | 31b713cac6188358125cbb66b8804030328740f0 /sys-auth/elogind | |
parent | 02e2208f46f4e2c00fb9743cbc47350bdd233bfa (diff) |
gentoo resync : 19.01.2018
Diffstat (limited to 'sys-auth/elogind')
-rw-r--r-- | sys-auth/elogind/Manifest | 2 | ||||
-rw-r--r-- | sys-auth/elogind/elogind-235.2-r1.ebuild | 128 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch | 56 |
3 files changed, 186 insertions, 0 deletions
diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest index a85411f9e6d6..4b1c2c5e871d 100644 --- a/sys-auth/elogind/Manifest +++ b/sys-auth/elogind/Manifest @@ -1,9 +1,11 @@ AUX elogind-226.4-docs.patch 355 BLAKE2B 6e2ffcfe0e4b8d8822cb41133302757cc02c09298dd53cb4eb277b3e3200764f6beb90d4a702870e00d0ff5338cb5a0a7d228a563a6f9c51fb340e4c63650a59 SHA512 dc942f190ea2064e194808db7c6ede618d536778f1b574658ddb9c0aa4a106f6129cc18000eaa63aeca1b16ad28fe5f5dbee441bd93436ae62eb4740236f94ae AUX elogind-235.1-docs.patch 714 BLAKE2B 93271996cbff4cc8f1cb222c83672f491d3473839fffea4818e7a7341fdb0060de23cca70576d81d0c6783fc796d998b0b70a38237ec7ab14dd8e2521659d49e SHA512 2e530aa318d3ba0de3a1fceb4d8316f8215e1a8d769b077cf4b223ae2f8103c62c2852dd3fd45540646ad6272b0edbb4b23d70a379a2601765c61b4d78b4d81e +AUX elogind-235.2-legacy-cgroupmode.patch 2527 BLAKE2B de50970f6c930b2ff35f6ecc4119e06abb23cbc02fcdb649930258b717ab05cb5b4b1ad8de1e89da705c8a1b66093eedba984c0a831fd60cef3d9704e09c6161 SHA512 1c98981db6efc6afb779aef93fd4cd7ba31a1995d74d1edea9b486c4724fe7bc215df95745a3553324750794530466679cbde491bf01ed5bab99a20eda135bb2 AUX elogind.conf.in 218 BLAKE2B 7ee0a72c4a628a233fdbb2d3104487859aaa7e5c4f2624e5a4eafb37ed90fb8f64349b1a8acc92e69ec618496bb7f6263b7a5d0fe15a1afe1c03f5955743f079 SHA512 2c62ab28d7db9cd52489069f80363159000385a25dd7f2afe5a03598a0b7a1f61af7c18df71f6286e72f5966e55b62a4029e30cb786dd813bb201b9e20adccd7 AUX elogind.init 490 BLAKE2B 71c102f89a71a2963da50b153d8696a9480d81caa48e8422e7f39614e9bfb0b09037bc4dea202c3735e170140752429dd54747b99941d861453b4714dcb98819 SHA512 60fe1cb55ec0f605f06fb3744a0300accebfc14c4ecd24b7db2e8b0cb1537e816a4a4ccbc4b2eeac45e2f3ca8942dd10d24bdcd814cccbc2ceed198b2657238a DIST elogind-234.4.tar.gz 973370 BLAKE2B 4fe00d2e22e3f94dfb6385fe61825be72ad2200f1368807ea816a971104cf384e3508ecf2877fa08394c6d0259874b2ceb7c4014f9e861dcd3b19c01bcd04602 SHA512 2df4fa318074d4f5e5dbba353cf817068a2703ffed40cdeae4cba2dea4ee143d1c5fc076b19419f1c4299392088c2c14b430d8aa1ded03b62117311802305d5e DIST elogind-235.2.tar.gz 975652 BLAKE2B c568b5eec89da14f55211cf4405d96b4bb1ea274d1237739a92c4f3585a6181a3e17dc7ed2af5161c649cae2149b3bd25f4212cf5a304383b254e39d7aa0b378 SHA512 6fa9194e8c21fa3d3caf6f9499f772dbfe38b9d40d8a0fe43ee32ad4b2acd672a78798d00694d1e0d6107625f4f3f06b71e0a5466ed4be446d670f9bcd961313 EBUILD elogind-234.4-r1.ebuild 2904 BLAKE2B 01348724ce12ee709bf444794544e1cd15a9b97a976f50c41f0686ad82d935f99a12f081481c22e0dfaf63c99426ec63961b1aa7bee926b377744b7bf09a247d SHA512 dfd1fa283a1110092b32bec7ec6627b3819c44242de6387eac9abbac457f11fe31bb93f76852fbfd1a88e646273eccd884fc90b353cec718f82dbd1ea8759982 +EBUILD elogind-235.2-r1.ebuild 3486 BLAKE2B 53d22fc4d4a6a0d9d44e5f21f74ca1750702c259025fef3a57d6fb821c9bdb47a5dcf61f366c4e7110a579bd673aca91148a22f2c3ff159031a32b79f58718a6 SHA512 8f944e79cd223e81ffd7e10a876417f130056f4b6b4771c5a967013e864d9cdbb7aad4ca9bdcfb3c16f674f377c736333f2c5a6fdd5824ff4650e2cbb46cbab7 EBUILD elogind-235.2.ebuild 3437 BLAKE2B fd17797c07dade1d5c4250fe638d0458f6be4fc853b145ac39a363da317e5af6d2bc39ea17028f93127df6b12338b057b0270f833e22d0202e6dc06bd92f0c86 SHA512 0b332b0fd3fcd898bc2b5ef74534cddf9d77e109c2a4a9590d2e53c9c93b423d0937f0f5fceadd0e8d5147490846b31dee3cac62cfb94462866ed87d37bc0536 MISC metadata.xml 379 BLAKE2B fc63654412fa4cb02122205ad53d29ed35153457c5dd5c5ab8fa3c3dbfcc7c00b2704220d4cb9040f8d6f794bbb9bd0f8cb9be80d410efb6cf85eeee8ce46503 SHA512 30be0eb7903ffb83d9e24fbcacc8db09c0f8cd7187df5f75b2c12fb5cfae1110d52f29aba502ea92af53df02451cc40e0f3789382f87a16bd281f06e9cad6c68 diff --git a/sys-auth/elogind/elogind-235.2-r1.ebuild b/sys-auth/elogind/elogind-235.2-r1.ebuild new file mode 100644 index 000000000000..eb33bb294c41 --- /dev/null +++ b/sys-auth/elogind/elogind-235.2-r1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info meson pam udev xdg-utils + +DESCRIPTION="The systemd project's logind, extracted to a standalone package" +HOMEPAGE="https://github.com/elogind/elogind" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="CC0-1.0 LGPL-2.1+ public-domain" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+acl debug doc +pam +policykit selinux" + +COMMON_DEPEND=" + sys-apps/util-linux + sys-libs/libcap + virtual/libudev:= + acl? ( sys-apps/acl ) + pam? ( virtual/pam ) + selinux? ( sys-libs/libselinux ) +" +DEPEND="${COMMON_DEPEND} + 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 + sys-devel/libtool + virtual/pkgconfig +" +RDEPEND="${COMMON_DEPEND} + !sys-apps/systemd +" +PDEPEND=" + sys-apps/dbus + policykit? ( sys-auth/polkit ) +" + +PATCHES=( + "${FILESDIR}/${PN}-235.1-docs.patch" + "${FILESDIR}/${P}-legacy-cgroupmode.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD" + + if use kernel_linux; then + linux-info_pkg_setup + fi +} + +src_prepare() { + default + xdg_environment_reset +} + +src_configure() { + local emesonargs cgroupmode rccgroupmode + + rccgroupmode="$(grep rc_cgroup_mode /etc/rc.conf | cut -d '"' -f 2)" + cgroupmode="legacy" + + if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then + cgroupmode="hybrid" + elif [[ "xunified" = "x${rccgroupmode}" ]] ; then + cgroupmode="unified" + fi + + emesonargs=( + -Ddocdir="${EPREFIX}/usr/share/doc/${P}" \ + -Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html" \ + -Dpamlibdir=$(getpam_mod_dir) \ + -Dudevrulesdir="$(get_udevdir)"/rules.d \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + -Drootlibdir="${EPREFIX}"/$(get_libdir) \ + -Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind \ + -Drootprefix="${EPREFIX}/" \ + -Dsmack=true \ + -Dman=auto \ + -Dhtml=$(usex doc auto false) \ + -Dcgroup-controller=openrc \ + -Ddefault-hierarchy=${cgroupmode} \ + -Ddebug=$(usex debug elogind false) \ + --buildtype $(usex debug debug release) \ + -Dacl=$(usex acl true false) \ + -Dpam=$(usex pam true false) \ + -Dselinux=$(usex selinux true false) \ + -Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions" \ + -Dzsh-completion="${EPREFIX}/usr/share/zsh/site-functions" + ) + meson_src_configure +} + +src_install() { + meson_src_install + + newinitd "${FILESDIR}"/${PN}.init ${PN} + + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die + newconfd ${PN}.conf ${PN} +} + +pkg_postinst() { + if [ "$(rc-config list boot | grep elogind)" != "" ]; then + ewarn "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 + ewarn "elogind is currently not started from any runlevel." + ewarn "You may add it to the boot runlevel by:" + ewarn "# rc-update add elogind boot" + fi + ewarn "Alternatively you can leave elogind out of any" + ewarn "runlevel. It will then be started automatically" + if use pam; then + ewarn "when the first service calls it via dbus, or the" + ewarn "first user logs into the system." + else + ewarn "when the first service calls it via dbus." + fi +} diff --git a/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch b/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch new file mode 100644 index 000000000000..eb86e930f6f8 --- /dev/null +++ b/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch @@ -0,0 +1,56 @@ +From 003ece760231aba0c661e2390dfd11075d72a8da Mon Sep 17 00:00:00 2001 +From: Sven Eden <yamakuzure@gmx.net> +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 +--- a/src/basic/cgroup-util.c ++++ b/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 |