From 3faa2eeb0c92fcd7440eb45dc84b222842ecadd4 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Tue, 2 Oct 2018 15:31:40 +0300 Subject: [PATCH] tigervnc, xvfb: use rename(2) instead of symlink(2) when creating lock file Fixes issues with stale lock files in case Xvnc was killed. Note: original implementation of locking uses link(2) which is disallowed by seccomp on Android 8 or later. --- x11-packages/tigervnc/build.sh | 2 +- x11-packages/xorg-xvfb/build.sh | 2 +- x11-packages/xorg-xvfb/xorg-server-1.20.1_os_utils.c.patch | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x11-packages/tigervnc/build.sh b/x11-packages/tigervnc/build.sh index a38ecbe1c..dd9255dbf 100644 --- a/x11-packages/tigervnc/build.sh +++ b/x11-packages/tigervnc/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch @xeffyr" TERMUX_PKG_HOMEPAGE=http://www.tigervnc.org/ TERMUX_PKG_VERSION=1.9.0 -TERMUX_PKG_REVISION=7 +TERMUX_PKG_REVISION=8 TERMUX_PKG_DESCRIPTION="Suite of VNC servers. Based on the VNC 4 branch of TightVNC." TERMUX_PKG_SRCURL=https://github.com/TigerVNC/tigervnc/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740 diff --git a/x11-packages/xorg-xvfb/build.sh b/x11-packages/xorg-xvfb/build.sh index f61381624..42772e9df 100644 --- a/x11-packages/xorg-xvfb/build.sh +++ b/x11-packages/xorg-xvfb/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch @xeffyr" TERMUX_PKG_HOMEPAGE=http://xorg.freedesktop.org/ TERMUX_PKG_DESCRIPTION="X virtual framebuffer" TERMUX_PKG_VERSION=1.20.1 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SHA256=59c99fe86fe75b8164c6567bfc6e982aecc2e4a51e6fbac1b842d5d00549e918 diff --git a/x11-packages/xorg-xvfb/xorg-server-1.20.1_os_utils.c.patch b/x11-packages/xorg-xvfb/xorg-server-1.20.1_os_utils.c.patch index c2b54b4fb..ec2cd38fa 100644 --- a/x11-packages/xorg-xvfb/xorg-server-1.20.1_os_utils.c.patch +++ b/x11-packages/xorg-xvfb/xorg-server-1.20.1_os_utils.c.patch @@ -1,6 +1,6 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c --- xorg-server-1.20.1/os/utils.c 2018-08-07 19:31:05.000000000 +0300 -+++ xorg-server-1.20.1.mod/os/utils.c 2018-09-11 23:52:17.498159434 +0300 ++++ xorg-server-1.20.1.mod/os/utils.c 2018-10-02 15:18:51.990102574 +0300 @@ -228,7 +228,7 @@ * server at a time. This keeps the servers from stomping on each other * if the user forgets to give them different display numbers. @@ -15,7 +15,7 @@ diff -uNr xorg-server-1.20.1/os/utils.c xorg-server-1.20.1.mod/os/utils.c haslock = 0; while ((!haslock) && (i++ < 3)) { - haslock = (link(tmp, LockFile) == 0); -+ haslock = (symlink(tmp, LockFile) == 0); ++ haslock = (rename(tmp, LockFile) == 0); if (haslock) { /* * We're done.