removed aur/lightdm, moved to community

This commit is contained in:
Kevin Mihelich 2013-03-13 00:49:01 +00:00
parent 5e8095b78c
commit 98eeb2ad45
12 changed files with 0 additions and 557 deletions

View file

@ -1,93 +0,0 @@
#Mantainer: M0Rf30
#Contributor: ossfm
#Contributor: shosca
pkgname=lightdm
pkgver=1.4.0
pkgrel=8
pkgdesc="A lightweight display manager"
arch=('i686' 'x86_64')
url="https://launchpad.net/lightdm"
license=('GPL3' 'LGPL3')
source=("https://launchpad.net/lightdm/1.4/$pkgver/+download/$pkgname-$pkgver.tar.gz"
lightdm.rc
lightdm.service
lightdm.tmpfiles
xsession
lightdm-autologin.pam
lightdm.pam
lightdm.rules
lightdm-1.4.0-systemd_login1_power.patch
lightdm-lock-screen-before-switch.patch)
depends=('dbus-glib' 'libxklavier')
options=(!libtool)
install=lightdm.install
optdepends=('xorg-server-xephyr: run lightdm in test mode'
'accountsservice: limit account shown by the greeter'
'lightdm-kde: Qt lightdm greeter'
'lightdm-gtk-greeter: You need this package to test the default greeter'
'lightdm-webkit-greeter-bzr: webkit lightdm greeter'
'lightdm-crowd-greeter: 3d lightdm greeter'
'lightdm-pantheon-greeter: ElementaryOS greeter writtern in vala')
makedepends=('gobject-introspection' 'pkg-config' 'intltool' 'patch' 'itstool')
backup=(etc/apparmor.d/lightdm-guest-session
etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf
etc/lightdm/keys.conf
etc/lightdm/lightdm.conf
etc/lightdm/users.conf
etc/pam.d/lightdm)
build() {
cd $srcdir/$pkgname-$pkgver
patch -p1 -i ../lightdm-1.4.0-systemd_login1_power.patch
patch -p1 -i ../lightdm-lock-screen-before-switch.patch
./configure --prefix=/usr \
--sysconfdir=/etc --disable-static --libexecdir=/usr/lib/lightdm \
--localstatedir=/var --with-greeter-user=lightdm \
--with-greeter-session=lightdm-gtk-greeter --disable-tests
make || return 1
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
# init services file
install -D -m755 ../lightdm.rc $pkgdir/etc/rc.d/lightdm
install -D -m644 ../lightdm.service $pkgdir/usr/lib/systemd/system/lightdm.service
install -D -m644 ../lightdm.tmpfiles $pkgdir/usr/lib/tmpfiles.d/lightdm.conf
# some tweaks
rm -rf $pkgdir/etc/init
chmod +x ../xsession
install -D -m755 ../xsession $pkgdir/etc/lightdm
sed -i -e "s|#run-directory=/var/run/lightdm|run-directory=/run/lightdm|g" $pkgdir/etc/lightdm/lightdm.conf
sed -i -e "s|minimum-uid=500|minimum-uid=1000|g" $pkgdir/etc/lightdm/users.conf
sed -i -e "s|/usr/sbin/nologin|/sbin/nologin|g" $pkgdir/etc/lightdm/users.conf
sed -i -e "s|#session-wrapper=lightdm-session|session-wrapper=/etc/lightdm/xsession|g" $pkgdir/etc/lightdm/lightdm.conf
sed -i -e "s|#autologin-session=UNIMPLEMENTED|#autologin-session=UNIMPLEMENTED\n#pam-service=lightdm-autologin|g" $pkgdir/etc/lightdm/lightdm.conf
install -d -m770 $pkgdir/run/lightdm
# Doing Autologin and security fixes
cp ../lightdm-autologin.pam $pkgdir/etc/pam.d/lightdm-autologin
cp ../lightdm.pam $pkgdir/etc/pam.d/lightdm
sed 's#\[UserAccounts\]#\[UserList\]#g' -i $pkgdir/etc/lightdm/users.conf
install -d -m700 $pkgdir/usr/share/polkit-1/rules.d/
install -m644 ../lightdm.rules $pkgdir/usr/share/polkit-1/rules.d/lightdm.rules
}
md5sums=('622d9087ec773dd0626a250a5868f88c'
'6699eb35f65ff498d1d05e6782f4f902'
'737c6f27488517c6320bfc797954b400'
'b1e1baf7351ff58c7b3b9b204472f6bb'
'683bc8bc3f423157065dc6295f9fecef'
'9e39da461e36f9d3fdd4447a80ebd878'
'a5c60ec8739a698e4127b47ef417e517'
'2a7326f4de1d949b8c96749b62cc5021'
'1aac33da4bb5d6c5bb2b8fa72ae922b9'
'43314fcf13397aaf2321a86d7ed9452c')

View file

@ -1,209 +0,0 @@
diff -up lightdm-1.4.0/liblightdm-gobject/power.c.systemd_login1_power lightdm-1.4.0/liblightdm-gobject/power.c
--- lightdm-1.4.0/liblightdm-gobject/power.c.systemd_login1_power 2011-12-08 19:51:23.000000000 -0600
+++ lightdm-1.4.0/liblightdm-gobject/power.c 2013-01-10 22:34:41.782151231 -0600
@@ -18,6 +18,7 @@
static GDBusProxy *upower_proxy = NULL;
static GDBusProxy *ck_proxy = NULL;
+static GDBusProxy *login1_proxy = NULL;
static gboolean
upower_call_function (const gchar *function, gboolean default_result, GError **error)
@@ -148,6 +149,59 @@ ck_call_function (const gchar *function,
return function_result;
}
+static gboolean
+login1_call_function (const gchar *function, GVariant *parameters, gboolean default_result, GError **error)
+{
+ GVariant *result;
+ gboolean function_result = FALSE;
+ const gchar *true_result = "yes";
+ gchar *str_result;
+
+ if (!login1_proxy)
+ {
+ login1_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ "org.freedesktop.login1",
+ "/org/freedesktop/login1",
+ "org.freedesktop.login1.Manager",
+ NULL,
+ error);
+ if (!login1_proxy)
+ return FALSE;
+ }
+
+ result = g_dbus_proxy_call_sync (login1_proxy,
+ function,
+ parameters,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ error);
+
+ if (!result)
+ return default_result;
+
+ if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(b)")))
+ g_variant_get (result, "(s)", &function_result);
+
+ /**
+ * CanReboot, CanPowerOff returns a string "yes", "no", or "challenge", not a boolean as ConsoleKit
+ **/
+ if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(s)"))) {
+ g_variant_get (result, "(b)", str_result);
+ if(g_strcmp0(str_result,true_result) == 0) {
+ function_result = TRUE;
+ }
+ else {
+ function_result = default_result;
+ }
+ }
+
+ g_variant_unref (result);
+ return function_result;
+}
+
/**
* lightdm_get_can_restart:
*
@@ -158,7 +212,11 @@ ck_call_function (const gchar *function,
gboolean
lightdm_get_can_restart (void)
{
- return ck_call_function ("CanRestart", FALSE, NULL);
+ gboolean function_result = FALSE;
+ function_result = login1_call_function ("CanReboot", NULL, FALSE, NULL);
+ if (!function_result)
+ function_result = ck_call_function ("CanRestart", FALSE, NULL);
+ return function_result;
}
/**
@@ -172,7 +230,11 @@ lightdm_get_can_restart (void)
gboolean
lightdm_restart (GError **error)
{
- return ck_call_function ("Restart", TRUE, error);
+ gboolean function_result = FALSE;
+ function_result = login1_call_function ("Reboot", g_variant_new("(b)",0), TRUE, error);
+ if (!function_result)
+ function_result = ck_call_function ("Restart", TRUE, error);
+ return function_result;
}
/**
@@ -185,7 +247,11 @@ lightdm_restart (GError **error)
gboolean
lightdm_get_can_shutdown (void)
{
- return ck_call_function ("CanStop", FALSE, NULL);
+ gboolean function_result = FALSE;
+ function_result = login1_call_function ("CanPowerOff", NULL, FALSE, NULL);
+ if (!function_result)
+ function_result = ck_call_function ("CanStop", FALSE, NULL);
+ return function_result;
}
/**
@@ -199,5 +265,9 @@ lightdm_get_can_shutdown (void)
gboolean
lightdm_shutdown (GError **error)
{
- return ck_call_function ("Stop", TRUE, error);
+ gboolean function_result = FALSE;
+ function_result = login1_call_function ("PowerOff", g_variant_new("(b)",0), TRUE, error);
+ if (!function_result)
+ function_result = ck_call_function ("Stop", TRUE, error);
+ return function_result;
}
diff -up lightdm-1.4.0/liblightdm-qt/power.cpp.systemd_login1_power lightdm-1.4.0/liblightdm-qt/power.cpp
--- lightdm-1.4.0/liblightdm-qt/power.cpp.systemd_login1_power 2011-12-08 19:51:23.000000000 -0600
+++ lightdm-1.4.0/liblightdm-qt/power.cpp 2013-01-10 22:57:15.458512125 -0600
@@ -16,6 +16,7 @@
#include <QtCore/QVariant>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusReply>
+#include <QDebug>
#include "config.h"
@@ -27,11 +28,13 @@ public:
PowerInterfacePrivate();
QScopedPointer<QDBusInterface> powerManagementInterface;
QScopedPointer<QDBusInterface> consoleKitInterface;
+ QScopedPointer<QDBusInterface> login1Interface;
};
PowerInterface::PowerInterfacePrivate::PowerInterfacePrivate() :
powerManagementInterface(new QDBusInterface("org.freedesktop.UPower","/org/freedesktop/UPower", "org.freedesktop.UPower", QDBusConnection::systemBus())),
- consoleKitInterface(new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", QDBusConnection::systemBus()))
+ consoleKitInterface(new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", QDBusConnection::systemBus())),
+ login1Interface(new QDBusInterface("org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", QDBusConnection::systemBus()))
{
}
@@ -81,34 +84,53 @@ void PowerInterface::hibernate()
bool PowerInterface::canShutdown()
{
+ if ( d->login1Interface->isValid() ) {
+ QDBusReply<QString> reply1 = d->login1Interface->call("CanPowerOff");
+ if (reply1.isValid()) {
+ return (reply1.value()=="yes");
+ }
+ }
+ qWarning() << d->login1Interface->lastError();
+
QDBusReply<bool> reply = d->consoleKitInterface->call("CanStop");
if (reply.isValid()) {
return reply.value();
}
- else {
- return false;
- }
+ return false;
}
void PowerInterface::shutdown()
{
- d->consoleKitInterface->call("Stop");
+ if ( d->login1Interface->isValid() )
+ d->login1Interface->call("PowerOff",false);
+ else
+ d->consoleKitInterface->call("Stop");
}
bool PowerInterface::canRestart()
{
+ if ( d->login1Interface->isValid() ) {
+ QDBusReply<QString> reply1 = d->login1Interface->call("CanReboot");
+ if (reply1.isValid()) {
+ return (reply1.value()=="yes");
+ }
+ }
+ qWarning() << d->login1Interface->lastError();
+
QDBusReply<bool> reply = d->consoleKitInterface->call("CanRestart");
if (reply.isValid()) {
return reply.value();
}
- else {
- return false;
- }
+
+ return false;
}
void PowerInterface::restart()
{
- d->consoleKitInterface->call("Restart");
+ if ( d->login1Interface->isValid() )
+ d->login1Interface->call("Reboot",false);
+ else
+ d->consoleKitInterface->call("Restart");
}
#include "power_moc.cpp"

View file

@ -1,20 +0,0 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so
auth requisite pam_permit.so
auth sufficient pam_succeed_if.so uid >= 1000 quiet
auth required pam_deny.so
account required pam_access.so
account required pam_time.so
account required pam_unix.so
password required pam_deny.so
session required pam_loginuid.so
-session optional pam_systemd.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session required pam_unix.so

View file

@ -1,55 +0,0 @@
# HG changeset patch
# Parent b329fa1badaa454239690c3feb93d53324134915
try to lock the screen before switching users
diff --git a/utils/gdmflexiserver b/utils/gdmflexiserver
--- a/utils/gdmflexiserver
+++ b/utils/gdmflexiserver
@@ -9,9 +9,47 @@
#
# See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
+PATH=/usr/local/bin:/bin:/usr/bin
+export PATH
+
if [ -z "$XDG_SEAT_PATH" ]; then
# something went wrong
exit 1
fi
+find_command () {
+ cmd="$1"
+ oIFS="${IFS}"; IFS=:
+ set -- ${PATH}
+ IFS="${oIFS}"
+
+ for part; do
+ [ -x "${part}/${cmd}" ] && return 0
+ done
+ return 1
+}
+
+lock_screen () {
+ for lock_cmd in \
+ "xscreensaver-command -lock" \
+ "gnome-screensaver-command --lock" \
+ "dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call /ScreenSaver org.freedesktop.ScreenSaver.Lock"
+ do
+ ${lock_cmd} >/dev/null 2>&1 && return
+ done
+
+ for lock_cmd in \
+ "slock" \
+ "xlock -mode blank"
+ do
+ set -- ${lock_cmd}
+ if find_command "$1"; then
+ ${lock_cmd} >/dev/null 2>&1 &
+ return
+ fi
+ done
+}
+
+lock_screen
+
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter

View file

@ -1,14 +0,0 @@
[Unit]
Description=LightDM Display Manager
After=systemd-user-sessions.service
Conflicts=plymouth-quit.service
After=plymouth-quit.service
[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
[Install]
WantedBy=graphical.target
Alias=display-manager.service

View file

@ -1,19 +0,0 @@
pkgname=lightdm
post_install() {
getent group lightdm > /dev/null 2>&1 || groupadd -g 620 lightdm
getent passwd lightdm > /dev/null 2>&1 || useradd -c 'LightDM Display Manager' -u 620 -g lightdm -d /var/run/lightdm -s /sbin/nologin lightdm
passwd -l lightdm > /dev/null
chown -R lightdm:lightdm /var/run/lightdm > /dev/null
chmod +r /etc/lightdm/lightdm.conf
echo "You need to install lightdm-gtk-greeter to run the default and most stable greeter"
}
post_upgrade() {
post_install
}
post_remove() {
getent passwd lightdm > /dev/null 2>&1 && userdel lightdm
getent group lightdm > /dev/null 2>&1 && groupdel lightdm
}

View file

@ -1,12 +0,0 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_unix.so
-auth optional pam_gnome_keyring.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
password required pam_unix.so
-session optional pam_loginuid.so
-session optional pam_systemd.so
-session optional pam_gnome_keyring.so auto_start

View file

@ -1,36 +0,0 @@
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=$(pidof -o %PPID /usr/sbin/lightdm)
case "$1" in
start)
stat_busy "Starting LightDM"
[ -z "$PID" ] && /usr/sbin/lightdm &>/dev/null &
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon lightdm
stat_done
fi
;;
stop)
stat_busy "Stopping LightDM"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon lightdm
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

View file

@ -1,15 +0,0 @@
polkit.addRule(function(action, subject) {
if (subject.user == "lightdm") {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.consolekit.system.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.upower.") == 0) {
return polkit.Result.YES;
}
}
});

View file

@ -1,14 +0,0 @@
[Unit]
Description=LightDM Display Manager
Documentation=man:lightdm(1)
After=systemd-user-sessions.service
[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
Restart=always
IgnoreSIGPIPE=no
BusName=org.freedesktop.DisplayManager
[Install]
Alias=display-manager.service

View file

@ -1 +0,0 @@
d /run/lightdm 0770 lightdm lightdm -

View file

@ -1,69 +0,0 @@
#!/bin/sh
#
# LightDM wrapper to run around X sessions.
echo "Running X session wrapper"
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
if [ -f "$file" ]; then
echo "Loading resource: $file"
xrdb -nocpp -merge "$file"
fi
done
# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
if [ -f "$file" ]; then
echo "Loading keymap: $file"
setxkbmap `cat "$file"`
XKB_IN_USE=yes
fi
done
# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
if [ -f "$file" ]; then
echo "Loading modmap: $file"
xmodmap "$file"
fi
done
fi
unset XKB_IN_USE
# Run all system xinitrc shell scripts.
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
for script in $xinitdir/*; do
echo "Loading xinit script $script"
if [ -x "$script" -a ! -d "$script" ]; then
. "$script"
fi
done
fi
# Load Xsession scripts
xsessionddir="/etc/X11/Xsession.d"
if [ -d "$xsessionddir" ]; then
for i in `ls $xsessionddir`; do
script="$xsessionddir/$i"
echo "Loading X session script $script"
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
. "$script"
fi
done
fi
echo "X session wrapper complete, running session $@"
exec $@