Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/elogind/
Date: Sun, 04 Mar 2018 10:06:37
Message-Id: 1520155948.6539dc8c14471d416ebe09ae58daceacba770be0.asturm@gentoo
1 commit: 6539dc8c14471d416ebe09ae58daceacba770be0
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 3 22:49:56 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 4 09:32:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6539dc8c
7
8 sys-auth/elogind: Restore default-kill-user-processes=false
9
10 Reported-by: Herbert Wantesh <rauchwolke <AT> gmx.net>
11 Closes: https://bugs.gentoo.org/646908
12 Package-Manager: Portage-2.3.24, Repoman-2.3.6
13
14 sys-auth/elogind/elogind-235.2-r2.ebuild | 129 +++++++++++++++++++++++++++++++
15 1 file changed, 129 insertions(+)
16
17 diff --git a/sys-auth/elogind/elogind-235.2-r2.ebuild b/sys-auth/elogind/elogind-235.2-r2.ebuild
18 new file mode 100644
19 index 00000000000..9d4754ad22c
20 --- /dev/null
21 +++ b/sys-auth/elogind/elogind-235.2-r2.ebuild
22 @@ -0,0 +1,129 @@
23 +# Copyright 1999-2018 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +
28 +inherit linux-info meson pam udev xdg-utils
29 +
30 +DESCRIPTION="The systemd project's logind, extracted to a standalone package"
31 +HOMEPAGE="https://github.com/elogind/elogind"
32 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
33 +
34 +LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
35 +SLOT="0"
36 +KEYWORDS="amd64 ~arm x86"
37 +IUSE="+acl debug doc +pam +policykit selinux"
38 +
39 +COMMON_DEPEND="
40 + sys-apps/util-linux
41 + sys-libs/libcap
42 + virtual/libudev:=
43 + acl? ( sys-apps/acl )
44 + pam? ( virtual/pam )
45 + selinux? ( sys-libs/libselinux )
46 +"
47 +DEPEND="${COMMON_DEPEND}
48 + app-text/docbook-xml-dtd:4.2
49 + app-text/docbook-xml-dtd:4.5
50 + app-text/docbook-xsl-stylesheets
51 + dev-util/gperf
52 + dev-util/intltool
53 + sys-devel/libtool
54 + virtual/pkgconfig
55 +"
56 +RDEPEND="${COMMON_DEPEND}
57 + !sys-apps/systemd
58 +"
59 +PDEPEND="
60 + sys-apps/dbus
61 + policykit? ( sys-auth/polkit )
62 +"
63 +
64 +PATCHES=(
65 + "${FILESDIR}/${PN}-235.1-docs.patch"
66 + "${FILESDIR}/${P}-legacy-cgroupmode.patch"
67 + "${FILESDIR}/${P}-drop-logintest.patch" # bug 645156
68 +)
69 +
70 +pkg_setup() {
71 + local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD"
72 +
73 + if use kernel_linux; then
74 + linux-info_pkg_setup
75 + fi
76 +}
77 +
78 +src_prepare() {
79 + default
80 + xdg_environment_reset
81 +}
82 +
83 +src_configure() {
84 + local rccgroupmode="$(grep rc_cgroup_mode /etc/rc.conf | cut -d '"' -f 2)"
85 + local cgroupmode="legacy"
86 +
87 + if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
88 + cgroupmode="hybrid"
89 + elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
90 + cgroupmode="unified"
91 + fi
92 +
93 + local emesonargs=(
94 + -Ddocdir="${EPREFIX}/usr/share/doc/${P}"
95 + -Dhtmldir="${EPREFIX}/usr/share/doc/${P}/html"
96 + -Dpamlibdir=$(getpam_mod_dir)
97 + -Dudevrulesdir="$(get_udevdir)"/rules.d
98 + --libdir="${EPREFIX}"/usr/$(get_libdir)
99 + -Drootlibdir="${EPREFIX}"/$(get_libdir)
100 + -Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind
101 + -Drootprefix="${EPREFIX}/"
102 + -Dsmack=true
103 + -Dman=auto
104 + -Dhtml=$(usex doc auto false)
105 + -Dcgroup-controller=openrc
106 + -Ddefault-hierarchy=${cgroupmode}
107 + -Ddebug=$(usex debug elogind false)
108 + --buildtype $(usex debug debug release)
109 + -Dacl=$(usex acl true false)
110 + -Dpam=$(usex pam true false)
111 + -Dselinux=$(usex selinux true false)
112 + -Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
113 + -Dzsh-completion="${EPREFIX}/usr/share/zsh/site-functions"
114 + -Ddefault-kill-user-processes=false
115 + )
116 +
117 + meson_src_configure
118 +}
119 +
120 +src_install() {
121 + meson_src_install
122 +
123 + newinitd "${FILESDIR}"/${PN}.init ${PN}
124 +
125 + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
126 + newconfd ${PN}.conf ${PN}
127 +}
128 +
129 +pkg_postinst() {
130 + if [[ "$(rc-config list boot | grep elogind)" != "" ]]; then
131 + ewarn "elogind is currently started from boot runlevel."
132 + elif [[ "$(rc-config list default | grep elogind)" != "" ]]; then
133 + ewarn "elogind is currently started from default runlevel."
134 + ewarn "Please remove elogind from the default runlevel and"
135 + ewarn "add it to the boot runlevel by:"
136 + ewarn "# rc-update del elogind default"
137 + ewarn "# rc-update add elogind boot"
138 + else
139 + ewarn "elogind is currently not started from any runlevel."
140 + ewarn "You may add it to the boot runlevel by:"
141 + ewarn "# rc-update add elogind boot"
142 + fi
143 + ewarn "Alternatively you can leave elogind out of any"
144 + ewarn "runlevel. It will then be started automatically"
145 + if use pam; then
146 + ewarn "when the first service calls it via dbus, or the"
147 + ewarn "first user logs into the system."
148 + else
149 + ewarn "when the first service calls it via dbus."
150 + fi
151 +}