Page MenuHomeFreeBSD

xorg: upgrade to 21.1.3

Authored by bapt on Jun 29 2022, 3:42 PM.
Referenced Files
Unknown Object (File)
Mon, Apr 15, 2:58 PM
Unknown Object (File)
Tue, Apr 9, 3:42 PM
Unknown Object (File)
Tue, Apr 9, 3:23 PM
Unknown Object (File)
Tue, Apr 9, 3:09 PM
Unknown Object (File)
Tue, Apr 9, 2:56 PM
Unknown Object (File)
Tue, Apr 9, 2:10 PM
Unknown Object (File)
Mon, Apr 8, 9:20 PM
Unknown Object (File)
Mon, Apr 8, 9:20 PM



Port changes:

  • flavorize the port
  • decouple Xwayland as it has been split from Xorg
  • switch to meson
  • cleanup non necessary patches anymore
  • stop butchering the build system to play with Xorg.wrap but do it in post install
  • Remove mesa-dri dependency where not needed
  • remove dmx

Diff Detail

rP FreeBSD ports repository
No Lint Coverage
No Test Coverage
Build Status
Buildable 46704
Build 43593: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

really ensure secure RPC everywhere

Add missing xcb-renderutil for Xephyr

Add more missing xcb dependencies for Xephyr

Incorporate fixes for ATI

Everything builds correctly now for me, the patches looks ok as said privately, I'll try to test asap.

xinit now cannot launch the server:

X: Missing execute permissions for /usr/local/libexec/Xorg: No such file or directory

This file seems required for xinit to function, and a quick glance at Arch Linux's package reveals its presence there.


check-sanity balks at the capitalised flavours, had to lowercase them when testporting or bulk -t


This is not needed, meson does this part correctly. The only file that needs suid set is libexec/Xorg


Need to add a -Dlog_dir=/var/log else the default system log location is /var/local/log


This can probably get dispensed of as well. libglvnd already handles moderating between the different implementations in principle, and nvidia-driver doesn't install to the same target. In any case, glx actually fails to load during startup because it is not in the correct extensions directory:

[265216.865] (II) LoadModule: "glx"
[265216.866] (WW) Warning, couldn't open module glx
[265216.866] (EE) Failed to load module "glx" (module does not exist, 0)

multimedia/obs-studio fails to launch probably due to this.

tcberner added inline comments.

^ below you have xephyr not Xephyr (line 87)


ping, because we don't have /var/local/log


suid-ing Xorg.wrap doesn't do anything since it's a shell script, libexec/Xorg the binary needs the suid

bapt marked 6 inline comments as done.

Xorg running as user (the wrapper now does its job)

bapt marked an inline comment as done.

Readd the glx danse necessary to play nicely with nvidia


wrong 1 it is not a shell, 2 it works with my latest update

forgot to git mv pkg-descr

Seems to work smoothly for me.

Macro stlgtm:

This revision is now accepted and ready to land.Jul 29 2022, 2:17 PM
  • Remove mesa-dri dependency where not needed

Maybe add a note in UPDATING due to POLA violation when using xorg-minimal. For example, modesetting requires mesa-dri for glamor acceleration (in Xorg) and for OpenGL/Vulkan acceleration (in applications).

Fails to build on aarch64 (Tier1 on FreeBSD >= 13.0):

$ poudriere jail -cj 130aarch64 -x -a arm64.aarch64 -v 13.0-RELEASE
$ poudriere testport -j 130aarch64 x11-servers/xorg-server
ld: error: undefined symbol: xf86EnableIO
>>> referenced by xf86Configure.c
>>>               libxorg_common.a.p/xf86Configure.c.o:(DoConfigure) in archive hw/xfree86/common/libxorg_common.a
>>> referenced by xf86Events.c
>>>               libxorg_common.a.p/xf86Events.c.o:(xf86VTEnter) in archive hw/xfree86/common/libxorg_common.a
>>> referenced by xf86Init.c
>>>               libxorg_common.a.p/xf86Init.c.o:(InitOutput) in archive hw/xfree86/common/libxorg_common.a
>>> referenced 1 more times

ld: error: undefined symbol: xf86DisableIO
>>> referenced by xf86Events.c
>>>               libxorg_common.a.p/xf86Events.c.o:(xf86VTLeave) in archive hw/xfree86/common/libxorg_common.a

ld: error: undefined symbol: xf86OSInitVidMem
>>> referenced by vidmem.c
>>>               libxorg_os_support.a.p/shared_vidmem.c.o:(xf86InitVidMem) in archive hw/xfree86/os-support/libxorg_os_support.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)

21.1.3 (unlike 21.1.4) is vulnerable to CVE-2022-2319 + CVE-2022-2320


Maybe also drop USES+=ssl with .if ${SSL_DEFAULT} == base block.

$ poudriere testport -j 130amd64 x11-servers/xorg-server
====> Running Q/A tests (stage-qa)
Warning: you may not need USES=ssl

To restore this file remove @comment in x11/libxcvt/pkg-plist (and bump PORTREVISION).


To restore this file remove @comment in x11/libxcvt/pkg-plist (and bump PORTREVISION).


Did you forget to restore the comment after D35661#816592 ("Readd the glx danse necessary to play nicely with nvidia")?

bapt marked 5 inline comments as done.

update to 21.1.4
Address @jbeich comments

This revision now requires review to proceed.Aug 1 2022, 6:17 PM
This revision is now accepted and ready to land.Aug 1 2022, 7:01 PM