summaryrefslogtreecommitdiff
path: root/pcr/elogind
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-03-15 11:32:17 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-03-15 11:32:17 -0500
commite4ac43caace3670051cce0bbf926812a27cc5fb3 (patch)
tree557941f22f1a99384d9c81b0b6bd971de63ed6f8 /pcr/elogind
parentbeb51976461c5feced10a297c1f58d29c92396ea (diff)
elogind-219.12-3: rebuild
Diffstat (limited to 'pcr/elogind')
-rw-r--r--pcr/elogind/PKGBUILD26
-rw-r--r--pcr/elogind/elogind-219.12-runtime.patch43
-rw-r--r--pcr/elogind/elogind.conf7
-rw-r--r--pcr/elogind/elogind.init32
-rw-r--r--pcr/elogind/elogind.install8
5 files changed, 59 insertions, 57 deletions
diff --git a/pcr/elogind/PKGBUILD b/pcr/elogind/PKGBUILD
index dfc9c65ee..cbf5eb75e 100644
--- a/pcr/elogind/PKGBUILD
+++ b/pcr/elogind/PKGBUILD
@@ -3,14 +3,17 @@
pkgname=elogind
pkgver=219.12
-pkgrel=2
+pkgrel=3
pkgdesc="The systemd project's logind, extracted to a standalone package"
arch=('i686' 'x86_64' 'armv7h')
-url="https://github.com/wingo/elogind"
+url="https://github.com/elogind/elogind"
license=('GPL')
-depends=('dbus' 'polkit' 'libudev.so')
-makedepends=('libcap' 'intltool' 'libtool' 'gperf' 'gtk-doc' 'libseccomp')
-conflicts=('systemd-sysvcompat')
+depends=('dbus' 'eudev-systemd')
+makedepends=('libcap' 'intltool' 'libtool' 'gperf' 'gtk-doc' 'libseccomp' 'eudev')
+optdepends=('polkit-elogind: polkit with elogind session tracking'
+ 'dbus-openrc: dbus openrc initscript'
+ 'elogind-openrc: elogind openrc initscript')
+conflicts=('systemd-sysvcompat' 'consolekit')
options=('!libtool')
install=elogind.install
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
@@ -20,8 +23,7 @@ source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
"elogind-219.12-login1-perms.patch"
"elogind-219.12-gperf.patch"
"elogind-219.12-glibc.patch"
- "elogind.conf"
- "elogind.init")
+ "elogind-219.12-runtime.patch")
sha256sums=('80241494f5c794e8501ccf570ac805275ace368755780f38a18762fd06243f95'
'cafea7a13159dee700902e3837aab015d9521dfe122840faf2d909b5dc02229e'
'a9227ed4e97117ab5751de38c19813560a12f51379ccd882a89e7ef9842659ac'
@@ -29,8 +31,7 @@ sha256sums=('80241494f5c794e8501ccf570ac805275ace368755780f38a18762fd06243f95'
'cef5dda99a51a42bc36d1a946d5a21a830bf0f44ed3f447542ec57c1424e0053'
'9f6437abeba2f17d378482e262504f269998d54c6adb16eb16c4eda738065074'
'5e7dfcf695c15a02d8151541c50e26c9e3140f5626d95bbec366aada5ce095d5'
- '344db76bf8aadfba4363c63aacd93c945a647bd5e425d756cbfd9cb4453afc66'
- '3e3ca3d384b9ced34360e697b2a6102b173731c8cf4f91e2901df68b33d73d44')
+ '78c5ae1461685634e975301abd521274a4c817ad7995cdfa81422e875f9146c1')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -40,7 +41,7 @@ prepare() {
patch -Np 1 -i ${srcdir}/elogind-219.12-login1-perms.patch
patch -Np 1 -i ${srcdir}/elogind-219.12-gperf.patch
patch -Np 1 -i ${srcdir}/elogind-219.12-glibc.patch
-
+ patch -Np 1 -i ${srcdir}/elogind-219.12-runtime.patch
autoreconf -vim
}
@@ -50,6 +51,8 @@ build() {
./configure \
--sysconfdir=/etc \
--prefix=/usr \
+ --enable-split-usr \
+ --enable-smack \
--libexecdir=/usr/lib
make
@@ -58,7 +61,4 @@ build() {
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
-
- install -Dm755 ${srcdir}/elogind.init ${pkgdir}/etc/init.d/elogind
- install -Dm755 ${srcdir}/elogind.conf ${pkgdir}/etc/conf.d/elogind
}
diff --git a/pcr/elogind/elogind-219.12-runtime.patch b/pcr/elogind/elogind-219.12-runtime.patch
new file mode 100644
index 000000000..f14806c31
--- /dev/null
+++ b/pcr/elogind/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/pcr/elogind/elogind.conf b/pcr/elogind/elogind.conf
deleted file mode 100644
index 167260a42..000000000
--- a/pcr/elogind/elogind.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# /etc/conf.d/elogind: config file for /etc/init.d/elogind
-
-# this is the elogind executable
-ELOGIND_EXEC="/usr/lib/elogind/elogind"
-
-# this is where elogind will store its pid file
-ELOGIND_PIDFILE="/run/elogind.pid"
diff --git a/pcr/elogind/elogind.init b/pcr/elogind/elogind.init
deleted file mode 100644
index 65a28e9c7..000000000
--- a/pcr/elogind/elogind.init
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-depend() {
- need dbus
-
- # Make sure elogind is up before xdm starts any dm
- before xdm
-}
-
-start() {
- ebegin "Starting elogind"
-
- # elogind needs a /run/systemd directory
- if [[ ! -e /run/systemd ]]; then
- mkdir -p /run/systemd
- chmod 644 /run/systemd
- fi
-
- start-stop-daemon --start --quiet --background \
- --make-pidfile --pidfile "${ELOGIND_PIDFILE}" \
- --exec "${ELOGIND_EXEC}"
- eend $?
-}
-
-stop() {
- ebegin "Stopping elogind"
- start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
- eend $?
-}
diff --git a/pcr/elogind/elogind.install b/pcr/elogind/elogind.install
index 28cd5b59c..9a271f840 100644
--- a/pcr/elogind/elogind.install
+++ b/pcr/elogind/elogind.install
@@ -1,9 +1,7 @@
post_install() {
- echo " ==> /etc/pam.d/system-login"
- echo " ==> Replace pam_systemd.so in your pam config with:"
- echo ' session optional pam_elogind.so'
+ sed -e 's|pam_systemd.so|pam_elogind.so|' -i etc/pam.d/system-login
}
-post_upgrade() {
- post_install $1
+post_remove(){
+ sed -e 's|pam_elogind.so|pam_systemd.so|' -i etc/pam.d/system-login
}