xwayland: update to 1.20.5

This commit is contained in:
Leonid Pliushch 2019-07-08 19:01:43 +03:00 committed by Yaksh Bariya
parent 2cc9d7cc69
commit 4a605761f5
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
12 changed files with 2 additions and 265 deletions

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://xorg.freedesktop.org/wiki/
TERMUX_PKG_DESCRIPTION="Wayland X11 server"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=1.20.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=1.20.5
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=1b3ce466c12cacbe2252b3ad5b0ed561972eef9d09e75900d65fb1e21f9201de
TERMUX_PKG_SHA256=a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d
TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libpciaccess, libpixman, libx11, libxau, libxfont2, libxinerama, libxkbfile, libxshmfence, mesa, openssl, xkeyboard-config, xorg-xkbcomp, libwayland, libwayland-protocols, libepoxy"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="

View File

@ -1,25 +0,0 @@
+++ ./hw/xfree86/os-support/xf86_OSlib.h 2017-12-20 22:32:33.000000000 +0200
@@ -132,7 +132,11 @@
#if !defined(__sun)
#include <sys/at_ansi.h>
#endif
+#ifdef __ANDROID__
+#include <linux/kd.h>
+#else
#include <sys/kd.h>
+#endif
#include <sys/vt.h>
extern _X_HIDDEN void xf86VTAcquire(int);
@@ -195,7 +199,11 @@
#include <sys/mman.h>
#ifdef __linux__
#define HAS_USL_VTS
+#ifdef __ANDROID__
+#include <linux/kd.h>
+#else
#include <sys/kd.h>
+#endif
#include <sys/vt.h>
#define LDGMAP GIO_SCRNMAP
#define LDSMAP PIO_SCRNMAP

View File

@ -1,10 +0,0 @@
+++ ./hw/xfree86/os-support/linux/Makefile.am 2018-11-21 22:50:02.949575248 +0200
@@ -18,7 +18,7 @@
XORG_CFLAGS += $(DBUS_CFLAGS)
endif
-liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
+liblinux_la_SOURCES = linux.h lnx_init.c $(srcdir)/../shared/ioperm_noop.c $(srcdir)/../shared/platform_noop.c \
lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
$(srcdir)/../shared/VTsw_usl.c \
$(srcdir)/../shared/posix_tty.c \

View File

@ -1,36 +0,0 @@
+++ ./hw/xfree86/os-support/shared/platform_noop.c 2018-11-22 02:41:02.516704523 +0200
@@ -0,0 +1,34 @@
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+/* noop platform device support */
+#include "xf86_OSproc.h"
+#include "xf86OSpriv.h"
+
+#include "xf86.h"
+
+/***************************************************************************/
+/* Video Memory Mapping section */
+/***************************************************************************/
+
+void
+xf86OSInitVidMem(VidMemInfoPtr pVidMem)
+{
+ pVidMem->initialised = TRUE;
+}
+
+#ifdef XSERVER_PLATFORM_BUS
+#include "xf86platformBus.h"
+Bool
+xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid)
+{
+ return FALSE;
+}
+
+void xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
+{
+
+}
+#endif

View File

@ -1,10 +0,0 @@
+++ ./hw/xfree86/common/xf86AutoConfig.c
@@ -294,7 +294,7 @@
xf86PciMatchDriver(md);
#endif
-#if defined(__linux__)
+#if defined(__linux__) && !defined(__ANDROID__)
xf86AddMatchedDriver(md, "modesetting");
#endif

View File

@ -1,21 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/common/compiler.h xorg-server-1.20.1.mod/hw/xfree86/common/compiler.h
--- xorg-server-1.20.1/hw/xfree86/common/compiler.h 2018-08-07 19:31:02.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/common/compiler.h 2018-10-08 21:07:16.804247702 +0300
@@ -518,7 +518,7 @@
barrier();
}
-#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) || defined(__ANDROID__)
#if defined(__arm32__) || defined(__mips64)
#define PORT_SIZE long
#else
@@ -758,7 +758,7 @@
return xf86ReadMmio32Le((void *) ioBase, port);
}
-#elif defined(__arm__) && defined(__linux__)
+#elif defined(__arm__) && defined(__linux__) && !defined(__ANDROID__)
/* for Linux on ARM, we use the LIBC inx/outx routines */
/* note that the appropriate setup via "ioperm" needs to be done */

View File

@ -1,12 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/common/xf86Config.c xorg-server-1.20.1.mod/hw/xfree86/common/xf86Config.c
--- xorg-server-1.20.1/hw/xfree86/common/xf86Config.c 2018-08-07 19:31:02.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/common/xf86Config.c 2018-10-08 21:07:16.807582583 +0300
@@ -106,7 +106,7 @@
#define SYS_CONFIGDIRPATH "%D/X11/%X"
#endif
#ifndef PROJECTROOT
-#define PROJECTROOT "/usr/X11R6"
+#define PROJECTROOT "/data/data/com.termux/files/usr/X11R6"
#endif
static ModuleDefault ModuleDefaults[] = {

View File

@ -1,12 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_acpi.c
--- xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c 2018-08-07 19:31:03.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_acpi.c 2018-10-08 21:07:16.807582583 +0300
@@ -15,7 +15,7 @@
#include <fcntl.h>
#include <errno.h>
-#define ACPI_SOCKET "/var/run/acpid.socket"
+#define ACPI_SOCKET "/data/data/com.termux/files/usr/var/run/acpid.socket"
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
#define ACPI_VIDEO_NOTIFY_PROBE 0x81

View File

@ -1,18 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_kmod.c xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_kmod.c
--- xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_kmod.c 2018-08-07 19:31:03.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_kmod.c 2018-10-08 21:07:16.810917466 +0300
@@ -68,14 +68,6 @@
*/
switch (pid = fork()) {
case 0: /* child */
- /* change real/effective user ID to 0/0 as we need to
- * preinstall agpgart module for some DRM modules
- */
- if (setreuid(0, 0)) {
- xf86Msg(X_WARNING, "LoadKernelModule: "
- "Setting of real/effective user Id to 0/0 failed");
- }
- setenv("PATH", "/sbin", 1);
execl(mpPath, "modprobe", modName, NULL);
xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno));
exit(EXIT_FAILURE); /* if we get here the child's exec failed */

View File

@ -1,22 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/parser/scan.c xorg-server-1.20.1.mod/hw/xfree86/parser/scan.c
--- xorg-server-1.20.1/hw/xfree86/parser/scan.c 2018-08-07 19:31:03.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/parser/scan.c 2018-10-08 21:07:16.814252348 +0300
@@ -873,13 +873,13 @@
*/
#ifndef DEFAULT_CONF_PATH
-#define DEFAULT_CONF_PATH "/etc/X11/%S," \
+#define DEFAULT_CONF_PATH "@TERMUX_PREFIX@/etc/X11/%S," \
"%P/etc/X11/%S," \
- "/etc/X11/%G," \
+ "@TERMUX_PREFIX@/etc/X11/%G," \
"%P/etc/X11/%G," \
- "/etc/X11/%X-%M," \
- "/etc/X11/%X," \
- "/etc/%X," \
+ "@TERMUX_PREFIX@/etc/X11/%X-%M," \
+ "@TERMUX_PREFIX@/etc/X11/%X," \
+ "@TERMUX_PREFIX@/etc/%X," \
"%P/etc/X11/%X.%H," \
"%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \

View File

@ -1,69 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/parser/write.c xorg-server-1.20.1.mod/hw/xfree86/parser/write.c
--- xorg-server-1.20.1/hw/xfree86/parser/write.c 2018-08-07 19:31:03.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/parser/write.c 2018-10-08 21:07:16.817587230 +0300
@@ -129,64 +129,5 @@
int
xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr)
{
-#ifndef HAS_NO_UIDS
- int ret;
-
- if (getuid() != geteuid()) {
-
-#if !defined(HAS_SAVED_IDS_AND_SETEUID)
- int pid, p;
- int status;
- void (*csig) (int);
-
- /* Need to fork to change ruid without loosing euid */
- csig = OsSignal(SIGCHLD, SIG_DFL);
- switch ((pid = fork())) {
- case -1:
- ErrorF("xf86writeConfigFile(): fork failed (%s)\n",
- strerror(errno));
- return 0;
- case 0: /* child */
- if (setuid(getuid()) == -1)
- FatalError("xf86writeConfigFile(): "
- "setuid failed(%s)\n", strerror(errno));
- ret = doWriteConfigFile(filename, cptr);
- exit(ret);
- break;
- default: /* parent */
- do {
- p = waitpid(pid, &status, 0);
- } while (p == -1 && errno == EINTR);
- }
- OsSignal(SIGCHLD, csig);
- if (p != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0)
- return 1; /* success */
- else
- return 0;
-
-#else /* HAS_SAVED_IDS_AND_SETEUID */
- int ruid, euid;
-
- ruid = getuid();
- euid = geteuid();
-
- if (seteuid(ruid) == -1) {
- ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n",
- ruid, strerror(errno));
- return 0;
- }
- ret = doWriteConfigFile(filename, cptr);
-
- if (seteuid(euid) == -1) {
- ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n",
- euid, strerror(errno));
- }
- return ret;
-
-#endif /* HAS_SAVED_IDS_AND_SETEUID */
-
- }
- else
-#endif /* !HAS_NO_UIDS */
- return doWriteConfigFile(filename, cptr);
+ return doWriteConfigFile(filename, cptr);
}

View File

@ -1,27 +0,0 @@
diff -uNr xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c
--- xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c 2018-08-07 19:31:04.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c 2018-10-08 21:07:16.817587230 +0300
@@ -251,23 +251,6 @@
}
#endif
- /* If we've found cards, and all cards support kms, drop root rights */
- if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
- gid_t realgid = getgid();
- uid_t realuid = getuid();
-
- if (setresgid(-1, realgid, realgid) != 0) {
- fprintf(stderr, "%s: Could not drop setgid privileges: %s\n",
- progname, strerror(errno));
- exit(1);
- }
- if (setresuid(-1, realuid, realuid) != 0) {
- fprintf(stderr, "%s: Could not drop setuid privileges: %s\n",
- progname, strerror(errno));
- exit(1);
- }
- }
-
snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR);
/* Check if the server is executable by our real uid */