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/, x11-misc/sddm/files/
Date: Tue, 27 Jun 2023 11:25:56 +0000 (UTC)	[thread overview]
Message-ID: <1687865140.94c6fa3154bbae2d4a906d9ee4f105fc62320702.asturm@gentoo> (raw)

commit:     94c6fa3154bbae2d4a906d9ee4f105fc62320702
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 15:51:27 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 11:25:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94c6fa31

x11-misc/sddm: add 0.20.0

See also:
https://github.com/sddm/sddm/releases/tag/v0.20.0

This is adding back RDEPEND=x11-base/xorg-server for two reasons:
- X11 is the default DisplayServer, with all other options EXPERIMENTAL
- every other distro still depends on it, probably for that reason

Closes: https://bugs.gentoo.org/669980
Bug: https://bugs.gentoo.org/728550
Closes: https://bugs.gentoo.org/790713
Closes: https://bugs.gentoo.org/907069
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 x11-misc/sddm/Manifest                             |   1 +
 .../sddm-0.20.0-fix-use-development-sessions.patch |  83 +++++++++++++
 x11-misc/sddm/sddm-0.20.0.ebuild                   | 132 +++++++++++++++++++++
 3 files changed, 216 insertions(+)

diff --git a/x11-misc/sddm/Manifest b/x11-misc/sddm/Manifest
index 4145f4344c73..09b732679e91 100644
--- a/x11-misc/sddm/Manifest
+++ b/x11-misc/sddm/Manifest
@@ -1,2 +1,3 @@
 DIST sddm-0.18.1.tar.xz 3402972 BLAKE2B 99ab43d374e9a3d318f692a6d496d8a6d68927af3c8e8fc2208d7355ec90649a14758b39f5733dd32f942ed569de88085576d4f5f8666f4f97079e0fb6dcb99e SHA512 ff0637600cda2f4da1f643f047f8ee822bd9651ae4ccbb614b9804175c97360ada7af93e07a7b63832f014ef6e7d1b5380ab2b8959f8024ea520fa5ff17efd60
 DIST sddm-0.19.0_p20230608.tar.gz 3553104 BLAKE2B 41622866f28f9a2aee3b1f6f02f66271d8fe762da71d2215bb6b4b87418504ce321db81625a6cfab099bdaa395da1bf4153a65e795612e745546c2a42e97f270 SHA512 76a591a41d3f171c6c3ec5d57837d3061f3dd094ec1e08003f0bacd90c061613505c899ce0b86c7bd4c5f8c346f7bb15f9cd574377dcece123a756329a805562
+DIST sddm-0.20.0.tar.gz 3552722 BLAKE2B 8086c9555d5ce1598db3279353de077d51adbcc5222a929750e8558a1bcdad395a411f90608bffdc6e1ca7e7ac2b8325e25cf04cbf8476698d787ce7e60c2105 SHA512 0f64b405f1451873a01a2210530feb6f4cbbdea17be9d039c105088963a48322968db7b60c0d20ac5d97c8ec2a19e5130f0a74c0f9de58c61453d8ce8bb6272a

diff --git a/x11-misc/sddm/files/sddm-0.20.0-fix-use-development-sessions.patch b/x11-misc/sddm/files/sddm-0.20.0-fix-use-development-sessions.patch
new file mode 100644
index 000000000000..3213828181ca
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.20.0-fix-use-development-sessions.patch
@@ -0,0 +1,83 @@
+From 5b702ae986464fe6dbc8557d4b2da725ac1ed175 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fvogt@suse.de>
+Date: Mon, 26 Jun 2023 09:52:05 +0200
+Subject: [PATCH] Session: Parse .desktop files manually again
+
+Using QSettings::IniFormat doesn't quite work. Implement a custom parser
+for those files to handle them according to the specification.
+
+Fixes #1745
+---
+ src/common/Session.cpp | 52 +++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 51 insertions(+), 1 deletion(-)
+
+diff --git a/src/common/Session.cpp b/src/common/Session.cpp
+index 4bb2142ca..5eec64859 100644
+--- a/src/common/Session.cpp
++++ b/src/common/Session.cpp
+@@ -34,6 +34,56 @@
+ const QString s_entryExtention = QStringLiteral(".desktop");
+ 
+ namespace SDDM {
++    // QSettings::IniFormat can't be used to read .desktop files due to different
++    // syntax of values (escape sequences, quoting, automatic QStringList detection).
++    // So implement yet another .desktop file parser.
++    class DesktopFileFormat {
++        static bool readFunc(QIODevice &device, QSettings::SettingsMap &map)
++        {
++            QString currentSectionName;
++            while(!device.atEnd())
++            {
++                // Iterate each line, remove line terminators
++                const auto line = device.readLine().replace("\r", "").replace("\n", "");
++                if(line.isEmpty() || line.startsWith('#'))
++                    continue; // Ignore empty lines and comments
++
++                if(line.startsWith('[')) // Section header
++                {
++                    // Remove [ and ].
++                    currentSectionName = QString::fromUtf8(line.mid(1, line.length() - 2));
++                }
++                else if(int equalsPos = line.indexOf('='); equalsPos > 0) // Key=Value
++                {
++                    const auto key = QString::fromUtf8(line.left(equalsPos));
++
++                    // Read the value, handle escape sequences
++                    auto valueBytes = line.mid(equalsPos + 1);
++                    valueBytes.replace("\\s", " ").replace("\\n", "\n");
++                    valueBytes.replace("\\t", "\t").replace("\\r", "\r");
++                    valueBytes.replace("\\\\", "\\");
++
++                    auto value = QString::fromUtf8(valueBytes);
++                    map.insert(currentSectionName + QLatin1Char('/') + key, value);
++                }
++            }
++
++            return true;
++        }
++    public:
++        // Register the .desktop file format if necessary, return its id.
++        static QSettings::Format format()
++        {
++            static QSettings::Format s_format = QSettings::InvalidFormat;
++            if (s_format == QSettings::InvalidFormat)
++                s_format = QSettings::registerFormat(QStringLiteral("desktop"),
++                                                     DesktopFileFormat::readFunc, nullptr,
++                                                     Qt::CaseSensitive);
++
++            return s_format;
++        }
++    };
++
+     Session::Session()
+         : m_valid(false)
+         , m_type(UnknownSession)
+@@ -169,7 +219,7 @@ namespace SDDM {
+         if (!file.isOpen())
+             return;
+ 
+-        QSettings settings(m_fileName, QSettings::IniFormat);
++        QSettings settings(m_fileName, DesktopFileFormat::format());
+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+         settings.setIniCodec("UTF-8");
+ #endif

diff --git a/x11-misc/sddm/sddm-0.20.0.ebuild b/x11-misc/sddm/sddm-0.20.0.ebuild
new file mode 100644
index 000000000000..7d246cd0dea3
--- /dev/null
+++ b/x11-misc/sddm/sddm-0.20.0.ebuild
@@ -0,0 +1,132 @@
+# 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
+	"${FILESDIR}/${P}-fix-use-development-sessions.patch" # git master
+)
+
+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
+}


             reply	other threads:[~2023-06-27 11:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 11:25 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-09 20:02 [gentoo-commits] repo/gentoo:master commit in: x11-misc/sddm/, x11-misc/sddm/files/ Andreas Sturmlechner
2024-03-09  0:16 Andreas Sturmlechner
2024-03-08 22:59 Andreas Sturmlechner
2024-02-27 12:11 Andreas Sturmlechner
2023-09-02 18:01 Andreas Sturmlechner
2022-11-24 21:05 Andreas Sturmlechner
2022-04-02 12:38 Andreas Sturmlechner
2022-04-01 14:48 Andreas Sturmlechner
2022-04-01 14:48 Andreas Sturmlechner
2022-04-01 14:48 Andreas Sturmlechner
2020-10-06 18:20 Mikle Kolyada
2020-06-20 15:42 Mikle Kolyada
2018-06-06 10:14 Andreas Sturmlechner
2018-05-27 21:34 Andreas Sturmlechner
2018-04-05 15:55 Andreas Sturmlechner
2017-10-21 19:45 Andreas Sturmlechner
2017-10-21 19:45 Andreas Sturmlechner
2017-10-14  4:26 Michael Palimaka
2017-09-02 15:07 Andreas Sturmlechner
2017-08-15  9:21 Lars Wendler
2016-01-30 13:07 Michael Palimaka
2015-09-09 21:18 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=1687865140.94c6fa3154bbae2d4a906d9ee4f105fc62320702.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