From e03ba02709a306facaf861972d36d4791ad820d8 Mon Sep 17 00:00:00 2001 From: Clifford Sabalo Date: Sun, 9 Jun 2019 12:35:53 +0800 Subject: [PATCH] xinit: add new patch Whenever startx is ran, it generates a random .serverauth* file in the home directory which is not being removed on shutdown or reboot. This patch moves these .serverauthXXX files in the /tmp directory so they are removed on reboot. --- .../06_move_serverauthfile_into_tmp.diff | 20 +++++++++++++++++++ srcpkgs/xinit/template | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff diff --git a/srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff b/srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff new file mode 100644 index 0000000000..4770eaf452 --- /dev/null +++ b/srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff @@ -0,0 +1,20 @@ +Move startx auth files in /tmp so they are removed on reboot. +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736 +The trap patch didn't seem to work on reboot. +--- + startx.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: startx.cpp.orig +=================================================================== +--- startx.cpp.orig ++++ startx.cpp +@@ -273,7 +273,7 @@ + dummy=0 + + XCOMM create a file with auth information for the server. ':0' is a dummy. +- xserverauthfile=$HOME/.serverauth.$$ ++ xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX` + trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM + xauth -q -f "$xserverauthfile" << EOF + add :$dummy . $mcookie diff --git a/srcpkgs/xinit/template b/srcpkgs/xinit/template index 9147e652de..2c80a458eb 100644 --- a/srcpkgs/xinit/template +++ b/srcpkgs/xinit/template @@ -1,7 +1,7 @@ # Template file for 'xinit' pkgname=xinit version=1.4.1 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-xinitdir=/etc/X11/xinit" hostmakedepends="pkg-config"