From 6b7bb526448b92bebed8237b3e62c9112129fd02 Mon Sep 17 00:00:00 2001 From: WORLDofPEACE Date: Fri, 25 Sep 2020 21:09:23 -0400 Subject: gnome3.mutter334: 3.34.5 -> 3.34.6, update patches Now managing patches using my git-series. * drop xwayland-path It now uses find_program.path() * add 0007-build-bump-ABI-to-sysprof-capture-4.patch This allows us to build with the sysprof in nixpkgs. --- .../3.34/0001-EGL-Include-EGL-eglmesaext.h.patch | 74 +++++++++++ .../mutter/3.34/0001-Fix-glitches-in-gala.patch | 29 ----- .../core/mutter/3.34/0002-drop-inheritable.patch | 135 +++++++++++++++++++++ .../mutter/3.34/0003-Fix-glitches-in-gala.patch | 33 +++++ ...rofiler-track-changes-in-GLib-and-Sysprof.patch | 58 +++++++++ ...ing-display.h-to-meta-workspace-manager.h.patch | 32 +++++ .../0006-build-bump-ABI-to-sysprof-capture-4.patch | 102 ++++++++++++++++ .../gnome-3/core/mutter/3.34/0007-fix-paths.patch | 27 +++++ pkgs/desktops/gnome-3/core/mutter/3.34/default.nix | 50 ++------ .../core/mutter/3.34/drop-inheritable.patch | 132 -------------------- .../gnome-3/core/mutter/3.34/fix-paths.patch | 13 -- .../gnome-3/core/mutter/3.34/fix-sysprof.patch | 25 ---- 12 files changed, 470 insertions(+), 240 deletions(-) create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch delete mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0001-Fix-glitches-in-gala.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0002-drop-inheritable.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0003-Fix-glitches-in-gala.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch create mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/0007-fix-paths.patch delete mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/drop-inheritable.patch delete mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/fix-paths.patch delete mode 100644 pkgs/desktops/gnome-3/core/mutter/3.34/fix-sysprof.patch (limited to 'pkgs') diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch new file mode 100644 index 00000000000..3691c034d1e --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch @@ -0,0 +1,74 @@ +From 7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d Mon Sep 17 00:00:00 2001 +Message-Id: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Sun, 20 Oct 2019 12:04:31 +0200 +Subject: [PATCH 1/7] EGL: Include EGL/eglmesaext.h + +From: Jan Alexander Steffens (heftig) + +The eglext.h shipped by libglvnd does not include the Mesa extensions, +unlike the header shipped in Mesa. + +Fixes https://gitlab.gnome.org/GNOME/mutter/issues/876 + +(cherry picked from commit a444a4c5f58ea516ad3cd9d6ddc0056c3ca9bc90) +--- + cogl/cogl/meson.build | 2 +- + src/backends/meta-egl-ext.h | 1 + + src/backends/meta-egl.c | 1 + + src/backends/meta-egl.h | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build +index 1057ef9..9a64294 100644 +--- a/cogl/cogl/meson.build ++++ b/cogl/cogl/meson.build +@@ -48,7 +48,7 @@ cogl_gl_header_h = configure_file( + built_headers += [cogl_gl_header_h] + + if have_egl +- cogl_egl_includes_string = '#include \n#include ' ++ cogl_egl_includes_string = '#include \n#include \n#include ' + else + cogl_egl_includes_string = '' + endif +diff --git a/src/backends/meta-egl-ext.h b/src/backends/meta-egl-ext.h +index 8705e7d..db0b74f 100644 +--- a/src/backends/meta-egl-ext.h ++++ b/src/backends/meta-egl-ext.h +@@ -29,6 +29,7 @@ + + #include + #include ++#include + + /* + * This is a little different to the tests shipped with EGL implementations, +diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c +index 6554be9..fdeff4f 100644 +--- a/src/backends/meta-egl.c ++++ b/src/backends/meta-egl.c +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h +index f2a8164..4591e7d 100644 +--- a/src/backends/meta-egl.h ++++ b/src/backends/meta-egl.h +@@ -28,6 +28,7 @@ + + #include + #include ++#include + #include + + #define META_EGL_ERROR meta_egl_error_quark () + +base-commit: 48ffbb582404c1d52196eb6cc5f082c31ca4910c +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0001-Fix-glitches-in-gala.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0001-Fix-glitches-in-gala.patch deleted file mode 100644 index 7be00b33bba..00000000000 --- a/pkgs/desktops/gnome-3/core/mutter/3.34/0001-Fix-glitches-in-gala.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e10186284103d3ad8e425980b096eac813cae631 Mon Sep 17 00:00:00 2001 -From: worldofpeace -Date: Sun, 5 Apr 2020 23:06:03 -0400 -Subject: [PATCH] Fix glitches in gala - -This fixes issues for users of mutter like in gala[0]. - -Upstream report: https://gitlab.gnome.org/GNOME/mutter/issues/536 -[0]: https://github.com/elementary/gala/issues/605 ---- - clutter/clutter/clutter-actor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index ecf9a597d..07b8b7155 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -17831,7 +17831,7 @@ _clutter_actor_get_paint_volume_mutable (ClutterActor *self) - if (_clutter_actor_get_paint_volume_real (self, &priv->paint_volume)) - { - priv->paint_volume_valid = TRUE; -- priv->needs_paint_volume_update = FALSE; -+ //priv->needs_paint_volume_update = FALSE; - return &priv->paint_volume; - } - else --- -2.25.1 - diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0002-drop-inheritable.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0002-drop-inheritable.patch new file mode 100644 index 00000000000..28f89ac7c0c --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0002-drop-inheritable.patch @@ -0,0 +1,135 @@ +From 14cee101882e65a57dcd66ea0f8399477b23ce7e Mon Sep 17 00:00:00 2001 +Message-Id: <14cee101882e65a57dcd66ea0f8399477b23ce7e.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Sat, 19 Oct 2019 13:26:05 +0200 +Subject: [PATCH 2/7] drop inheritable + +From: Tor Hedin Brønner + +Adapted from https://gitlab.gnome.org/GNOME/mutter/commit/c53c47ae123b03cc66044d2b846342123ecb3a01 + +We only want to drop inheritable though, to prevent the ambient set leaking further than gnome-shell. +--- + config.h.meson | 3 +++ + meson.build | 5 +++++ + meson_options.txt | 6 ++++++ + src/core/main.c | 10 ++++++++++ + src/meson.build | 1 + + 5 files changed, 25 insertions(+) + +diff --git a/config.h.meson b/config.h.meson +index 0bab718..202fb7e 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -58,6 +58,9 @@ + /* Xwayland applications allowed to issue keyboard grabs */ + #mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES + ++/* Defined if libcap-ng is available */ ++#mesondefine HAVE_LIBCAPNG ++ + /* XKB base prefix */ + #mesondefine XKB_BASE + +diff --git a/meson.build b/meson.build +index 29d495b..86970df 100644 +--- a/meson.build ++++ b/meson.build +@@ -35,6 +35,7 @@ libstartup_notification_req = '>= 0.7' + libcanberra_req = '>= 0.26' + libwacom_req = '>= 0.13' + atk_req = '>= 2.5.3' ++libcapng_req = '>= 0.7.9' + + # optional version requirements + udev_req = '>= 228' +@@ -125,6 +126,7 @@ xau_dep = dependency('xau') + ice_dep = dependency('ice') + atk_dep = dependency('atk', version: atk_req) + libcanberra_dep = dependency('libcanberra', version: libcanberra_req) ++libcapng_dep = dependency('libcap-ng', required: get_option('libcapng')) + + # For now always require X11 support + have_x11 = true +@@ -256,6 +258,7 @@ have_core_tests = false + have_cogl_tests = false + have_clutter_tests = false + have_installed_tests = false ++have_libcapng = libcapng_dep.found() + + if have_tests + have_core_tests = get_option('core_tests') +@@ -361,6 +364,7 @@ cdata.set('HAVE_LIBWACOM', have_libwacom) + cdata.set('HAVE_SM', have_sm) + cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification) + cdata.set('HAVE_INTROSPECTION', have_introspection) ++cdata.set('HAVE_LIBCAPNG', have_libcapng) + cdata.set('HAVE_PROFILER', have_profiler) + + xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base') +@@ -443,6 +447,7 @@ output = [ + ' Startup notification..... ' + have_startup_notification.to_string(), + ' Introspection............ ' + have_introspection.to_string(), + ' Profiler................. ' + have_profiler.to_string(), ++ ' libcap-ng................ ' + have_libcapng.to_string(), + '', + ' Tests:', + '', +diff --git a/meson_options.txt b/meson_options.txt +index 73aa7ad..8bfaacd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -152,3 +152,9 @@ option('xwayland_grab_default_access_rules', + value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr', + description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in Xwayland' + ) ++ ++option('libcapng', ++ type: 'feature', ++ value: 'auto', ++ description: 'Enable libcap-ng support' ++) +diff --git a/src/core/main.c b/src/core/main.c +index 3935f35..ecf3cb2 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -66,6 +66,10 @@ + #include + #endif + ++#ifdef HAVE_LIBCAPNG ++#include ++#endif ++ + #if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND) + #include + #endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */ +@@ -673,6 +677,12 @@ meta_run (void) + if (!meta_display_open ()) + meta_exit (META_EXIT_ERROR); + ++#ifdef HAVE_LIBCAPNG ++ capng_clear(CAPNG_SELECT_BOTH); ++ capng_update(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_SYS_NICE); ++ capng_apply(CAPNG_SELECT_BOTH); ++#endif ++ + g_main_loop_run (meta_main_loop); + + meta_finalize (); +diff --git a/src/meson.build b/src/meson.build +index 90d8073..a9fffa2 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,6 +18,7 @@ mutter_pkg_deps = [ + glib_dep, + gsettings_desktop_schemas_dep, + gtk3_dep, ++ libcapng_dep, + pango_dep, + ] + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0003-Fix-glitches-in-gala.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0003-Fix-glitches-in-gala.patch new file mode 100644 index 00000000000..9f78a324d9d --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0003-Fix-glitches-in-gala.patch @@ -0,0 +1,33 @@ +From 5d2b9a03f24b4dbc423adff52b2eeb478c4b5913 Mon Sep 17 00:00:00 2001 +Message-Id: <5d2b9a03f24b4dbc423adff52b2eeb478c4b5913.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Sun, 5 Apr 2020 23:06:03 -0400 +Subject: [PATCH 3/7] Fix glitches in gala + +From: worldofpeace + +This fixes issues for users of mutter like in gala[0]. + +Upstream report: https://gitlab.gnome.org/GNOME/mutter/issues/536 +[0]: https://github.com/elementary/gala/issues/605 +--- + clutter/clutter/clutter-actor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c +index ecf9a59..07b8b71 100644 +--- a/clutter/clutter/clutter-actor.c ++++ b/clutter/clutter/clutter-actor.c +@@ -17831,7 +17831,7 @@ _clutter_actor_get_paint_volume_mutable (ClutterActor *self) + if (_clutter_actor_get_paint_volume_real (self, &priv->paint_volume)) + { + priv->paint_volume_valid = TRUE; +- priv->needs_paint_volume_update = FALSE; ++ //priv->needs_paint_volume_update = FALSE; + return &priv->paint_volume; + } + else +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch new file mode 100644 index 00000000000..cd98d395041 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch @@ -0,0 +1,58 @@ +From 5a9f9fbaa1322b2ad0a52fcdd171d4f44d031918 Mon Sep 17 00:00:00 2001 +Message-Id: <5a9f9fbaa1322b2ad0a52fcdd171d4f44d031918.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Wed, 30 Oct 2019 15:23:24 -0700 +Subject: [PATCH 4/7] profiler: track changes in GLib and Sysprof + +From: Christian Hergert + +This tracks the changes to gdbus-codegen in terms of how GUnixFDList is +done to use the UnixFD annotation. + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/908 +(cherry picked from commit 605171291993460f31d470a8143d6438d0c6169c) +--- + src/backends/meta-profiler.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/backends/meta-profiler.c b/src/backends/meta-profiler.c +index 10d433a..0d62701 100644 +--- a/src/backends/meta-profiler.c ++++ b/src/backends/meta-profiler.c +@@ -51,13 +51,12 @@ G_DEFINE_TYPE_WITH_CODE (MetaProfiler, + static gboolean + handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + GDBusMethodInvocation *invocation, ++ GUnixFDList *fd_list, + GVariant *options, + GVariant *fd_variant) + { + MetaProfiler *profiler = META_PROFILER (dbus_profiler); + GMainContext *main_context = g_main_context_default (); +- GDBusMessage *message; +- GUnixFDList *fd_list; + const char *group_name; + int position; + int fd = -1; +@@ -73,8 +72,6 @@ handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + + g_variant_get (fd_variant, "h", &position); + +- message = g_dbus_method_invocation_get_message (invocation); +- fd_list = g_dbus_message_get_unix_fd_list (message); + if (fd_list) + fd = g_unix_fd_list_get (fd_list, position, NULL); + +@@ -98,7 +95,7 @@ handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + + g_debug ("Profiler running"); + +- meta_dbus_sysprof3_profiler_complete_start (dbus_profiler, invocation); ++ meta_dbus_sysprof3_profiler_complete_start (dbus_profiler, invocation, NULL); + return TRUE; + } + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch new file mode 100644 index 00000000000..138970ddda0 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch @@ -0,0 +1,32 @@ +From 2caa072dd8e283a8e43febeab55fe8b76dda69b7 Mon Sep 17 00:00:00 2001 +Message-Id: <2caa072dd8e283a8e43febeab55fe8b76dda69b7.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Wed, 29 Jan 2020 11:02:33 +0100 +Subject: [PATCH 5/7] meta: Add missing display.h to meta-workspace-manager.h + +From: Corentin Noël + +This is required because MetaDisplayCorner is only defined in display.h + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/1025 +(cherry picked from commit 9d390ee49fb1f6300336e82ae94cc8061c6bae12) +--- + src/meta/meta-workspace-manager.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/meta/meta-workspace-manager.h b/src/meta/meta-workspace-manager.h +index 0390c44..92cd681 100644 +--- a/src/meta/meta-workspace-manager.h ++++ b/src/meta/meta-workspace-manager.h +@@ -26,6 +26,7 @@ + #include + + #include ++#include + #include + #include + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch new file mode 100644 index 00000000000..6d88f0f5e76 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch @@ -0,0 +1,102 @@ +From 0c95e5a5b31eab93f149b90982680f38e8977063 Mon Sep 17 00:00:00 2001 +Message-Id: <0c95e5a5b31eab93f149b90982680f38e8977063.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Sat, 4 Jul 2020 12:01:28 -0700 +Subject: [PATCH 6/7] build: bump ABI to sysprof-capture-4 + +From: Christian Hergert + +GLib will now be linking against sysprof-capture-4.a. To support that, +sysprof had to remove the GLib dependency from sysprof-capture-4 which +had the side-effect of breaking ABi. + +This bumps the dependency and includes a fallback to compile just the +libsysprof-capture-4.a using a subproject wrap. + +https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1352 +(cherry picked from commit 2c08eb6d163b6758efec9eafe1d5c17fc1ab3692) +--- + meson.build | 20 ++++++++++++++++++-- + src/meson.build | 8 ++++++-- + subprojects/sysprof.wrap | 4 ++++ + 3 files changed, 28 insertions(+), 4 deletions(-) + create mode 100644 subprojects/sysprof.wrap + +diff --git a/meson.build b/meson.build +index 86970df..3dc0098 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,6 +1,6 @@ + project('mutter', 'c', + version: '3.34.6', +- meson_version: '>= 0.50.0', ++ meson_version: '>= 0.51.0', + license: 'GPLv2+' + ) + +@@ -52,6 +52,9 @@ gbm_req = '>= 10.3' + # screen cast version requirements + libpipewire_req = '>= 0.2.5' + ++# profiler requirements ++sysprof_req = '>= 3.37.2' ++ + gnome = import('gnome') + pkg = import('pkgconfig') + i18n = import('i18n') +@@ -275,7 +278,20 @@ endif + + have_profiler = get_option('profiler') + if have_profiler +- sysprof_dep = dependency('sysprof-capture-3') ++ # libsysprof-capture support ++ sysprof_dep = dependency('sysprof-capture-4', ++ required: true, ++ default_options: [ ++ 'enable_examples=false', ++ 'enable_gtk=false', ++ 'enable_tests=false', ++ 'enable_tools=false', ++ 'libsysprof=false', ++ 'with_sysprofd=none', ++ 'help=false', ++ ], ++ fallback: ['sysprof', 'libsysprof_capture_dep'], ++ ) + endif + + required_functions = [ +diff --git a/src/meson.build b/src/meson.build +index a9fffa2..a91baa1 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -711,9 +711,13 @@ if have_profiler + 'backends/meta-profiler.h', + ] + +- dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces') +- sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') ++ if sysprof_dep.type_name() == 'pkgconfig' ++ sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') ++ else ++ sysprof_dbus_interfaces_dir = join_paths(meson.source_root(), 'subprojects', 'sysprof', 'src') ++ endif + ++ sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') + dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler', + sysprof3_dbus_file, + interface_prefix: 'org.gnome.', +diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap +new file mode 100644 +index 0000000..c8f5883 +--- /dev/null ++++ b/subprojects/sysprof.wrap +@@ -0,0 +1,4 @@ ++[wrap-git] ++directory=sysprof ++url=https://gitlab.gnome.org/GNOME/sysprof.git ++revision=cae28263ff5dd4a510d82f3dc2e3a3b3d9b386fb +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/0007-fix-paths.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/0007-fix-paths.patch new file mode 100644 index 00000000000..8376fc649b5 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/0007-fix-paths.patch @@ -0,0 +1,27 @@ +From 7bbbf082599ec786f64f2135c9acc0b4fe2ecbf4 Mon Sep 17 00:00:00 2001 +Message-Id: <7bbbf082599ec786f64f2135c9acc0b4fe2ecbf4.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE +Date: Fri, 25 Sep 2020 20:48:33 -0400 +Subject: [PATCH 7/7] fix paths + +--- + src/core/util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/util.c b/src/core/util.c +index 79bcfdc..87ce549 100644 +--- a/src/core/util.c ++++ b/src/core/util.c +@@ -623,7 +623,7 @@ meta_show_dialog (const char *type, + + args = g_ptr_array_new (); + +- append_argument (args, "zenity"); ++ append_argument (args, "@zenity@/bin/zenity"); + append_argument (args, type); + + if (display) +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/default.nix b/pkgs/desktops/gnome-3/core/mutter/3.34/default.nix index 87696987850..6afded76671 100644 --- a/pkgs/desktops/gnome-3/core/mutter/3.34/default.nix +++ b/pkgs/desktops/gnome-3/core/mutter/3.34/default.nix @@ -43,20 +43,19 @@ stdenv.mkDerivation rec { pname = "mutter"; - version = "3.34.5"; + version = "3.34.6"; outputs = [ "out" "dev" "man" ]; src = fetchurl { url = "mirror://gnome/sources/mutter/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1i3r51ghfld1rf1rczzi3jhybz3mhywqcj2jyiqhfcyp1svlklfi"; + hash = "sha256-I73ofTO4mBNYgxzsiRW7X/Hq+cHedMkM0WYLG5WINSY="; }; mesonFlags = [ "-Degl_device=true" "-Dinstalled_tests=false" # TODO: enable these "-Dwayland_eglstream=true" - "-Dxwayland-path=${xwayland}/bin/Xwayland" ]; propagatedBuildInputs = [ @@ -105,45 +104,14 @@ stdenv.mkDerivation rec { ]; patches = [ - # Fix build with libglvnd provided headers - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/mutter/commit/a444a4c5f58ea516ad3cd9d6ddc0056c3ca9bc90.patch"; - sha256 = "0imy2j8af9477jliwdq4jc40yw1cifsjjf196gnmwxr9rkj0hbrd"; - }) - - # gnome-3-34 2020-04-24 - # also fixes https://mail.gnome.org/archives/distributor-list/2020-April/msg00001.html - (fetchpatch { - url = "https://github.com/GNOME/mutter/compare/3.34.5..3bafd234248fdcd84bc62fef5e31c29fbb613909.patch"; - sha256 = "1a7krbdfmvx204p6av44rbp4ckp6ddg1mms8wkixxh2p871zq1pi"; - }) - - # Drop inheritable cap_sys_nice, to prevent the ambient set from leaking - # from mutter/gnome-shell, see https://github.com/NixOS/nixpkgs/issues/71381 - ./drop-inheritable.patch - - # See commit message for details - ./0001-Fix-glitches-in-gala.patch - - # https://gitlab.gnome.org/GNOME/mutter/merge_requests/1094 - # https://gitlab.gnome.org/GNOME/mutter/merge_requests/957 - ./fix-sysprof.patch - - # profiler: track changes in GLib and Sysprof - # https://gitlab.gnome.org/GNOME/mutter/merge_requests/908 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/mutter/-/commit/605171291993460f31d470a8143d6438d0c6169c.patch"; - sha256 = "10fxzj0lmic2sp57w26w3r0bv1szngjjs50p3ka22wr9pxqmzl7l"; - }) - - # Fixes https://github.com/elementary/wingpanel/issues/305 - (fetchpatch { - url = "https://gitlab.gnome.org/GNOME/mutter/-/commit/9d390ee49fb1f6300336e82ae94cc8061c6bae12.patch"; - sha256 = "12hmi07rvspwhp8h1y1vmcvmvbh8fihcrb07ja5g0qnh28ip5qfi"; - }) - + ./0001-EGL-Include-EGL-eglmesaext.h.patch + ./0002-drop-inheritable.patch + ./0003-Fix-glitches-in-gala.patch + ./0004-profiler-track-changes-in-GLib-and-Sysprof.patch + ./0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch + ./0006-build-bump-ABI-to-sysprof-capture-4.patch (substituteAll { - src = ./fix-paths.patch; + src = ./0007-fix-paths.patch; inherit zenity; }) ]; diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/drop-inheritable.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/drop-inheritable.patch deleted file mode 100644 index 0f60be3a121..00000000000 --- a/pkgs/desktops/gnome-3/core/mutter/3.34/drop-inheritable.patch +++ /dev/null @@ -1,132 +0,0 @@ -From e9c772e265b2293af031c79f4bbc99b5847dfe3c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= -Date: Sat, 19 Oct 2019 13:26:05 +0200 -Subject: [PATCH] drop inheritable - -Adapted from https://gitlab.gnome.org/GNOME/mutter/commit/c53c47ae123b03cc66044d2b846342123ecb3a01 - -We only want to drop inheritable though, to prevent the ambient set leaking further than gnome-shell. - ---- - config.h.meson | 3 +++ - meson.build | 5 +++++ - meson_options.txt | 6 ++++++ - src/core/main.c | 11 +++++++++++ - src/meson.build | 1 + - 5 files changed, 26 insertions(+) - -diff --git a/config.h.meson b/config.h.meson -index 0bab71848..202fb7ed1 100644 ---- a/config.h.meson -+++ b/config.h.meson -@@ -58,6 +58,9 @@ - /* Xwayland applications allowed to issue keyboard grabs */ - #mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES - -+/* Defined if libcap-ng is available */ -+#mesondefine HAVE_LIBCAPNG -+ - /* XKB base prefix */ - #mesondefine XKB_BASE - -diff --git a/meson.build b/meson.build -index 3322bd3b1..01c8020fa 100644 ---- a/meson.build -+++ b/meson.build -@@ -35,6 +35,7 @@ libstartup_notification_req = '>= 0.7' - libcanberra_req = '>= 0.26' - libwacom_req = '>= 0.13' - atk_req = '>= 2.5.3' -+libcapng_req = '>= 0.7.9' - - # optional version requirements - udev_req = '>= 228' -@@ -125,6 +126,7 @@ xau_dep = dependency('xau') - ice_dep = dependency('ice') - atk_dep = dependency('atk', version: atk_req) - libcanberra_dep = dependency('libcanberra', version: libcanberra_req) -+libcapng_dep = dependency('libcap-ng', required: get_option('libcapng')) - - # For now always require X11 support - have_x11 = true -@@ -256,6 +258,7 @@ have_core_tests = false - have_cogl_tests = false - have_clutter_tests = false - have_installed_tests = false -+have_libcapng = libcapng_dep.found() - - if have_tests - have_core_tests = get_option('core_tests') -@@ -361,6 +364,7 @@ cdata.set('HAVE_LIBWACOM', have_libwacom) - cdata.set('HAVE_SM', have_sm) - cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification) - cdata.set('HAVE_INTROSPECTION', have_introspection) -+cdata.set('HAVE_LIBCAPNG', have_libcapng) - cdata.set('HAVE_PROFILER', have_profiler) - - xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base') -@@ -443,6 +447,7 @@ output = [ - ' Startup notification..... ' + have_startup_notification.to_string(), - ' Introspection............ ' + have_introspection.to_string(), - ' Profiler................. ' + have_profiler.to_string(), -+ ' libcap-ng................ ' + have_libcapng.to_string(), - '', - ' Tests:', - '', -diff --git a/meson_options.txt b/meson_options.txt -index 73aa7adde..8bfaacd9a 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -152,3 +152,9 @@ option('xwayland_grab_default_access_rules', - value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr', - description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in Xwayland' - ) -+ -+option('libcapng', -+ type: 'feature', -+ value: 'auto', -+ description: 'Enable libcap-ng support' -+) -diff --git a/src/core/main.c b/src/core/main.c -index 7f4f666d2..b27968f13 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -66,6 +66,10 @@ - #include - #endif - -+#ifdef HAVE_LIBCAPNG -+#include -+#endif -+ - #if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND) - #include - #endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */ -@@ -673,6 +677,12 @@ meta_run (void) - if (!meta_display_open ()) - meta_exit (META_EXIT_ERROR); - -+#ifdef HAVE_LIBCAPNG -+ capng_clear(CAPNG_SELECT_BOTH); -+ capng_update(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_SYS_NICE); -+ capng_apply(CAPNG_SELECT_BOTH); -+#endif -+ - g_main_loop_run (meta_main_loop); - - meta_finalize (); -diff --git a/src/meson.build b/src/meson.build -index 90d80734f..a9fffa2c2 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -18,6 +18,7 @@ mutter_pkg_deps = [ - glib_dep, - gsettings_desktop_schemas_dep, - gtk3_dep, -+ libcapng_dep, - pango_dep, - ] - --- -2.23.0 - diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/fix-paths.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/fix-paths.patch deleted file mode 100644 index 1986c65e8f4..00000000000 --- a/pkgs/desktops/gnome-3/core/mutter/3.34/fix-paths.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/core/util.c b/src/core/util.c -index 57b73747d..f424cc81c 100644 ---- a/src/core/util.c -+++ b/src/core/util.c -@@ -636,7 +636,7 @@ meta_show_dialog (const char *type, - - args = g_ptr_array_new (); - -- append_argument (args, "zenity"); -+ append_argument (args, "@zenity@/bin/zenity"); - append_argument (args, type); - - if (display) diff --git a/pkgs/desktops/gnome-3/core/mutter/3.34/fix-sysprof.patch b/pkgs/desktops/gnome-3/core/mutter/3.34/fix-sysprof.patch deleted file mode 100644 index 481a0ab89cb..00000000000 --- a/pkgs/desktops/gnome-3/core/mutter/3.34/fix-sysprof.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 71acfd5258b4d12323fc51dda48e83830e62e696 Mon Sep 17 00:00:00 2001 -From: worldofpeace -Date: Mon, 16 Sep 2019 11:18:27 -0400 -Subject: [PATCH] build: use get_pkgconfig_variable for sysprof dbusdir - ---- - src/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/meson.build b/src/meson.build -index 182f7f5f5..43060865b 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -710,7 +710,7 @@ if have_profiler - 'backends/meta-profiler.h', - ] - -- dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces') -+ dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('prefix'), 'share', 'dbus-1', 'interfaces') - sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') - - dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler', --- -2.22.1 - -- cgit 1.4.1