[arch-commits] Commit in lxdm/trunk (PKGBUILD xauth.patch)

Balló György bgyorgy at archlinux.org
Sun Nov 8 07:35:57 UTC 2015


    Date: Sunday, November 8, 2015 @ 08:35:57
  Author: bgyorgy
Revision: 146396

upgpkg: lxdm 0.5.2-2

Revert broken commit

Added:
  lxdm/trunk/xauth.patch
Modified:
  lxdm/trunk/PKGBUILD

-------------+
 PKGBUILD    |    7 ++++
 xauth.patch |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-11-08 06:58:50 UTC (rev 146395)
+++ PKGBUILD	2015-11-08 07:35:57 UTC (rev 146396)
@@ -6,7 +6,7 @@
 
 pkgname=lxdm
 pkgver=0.5.2
-pkgrel=1
+pkgrel=2
 pkgdesc='Lightweight X11 Display Manager'
 arch=('i686' 'x86_64')
 url="https://sourceforge.net/projects/lxdm/"
@@ -22,10 +22,12 @@
         '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
+        xauth.patch
         default-config.patch
         lxdm.pam
         Xsession)
 md5sums=('7806aeb11d4565c88dca2b05c9f7c44b'
+         'e5e9957f34f40ed5b7f7a47c778e38cd'
          'f0ae6c072f151104c53a030fd7757821'
          'c941ef896248bc7c03901b513490425c'
          '6ff73570368501a06ee7badc8e415d0a')
@@ -33,6 +35,9 @@
 prepare(){
   cd "$srcdir/$pkgname-$pkgver"
 
+  # Revert broken commit
+  patch -RNp1 -i ../xauth.patch
+
   # Adjust Arch-specific settings
   patch -Np1 -i ../default-config.patch
 

Added: xauth.patch
===================================================================
--- xauth.patch	                        (rev 0)
+++ xauth.patch	2015-11-08 07:35:57 UTC (rev 146396)
@@ -0,0 +1,82 @@
+From e8f387089e241360bdc6955d3e479450722dcea3 Mon Sep 17 00:00:00 2001
+From: dgod <dgod.osa at gmail.com>
+Date: Wed, 7 Oct 2015 16:38:52 +0800
+Subject: [PATCH] pass xauth file to xserver command
+
+---
+ src/lxdm.c | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/lxdm.c b/src/lxdm.c
+index 43a98c7..03bc477 100644
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -304,7 +304,7 @@ static LXSession *lxsession_add(void)
+ 
+ static LXSession *lxsession_greeter(void)
+ {
+-	char temp[16];
++	char temp[128];
+ 	LXSession *s;
+ 	s=lxsession_find_greeter();
+ 	if(s)
+@@ -327,10 +327,17 @@ static LXSession *lxsession_greeter(void)
+ 	s->idle=FALSE;
+ 	sprintf(temp,":%d",s->display);
+ 	setenv("DISPLAY",temp,1);
++	#ifndef DISABLE_XAUTH
++	sprintf(temp,"/var/run/lxdm/lxdm-:%d.auth",s->display);
++	setenv("XAUTHORITY",temp,1);
++	#endif
+ 	g_message("prepare greeter on %s\n",temp);
+ 	ui_prepare();
+ 	lxsession_set_active(s);
+ 	g_message("start greeter on %s\n",temp);
++	#ifndef DISABLE_XAUTH
++	unsetenv("XAUTHORITY");
++	#endif
+ 	return s;
+ }
+ 
+@@ -468,7 +475,7 @@ static char *lxsession_xserver_command(LXSession *s)
+ 		}
+ 	}
+ 
+-	arg = g_renew(char *, arg, arc + 10);
++	arg = g_renew(char *, arg, arc + 15);
+ 	if(nr_tty)
+ 	{
+ 		arg[arc++] = g_strdup("-background");
+@@ -486,6 +493,10 @@ static char *lxsession_xserver_command(LXSession *s)
+ 	{
+ 		arg[arc++] = g_strdup("-novtswitch");
+ 	}
++#ifndef DISABLE_XAUTH
++	arg[arc++] = g_strdup("-auth");
++	arg[arc++] = g_strdup_printf("/var/run/lxdm/lxdm-:%d.auth",s->display);
++#endif
+ 	arg[arc] = NULL;
+ 	p=g_strjoinv(" ", arg);
+ 	g_strfreev(arg);
+@@ -694,7 +705,7 @@ static void create_server_auth(LXSession *s)
+ 
+ 	authfile = g_strdup_printf("/var/run/lxdm/lxdm-:%d.auth",s->display);
+ 
+-	//setenv("XAUTHORITY",authfile,1);
++	setenv("XAUTHORITY",authfile,1);
+ 	remove(authfile);
+ 	xauth_write_file(authfile,s->display,s->mcookie);
+ 	g_free(authfile);
+@@ -998,6 +1009,9 @@ static void lxdm_startx(LXSession *s)
+ 	g_message("%ld: start xserver in %d retry",time(NULL),i);
+ 	if(s->dpy==NULL)
+ 		exit(EXIT_FAILURE);
++	#ifndef DISABLE_XAUTH
++	unsetenv("XAUTHORITY");
++	#endif
+ 	
+ 	if(s->option && g_key_file_has_key(config,s->option,"numlock",NULL))
+ 	{
+-- 
+2.1.4
+



More information about the arch-commits mailing list