unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 51900@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#51900: [PATCH 11/11] gnu: mutter: Update to 41.0 and fix test (WIP).
Date: Thu, 18 Nov 2021 09:16:16 -0500	[thread overview]
Message-ID: <20211118141616.4252-11-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20211118141616.4252-1-maxim.cournoyer@gmail.com>

* gnu/packages/gnome.scm (mutter): Update to 41.0.
TODO
---
 gnu/packages/gnome.scm | 95 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 79 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f07ff28701..c01da54da6 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7478,7 +7478,7 @@ (define-public zenity
 (define-public mutter
   (package
     (name "mutter")
-    (version "40.5")
+    (version "41.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -7486,54 +7486,114 @@ (define-public mutter
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0bmd6p9qcwx0hv0y2bp33xjfaw4lyfkl55r0qn2cm04465riddny"))))
+                "17pqrm48kddqrc3fl96n5knhaxyn0crg0zv7zpmqhk848jks307s"))))
     ;; NOTE: Since version 3.21.x, mutter now bundles and exports forked
     ;; versions of cogl and clutter.  As a result, many of the inputs,
     ;; propagated-inputs, and configure flags used in cogl and clutter are
     ;; needed here as well.
     (build-system meson-build-system)
     (arguments
-     '(;; XXX: All mutter tests fail with the following error:
-       ;;   Settings schema 'org.gnome.mutter' is not installed
-       #:tests? #f
-       #:glib-or-gtk? #t
+     '(#:glib-or-gtk? #t
        #:configure-flags
        ;; TODO: Enable profiler when Sysprof is packaged.
        (list "-Dprofiler=false"
              ;; Otherwise, the RUNPATH will lack the final path component.
              (string-append "-Dc_link_args=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib:"
-                            (assoc-ref %outputs "out") "/lib/mutter-8")
-
+                            (assoc-ref %outputs "out") "/lib/mutter-9")
+             ;; Disable systemd support.
+             "-Dsystemd=false"
              ;; The following flags are needed for the bundled clutter
              (string-append "-Dxwayland_path="
                             (assoc-ref %build-inputs "xorg-server-xwayland")
                             "/bin/Xwayland")
-
              ;; the remaining flags are needed for the bundled cogl
              (string-append "-Dopengl_libname="
                             (assoc-ref %build-inputs "mesa")
-                            "/lib/libGL.so"))
+                            "/lib/libGL.so")
+             (string-append "-Dgles2_libname="
+                            (assoc-ref %build-inputs "mesa")
+                            "/lib/libGLESv2.so")
+             "-Degl_device=true"         ;false by default
+             "-Dwayland_eglstream=true") ;false by default
+       #:test-options
+       (list "--verbose"
+             ;; FIXME: There are three (3) test suites: 'clutter', 'cogl' and
+             ;; 'core', of which only 'core' is currently failing with errors
+             ;; like:
+
+             ;; FIXME: The test suites takes way more time (from ~1m30 to 15m)
+             ;; in the build environment, due to python-dbusmock struggling to
+             ;; kill the dbus process with errors like "ERROR: timed out
+             ;; waiting for bus process to terminate" for unknown reasons
+             ;; (see:
+             ;; https://github.com/martinpitt/python-dbusmock/issues/47#issuecomment-972547988).
+             "--suite=clutter"
+             "--suite=cogl")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-dlopen-calls
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/wayland/meta-wayland-egl-stream.c"
+               (("libnvidia-egl-wayland.so.1")
+                (string-append (assoc-ref inputs "egl-wayland")
+                               "/lib/libnvidia-egl-wayland.so.1")))))
          (add-before 'configure 'set-udev-dir
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "PKG_CONFIG_UDEV_UDEVDIR"
                      (string-append (assoc-ref outputs "out")
-                                    "/lib/udev")))))))
+                                    "/lib/udev"))))
+         (replace 'check
+           (lambda* (#:key inputs tests? test-options parallel-tests?
+                     #:allow-other-keys)
+             (when tests?
+               ;; Setup (see the 'test-mutter' CI target at
+               ;; https://gitlab.gnome.org/GNOME/mutter/-/raw/main/.gitlab-ci.yml).
+               (setenv "XDG_RUNTIME_DIR" "runtime-dir")
+               (setenv "GSETTINGS_SCHEMA_DIR" "data")
+               (setenv "MUTTER_DEBUG_DUMMY_MODE_SPECS" "800x600@10.0")
+               (setenv "PIPEWIRE_DEBUG" "2")
+               (setenv "PIPEWIRE_LOG" "meson-logs/pipewire.log")
+               (setenv "XVFB_SERVER_ARGS" "+iglx -noreset")
+               (setenv "G_SLICE" "always-malloc")
+               (setenv "MALLOC_CHECK" "3")
+               (setenv "NO_AT_BRIDGE" "1")
+               ;; This is needed, otherwise the "mutter:core+mutter/unit /
+               ;; anonymous-file" test would fail (see:
+               ;; https://gitlab.gnome.org/GNOME/mutter/-/issues/2017).
+               (setenv "CI_JOB_ID" "1")
+
+               (invoke "glib-compile-schemas" (getenv "GSETTINGS_SCHEMA_DIR"))
+               (mkdir-p (getenv "XDG_RUNTIME_DIR"))
+               (chmod (getenv "XDG_RUNTIME_DIR") #o755)
+               (invoke "pipewire" "--version") ;check for pipewire
+               (system "pipewire &")    ;always returns 0 due to forking
+
+               (setenv "MESON_TESTTHREADS"
+                       (if parallel-tests?
+                           (number->string (parallel-job-count))
+                           "1"))
+               (apply invoke "dbus-run-session" "--"
+                      "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
+                      "meson" "test" "-t" "10" "--print-errorlogs"
+                      test-options)))))))
     (native-inputs
      `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
-       ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
+       ("glib:bin" ,glib "bin")         ; for glib-compile-schemas, etc.
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
-       ("xorg-server" ,xorg-server-for-tests)
+       ("xvfb-run" ,xvfb-run)
        ;; For git build
        ("autoconf" ,autoconf)
        ("automake" ,automake)
-       ("libtool" ,libtool)))
+       ("libtool" ,libtool)
+       ;; For tests.
+       ("pipewire" ,pipewire-0.3)
+       ("python-dbus" ,python-dbus)
+       ("python-dbusmock" ,python-dbusmock)))
     (propagated-inputs
-     `(;; libmutter.pc refers to these:
+     `( ;; libmutter.pc refers to these:
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)
        ;; mutter-clutter-1.0.pc and mutter-cogl-1.0.pc refer to these:
@@ -7545,6 +7605,7 @@ (define-public mutter
        ("libinput" ,libinput)
        ("libx11" ,libx11)
        ("libxcomposite" ,libxcomposite)
+       ("libxcvt" ,libxcvt)
        ("libxdamage" ,libxdamage)
        ("libxext" ,libxext)
        ("libxfixes" ,libxfixes)
@@ -7556,7 +7617,8 @@ (define-public mutter
        ("udev" ,eudev)
        ("xinput" ,xinput)))
     (inputs
-     `(("elogind" ,elogind)
+     `(("egl-wayland" ,egl-wayland)     ;for wayland-eglstream-protocols
+       ("elogind" ,elogind)
        ("gnome-desktop" ,gnome-desktop)
        ("gnome-settings-daemon" ,gnome-settings-daemon)
        ("graphene" ,graphene)
@@ -7570,6 +7632,7 @@ (define-public mutter
        ("libxtst" ,libxtst)
        ("pipewire" ,pipewire-0.3)
        ("startup-notification" ,startup-notification)
+       ("sysprof" ,sysprof)
        ("upower-glib" ,upower)
        ("xkeyboard-config" ,xkeyboard-config)
        ("xorg-server-xwayland" ,xorg-server-xwayland)
-- 
2.33.1





      parent reply	other threads:[~2021-11-18 14:18 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
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   ` Maxim Cournoyer [this message]

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=20211118141616.4252-11-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --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).