void-packages/srcpkgs/xinit/patches/06_move_serverauthfile_into_tmp.diff
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

20 lines
720 B
Diff

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
===================================================================
--- a/startx.cpp
+++ b/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