• [gentoo-dev] [PATCH 5/6] virtualx.eclass: Let Xvfb figure out the free

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Wed Jul 27 09:20:01 2022
    Replace the antiquated search mechanism for a free DISPLAY with Xvfb's -displayfd option that makes Xvfb choose one itself and print it to
    given fd.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/virtualx.eclass | 62 ++++++++++++++----------------------------
    1 file changed, 20 insertions(+), 42 deletions(-)

    diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
    index d1c05e20b246..c0af095e89a5 100644
    --- a/eclass/virtualx.eclass
    +++ b/eclass/virtualx.eclass
    @@ -108,65 +108,43 @@ virtx() {
    local i=0
    local retval=0
    local OLD_SANDBOX_ON="${SANDBOX_ON}"
    - local XDISPLAY
    local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR )

    debug-print "${FUNCNAME}: running Xvfb hack"
    export XAUTHORITY=
    - # The following is derived from Mandrake's hack to allow
    - # compiling without the X display
    -
    - einfo "Scanning for an open DISPLAY to start Xvfb ..."
    - # If we are in a chrooted environment, and there is already a
    - # X server started outside of the chroot, Xvfb will fail to start
    - # on the same display (most cases this is :0 ), so make sure
    - # Xvfb is started, else bump the display number
    - #
    - # Azarah - 5 May 2002
    - # GNOME GDM may have started X on
  • From Sam James@21:1/5 to All on Wed Jul 27 09:30:01 2022
    On 27 Jul 2022, at 08:17, Michał Górny <mgorny@gentoo.org> wrote:

    Replace the antiquated search mechanism for a free DISPLAY with Xvfb's -displayfd option that makes Xvfb choose one itself and print it to
    given fd.


    Tag https://bugs.gentoo.org/494244 given it's likely to fix it.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/virtualx.eclass | 62 ++++++++++++++----------------------------
    1 file changed, 20 insertions(+), 42 deletions(-)


    -----BEGIN PGP SIGNATURE-----

    iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCYuDnSF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kDRvAP9/4oAuYeaiUNKCINZNcXO2sml2KfjdDQwwZE3PZyUfpwEAtSiasMA7S9vC 2yAy4ad5nEJ0tNW6qEkba2A9MhNwAQg=
    =89DV
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)