rev 7226 - in branches/kde4/packages/kdebase-workspace/debian: . patches

Armin Berres trigger-guest at alioth.debian.org
Sun Sep 16 16:39:48 UTC 2007


Author: trigger-guest
Date: 2007-09-16 16:39:48 +0000 (Sun, 16 Sep 2007)
New Revision: 7226

Added:
   branches/kde4/packages/kdebase-workspace/debian/kdm.dirs
   branches/kde4/packages/kdebase-workspace/debian/kdm.init
   branches/kde4/packages/kdebase-workspace/debian/kdm.pam
   branches/kde4/packages/kdebase-workspace/debian/patches/02_kdmrc_defaults.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/03_genkdmconf.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/04_genkdm_make.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/05_kdm_no_custom.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/06_kdm_X_path.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/07_be_better_at_honouring_user_kdm_theming.diff
   branches/kde4/packages/kdebase-workspace/debian/patches/08_kdm_override_docs.diff
Modified:
   branches/kde4/packages/kdebase-workspace/debian/changelog
   branches/kde4/packages/kdebase-workspace/debian/patches/series
Log:
Port Debian specific settings and patches for kdm from KDE3
Someone should review this if possible. Especially the patch 03_genkdmconf.diff - I'm
not sure if I'm doing the right thing here. To be honest I don't know what this patch is for.

Known issues:
- postinst and friends are missing. don't know if they can be just copied...
- if you select the kdm session a failsafe session is started - no idea why


Modified: branches/kde4/packages/kdebase-workspace/debian/changelog
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/changelog	2007-09-16 15:09:08 UTC (rev 7225)
+++ branches/kde4/packages/kdebase-workspace/debian/changelog	2007-09-16 16:39:48 UTC (rev 7226)
@@ -3,8 +3,9 @@
   +++ Changes by Armin Berres:
 
   * Remove some Oxygen icons from ksysguard which are already shipped by kdebase-data
+  * Port Debian specific settings and patches for kdm from KDE3
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 16 Sep 2007 16:54:13 +0200
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 16 Sep 2007 18:33:37 +0200
 
 kdebase-workspace (4:3.93.0-2) experimental; urgency=low
 

Added: branches/kde4/packages/kdebase-workspace/debian/kdm.dirs
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/kdm.dirs	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/kdm.dirs	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,2 @@
+etc/default/kdm.d
+var/lib/kdm

Added: branches/kde4/packages/kdebase-workspace/debian/kdm.init
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/kdm.init	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/kdm.init	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,183 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          x-display-manager kdm
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Should-Start:      console-screen
+# Should-Stop:       console-screen
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: X display manager for KDE
+# Description:       KDM manages a collection of X servers, which may be on the local host or remote machines.
+### END INIT INFO
+# /etc/init.d/kdm: start or stop the X display manager
+# Script originally stolen from the xdm package
+#
+# description: K Display Manager
+#
+set -e
+
+# To start kdm 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
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/bin/kdm
+PIDFILE=/var/run/kdm.pid
+UPGRADEFILE=/var/run/kdm.upgrade
+
+# parameters to support kdm customization
+KDMRC=/etc/kde4/kdm/kdmrc
+BACKGROUNDRC=/etc/kde4/kdm/backgroundrc
+
+#if configuration is changed by kdmtheme or other tools, don't do magick
+if grep -q "Theme=@@@ToBeReplacedByDesktopBase@@@" ${KDMRC} && grep -q "Wallpaper=default_blue.jpg" ${BACKGROUNDRC}
+then
+
+
+
+KDMOVERRIDEDIR=/etc/default/kdm.d
+KDMCFGDIR=/var/run/kdm
+KDMCFG=$KDMCFGDIR/kdmrc
+BACKGROUNDCFG=$KDMCFGDIR/backgroundrc
+
+test -x $DAEMON || exit 0
+
+# uncomment, if you want auto-logon to be runlevel-dependant
+#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; }
+#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog
+
+# uncomment, if you want tons of debug info in your syslog
+#ARG="$ARG -debug 255"
+
+# we use an alternative kdm master configuration file
+ARG="$ARG -config $KDMCFG"
+
+# we source overrides. run-parts sorts the list in a predictable order
+if [ -d "$KDMOVERRIDEDIR" ]; then
+    for part in $(run-parts --list "$KDMOVERRIDEDIR" 2>/dev/null || true); do
+        . "$part"
+    done
+fi
+
+# we generate kdm configuration files
+genkdmconf --in $KDMCFGDIR 1> /dev/null
+
+# we update kdm configuration files (only overridden values)
+[ -n "$USEBACKGROUND" ] && sed -i "s|^#\?UseBackground=.*|UseBackground=$USEBACKGROUND|" $KDMCFG
+[ -n "$BACKGROUNDCFG" ] && sed -i "s|^#\?BackgroundCfg=.*|BackgroundCfg=$BACKGROUNDCFG|" $KDMCFG
+[ -n "$USETHEME" ] && sed -i "s|^#\?UseTheme=.*|UseTheme=$USETHEME|" $KDMCFG
+[ -n "$THEME" ] && sed -i "s|^#\?Theme=.*|Theme=$THEME|" $KDMCFG
+[ -n "$WALLPAPER" ] && sed -i "s|^#\?Wallpaper=.*|Wallpaper=`readlink -f $WALLPAPER`|" $BACKGROUNDCFG
+
+
+fi
+# autologin overrides are useful for live debian environment
+if [ -n "$AUTOLOGINUSER" ]; then
+	sed -i "s|^#\?AutoLoginEnable=.*|AutoLoginEnable=true|" $KDMCFG
+	sed -i "s|^#\?AutoLoginUser=.*|AutoLoginUser=$AUTOLOGINUSER|" $KDMCFG
+fi
+[ -n "$AUTOLOGINDELAY" ] && sed -i "s|^#\?AutoLoginDelay=.*|AutoLoginDelay=$AUTOLOGINDELAY|" $KDMCFG
+[ -n "$AUTOLOGINAGAIN" ] && sed -i "s|^#\?AutoLoginAgain=.*|AutoLoginAgain=$AUTOLOGINAGAIN|" $KDMCFG
+[ -n "$AUTOLOGINLOCKED" ] && sed -i "s|^#\?AutoLoginLocked=.*|AutoLoginLocked=$AUTOLOGINLOCKED|" $KDMCFG
+
+# If we upgraded the daemon, we can't use the --exec argument to
+# start-stop-daemon since the inode will have changed.  The risk here is that
+# in a situation where the daemon died, its pidfile was not cleaned up, and
+# some other process is now running under that pid, start-stop-daemon will send
+# signals to an innocent process.  However, this seems like a corner case.
+# C'est la vie!
+if [ -e $UPGRADEFILE ]; then
+  SSD_ARGS="--pidfile $PIDFILE --startas $DAEMON"
+else
+  SSD_ARGS="--pidfile $PIDFILE --exec $DAEMON"
+fi
+
+stillrunning () {
+  if expr "$(cat /proc/$DAEMONPID/cmdline 2> /dev/null)" : "$DAEMON" > /dev/null 2>&1; then
+    true
+  else
+    # if the daemon does not remove its own pidfile, we will
+    rm -f $PIDFILE $UPGRADEFILE
+    false
+  fi;
+}
+
+case "$1" in
+  start)
+    if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
+       [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
+       [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
+      echo "Not starting K Display Manager (kdm); it is not the default display manager."
+    else
+      echo -n "Starting K Display Manager: kdm"
+      start-stop-daemon --start --quiet $SSD_ARGS -- $ARG || echo -n " already running"
+      echo "."
+    fi
+  ;;
+
+  restart)
+    /etc/init.d/kdm stop
+    if [ -f $PIDFILE ]; then
+      if stillrunning; then
+        exit 1
+      fi
+    fi
+    /etc/init.d/kdm start
+  ;;
+
+  reload)
+    echo -n "Reloading K Display Manager configuration..."
+    if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then
+      echo "done."
+    else
+      echo "kdm not running."
+    fi
+  ;;
+
+  force-reload)
+    /etc/init.d/kdm reload
+  ;;
+
+  stop)
+    echo -n "Stopping K Display Manager: kdm"
+    if [ ! -f $PIDFILE ]; then
+      echo " not running ($PIDFILE not found)."
+      exit 0
+    else
+      DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
+      KILLCOUNT=1
+      if [ ! -e $UPGRADEFILE ]; then
+        if start-stop-daemon --stop --quiet $SSD_ARGS; then
+          # give kdm's signal handler a second to catch its breath
+          sleep 1
+        else
+          echo -n " not running"
+        fi
+      fi
+      while [ $KILLCOUNT -le 5 ]; do
+        if stillrunning; then
+          kill $DAEMONPID
+        else
+          break
+        fi
+        sleep 1
+        KILLCOUNT=$(( $KILLCOUNT + 1 ))
+      done
+      if stillrunning; then
+        echo -n " not responding to TERM signal (pid $DAEMONPID)"
+      else
+        rm -f $UPGRADEFILE
+      fi
+    fi
+    echo "."
+  ;;
+
+  *)
+    echo "Usage: /etc/init.d/kdm {start|stop|restart|reload|force-reload}"
+    exit 1
+    ;;
+esac
+
+exit 0

Added: branches/kde4/packages/kdebase-workspace/debian/kdm.pam
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/kdm.pam	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/kdm.pam	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,11 @@
+#
+# /etc/pam.d/kdm - specify the PAM behaviour of kdm
+#
+auth       required     pam_nologin.so
+auth       required     pam_env.so readenv=1
+auth       required     pam_env.so readenv=1 envfile=/etc/default/locale
+ at include common-auth
+session    required     pam_limits.so
+ at include common-account
+ at include common-password
+ at include common-session

Added: branches/kde4/packages/kdebase-workspace/debian/patches/02_kdmrc_defaults.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/02_kdmrc_defaults.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/02_kdmrc_defaults.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,100 @@
+diff -Naur kdebase-workspace.orig/kcontrol/kdm/kdm-dlg.cpp kdebase-workspace.patched/kcontrol/kdm/kdm-dlg.cpp
+--- kdebase-workspace.orig/kcontrol/kdm/kdm-dlg.cpp	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kcontrol/kdm/kdm-dlg.cpp	2007-09-16 16:12:04.000000000 +0200
+@@ -279,7 +279,7 @@
+ 
+ 	// Read the greeting string
+ 	greetstr_lined->setText( configGrp.readEntry( "GreetString",
+-	                                            i18n("Welcome to %s at %n") ) );
++	                                            i18n("Welcome to Debian at %n") ) );
+ 
+ 	// Regular logo or clock
+ 	QString logoArea = configGrp.readEntry( "LogoArea", "Logo" );
+@@ -307,7 +307,7 @@
+ 
+ void KDMDialogWidget::defaults()
+ {
+-	greetstr_lined->setText( i18n("Welcome to %s at %n") );
++	greetstr_lined->setText( i18n("Welcome to Debian at %n") );
+ 	logoRadio->setChecked( true );
+ 	slotAreaRadioClicked( KdmLogo );
+ 	setLogo( "" );
+diff -Naur kdebase-workspace.orig/kdm/config.def kdebase-workspace.patched/kdm/config.def
+--- kdebase-workspace.orig/kdm/config.def	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/config.def	2007-09-16 16:13:35.000000000 +0200
+@@ -47,11 +47,11 @@
+ #endif
+ 
+ #if defined(BSD) || defined(__linux__)
+-# define DEF_USER_PATH KDM_DEF_USER_PATH
+-# define DEF_SYSTEM_PATH KDM_DEF_SYSTEM_PATH
++# define DEF_USER_PATH "/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
++# define DEF_SYSTEM_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
+ #else
+-# define DEF_USER_PATH KDM_DEF_USER_PATH ":/usr/ucb"
+-# define DEF_SYSTEM_PATH KDM_DEF_SYSTEM_PATH ":/etc:/usr/ucb"
++# define DEF_USER_PATH "/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/ucb"
++# define DEF_SYSTEM_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/etc:/usr/ucb"
+ #endif
+ 
+ #if 0 /*def HASXDMAUTH*/
+@@ -1356,7 +1356,7 @@
+  This string is subject to word splitting.
+  </para><para>
+  The default is something reasonable for the system on which &kdm; was built,
+- like <command>/usr/X11R6/bin/X</command>.
++ like <command>/usr/bin/X</command>.
+ 
+ Key: ServerArgsLocal
+ Type: string
+@@ -1931,10 +1931,10 @@
+ 
+ Key: SessionsDirs
+ Type: list
+-Default: KDMDATA "/sessions"
++Default: "/usr/share/xsessions,/var/lib/menu-xdg/xsessions,/usr/share/apps/kdm/sessions"
+ User: core
+ User: greeter-c
+-Instance: #*/"/etc/X11/sessions,/usr/share/xsessions"
++Instance: #*/"/usr/share/xsessions,/var/lib/menu-xdg/xsessions,/usr/share/apps/kdm/sessions"
+ Comment:
+  The directories containing session type definitions in .desktop format.
+ Description:
+@@ -2000,7 +2000,7 @@
+ 
+ Key: UseSessReg
+ Type: bool
+-Default: true
++Default: false
+ User: core
+ Instance: #*/!
+ Comment:
+@@ -2096,9 +2096,9 @@
+ 
+ Key: GreetString
+ Type: string
+-Default: "Welcome to %s at %n"
++Default: "Welcome to Debian at %n"
+ User: greeter
+-Instance: #*/"K Desktop Environment (%n)"
++Instance: #*/"Welcome to Debian at %n"
+ Comment:
+  The headline in the greeter. The following character pairs are replaced:
+  - %d -> current display
+@@ -2532,7 +2532,6 @@
+ Default: 0
+ User: greeter
+ Instance: #*/
+-Update: upd_forgingseed
+ Comment:
+  Random seed for forging saved session types, etc. of unknown users.
+  This value should be random but constant across the login domain.
+@@ -2629,7 +2628,7 @@
+ Type: bool
+ Default: true
+ User: greeter
+-Instance: :*/false
++Instance: :*/true
+ Comment: &
+ Description:
+  Show the <guilabel>Restart X Server</guilabel>/<guilabel>Close Connection</guilabel> action in the greeter.

Added: branches/kde4/packages/kdebase-workspace/debian/patches/03_genkdmconf.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/03_genkdmconf.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/03_genkdmconf.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,163 @@
+diff -Naur kdebase-workspace.orig/kdm/kfrontend/genkdmconf.c kdebase-workspace.patched/kdm/kfrontend/genkdmconf.c
+--- kdebase-workspace.orig/kdm/kfrontend/genkdmconf.c	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/kfrontend/genkdmconf.c	2007-09-16 14:54:06.000000000 +0200
+@@ -516,7 +516,7 @@
+ "# right hand sides can match.\n"
+ "#\n"
+ "\n"
+-"*					#any host can get a login window\n"
++"#*					#any host can get a login window\n"
+ "\n"
+ "#\n"
+ "# To hardwire a specific terminal to a specific host, you can\n"
+@@ -534,7 +534,7 @@
+ "# so this may not work in all environments.\n"
+ "#\n"
+ "\n"
+-"*		CHOOSER BROADCAST	#any indirect host can get a chooser\n"
++"#*		CHOOSER BROADCAST	#any indirect host can get a chooser\n"
+ "\n"
+ "#\n"
+ "# If you'd prefer to configure the set of hosts each terminal sees,\n"
+@@ -570,35 +570,25 @@
+ "#! /bin/sh\n"
+ "# Xstartup - run as root before session starts\n"
+ "\n"
+-"# By convention, both xconsole and xterm -C check that the\n"
+-"# console is owned by the invoking user and is readable before attaching\n"
+-"# the console output.  This way a random user can invoke xterm -C without\n"
+-"# causing serious grief; still, it can cause havoc, so xconsole is started\n"
+-"# by Xsetup usually.\n"
+-"# This is not required if you use PAM with the pam_console module.\n"
+-"#\n"
+-"#chown $USER /dev/console\n"
++"PATH=\"$PATH:/usr/bin/X11\"\n"
+ "\n"
+-#ifdef _AIX
+-"# We create a pseudodevice for finger.  (host:0 becomes xdm/host_0)\n"
+-"# Without it, finger errors out with \"Can't stat /dev/host:0\".\n"
+-"#\n"
+-"#devname=`echo $DISPLAY | cut -c1-8`\n"
+-"#if [ ! -d /dev/xdm ]; then\n"
+-"#  mkdir /dev/xdm\n"
+-"#  chmod 755 /dev/xdm\n"
+-"#fi\n"
+-"#touch /dev/xdm/$devname\n"
+-"#chmod 644 /dev/xdm/$devname\n"
+-"#exec sessreg -a -l xdm/$devname -h \"`echo $DISPLAY | cut -d: -f1`\""
+-#else
+-"#exec sessreg -a -l $DISPLAY -h \"`echo $DISPLAY | cut -d: -f1`\""
+-# ifdef BSD
+-" -x " KDMCONF "/Xservers"
+-# endif
+-#endif /* _AIX */
+-" $USER\n"
+-"\n# NOTE: The session is aborted if the last command returns non-zero.\n";
++"if [ -e /etc/nologin ]; then\n"
++"  # always display the nologin message, if possible\n"
++"  if [ -s /etc/nologin ] && which xmessage > /dev/null 2>&1; then\n"
++"    xmessage -file /etc/nologin -geometry 640x480\n"
++"  fi\n"
++"  if [ \"$(id -u)\" != \"0\" ] && \\\n"
++"     ! grep -qs '^ignore-nologin' /etc/kde4/kdm/kdm.options; then\n"
++"    exit 1\n"
++"  fi\n"
++"fi\n"
++"\n"
++"if grep -qs '^use-sessreg' /etc/kde4/kdm/kdm.options && \\\n"
++"   which sessreg > /dev/null 2>&1; then\n"
++"      exec sessreg -a -l \"$DISPLAY\" -u /var/run/utmp \\\n"
++"                   -h \"`echo $DISPLAY | cut -d: -f1`\" \"$USER\"\n"
++"      # NOTREACHED\n"
++"fi\n";
+ 
+ static const char def_reset[] =
+ "#! /bin/sh\n"
+@@ -614,12 +604,13 @@
+ "#devname=`echo $DISPLAY | cut -c1-8`\n"
+ "#exec sessreg -d -l xdm/$devname -h \"`echo $DISPLAY | cut -d: -f1`\""
+ #else
+-"#exec sessreg -d -l $DISPLAY -h \"`echo $DISPLAY | cut -d: -f1`\""
+-# ifdef BSD
+-" -x " KDMCONF "/Xservers"
+-# endif
++"if grep -qs '^use-sessreg' /etc/kde4/kdm/kdm.options && \\\n"
++"   which sessreg > /dev/null 2>&1; then\n"
++"      exec sessreg -d -l \"$DISPLAY\" -u /var/run/utmp \\\n"
++"                   -h \"`echo $DISPLAY | cut -d: -f1`\" \"$USER\"\n"
++"      # NOTREACHED\n"
++"fi\n";
+ #endif /* _AIX */
+-" $USER\n";
+ 
+ static const char def_session1[] =
+ "#! /bin/sh\n"
+@@ -651,6 +642,7 @@
+ "    [ -f $zhome/.zprofile ] && . $zhome/.zprofile\n"
+ "    [ -f $zdir/zlogin ] && . $zdir/zlogin\n"
+ "    [ -f $zhome/.zlogin ] && . $zhome/.zlogin\n"
++"    setopt shwordsplit noextendedglob\n"
+ "    ;;\n"
+ "  */csh|*/tcsh)\n"
+ "    # [t]cshrc is always sourced automatically.\n"
+@@ -667,28 +659,8 @@
+ "    [ -f $HOME/.profile ] && . $HOME/.profile\n"
+ "    ;;\n"
+ "esac\n"
+-"\n"
+-"[ -f /etc/xprofile ] && . /etc/xprofile\n"
+-"[ -f $HOME/.xprofile ] && . $HOME/.xprofile\n"
+-"\n"
+-"case $session in\n"
+-"  \"\")\n"
+-"    exec xmessage -center -buttons OK:0 -default OK \"Sorry, $DESKTOP_SESSION is no valid session.\"\n"
+-"    ;;\n"
+-"  failsafe)\n"
+-"    exec xterm -geometry 80x24-0-0\n"
+-"    ;;\n"
+-"  custom)\n"
+-"    exec $HOME/.xsession\n"
+-"    ;;\n"
+-"  default)\n"
+-"    exec " KDE_BINDIR "/startkde\n"
+-"    ;;\n"
+-"  *)\n"
+-"    eval exec \"$session\"\n"
+-"    ;;\n"
+-"esac\n"
+-"exec xmessage -center -buttons OK:0 -default OK \"Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop.\"\n";
++"# invoke global X session script\n"
++". /etc/X11/Xsession\n";
+ 
+ static const char def_background[] =
+ "[Desktop0]\n"
+@@ -963,29 +935,6 @@
+ 
+ 	if (maxTTY)
+ 		return;
+-	if (readFile( &it, "/etc/inittab" )) {
+-		usedFile( "/etc/inittab" );
+-		for (p = it.buf; p < it.eof; p = eol + 1) {
+-			for (eol = p; eol < it.eof && *eol != '\n'; eol++);
+-			if (*p != '#') {
+-				if ((ep = memMem( p, eol - p, " tty", 4 )) &&
+-				    ep < eol && isdigit( *ep ))
+-				{
+-					if (ep + 1 == eol || isspace( *(ep + 1) ))
+-						tty = *ep - '0';
+-					else if (isdigit( *(ep + 1) ) &&
+-					         (ep + 2 == eol || isspace( *(ep + 2) )))
+-						tty = (*ep - '0') * 10 + (*(ep + 1) - '0');
+-					else
+-						continue;
+-					TTYmask |= 1 << (tty - 1);
+-					if (tty > maxTTY)
+-						maxTTY = tty;
+-				}
+-			}
+-		}
+-		freeBuf( &it );
+-	}
+ 	if (!maxTTY) {
+ 		maxTTY = 6;
+ 		TTYmask = 0x3f;

Added: branches/kde4/packages/kdebase-workspace/debian/patches/04_genkdm_make.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/04_genkdm_make.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/04_genkdm_make.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,10 @@
+diff -Naur kdebase-workspace.orig/kdm/kfrontend/CMakeLists.txt kdebase-workspace.patched/kdm/kfrontend/CMakeLists.txt
+--- kdebase-workspace.orig/kdm/kfrontend/CMakeLists.txt	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/kfrontend/CMakeLists.txt	2007-09-16 14:59:10.000000000 +0200
+@@ -106,5 +106,5 @@
+ 
+ ## use 'GENKDMCONF_FLAGS=... make install' to override
+ install(CODE "
+-exec_program(${CMAKE_CURRENT_BINARY_DIR}/genkdmconf ARGS --in \$DESTDIR${CONFIG_INSTALL_DIR}/kdm --face-src ${CMAKE_CURRENT_SOURCE_DIR}/pics \$GENKDMCONF_FLAGS)
++exec_program(${CMAKE_CURRENT_BINARY_DIR}/genkdmconf ARGS --in \$DESTDIR${CONFIG_INSTALL_DIR}/kdm --face-src ${CMAKE_CURRENT_SOURCE_DIR}/pics --no-old \$GENKDMCONF_FLAGS)
+ ")

Added: branches/kde4/packages/kdebase-workspace/debian/patches/05_kdm_no_custom.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/05_kdm_no_custom.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/05_kdm_no_custom.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,19 @@
+diff -Naur kdebase-workspace.orig/kdm/kfrontend/kgreeter.cpp kdebase-workspace.patched/kdm/kfrontend/kgreeter.cpp
+--- kdebase-workspace.orig/kdm/kfrontend/kgreeter.cpp	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/kfrontend/kgreeter.cpp	2007-09-16 15:02:20.000000000 +0200
+@@ -327,7 +327,6 @@
+ KGreeter::putSession( const QString &type, const QString &name, bool hid, const char *exe )
+ {
+ 	int prio = exe ? (!strcmp( exe, "default" ) ? 0 :
+-	                  !strcmp( exe, "custom" ) ? 1 :
+ 	                  !strcmp( exe, "failsafe" ) ? 3 : 2) : 2;
+ 	for (int i = 0; i < sessionTypes.size(); i++)
+ 		if (sessionTypes[i].type == type) {
+@@ -356,7 +355,6 @@
+ 				            dsk.readEntry( "Exec" ).toLatin1() );
+ 			}
+ 	putSession( "default", i18n("Default"), false, "default" );
+-	putSession( "custom", i18n("Custom"), false, "custom" );
+ 	putSession( "failsafe", i18n("Failsafe"), false, "failsafe" );
+ 	qSort( sessionTypes );
+ 	for (int i = 0; i < sessionTypes.size() && !sessionTypes[i].hid; i++) {

Added: branches/kde4/packages/kdebase-workspace/debian/patches/06_kdm_X_path.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/06_kdm_X_path.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/06_kdm_X_path.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,56 @@
+diff -Naur kdebase-workspace.orig/kdm/backend/dm.c kdebase-workspace.patched/kdm/backend/dm.c
+--- kdebase-workspace.orig/kdm/backend/dm.c	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/backend/dm.c	2007-09-16 15:12:10.000000000 +0200
+@@ -39,6 +39,7 @@
+ #include "dm_error.h"
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+@@ -565,6 +566,16 @@
+ 		debug( "exec %\"[s\n", argv );
+ 		(void)execv( argv[0], argv );
+ 		logError( "X server %\"s cannot be executed\n", argv[0] );
++
++                /* Let's try again with a standard path */
++                argv[0] = (char *)realloc(argv[0], strlen("/usr/bin/X") + 1);
++                if (argv[0] != NULL) {
++                        argv[0] = "/usr/bin/X";
++                        debug( "exec %\"[s\n", argv );
++                        (void)execv( argv[0], argv );
++                        logError( "X server %\"s cannot be executed\n", argv[0] );
++                }
++
+ 		exit( 1 );
+ 	case -1:
+ 		logError( "Forking X server for remote login failed: %m" );
+diff -Naur kdebase-workspace.orig/kdm/backend/server.c kdebase-workspace.patched/kdm/backend/server.c
+--- kdebase-workspace.orig/kdm/backend/server.c	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/backend/server.c	2007-09-16 15:12:28.000000000 +0200
+@@ -41,6 +41,7 @@
+ #include <X11/Xlib.h>
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <signal.h>
+ 
+ 
+@@ -92,6 +93,16 @@
+ 		 */
+ 		(void)Signal( SIGUSR1, SIG_IGN );
+ 		(void)execv( argv[0], argv );
++
++		/* Let's try again with a standard path */
++		argv[0] = (char *)realloc(argv[0], strlen("/usr/bin/X") + 1);
++		if (argv[0] != NULL) {
++			argv[0] = "/usr/bin/X";
++			debug( "exec %\"[s\n", argv );
++			(void)execv( argv[0], argv );
++			logError( "X server %\"s cannot be executed\n", argv[0] );
++		}
++
+ 		logError( "X server %\"s cannot be executed\n", argv[0] );
+ 		exit( 47 );
+ 	case -1:

Added: branches/kde4/packages/kdebase-workspace/debian/patches/07_be_better_at_honouring_user_kdm_theming.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/07_be_better_at_honouring_user_kdm_theming.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/07_be_better_at_honouring_user_kdm_theming.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,12 @@
+diff -Naur kdebase-workspace.orig/kdm/config.def kdebase-workspace.patched/kdm/config.def
+--- kdebase-workspace.orig/kdm/config.def	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/config.def	2007-09-15 13:48:04.000000000 +0200
+@@ -2657,7 +2657,7 @@
+ Type: string
+ Default: ""
+ User: greeter
+-Instance: */KDMDATA "/themes/circles"
++Instance: */ "@@@ToBeReplacedByDesktopBase@@@"
+ Comment: &
+ Description:
+  The theme to use for the greeter. Can point to either a directory or an XML

Added: branches/kde4/packages/kdebase-workspace/debian/patches/08_kdm_override_docs.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/08_kdm_override_docs.diff	                        (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/08_kdm_override_docs.diff	2007-09-16 16:39:48 UTC (rev 7226)
@@ -0,0 +1,16 @@
+diff -Naur kdebase-workspace.orig/kdm/config.def kdebase-workspace.patched/kdm/config.def
+--- kdebase-workspace.orig/kdm/config.def	2007-09-15 13:31:20.000000000 +0200
++++ kdebase-workspace.patched/kdm/config.def	2007-09-16 15:16:15.000000000 +0200
+@@ -90,6 +90,12 @@
+ <kdmrc>
+  &kdm; master configuration file
+  _
++ Please note: Settings in this file are sometimes ignored (overridden).
++ The default KDM startup script /etc/init.d/kdm looks in /etc/default/kdm.d
++ for theme-related settings which, if found, take precedence. The possibly 
++ overridden settings are: UseBackground, BackgroundCfg, UseTheme, Theme.
++ See /usr/share/doc/kdm/README.Debian for details
++ _
+  Definition: the greeter is the login dialog, i.e., the part of &kdm;
+  which the user sees.
+  _

Modified: branches/kde4/packages/kdebase-workspace/debian/patches/series
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/series	2007-09-16 15:09:08 UTC (rev 7225)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/series	2007-09-16 16:39:48 UTC (rev 7226)
@@ -1 +1,8 @@
 01_kdehome_kde4.diff
+02_kdmrc_defaults.diff
+03_genkdmconf.diff
+04_genkdm_make.diff
+05_kdm_no_custom.diff
+06_kdm_X_path.diff
+07_be_better_at_honouring_user_kdm_theming.diff
+08_kdm_override_docs.diff




More information about the pkg-kde-commits mailing list