Message ID | 20250519191130.3532263-2-rs@ti.com |
---|---|
State | New |
Headers | show |
Series | Display manager proposal for x11 and wayland | expand |
On Mon May 19, 2025 at 9:11 PM CEST, rs wrote: > From: Randolph Sapp <rs@ti.com> > > Register a tmpfile.d or volatile directory entry for the x11 domain > socket so this will always be created with the correct permissions. > > Currently some x11 related applications will create this directory if it > doesn't already exist, but this is not true for everything. In addition, > if the application in question isn't started as root, it's possible this > directory can be owned by a non-root user. This isn't an issue by > itself, but it can potentially lead to problems in a multi-user > environment. > > Signed-off-by: Randolph Sapp <rs@ti.com> > --- Hi Randolph, Thanks for the new version. It looks like we have a conflict on installed files here: ERROR: dbus-1.16.2-r0 do_prepare_recipe_sysroot: The file /usr/lib/tmpfiles.d/x11.conf is installed by both libx11 and systemd, aborting Happened on a lot of builds, such as: https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/1638 https://autobuilder.yoctoproject.org/valkyrie/#/builders/10/builds/1657 https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/1626 ...
diff --git a/meta/recipes-graphics/xorg-lib/libx11/99_x11 b/meta/recipes-graphics/xorg-lib/libx11/99_x11 new file mode 100644 index 0000000000..53c5b49d10 --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libx11/99_x11 @@ -0,0 +1 @@ +d root root 1777 /tmp/.X11-unix none diff --git a/meta/recipes-graphics/xorg-lib/libx11/x11.conf b/meta/recipes-graphics/xorg-lib/libx11/x11.conf new file mode 100644 index 0000000000..48e2d56c8b --- /dev/null +++ b/meta/recipes-graphics/xorg-lib/libx11/x11.conf @@ -0,0 +1 @@ +D! /tmp/.X11-unix 1777 root root 10d diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.8.12.bb b/meta/recipes-graphics/xorg-lib/libx11_1.8.12.bb index 5ce5481743..35ac39edfb 100644 --- a/meta/recipes-graphics/xorg-lib/libx11_1.8.12.bb +++ b/meta/recipes-graphics/xorg-lib/libx11_1.8.12.bb @@ -22,7 +22,9 @@ PE = "1" XORG_PN = "libX11" -SRC_URI += "file://disable_tests.patch" +SRC_URI += "file://disable_tests.patch \ + file://x11.conf \ + file://99_x11" SRC_URI[sha256sum] = "fa026f9bb0124f4d6c808f9aef4057aad65e7b35d8ff43951cef0abe06bb9a9a" @@ -36,7 +38,19 @@ PACKAGECONFIG[xcms] = "--enable-xcms,--disable-xcms" PACKAGES =+ "${PN}-xcb" -FILES:${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt" +do_install:append() { + # temporary directory required for x11 domain sockets + if ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'true', 'false', d)}; then + install -d ${D}${libdir}/tmpfiles.d + install -m 0644 ${UNPACKDIR}/x11.conf ${D}${libdir}/tmpfiles.d/x11.conf + else + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/99_x11 ${D}${sysconfdir}/default/volatiles/99_x11 + fi +} + +FILES:${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt \ + ${libdir}/tmpfiles.d/x11.conf ${sysconfdir}/default/volatiles/99_x11" FILES:${PN}-xcb += "${libdir}/libX11-xcb.so.*" FILES:${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"