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/files/, sys-auth/elogind/
Date: Sun, 02 Feb 2020 16:20:01
Message-Id: 1580660374.d7c361c638b077e177be88f4f70f638ee1fdc570.asturm@gentoo
1 commit: d7c361c638b077e177be88f4f70f638ee1fdc570
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 2 15:20:14 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 2 16:19:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7c361c6
7
8 sys-auth/elogind: 243.4 version bump
9
10 Package-Manager: Portage-2.3.87, Repoman-2.3.20
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 sys-auth/elogind/Manifest | 1 +
14 sys-auth/elogind/elogind-243.4.ebuild | 136 ++++++++++++++++++++++
15 sys-auth/elogind/files/elogind-243.4-nodocs.patch | 29 +++++
16 3 files changed, 166 insertions(+)
17
18 diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
19 index 185a64c4086..c56e12bdaad 100644
20 --- a/sys-auth/elogind/Manifest
21 +++ b/sys-auth/elogind/Manifest
22 @@ -1 +1,2 @@
23 DIST elogind-241.4.tar.gz 1400769 BLAKE2B f1ddf87a6a4e3d06c184ae004d99acbfc1a753d0e5c6d18ff4c10a51b350cee0c14f833aba6f2a2a0f4891ad323868b9a94a3acb8b9eec2e30405b9fa4a09425 SHA512 e1685ac81028eab4a4cf63c7b962ae85f07bc0e39b2562934f863bfdf39417445c432fab5454e7c64b337ab62d95fb69abbe1139464a059a86fb485ed0534ad8
24 +DIST elogind-243.4.tar.gz 1335747 BLAKE2B 37c4eb1c476f97948aed44901fbd61ee1b1b8215d3167b368be00c542c64cdcb8b1e8e2725515820df4542d800079810e95f59469e3c6f5229932e55de4a3c1f SHA512 9751a3d0ed65dd73d9363097ee1752d437d5636db2a4137395596e0c81e04d4715f314568d1d7c6f367f1ecbda011086cb165bd4dc207302626b16e693cd0a02
25
26 diff --git a/sys-auth/elogind/elogind-243.4.ebuild b/sys-auth/elogind/elogind-243.4.ebuild
27 new file mode 100644
28 index 00000000000..ec495cedb70
29 --- /dev/null
30 +++ b/sys-auth/elogind/elogind-243.4.ebuild
31 @@ -0,0 +1,136 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +if [[ ${PV} = *9999* ]]; then
38 + EGIT_BRANCH="v241-stable"
39 + EGIT_REPO_URI="https://github.com/elogind/elogind.git"
40 + inherit git-r3
41 +else
42 + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
44 +fi
45 +
46 +inherit linux-info meson pam udev xdg-utils
47 +
48 +DESCRIPTION="The systemd project's logind, extracted to a standalone package"
49 +HOMEPAGE="https://github.com/elogind/elogind"
50 +
51 +LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
52 +SLOT="0"
53 +IUSE="+acl debug doc +pam +policykit selinux"
54 +
55 +BDEPEND="
56 + app-text/docbook-xml-dtd:4.2
57 + app-text/docbook-xml-dtd:4.5
58 + app-text/docbook-xsl-stylesheets
59 + dev-util/gperf
60 + dev-util/intltool
61 + virtual/pkgconfig
62 +"
63 +DEPEND="
64 + sys-apps/util-linux
65 + sys-libs/libcap
66 + virtual/libudev:=
67 + acl? ( sys-apps/acl )
68 + pam? ( sys-libs/pam )
69 + selinux? ( sys-libs/libselinux )
70 +"
71 +RDEPEND="${DEPEND}
72 + !sys-apps/systemd
73 +"
74 +PDEPEND="
75 + sys-apps/dbus
76 + policykit? ( sys-auth/polkit )
77 +"
78 +
79 +DOCS=( README.md src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
80 +
81 +PATCHES=(
82 + "${FILESDIR}/${P}-nodocs.patch"
83 + "${FILESDIR}/${PN}-241.4-broken-test.patch" # bug 699116
84 +)
85 +
86 +pkg_setup() {
87 + local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD"
88 +
89 + use kernel_linux && linux-info_pkg_setup
90 +}
91 +
92 +src_prepare() {
93 + default
94 + xdg_environment_reset
95 +}
96 +
97 +src_configure() {
98 + local rccgroupmode="$(grep rc_cgroup_mode ${EPREFIX}/etc/rc.conf | cut -d '"' -f 2)"
99 + local cgroupmode="legacy"
100 +
101 + if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
102 + cgroupmode="hybrid"
103 + elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
104 + cgroupmode="unified"
105 + fi
106 +
107 + local emesonargs=(
108 + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
109 + -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
110 + -Dpamlibdir=$(getpam_mod_dir)
111 + -Dudevrulesdir="${EPREFIX}$(get_udevdir)"/rules.d
112 + --libdir="${EPREFIX}"/usr/$(get_libdir)
113 + -Drootlibdir="${EPREFIX}"/$(get_libdir)
114 + -Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind
115 + -Drootprefix="${EPREFIX}/"
116 + -Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
117 + -Dman=auto
118 + -Dsmack=true
119 + -Dcgroup-controller=openrc
120 + -Ddefault-hierarchy=${cgroupmode}
121 + -Ddefault-kill-user-processes=false
122 + -Dacl=$(usex acl true false)
123 + --buildtype $(usex debug debug release)
124 + -Dhtml=$(usex doc auto false)
125 + -Dpam=$(usex pam true false)
126 + -Dselinux=$(usex selinux true false)
127 + -Dutmp=$(usex elibc_musl false true)
128 + )
129 +
130 + meson_src_configure
131 +}
132 +
133 +src_install() {
134 + DOCS+=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
135 +
136 + meson_src_install
137 +
138 + newinitd "${FILESDIR}"/${PN}.init ${PN}
139 +
140 + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
141 + newconfd ${PN}.conf ${PN}
142 +}
143 +
144 +pkg_postinst() {
145 + if [[ "$(rc-config list boot | grep elogind)" != "" ]]; then
146 + elog "elogind is currently started from boot runlevel."
147 + elif [[ "$(rc-config list default | grep elogind)" != "" ]]; then
148 + ewarn "elogind is currently started from default runlevel."
149 + ewarn "Please remove elogind from the default runlevel and"
150 + ewarn "add it to the boot runlevel by:"
151 + ewarn "# rc-update del elogind default"
152 + ewarn "# rc-update add elogind boot"
153 + else
154 + elog "elogind is currently not started from any runlevel."
155 + elog "You may add it to the boot runlevel by:"
156 + elog "# rc-update add elogind boot"
157 + elog
158 + elog "Alternatively, you can leave elogind out of any"
159 + elog "runlevel. It will then be started automatically"
160 + if use pam; then
161 + elog "when the first service calls it via dbus, or"
162 + elog "the first user logs into the system."
163 + else
164 + elog "when the first service calls it via dbus."
165 + fi
166 + fi
167 +}
168
169 diff --git a/sys-auth/elogind/files/elogind-243.4-nodocs.patch b/sys-auth/elogind/files/elogind-243.4-nodocs.patch
170 new file mode 100644
171 index 00000000000..c83611a4ef6
172 --- /dev/null
173 +++ b/sys-auth/elogind/files/elogind-243.4-nodocs.patch
174 @@ -0,0 +1,29 @@
175 +We don't want the build system to install to docdir for us.
176 +
177 +--- a/meson.build 2020-01-20 08:22:09.000000000 +0100
178 ++++ b/meson.build 2020-02-02 16:16:00.074882830 +0100
179 +@@ -3342,15 +3342,11 @@
180 + # install_data('modprobe.d/systemd.conf',
181 + # install_dir : modprobedir)
182 + #endif // 0
183 +-install_data('LICENSE.GPL2',
184 +- 'LICENSE.LGPL2.1',
185 + #if 0 /// elogind has upgraded to markdown, and the NEWS file is useless
186 + # 'NEWS',
187 + # 'README',
188 + #else
189 +- 'README.md',
190 + #endif // 0
191 +- 'docs/CODING_STYLE.md',
192 + #if 0 /// irrelevant for elogind
193 + # 'docs/DISTRO_PORTING.md',
194 + # 'docs/ENVIRONMENT.md',
195 +@@ -3359,8 +3355,6 @@
196 + # 'docs/TRANSLATORS.md',
197 + # 'docs/UIDS-GIDS.md',
198 + #endif // 0
199 +- 'src/libelogind/sd-bus/GVARIANT-SERIALIZATION',
200 +- install_dir : docdir)
201 +
202 + #if 0 /// UNNEEDED by elogind
203 + # meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))