[arch-commits] Commit in lxdm/trunk (PKGBUILD git-fixes.patch)
Balló György
bgyorgy at archlinux.org
Wed Apr 15 14:09:14 UTC 2015
Date: Wednesday, April 15, 2015 @ 16:09:13
Author: bgyorgy
Revision: 131410
upgpkg: lxdm 0.5.1-1
Update to version 0.5.1
Modified:
lxdm/trunk/PKGBUILD
Deleted:
lxdm/trunk/git-fixes.patch
-----------------+
PKGBUILD | 11 ---
git-fixes.patch | 183 ------------------------------------------------------
2 files changed, 3 insertions(+), 191 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-04-15 13:54:37 UTC (rev 131409)
+++ PKGBUILD 2015-04-15 14:09:13 UTC (rev 131410)
@@ -5,8 +5,8 @@
# Contributor: kiefer <jorgelmadrid at gmail.com>
pkgname=lxdm
-pkgver=0.5.0
-pkgrel=4
+pkgver=0.5.1
+pkgrel=1
pkgdesc='Lightweight X11 Display Manager'
arch=('i686' 'x86_64')
url="https://sourceforge.net/projects/lxdm/"
@@ -22,12 +22,10 @@
'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin'
'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown')
source=(http://downloads.sourceforge.net/lxdm/$pkgname-$pkgver.tar.xz
- git-fixes.patch
default-config.patch
lxdm.pam
Xsession)
-md5sums=('a51686720e606ca456d7f56ae4159d1f'
- '3463d9b886d9ee847cbbb23bc586a3d3'
+md5sums=('9e03ce5f6d303bc9b689732401934dc6'
'f0ae6c072f151104c53a030fd7757821'
'c941ef896248bc7c03901b513490425c'
'd9c8f8c9e6de52dbc389696454c8f572')
@@ -35,9 +33,6 @@
prepare(){
cd "$srcdir/$pkgname-$pkgver"
- # Apply some fixes from git
- patch -Np1 -i ../git-fixes.patch
-
# Adjust Arch-specific settings
patch -Np1 -i ../default-config.patch
Deleted: git-fixes.patch
===================================================================
--- git-fixes.patch 2015-04-15 13:54:37 UTC (rev 131409)
+++ git-fixes.patch 2015-04-15 14:09:13 UTC (rev 131410)
@@ -1,183 +0,0 @@
-diff --git a/src/lxcom.c b/src/lxcom.c
-index 9491cb2..397d1b5 100644
---- a/src/lxcom.c
-+++ b/src/lxcom.c
-@@ -183,7 +183,6 @@ static GString *lxcom_func(gpointer data,int uid,int pid,int argc,char **argv)
- GSList *p,*n;
- GString *res=NULL;
- assert(argc>0 && argv!=NULL);
--
- do{
- if(!strcmp(argv[0],"SIGNAL"))
- {
-@@ -193,16 +192,18 @@ static GString *lxcom_func(gpointer data,int uid,int pid,int argc,char **argv)
- int sig=atoi(argv[1]);
- if(sig==SIGCHLD)
- {
-- for(p=child_watch_list;p!=NULL;p=n)
-+ CHECK_SIGCHLD:
-+ for(p=child_watch_list;p!=NULL;p=p->next)
- {
- ChildWatch *item=p->data;
- int status;
-- n=p->next;
- if(waitpid(item->pid,&status,WNOHANG)>0)
- {
- child_watch_list=g_slist_delete_link(child_watch_list,p);
-+ // item->func may change the child_watch_list
- item->func(item->data,item->pid,status);
- g_free(item);
-+ goto CHECK_SIGCHLD;
- }
- }
- }
-@@ -438,7 +439,7 @@ gboolean lxcom_send(const char *sock,const char *buf,char **res)
- int lxcom_add_child_watch(int pid,void (*func)(void*,int,int),void *data)
- {
- ChildWatch *item;
-- if(pid<0 || !func)
-+ if(pid<=0 || !func)
- return -1;
- item=g_new(ChildWatch,1);
- item->func=func;
-diff --git a/src/lxdm.c b/src/lxdm.c
-index 638c30f..62ac31d 100644
---- a/src/lxdm.c
-+++ b/src/lxdm.c
-@@ -669,7 +669,7 @@ static void xauth_write_file(const char *file,int dpy,char data[16])
- gethostname(addr,sizeof(addr));
-
- fd=open(file,O_CREAT|O_TRUNC|O_WRONLY,0600);
-- if(!fd==-1) return;
-+ if(fd==-1) return;
- xauth_write_uint16(fd,256); //FamilyLocalHost
- xauth_write_string(fd,addr);
- xauth_write_string(fd,buf);
-@@ -1022,7 +1022,18 @@ static void on_session_stop(void *data,int pid, int status)
- int level;
- LXSession *s=data;
-
-- lxsession_stop(s);
-+ gchar *argv[] = { "/etc/lxdm/PostLogout", NULL };
-+ g_spawn_async(NULL, argv, s->env, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
-+
-+ if(g_key_file_get_integer(config,"server","reset",NULL)!=1)
-+ {
-+ lxsession_stop(s);
-+ }
-+ else
-+ {
-+ lxsession_free(s);
-+ s=NULL;
-+ }
-
- level=get_run_level();
- if(level=='0' || level=='6')
-@@ -1034,22 +1045,19 @@ static void on_session_stop(void *data,int pid, int status)
- g_message("run level %c\n",level);
- lxdm_quit_self(0);
- }
-- if(s!=lxsession_greeter())
-+ if(s && s!=lxsession_greeter())
- {
- lxsession_free(s);
- }
-- else if(g_key_file_get_integer(config,"server","reset",NULL)==1)
-+ else if(!s)
- {
-- lxsession_free(s);
- lxsession_greeter();
- }
-- gchar *argv[] = { "/etc/lxdm/PostLogout", NULL };
-- g_spawn_async(NULL, argv, s->env, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
- }
-
--gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
-+gboolean lxdm_get_session_info(const char *session,char **pname,char **pexec,char **pdesktop_names)
- {
-- char *name=NULL,*exec=NULL;
-+ char *name=NULL,*exec=NULL,**names=NULL,*desktop_names=NULL;
- if(!session || !session[0])
- {
- name=g_key_file_get_string(config, "base", "session", 0);
-@@ -1072,6 +1080,11 @@ gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
- }
- name=g_key_file_get_string(cfg,"Desktop Entry","Name",NULL);
- exec=g_key_file_get_string(cfg,"Desktop Entry","Exec",NULL);
-+ names = g_key_file_get_string_list (cfg, "Desktop Entry", "DesktopNames", NULL, NULL);
-+ if (names != NULL) {
-+ desktop_names = g_strjoinv (":", names);
-+ g_strfreev (names);
-+ }
- g_key_file_free(cfg);
- if(!name || !exec)
- {
-@@ -1097,6 +1110,11 @@ gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
- {
- name = g_key_file_get_locale_string(f, "Desktop Entry", "Name", NULL, NULL);
- exec = g_key_file_get_string(f, "Desktop Entry", "Exec", NULL);
-+ names = g_key_file_get_string_list (f, "Desktop Entry", "DesktopNames", NULL, NULL);
-+ if (names != NULL) {
-+ desktop_names = g_strjoinv (":", names);
-+ g_strfreev (names);
-+ }
- }
- else
- {
-@@ -1120,6 +1138,7 @@ gboolean lxdm_get_session_info(char *session,char **pname,char **pexec)
- }
- if(pname) *pname=name;
- if(pexec) *pexec=exec;
-+ if(pdesktop_names) *pdesktop_names=desktop_names;
- return TRUE;
- }
-
-@@ -1194,7 +1213,7 @@ static void lxdm_save_login(char *session,char *lang)
-
- void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
- {
-- char *session_name=0,*session_exec=0;
-+ char *session_name=0,*session_exec=0,*session_desktop_names=0;
- gboolean alloc_session=FALSE,alloc_lang=FALSE;
- int pid;
- LXSession *s,*prev;
-@@ -1222,7 +1241,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
- g_key_file_free(dmrc);
- }
-
-- if(!lxdm_get_session_info(session,&session_name,&session_exec))
-+ if(!lxdm_get_session_info(session,&session_name,&session_exec,&session_desktop_names))
- {
- if(alloc_session)
- g_free(session);
-@@ -1329,6 +1348,9 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
- env=g_environ_setenv(env, "LC_MESSAGES", lang, TRUE);
- env=g_environ_setenv(env, "LANGUAGE", lang, TRUE);
- }
-+
-+ if( session_desktop_names && session_desktop_names[0] )
-+ env=g_environ_setenv(env, "XDG_CURRENT_DESKTOP", session_desktop_names, TRUE);
-
- #ifndef DISABLE_XAUTH
- env=create_client_auth(pw,env);
-@@ -1348,6 +1370,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option)
-
- g_free(session_name);
- g_free(session_exec);
-+ g_free(session_desktop_names);
- if(alloc_session)
- g_free(session);
- if(alloc_lang)
-diff --git a/src/ui.c b/src/ui.c
-index f233589..efe02a1 100644
---- a/src/ui.c
-+++ b/src/ui.c
-@@ -145,7 +145,7 @@ static gboolean on_greeter_input(GIOChannel *source, GIOCondition condition, gpo
- else if( !strncmp(str, "shutdown", 6) )
- lxdm_do_shutdown();
- else if( !strncmp(str, "log ", 4) )
-- g_message(str + 4);
-+ g_message("%s",str + 4);
- else if( !strncmp(str, "login ", 6) )
- {
- char *user = greeter_param(str, "user");
More information about the arch-commits
mailing list