From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9B851158095 for ; Wed, 7 Sep 2022 02:10:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E39F6E085B; Wed, 7 Sep 2022 02:10:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CCE89E085B for ; Wed, 7 Sep 2022 02:10:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CD1F0340D0C for ; Wed, 7 Sep 2022 02:10:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 409A756D for ; Wed, 7 Sep 2022 02:10:25 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1662516604.5ab1ba64e93bc0d4ee88f02d9663ea138c1c6ff0.mattst88@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-wm/mutter/files/, x11-wm/mutter/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-wm/mutter/files/mutter-42.4-backend-native-Don-t-warn-on-EACCES-if-headless.patch x11-wm/mutter/mutter-42.4-r1.ebuild x11-wm/mutter/mutter-42.4.ebuild X-VCS-Directories: x11-wm/mutter/ x11-wm/mutter/files/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 5ab1ba64e93bc0d4ee88f02d9663ea138c1c6ff0 X-VCS-Branch: master Date: Wed, 7 Sep 2022 02:10:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b44c1f42-46f9-445b-9aba-cee831d12709 X-Archives-Hash: 32ee6e3d7df97fccbdca8e48e0ef40c6 commit: 5ab1ba64e93bc0d4ee88f02d9663ea138c1c6ff0 Author: Matt Turner gentoo org> AuthorDate: Tue Sep 6 23:09:16 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed Sep 7 02:10:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ab1ba64 x11-wm/mutter: Reenable tests Signed-off-by: Matt Turner gentoo.org> ...d-native-Don-t-warn-on-EACCES-if-headless.patch | 79 ++++++++++++++++++++++ .../{mutter-42.4.ebuild => mutter-42.4-r1.ebuild} | 3 +- 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/x11-wm/mutter/files/mutter-42.4-backend-native-Don-t-warn-on-EACCES-if-headless.patch b/x11-wm/mutter/files/mutter-42.4-backend-native-Don-t-warn-on-EACCES-if-headless.patch new file mode 100644 index 000000000000..98b58d3dfeff --- /dev/null +++ b/x11-wm/mutter/files/mutter-42.4-backend-native-Don-t-warn-on-EACCES-if-headless.patch @@ -0,0 +1,79 @@ +From db854a8588c1164df2f54c5718930aadf353b948 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Thu, 18 Aug 2022 10:41:01 +0100 +Subject: [PATCH] backend/native: Don't warn on EACCES if headless + +Since commit 1bf70334 "tests/runner: Make test runner use the headless +backend", tests are run with the native backend in headless mode, which +will attempt to open each GPU and show a warning (fatal during tests) +if it cannot. + +However, in headless mode we might not be logged in on any seat (for +example we might be logged in via ssh instead), which means we might +legitimately not have permission to use any GPUs, even if they exist. +Downgrade the warning to a debug message in this case. + +Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/2381 +Signed-off-by: Simon McVittie +Part-of: +(cherry picked from commit 64a67aa00bfe54fe7219d7f581950897fcbf9a75) +--- + src/backends/native/meta-backend-native.c | 35 +++++++++++++++++++---- + 1 file changed, 30 insertions(+), 5 deletions(-) + +diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c +index 224538787..a2babb4b0 100644 +--- a/src/backends/native/meta-backend-native.c ++++ b/src/backends/native/meta-backend-native.c +@@ -514,8 +514,20 @@ on_udev_device_added (MetaUdev *udev, + new_gpu_kms = create_gpu_from_udev_device (native, device, &error); + if (!new_gpu_kms) + { +- g_warning ("Failed to hotplug secondary gpu '%s': %s", +- device_path, error->message); ++ if (meta_backend_is_headless (backend) && ++ g_error_matches (error, G_IO_ERROR, ++ G_IO_ERROR_PERMISSION_DENIED)) ++ { ++ meta_topic (META_DEBUG_BACKEND, ++ "Ignoring unavailable secondary gpu '%s': %s", ++ device_path, error->message); ++ } ++ else ++ { ++ g_warning ("Failed to hotplug secondary gpu '%s': %s", ++ device_path, error->message); ++ } ++ + return; + } + +@@ -552,9 +564,22 @@ init_gpus (MetaBackendNative *native, + + if (!gpu_kms) + { +- g_warning ("Failed to open gpu '%s': %s", +- g_udev_device_get_device_file (device), +- local_error->message); ++ if (meta_backend_is_headless (backend) && ++ g_error_matches (local_error, G_IO_ERROR, ++ G_IO_ERROR_PERMISSION_DENIED)) ++ { ++ meta_topic (META_DEBUG_BACKEND, ++ "Ignoring unavailable gpu '%s': %s'", ++ g_udev_device_get_device_file (device), ++ local_error->message); ++ } ++ else ++ { ++ g_warning ("Failed to open gpu '%s': %s", ++ g_udev_device_get_device_file (device), ++ local_error->message); ++ } ++ + g_clear_error (&local_error); + continue; + } +-- +2.35.1 + diff --git a/x11-wm/mutter/mutter-42.4.ebuild b/x11-wm/mutter/mutter-42.4-r1.ebuild similarity index 98% rename from x11-wm/mutter/mutter-42.4.ebuild rename to x11-wm/mutter/mutter-42.4-r1.ebuild index 105efceb6652..dcaaa2a66b00 100644 --- a/x11-wm/mutter/mutter-42.4.ebuild +++ b/x11-wm/mutter/mutter-42.4-r1.ebuild @@ -16,7 +16,7 @@ IUSE="doc elogind gnome input_devices_wacom +introspection screencast sysprof sy REQUIRED_USE=" wayland? ( ^^ ( elogind systemd ) udev ) test? ( wayland )" -RESTRICT="!test? ( test ) test" # Tests need access to /dev/dri/card0 +RESTRICT="!test? ( test )" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" @@ -110,6 +110,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-42.0-Disable-anonymous-file-test.patch + "${FILESDIR}"/${P}-backend-native-Don-t-warn-on-EACCES-if-headless.patch ) python_check_deps() {