unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: 51900@debbugs.gnu.org
Subject: bug#51900: [core-updates-frozen] xorg-server-xwayland broken
Date: Wed, 17 Nov 2021 14:36:15 +0000	[thread overview]
Message-ID: <87ilwqvnvw.fsf@kitej> (raw)
In-Reply-To: <87sfvvdatg.fsf@kitej>


[-- Attachment #1.1: Type: text/plain, Size: 822 bytes --]

According to [1], since 21.1 series of Xorg, XWayland is packaged
separately. The attached patch replaces xorg-xserver-xwayland by the
xwayland package.

However it looks like it's not working so far, the tests fail with:
--8<---------------cut here---------------start------------->8---
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE)
--8<---------------cut here---------------end--------------->8---

I tried adding the same keyboard-related parameters as the ones in
xorg-server (xbk_dir and xkb_bin_dir), but it doesn't seem to
make a difference.

Does someone have an idea?


[1] https://lists.x.org/archives/xorg/2021-October/060799.html

[-- Attachment #1.2: 0001-WIP-gnu-Replace-xorg-server-xwayland-by-xwayland.patch --]
[-- Type: text/x-patch, Size: 8230 bytes --]

From 457921b36c49c68e58ac067ede50637ce71a200c Mon Sep 17 00:00:00 2001
From: Guillaume Le Vaillant <glv@posteo.net>
Date: Wed, 17 Nov 2021 15:20:34 +0100
Subject: [PATCH] WIP: gnu: Replace xorg-server-xwayland by xwayland.

* gnu/packages/xorg.scm (xorg-server-xwayland): Remove varable.
  (xwayland): New variable.
* gnu/packages/enlightenment.scm (enlightenment)[inputs]: Replace
  xorg-server-xwayland by xwayland.
* gnu/packages/freedesktop.scm (weston)[inputs, arguments]: Idem.
* gnu/packages/gnome.scm (mutter)[inputs, arguments]: Idem.
* gnu/packages/wm.scm (wlroots)[inputs, arguments]: Idem.
---
 gnu/packages/enlightenment.scm |  2 +-
 gnu/packages/freedesktop.scm   |  4 +--
 gnu/packages/gnome.scm         |  4 +--
 gnu/packages/wm.scm            |  5 ++-
 gnu/packages/xorg.scm          | 63 +++++++++++++++++++++++++++-------
 5 files changed, 57 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 8c7da4a5b4..9b3fcfabaa 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -369,7 +369,7 @@ (define-public enlightenment
        ("setxkbmap" ,setxkbmap)
        ("xcb-util-keysyms" ,xcb-util-keysyms)
        ("xkeyboard-config" ,xkeyboard-config)
-       ("xorg-server-xwayland" ,xorg-server-xwayland)))
+       ("xwayland" ,xwayland)))
     (propagated-inputs
      `(("efl" ,efl)
        ("libxkbcommon" ,libxkbcommon)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 003da5c7a5..7511b2014c 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1147,7 +1147,7 @@ (define-public weston
        ("pango" ,pango)
        ("pipewire" ,pipewire)
        ("wayland-protocols" ,wayland-protocols)
-       ("xorg-server-xwayland" ,xorg-server-xwayland)))
+       ("xwayland" ,xwayland)))
     (propagated-inputs
      `(("libxkbcommon" ,libxkbcommon)
        ("pixman" ,pixman)
@@ -1164,7 +1164,7 @@ (define-public weston
         "-Dbackend-default=auto"
         "-Dsystemd=false"
         (string-append "-Dxwayland-path="
-                       (assoc-ref %build-inputs "xorg-server-xwayland")
+                       (assoc-ref %build-inputs "xwayland")
                        "/bin/Xwayland"))
        #:parallel-tests? #f           ; Parallel tests cause failures.
        #:phases
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 39ab43c90c..73af9eddd9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7507,7 +7507,7 @@ (define-public mutter
 
              ;; The following flags are needed for the bundled clutter
              (string-append "-Dxwayland_path="
-                            (assoc-ref %build-inputs "xorg-server-xwayland")
+                            (assoc-ref %build-inputs "xwayland")
                             "/bin/Xwayland")
 
              ;; the remaining flags are needed for the bundled cogl
@@ -7572,7 +7572,7 @@ (define-public mutter
        ("startup-notification" ,startup-notification)
        ("upower-glib" ,upower)
        ("xkeyboard-config" ,xkeyboard-config)
-       ("xorg-server-xwayland" ,xorg-server-xwayland)
+       ("xwayland" ,xwayland)
        ("zenity" ,zenity)))
     (synopsis "Window and compositing manager")
     (home-page "https://www.gnome.org")
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e19a08da47..b746d68485 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1486,8 +1486,7 @@ (define-public wlroots
          (add-before 'configure 'hardcode-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "xwayland/server.c"
-               (("Xwayland") (string-append (assoc-ref inputs
-                                                       "xorg-server-xwayland")
+               (("Xwayland") (string-append (assoc-ref inputs "xwayland")
                                             "/bin/Xwayland")))
              #t)))))
     (propagated-inputs
@@ -1503,7 +1502,7 @@ (define-public wlroots
        ("wayland-protocols" ,wayland-protocols)
        ("xcb-util-errors" ,xcb-util-errors)
        ("xcb-util-wm" ,xcb-util-wm)
-       ("xorg-server-xwayland" ,xorg-server-xwayland)))
+       ("xwayland" ,xwayland)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "https://github.com/swaywm/wlroots")
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 574562f065..e387474990 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -32,6 +32,7 @@
 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -75,6 +76,7 @@ (define-module (gnu packages xorg)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages inkscape)
@@ -86,6 +88,7 @@ (define-module (gnu packages xorg)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check)
@@ -5518,22 +5521,56 @@ (define-public xorg-server-for-tests
    (package
      (inherit xorg-server))))
 
-(define-public xorg-server-xwayland
-  (package/inherit xorg-server
-    (name "xorg-server-xwayland")
+(define-public xwayland
+  (package
+    (name "xwayland")
+    (version "21.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://xorg.freedesktop.org/archive/individual"
+                           "/xserver/xwayland-" version ".tar.xz"))
+       (sha256
+        (base32 "18pqvg76grbsyxa3mm3j06i1l8cwb28nbn2gcnqpsk7x75zpbhpb"))))
+    (build-system meson-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("wayland" ,wayland)
+     `(("egl-wayland" ,egl-wayland)
+       ("font-util" ,font-util)
+       ("libbsd" ,libbsd)
+       ("libdrm" ,libdrm)
+       ("libepoxy" ,libepoxy)
+       ("libgcrypt" ,libgcrypt)
+       ("libtirpc" ,libtirpc)
+       ("libx11" ,libx11)
+       ("libxfont2" ,libxfont2)
+       ("libxkbfile" ,libxkbfile)
+       ("libxshmfence" ,libxshmfence)
+       ("pixman" ,pixman)
+       ("wayland" ,wayland)
        ("wayland-protocols" ,wayland-protocols)
-       ,@(package-inputs xorg-server)))
+       ("xkbcomp" ,xkbcomp)
+       ("xkeyboard-config" ,xkeyboard-config)
+       ("xorgproto" ,xorgproto)
+       ("xtrans" ,xtrans)))
     (arguments
-     (substitute-keyword-arguments (package-arguments xorg-server)
-       ((#:configure-flags flags)
-        `(cons* "--enable-xwayland" "--disable-xorg"
-                "--disable-docs"    "--disable-devel-docs"
-                "--disable-xvfb"    "--disable-xnest"
-                "--disable-xquartz" "--disable-xwin"
-                ,flags))))
-    (synopsis "Xorg server with wayland backend")))
+     `(#:tests? #f ; FIXME
+       #:configure-flags
+       (list (string-append "-Dxkb_dir="
+                            (assoc-ref %build-inputs "xkeyboard-config")
+                            "/share/X11/xkb")
+             "-Dxkb_output_dir=/tmp"
+             (string-append "-Dxkb_bin_dir="
+                            (assoc-ref %build-inputs "xkbcomp")
+                            "/bin")
+             "-Ddefault_font_path=")))
+    (home-page "https://wayland.freedesktop.org/xserver.html")
+    (synopsis "X server with Wayland backend")
+    (description
+     "XWayland is an X server running on Wayland to provide backwards
+compatibility for legacy X11 applications.")
+    (license license:x11)))
 
 
 ;; packages of height 4 in the propagated-inputs tree
-- 
2.33.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  reply	other threads:[~2021-11-17 14:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 21:47 bug#51900: [core-updates-frozen] xorg-server-xwayland broken Guillaume Le Vaillant
2021-11-17 14:36 ` Guillaume Le Vaillant [this message]
2021-11-18 13:40   ` Maxim Cournoyer
2021-11-18 15:25     ` Guillaume Le Vaillant
2021-11-18 16:51       ` Maxim Cournoyer
2021-11-20 14:10         ` Guillaume Le Vaillant
2021-11-18 14:16 ` bug#51900: [PATCH 01/11] gnu: libinput: Update to 1.19.2 Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 02/11] gnu: libxkbfile: Propagate libx11 and kbproto Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 03/11] gnu: mesa: Update to 21.2.5 Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 04/11] gnu: xorg-server: Update to 21.1.1 and reinstate parallel tests Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 05/11] gnu: xorg-server: Enable X security extensions (xcsecurity) Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 06/11] gnu: Move eglexternalplatform and egl-wayland to (gnu packages xorg) Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 07/11] gnu: egl-wayland: Update to 1.1.9 Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 08/11] gnu: xorg-server-xwayland: Update to 21.1.3 and adjust package Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 09/11] gnu: python-dbusmock: Update to 0.24.1 Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 10/11] gnu: python-dbusmock: Patch reference to dbus-daemon Maxim Cournoyer
2021-11-18 14:16   ` bug#51900: [PATCH 11/11] gnu: mutter: Update to 41.0 and fix test (WIP) Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilwqvnvw.fsf@kitej \
    --to=glv@posteo.net \
    --cc=51900@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).