rpms/lxdm/F-11 lxdm-0.2.0-add-debug-option.patch, NONE, 1.1 lxdm-0.2.0-fix-env-XAUTHORITY.patch, NONE, 1.1 lxdm-0.2.0-fix-left-env-bug.patch, NONE, 1.1 lxdm-0.2.0-fix-some-env-set-bug.patch, NONE, 1.1 lxdm-0.2.0-selinux.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 lxdm-0.2.0-config.patch, 1.1, 1.2 lxdm.spec, 1.5, 1.6 sources, 1.5, 1.6

Christoph Wickert cwickert at fedoraproject.org
Thu May 20 15:11:08 UTC 2010


Author: cwickert

Update of /cvs/pkgs/rpms/lxdm/F-11
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9914/F-11

Modified Files:
	.cvsignore lxdm-0.2.0-config.patch lxdm.spec sources 
Added Files:
	lxdm-0.2.0-add-debug-option.patch 
	lxdm-0.2.0-fix-env-XAUTHORITY.patch 
	lxdm-0.2.0-fix-left-env-bug.patch 
	lxdm-0.2.0-fix-some-env-set-bug.patch lxdm-0.2.0-selinux.patch 
Log Message:
* Mon May 17 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-4
- Fix env XAUTHORITY bug


lxdm-0.2.0-add-debug-option.patch:
 configure.ac |    9 +++++++++
 src/lxdm.c   |   40 +++++++++++++++++++++++++++++++++++++---
 2 files changed, 46 insertions(+), 3 deletions(-)

--- NEW FILE lxdm-0.2.0-add-debug-option.patch ---
>From 3c6502affe326777d6ce481f9bb04ce7f3223ea6 Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Mon, 17 May 2010 21:59:31 +0800
Subject: [PATCH 12/12] add debug option

---
 configure.ac |    9 +++++++++
 src/lxdm.c   |   39 +++++++++++++++++++++++++++++++++++++--
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a7bea4..88b08ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,15 @@ else
  AC_CHECK_LIB([Xau],[XauWriteAuth])
 fi
 
+AC_ARG_ENABLE(debug,
+    AC_HELP_STRING([--enable-debug],[enable detailed debug]),
+    [enable_debug=$enablevar],
+    [enable_debug=yes]
+)
+if test "x$enable_debug" = "x$yes" ; then
+	CFLAGS="$CFLAGS -DLXDM_DEBUG"
+fi
+
 GETTEXT_PACKAGE=lxdm
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
diff --git a/src/lxdm.c b/src/lxdm.c
index e34b20b..a6dbb40 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdarg.h>
 #include <ctype.h>
 #include <unistd.h>
 #include <stdarg.h>
@@ -239,6 +240,12 @@ void log_print(char *fmt, ...)
     fclose(log);
 }
 
+#ifdef LXDM_DEBUG
+#define dbg_printf log_print
+#else
+#define dbg_printf(fmt,...)
+#endif
+
 GSList *do_scan_xsessions(void)
 {
     GSList *xsessions = NULL;
@@ -445,18 +452,33 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
     char *enc;
 #endif
     if( !user )
+    {
+        dbg_printf("user==NULL\n");
         return AUTH_ERROR;
+    }
     if( !user[0] )
+    {
+        dbg_printf("user[0]==0\n");
         return AUTH_BAD_USER;
+    }
     pw = getpwnam(user);
     endpwent();
     if( !pw )
+    {
+        dbg_printf("user %s not found\n",user);
         return AUTH_BAD_USER;
+    }
     if( !pass )
     {
         *ppw = pw;
+        dbg_printf("user %s auth ok\n",user);
         return AUTH_SUCCESS;
     }
+    if(strstr(pw->pw_shell, "nologin"))
+    {
+        dbg_printf("user %s have nologin shell\n");
+        return AUTH_PRIV;
+    }
 #if !HAVE_LIBPAM
     sp = getspnam(user);
     if( !sp )
@@ -468,21 +490,27 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
         if( !pass[0] )
         {
             *ppw = pw;
+            dbg_printf("user %s auth with no password ok\n",user);
             return AUTH_SUCCESS;
         }
         else
+        {
+            dbg_printf("user %s password not match\n");
             return AUTH_FAIL;
+        }
     }
     enc = crypt(pass, real);
     if( strcmp(real, enc) )
+    {
+        dbg_printf("user %s password not match\n");
         return AUTH_FAIL;
-    if( strstr(pw->pw_shell, "nologin") )
-        return AUTH_PRIV;
+    }
 #else
     if(pamh) pam_end(pamh,0);
     if(PAM_SUCCESS != pam_start("lxdm", pw->pw_name, &conv, &pamh))
     {
         pamh=NULL;
+        dbg_printf("user %s start pam fail\n",user);
         return AUTH_FAIL;
     }
     else
@@ -492,11 +520,15 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
         ret=pam_authenticate(pamh,PAM_SILENT);
 	user_pass[0]=0;user_pass[1]=0;
 	if(ret!=PAM_SUCCESS)
+        {
+            dbg_printf("user %s auth fail with %d\n",user,ret);
             return AUTH_FAIL;
+        }
 	//ret=pam_setcred(pamh, PAM_ESTABLISH_CRED);
     }
 #endif
     *ppw = pw;
+    dbg_printf("user %s auth ok\n",pw->pw_name);
     return AUTH_SUCCESS;
 }
 
@@ -995,9 +1027,12 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
         if(alloc_lang)
             g_free(lang);
         ui_prepare();
+        dbg_printf("get session %s info fail\n",session);
     	return;
     }
 
+    dbg_printf("login user %s session %s lang %s\n",pw->pw_name,session_exec,lang);
+
     if( pw->pw_shell[0] == '\0' )
     {
         setusershell();
-- 
1.7.0.1


lxdm-0.2.0-fix-env-XAUTHORITY.patch:
 lxdm.c |   41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

--- NEW FILE lxdm-0.2.0-fix-env-XAUTHORITY.patch ---
>From 093e79c41ab0276d627af732a45473d3571a689f Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 18 May 2010 22:41:41 +0800
Subject: [PATCH] fix env XAUTHORITY bug

---
 src/lxdm.c |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/lxdm.c b/src/lxdm.c
index a6dbb40..908c7c7 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -313,6 +313,22 @@ void free_xsessions(GSList *l)
     g_slist_free(l);
 }
 
+static void replace_env(char** env, const char* name, const char* new_val)
+{
+    register char** penv;
+    for(penv = env; *penv; ++penv)
+    {
+        if(g_str_has_prefix(*penv, name))
+        {
+            g_free(*penv);
+            *penv = g_strconcat(name, new_val, NULL);
+            return;
+        }
+    }
+    *penv = g_strconcat(name, new_val, NULL);
+    *(penv + 1) = NULL;
+}
+
 #ifndef DISABLE_XAUTH
 void create_server_auth(void)
 {
@@ -384,7 +400,7 @@ void create_server_auth(void)
     g_free(authfile);
 }
 
-void create_client_auth(char *home)
+void create_client_auth(char *home,char **env)
 {
     char *authfile;
 
@@ -406,6 +422,7 @@ void create_client_auth(char *home)
     system(tmp);
     g_free(tmp);
 #endif
+    replace_env(env,"XAUTHORITY=",authfile);
     g_free(authfile);
 }
 #endif
@@ -618,7 +635,7 @@ void switch_user(struct passwd *pw, char *run, char **env)
         close(fd);
     }
 #ifndef DISABLE_XAUTH
-    create_client_auth(pw->pw_dir);
+    create_client_auth(pw->pw_dir,env);
 #endif
     g_spawn_command_line_async ("/etc/lxdm/PostLogin",NULL);
     execle("/etc/lxdm/Xsession", "/etc/lxdm/Xsession", run, NULL, env);
@@ -923,22 +940,6 @@ static void on_session_stop(GPid pid, gint status, gpointer data)
     child_watch=0;
 }
 
-static void replace_env(char** env, const char* name, const char* new_val)
-{
-    register char** penv;
-    for(penv = env; *penv; ++penv)
-    {
-        if(g_str_has_prefix(*penv, name))
-        {
-            g_free(*penv);
-            *penv = g_strconcat(name, new_val, NULL);
-            return;
-        }
-    }
-    *penv = g_strconcat(name, new_val, NULL);
-    *(penv + 1) = NULL;
-}
-
 gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
 {
 	char *name=NULL,*exec=NULL;
@@ -1065,7 +1066,8 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
     if( child == 0 )
     {
         char** env, *path;
-        int n_env = g_strv_length(environ), i;
+        int n_env,i;
+        n_env  = g_strv_length(environ);
         /* copy all environment variables and override some of them */
         env = g_new(char*, n_env + 1 + 13);
         for( i = 0; i < n_env; ++i )
-- 
1.6.3


lxdm-0.2.0-fix-left-env-bug.patch:
 greeter.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE lxdm-0.2.0-fix-left-env-bug.patch ---
>From 3cf91b090c7ba78eefc2e530e9ea50ac6c6dbd2c Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 11 May 2010 21:48:50 +0800
Subject: [PATCH 08/12] fix left env bug

---
 src/greeter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/greeter.c b/src/greeter.c
index 761082e..21e31d4 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -754,7 +754,7 @@ int main(int arc, char *arg[])
     p=gtk_settings_get_default();
     if(p)
     {
-        putenv("GTK_IM_MODULE=gtk-im-context-simple");
+        setenv("GTK_IM_MODULE","gtk-im-context-simple",1);
         gtk_settings_set_string_property(p,"gtk-im-module","gtk-im-context-simple",0);
         gtk_settings_set_long_property(p,"gtk-show-input-method-menu",0,0);
     }
-- 
1.7.0.1


lxdm-0.2.0-fix-some-env-set-bug.patch:
 lxdm.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- NEW FILE lxdm-0.2.0-fix-some-env-set-bug.patch ---
>From 08bc773ed867bd65c8b36f16795193afebe4a77e Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Tue, 11 May 2010 21:27:21 +0800
Subject: [PATCH 07/12] fix some env set bug

---
 src/lxdm.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/lxdm.c b/src/lxdm.c
index 6065e95..e34b20b 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -342,7 +342,7 @@ void create_server_auth(void)
         mkdir("/var/run/lxdm",0700);
         authfile = g_strdup("/var/run/lxdm/lxdm.auth");
     }
-    setenv("XAUTHORITY",authfile,0);
+    setenv("XAUTHORITY",authfile,1);
     remove(authfile);
 #if HAVE_LIBXAU
     FILE *fp=fopen(authfile,"wb");
@@ -721,7 +721,7 @@ void startx(void)
     char **args;
 
     if(!getenv("DISPLAY"))
-        putenv("DISPLAY=:0");
+        setenv("DISPLAY",":0",1);
 
 #ifndef DISABLE_XAUTH
     create_server_auth();
@@ -1070,9 +1070,6 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
     if(alloc_lang)
         g_free(lang);
     child_watch=g_child_watch_add(pid, on_session_stop, 0);
-
-    printf("xserver %d\n",server_watch);
-    printf("session %d\n",child_watch);
 }
 
 void lxdm_do_reboot(void)
-- 
1.7.0.1


lxdm-0.2.0-selinux.patch:
 greeter.c |   25 +++++++++++++++++++------
 lxdm.c    |   51 ++++++++++++++++++++++++++++++++++++---------------
 ui.c      |    4 ++--
 3 files changed, 57 insertions(+), 23 deletions(-)

--- NEW FILE lxdm-0.2.0-selinux.patch ---
>From 00eb4d081b0f5638ffef41c379db104aa6f80915 Mon Sep 17 00:00:00 2001
From: dgod <dgod.osa at gmail.com>
Date: Sat, 8 May 2010 20:44:30 +0800
Subject: [PATCH] I hate selinux

---
 src/greeter.c |   25 +++++++++++++++++++------
 src/lxdm.c    |   51 ++++++++++++++++++++++++++++++++++++---------------
 src/ui.c      |    3 ++-
 3 files changed, 57 insertions(+), 22 deletions(-)

diff --git a/src/greeter.c b/src/greeter.c
index 8321452..761082e 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -29,6 +29,8 @@
 
 #include "lang.h"
 #include <time.h>
+#include <stdlib.h>
+#include <sys/stat.h>
 
 enum {
     COL_SESSION_NAME,
@@ -43,9 +45,8 @@ enum {
     N_LANG_COLS
 };
 
-#ifndef VCONFIG_FILE
-#define VCONFIG_FILE "/etc/lxdm/lxdm.conf"
-#endif
+#define VCONFIG_PATH "/var/lib/lxdm"
+#define VCONFIG_FILE "/var/lib/lxdm/lxdm.conf"
 
 static gboolean config_changed = FALSE;
 static GKeyFile *config;
@@ -58,7 +59,7 @@ static GtkWidget* prompt;
 static GtkWidget* sessions;
 static GtkWidget* lang;
 
-static GtkWidget* exit;
+static GtkWidget* exit_btn;
 
 static GtkWidget* exit_menu;
 static GtkWidget *lang_menu;
@@ -445,7 +446,7 @@ static void load_exit()
     gtk_menu_shell_append(GTK_MENU_SHELL(exit_menu), item);
 
     gtk_widget_show_all(exit_menu);
-    g_signal_connect(exit, "clicked", G_CALLBACK(on_exit_clicked), NULL);
+    g_signal_connect(exit_btn, "clicked", G_CALLBACK(on_exit_clicked), NULL);
 }
 
 static gboolean on_expose(GtkWidget* widget, GdkEventExpose* evt, gpointer user_data)
@@ -595,7 +596,7 @@ static void create_win()
         on_timeout((GtkLabel*)w);
     }
 
-    exit = (GtkWidget*)gtk_builder_get_object(builder, "exit");
+    exit_btn = (GtkWidget*)gtk_builder_get_object(builder, "exit");
     load_exit();
 
     g_object_unref(builder);
@@ -735,6 +736,7 @@ static void apply_theme(const char* theme_name)
 int main(int arc, char *arg[])
 {
     char* theme_name;
+    GtkSettings*p;
 
     gtk_set_locale();
     bindtextdomain("lxdm", "/usr/share/locale");
@@ -749,6 +751,14 @@ int main(int arc, char *arg[])
 
     gtk_init(&arc, &arg);
 
+    p=gtk_settings_get_default();
+    if(p)
+    {
+        putenv("GTK_IM_MODULE=gtk-im-context-simple");
+        gtk_settings_set_string_property(p,"gtk-im-module","gtk-im-context-simple",0);
+        gtk_settings_set_long_property(p,"gtk-show-input-method-menu",0,0);
+    }
+
     set_background();
     set_root_background();
 
@@ -782,6 +792,9 @@ int main(int arc, char *arg[])
     {
         gsize len;
         char* data = g_key_file_to_data(var_config, &len, NULL);
+#ifdef VCONFIG_PATH
+	mkdir(VCONFIG_PATH,0700);
+#endif
         g_file_set_contents(VCONFIG_FILE, data, len, NULL);
         g_free(data);
     }
diff --git a/src/lxdm.c b/src/lxdm.c
index ff4d362..6065e95 100644
--- a/src/lxdm.c
+++ b/src/lxdm.c
@@ -84,6 +84,7 @@ static Window *my_xid;
 static unsigned int my_xid_n;
 static char *self;
 static pid_t child;
+static guint child_watch;
 static int reason;
 static int old_tty=1,tty = 7;
 
@@ -311,7 +312,6 @@ void create_server_auth(void)
     GRand *h;
     int i;
     char *authfile;
-    char *tmp;
 
     h = g_rand_new();
 #if HAVE_LIBXAU
@@ -342,9 +342,7 @@ void create_server_auth(void)
         mkdir("/var/run/lxdm",0700);
         authfile = g_strdup("/var/run/lxdm/lxdm.auth");
     }
-    tmp = g_strdup_printf("XAUTHORITY=%s", authfile);
-    putenv(tmp);
-    g_free(tmp);
+    setenv("XAUTHORITY",authfile,0);
     remove(authfile);
 #if HAVE_LIBXAU
     FILE *fp=fopen(authfile,"wb");
@@ -370,7 +368,7 @@ void create_server_auth(void)
         fclose(fp);
     }
 #else
-    tmp = g_strdup_printf("xauth -q -f %s add %s . %s",
+    char *tmp = g_strdup_printf("xauth -q -f %s add %s . %s",
                           authfile, getenv("DISPLAY"), mcookie);
     system(tmp);
     g_free(tmp);
@@ -415,12 +413,17 @@ static int do_conv(int num, const struct pam_message **msg,struct pam_response *
 	*resp = (struct pam_response *) calloc(num, sizeof(struct pam_response));
 	for(i=0;i<num;i++)
 	{
+		//printf("MSG: %d %s\n",msg[i]->msg_style,msg[i]->msg);
 		switch(msg[i]->msg_style){
 		case PAM_PROMPT_ECHO_ON:
-			resp[i]->resp=strdup(user_pass[0]);
+			resp[i]->resp=strdup(user_pass[0]?user_pass[0]:"");
 			break;
 		case PAM_PROMPT_ECHO_OFF:
-			resp[i]->resp=strdup(user_pass[1]);
+			resp[i]->resp=strdup(user_pass[1]?user_pass[1]:"");
+			break;
+		case PAM_ERROR_MSG:
+		case PAM_TEXT_INFO:
+			//printf("PAM: %s\n",msg[i]->msg);
 			break;
 		default:
 			break;
@@ -436,9 +439,11 @@ static struct pam_conv conv={.conv=do_conv,.appdata_ptr=user_pass};
 int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
 {
     struct passwd *pw;
+#if !HAVE_LIBPAM
     struct spwd *sp;
     char *real;
     char *enc;
+#endif
     if( !user )
         return AUTH_ERROR;
     if( !user[0] )
@@ -452,6 +457,7 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
         *ppw = pw;
         return AUTH_SUCCESS;
     }
+#if !HAVE_LIBPAM
     sp = getspnam(user);
     if( !sp )
         return AUTH_FAIL;
@@ -472,18 +478,25 @@ int lxdm_auth_user(char *user, char *pass, struct passwd **ppw)
         return AUTH_FAIL;
     if( strstr(pw->pw_shell, "nologin") )
         return AUTH_PRIV;
-    *ppw = pw;
-#if HAVE_LIBPAM
+#else
     if(pamh) pam_end(pamh,0);
     if(PAM_SUCCESS != pam_start("lxdm", pw->pw_name, &conv, &pamh))
+    {
         pamh=NULL;
+        return AUTH_FAIL;
+    }
     else
     {
+	int ret;
         user_pass[0]=user;user_pass[1]=pass;
-        pam_authenticate(pamh,PAM_SILENT);
-        user_pass[0]=0;user_pass[1]=0;
+        ret=pam_authenticate(pamh,PAM_SILENT);
+	user_pass[0]=0;user_pass[1]=0;
+	if(ret!=PAM_SUCCESS)
+            return AUTH_FAIL;
+	//ret=pam_setcred(pamh, PAM_ESTABLISH_CRED);
     }
 #endif
+    *ppw = pw;
     return AUTH_SUCCESS;
 }
 
@@ -502,7 +515,7 @@ void setup_pam_session(struct passwd *pw,char *session_name)
     sprintf(x, "tty%d", tty);
     pam_set_item(pamh, PAM_TTY, x);
 #ifdef PAM_XDISPLAY
-	pam_set_item( pamh, PAM_XDISPLAY, getenv("DISPLAY") );
+    pam_set_item( pamh, PAM_XDISPLAY, getenv("DISPLAY") );
 #endif
 
     if(session_name && session_name[0])
@@ -514,7 +527,7 @@ void setup_pam_session(struct passwd *pw,char *session_name)
     }
     err = pam_open_session(pamh, 0); /* FIXME pam session failed */
     if( err != PAM_SUCCESS )
-        log_print( "pam open session error \"%s\"\n", pam_strerror(pamh, err) );
+        log_print( "pam open session error \"%s\"\n", pam_strerror(pamh, err));
 }
 
 void close_pam_session(void)
@@ -522,6 +535,7 @@ void close_pam_session(void)
     int err;
     if( !pamh ) return;
     err = pam_close_session(pamh, 0);
+    //err=pam_setcred(pamh, PAM_DELETE_CRED);
     pam_end(pamh, err);
     pamh = NULL;
 }
@@ -666,6 +680,7 @@ static void on_xserver_stop(GPid pid, gint status, gpointer data)
     //log_print("xserver stop, restart. return status %x\n",status);
     stop_pid(server);
     server = -1;
+    server_watch=0;
     lxdm_restart_self();
 }
 
@@ -705,7 +720,7 @@ void startx(void)
     char *arg;
     char **args;
 
-    if( !getenv("DISPLAY") )
+    if(!getenv("DISPLAY"))
         putenv("DISPLAY=:0");
 
 #ifndef DISABLE_XAUTH
@@ -753,6 +768,7 @@ void exit_cb(void)
     if(server_watch>0)
     {
         g_source_remove(server_watch);
+        server_watch=0;
     }
     if( server > 0 )
     {
@@ -871,6 +887,8 @@ static void on_session_stop(GPid pid, gint status, gpointer data)
     }
     ui_prepare();
     g_spawn_command_line_async("/etc/lxdm/PostLogout",NULL);
+    
+    child_watch=0;
 }
 
 static void replace_env(char** env, const char* name, const char* new_val)
@@ -1051,7 +1069,10 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
         g_free(session);
     if(alloc_lang)
         g_free(lang);
-    g_child_watch_add(pid, on_session_stop, 0);
+    child_watch=g_child_watch_add(pid, on_session_stop, 0);
+
+    printf("xserver %d\n",server_watch);
+    printf("session %d\n",child_watch);
 }
 
 void lxdm_do_reboot(void)
diff --git a/src/ui.c b/src/ui.c
index 1eb11f5..1ca7b50 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -274,6 +274,7 @@ void ui_drop(void)
         close(greeter_pipe[0]);
 
         g_source_remove(greeter_watch);
+        greeter_watch=0;
         waitpid(greeter, 0, 0) ;
         greeter=-1;
     }
@@ -455,7 +456,7 @@ static void on_greeter_exit(GPid pid, gint status, gpointer data)
     if( pid != greeter )
         return;
     greeter = -1;
-    g_source_remove(greeter_watch);
+    greeter_watch=0;
 }
 
 void ui_prepare(void)
-- 
1.6.3



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/F-11/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- .cvsignore	5 Apr 2010 20:38:56 -0000	1.5
+++ .cvsignore	20 May 2010 15:11:07 -0000	1.6
@@ -1 +1 @@
-lxdm-20100405gitd65ce94.tar.bz2
+lxdm-0.2.0.tar.gz

lxdm-0.2.0-config.patch:
 lxdm.conf.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: lxdm-0.2.0-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/F-11/lxdm-0.2.0-config.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- lxdm-0.2.0-config.patch	3 Mar 2010 01:36:53 -0000	1.1
+++ lxdm-0.2.0-config.patch	20 May 2010 15:11:07 -0000	1.2
@@ -1,7 +1,7 @@
 --- lxdm.orig/data/lxdm.conf.in	2010-02-23 23:32:31.000000000 +0100
 +++ lxdm/data/lxdm.conf.in	2010-02-24 00:52:27.000000000 +0100
-@@ -5,14 +5,14 @@
- greeter=@libexecdir@/lxdm-greeter-gtk
+@@ -5,11 +5,11 @@
+ greeter=@FULL_LIBEXECDIR@/lxdm-greeter-gtk
  
  [server]
 -# arg=/usr/bin/X -nr vt1
@@ -9,11 +9,8 @@
  
  [display]
  gtk_theme=Clearlooks
- bg=/usr/share/backgrounds/default.png
+-bg=/usr/share/backgrounds/default.png
++bg=/usr/share/backgrounds/default.jpg
  bottom_pane=1
  lang=1
--theme=Industrial
-+# theme=Industrial
- 
- [input]
- 
+ theme=Industrial


Index: lxdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/F-11/lxdm.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- lxdm.spec	5 Apr 2010 20:38:56 -0000	1.5
+++ lxdm.spec	20 May 2010 15:11:07 -0000	1.6
@@ -1,24 +1,26 @@
 # Review at https://bugzilla.redhat.com/show_bug.cgi?id=540034
 
-%global gitdate 20100405
-%global gitversion d65ce94
-%global alphatag .%{gitdate}git%{gitversion}
-
 Name:           lxdm
 Version:        0.2.0
-Release:        0.1%{?alphatag}%{?dist}
+Release:        4%{?dist}
 Summary:        Lightweight X11 Display Manager
 
 Group:          User Interface/Desktops
 License:        GPLv2+ and LGPLv2+
 URL:            http://lxde.org
-#Source0:        http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
-# Source0 was generated as follows: 
-# git clone git://lxde.git.sourceforge.net/gitroot/lxde/lxdm
-# cd lxdm
-# git archive --format=tar --prefix=%{name}/ %{gitversion} | bzip2 > %{name}-%{gitdate}git%{gitversion}.tar.bz2
-Source0:        %{name}-%{gitdate}git%{gitversion}.tar.bz2
-## distro specific patches ##
+Source0:        http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=00eb4d081b0f5638ffef41c379db104aa6f80915
+Patch0:         lxdm-0.2.0-selinux.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=08bc773ed867bd65c8b36f16795193afebe4a77e
+Patch1:         lxdm-0.2.0-fix-some-env-set-bug.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=3cf91b090c7ba78eefc2e530e9ea50ac6c6dbd2c
+Patch2:         lxdm-0.2.0-fix-left-env-bug.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=3c6502affe326777d6ce481f9bb04ce7f3223ea6
+Patch3:         lxdm-0.2.0-add-debug-option.patch
+# http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxdm;a=commit;h=093e79c41ab0276d627af732a45473d3571a689f
+Patch4:         lxdm-0.2.0-fix-env-XAUTHORITY.patch
+## Distro specific patches ##
+# Distro artwork, start on vt1
 Patch10:        lxdm-0.2.0-config.patch
 # SELinux, permit graphical root login etc.
 Patch11:        lxdm-svn2262-pam.patch
@@ -29,11 +31,6 @@ BuildRequires:  iso-codes-devel
 BuildRequires:  ConsoleKit-devel
 BuildRequires:  pam-devel
 BuildRequires:  intltool >= 0.40.0
-
-# for autogen.sh
-BuildRequires:	automake
-BuildRequires:	libtool
-
 Requires:       pam
 Requires:       /sbin/shutdown
 Requires:       desktop-backgrounds-compat
@@ -48,17 +45,17 @@ KDM in LXDE distros. It's still in very 
 
 
 %prep
-%setup -qn lxdm
-
-export NOCONFIGURE=yes
-sh autogen.sh
-
+%setup -q
+%patch0 -p1 -b .selinux
+%patch1 -p1 -b .some-env-set-bug
+%patch2 -p1 -b .fix-left-env-bug
+%patch3 -p1 -b .add-debug-option
+%patch4 -p1 -b .fix-env-XAUTHORITY
 %patch10 -p1 -b .config
 %patch11 -p1 -b .orig
 
 
 %build
-./autogen.sh
 %configure
 make %{?_smp_mflags} V=1
 
@@ -70,14 +67,9 @@ make install DESTDIR=%{buildroot} INSTAL
 
 # these files are not in the package, but should be owned by lxdm 
 touch %{buildroot}%{_sysconfdir}/%{name}/xinitrc
-mkdir -p %{buildroot}%{_localstatedir}/run
-touch %{buildroot}%{_localstatedir}/run/%{name}.pid
-mkdir -p %{buildroot}%{_localstatedir}/log
-touch %{buildroot}%{_localstatedir}/log/%{name}.log
-
-# needed to interact with plymouth. 
-# Already owned by gdm, but we need to own it too
-mkdir -p %{buildroot}%{_localstatedir}/spool/gdm/
+mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
+mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
+touch %{buildroot}%{_localstatedir}/lib/%{name}.conf
 
 
 %clean
@@ -90,26 +82,48 @@ rm -rf %{buildroot}
 %doc AUTHORS COPYING README TODO gpl-2.0.txt lgpl-2.1.txt
 %dir %{_sysconfdir}/%{name}
 %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/xinitrc
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/Xsession
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/LoginReady
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/PostLogin
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/PostLogout
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/PreLogin
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/PreReboot
-%config(noreplace) %attr(755,-,-) %{_sysconfdir}/%{name}/PreShutdown
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/Xsession
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/LoginReady
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PostLogin
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PostLogout
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreLogin
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreReboot
+%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreShutdown
 %config %{_sysconfdir}/%{name}/lxdm.conf
 %config(noreplace) %{_sysconfdir}/pam.d/%{name}
 %{_sbindir}/%{name}
 %{_sbindir}/lxdm-binary
 %{_libexecdir}/lxdm-greeter-gtk
 %{_datadir}/%{name}/
-%ghost %{_localstatedir}/run/%{name}.pid
-%ghost %{_localstatedir}/log/%{name}.log
-%dir %{_localstatedir}/spool/gdm/
+%dir %{_localstatedir}/run/%{name}
+%dir %{_localstatedir}/lib/%{name}
+%ghost %{_localstatedir}/lib/%{name}.conf
+
 
 %changelog
+* Tue May 18 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-4
+- Fix env XAUTHORITY bug
+
+* Sun May 16 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-3
+- Fix permissions of /var/run/lxdm
+- Add patches to fix some env settings
+- Add --debug option
+
+* Sun May 09 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-2
+- Patch for SELinux problems (#564320)
+
+* Wed May 05 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-1
+- Update to 0.2.0
+
+* Sat Apr 17 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-0.3.20100405gitd65ce94
+- Adjustments for recent Goddard artwork changes
+
+* Tue Apr 06 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-0.2.20100405gitd65ce94
+- Fix ownership of scripts in /etc/lxdm
+
 * Mon Apr 05 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.2.0-0.1.20100405gitd65ce94
 - Update to git release cb858f7
+- New BuildRequires pam-devel
 - Bump version to 0.2.0
 
 * Wed Mar 11 2010 Christoph Wickert <cwickert at fedoraproject.org> - 0.1.1-0.2.20100303gite4f7b39


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/lxdm/F-11/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- sources	5 Apr 2010 20:38:56 -0000	1.5
+++ sources	20 May 2010 15:11:07 -0000	1.6
@@ -1 +1 @@
-3f3de11c5503af1c156674c6f4b2095f  lxdm-20100405gitd65ce94.tar.bz2
+e539f81ba691f2b0cb2017b82dfee58f  lxdm-0.2.0.tar.gz



More information about the scm-commits mailing list