summaryrefslogtreecommitdiff
path: root/x11-base
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-14 11:13:04 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-14 11:13:04 +0000
commit81ede220c13a4cced5b93a951604cde4e22bf0db (patch)
treeede7bf330e671b684ea63fd76f0bc4cfff8ec1fc /x11-base
parent6f88a77f4451f23b64c7aaa589201d82c20eef49 (diff)
x11-base/xorg-server : version bump
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xorg-server/Manifest2
-rw-r--r--x11-base/xorg-server/files/xorg-server-21.1.4-BadIDChoice.patch59
-rw-r--r--x11-base/xorg-server/xorg-server-21.1.5-r10.ebuild (renamed from x11-base/xorg-server/xorg-server-21.1.4-r100.ebuild)13
3 files changed, 70 insertions, 4 deletions
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index 253c3b83..46ced3ca 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1 +1 @@
-DIST xorg-server-21.1.4.tar.xz 4940176 BLAKE2B 8f68c7de102f7f8d0f56566a518025bb32c079184d5a5556dc8e651111b6a018669102b18ec2e9470d3ab91f51291618f9c49281915d885fc30446e1b54d2134 SHA512 eb5b8520d02908f72719e6ecfbf7a9bf139acb65ccae04d1db4223a8a2384cd3a94bd5afef10cce327b751b800cc2b79bfaa5ae35c95c3a217f775168082e68f
+DIST xorg-server-21.1.5.tar.xz 4929120 BLAKE2B 40f31250101293fa048c3c32278caaf0350fcf0b153a295d7574a6698893fa3c2d14078714a3c6ee7755b66c1f0ccf80b8faacb27aa5d7c279bc09fa6285ffd5 SHA512 a39c6ba36f94241d330b679a9a6fe2c5fda73fc3f5a9308a7a9cfd0d58503e407291759c9e553455c07cf5a3862952ae3904334eeca29c97ff5af7cffd2e6953
diff --git a/x11-base/xorg-server/files/xorg-server-21.1.4-BadIDChoice.patch b/x11-base/xorg-server/files/xorg-server-21.1.4-BadIDChoice.patch
new file mode 100644
index 00000000..def3c587
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.4-BadIDChoice.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/857483
+https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310
+https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/953
+
+From f61307631203ab0266c035db07c2f776cf7c6cf4 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Tue, 12 Jul 2022 14:44:48 +0200
+Subject: [PATCH] dix: Fix overzealous caching of ResourceClientBits()
+
+Commit c7311654 cached the value of ResourceClientBits(), but that value
+depends on the `MaxClients` value set either from the command line or
+from the configuration file.
+
+For the latter, a call to ResourceClientBits() is issued before the
+configuration file is read, meaning that the cached value is from the
+default, not from the maximum number of clients set in the configuration
+file.
+
+That obviously causes all sort of issues, including memory corruption
+and crashes of the Xserver when reaching the default limit value.
+
+To avoid that issue, also keep the LimitClient value, and recompute the
+ilog2() value if that changes, as on startup when the value is set from
+the the xorg.conf ServerFlags section.
+
+v2: Drop the `cache == 0` test
+ Rename cache vars
+
+Fixes: c7311654 - dix: cache ResourceClientBits() value
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+(cherry picked from commit 2efa6d659508346358a1ef27b2393e18843f66a3)
+--- a/dix/resource.c
++++ b/dix/resource.c
+@@ -620,12 +620,15 @@ ilog2(int val)
+ unsigned int
+ ResourceClientBits(void)
+ {
+- static unsigned int cached = 0;
++ static unsigned int cache_ilog2 = 0;
++ static unsigned int cache_limit = 0;
+
+- if (cached == 0)
+- cached = ilog2(LimitClients);
++ if (LimitClients != cache_limit) {
++ cache_limit = LimitClients;
++ cache_ilog2 = ilog2(LimitClients);
++ }
+
+- return cached;
++ return cache_ilog2;
+ }
+
+ /*****************
+--
+GitLab
+
+
diff --git a/x11-base/xorg-server/xorg-server-21.1.4-r100.ebuild b/x11-base/xorg-server/xorg-server-21.1.5-r10.ebuild
index bc871a95..9fb2c090 100644
--- a/x11-base/xorg-server/xorg-server-21.1.4-r100.ebuild
+++ b/x11-base/xorg-server/xorg-server-21.1.5-r10.ebuild
@@ -5,7 +5,7 @@ EAPI=8
XORG_TARBALL_SUFFIX="xz"
XORG_EAUTORECONF="no"
-inherit xorg-3 meson
+inherit flag-o-matic xorg-3 meson
EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
DESCRIPTION="X.Org X servers"
@@ -44,7 +44,7 @@ CDEPEND="
>=x11-libs/libX11-1.1.5
)
xephyr? (
- x11-libs/libxcb[xkb]
+ x11-libs/libxcb
x11-libs/xcb-util
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
@@ -95,6 +95,11 @@ REQUIRED_USE="!minimal? (
elogind? ( udev )
?? ( elogind systemd )"
+UPSTREAMED_PATCHES=(
+ # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/953
+ "${FILESDIR}"/${PN}-21.1.4-BadIDChoice.patch
+)
+
PATCHES=(
"${UPSTREAMED_PATCHES[@]}"
"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
@@ -103,10 +108,12 @@ PATCHES=(
)
src_configure() {
+ # bug #835653
+ use x86 && replace-flags -Os -O2
+
# localstatedir is used for the log location; we need to override the default
# from ebuild.sh
# sysconfdir is used for the xorg.conf location; same applies
-
local emesonargs=(
--localstatedir "${EPREFIX}/var"
--sysconfdir "${EPREFIX}/etc/X11"