public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/sddm/files/, x11-misc/sddm/
Date: Fri, 21 Mar 2025 22:39:32 +0000 (UTC)	[thread overview]
Message-ID: <1742596726.98be0495bca2ce6635610f9430e83a92b29468b2.asturm@gentoo> (raw)

commit:     98be0495bca2ce6635610f9430e83a92b29468b2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 21 22:13:02 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 21 22:38:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98be0495

x11-misc/sddm: add 0.21.0_p20250310

Rebase Xsession patch for upstream commit c220e921.
Add suse patch for setting XAUTHLOCALHOSTNAME, maybe helps bug 913862

Bug: https://bugs.gentoo.org/913862
Closes: https://bugs.gentoo.org/951326
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 x11-misc/sddm/Manifest                             |   1 +
 .../sddm-0.21.0_p20250310-Xsession-xinitrc.patch   |  45 ++++++
 ...m-0.21.0_p20250310-set-XAUTHLOCALHOSTNAME.patch |  39 ++++++
 x11-misc/sddm/sddm-0.21.0_p20250310.ebuild         | 151 +++++++++++++++++++++
 4 files changed, 236 insertions(+)

diff --git a/x11-misc/sddm/Manifest b/x11-misc/sddm/Manifest
index 7ae0a7e2576a..6c383741c8bb 100644
--- a/x11-misc/sddm/Manifest
+++ b/x11-misc/sddm/Manifest
@@ -1,2 +1,3 @@
 DIST sddm-0.21.0-pam.tar.xz 676 BLAKE2B 06a79f74a5833eca9877df4be8639311382d13061b21aa3627e6c4b07725878ded62221fca943440bacc143f6be2a23b2e0a2124012ff2c9fac82e1eded11144 SHA512 6d91eef2434346f7707122454522cf19f104994ac95d562417f6060a92b4e6c9792bebcccabac8290479200b4ba02fc4d92c6098c435c7ceda796d619d8913c2
 DIST sddm-0.21.0_p20240723.tar.gz 3557578 BLAKE2B b92feb20a39eaf34822b077fcb8b89a100ff65814f9b523b2a1a0ffd3592edf2e86fa8fbdfcd8b592756a0b4baf0b085e8c7b4ad2aaa2f08b90e25e580df9925 SHA512 1ea2f758099f86086aebf05a77b176227475c1eb9c21c77bc99b9bb5a2882ce087e020ae6a11585b793fe09a3567e0ea4d0c1632a5823b7be83e33882964de48
+DIST sddm-0.21.0_p20250310.tar.gz 3558305 BLAKE2B 82f2d81858ac3cadc3b2a202dc005ed71740eb5b39f45834bf0498ed2f279591c885900d43e29fc386dd590de0c780564fa0a79df6bda97ccbc1ea6ae5a30d63 SHA512 84176a760e61e298eb8f78703613e07aef06cff32d00da1a43c60d139b499453fc73e4c55f79ec4f1d13467cefe32edbad325293a05c640e5604af083be60d0f

diff --git a/x11-misc/sddm/files/sddm-0.21.0_p20250310-Xsession-xinitrc.patch b/x11-misc/sddm/files/sddm-0.21.0_p20250310-Xsession-xinitrc.patch
new file mode 100644
index 000000000000..027863ae3c45
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.21.0_p20250310-Xsession-xinitrc.patch
@@ -0,0 +1,45 @@
+From 4bc26513402454d158281c7804db33ad81757891 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 21 Oct 2017 14:44:59 +0200
+Subject: [PATCH] Pass Xsession arguments to xinitrc.d/80-dbus
+
+Thanks-to: Joakim Tjernlund <joakim.tjernlund@infinera.com>
+Bug: https://bugs.gentoo.org/611210
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ data/scripts/Xsession | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/data/scripts/Xsession b/data/scripts/Xsession
+index 235a671..0846265 100755
+--- a/data/scripts/Xsession
++++ b/data/scripts/Xsession
+@@ -34,6 +34,10 @@ if [ -z "$SDDM_XSESSION_PROFILE_READ" ]; then
+ fi
+ unset SDDM_XSESSION_PROFILE_READ
+ 
++# Make D-Bus start properly, see:
++# /etc/X11/xinit/xinitrc.d/80-dbus
++command="$@"
++
+ [ -f /etc/xprofile ] && . /etc/xprofile
+ [ -f /usr/local/etc/xprofile ] && . /usr/local/etc/xprofile
+ [ -f $HOME/.xprofile ] && . $HOME/.xprofile
+@@ -82,12 +86,12 @@ if [ -f "$USERXSESSION" ]; then
+   . "$USERXSESSION"
+ fi
+ 
+-if [ -z "$*" ]; then
++if [ -z "$command" ]; then
+     exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+     exit 1
+ fi
+ 
+ # Note: This script is called with the whole session commandline as a single first argument.
+ # To run it properly, word splitting has to be performed by the shell, i.e. $@ or $0 without quotes.
+-exec $@
++exec $command
+ exit 1
+-- 
+2.49.0
+

diff --git a/x11-misc/sddm/files/sddm-0.21.0_p20250310-set-XAUTHLOCALHOSTNAME.patch b/x11-misc/sddm/files/sddm-0.21.0_p20250310-set-XAUTHLOCALHOSTNAME.patch
new file mode 100644
index 000000000000..674c38bfdf9c
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.21.0_p20250310-set-XAUTHLOCALHOSTNAME.patch
@@ -0,0 +1,39 @@
+From 39d30f19ac7948eb5e9ab2ef0f219ae770644f55 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Sat, 24 Oct 2020 13:57:05 +0200
+Subject: [PATCH] Set XAUTHLOCALHOSTNAME in sessions
+
+While FamilyWild avoids that hostname changes break xauth, this doesn't help
+with Xtrans (used for ICE). Xtrans always uses the current host name for
+setting $SESSION_MANAGER and for a successful connection this has to match
+the current hostname (or $XAUTHLOCALHOSTNAME, see p_xauth.diff in xtrans)
+on client connection attempts as well. By setting XAUTHLOCALHOSTNAME here,
+it's likely that it equals the hostname set by the session manager later
+(e.g. ksmserver).
+---
+ src/helper/Backend.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/helper/Backend.cpp b/src/helper/Backend.cpp
+index 91ca211..1b0bb6f 100644
+--- a/src/helper/Backend.cpp
++++ b/src/helper/Backend.cpp
+@@ -27,6 +27,7 @@
+ #include "UserSession.h"
+ 
+ #include <QtCore/QProcessEnvironment>
++#include <QtNetwork/QHostInfo>
+ 
+ #include <pwd.h>
+ 
+@@ -73,6 +74,7 @@ namespace SDDM {
+             env.insert(QStringLiteral("SHELL"), QString::fromLocal8Bit(pw->pw_shell));
+             env.insert(QStringLiteral("USER"), QString::fromLocal8Bit(pw->pw_name));
+             env.insert(QStringLiteral("LOGNAME"), QString::fromLocal8Bit(pw->pw_name));
++            env.insert(QStringLiteral("XAUTHLOCALHOSTNAME"), QHostInfo::localHostName());
+ #if defined(Q_OS_FREEBSD)
+         /* get additional environment variables via setclassenvironment();
+             this needs to be done here instead of in UserSession::setupChildProcess
+-- 
+2.39.1
+

diff --git a/x11-misc/sddm/sddm-0.21.0_p20250310.ebuild b/x11-misc/sddm/sddm-0.21.0_p20250310.ebuild
new file mode 100644
index 000000000000..65732e1edbf5
--- /dev/null
+++ b/x11-misc/sddm/sddm-0.21.0_p20250310.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PAM_TAR="${PN}-0.21.0-pam"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+else
+	COMMIT=e505a38c241677c3b3c8f4bdaf65249d452f05e3
+	SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/${PN}-${COMMIT}"
+	KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+fi
+
+QTMIN=6.7.2
+inherit cmake linux-info optfeature pam systemd tmpfiles
+
+DESCRIPTION="Simple Desktop Display Manager"
+HOMEPAGE="https://github.com/sddm/sddm"
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PAM_TAR}.tar.xz"
+
+LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain"
+SLOT="0"
+IUSE="+elogind systemd test +X"
+
+REQUIRED_USE="^^ ( elogind systemd )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	acct-group/sddm
+	acct-user/sddm
+	>=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network]
+	>=dev-qt/qtdeclarative-${QTMIN}:6
+	sys-libs/pam
+	x11-libs/libXau
+	x11-libs/libxcb:=
+	elogind? (
+		sys-auth/elogind[pam]
+		sys-power/upower
+	)
+	systemd? ( sys-apps/systemd:=[pam] )
+"
+RDEPEND="${DEPEND}
+	X? ( x11-base/xorg-server )
+	!systemd? ( gui-libs/display-manager-init )
+"
+BDEPEND="
+	dev-python/docutils
+	>=dev-build/cmake-3.25.0
+	>=dev-qt/qttools-${QTMIN}[linguist]
+	kde-frameworks/extra-cmake-modules:0
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	# Downstream patches
+	"${FILESDIR}/${PN}-0.20.0-respect-user-flags.patch"
+	"${FILESDIR}/${P}-Xsession-xinitrc.patch" # bug 611210
+	"${FILESDIR}/${P}-set-XAUTHLOCALHOSTNAME.patch" # bug 913862, thx opensuse
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="~DRM"
+	use kernel_linux && linux-info_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+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
+
+	if use systemd; then
+		sed -e "/pam_elogind.so/s/elogind/systemd/" \
+			-i "${WORKDIR}"/${PAM_TAR}/${PN}-greeter.pam || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_MAN_PAGES=ON
+		-DBUILD_WITH_QT6=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
+
+	# with systemd logs are sent to journald, so no point to bother in that case
+	if ! use systemd; then
+		insinto /etc/logrotate.d
+		newins "${FILESDIR}/sddm.logrotate" sddm
+	fi
+
+	newpamd "${WORKDIR}"/${PAM_TAR}/${PN}.pam ${PN}
+	newpamd "${WORKDIR}"/${PAM_TAR}/${PN}-autologin.pam ${PN}-autologin
+	newpamd "${WORKDIR}"/${PAM_TAR}/${PN}-greeter.pam ${PN}-greeter
+}
+
+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[kiosk]"
+	optfeature "KWin DisplayServer support (EXPERIMENTAL)" "kde-plasma/kwin"
+
+	systemd_reenable sddm.service
+}


             reply	other threads:[~2025-03-21 22:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 22:39 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-09  0:16 [gentoo-commits] repo/gentoo:master commit in: x11-misc/sddm/files/, x11-misc/sddm/ Andreas Sturmlechner
2023-06-18 18:53 Andreas Sturmlechner
2021-08-25 14:36 Andreas Sturmlechner
2019-06-23 14:55 Andreas Sturmlechner
2018-11-13 21:30 Andreas Sturmlechner
2018-07-22 11:21 Andreas Sturmlechner
2017-03-25  2:49 Michael Palimaka
2016-12-23 16:42 Johannes Huber
2016-08-28 12:58 Manuel Rüger
2016-05-05 17:07 Michael Palimaka
2016-03-02 19:23 Michael Palimaka
2015-10-17 10:08 Jauhien Piatlicki
2015-10-16 20:08 Jauhien Piatlicki
2015-09-09 20:39 Jauhien Piatlicki

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

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

  git send-email \
    --in-reply-to=1742596726.98be0495bca2ce6635610f9430e83a92b29468b2.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox