Add changes done by Klaumi Klingsporn <klaumikli@gmx.de>.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 2 Oct 2014 15:06:21 +0000 (18:06 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 2 Oct 2014 15:11:07 +0000 (18:11 +0300)
  * disabled 90_fix_event_check.patch: applied upstream
  * disabled 21_fix_greeter_location.patch: Problem seemed to be
    solved upstream
  * disabled debian/patches/15-path-replace.patch:
    Problem seemed to be solved upstream differently
  * disabled debian/patches/22_ubuntu-i18n_oneiric.patch:
    Problem seemed to be solved upstream differently
  * added debian/patches/23_debian-config.patch
  * adjusted debian/lxdm.postinst for debian-systemd
  * added debian/lxdm.service
  * adjusted debian/rules-file for systemd
  * adjusted debian/lxdm.pam

13 files changed:
debian/control
debian/copyright
debian/lxdm.pam
debian/lxdm.postinst
debian/lxdm.service [new file with mode: 0644]
debian/patches/15-path-replace.patch [deleted file]
debian/patches/20_disable_resize_grip.patch [deleted file]
debian/patches/21_fix_greeter_location.patch [deleted file]
debian/patches/22_ubuntu_i18n_oneiric.patch [deleted file]
debian/patches/23_debian-config.patch [new file with mode: 0644]
debian/patches/90_fix_event_check.patch [deleted file]
debian/patches/series
debian/rules

index 5077532..707eeec 100644 (file)
@@ -8,7 +8,8 @@ Uploaders:
 Build-Depends:
  debhelper (>= 9), autotools-dev, automake, intltool, iso-codes,
  libck-connector-dev, libcrypto++-dev, libglib2.0-dev, libgtk2.0-dev,
- libpam0g-dev, libtool, libx11-dev, libxmu-dev, pkg-config
+ libpam0g-dev, libtool, libx11-dev, libxmu-dev, pkg-config,
+ dh-systemd, po-debconf, libwvstreams-dev
 Standards-Version: 3.9.6
 Homepage: http://www.lxde.org/
 Vcs-Browser: http://git.lxde.org/gitweb/?p=debian/lxdm.git
@@ -19,7 +20,8 @@ Architecture: any
 Depends:
  ${misc:Depends}, ${misc:Depends}, gtk2-engines-pixbuf, iso-codes,
  libpam-modules, libpam-runtime, librsvg2-common, lsb-base,
- x11-utils | xbase-clients | xmessage
+ x11-utils | xbase-clients | xmessage,
+ debconf (>= 1.2.9) | debconf-2.0, desktop-base
 Recommends: lxde-common, lxsession
 Provides: x-display-manager
 Description: LXDE display manager
index a660847..39e9528 100644 (file)
@@ -31,6 +31,7 @@ Copyright: 2010 Andrew Lee (李健秋) <ajqlee@debian.org>
            2010 Nikolas Poniros <edhunter@sidux.com>
            2010 Chris Hildebrandt <slam@sidux.com>
            2012 Daniel Baumann <daniel@debian.org>
+           2014 Klaumi Klingsporn <klaumikli@gmx.de>
 License: GPL-2+
 
 License: GPL-2+
index 32d0875..ee49dff 100644 (file)
@@ -1,14 +1,39 @@
 #%PAM-1.0
+# Comments stolen from lightdm-pam-file
+# Block login if they are globally disabled
 auth    requisite       pam_nologin.so
+
+# Load environment from /etc/environment and ~/.pam_environment
 auth    required        pam_env.so readenv=1
 auth    required        pam_env.so readenv=1 envfile=/etc/default/locale
-auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
+
+# auth    sufficient      pam_succeed_if.so user ingroup nopasswdlogin
 @include common-auth
 auth    optional        pam_gnome_keyring.so
 @include common-account
+
+# SELinux needs to be the first session rule. This ensures that any
+# lingering context has been cleared. Without out this it is possible
+# that a module could execute code in the wrong domain.
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)
+#
 session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
+
+session required       pam_unix.so       # added by klaumi
 session required        pam_limits.so
-@include common-session-noninteractive
+session required       pam_loginuid.so           # added by klaumi
+# @include common-session-noninteractive  # commented out by klaumi
+@include common-session                  # added by klaumi
+
+# SELinux needs to intervene at login time to ensure that the process
+# starts in the proper default security context. Only sessions which are
+# intended to run in the user's context should be run after this.
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)
+#
 session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
+
 session optional        pam_gnome_keyring.so auto_start
+
 @include common-password
index b28e904..f5e8a9d 100644 (file)
@@ -42,7 +42,30 @@ fi
 
 # Registering the init scripts or starting the daemon may cause output to
 # stdout, which can confuse debconf.
-db_stop
+db_stop || true
+
+# update-rc.d levels (stolen from lightdm)
+S=30
+K=01
+
+if [ -x /etc/init.d/lxdm ]; then
+  update-rc.d lxdm defaults $S $K >/dev/null 2>&1
+fi
+
+if [ "$1" = "configure" ];
+then
+  invoke-rc.d dbus reload || true
+
+# set default-display-manager systemd service link according to our config (stolen from lightdm)
+  if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a -d /etc/systemd/system/ ]; then
+    SERVICE=/lib/systemd/system/$(basename $(cat "$DEFAULT_DISPLAY_MANAGER_FILE")).service
+    if [ -e "$SERVICE" ]; then
+      ln -sf "$SERVICE" /etc/systemd/system/display-manager.service
+    else
+      echo "ERROR: $SERVICE is the selected default display manager but does not exist" >&2
+    fi
+  fi
+fi
 
 # Remove alternative file if it's not a symlink, workaround for broken upgrade
 # See bug #616188
diff --git a/debian/lxdm.service b/debian/lxdm.service
new file mode 100644 (file)
index 0000000..749431d
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=LXDE Display Manager
+Documentation=man:lxdm(1)
+Conflicts=getty@tty1.service plymouth-quit.service
+After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
+
+[Service]
+# temporary safety check until all DMs are converted to correct
+# display-manager.service symlink handling
+ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lxdm" ]'
+ExecStart=/usr/sbin/lxdm
+Restart=always
+IgnoreSIGPIPE=no
+BusName=org.freedesktop.DisplayManager
+
+[Install]
+Alias=display-manager.service
diff --git a/debian/patches/15-path-replace.patch b/debian/patches/15-path-replace.patch
deleted file mode 100644 (file)
index a7efac9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#launchpad bug : #524761
-Index: lxdm-0.4.0/src/lxdm.c
-===================================================================
---- lxdm-0.4.0.orig/src/lxdm.c 2011-07-13 14:00:34.000000000 +0200
-+++ lxdm-0.4.0/src/lxdm.c      2011-07-24 18:00:58.000000000 +0200
-@@ -1472,7 +1472,7 @@
-       path = g_key_file_get_string(config, "base", "path", 0);
-       if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */
-               replace_env(env, "PATH=", path); /* override current $PATH with config value */
--      else /* don't use the global env, they are bad for user */
-+      else if(!getenv("PATH")) /* if PATH is not set */
-               replace_env(env, "PATH=", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"); /* set proper default */
-       g_free(path);
-       /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
diff --git a/debian/patches/20_disable_resize_grip.patch b/debian/patches/20_disable_resize_grip.patch
deleted file mode 100644 (file)
index a333db4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: lxdm-0.4.0/src/greeter.c
-===================================================================
---- lxdm-0.4.0.orig/src/greeter.c      2011-06-11 06:30:26.000000000 +0200
-+++ lxdm-0.4.0/src/greeter.c   2011-07-24 18:03:14.000000000 +0200
-@@ -998,9 +998,13 @@
-     builder = gtk_builder_new();
-     gtk_builder_add_from_file(builder, ui_file ? ui_file : LXDM_DATA_DIR "/lxdm.glade", NULL);
-     win = (GtkWidget*)gtk_builder_get_object(builder, "lxdm");
--#if GTK_CHECK_VERSION(3,0,0)
-+
-+    /*
-+    Remove resize grip in Ubuntu 11.04 which break background painting
-+    see https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/703658
-+    */
-     gtk_window_set_has_resize_grip(GTK_WINDOW(win),FALSE);
--#endif
-+
-     gtk_widget_realize(win);
- #if GTK_CHECK_VERSION(3,0,0)
-       window=gtk_widget_get_window(win);
diff --git a/debian/patches/21_fix_greeter_location.patch b/debian/patches/21_fix_greeter_location.patch
deleted file mode 100644 (file)
index 8b5e2a6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- lxdm-0.4.1.orig/data/lxdm.conf
-+++ lxdm-0.4.1/data/lxdm.conf
-@@ -16,7 +16,7 @@
- # xauth_path=/tmp
- ## greeter used to welcome the user
--greeter=/usr/local/libexec/lxdm-greeter-gtk
-+greeter=/usr/lib/lxdm/lxdm-greeter-gtk
- [server]
- ## arg used to start xserver, not fully function
diff --git a/debian/patches/22_ubuntu_i18n_oneiric.patch b/debian/patches/22_ubuntu_i18n_oneiric.patch
deleted file mode 100644 (file)
index ee1d7e7..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-Description: Adapt to the Oneiric model for setting languages/locales.
-Forwarded: not-needed
-Author: Gunnar Hjalmarsson <ubuntu@gunnar.cc>
-
---- lxdm.orig/data/Xsession    2011-07-29 15:42:33 +0200
-+++ lxdm/data/Xsession 2011-09-30 13:53:51 +0200
-@@ -9,9 +9,20 @@
-       LXSESSION=/usr/bin/startlxde
- fi
-+[ -f /etc/profile ] && . /etc/profile
-+[ -f ~/.profile ] && . ~/.profile
- [ -f /etc/xprofile ] && . /etc/xprofile
- [ -f ~/.xprofile ] && . ~/.xprofile
-+# override ~/.profile if language was set on the greeter
-+if [ -n "$GREETER_LANGUAGE" ]; then
-+      language_list=${GREETER_LANGUAGE%.*}${GREETER_LANGUAGE#*.UTF-8}:en
-+      export LANGUAGE="$language_list"
-+      export LC_MESSAGES="$GREETER_LANGUAGE"
-+      export LC_CTYPE="$GREETER_LANGUAGE"
-+      export LC_COLLATE="$GREETER_LANGUAGE"
-+fi
-+
- if [ -f /etc/X11/xinit/xinitrc-common ]; then
- # fedora
-       . /etc/X11/xinit/xinitrc-common
-
---- lxdm.orig/src/lxdm.c       2011-09-30 13:33:12 +0200
-+++ lxdm/src/lxdm.c    2011-09-30 14:02:20 +0200
-@@ -1369,11 +1369,6 @@
-                       session=g_key_file_get_string(dmrc,"Desktop","Session",NULL);
-                       alloc_session=TRUE;
-               }
--              if(!lang || !lang[0])
--              {
--                      lang=g_key_file_get_string(dmrc,"Desktop","Language",NULL);
--                      alloc_lang=TRUE;
--              }
-               g_key_file_free(dmrc);
-       }
-@@ -1478,9 +1473,9 @@
-       /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
-       if( lang && lang[0] )
-       {
--              replace_env(env, "LANG=", lang);
--              replace_env(env, "LC_MESSAGES=", lang);
--              replace_env(env, "LANGUAGE=", lang);
-+              /* use this special environment variable to set the language related
-+                 env. variables from Xsession after ~/.profile has been sourced */
-+              replace_env(env, "GREETER_LANGUAGE=", lang);
-       }
-       s->env = env;
-
diff --git a/debian/patches/23_debian-config.patch b/debian/patches/23_debian-config.patch
new file mode 100644 (file)
index 0000000..f8277cb
--- /dev/null
@@ -0,0 +1,33 @@
+Description: Change background-image to debians default and stop remaining users processes
+Forwarded: not-needed
+Author:Klaumi Klingsporn <klaumikli@gmx.de
+
+--- a/data/lxdm.conf.in
++++ b/data/lxdm.conf.in
+@@ -34,7 +34,8 @@
+ gtk_theme=Clearlooks
+ ## background of the greeter
+-bg=/usr/share/backgrounds/default.png
++#bg=/usr/share/backgrounds/default.png
++bg=/usr/share/images/desktop-base/login-background.svg
+ ## if show bottom pane
+ bottom_pane=1
+--- a/data/PostLogout.in
++++ b/data/PostLogout.in
+@@ -1,3 +1,13 @@
+ #!/bin/sh
+ #
+-# Note: this is a sample and will not be run as is.
++# PostLogout is run as the logged-in user right after he has logged out.
++
++# Kills all your processes when you log out.
++# (Stolen von Arch-Linux)
++ps --user $USER | awk 'NR > 1 {print $1}' | xargs -t kill
++
++# Fix for pulseaudio (Stolen von Arch-Linux):
++test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r
++
++# Sets the desktop background to solid black. Useful if you have multiple monitors.
++xsetroot -solid black
diff --git a/debian/patches/90_fix_event_check.patch b/debian/patches/90_fix_event_check.patch
deleted file mode 100644 (file)
index cd06e61..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From d4e41ecb36a1ea29482b75674d804bb0f05540b2 Mon Sep 17 00:00:00 2001
-From: dgod <dgod.osa@gmail.com>
-Date: Sun, 25 Dec 2011 15:23:19 +0800
-Subject: [PATCH] fix event check bug caused cpu 100%
-
----
- src/lxcom.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/lxcom.c b/src/lxcom.c
-index 02763eb..18ee12e 100644
---- a/src/lxcom.c
-+++ b/src/lxcom.c
-@@ -89,7 +89,7 @@ static gboolean lxcom_prepare (GSource *source,gint *timeout)
- static gboolean lxcom_check(GSource *source)
- {
--      return TRUE;
-+      return (((LXComSource*)source)->poll.revents&G_IO_IN)?TRUE:FALSE;
- }
- static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer user_data)
--- 
-1.7.4.1
index 987f880..db3e99b 100644 (file)
@@ -1,5 +1 @@
-15-path-replace.patch
-# 20_disable_resize_grip.patch
-21_fix_greeter_location.patch
-22_ubuntu_i18n_oneiric.patch
-90_fix_event_check.patch
+23_debian-config.patch
index 3859a3d..b5176f2 100755 (executable)
@@ -7,13 +7,14 @@ config_file = /etc/lxdm/default.conf
 CFLAGS+=-DCONFIG_FILE=\\\"$(config_file)\\\"
 
 %:
-       dh ${@}
+       dh ${@} --with systemd --parallel
 
 override_dh_auto_configure:
-       dh_auto_configure -- LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" \
+       dh_auto_configure -- --prefix=/usr \
+               --bindir=/usr/bin \
                --sysconfdir=/etc \
                --libexecdir=/usr/lib/lxdm \
-               --enable-debug
+               --with-pam
 
 override_dh_auto_test:
        # disabled
@@ -27,3 +28,6 @@ override_dh_install:
 
 override_dh_installinit:
        dh_installinit --no-start
+
+override_dh_systemd_start:
+       dh_systemd_start -plxdm --no-start -r lxdm.service