ConsoleKit: remove package ConsoleKit

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-07-07 17:31:23 +02:00
parent 6472ef074e
commit 3c17768471
12 changed files with 42 additions and 362 deletions

View File

@ -22,6 +22,35 @@
#
# runlevels: openelec
# needed functions
add_omit_pids() {
omit_pids="$omit_pids -o $1"
}
_shutdown_script () {
SHUTDOWN="/storage/.config/shutdown.sh"
if [ -f $SHUTDOWN ]; then
echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh
cat "$SHUTDOWN" | logger -t shutdown.sh
echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh
sh $SHUTDOWN
fi
}
_safe_shutdown () {
_shutdown_script
add_omit_pids $(pidof connmand)
add_omit_pids $(pidof dbus-daemon)
killall5 -15 $omit_pids
for seq in `seq 1 10` ; do
usleep 500000
clear > /dev/tty1
killall5 -18 $omit_pids || break
done
sync
umount -a >/dev/null 2>&1
}
LIRCDEV="/var/run/lirc/lircd"
[ -e /var/run/lirc/lircd.irtrans ] && LIRCDEV="/var/run/lirc/lircd.irtrans"
XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV"
@ -52,6 +81,7 @@ fi
sh $AUTOSTART
fi
wait_for_dbus
# waiting for Xorg to start
@ -81,25 +111,22 @@ fi
case "$RET" in
0)
if [ ! $(pidof console-kit-daemon) ]; then
touch "$LOCKDIR/$LOCKFILE"
_safe_shutdown
poweroff -f
fi
touch "$LOCKDIR/$LOCKFILE"
killall sshd
_safe_shutdown
poweroff -f
;;
64)
if [ ! $(pidof console-kit-daemon) ]; then
touch "$LOCKDIR/$LOCKFILE"
_safe_shutdown
poweroff -f
fi
touch "$LOCKDIR/$LOCKFILE"
killall sshd
_safe_shutdown
poweroff -f
;;
66)
if [ ! $(pidof console-kit-daemon) ]; then
touch "$LOCKDIR/$LOCKFILE"
_safe_shutdown
reboot
fi
touch "$LOCKDIR/$LOCKFILE"
killall sshd
_safe_shutdown
reboot
;;
255)
echo "Abnormal Exit. Exited with code $RET"

View File

@ -27,7 +27,6 @@ PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
mkdir -p $INSTALL/usr/bin
cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin
cp $PKG_DIR/scripts/gputemp $INSTALL/usr/bin
cp $PKG_DIR/scripts/wait_on_xbmc_exit $INSTALL/usr/bin
cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send
cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin

View File

@ -1,29 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
count=0
while [ $(pidof xbmc.bin) -a $count -le 20 ]; do
usleep 250000
logger -t wait_on_xbmc_exit "### Waiting for XBMC to Exit - $count ###"
count=$((count+1))
done

View File

@ -1,41 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--libexecdir=/usr/lib/ConsoleKit \
--localstatedir=/var \
--disable-static \
--enable-shared \
--disable-pam-module \
--disable-docbook-docs \
make
$MAKEINSTALL

View File

@ -1,33 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start ConsoleKit daemon
#
# runlevels: openelec, textmode
progress "starting ConsoleKit daemon"
install -m 755 -d /var/log/ConsoleKit
install -m 755 -d /var/run/ConsoleKit
while true; do
wait_for_dbus
console-kit-daemon --no-daemon &>/dev/null
usleep 500000
done &

View File

@ -1,67 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $INSTALL/etc/ConsoleKit/run-seat.d
mkdir -p $INSTALL/etc/ConsoleKit/run-session.d
mkdir -p $INSTALL/etc/ConsoleKit/seats.d
cp -P $PKG_BUILD/data/00-primary.seat $INSTALL/etc/ConsoleKit/seats.d
mkdir -p $INSTALL/etc/dbus-1/system.d
cp -P $PKG_BUILD/data/ConsoleKit.conf $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/ck-log-system-restart $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/ck-log-system-start $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/ck-log-system-stop $INSTALL/usr/bin
cp -P $PKG_BUILD/src/console-kit-daemon $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/.libs/ck-launch-session $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/ck-list-sessions $INSTALL/usr/bin
cp -P $PKG_BUILD/tools/ck-history $INSTALL/usr/bin
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/libck-connector/.libs/*.so* $INSTALL/usr/lib
mkdir -p $INSTALL/usr/lib/ConsoleKit
cp -P $PKG_BUILD/tools/ck-collect-session-info $INSTALL/usr/lib/ConsoleKit
cp -P $PKG_BUILD/tools/ck-get-x11-display-device $INSTALL/usr/lib/ConsoleKit
cp -P $PKG_BUILD/tools/ck-get-x11-server-pid $INSTALL/usr/lib/ConsoleKit
mkdir -p $INSTALL/usr/lib/ConsoleKit/run-seat.d
mkdir -p $INSTALL/usr/lib/ConsoleKit/run-session.d
mkdir -p $INSTALL/usr/lib/ConsoleKit/scripts
# cp -P $PKG_BUILD/tools/linux/ck-system-restart $INSTALL/usr/lib/ConsoleKit/scripts
# cp -P $PKG_BUILD/tools/linux/ck-system-stop $INSTALL/usr/lib/ConsoleKit/scripts
cp -P $PKG_DIR/scripts/ck-system-restart $INSTALL/usr/lib/ConsoleKit/scripts
cp -P $PKG_DIR/scripts/ck-system-stop $INSTALL/usr/lib/ConsoleKit/scripts
mkdir -p $INSTALL/usr/share/dbus-1/interfaces
cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Manager.xml $INSTALL/usr/share/dbus-1/interfaces
cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Seat.xml $INSTALL/usr/share/dbus-1/interfaces
cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Session.xml $INSTALL/usr/share/dbus-1/interfaces
mkdir -p $INSTALL/usr/share/dbus-1/system-services
cp -P $PKG_BUILD/data/org.freedesktop.ConsoleKit.service $INSTALL/usr/share/dbus-1/system-services
mkdir -p $INSTALL/usr/share/polkit-1/actions
cp -P $PKG_BUILD/data/org.freedesktop.consolekit.policy $INSTALL/usr/share/polkit-1/actions

View File

@ -1,36 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="ConsoleKit"
PKG_VERSION="0.4.5"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
PKG_URL="http://www.freedesktop.org/software/ConsoleKit/dist/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS="dbus polkit libX11"
PKG_BUILD_DEPENDS="toolchain dbus dbus-glib polkit libX11"
PKG_PRIORITY="optional"
PKG_SECTION="system"
PKG_SHORTDESC="ConsoleKit: a framework for defining and tracking users, login sessions, and seats."
PKG_LONGDESC="ConsoleKit is a framework for defining and tracking users, login sessions, and seats."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"

View File

@ -1,25 +0,0 @@
From e8d8a3dadcaa32eeb9f2f27f9774e52e5ec70dde Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 8 Jun 2013 22:21:41 +0300
Subject: [PATCH] do not spawn too much threads
---
src/ck-sysdeps-linux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ck-sysdeps-linux.c b/src/ck-sysdeps-linux.c
index a95272e..264fe22 100644
--- a/src/ck-sysdeps-linux.c
+++ b/src/ck-sysdeps-linux.c
@@ -687,7 +687,7 @@ gboolean
ck_get_max_num_consoles (guint *num)
{
if (num != NULL) {
- *num = MAX_NR_CONSOLES;
+ *num = 1;
}
return TRUE;
--
1.7.2.5

View File

@ -1,31 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. /etc/profile.d/safe-shutdown.conf
LOCKDIR="/var/lock/"
LOCKFILE="xbmc.disabled"
touch "$LOCKDIR/$LOCKFILE"
wait_on_xbmc_exit
killall sshd
_safe_shutdown
reboot

View File

@ -1,31 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. /etc/profile.d/safe-shutdown.conf
LOCKDIR="/var/lock/"
LOCKFILE="xbmc.disabled"
touch "$LOCKDIR/$LOCKFILE"
wait_on_xbmc_exit
killall sshd
_safe_shutdown
poweroff

View File

@ -1,52 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# Core (PATH) environment variables.
#
# This file contains non-OpenELEC evironment variables as well as OpenELEC
# evironment variables that are not user defined.
################################################################################
add_omit_pids() {
omit_pids="$omit_pids -o $1"
}
_shutdown_script () {
SHUTDOWN="/storage/.config/shutdown.sh"
if [ -f $SHUTDOWN ]; then
echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh
cat "$SHUTDOWN" | logger -t shutdown.sh
echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh
sh $SHUTDOWN
fi
}
_safe_shutdown () {
_shutdown_script
add_omit_pids $(pidof connmand)
add_omit_pids $(pidof dbus-daemon)
killall5 -15 $omit_pids
for seq in `seq 1 10` ; do
usleep 500000
clear > /dev/tty1
killall5 -18 $omit_pids || break
done
sync
umount -a >/dev/null 2>&1
}

View File

@ -124,7 +124,6 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
# Powermanagement support
[ "$UPOWER" = "yes" ] && $SCRIPTS/install upower
[ "$UPOWER" = "yes" ] && $SCRIPTS/install ConsoleKit
# NTFS 3G support
[ "$EXFAT" = "yes" ] && $SCRIPTS/install fuse-exfat