[Pkg-xfce-commits] r4613 - in goodies/trunk/lightdm/debian: . patches

Yves-Alexis Perez corsac at alioth.debian.org
Sat Dec 4 04:14:26 UTC 2010


Author: corsac
Date: 2010-12-04 16:14:14 +0000 (Sat, 04 Dec 2010)
New Revision: 4613

Added:
   goodies/trunk/lightdm/debian/liblightdm-gobject-0-0.install
   goodies/trunk/lightdm/debian/liblightdm-gobject-dev.install
   goodies/trunk/lightdm/debian/liblightdm-qt-0-0.install
   goodies/trunk/lightdm/debian/liblightdm-qt-dev.install
   goodies/trunk/lightdm/debian/lightdm-gtk.install
   goodies/trunk/lightdm/debian/lightdm-qt.install
   goodies/trunk/lightdm/debian/lightdm-webkit.install
   goodies/trunk/lightdm/debian/lightdm.install
   goodies/trunk/lightdm/debian/lightdm.postinst
   goodies/trunk/lightdm/debian/lightdm.postrm
   goodies/trunk/lightdm/debian/patches/
   goodies/trunk/lightdm/debian/patches/01_initgroups.patch
   goodies/trunk/lightdm/debian/patches/02_default-config.patch
   goodies/trunk/lightdm/debian/patches/03_fix-xauthority-perms.patch
   goodies/trunk/lightdm/debian/patches/04_fix_xauthority-path.patch
   goodies/trunk/lightdm/debian/patches/series
Modified:
   goodies/trunk/lightdm/debian/changelog
   goodies/trunk/lightdm/debian/control
   goodies/trunk/lightdm/debian/lightdm.init
   goodies/trunk/lightdm/debian/rules
Log:
huge update

* new upstream release
* split packages between libs, greeters, dm itself
* add initscript and maintainer scripts
* add patches



Modified: goodies/trunk/lightdm/debian/changelog
===================================================================
--- goodies/trunk/lightdm/debian/changelog	2010-12-04 11:42:18 UTC (rev 4612)
+++ goodies/trunk/lightdm/debian/changelog	2010-12-04 16:14:14 UTC (rev 4613)
@@ -2,4 +2,4 @@
 
   * Initial release.                                        closes: #
 
- -- Yves-Alexis Perez <corsac at debian.org>  Sun, 01 Mar 2009 00:27:40 +0100
+ -- Yves-Alexis Perez <corsac at debian.org>  Fri, 03 Dec 2010 23:29:38 +0100

Modified: goodies/trunk/lightdm/debian/control
===================================================================
--- goodies/trunk/lightdm/debian/control	2010-12-04 11:42:18 UTC (rev 4612)
+++ goodies/trunk/lightdm/debian/control	2010-12-04 16:14:14 UTC (rev 4613)
@@ -7,7 +7,8 @@
  Simon Huggins <huggie at earth.li>          
 Build-Depends: debhelper (>= 7.0.50~), intltool, pkg-config, libglib2.0-dev, 
  libdbus-glib-1-dev, libxcb1-dev, libxdmcp-dev, libpam-dev, libxklavier-dev, 
- libgtk2.0-dev, libwebkit-dev, libck-connector-dev, gnome-doc-utils
+ libgtk2.0-dev, libwebkit-dev, libck-connector-dev, gnome-doc-utils, libqt4-dev,
+ hardening-includes
 Standards-Version: 3.9.1
 Homepage: https://launchpad.net/lightdm
 Vcs-Svn: svn://svn.debian.org/pkg-xfce/goodies/trunk/lightdm
@@ -17,7 +18,8 @@
 Package: lightdm
 Section: xfce
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, lightdm-gtk | lightdm-webkit | lightdm-qt, 
+ dbus
 Description: simple display manager
  An X display manager that:
   * Has a lightweight codebase
@@ -25,3 +27,48 @@
   * Has a well defined interface between the server and user interface
   * Fully themeable (easiest with the webkit interface)
   * Cross-desktop (greeters can be written in any toolkit)
+
+Package: lightdm-gtk
+Section: xfce
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (GTK+ greeter)
+ This package contains the GTK+ greeter for the lightdm display manager
+
+Package: lightdm-webkit
+Section: x11
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (webkit greeter)
+ This package contains the webkit greeter for the lightdm display manager
+
+Package: liblightdm-gobject-0-0
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (gobject library)
+ This package contains the gobject library for lightdm, used by the GTK+
+ greeter.
+
+Package: liblightdm-gobject-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (gobject development files)
+ This package contains the development files for lightdm.
+ They can be used to build new greeters applications GTK+ based.
+
+Package: liblightdm-qt-0-0
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (Qt library)
+ This package contains the Qt library for lightdm.
+
+Package: liblightdm-qt-dev
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: simple display manager (Qt development files)
+ This package contains the development files for lightdm.
+ They can be used to build new greeters applications Qt based.

Added: goodies/trunk/lightdm/debian/liblightdm-gobject-0-0.install
===================================================================
--- goodies/trunk/lightdm/debian/liblightdm-gobject-0-0.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/liblightdm-gobject-0-0.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1 @@
+usr/lib/liblightdm-gobject*.so.*

Added: goodies/trunk/lightdm/debian/liblightdm-gobject-dev.install
===================================================================
--- goodies/trunk/lightdm/debian/liblightdm-gobject-dev.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/liblightdm-gobject-dev.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,5 @@
+usr/include/lightdm-gobject*
+usr/lib/pkgconfig/liblightdm-gobject-*.pc
+usr/lib/liblightdm-gobject-*.a
+usr/lib/liblightdm-gobject-*.so
+usr/share/gtk-doc

Added: goodies/trunk/lightdm/debian/liblightdm-qt-0-0.install
===================================================================
--- goodies/trunk/lightdm/debian/liblightdm-qt-0-0.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/liblightdm-qt-0-0.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1 @@
+usr/lib/liblightdm-qt*.so.*

Added: goodies/trunk/lightdm/debian/liblightdm-qt-dev.install
===================================================================
--- goodies/trunk/lightdm/debian/liblightdm-qt-dev.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/liblightdm-qt-dev.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,4 @@
+usr/include/lightdm-qt*
+usr/lib/pkgconfig/liblightdm-qt-*.pc
+usr/lib/liblightdm-qt-*.a
+usr/lib/liblightdm-qt-*.so

Added: goodies/trunk/lightdm/debian/lightdm-gtk.install
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-gtk.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-gtk.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,2 @@
+usr/lib/lightdm/ldm-gtk-greeter
+usr/share/lightdm/themes/gnome

Added: goodies/trunk/lightdm/debian/lightdm-qt.install
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-qt.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-qt.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1 @@
+usr/lib/lightdm/ldm-qt-greeter

Added: goodies/trunk/lightdm/debian/lightdm-webkit.install
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-webkit.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-webkit.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,2 @@
+usr/lib/lightdm/ldm-webkit-greeter
+usr/share/lightdm/themes/webkit

Modified: goodies/trunk/lightdm/debian/lightdm.init
===================================================================
--- goodies/trunk/lightdm/debian/lightdm.init	2010-12-04 11:42:18 UTC (rev 4612)
+++ goodies/trunk/lightdm/debian/lightdm.init	2010-12-04 16:14:14 UTC (rev 4613)
@@ -1,80 +1,79 @@
-#!/bin/sh
-
-# Largely inspired from slim's init script, which is:
-
-# Largely adapted from xdm's init script:
-# Copyright 1998-2002, 2004, 2005 Branden Robinson <branden at debian.org>.
-# Copyright 2006 Eugene Konev <ejka at imfi.kspu.ru>
-
+#! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          lightdm
-# Required-Start:    $local_fs $remote_fs
+# Should-Start:      console-screen kbd acpid dbus hal consolekit
+# Required-Start:    $local_fs $remote_fs x11-common
 # Required-Stop:     $local_fs $remote_fs
-# Should-Start:      xfs $named slapd
-# Should-Stop:       xfs $named slapd
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: Start/stop the LightDM display manager
+# Short-Description: Light Display Manager
+# Description:       Debian init script for the Light Display Manager
 ### END INIT INFO
+#
+# Author:       Yves-Alexis Perez <corsac at debian.org> using gdm script from 
+#               Ryan Murray <rmurray at debian.org>
+#
+set -e
 
-test -z "$HEED_DEFAULT_DISPLAY_MANAGER" && HEED_DEFAULT_DISPLAY_MANAGER=true
-DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
-
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/bin/lightdm
-PIDFILE=/var/run/lightdm.pid
 
-SSD_START_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --startas $DAEMON -- -d"
-SSD_STOP_ARGS="--pidfile $PIDFILE --name $(basename $DAEMON) --retry TERM/5/TERM/5"
+test -x $DAEMON || exit 0
 
-case $1 in
+if [ -r /etc/default/locale ]; then
+  . /etc/default/locale
+  export LANG LANGUAGE
+fi
+
+. /lib/lsb/init-functions
+
+# To start lightdm even if it is not the default display manager, change
+# HEED_DEFAULT_DISPLAY_MANAGER to "false."
+HEED_DEFAULT_DISPLAY_MANAGER=true
+DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
+
+case "$1" in
   start)
-    if [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
-       [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
-       [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
-      echo "Not starting X display manager (lightdm); it is not the default display manager."
-    else
-      echo -n "Starting X display manager: lightdm"
-      start-stop-daemon --start --quiet $SSD_START_ARGS || echo -n " already running"
-      echo "."
-    fi
+        CONFIGURED_DAEMON=$(basename "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)")
+        if grep -wqs text /proc/cmdline; then
+            log_warning_msg "Not starting Light Display Manager (lightdm); found 'text' in kernel commandline."
+        elif [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] && \
+           [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && \
+           [ "$CONFIGURED_DAEMON" != lightdm ] ; then
+                log_action_msg "Not starting Light Display Manager; it is not the default display manager"
+        else
+                log_daemon_msg "Starting Light Display Manager" "lightdm"
+                start-stop-daemon --start --quiet --pidfile /var/run/lightdm.pid --name lightdm --exec $DAEMON -b|| echo -n " already running"
+                log_end_msg $?
+        fi
   ;;
-
   stop)
-    echo -n "Stopping X display manager: lightdm"
-    if ! [ -f $PIDFILE ]; then
-      echo -n " not running ($PIDFILE not found)"
-    else
-      start-stop-daemon --stop --quiet $SSD_STOP_ARGS
-      SSD_RES=$?
-      if [ $SSD_RES -eq 1 ]; then
-        echo -n " not running"
-      fi
-      if [ $SSD_RES -eq 2 ]; then
-        echo -n " not responding to TERM signals"
-      else
-    if [ -f $PIDFILE ]; then
-      echo -n " (removing stale $PIDFILE)"
-      rm $PIDFILE
-    fi
-      fi
-    fi
-    echo "."
+        log_daemon_msg "Stopping Light Display Manager" "lightdm"
+        set +e
+        start-stop-daemon --stop --quiet --pidfile /var/run/lightdm.pid \
+                --name lightdm --retry 5
+        set -e
+        log_end_msg $?
   ;;
-
-  restart)
-    $0 stop
-    sleep 2
-    $0 start
+  reload)
+        log_daemon_msg "Scheduling reload of Light Display Manager configuration" "lightdm"
+        set +e
+        start-stop-daemon --stop --signal USR1 --quiet --pidfile \
+                /var/run/lightdm.pid --name lightdm
+        set -e
+        log_end_msg $?
   ;;
-
-  force-reload)
-    /etc/init.d/lightdm restart
+  status)
+        status_of_proc -p "$PIDFILE" "$DAEMON" lightdm && exit 0 || exit $?
   ;;
-
+  restart|force-reload)
+        $0 stop
+        $0 start
+  ;;
   *)
-    echo "Usage: /etc/init.d/lightdm {start|stop|restart|force-reload}"
-    exit 1
+        echo "Usage: /etc/init.d/lightdm {start|stop|restart|reload|force-reload|status}"
+        exit 1
   ;;
 esac
 
-# End of file
+exit 0

Added: goodies/trunk/lightdm/debian/lightdm.install
===================================================================
--- goodies/trunk/lightdm/debian/lightdm.install	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm.install	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,3 @@
+etc
+usr/bin
+usr/share/man

Added: goodies/trunk/lightdm/debian/lightdm.postinst
===================================================================
--- goodies/trunk/lightdm/debian/lightdm.postinst	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm.postinst	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ];
+then
+  echo "adding lightdm user" >&2
+  adduser --system --home /var/lib/lightdm lightdm || true
+
+  invoke-rc.d dbus reload
+fi
+
+#DEBHELPER#

Added: goodies/trunk/lightdm/debian/lightdm.postrm
===================================================================
--- goodies/trunk/lightdm/debian/lightdm.postrm	                        (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm.postrm	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" = "purge" ];
+then
+  echo "removing lightdm user" >&2
+  deluser system lightdm || echo "failure removing lightdm user" >&2
+fi
+
+#DEBHELPER#

Added: goodies/trunk/lightdm/debian/patches/01_initgroups.patch
===================================================================
--- goodies/trunk/lightdm/debian/patches/01_initgroups.patch	                        (rev 0)
+++ goodies/trunk/lightdm/debian/patches/01_initgroups.patch	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,14 @@
+=== modified file 'src/session.c'
+--- lightdm/src/session.c	2010-11-12 02:53:29 +0000
++++ lightdm/src/session.c	2010-12-04 11:21:17 +0000
+@@ -244,6 +244,9 @@
+     }
+     g_free (username);
+ 
++    if (initgroups(user_info->pw_name, user_info->pw_gid) < 0)
++      g_warning("Failed to initialize supplementary groups for %s: %s",username, strerror(errno));
++
+     env = get_env (session);
+ 
+     result = g_shell_parse_argv (session->priv->command, &argc, &argv, &error);
+

Added: goodies/trunk/lightdm/debian/patches/02_default-config.patch
===================================================================
--- goodies/trunk/lightdm/debian/patches/02_default-config.patch	                        (rev 0)
+++ goodies/trunk/lightdm/debian/patches/02_default-config.patch	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,33 @@
+=== modified file 'data/lightdm.conf'
+--- lightdm/data/lightdm.conf	2010-11-17 03:23:08 +0000
++++ lightdm/data/lightdm.conf	2010-12-04 16:05:01 +0000
+@@ -9,9 +9,9 @@
+ #
+ [LightDM]
+ #xserver=/usr/bin/X
+-#authorization-directory=/var/cache/lightdm/authority
++authorization-directory=/var/lib/lightdm/authority
+ #log-directory=/var/log/lightdm
+-#session-wrapper=/etc/X11/Xsession
++session-wrapper=/etc/X11/Xsession
+ displays=default-display
+ 
+ #
+@@ -54,7 +54,7 @@
+ # hidden-shells = Shells that indicate a user cannot login
+ #
+ [UserManager]
+-#load-users=true
++load-users=false
+ #minimum-uid=500
+ #hidden-users=nobody nobody4 noaccess
+ #hidden-shells=/bin/false /usr/sbin/nologin
+@@ -70,6 +70,6 @@
+ # it can be a word and the first 7 characters are used as the key.
+ #
+ [xdmcp]
+-#enabled=true
++enabled=false
+ #port=177
+ #key=0x0123456789ABCD
+

Added: goodies/trunk/lightdm/debian/patches/03_fix-xauthority-perms.patch
===================================================================
--- goodies/trunk/lightdm/debian/patches/03_fix-xauthority-perms.patch	                        (rev 0)
+++ goodies/trunk/lightdm/debian/patches/03_fix-xauthority-perms.patch	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,22 @@
+=== modified file 'src/xauth.c'
+--- lightdm/src/xauth.c	2010-08-05 00:24:13 +0000
++++ lightdm/src/xauth.c	2010-12-04 15:13:54 +0000
+@@ -12,6 +12,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <pwd.h>
++#include <sys/stat.h>
+ 
+ #include "xauth.h"
+ 
+@@ -109,6 +110,9 @@
+         g_object_unref (file);
+         return FALSE;
+     }
++    
++    if (chmod (path, S_IRUSR | S_IWUSR) != 0)
++        g_warning ("Failed to set permissions on authorization file");
+ 
+     /* NOTE: Would like to do:
+      * g_file_set_attribute_string (file, G_FILE_ATTRIBUTE_OWNER_USER, username, G_FILE_QUERY_INFO_NONE, NULL, error))
+

Added: goodies/trunk/lightdm/debian/patches/04_fix_xauthority-path.patch
===================================================================
--- goodies/trunk/lightdm/debian/patches/04_fix_xauthority-path.patch	                        (rev 0)
+++ goodies/trunk/lightdm/debian/patches/04_fix_xauthority-path.patch	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,67 @@
+=== modified file 'src/display-manager.c'
+--- lightdm/src/display-manager.c	2010-11-17 03:23:08 +0000
++++ lightdm/src/display-manager.c	2010-12-04 15:38:08 +0000
+@@ -146,36 +146,44 @@
+     session_set_env (session, "LDM_DISPLAY", string);
+     g_free (string);
+ 
+-    authorization = xserver_get_authorization (display_get_xserver (display));
+-    if (authorization)
+-    {
+-        gchar *path;
+-
+-        path = get_authorization_path (manager);
+-        session_set_authorization (session, authorization, path);
+-        g_free (path);
+-    }
+-
+     if (is_greeter)
+     {
+         gchar *filename;
+         filename = g_strdup_printf ("%s-greeter.log", xserver_get_address (display_get_xserver (display)));
+         string = g_build_filename (manager->priv->log_dir, filename, NULL);
+         g_free (filename);
++        authorization = xserver_get_authorization (display_get_xserver (display));
++        if (authorization)
++        {
++            gchar *path;
++
++            path = get_authorization_path (manager);
++            session_set_authorization (session, authorization, path);
++            g_free (path);
++        }
++
+     }
+     else
+     {
++        struct passwd *user_info = getpwnam (session_get_username (session));
++        if (user_info)
++            string = g_build_filename (user_info->pw_dir, ".xsession-errors", NULL);
++        else
++            g_warning ("Failed to get user info for user '%s'", session_get_username (session));
++
++        authorization = xserver_get_authorization (display_get_xserver (display));
++        if (authorization)
++        {
++            gchar *path;
++
++            path = g_build_filename(user_info->pw_dir, ".Xauthority", NULL);
++            session_set_authorization (session, authorization, path);
++            g_free (path);
++        }
++
+         // FIXME: Copy old error file
+         if (manager->priv->test_mode)
+             string = g_strdup (".xsession-errors");
+-        else
+-        {
+-            struct passwd *user_info = getpwnam (session_get_username (session));
+-            if (user_info)
+-                string = g_build_filename (user_info->pw_dir, ".xsession-errors", NULL);
+-            else
+-                g_warning ("Failed to get user info for user '%s'", session_get_username (session));
+-        }
+     }
+     g_debug ("Logging to %s", string);
+     session_set_log_file (session, string);
+

Added: goodies/trunk/lightdm/debian/patches/series
===================================================================
--- goodies/trunk/lightdm/debian/patches/series	                        (rev 0)
+++ goodies/trunk/lightdm/debian/patches/series	2010-12-04 16:14:14 UTC (rev 4613)
@@ -0,0 +1,4 @@
+01_initgroups.patch
+02_default-config.patch
+03_fix-xauthority-perms.patch
+04_fix_xauthority-path.patch

Modified: goodies/trunk/lightdm/debian/rules
===================================================================
--- goodies/trunk/lightdm/debian/rules	2010-12-04 11:42:18 UTC (rev 4612)
+++ goodies/trunk/lightdm/debian/rules	2010-12-04 16:14:14 UTC (rev 4613)
@@ -1,7 +1,20 @@
 #!/usr/bin/make -f
+
+include /usr/share/hardening-includes/hardening.make
+
 CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
 LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
-#LDFLAGS += -Wl,-z,defs -Wl,--as-needed
+#LDFLAGS += -Wl,-O1 -Wl,-z,defs -Wl,--as-needed
+CFLAGS+=$(HARDENING_CFLAGS)
+CXXFLAGS+=$(HARDENING_CFLAGS)
+LDFLAGS+=$(HARDENING_LDFLAGS)
 
+override_dh_auto_configure:
+	dh_auto_configure -- --with-greeter-user=lightdm --with-default-session=xfce
+
+override_dh_installinit:
+	dh_installinit -- defaults S30 K01
+
 %:
 	dh $@




More information about the Pkg-xfce-commits mailing list