public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2017-11-02  1:20 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-11-02  1:20 UTC (permalink / raw
  To: gentoo-commits

commit:     1c0278510e8dcd758d30a6b70655a9d065b690d9
Author:     Bjorn Pagen <bjornpagen <AT> gmail <DOT> com>
AuthorDate: Wed Nov  1 00:04:01 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Nov  2 01:19:51 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=1c027851

added sys-auth/elogind

 sys-auth/elogind/Manifest                       |   4 +
 sys-auth/elogind/elogind-234.4.ebuild           | 106 ++++++++++++++++++++++++
 sys-auth/elogind/files/elogind-226.4-docs.patch |  15 ++++
 sys-auth/elogind/files/elogind-fix-musl.patch   |  38 +++++++++
 4 files changed, 163 insertions(+)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
new file mode 100644
index 0000000..a1dd510
--- /dev/null
+++ b/sys-auth/elogind/Manifest
@@ -0,0 +1,4 @@
+AUX elogind-226.4-docs.patch 355 SHA256 4fa3a1aa38a9ba23cd023a3ace11c4c8155ee856a6cd7f228ac65cd921629b24 SHA512 dc942f190ea2064e194808db7c6ede618d536778f1b574658ddb9c0aa4a106f6129cc18000eaa63aeca1b16ad28fe5f5dbee441bd93436ae62eb4740236f94ae WHIRLPOOL 45bdbbaa103b6bf94a0e3544978eb1ea0a942162711227f8c9c17f1c606d15d1e1e44f898635b26c80bf96d662c612daf59aed007aa57744baed574b20861a38
+AUX elogind-fix-musl.patch 934 SHA256 f1e62001228991fab4b5f3703cbb31933d749010c5ef8c3321d14b0032422b53 SHA512 3d07799d6e13c1c5499e9079d4b35141e3deac0d9bf23c5a999687e233de774c0cfa41d3ecbf0b41950672b443cf6e17a9b3e46f7ef495683af04d34b7c2e49b WHIRLPOOL 922eb5dcf1e0de1a80359e7bb6890ec5f646ab59f6b3cadbc6a8f51cd5256ef6bb2c876d519fae1664c1851017e6a5803e0162372340d3da0149f9931fbfa06a
+DIST elogind-234.4.tar.gz 973370 SHA256 ffb465a62c4281c19b07eb7fbb9ad0987f3b726ae1a868a92a3144d7714542f3 SHA512 2df4fa318074d4f5e5dbba353cf817068a2703ffed40cdeae4cba2dea4ee143d1c5fc076b19419f1c4299392088c2c14b430d8aa1ded03b62117311802305d5e WHIRLPOOL 1b735338cb02ef8cffb5837a0702110117ae1d677a4cbf106180c549485f7fb0604f3134e6ff5e14b23485ddfe4d4415a41e69d93b8f099cee41a220d0ea4a69
+EBUILD elogind-234.4.ebuild 2858 SHA256 d29413423f2f3b3e7eb5cf7b0171eda8e5a3e12d37af0ac0193e8669a5a47cf6 SHA512 3a5f1f51da798b6954619ddc50f5a32ef2bc8a82610f6b5d6e62813e2f673fb322a7dd89a231f00429f4ef0b142a1244df6d622922efb1a0f6802a9e1bad6caf WHIRLPOOL 254ec63617f1115e538947a123543f7382b4684879779fa43c524f0b7a15fb2c6db4335a81a4e364573401a33f9f8412d156813a601f632fa6b763fea5155436

diff --git a/sys-auth/elogind/elogind-234.4.ebuild b/sys-auth/elogind/elogind-234.4.ebuild
new file mode 100644
index 0000000..5125162
--- /dev/null
+++ b/sys-auth/elogind/elogind-234.4.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info pam udev
+
+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 pam policykit selinux"
+
+RDEPEND="
+	sys-apps/util-linux
+	sys-libs/libcap
+	virtual/libudev:=
+	acl? ( sys-apps/acl )
+	pam? ( virtual/pam )
+	selinux? ( sys-libs/libselinux )
+	!sys-apps/systemd
+"
+DEPEND="${RDEPEND}
+	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
+"
+PDEPEND="
+	sys-apps/dbus
+	policykit? ( sys-auth/polkit )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-226.4-docs.patch" )
+
+pkg_setup() {
+	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK
+		~SIGNALFD ~TIMERFD"
+
+	if use kernel_linux; then
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+	eapply "${FILESDIR}/${PN}-fix-musl.patch"
+	eautoreconf # Makefile.am patched by "${FILESDIR}/${P}-docs.patch"
+}
+
+src_configure() {
+	econf \
+		--with-pamlibdir=$(getpam_mod_dir) \
+		--with-udevrulesdir="$(get_udevdir)"/rules.d \
+		--libdir="${EPREFIX}"/usr/$(get_libdir) \
+		--with-rootlibdir="${EPREFIX}"/$(get_libdir) \
+		--with-rootprefix="${EPREFIX}/" \
+		--with-rootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind \
+		--enable-smack \
+		--with-cgroup-controller=openrc \
+		--disable-lto \
+		$(use_enable debug debug elogind) \
+		$(use_enable acl) \
+		$(use_enable pam) \
+		$(use_enable selinux)
+}
+
+src_install() {
+	default
+	find "${D}" -name '*.la' -delete || die
+
+	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-226.4-docs.patch b/sys-auth/elogind/files/elogind-226.4-docs.patch
new file mode 100644
index 0000000..4161f63
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-226.4-docs.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.am	2017-02-16 13:22:56.764985896 +0100
++++ b/Makefile.am	2017-02-16 13:23:04.998986057 +0100
+@@ -194,12 +194,6 @@
+ bin_PROGRAMS =
+ rootlibexec_PROGRAMS =
+ 
+-dist_doc_DATA = \
+-	README \
+-	NEWS \
+-	LICENSE.LGPL2.1 \
+-	LICENSE.GPL2
+-
+ @INTLTOOL_POLICY_RULE@
+ 
+ # ------------------------------------------------------------------------------

diff --git a/sys-auth/elogind/files/elogind-fix-musl.patch b/sys-auth/elogind/files/elogind-fix-musl.patch
new file mode 100644
index 0000000..4aba103
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-fix-musl.patch
@@ -0,0 +1,38 @@
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -22,6 +22,16 @@
+ #include "macro.h"
+ #include "string-util.h"
+ 
++#define strndupa(s, n) \
++	({ \
++	  const char *__in = (s);			\
++	  size_t __len = strnlen(__in, (n));		\
++	  char *__out = (char *)alloca(__len + 1);	\
++	  __out[__len] = '\0';				\
++	  (char *)memcpy(__out, __in, __len);		\
++	})
++
++
+ static void test_hexchar(void) {
+         assert_se(hexchar(0xa) == 'a');
+         assert_se(hexchar(0x0) == '0');
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -48,8 +48,6 @@
+         info(unsigned);
+         info(long unsigned);
+         info(long long unsigned);
+-        info(__syscall_ulong_t);
+-        info(__syscall_slong_t);
+ 
+         info(float);
+         info(double);
+@@ -59,7 +57,6 @@
+         info(ssize_t);
+         info(time_t);
+         info(usec_t);
+-        info(__time_t);
+ 
+         info(enum Enum);
+         info(enum BigEnum);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2017-11-12 12:52 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-11-12 12:52 UTC (permalink / raw
  To: gentoo-commits

commit:     8abf8a0bd7cfaba8d93e073b047d06e8f856c231
Author:     Bjorn Pagen <bjornpagen <AT> gmail <DOT> com>
AuthorDate: Sun Nov 12 09:21:09 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Nov 12 12:51:30 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=8abf8a0b

sys-auth/elogind: fix elogind oops

 sys-auth/elogind/Manifest              |  3 +++
 sys-auth/elogind/files/elogind.conf    |  8 ++++++++
 sys-auth/elogind/files/elogind.conf.in |  7 +++++++
 sys-auth/elogind/files/elogind.init    | 25 +++++++++++++++++++++++++
 4 files changed, 43 insertions(+)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
index 86b5a15..3f9de92 100644
--- a/sys-auth/elogind/Manifest
+++ b/sys-auth/elogind/Manifest
@@ -1,5 +1,8 @@
 AUX elogind-226.4-docs.patch 355 SHA256 4fa3a1aa38a9ba23cd023a3ace11c4c8155ee856a6cd7f228ac65cd921629b24 SHA512 dc942f190ea2064e194808db7c6ede618d536778f1b574658ddb9c0aa4a106f6129cc18000eaa63aeca1b16ad28fe5f5dbee441bd93436ae62eb4740236f94ae WHIRLPOOL 45bdbbaa103b6bf94a0e3544978eb1ea0a942162711227f8c9c17f1c606d15d1e1e44f898635b26c80bf96d662c612daf59aed007aa57744baed574b20861a38
 AUX elogind-fix-musl.patch 934 SHA256 f1e62001228991fab4b5f3703cbb31933d749010c5ef8c3321d14b0032422b53 SHA512 3d07799d6e13c1c5499e9079d4b35141e3deac0d9bf23c5a999687e233de774c0cfa41d3ecbf0b41950672b443cf6e17a9b3e46f7ef495683af04d34b7c2e49b WHIRLPOOL 922eb5dcf1e0de1a80359e7bb6890ec5f646ab59f6b3cadbc6a8f51cd5256ef6bb2c876d519fae1664c1851017e6a5803e0162372340d3da0149f9931fbfa06a
+AUX elogind.conf 226 SHA256 59ecf16540075638607192f44b384d5f1b57e6f5b1ec0ec3f32ea39835a06f1b SHA512 dc47d57ceae149757296770bc9c5e40054ba8db3d77c451d793f5873e17214fbb59bf197c84f91d8aca76805b70e9f92a2417678606c9d6e59258d3dd03b38f1 WHIRLPOOL ab90da66148f9b05fab944c5b515ed7a4bbb5822552ecfc17d8df749d06c25f3e1ceaad02a7b8ff8ec50c178bc92e9afb1c1d34177ab224d7b8a345d0c5cc329
+AUX elogind.conf.in 218 SHA256 ed2b6b9c659d7661cba043fefe38aa5c7d7c910fc50060c6a4be0ef5b75b7376 SHA512 2c62ab28d7db9cd52489069f80363159000385a25dd7f2afe5a03598a0b7a1f61af7c18df71f6286e72f5966e55b62a4029e30cb786dd813bb201b9e20adccd7 WHIRLPOOL df40c41e4f7e2bbc0ff7d89b88fccb0e02fceb404b4814fbc32f526eb9ac455409782f02c7a30bd737f6f6b171a6140dae7befb20d4f571250fae3b3320e37f6
+AUX elogind.init 490 SHA256 982423a88eea889c194123ecffbdea03d8f94ca497b7b32bd86fdf20a81680c7 SHA512 60fe1cb55ec0f605f06fb3744a0300accebfc14c4ecd24b7db2e8b0cb1537e816a4a4ccbc4b2eeac45e2f3ca8942dd10d24bdcd814cccbc2ceed198b2657238a WHIRLPOOL 1b9e244c46e021855688bcc5295cc897a988864c8954cd794726e0d77dba5665e43e96c7a297402b9562c7b6a33c2299e6471fadff45f098baed031cc3f60dec
 DIST elogind-234.4.tar.gz 973370 SHA256 ffb465a62c4281c19b07eb7fbb9ad0987f3b726ae1a868a92a3144d7714542f3 SHA512 2df4fa318074d4f5e5dbba353cf817068a2703ffed40cdeae4cba2dea4ee143d1c5fc076b19419f1c4299392088c2c14b430d8aa1ded03b62117311802305d5e WHIRLPOOL 1b735338cb02ef8cffb5837a0702110117ae1d677a4cbf106180c549485f7fb0604f3134e6ff5e14b23485ddfe4d4415a41e69d93b8f099cee41a220d0ea4a69
 EBUILD elogind-234.4.ebuild 2858 SHA256 d29413423f2f3b3e7eb5cf7b0171eda8e5a3e12d37af0ac0193e8669a5a47cf6 SHA512 3a5f1f51da798b6954619ddc50f5a32ef2bc8a82610f6b5d6e62813e2f673fb322a7dd89a231f00429f4ef0b142a1244df6d622922efb1a0f6802a9e1bad6caf WHIRLPOOL 254ec63617f1115e538947a123543f7382b4684879779fa43c524f0b7a15fb2c6db4335a81a4e364573401a33f9f8412d156813a601f632fa6b763fea5155436
 MISC metadata.xml 379 SHA256 c55fc88944b52a1d166e136a6b9a6e9e2f0c9b955e23f1d1c8d7f0d45a44a742 SHA512 30be0eb7903ffb83d9e24fbcacc8db09c0f8cd7187df5f75b2c12fb5cfae1110d52f29aba502ea92af53df02451cc40e0f3789382f87a16bd281f06e9cad6c68 WHIRLPOOL 11ff30511856a1ec0891654e0fea4e501e85c7e547069fd23f18f54fc50cc830b7da48633e5ee9afa5b968eb2b1dd473b3e6d849bf6af001e50ee77844a85605

diff --git a/sys-auth/elogind/files/elogind.conf b/sys-auth/elogind/files/elogind.conf
new file mode 100644
index 0000000..b66a158
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/usr/libexec/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/var/run/elogind.pid"
+

diff --git a/sys-auth/elogind/files/elogind.conf.in b/sys-auth/elogind/files/elogind.conf.in
new file mode 100644
index 0000000..7b05b35
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf.in
@@ -0,0 +1,7 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/@libdir@/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/run/elogind.pid"

diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
new file mode 100644
index 0000000..019c3af
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need dbus
+
+	# Make sure elogind is up before xdm starts any dm
+	before xdm
+}
+
+start() {
+	ebegin "Starting elogind"
+
+	start-stop-daemon --start --quiet \
+		--pidfile "${ELOGIND_PIDFILE}" \
+		--exec "${ELOGIND_EXEC}" -- --daemon
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping elogind"
+	start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+	eend $?
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2019-04-05  0:13 Jory Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Jory Pratt @ 2019-04-05  0:13 UTC (permalink / raw
  To: gentoo-commits

commit:     8af5d3267ae4593548c172a92863a4a20ab2ddd3
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  5 00:13:44 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 00:13:44 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=8af5d326

sys-auth/elogind: update to 239.4 wich is working on musl

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 sys-auth/elogind/Manifest                          |   2 +-
 sys-auth/elogind/elogind-234.4.ebuild              | 106 -----------------
 sys-auth/elogind/elogind-239.4.ebuild              | 131 +++++++++++++++++++++
 sys-auth/elogind/files/elogind-226.4-docs.patch    |  15 ---
 sys-auth/elogind/files/elogind-238.1-docs.patch    |  23 ++++
 sys-auth/elogind/files/elogind-239-fix-musl.patch  |  33 ++++++
 .../elogind/files/elogind-239.3-broken-test.patch  |  23 ++++
 sys-auth/elogind/files/elogind-fix-musl.patch      |  38 ------
 sys-auth/elogind/files/elogind.conf                |   8 --
 9 files changed, 211 insertions(+), 168 deletions(-)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
index 9628a6a..e7890c5 100644
--- a/sys-auth/elogind/Manifest
+++ b/sys-auth/elogind/Manifest
@@ -1 +1 @@
-DIST elogind-234.4.tar.gz 973370 SHA256 ffb465a62c4281c19b07eb7fbb9ad0987f3b726ae1a868a92a3144d7714542f3 SHA512 2df4fa318074d4f5e5dbba353cf817068a2703ffed40cdeae4cba2dea4ee143d1c5fc076b19419f1c4299392088c2c14b430d8aa1ded03b62117311802305d5e WHIRLPOOL 1b735338cb02ef8cffb5837a0702110117ae1d677a4cbf106180c549485f7fb0604f3134e6ff5e14b23485ddfe4d4415a41e69d93b8f099cee41a220d0ea4a69
+DIST elogind-239.4.tar.gz 1183999 BLAKE2B 3a0aa216ee565ae8f3311b16af9752a99519254ac8737de2a44821e95d05b3e2d8b82af3d397367e8804d7bc45cb942859516f195848ba0317aa73891d77903b SHA512 84e9765d7c3039478b06a683870b37ec718724f1185b56c1b74885133283ad1678f3ca8a73510cb4b0777d099c54f59e927caaae7ae988abda803150b84cf8fc

diff --git a/sys-auth/elogind/elogind-234.4.ebuild b/sys-auth/elogind/elogind-234.4.ebuild
deleted file mode 100644
index 96d5c75..0000000
--- a/sys-auth/elogind/elogind-234.4.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools linux-info pam udev
-
-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 ~arm64 ~x86"
-IUSE="acl debug pam policykit selinux"
-
-RDEPEND="
-	sys-apps/util-linux
-	sys-libs/libcap
-	virtual/libudev:=
-	acl? ( sys-apps/acl )
-	pam? ( virtual/pam )
-	selinux? ( sys-libs/libselinux )
-	!sys-apps/systemd
-"
-DEPEND="${RDEPEND}
-	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
-"
-PDEPEND="
-	sys-apps/dbus
-	policykit? ( sys-auth/polkit )
-"
-
-PATCHES=( "${FILESDIR}/${PN}-226.4-docs.patch" )
-
-pkg_setup() {
-	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK
-		~SIGNALFD ~TIMERFD"
-
-	if use kernel_linux; then
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-	eapply "${FILESDIR}/${PN}-fix-musl.patch"
-	eautoreconf # Makefile.am patched by "${FILESDIR}/${P}-docs.patch"
-}
-
-src_configure() {
-	econf \
-		--with-pamlibdir=$(getpam_mod_dir) \
-		--with-udevrulesdir="$(get_udevdir)"/rules.d \
-		--libdir="${EPREFIX}"/usr/$(get_libdir) \
-		--with-rootlibdir="${EPREFIX}"/$(get_libdir) \
-		--with-rootprefix="${EPREFIX}/" \
-		--with-rootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind \
-		--enable-smack \
-		--with-cgroup-controller=openrc \
-		--disable-lto \
-		$(use_enable debug debug elogind) \
-		$(use_enable acl) \
-		$(use_enable pam) \
-		$(use_enable selinux)
-}
-
-src_install() {
-	default
-	find "${D}" -name '*.la' -delete || die
-
-	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/elogind-239.4.ebuild b/sys-auth/elogind/elogind-239.4.ebuild
new file mode 100644
index 0000000..2412d11
--- /dev/null
+++ b/sys-auth/elogind/elogind-239.4.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2019 Gentoo Authors
+# 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 ~arm64 ~ppc ~ppc64 ~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 )
+"
+
+DOCS=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
+
+PATCHES=(
+	"${FILESDIR}/${PN}-238.1-docs.patch"
+	"${FILESDIR}/${PN}-239.3-broken-test.patch" # bug 669862
+	"${FILESDIR}/${PN}-239-fix-musl.patch"
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD"
+
+	use kernel_linux && linux-info_pkg_setup
+}
+
+src_prepare() {
+	default
+	xdg_environment_reset
+}
+
+src_configure() {
+	local rccgroupmode="$(grep rc_cgroup_mode /etc/rc.conf | cut -d '"' -f 2)"
+	local cgroupmode="legacy"
+
+	if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
+		cgroupmode="hybrid"
+	elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
+		cgroupmode="unified"
+	fi
+
+	local emesonargs=(
+		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+		-Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/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}/"
+		-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)
+		--buildtype $(usex debug debug release)
+		-Dhtml=$(usex doc auto false)
+		-Dpam=$(usex pam true false)
+		-Dselinux=$(usex selinux true false)
+		-Dutmp=$(usex elibc_musl false true)
+	)
+
+	meson_src_configure
+}
+
+src_install() {
+	DOCS+=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
+
+	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
+		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
+}

diff --git a/sys-auth/elogind/files/elogind-226.4-docs.patch b/sys-auth/elogind/files/elogind-226.4-docs.patch
deleted file mode 100644
index 4161f63..0000000
--- a/sys-auth/elogind/files/elogind-226.4-docs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/Makefile.am	2017-02-16 13:22:56.764985896 +0100
-+++ b/Makefile.am	2017-02-16 13:23:04.998986057 +0100
-@@ -194,12 +194,6 @@
- bin_PROGRAMS =
- rootlibexec_PROGRAMS =
- 
--dist_doc_DATA = \
--	README \
--	NEWS \
--	LICENSE.LGPL2.1 \
--	LICENSE.GPL2
--
- @INTLTOOL_POLICY_RULE@
- 
- # ------------------------------------------------------------------------------

diff --git a/sys-auth/elogind/files/elogind-238.1-docs.patch b/sys-auth/elogind/files/elogind-238.1-docs.patch
new file mode 100644
index 0000000..2288ddf
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-238.1-docs.patch
@@ -0,0 +1,23 @@
+--- a/meson.build	2018-06-25 16:41:00.000000000 +0200
++++ b/meson.build	2018-06-30 21:45:52.139755680 +0200
+@@ -2928,11 +2928,6 @@
+ # install_data('modprobe.d/systemd.conf',
+ #              install_dir : modprobedir)
+ #endif // 0
+-install_data('LICENSE.GPL2',
+-             'LICENSE.LGPL2.1',
+-             'NEWS',
+-             'README',
+-             'doc/CODING_STYLE',
+ #if 0 /// irrelevant for elogind
+ #              'doc/DISTRO_PORTING',
+ #              'doc/ENVIRONMENT.md',
+@@ -2941,8 +2936,6 @@
+ #              'doc/TRANSLATORS',
+ #              'doc/UIDS-GIDS.md',
+ #endif // 0
+-             'src/libelogind/sd-bus/GVARIANT-SERIALIZATION',
+-             install_dir : docdir)
+ 
+ #if 0 /// UNNEEDED by elogind
+ # meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))

diff --git a/sys-auth/elogind/files/elogind-239-fix-musl.patch b/sys-auth/elogind/files/elogind-239-fix-musl.patch
new file mode 100644
index 0000000..ae9442f
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-239-fix-musl.patch
@@ -0,0 +1,33 @@
+From 347c5bb22f8f79f339e578e30a19fed15e7f3e09 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Thu, 4 Apr 2019 18:59:18 -0500
+Subject: [PATCH] fix musl libc compile
+
+---
+ src/test/test-hexdecoct.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index 101a78b..dc4e09b 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -10,6 +10,16 @@
+ /// Additional includes needed by elogind
+ #include "musl_missing.h"
+ 
++#define strndupa(s, n) \
++	({ \
++	  const char *__in = (s);			\
++	  size_t __len = strnlen(__in, (n));		\
++	  char *__out = (char *)alloca(__len + 1);	\
++	  __out[__len] = '\0';				\
++	  (char *)memcpy(__out, __in, __len);		\
++	})
++
++
+ static void test_hexchar(void) {
+         assert_se(hexchar(0xa) == 'a');
+         assert_se(hexchar(0x0) == '0');
+-- 
+2.21.0
+

diff --git a/sys-auth/elogind/files/elogind-239.3-broken-test.patch b/sys-auth/elogind/files/elogind-239.3-broken-test.patch
new file mode 100644
index 0000000..601d1cb
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-239.3-broken-test.patch
@@ -0,0 +1,23 @@
+--- a/src/test/meson.build	2018-12-07 07:36:50.000000000 +0100
++++ b/src/test/meson.build	2019-02-15 00:50:23.254064681 +0100
+@@ -947,13 +947,13 @@
+ #         [['src/libsystemd/sd-resolve/test-resolve.c'],
+ #          [],
+ #          [threads]],
+-#endif // 0
+-
+-        [['src/libelogind/sd-login/test-login.c'],
+-         [],
+-         []],
+-
+-#if 0 /// UNNEEDED in elogind
++#
++#
++#        [['src/libelogind/sd-login/test-login.c'],
++#         [],
++#         []],
++#
++#
+ #         [['src/libsystemd/sd-device/test-udev-device-thread.c'],
+ #          [libbasic,
+ #           libshared_static,

diff --git a/sys-auth/elogind/files/elogind-fix-musl.patch b/sys-auth/elogind/files/elogind-fix-musl.patch
deleted file mode 100644
index 4aba103..0000000
--- a/sys-auth/elogind/files/elogind-fix-musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/src/test/test-hexdecoct.c
-+++ b/src/test/test-hexdecoct.c
-@@ -22,6 +22,16 @@
- #include "macro.h"
- #include "string-util.h"
- 
-+#define strndupa(s, n) \
-+	({ \
-+	  const char *__in = (s);			\
-+	  size_t __len = strnlen(__in, (n));		\
-+	  char *__out = (char *)alloca(__len + 1);	\
-+	  __out[__len] = '\0';				\
-+	  (char *)memcpy(__out, __in, __len);		\
-+	})
-+
-+
- static void test_hexchar(void) {
-         assert_se(hexchar(0xa) == 'a');
-         assert_se(hexchar(0x0) == '0');
---- a/src/test/test-sizeof.c
-+++ b/src/test/test-sizeof.c
-@@ -48,8 +48,6 @@
-         info(unsigned);
-         info(long unsigned);
-         info(long long unsigned);
--        info(__syscall_ulong_t);
--        info(__syscall_slong_t);
- 
-         info(float);
-         info(double);
-@@ -59,7 +57,6 @@
-         info(ssize_t);
-         info(time_t);
-         info(usec_t);
--        info(__time_t);
- 
-         info(enum Enum);
-         info(enum BigEnum);

diff --git a/sys-auth/elogind/files/elogind.conf b/sys-auth/elogind/files/elogind.conf
deleted file mode 100644
index b66a158..0000000
--- a/sys-auth/elogind/files/elogind.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/conf.d/elogind: config file for /etc/init.d/elogind
-
-# this is the elogind executable
-ELOGIND_EXEC="/usr/libexec/elogind/elogind"
-
-# this is where elogind will store its pid file
-ELOGIND_PIDFILE="/var/run/elogind.pid"
-


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2019-04-18 21:01 Jory Pratt
  0 siblings, 0 replies; 6+ messages in thread
From: Jory Pratt @ 2019-04-18 21:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9057585df5e2dd8a3e9ac28dea580e5a3fc55de4
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 18 21:01:11 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Thu Apr 18 21:01:11 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=9057585d

sys-auth/elogind: use in tree 241.2 which is fully supported

Package-Manager: Portage-2.3.63, Repoman-2.3.12
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 sys-auth/elogind/Manifest                          |   1 -
 sys-auth/elogind/elogind-239.4.ebuild              | 131 ---------------------
 sys-auth/elogind/files/elogind-238.1-docs.patch    |  23 ----
 sys-auth/elogind/files/elogind-239-fix-musl.patch  |  33 ------
 .../elogind/files/elogind-239.3-broken-test.patch  |  23 ----
 sys-auth/elogind/files/elogind.conf.in             |   7 --
 sys-auth/elogind/files/elogind.init                |  25 ----
 sys-auth/elogind/metadata.xml                      |  13 --
 8 files changed, 256 deletions(-)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
deleted file mode 100644
index e7890c5..0000000
--- a/sys-auth/elogind/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST elogind-239.4.tar.gz 1183999 BLAKE2B 3a0aa216ee565ae8f3311b16af9752a99519254ac8737de2a44821e95d05b3e2d8b82af3d397367e8804d7bc45cb942859516f195848ba0317aa73891d77903b SHA512 84e9765d7c3039478b06a683870b37ec718724f1185b56c1b74885133283ad1678f3ca8a73510cb4b0777d099c54f59e927caaae7ae988abda803150b84cf8fc

diff --git a/sys-auth/elogind/elogind-239.4.ebuild b/sys-auth/elogind/elogind-239.4.ebuild
deleted file mode 100644
index 2412d11..0000000
--- a/sys-auth/elogind/elogind-239.4.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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 ~arm64 ~ppc ~ppc64 ~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 )
-"
-
-DOCS=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
-
-PATCHES=(
-	"${FILESDIR}/${PN}-238.1-docs.patch"
-	"${FILESDIR}/${PN}-239.3-broken-test.patch" # bug 669862
-	"${FILESDIR}/${PN}-239-fix-musl.patch"
-)
-
-pkg_setup() {
-	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SIGNALFD ~TIMERFD"
-
-	use kernel_linux && linux-info_pkg_setup
-}
-
-src_prepare() {
-	default
-	xdg_environment_reset
-}
-
-src_configure() {
-	local rccgroupmode="$(grep rc_cgroup_mode /etc/rc.conf | cut -d '"' -f 2)"
-	local cgroupmode="legacy"
-
-	if [[ "xhybrid" = "x${rccgroupmode}" ]] ; then
-		cgroupmode="hybrid"
-	elif [[ "xunified" = "x${rccgroupmode}" ]] ; then
-		cgroupmode="unified"
-	fi
-
-	local emesonargs=(
-		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
-		-Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/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}/"
-		-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)
-		--buildtype $(usex debug debug release)
-		-Dhtml=$(usex doc auto false)
-		-Dpam=$(usex pam true false)
-		-Dselinux=$(usex selinux true false)
-		-Dutmp=$(usex elibc_musl false true)
-	)
-
-	meson_src_configure
-}
-
-src_install() {
-	DOCS+=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
-
-	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
-		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
-}

diff --git a/sys-auth/elogind/files/elogind-238.1-docs.patch b/sys-auth/elogind/files/elogind-238.1-docs.patch
deleted file mode 100644
index 2288ddf..0000000
--- a/sys-auth/elogind/files/elogind-238.1-docs.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/meson.build	2018-06-25 16:41:00.000000000 +0200
-+++ b/meson.build	2018-06-30 21:45:52.139755680 +0200
-@@ -2928,11 +2928,6 @@
- # install_data('modprobe.d/systemd.conf',
- #              install_dir : modprobedir)
- #endif // 0
--install_data('LICENSE.GPL2',
--             'LICENSE.LGPL2.1',
--             'NEWS',
--             'README',
--             'doc/CODING_STYLE',
- #if 0 /// irrelevant for elogind
- #              'doc/DISTRO_PORTING',
- #              'doc/ENVIRONMENT.md',
-@@ -2941,8 +2936,6 @@
- #              'doc/TRANSLATORS',
- #              'doc/UIDS-GIDS.md',
- #endif // 0
--             'src/libelogind/sd-bus/GVARIANT-SERIALIZATION',
--             install_dir : docdir)
- 
- #if 0 /// UNNEEDED by elogind
- # meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))

diff --git a/sys-auth/elogind/files/elogind-239-fix-musl.patch b/sys-auth/elogind/files/elogind-239-fix-musl.patch
deleted file mode 100644
index ae9442f..0000000
--- a/sys-auth/elogind/files/elogind-239-fix-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 347c5bb22f8f79f339e578e30a19fed15e7f3e09 Mon Sep 17 00:00:00 2001
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Thu, 4 Apr 2019 18:59:18 -0500
-Subject: [PATCH] fix musl libc compile
-
----
- src/test/test-hexdecoct.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index 101a78b..dc4e09b 100644
---- a/src/test/test-hexdecoct.c
-+++ b/src/test/test-hexdecoct.c
-@@ -10,6 +10,16 @@
- /// Additional includes needed by elogind
- #include "musl_missing.h"
- 
-+#define strndupa(s, n) \
-+	({ \
-+	  const char *__in = (s);			\
-+	  size_t __len = strnlen(__in, (n));		\
-+	  char *__out = (char *)alloca(__len + 1);	\
-+	  __out[__len] = '\0';				\
-+	  (char *)memcpy(__out, __in, __len);		\
-+	})
-+
-+
- static void test_hexchar(void) {
-         assert_se(hexchar(0xa) == 'a');
-         assert_se(hexchar(0x0) == '0');
--- 
-2.21.0
-

diff --git a/sys-auth/elogind/files/elogind-239.3-broken-test.patch b/sys-auth/elogind/files/elogind-239.3-broken-test.patch
deleted file mode 100644
index 601d1cb..0000000
--- a/sys-auth/elogind/files/elogind-239.3-broken-test.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/src/test/meson.build	2018-12-07 07:36:50.000000000 +0100
-+++ b/src/test/meson.build	2019-02-15 00:50:23.254064681 +0100
-@@ -947,13 +947,13 @@
- #         [['src/libsystemd/sd-resolve/test-resolve.c'],
- #          [],
- #          [threads]],
--#endif // 0
--
--        [['src/libelogind/sd-login/test-login.c'],
--         [],
--         []],
--
--#if 0 /// UNNEEDED in elogind
-+#
-+#
-+#        [['src/libelogind/sd-login/test-login.c'],
-+#         [],
-+#         []],
-+#
-+#
- #         [['src/libsystemd/sd-device/test-udev-device-thread.c'],
- #          [libbasic,
- #           libshared_static,

diff --git a/sys-auth/elogind/files/elogind.conf.in b/sys-auth/elogind/files/elogind.conf.in
deleted file mode 100644
index 7b05b35..0000000
--- a/sys-auth/elogind/files/elogind.conf.in
+++ /dev/null
@@ -1,7 +0,0 @@
-# /etc/conf.d/elogind: config file for /etc/init.d/elogind
-
-# this is the elogind executable
-ELOGIND_EXEC="/@libdir@/elogind/elogind"
-
-# this is where elogind will store its pid file
-ELOGIND_PIDFILE="/run/elogind.pid"

diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
deleted file mode 100644
index 019c3af..0000000
--- a/sys-auth/elogind/files/elogind.init
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-	need dbus
-
-	# Make sure elogind is up before xdm starts any dm
-	before xdm
-}
-
-start() {
-	ebegin "Starting elogind"
-
-	start-stop-daemon --start --quiet \
-		--pidfile "${ELOGIND_PIDFILE}" \
-		--exec "${ELOGIND_EXEC}" -- --daemon
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping elogind"
-	start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
-	eend $?
-}

diff --git a/sys-auth/elogind/metadata.xml b/sys-auth/elogind/metadata.xml
deleted file mode 100644
index c28bf0a..0000000
--- a/sys-auth/elogind/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="person">
-		<email>asturm@gentoo.org</email>
-	</maintainer>
-	<maintainer type="person">
-		<email>kensington@gentoo.org</email>
-	</maintainer>
-	<upstream>
-		<remote-id type="github">elogind/elogind</remote-id>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2019-05-20 14:07 Anthony G. Basile
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2019-05-20 14:07 UTC (permalink / raw
  To: gentoo-commits

commit:     142c09d6fa3207decf1f601cdcb00b6eab92296c
Author:     Necktwi Ozfguah <necktwi <AT> ferryfair <DOT> com>
AuthorDate: Sun May 19 13:32:08 2019 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May 20 14:06:34 2019 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=142c09d6

sys-auth/elogind: strndupa

/added to src/test/test-hexdecoct.c

Signed-off-by: Necktwi Ozfguah <necktwi <AT> ferryfair.com>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 sys-auth/elogind/Manifest                       |   1 +
 sys-auth/elogind/elogind-234.4.ebuild           | 106 ++++++++++++++++++++++++
 sys-auth/elogind/files/elogind-226.4-docs.patch |  15 ++++
 sys-auth/elogind/files/elogind-fix-musl.patch   |  38 +++++++++
 sys-auth/elogind/files/elogind.conf             |   8 ++
 sys-auth/elogind/files/elogind.conf.in          |   7 ++
 sys-auth/elogind/files/elogind.init             |  25 ++++++
 sys-auth/elogind/metadata.xml                   |  13 +++
 8 files changed, 213 insertions(+)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
new file mode 100644
index 0000000..9628a6a
--- /dev/null
+++ b/sys-auth/elogind/Manifest
@@ -0,0 +1 @@
+DIST elogind-234.4.tar.gz 973370 SHA256 ffb465a62c4281c19b07eb7fbb9ad0987f3b726ae1a868a92a3144d7714542f3 SHA512 2df4fa318074d4f5e5dbba353cf817068a2703ffed40cdeae4cba2dea4ee143d1c5fc076b19419f1c4299392088c2c14b430d8aa1ded03b62117311802305d5e WHIRLPOOL 1b735338cb02ef8cffb5837a0702110117ae1d677a4cbf106180c549485f7fb0604f3134e6ff5e14b23485ddfe4d4415a41e69d93b8f099cee41a220d0ea4a69

diff --git a/sys-auth/elogind/elogind-234.4.ebuild b/sys-auth/elogind/elogind-234.4.ebuild
new file mode 100644
index 0000000..96d5c75
--- /dev/null
+++ b/sys-auth/elogind/elogind-234.4.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info pam udev
+
+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 ~arm64 ~x86"
+IUSE="acl debug pam policykit selinux"
+
+RDEPEND="
+	sys-apps/util-linux
+	sys-libs/libcap
+	virtual/libudev:=
+	acl? ( sys-apps/acl )
+	pam? ( virtual/pam )
+	selinux? ( sys-libs/libselinux )
+	!sys-apps/systemd
+"
+DEPEND="${RDEPEND}
+	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
+"
+PDEPEND="
+	sys-apps/dbus
+	policykit? ( sys-auth/polkit )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-226.4-docs.patch" )
+
+pkg_setup() {
+	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK
+		~SIGNALFD ~TIMERFD"
+
+	if use kernel_linux; then
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+	eapply "${FILESDIR}/${PN}-fix-musl.patch"
+	eautoreconf # Makefile.am patched by "${FILESDIR}/${P}-docs.patch"
+}
+
+src_configure() {
+	econf \
+		--with-pamlibdir=$(getpam_mod_dir) \
+		--with-udevrulesdir="$(get_udevdir)"/rules.d \
+		--libdir="${EPREFIX}"/usr/$(get_libdir) \
+		--with-rootlibdir="${EPREFIX}"/$(get_libdir) \
+		--with-rootprefix="${EPREFIX}/" \
+		--with-rootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind \
+		--enable-smack \
+		--with-cgroup-controller=openrc \
+		--disable-lto \
+		$(use_enable debug debug elogind) \
+		$(use_enable acl) \
+		$(use_enable pam) \
+		$(use_enable selinux)
+}
+
+src_install() {
+	default
+	find "${D}" -name '*.la' -delete || die
+
+	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-226.4-docs.patch b/sys-auth/elogind/files/elogind-226.4-docs.patch
new file mode 100644
index 0000000..4161f63
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-226.4-docs.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.am	2017-02-16 13:22:56.764985896 +0100
++++ b/Makefile.am	2017-02-16 13:23:04.998986057 +0100
+@@ -194,12 +194,6 @@
+ bin_PROGRAMS =
+ rootlibexec_PROGRAMS =
+ 
+-dist_doc_DATA = \
+-	README \
+-	NEWS \
+-	LICENSE.LGPL2.1 \
+-	LICENSE.GPL2
+-
+ @INTLTOOL_POLICY_RULE@
+ 
+ # ------------------------------------------------------------------------------

diff --git a/sys-auth/elogind/files/elogind-fix-musl.patch b/sys-auth/elogind/files/elogind-fix-musl.patch
new file mode 100644
index 0000000..4aba103
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-fix-musl.patch
@@ -0,0 +1,38 @@
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -22,6 +22,16 @@
+ #include "macro.h"
+ #include "string-util.h"
+ 
++#define strndupa(s, n) \
++	({ \
++	  const char *__in = (s);			\
++	  size_t __len = strnlen(__in, (n));		\
++	  char *__out = (char *)alloca(__len + 1);	\
++	  __out[__len] = '\0';				\
++	  (char *)memcpy(__out, __in, __len);		\
++	})
++
++
+ static void test_hexchar(void) {
+         assert_se(hexchar(0xa) == 'a');
+         assert_se(hexchar(0x0) == '0');
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -48,8 +48,6 @@
+         info(unsigned);
+         info(long unsigned);
+         info(long long unsigned);
+-        info(__syscall_ulong_t);
+-        info(__syscall_slong_t);
+ 
+         info(float);
+         info(double);
+@@ -59,7 +57,6 @@
+         info(ssize_t);
+         info(time_t);
+         info(usec_t);
+-        info(__time_t);
+ 
+         info(enum Enum);
+         info(enum BigEnum);

diff --git a/sys-auth/elogind/files/elogind.conf b/sys-auth/elogind/files/elogind.conf
new file mode 100644
index 0000000..b66a158
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/usr/libexec/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/var/run/elogind.pid"
+

diff --git a/sys-auth/elogind/files/elogind.conf.in b/sys-auth/elogind/files/elogind.conf.in
new file mode 100644
index 0000000..7b05b35
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf.in
@@ -0,0 +1,7 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/@libdir@/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/run/elogind.pid"

diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
new file mode 100644
index 0000000..019c3af
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need dbus
+
+	# Make sure elogind is up before xdm starts any dm
+	before xdm
+}
+
+start() {
+	ebegin "Starting elogind"
+
+	start-stop-daemon --start --quiet \
+		--pidfile "${ELOGIND_PIDFILE}" \
+		--exec "${ELOGIND_EXEC}" -- --daemon
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping elogind"
+	start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+	eend $?
+}

diff --git a/sys-auth/elogind/metadata.xml b/sys-auth/elogind/metadata.xml
new file mode 100644
index 0000000..c28bf0a
--- /dev/null
+++ b/sys-auth/elogind/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>asturm@gentoo.org</email>
+	</maintainer>
+	<maintainer type="person">
+		<email>kensington@gentoo.org</email>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">elogind/elogind</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/
@ 2021-04-13 13:24 Dave Hughes
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Hughes @ 2021-04-13 13:24 UTC (permalink / raw
  To: gentoo-commits

commit:     dffbec4f1321b7b80bc4efad6bdc78f46430c5aa
Author:     Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
AuthorDate: Tue Apr 13 13:15:18 2021 +0000
Commit:     Dave Hughes <davidhughes205 <AT> gmail <DOT> com>
CommitDate: Tue Apr 13 13:15:18 2021 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=dffbec4f

sys-auth/elogind: sync with ::gentoo

Package-Manager: Portage-3.0.18, Repoman-3.0.3
RepoMan-Options: --force
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com>

 sys-auth/elogind/Manifest                          |  3 +-
 ...{elogind-243.7.ebuild => elogind-246.10.ebuild} | 28 +++++++++++++----
 ...elogind-243.7.ebuild => elogind-246.9.2.ebuild} | 26 +++++++++++++---
 sys-auth/elogind/files/0001-musl-mallinfo.patch    | 36 ++++++++++++++++++++++
 .../files/elogind-243.7-musl-mallinfo.patch        | 35 ---------------------
 sys-auth/elogind/files/elogind.init-r1             | 27 ++++++++++++++++
 sys-auth/elogind/metadata.xml                      |  6 +++-
 7 files changed, 113 insertions(+), 48 deletions(-)

diff --git a/sys-auth/elogind/Manifest b/sys-auth/elogind/Manifest
index 8bb9d4b..4eb0c70 100644
--- a/sys-auth/elogind/Manifest
+++ b/sys-auth/elogind/Manifest
@@ -1 +1,2 @@
-DIST elogind-243.7.tar.gz 1338186 BLAKE2B f3efc2af50f56c2cda18d721c18f4d88ca608fb35b2c7e2ebb35c3f3f743124dcf17efcc9db47810a13093397b1c1bc82cb42e017b3db493af5d2bb70bcf0eff SHA512 fd17c5016d083d63805f9ed0326ee32597870f6c48c9c246712cb09a77db775036b0fd0f4258b6557e189a1eceb4b50f4ae2e9e7881f4d9759b87a0b49ce3472
+DIST elogind-246.10.tar.gz 1559256 BLAKE2B 17a8146ee08c8ccf167f25d89b1d4525050ed0b0baaad0d36924ad3c40ffc820ef1528b33557cf285ad06c9ac9c440137428c5a235a2acf563e56f2f8f07e208 SHA512 9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b
+DIST elogind-246.9.2.tar.gz 1534982 BLAKE2B 428def0f577cb92c8167f4400a59093ebf738d14b449e0dc59f1aa59da2c0f781db62bffc4bea2649edbfcc06ff5799ab24243dfb580eaa12c5cf0c41be8fc17 SHA512 b50d319793307a425d7542626e8cf27e56fb5e5c75cca9519cd3f5a1e7c387c4179310b95fa083f8bd8172384f16c0e45e7000b313d2bcf84ed8aba98dc775c1

diff --git a/sys-auth/elogind/elogind-243.7.ebuild b/sys-auth/elogind/elogind-246.10.ebuild
similarity index 81%
copy from sys-auth/elogind/elogind-243.7.ebuild
copy to sys-auth/elogind/elogind-246.10.ebuild
index 82580b7..eeda3cb 100644
--- a/sys-auth/elogind/elogind-243.7.ebuild
+++ b/sys-auth/elogind/elogind-246.10.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -9,7 +9,7 @@ if [[ ${PV} = *9999* ]]; then
 	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 ~s390 sparc x86"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
 fi
 
 inherit linux-info meson pam udev xdg-utils
@@ -19,7 +19,7 @@ HOMEPAGE="https://github.com/elogind/elogind"
 
 LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
 SLOT="0"
-IUSE="+acl debug doc +pam +policykit selinux"
+IUSE="+acl audit debug doc +pam +policykit selinux"
 
 BDEPEND="
 	app-text/docbook-xml-dtd:4.2
@@ -30,6 +30,7 @@ BDEPEND="
 	virtual/pkgconfig
 "
 DEPEND="
+	audit? ( sys-process/audit )
 	sys-apps/util-linux
 	sys-libs/libcap
 	virtual/libudev:=
@@ -48,9 +49,8 @@ PDEPEND="
 DOCS=( README.md src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
 
 PATCHES=(
-	"${FILESDIR}/${P}-nodocs.patch"
+	"${FILESDIR}/${PN}-243.7-nodocs.patch"
 	"${FILESDIR}/${PN}-241.4-broken-test.patch" # bug 699116
-	"${FILESDIR}/${PN}-243.7-musl-mallinfo.patch"
 )
 
 pkg_setup() {
@@ -61,6 +61,11 @@ pkg_setup() {
 
 src_prepare() {
 	default
+
+	if use elibc_musl ; then
+		eapply "${FILESDIR}"/0001-musl-mallinfo.patch
+	fi
+
 	xdg_environment_reset
 }
 
@@ -90,6 +95,7 @@ src_configure() {
 		-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)
@@ -105,13 +111,23 @@ src_install() {
 
 	meson_src_install
 
-	newinitd "${FILESDIR}"/${PN}.init ${PN}
+	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

diff --git a/sys-auth/elogind/elogind-243.7.ebuild b/sys-auth/elogind/elogind-246.9.2.ebuild
similarity index 83%
rename from sys-auth/elogind/elogind-243.7.ebuild
rename to sys-auth/elogind/elogind-246.9.2.ebuild
index 82580b7..c29a940 100644
--- a/sys-auth/elogind/elogind-243.7.ebuild
+++ b/sys-auth/elogind/elogind-246.9.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -19,7 +19,7 @@ HOMEPAGE="https://github.com/elogind/elogind"
 
 LICENSE="CC0-1.0 LGPL-2.1+ public-domain"
 SLOT="0"
-IUSE="+acl debug doc +pam +policykit selinux"
+IUSE="+acl audit debug doc +pam +policykit selinux"
 
 BDEPEND="
 	app-text/docbook-xml-dtd:4.2
@@ -30,6 +30,7 @@ BDEPEND="
 	virtual/pkgconfig
 "
 DEPEND="
+	audit? ( sys-process/audit )
 	sys-apps/util-linux
 	sys-libs/libcap
 	virtual/libudev:=
@@ -48,9 +49,8 @@ PDEPEND="
 DOCS=( README.md src/libelogind/sd-bus/GVARIANT-SERIALIZATION )
 
 PATCHES=(
-	"${FILESDIR}/${P}-nodocs.patch"
+	"${FILESDIR}/${PN}-243.7-nodocs.patch"
 	"${FILESDIR}/${PN}-241.4-broken-test.patch" # bug 699116
-	"${FILESDIR}/${PN}-243.7-musl-mallinfo.patch"
 )
 
 pkg_setup() {
@@ -61,6 +61,11 @@ pkg_setup() {
 
 src_prepare() {
 	default
+
+	if use elibc_musl ; then
+		eapply "${FILESDIR}"/0001-musl-mallinfo.patch
+	fi
+
 	xdg_environment_reset
 }
 
@@ -90,6 +95,7 @@ src_configure() {
 		-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)
@@ -105,13 +111,23 @@ src_install() {
 
 	meson_src_install
 
-	newinitd "${FILESDIR}"/${PN}.init ${PN}
+	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

diff --git a/sys-auth/elogind/files/0001-musl-mallinfo.patch b/sys-auth/elogind/files/0001-musl-mallinfo.patch
new file mode 100644
index 0000000..41a8575
--- /dev/null
+++ b/sys-auth/elogind/files/0001-musl-mallinfo.patch
@@ -0,0 +1,36 @@
+diff -Naur a/src/basic/selinux-util.c b/src/basic/selinux-util.c
+--- a/src/basic/selinux-util.c	2021-03-13 17:08:40.496016258 -0500
++++ b/src/basic/selinux-util.c	2021-03-13 17:10:54.928016323 -0500
+@@ -75,7 +75,6 @@
+ 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;
+ 
+@@ -87,7 +86,6 @@
+         if (!mac_selinux_use())
+                 return 0;
+ 
+-        before_mallinfo = mallinfo();
+         before_timestamp = now(CLOCK_MONOTONIC);
+ 
+         label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
+@@ -95,14 +93,9 @@
+                 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;
+-
+-        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);
+ 
++	log_debug("Successfully loaded SELinux database in %s",
++		format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0));
+ #endif
+         return 0;
+ }

diff --git a/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch b/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch
deleted file mode 100644
index b9b1700..0000000
--- a/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -Naur elogind-243.7.orig/src/basic/selinux-util.c elogind-243.7/src/basic/selinux-util.c
---- elogind-243.7.orig/src/basic/selinux-util.c	2020-03-12 20:33:40.000000000 +0100
-+++ elogind-243.7/src/basic/selinux-util.c	2020-07-03 12:29:16.140181565 +0200
-@@ -63,7 +63,6 @@
- 
- #if HAVE_SELINUX
-         usec_t before_timestamp, after_timestamp;
--        struct mallinfo before_mallinfo, after_mallinfo;
- 
-         if (label_hnd)
-                 return 0;
-@@ -71,7 +70,6 @@
-         if (!mac_selinux_use())
-                 return 0;
- 
--        before_mallinfo = mallinfo();
-         before_timestamp = now(CLOCK_MONOTONIC);
- 
-         label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
-@@ -83,13 +81,9 @@
-                 int l;
- 
-                 after_timestamp = now(CLOCK_MONOTONIC);
--                after_mallinfo = mallinfo();
- 
--                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);
-+                log_debug("Successfully loaded SELinux database in %s",
-+                          format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0));
-         }
- #endif
- 

diff --git a/sys-auth/elogind/files/elogind.init-r1 b/sys-auth/elogind/files/elogind.init-r1
new file mode 100644
index 0000000..56acb1c
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init-r1
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need dbus
+
+	# Make sure elogind is up before xdm starts any dm
+	before xdm
+
+	use logger
+}
+
+start() {
+	ebegin "Starting elogind"
+
+	start-stop-daemon --start --quiet \
+		--pidfile "${ELOGIND_PIDFILE}" \
+		--exec "${ELOGIND_EXEC}" -- --daemon
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping elogind"
+	start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+	eend $?
+}

diff --git a/sys-auth/elogind/metadata.xml b/sys-auth/elogind/metadata.xml
index c28bf0a..7950788 100644
--- a/sys-auth/elogind/metadata.xml
+++ b/sys-auth/elogind/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 	<maintainer type="person">
@@ -7,6 +7,10 @@
 	<maintainer type="person">
 		<email>kensington@gentoo.org</email>
 	</maintainer>
+	<maintainer type="person">
+		<email>slashbeast@gentoo.org</email>
+		<name>Piotr Karbowski</name>
+	</maintainer>
 	<upstream>
 		<remote-id type="github">elogind/elogind</remote-id>
 	</upstream>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-13 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20 14:07 [gentoo-commits] proj/musl:master commit in: sys-auth/elogind/files/, sys-auth/elogind/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2021-04-13 13:24 Dave Hughes
2019-04-18 21:01 Jory Pratt
2019-04-05  0:13 Jory Pratt
2017-11-12 12:52 Anthony G. Basile
2017-11-02  1:20 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox