mock
mock copied to clipboard
RFE: Support for connection to local display
Short description of the problem
It would be nice to have some kind of --local-display option that would:
# --plugin-option=bind_mount:dirs=[("/tmp/.X11-unix", "/tmp/.X11-unix")]
# set DISPLAY=:0
# add the needed xauth entries
helpful for testing X programs. I hear that X11 is going away, but perhaps wayland could be supported as well in some way.
AFAICT, mounting the directory is not necessary. However, it only seems to work (with mounting the directory or not) either with --old-chroot or with --enable-network.
For authentication, it appears to work to extract the cookie with xauth extract /tmp/x "$DISPLAY" and then --copyin /tmp/x /builddir/.Xauthority (or piping that to xauth merge if that has been installed in the chroot) . This is probably much preferable to the current advice to just disable authentication altogether.
Either way, having a simple option (and ideally exposing it via fedpkg as well) would make this so much easier (and safer).
yes we need --old-chroot or with --enable-network to "test graphical apps inside mock" or it doesn't work
BTW https://fedoraproject.org/wiki/Docs/Drafts/MockSetupUsingLocalMirror and https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds#Proxy_Configurations this documentation is also not available anywhere else