From 4b6b1278b020d4b725fcce17c41d29368ac8eca6 Mon Sep 17 00:00:00 2001 From: Peter Tworek Date: Thu, 17 Nov 2011 21:50:20 +0100 Subject: Add recipe for lxdm 0.4.1. --- recipes-lxde/lxdm/files/init | 41 +++++++++++++++++ recipes-lxde/lxdm/files/xinitrc | 50 +++++++++++++++++++++ .../lxdm-0.4.1-git-fix-null-pointer-deref.patch | 51 ++++++++++++++++++++++ .../lxdm/lxdm-0.4.1/lxdm-0.4.1-oe-xsession.patch | 46 +++++++++++++++++++ .../lxdm-0.4.1-pam_console-disable.patch | 9 ++++ .../lxdm-0.4.1/lxdm-0.4.1-uclibc-friendly.patch | 49 +++++++++++++++++++++ .../lxdm-0.4.1/lxdm-0.4.1-use-oe-pam-config.patch | 11 +++++ .../lxdm-0.4.1/lxdm-0.4.1-use-xserver-script.patch | 11 +++++ recipes-lxde/lxdm/lxdm_0.4.1.bb | 39 +++++++++++++++++ 9 files changed, 307 insertions(+) create mode 100644 recipes-lxde/lxdm/files/init create mode 100644 recipes-lxde/lxdm/files/xinitrc create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-git-fix-null-pointer-deref.patch create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-oe-xsession.patch create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-pam_console-disable.patch create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-uclibc-friendly.patch create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-oe-pam-config.patch create mode 100644 recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-xserver-script.patch create mode 100644 recipes-lxde/lxdm/lxdm_0.4.1.bb diff --git a/recipes-lxde/lxdm/files/init b/recipes-lxde/lxdm/files/init new file mode 100644 index 0000000..d8bb4eb --- /dev/null +++ b/recipes-lxde/lxdm/files/init @@ -0,0 +1,41 @@ +#!/bin/sh + +. /etc/init.d/functions + +DAEMON=/usr/sbin/lxdm +PIDDIR=/var/run +PIDFILE=$PIDDIR/lxdm.pid + +for x in $(cat /proc/cmdline); do + case $x in + x11=false) + echo "LXDM disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + echo "Starting LXDM" + start-stop-daemon --start --quiet --pidfile $PIDFILE -m -b \ + --exec $DAEMON + ;; + + stop) + echo "Stopping LXDM" + start-stop-daemon --stop --quiet --pidfile $PIDFILE + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/recipes-lxde/lxdm/files/xinitrc b/recipes-lxde/lxdm/files/xinitrc new file mode 100644 index 0000000..e5b3867 --- /dev/null +++ b/recipes-lxde/lxdm/files/xinitrc @@ -0,0 +1,50 @@ +# Script based on Gentoo lxdm xinitrc + +case $SHELL in + */bash) + [ -z "$BASH" ] && exec $SHELL $0 "$@" + set +o posix + [ -f /etc/profile ] && . /etc/profile + if [ -f $HOME/.bash_profile ]; then + . $HOME/.bash_profile + elif [ -f $HOME/.bash_login ]; then + . $HOME/.bash_login + elif [ -f $HOME/.profile ]; then + . $HOME/.profile + fi + ;; + */zsh) + [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" + emulate -R zsh + [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc + zhome=${ZDOTDIR:-$HOME} + # zshenv is always sourced automatically. + [ -f $zdir/zprofile ] && . $zdir/zprofile + [ -f $zhome/.zprofile ] && . $zhome/.zprofile + [ -f $zdir/zlogin ] && . $zdir/zlogin + [ -f $zhome/.zlogin ] && . $zhome/.zlogin + ;; + */csh|*/tcsh) + # [t]cshrc is always sourced automatically. + # Note that sourcing csh.login after .cshrc is non-standard. + xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` + $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c export -p >! $xsess_tmp" + . $xsess_tmp + rm -f $xsess_tmp + ;; + *) # Plain sh, ksh, and anything we do not know. + [ -f /etc/profile ] && . /etc/profile + [ -f $HOME/.profile ] && . $HOME/.profile + ;; +esac + +[ -f /etc/xprofile ] && . /etc/xprofile +[ -f $HOME/.xprofile ] && . $HOME/.xprofile + +# run all system xinitrc shell scripts. +XINITFILES=$(run-parts --list /etc/X11/Xinit.d) +for XINITFILE in $XINITFILES; do + if [ -x "$XINITFILE" ]; then + . $XINITFILE + fi +done diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-git-fix-null-pointer-deref.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-git-fix-null-pointer-deref.patch new file mode 100644 index 0000000..7abdbd4 --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-git-fix-null-pointer-deref.patch @@ -0,0 +1,51 @@ +From 19f82a206b2cec964cea0475395d63dedf183788 Mon Sep 17 00:00:00 2001 +From: Andrea Florio +Date: Fri, 29 Jul 2011 23:59:32 +0200 +Subject: [PATCH] fix null pointer dereference + +--- + src/config.c | 25 ++++++++++--------------- + 1 files changed, 10 insertions(+), 15 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 3f92f7b..4603ab4 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -125,24 +125,19 @@ static gboolean image_file_valid(const char *filename) + static void update_face_image(GtkWidget *w) + { + GdkPixbuf *pixbuf; +- char *path; +- path=g_build_filename(user->pw_dir,".face",NULL); +- if(access(path,R_OK)) +- { +- g_free(path); +- if(ui_nobody) +- pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL); +- if(!pixbuf) +- pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), ++ char *path=g_build_filename(user->pw_dir,".face",NULL); ++ pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL); ++ g_free(path); ++ if(!pixbuf && ui_nobody) ++ pixbuf=gdk_pixbuf_new_from_file_at_scale(ui_nobody,48,48,FALSE,NULL); ++ if(!pixbuf) ++ pixbuf=gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), + "avatar-default", 48,GTK_ICON_LOOKUP_FORCE_SIZE,NULL); +- } +- else ++ if(pixbuf) + { +- pixbuf=gdk_pixbuf_new_from_file_at_scale(path,48,48,FALSE,NULL); +- g_free(path); ++ gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf); ++ g_object_unref(pixbuf); + } +- gtk_image_set_from_pixbuf(GTK_IMAGE(w),pixbuf); +- g_object_unref(pixbuf); + } + + static void set_face_file(const char *filename) +-- +1.7.0.1 + diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-oe-xsession.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-oe-xsession.patch new file mode 100644 index 0000000..e4e4207 --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-oe-xsession.patch @@ -0,0 +1,46 @@ +--- lxdm-0.4.1.orig/data/Xsession 2011-11-16 22:27:33.621019188 +0100 ++++ lxdm-0.4.1/data/Xsession 2011-11-17 20:20:24.011703381 +0100 +@@ -12,35 +12,12 @@ + [ -f /etc/xprofile ] && . /etc/xprofile + [ -f ~/.xprofile ] && . ~/.xprofile + +-if [ -f /etc/X11/xinit/xinitrc-common ]; then +-# fedora +- . /etc/X11/xinit/xinitrc-common +- if ! [ -z "$XDG_SESSION_COOKIE" ]; then +- CK_XINIT_SESSION= +- elif [ -x /usr/bin/ck-launch-session -a -z "$CK_XINIT_SESSION" ]; then +- CK_XINIT_SESSION="/usr/bin/ck-launch-session" +- fi +- exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\"" +-elif [ -x /etc/X11/xinit/Xsession ]; then +-# fedora +- exec /etc/X11/xinit/Xsession "$LXSESSION" +-elif [ -x /etc/X11/Xsession ]; then +-# mandriva, debian, ubuntu +- exec /etc/X11/Xsession "$LXSESSION" +-elif [ -x /etc/X11/xinit/xinitrc ]; then +-#suse +- export WINDOWMANAGER=$LXSESSION +- exec -l $SHELL -c /etc/X11/xinit/xinitrc +-else +-# unknown, user should custom /etc/lxdm/xinitrc self +- if [ -x /etc/lxdm/xinitrc ]; then +- . /etc/lxdm/xinitrc +- fi +- if ! [ -z "$XDG_SESSION_COOKIE" ]; then +- CK_XINIT_SESSION= +- elif [ -x /usr/bin/ck-launch-session ]; then +- CK_XINIT_SESSION="/usr/bin/ck-launch-session" +- fi +- exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\"" ++if [ -x /etc/lxdm/xinitrc ]; then ++ . /etc/lxdm/xinitrc + fi +- ++if ! [ -z "$XDG_SESSION_COOKIE" ]; then ++ CK_XINIT_SESSION= ++elif [ -x /usr/bin/ck-launch-session ]; then ++ CK_XINIT_SESSION="/usr/bin/ck-launch-session" ++fi ++exec -l $SHELL -c "$CK_XINIT_SESSION \"$LXSESSION\"" diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-pam_console-disable.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-pam_console-disable.patch new file mode 100644 index 0000000..628e9a5 --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-pam_console-disable.patch @@ -0,0 +1,9 @@ +--- lxdm-0.4.0.orig/pam/lxdm ++++ lxdm-0.4.0/pam/lxdm +@@ -5,5 +5,5 @@ account include system-auth + session optional pam_keyinit.so force revoke + session include system-auth + session required pam_loginuid.so +-session optional pam_console.so ++#session optional pam_console.so + session optional pam_gnome_keyring.so auto_start diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-uclibc-friendly.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-uclibc-friendly.patch new file mode 100644 index 0000000..2adab16 --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-uclibc-friendly.patch @@ -0,0 +1,49 @@ +diff -auNr lxdm-0.4.1.orig//configure.ac lxdm-0.4.1/configure.ac +--- lxdm-0.4.1.orig//configure.ac 2011-11-16 22:27:33.624019150 +0100 ++++ lxdm-0.4.1/configure.ac 2011-11-16 22:29:49.537310486 +0100 +@@ -23,7 +23,7 @@ + + # Checks for header files. + AC_PATH_X +-AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h]) ++AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h, execinfo.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_TYPE_PID_T +diff -auNr lxdm-0.4.1.orig//src/lxdm.c lxdm-0.4.1/src/lxdm.c +--- lxdm-0.4.1.orig//src/lxdm.c 2011-11-16 22:27:33.617019240 +0100 ++++ lxdm-0.4.1/src/lxdm.c 2011-11-16 22:29:19.030694008 +0100 +@@ -52,7 +52,9 @@ + #include + #include + ++#ifdef HAVE_EXECINFO_H + #include ++#endif + + #ifdef HAVE_UTMPX_H + #include +@@ -1576,6 +1578,7 @@ + return success;; + } + ++#ifdef HAVE_EXECINFO_H + static void log_sigsegv(void) + { + void *array[40]; +@@ -1591,12 +1594,15 @@ + + free(bt_strs); + } ++#endif + + static void sigsegv_handler(int sig) + { + switch(sig){ + case SIGSEGV: ++#ifdef HAVE_EXECINFO_H + log_sigsegv(); ++#endif + lxdm_quit_self(0); + break; + default: diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-oe-pam-config.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-oe-pam-config.patch new file mode 100644 index 0000000..c1c8b0f --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-oe-pam-config.patch @@ -0,0 +1,11 @@ +--- lxdm-0.4.1.orig/src/lxdm.c 2011-11-16 22:27:33.617019240 +0100 ++++ lxdm-0.4.1/src/lxdm.c 2011-11-17 19:42:08.674559677 +0100 +@@ -874,7 +874,7 @@ + int err; + char x[256]; + +- if(!s->pamh && PAM_SUCCESS != pam_start("lxdm", pw->pw_name, &conv, &s->pamh)) ++ if(!s->pamh && PAM_SUCCESS != pam_start("login", pw->pw_name, &conv, &s->pamh)) + { + s->pamh = NULL; + return; diff --git a/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-xserver-script.patch b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-xserver-script.patch new file mode 100644 index 0000000..b8faa1d --- /dev/null +++ b/recipes-lxde/lxdm/lxdm-0.4.1/lxdm-0.4.1-use-xserver-script.patch @@ -0,0 +1,11 @@ +--- lxdm-0.4.1.orig/data/lxdm.conf.in 2011-11-16 22:27:33.621019188 +0100 ++++ lxdm-0.4.1/data/lxdm.conf.in 2011-11-17 19:46:30.870263430 +0100 +@@ -20,7 +20,7 @@ + + [server] + ## arg used to start xserver, not fully function +-# arg=/usr/bin/X -background vt1 ++arg=/etc/X11/Xserver + + [display] + ## gtk theme used by greeter diff --git a/recipes-lxde/lxdm/lxdm_0.4.1.bb b/recipes-lxde/lxdm/lxdm_0.4.1.bb new file mode 100644 index 0000000..098b873 --- /dev/null +++ b/recipes-lxde/lxdm/lxdm_0.4.1.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "LXDE Display Manager" +HOMEPAGE = "http://lxde.org/" +SECTION = "x11" + +PR = "r1" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "gtk+ consolekit libxcb ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" + +RCONFLICTS_${PN} = "xserver-nodm-init" + +SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz \ + file://${P}-pam_console-disable.patch \ + file://${P}-git-fix-null-pointer-deref.patch \ + file://${P}-use-oe-pam-config.patch \ + file://${P}-use-xserver-script.patch \ + file://${P}-oe-xsession.patch \ + file://${P}-uclibc-friendly.patch \ + file://xinitrc \ + file://init" +SRC_URI[md5sum] = "8da1cfc2be6dc9217c85a7cf51e1e821" +SRC_URI[sha256sum] = "9e0d0a5672fcf31a18de8178ce73eab1723d6ae7097dfe41e9fe2c46e180cf08" + +EXTRA_OECONF += "--enable-password --with-x --with-xconn=xcb" + +inherit autotools pkgconfig gettext update-rc.d + +INITSCRIPT_NAME = "lxdm" +INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." + +do_install_append () { + rm ${D}/${sysconfdir}/pam.d/lxdm + install -d ${D}/${sysconfdir}/lxdm + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/xinitrc ${D}/${sysconfdir}/lxdm + install -m 0755 ${WORKDIR}/init ${D}/etc/init.d/lxdm +} -- cgit v1.2.3