diff options
author | Ermine <mustela@erminea.space> | 2024-08-28 15:20:47 +0000 |
---|---|---|
committer | Ermine <mustela@erminea.space> | 2024-09-01 12:53:53 +0000 |
commit | 37670d014ecff9b1cb193b60b62b331bee27180d (patch) | |
tree | f657b97dc697824a659d850386afc9abea13183a | |
parent | c2f70c8cb192f9ca6d524be494b27f7c2b8389c8 (diff) | |
download | packages-37670d014ecff9b1cb193b60b62b331bee27180d.tar.gz packages-37670d014ecff9b1cb193b60b62b331bee27180d.tar.bz2 packages-37670d014ecff9b1cb193b60b62b331bee27180d.tar.xz packages-37670d014ecff9b1cb193b60b62b331bee27180d.zip |
user/xorg-server: upgrade to 21.1.13
Also use meson instead of autotools and do not build XWayland, since it
is now provided by a separate tarball. protocol.txt file is separated
into a subpackage so it can be used by XWayland without pulling in the
rest of Xorg.
-rw-r--r-- | user/xorg-server/APKBUILD | 128 | ||||
-rw-r--r-- | user/xorg-server/fix-musl-arm.patch | 15 | ||||
-rw-r--r-- | user/xorg-server/gcc12.patch | 89 | ||||
-rw-r--r-- | user/xorg-server/rgb-mask.patch | 70 |
4 files changed, 85 insertions, 217 deletions
diff --git a/user/xorg-server/APKBUILD b/user/xorg-server/APKBUILD index 17909c830..7b1ddcafa 100644 --- a/user/xorg-server/APKBUILD +++ b/user/xorg-server/APKBUILD @@ -1,36 +1,66 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=xorg-server -pkgver=1.20.9 -pkgrel=1 +pkgver=21.1.13 +pkgrel=0 pkgdesc="X.Org X11 server" url="https://www.X.Org/" arch="all" options="suid" license="MIT" -depends="font-cursor-misc font-misc-misc xkeyboard-config xkbcomp xinit" +depends="font-cursor-misc font-misc-misc xkeyboard-config xkbcomp xinit + xorg-server-protocol + " depends_dev="libepoxy-dev libxfont2-dev mesa-dev" -makedepends="$depends_dev autoconf automake libtool util-macros - eudev-dev libpciaccess-dev libdrm-dev libepoxy-dev pixman-dev - libx11-dev libxdamage-dev libxinerama-dev libxkbfile-dev libxkbui-dev - libxv-dev libxxf86dga-dev libxxf86misc-dev xcb-util-dev - xcb-util-image-dev xcb-util-keysyms-dev xcb-util-renderutil-dev - xcb-util-wm-dev xorgproto-dev - xtrans - openssl-dev perl wayland-dev wayland-protocols zlib-dev +makedepends="$depends_dev meson eudev-dev libpciaccess-dev libdrm-dev + libepoxy-dev pixman-dev libx11-dev libxdamage-dev libxinerama-dev + libxkbfile-dev libxkbui-dev libxv-dev libxxf86dga-dev libxxf86misc-dev + libxcvt-dev xkbcomp-dev xcb-util-dev xcb-util-image-dev + xcb-util-keysyms-dev xcb-util-renderutil-dev xcb-util-wm-dev xorgproto-dev + xtrans openssl-dev perl zlib-dev " # the modesetting driver is now shipped with xorg server replaces="xf86-video-modesetting" subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc xvfb $pkgname-xephyr - $pkgname-xnest $pkgname-xwayland" -source="https://www.X.Org/releases/individual/xserver/$pkgname-$pkgver.tar.bz2 + $pkgname-xnest $pkgname-protocol" +source="https://www.X.Org/releases/individual/xserver/$pkgname-$pkgver.tar.xz autoconfig-sis.patch fix-musl-arm.patch - rgb-mask.patch - gcc12.patch " # secfixes: +# 21.1.12-r0: +# - CVE-2024-31080 +# - CVE-2024-31081 +# - CVE-2024-31082 +# - CVE-2024-31083 +# - CVE-2023-6816 +# - CVE-2024-0229 +# - CVE-2024-21885 +# - CVE-2024-21886 +# - CVE-2024-0408 +# - CVE-2024-0409 +# - CVE-2023-6377 +# - CVE-2023-6478 +# - CVE-2023-5367 +# - CVE-2023-5380 +# - CVE-2023-5574 +# - CVE-2023-0494 +# - CVE-2022-4283 +# - CVE-2022-46340 +# - CVE-2022-46341 +# - CVE-2022-46342 +# - CVE-2022-46343 +# - CVE-2022-46344 +# - CVE-2022-2319 +# - CVE-2022-2320 +# - CVE-2021-4008 +# - CVE-2021-4009 +# - CVE-2021-4010 +# - CVE-2021-4011 +# - CVE-2021-3472 +# - CVE-2020-14360 +# - CVE-2020-25712 # 1.20.9-r0: # - CVE-2020-14345 # - CVE-2020-14346 @@ -67,45 +97,41 @@ build() { export CFLAGS="$CFLAGS -D_GNU_SOURCE" [ "$CLIBC" = musl ] && export CFLAGS="$CFLAGS -D__gid_t=gid_t -D__uid_t=uid_t" export LDFLAGS="$LDFLAGS -Wl,-z,lazy" + _fontroot="/usr/share/fonts" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ + meson setup \ --prefix=/usr \ --sysconfdir=/etc/X11 \ --localstatedir=/var \ - --with-xkb-path=/usr/share/X11/xkb \ - --with-xkb-output=/var/lib/xkb \ - --without-systemd-daemon \ - --enable-composite \ - --enable-config-udev \ - --enable-dri \ - --enable-dri2 \ - --enable-glamor \ - --enable-ipv6 \ - --enable-kdrive \ - --enable-xace \ - --enable-xcsecurity \ - --enable-xephyr \ - --enable-xnest \ - --enable-xorg \ - --enable-xres \ - --enable-xv \ - --enable-xwayland \ - --disable-config-hal \ - --disable-dmx \ - --disable-systemd-logind \ - --with-os-vendor="${DISTRO_NAME:-Adélie Linux}" + -Dxkb_dir=/usr/share/X11/xkb \ + -Dxkb_output_dir=/var/lib/xkb \ + -Dsystemd_logind=false \ + -Ddri1=true \ + -Ddri2=true \ + -Ddri3=true \ + -Dglamor=true \ + -Dipv6=true \ + -Dxace=true \ + -Dxcsecurity=true \ + -Dxephyr=true \ + -Dxnest=true \ + -Dxorg=true \ + -Dxres=true \ + -Dhal=false \ + -Dsecure-rpc=false \ + -Dpciaccess=true \ + -Ddefault_font_path=$_fontroot/misc,$_fontroot/100dpi:unscaled,$_fontroot/75dpi:unscaled,$_fontroot/TTF,$_fontroot/Type1 \ + build - make + meson compile -C build } check() { - make check + meson test --no-rebuild --print-errorlogs -C build } package() { - make -j1 DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" meson install --no-rebuild -C build chmod u+s "$pkgdir"/usr/bin/Xorg # Don't conflict with xf86-input-evdev @@ -136,14 +162,14 @@ xnest() { mv "$pkgdir"/usr/bin/Xnest "$subpkgdir"/usr/bin/ } -xwayland() { - pkgdesc="X.Org server for Wayland" - mkdir -p "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/Xwayland "$subpkgdir"/usr/bin/ +protocol() { + pkgdesc="Xorg server protocol file" + depends="" + + mkdir -p "$subpkgdir"/usr/lib/xorg + mv "$pkgdir"/usr/lib/xorg/protocol.txt "$subpkgdir"/usr/lib/xorg/ } -sha512sums="d9b5f93e1b9763a89187d8b272aa7d4ce9709641b8539f4536708af153310e5a4931bffd4229c51a3b0e3b12da7838750aa71b635751fb4c0bb27438cce4e5e6 xorg-server-1.20.9.tar.bz2 +sha512sums="a55fbeeed227c12c67f166f2c06a7f4f8d78feeea04c6e73509dbc723185fd0772349aa23f7c44cf0828ac0a0e2f9e4b26cffb220e6dfa7186d60f88b25ccaf1 xorg-server-21.1.13.tar.xz d77151bc51766e1230a121c008ac1d0695275bf889b1db4b3330c1f8ee720b0e046cc935fa14aaef40b02fdea508e84e53959b560131ace14ace14943c8eb734 autoconfig-sis.patch -a5f910e72ff9abd4e4a0c6806cdbe48d1b0b6cc0586f36568da5864a8dedc46a3112fe86d7a1969033f4d5b0def4dc6e5c11b656fbcc964732b417e6c9577f22 fix-musl-arm.patch -e38d7323a9046f405f1b568e592f90bb9ed7dd4954480d251431f1e550ea4898d9e6c4bc4bd425ece877464392ed54c92ba582b6f27677fc139a2901209de48a rgb-mask.patch -1abdf004c16ece7e0d1313cbbcbcfdb706d52917ff974b74a4de180fbc0e9d09e6fcc1a3f2b2875885e12d240512679ef0456b8e43bf69ebc1d307be5cd5deaf gcc12.patch" +c68d6299928032806ade94b4848f147757d6571a2f8830922a20c9e1053fe42700e5c9e196ad58ce5e5536cf034260f973edd6e2792c9bacf4e2d70660949a4a fix-musl-arm.patch" diff --git a/user/xorg-server/fix-musl-arm.patch b/user/xorg-server/fix-musl-arm.patch index b5a64a4e7..7d6cc3762 100644 --- a/user/xorg-server/fix-musl-arm.patch +++ b/user/xorg-server/fix-musl-arm.patch @@ -1,11 +1,12 @@ ---- ./hw/xfree86/common/compiler.h.orig -+++ ./hw/xfree86/common/compiler.h -@@ -518,7 +518,7 @@ +diff -Nurp xorg-server-21.1.3.orig/hw/xfree86/common/compiler.h xorg-server-21.1.3/hw/xfree86/common/compiler.h +--- xorg-server-21.1.3.orig/hw/xfree86/common/compiler.h 2022-01-02 22:41:56.000000000 +0000 ++++ xorg-server-21.1.3/hw/xfree86/common/compiler.h 2024-08-28 09:24:45.059582654 +0000 +@@ -518,7 +518,7 @@ xf86WriteMmio32Le(__volatile__ void *bas barrier(); } --#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) -+#elif defined(__mips__) || (defined(__arm32__) && !defined(__GLIBC__)) - #if defined(__arm32__) || defined(__mips64) +-#elif defined(__arm32__) && !defined(__linux__) ++#elif defined(__arm32__) && !defined(__GLIBC__) #define PORT_SIZE long - #else + + extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ diff --git a/user/xorg-server/gcc12.patch b/user/xorg-server/gcc12.patch deleted file mode 100644 index 5aa2f08c6..000000000 --- a/user/xorg-server/gcc12.patch +++ /dev/null @@ -1,89 +0,0 @@ -From c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan <ofourdan@redhat.com> -Date: Thu, 20 Jan 2022 10:20:38 +0100 -Subject: [PATCH] render: Fix build with gcc 12 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The xserver fails to compile with the latest gcc 12: - - render/picture.c: In function ‘CreateSolidPicture’: - render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] - 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill; - | ^~ - render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’ - 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - render/picture.c: In function ‘CreateLinearGradientPicture’: - render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] - 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear; - | ^~ - render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’ - 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - render/picture.c: In function ‘CreateConicalGradientPicture’: - render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] - 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical; - | ^~ - render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’ - 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - cc1: some warnings being treated as errors - ninja: build stopped: subcommand failed. - -This is because gcc 12 has become stricter and raises a warning now. - -Fix the warning/error by allocating enough memory to store the union -struct. - -Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> -Acked-by: Michel Dänzer <mdaenzer@redhat.com> -Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256 ---- - render/picture.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/render/picture.c b/render/picture.c -index afa0d258fa..2be4b1954f 100644 ---- a/render/picture.c -+++ b/render/picture.c -@@ -865,7 +865,7 @@ CreateSolidPicture(Picture pid, xRenderColor * color, int *error) - } - - pPicture->id = pid; -- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); -+ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); - if (!pPicture->pSourcePict) { - *error = BadAlloc; - free(pPicture); -@@ -896,7 +896,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, - } - - pPicture->id = pid; -- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); -+ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); - if (!pPicture->pSourcePict) { - *error = BadAlloc; - free(pPicture); -@@ -936,7 +936,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, - } - - pPicture->id = pid; -- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient)); -+ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); - if (!pPicture->pSourcePict) { - *error = BadAlloc; - free(pPicture); -@@ -979,7 +979,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, - } - - pPicture->id = pid; -- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); -+ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); - if (!pPicture->pSourcePict) { - *error = BadAlloc; - free(pPicture); --- -GitLab - diff --git a/user/xorg-server/rgb-mask.patch b/user/xorg-server/rgb-mask.patch deleted file mode 100644 index a503a6e16..000000000 --- a/user/xorg-server/rgb-mask.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 7e142cb2a848acb6af986fa91d254d4c23963b24 Mon Sep 17 00:00:00 2001 -From: luporl <luporl@FreeBSD.org> -Date: Wed, 9 Dec 2020 11:11:15 -0300 -Subject: [PATCH] xserver: fix RGB mask handling - -On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was -crashing in some cases. For instance, when twm was started -and the background was clicked to open its menu, X crashed -with a segmentation fault, trying to dereference a null pointer -at CreatePicture(). - -There were 2 issues with xorg-server handling of RGB masks that -caused the pointer above to be null and thus the crash: -- wrong use of ffs() to get the RGB offsets from the masks -- overflow when shifting a 16-bit integer - -This change fixes both issues. They happen when the system is BE -but has a video adapter using a little-endian (LE) ARGB32 -framebuffer. In order to display the correct colors, this setup -requires a BE RGBA32 color format to be used by X, by setting -the RGB masks appropriately, that didn't work properly because of -the issues above. ---- - hw/xfree86/common/xf86Helper.c | 6 +++--- - render/picture.c | 12 ++++++------ - 2 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c -index 31aa068e0e..16ab309e27 100644 ---- a/hw/xfree86/common/xf86Helper.c -+++ b/hw/xfree86/common/xf86Helper.c -@@ -729,9 +729,9 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) - scrp->mask.red = mask.red; - scrp->mask.green = mask.green; - scrp->mask.blue = mask.blue; -- scrp->offset.red = ffs(mask.red); -- scrp->offset.green = ffs(mask.green); -- scrp->offset.blue = ffs(mask.blue); -+ scrp->offset.red = ffs(mask.red) - 1; -+ scrp->offset.green = ffs(mask.green) - 1; -+ scrp->offset.blue = ffs(mask.blue) - 1; - } - return TRUE; - } -diff --git a/render/picture.c b/render/picture.c -index 876316dc1c..afa0d258fa 100644 ---- a/render/picture.c -+++ b/render/picture.c -@@ -523,12 +523,12 @@ PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual) - return format; - } - else { -- if (format->direct.redMask << format->direct.red == -- pVisual->redMask && -- format->direct.greenMask << format->direct.green == -- pVisual->greenMask && -- format->direct.blueMask << format->direct.blue == -- pVisual->blueMask) { -+ if ((unsigned long)format->direct.redMask << -+ format->direct.red == pVisual->redMask && -+ (unsigned long)format->direct.greenMask << -+ format->direct.green == pVisual->greenMask && -+ (unsigned long)format->direct.blueMask << -+ format->direct.blue == pVisual->blueMask) { - return format; - } - } --- -GitLab - |