public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/elogind/, sys-auth/elogind/files/
Date: Sat, 11 Feb 2017 11:29:38 +0000 (UTC)	[thread overview]
Message-ID: <1486812539.8ec2a2aa842e3c088506128a5a7cd1f3042e38ad.asturm@gentoo> (raw)

commit:     8ec2a2aa842e3c088506128a5a7cd1f3042e38ad
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 21:39:51 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 11:28:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ec2a2aa

sys-auth/elogind: Fix permissions on /run/systemd, create at runtime

Fix HOMEPAGE, SRC_URI

Package-Manager: portage-2.3.0

 sys-auth/elogind/elogind-219.12-r5.ebuild          | 101 +++++++++++++++++++++
 .../elogind/files/elogind-219.12-runtime.patch     |  43 +++++++++
 sys-auth/elogind/files/elogind.init                |   2 +-
 3 files changed, 145 insertions(+), 1 deletion(-)

diff --git a/sys-auth/elogind/elogind-219.12-r5.ebuild b/sys-auth/elogind/elogind-219.12-r5.ebuild
new file mode 100644
index 0000000000..e3e26fc040
--- /dev/null
+++ b/sys-auth/elogind/elogind-219.12-r5.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/elogind/elogind/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 apparmor pam policykit +seccomp selinux"
+
+COMMON_DEPEND="
+	sys-apps/util-linux
+	sys-libs/libcap
+	virtual/libudev:=
+	acl? ( sys-apps/acl )
+	apparmor? ( sys-libs/libapparmor )
+	pam? ( virtual/pam )
+	seccomp? ( sys-libs/libseccomp )
+	selinux? ( sys-libs/libselinux )
+"
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/dbus
+	!sys-auth/systemd
+"
+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
+"
+PDEPEND="policykit? ( sys-auth/polkit )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-docs.patch"
+	"${FILESDIR}/${PN}-lrt.patch"
+	"${FILESDIR}/${P}-session.patch"
+	"${FILESDIR}/${P}-login1-perms.patch"
+	"${FILESDIR}/${P}-gperf.patch"
+	"${FILESDIR}/${P}-glibc.patch" # bug 605744
+	"${FILESDIR}/${P}-runtime.patch"
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~CGROUPS ~EPOLL ~INOTIFY_USER ~SECURITY_SMACK
+		~SIGNALFD ~TIMERFD"
+
+	use seccomp && CONFIG_CHECK+=" ~SECCOMP"
+
+	if use kernel_linux; then
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+	eautoreconf # Makefile.am patched by "${FILESDIR}/${PN}-{docs,lrt}.patch"
+}
+
+src_configure() {
+	econf \
+		--with-pamlibdir=$(getpam_mod_dir) \
+		--with-udevrulesdir="$(get_udevdir)"/rules.d \
+		--libdir="${EPREFIX}"/$(get_libdir) \
+		--enable-smack \
+		$(use_enable acl) \
+		$(use_enable apparmor) \
+		$(use_enable pam) \
+		$(use_enable seccomp) \
+		$(use_enable selinux)
+}
+
+src_install() {
+	default
+	find "${D}" -name '*.la' -delete || die
+
+	# Build system ignores --with-rootlibdir and puts pkgconfig below
+	# /$(libdir) - Move it to /usr/$(libdir)/pkgconfig
+	mkdir -p "${ED%/}"/usr/$(get_libdir) || die
+	mv "${ED%/}"/$(get_libdir)/pkgconfig "${ED%/}"/usr/$(get_libdir)/ || die
+
+	newinitd "${FILESDIR}"/${PN}.init ${PN}
+	newconfd "${FILESDIR}"/${PN}.conf ${PN}
+}
+
+pkg_postinst() {
+	if [ "$(rc-config list default | grep elogind)" = "" ]; then
+		ewarn "To enable the elogind daemon, elogind must be"
+		ewarn "added to the default runlevel:"
+		ewarn "# rc-update add elogind default"
+	fi
+}

diff --git a/sys-auth/elogind/files/elogind-219.12-runtime.patch b/sys-auth/elogind/files/elogind-219.12-runtime.patch
new file mode 100644
index 0000000000..f14806c316
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-219.12-runtime.patch
@@ -0,0 +1,43 @@
+From 276746896985c438d317fcae414e9c83a6dd3d76 Mon Sep 17 00:00:00 2001
+From: Sven Eden <yamakuzure@gmx.net>
+Date: Fri, 20 Jan 2017 17:14:35 +0100
+Subject: [PATCH] Create /run/systemd as needed
+
+* src/login/logind.c (main): Also create /run/systemd at startup.
+* Create /run/systemd/machines, so that the login monitor works.
+* Fail if any of the needed directories could not be created.
+* But do not fail if any of the needed directories exist.
+---
+ src/login/logind.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/login/logind.c b/src/login/logind.c
+index 1ab50ec..07a77b1 100644
+--- a/src/login/logind.c
++++ b/src/login/logind.c
+@@ -1131,10 +1131,21 @@ int main(int argc, char *argv[]) {
+          * existence of /run/systemd/seats/ to determine whether
+          * logind is available, so please always make sure this check
+          * stays in. */
+-        mkdir_label("/run/systemd/seats", 0755);
+-        mkdir_label("/run/systemd/users", 0755);
+-        mkdir_label("/run/systemd/sessions", 0755);
+-        mkdir_label("/run/systemd/machines", 0755);
++        r = mkdir_label("/run/systemd", 0755);
++        if ( (r < 0) && (-EEXIST != r) )
++                return log_error_errno(r, "Failed to create /run/systemd : %m");
++        r = mkdir_label("/run/systemd/seats", 0755);
++        if ( r < 0 && (-EEXIST != r) )
++                return log_error_errno(r, "Failed to create /run/systemd/seats : %m");
++        r = mkdir_label("/run/systemd/users", 0755);
++        if ( r < 0 && (-EEXIST != r) )
++                return log_error_errno(r, "Failed to create /run/systemd/users : %m");
++        r = mkdir_label("/run/systemd/sessions", 0755);
++        if ( r < 0 && (-EEXIST != r) )
++                return log_error_errno(r, "Failed to create /run/systemd/sessions : %m");
++        r = mkdir_label("/run/systemd/machines", 0755);
++        if ( r < 0 && (-EEXIST != r) )
++                return log_error_errno(r, "Failed to create /run/systemd/machines : %m");
+ 
+         m = manager_new();
+         if (!m) {

diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
index af7c82e185..04ce34ab4c 100644
--- a/sys-auth/elogind/files/elogind.init
+++ b/sys-auth/elogind/files/elogind.init
@@ -16,7 +16,7 @@ start() {
 	# elogind needs a /run/systemd directory
 	if [[ ! -e /run/systemd ]]; then
 		mkdir -p /run/systemd
-		chmod 644 /run/systemd
+		chmod 755 /run/systemd
 	fi
 
 	start-stop-daemon --start --quiet --background \


             reply	other threads:[~2017-02-11 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 11:29 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02  8:18 [gentoo-commits] repo/gentoo:master commit in: sys-auth/elogind/, sys-auth/elogind/files/ Andreas Sturmlechner
2021-05-29 21:19 Andreas Sturmlechner
2020-05-26 14:53 Andreas Sturmlechner
2020-03-12 22:15 Andreas Sturmlechner
2019-12-08 12:04 Andreas Sturmlechner
2019-06-20 10:37 Andreas Sturmlechner
2019-03-16  5:26 Michael Palimaka
2019-02-14 23:56 Andreas Sturmlechner
2018-10-07 12:48 Andreas Sturmlechner
2018-08-10 11:52 Michael Palimaka
2018-06-30 20:47 Andreas Sturmlechner
2018-04-29 19:25 Andreas Sturmlechner
2018-01-31 14:17 Andreas Sturmlechner
2018-01-19 10:40 Andreas Sturmlechner
2018-01-14 23:05 Andreas Sturmlechner
2017-12-04  1:02 Andreas Sturmlechner
2017-11-20  0:45 Andreas Sturmlechner
2017-09-24  9:48 Michael Palimaka
2017-05-31 20:11 Andreas Sturmlechner
2017-05-31 20:11 Andreas Sturmlechner
2017-01-14 19:26 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486812539.8ec2a2aa842e3c088506128a5a7cd1f3042e38ad.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox