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 BE198158089 for ; Sat, 2 Sep 2023 18:01:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1F712BC024; Sat, 2 Sep 2023 18:01:37 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 815D42BC024 for ; Sat, 2 Sep 2023 18:01:37 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7627A335CD4 for ; Sat, 2 Sep 2023 18:01:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 12FDE1105 for ; Sat, 2 Sep 2023 18:01:35 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1693677660.94d5a070729123284b72092743d5316d3563b9f7.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/sddm/, x11-misc/sddm/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/sddm/files/sddm-0.20.0-dbus-policy-in-usr.patch x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch x11-misc/sddm/files/sddm-0.20.0-no-qtvirtualkeyboard-on-wayland.patch x11-misc/sddm/sddm-0.20.0-r1.ebuild X-VCS-Directories: x11-misc/sddm/ x11-misc/sddm/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 94d5a070729123284b72092743d5316d3563b9f7 X-VCS-Branch: master Date: Sat, 2 Sep 2023 18:01:35 +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: ed610e8d-d0e7-487d-bddd-d8c517912588 X-Archives-Hash: d18252a13bc040b2f9476e8745072917 commit: 94d5a070729123284b72092743d5316d3563b9f7 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Sep 2 17:00:55 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Sep 2 18:01:00 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94d5a070 x11-misc/sddm: Backport some post-0.20 fixes - greeter: Look at WAYLAND_DISPLAY for platform detection - Ignore InputMethod=qtvirtualkeyboard on wayland - Install dbus policy in /usr/share, not /etc Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/sddm-0.20.0-dbus-policy-in-usr.patch | 29 +++++ .../sddm-0.20.0-greeter-platform-detection.patch | 24 ++++ ...dm-0.20.0-no-qtvirtualkeyboard-on-wayland.patch | 32 +++++ x11-misc/sddm/sddm-0.20.0-r1.ebuild | 136 +++++++++++++++++++++ 4 files changed, 221 insertions(+) diff --git a/x11-misc/sddm/files/sddm-0.20.0-dbus-policy-in-usr.patch b/x11-misc/sddm/files/sddm-0.20.0-dbus-policy-in-usr.patch new file mode 100644 index 000000000000..8926b8400430 --- /dev/null +++ b/x11-misc/sddm/files/sddm-0.20.0-dbus-policy-in-usr.patch @@ -0,0 +1,29 @@ +From 0823810ed1683e6dcb7d687795764e11ddb6ff8a Mon Sep 17 00:00:00 2001 +From: Gioele Barabucci +Date: Sun, 16 Jul 2023 11:51:08 +0200 +Subject: [PATCH] CMakeLists.txt: Install dbus policy in /usr/share, not /etc + +From https://bugs.debian.org/1006631: + +> dbus supports policy files in both `/usr/share/dbus-1/system.d` and +> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially +> deprecates installing packages' default policies into `/etc/dbus-1/systemd`, +> instead reserving it for the sysadmin. This is the same idea as the +> difference between `/usr/lib/udev/rules.d` and `/etc/udev/rules.d`. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 72c4086bb..44956e52d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,7 +181,7 @@ endif() + + # Set constants + set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm" CACHE PATH "System application data install directory") +-set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d" CACHE PATH "DBus config files directory") ++set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/system.d" CACHE PATH "DBus config files directory") + set(STATE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/sddm" CACHE PATH "State directory") + set(RUNTIME_DIR "${RUNTIME_DIR_DEFAULT}" CACHE PATH "Runtime data storage directory") + set(QML_INSTALL_DIR "${QT_IMPORTS_DIR}" CACHE PATH "QML component installation directory") diff --git a/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch b/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch new file mode 100644 index 000000000000..57d138875bea --- /dev/null +++ b/x11-misc/sddm/files/sddm-0.20.0-greeter-platform-detection.patch @@ -0,0 +1,24 @@ +From e27b70957505dc7b986ab2fa68219af546c63344 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 30 Jun 2023 09:42:58 +0200 +Subject: [PATCH] greeter: Look at WAYLAND_DISPLAY for platform detection + +When running sddm-greeter manually in a wayland session, it otherwise +misdetects that as xcb. +--- + src/greeter/GreeterApp.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp +index c2978d67e..4e4f65301 100644 +--- a/src/greeter/GreeterApp.cpp ++++ b/src/greeter/GreeterApp.cpp +@@ -319,7 +319,7 @@ int main(int argc, char **argv) + platform = QString::fromUtf8(qgetenv("QT_QPA_PLATFORM")); + } + if (platform.isEmpty()) { +- platform = QStringLiteral("xcb"); ++ platform = qEnvironmentVariableIsSet("WAYLAND_DISPLAY") ? QStringLiteral("wayland") : QStringLiteral("xcb"); + } + + // Install message handler diff --git a/x11-misc/sddm/files/sddm-0.20.0-no-qtvirtualkeyboard-on-wayland.patch b/x11-misc/sddm/files/sddm-0.20.0-no-qtvirtualkeyboard-on-wayland.patch new file mode 100644 index 000000000000..0081f3d4e8a3 --- /dev/null +++ b/x11-misc/sddm/files/sddm-0.20.0-no-qtvirtualkeyboard-on-wayland.patch @@ -0,0 +1,32 @@ +From 07631f2ef00a52d883d0fd47ff7d1e1a6bc6358f Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 30 Jun 2023 09:44:37 +0200 +Subject: [PATCH] Ignore InputMethod=qtvirtualkeyboard on wayland + +Using QT_IM_MODULE=qtvirtualkeyboard in wayland client applications is not +supported by Qt, but is sddm's builtin default. Avoid setting that. +--- + src/greeter/GreeterApp.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp +index 4e4f65301..01613cc66 100644 +--- a/src/greeter/GreeterApp.cpp ++++ b/src/greeter/GreeterApp.cpp +@@ -351,8 +351,14 @@ int main(int argc, char **argv) + qputenv("KDE_DEBUG", "1"); + + // Qt IM module +- if (!SDDM::mainConfig.InputMethod.get().isEmpty()) +- qputenv("QT_IM_MODULE", SDDM::mainConfig.InputMethod.get().toLocal8Bit().constData()); ++ QString inputMethod = SDDM::mainConfig.InputMethod.get(); ++ // Using qtvirtualkeyboard as IM on wayland doesn't really work, ++ // it has to be done by the compositor instead. ++ if (platform.startsWith(QStringLiteral("wayland")) && inputMethod == QStringLiteral("qtvirtualkeyboard")) ++ inputMethod = QString{}; ++ ++ if (!inputMethod.isEmpty()) ++ qputenv("QT_IM_MODULE", inputMethod.toLocal8Bit()); + + QGuiApplication app(argc, argv); + SDDM::SignalHandler s; diff --git a/x11-misc/sddm/sddm-0.20.0-r1.ebuild b/x11-misc/sddm/sddm-0.20.0-r1.ebuild new file mode 100644 index 000000000000..63babd63cc42 --- /dev/null +++ b/x11-misc/sddm/sddm-0.20.0-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +QTMIN=5.15.2 +inherit cmake linux-info optfeature systemd tmpfiles + +DESCRIPTION="Simple Desktop Display Manager" +HOMEPAGE="https://github.com/sddm/sddm" + +LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain" +SLOT="0" +IUSE="+elogind systemd test" + +REQUIRED_USE="^^ ( elogind systemd )" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + acct-group/sddm + acct-user/sddm + >=dev-qt/qtcore-${QTMIN}:5 + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + sys-libs/pam + x11-libs/libXau + x11-libs/libxcb:= + elogind? ( sys-auth/elogind[pam] ) + systemd? ( sys-apps/systemd:=[pam] ) + !systemd? ( sys-power/upower ) +" +DEPEND="${COMMON_DEPEND} + test? ( >=dev-qt/qttest-${QTMIN}:5 ) +" +RDEPEND="${COMMON_DEPEND} + x11-base/xorg-server + !systemd? ( gui-libs/display-manager-init ) +" +BDEPEND=" + dev-python/docutils + >=dev-qt/linguist-tools-${QTMIN}:5 + kde-frameworks/extra-cmake-modules:5 + virtual/pkgconfig +" + +PATCHES=( + # Downstream patches + "${FILESDIR}/${P}-respect-user-flags.patch" + "${FILESDIR}/${PN}-0.18.1-Xsession.patch" # bug 611210 + "${FILESDIR}/${P}-sddm.pam-use-substack.patch" # bug 728550 + "${FILESDIR}/${P}-disable-etc-debian-check.patch" + "${FILESDIR}/${P}-no-default-pam_systemd-module.patch" # bug 669980 + # git master + "${FILESDIR}/${P}-fix-use-development-sessions.patch" + "${FILESDIR}/${P}-greeter-platform-detection.patch" + "${FILESDIR}/${P}-no-qtvirtualkeyboard-on-wayland.patch" + "${FILESDIR}/${P}-dbus-policy-in-usr.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~DRM" + use kernel_linux && linux-info_pkg_setup +} + +src_prepare() { + touch 01gentoo.conf || die + +cat <<-EOF >> 01gentoo.conf +[General] +# Remove qtvirtualkeyboard as InputMethod default +InputMethod= +EOF + + cmake_src_prepare + + if ! use test; then + sed -e "/^find_package/s/ Test//" -i CMakeLists.txt || die + cmake_comment_add_subdirectory test + fi +} + +src_configure() { + local mycmakeargs=( + -DBUILD_MAN_PAGES=ON + -DDBUS_CONFIG_FILENAME="org.freedesktop.sddm.conf" + -DRUNTIME_DIR=/run/sddm + -DSYSTEMD_TMPFILES_DIR="/usr/lib/tmpfiles.d" + -DNO_SYSTEMD=$(usex !systemd) + -DUSE_ELOGIND=$(usex elogind) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /etc/sddm.conf.d/ + doins "${S}"/01gentoo.conf +} + +pkg_postinst() { + tmpfiles_process "${PN}.conf" + + elog "NOTE: If SDDM startup appears to hang then entropy pool is too low." + elog "This can be fixed by configuring one of the following:" + elog " - Enable CONFIG_RANDOM_TRUST_CPU in linux kernel" + elog " - # emerge sys-apps/haveged && rc-update add haveged boot" + elog " - # emerge sys-apps/rng-tools && rc-update add rngd boot" + elog + elog "SDDM example config can be shown with:" + elog " ${EROOT}/usr/bin/sddm --example-config" + elog "Use ${EROOT}/etc/sddm.conf.d/ directory to override specific options." + elog + elog "For more information on how to configure SDDM, please visit the wiki:" + elog " https://wiki.gentoo.org/wiki/SDDM" + if has_version x11-drivers/nvidia-drivers; then + elog + elog " Nvidia GPU owners in particular should pay attention" + elog " to the troubleshooting section." + fi + + optfeature "Weston DisplayServer support (EXPERIMENTAL)" dev-libs/weston + optfeature "KWin DisplayServer support (EXPERIMENTAL)" kde-plasma/kwin + + systemd_reenable sddm.service +}