summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-30 10:18:38 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-30 10:18:38 +0000
commit74ffee7b05caac2acf8b49d86c13c3c5b48c9139 (patch)
tree00a77e6fcfe3efb2e12d322e459d383ff4235ca0
parent9d7618e19c90c175bfc95b3599a1aa148ae9714c (diff)
x11-misc/sddm : revision bump
-rw-r--r--metadata/md5-cache/x11-misc/sddm-0.18.1-r10 (renamed from metadata/md5-cache/x11-misc/sddm-0.18.1-r100)8
-rw-r--r--metadata/pkg_desc_index2
-rw-r--r--x11-misc/sddm/files/sddm-0.18.1-cve-2020-28049.patch94
-rw-r--r--x11-misc/sddm/files/sddm-0.18.1-drop-wayland-suffix.patch28
-rw-r--r--x11-misc/sddm/files/sddm-0.18.1-fix-qt-5.15.7.patch33
-rw-r--r--x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch46
-rw-r--r--x11-misc/sddm/files/sddm.tmpfiles1
-rw-r--r--x11-misc/sddm/sddm-0.18.1-r10.ebuild (renamed from x11-misc/sddm/sddm-0.18.1-r100.ebuild)11
8 files changed, 213 insertions, 10 deletions
diff --git a/metadata/md5-cache/x11-misc/sddm-0.18.1-r100 b/metadata/md5-cache/x11-misc/sddm-0.18.1-r10
index 99aaea37..f28bf3f6 100644
--- a/metadata/md5-cache/x11-misc/sddm-0.18.1-r100
+++ b/metadata/md5-cache/x11-misc/sddm-0.18.1-r10
@@ -4,14 +4,14 @@ DEPEND=acct-group/sddm acct-user/sddm >=dev-qt/qtcore-5.9.4:5 >=dev-qt/qtdbus-5.
DESCRIPTION=Simple Desktop Display Manager
EAPI=7
HOMEPAGE=https://github.com/sddm/sddm
-INHERIT=cmake plocale systemd user
+INHERIT=cmake plocale systemd user tmpfiles
IUSE=+branding consolekit elogind +pam systemd test
KEYWORDS=~amd64 ~arm ~arm64 ~ppc64 ~x86
LICENSE=GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain
-RDEPEND=acct-group/sddm acct-user/sddm >=dev-qt/qtcore-5.9.4:5 >=dev-qt/qtdbus-5.9.4:5 >=dev-qt/qtdeclarative-5.9.4:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtnetwork-5.9.4:5 >=x11-base/xorg-server-1.15.1 x11-libs/libxcb[xkb] branding? ( x11-themes/redcore-theme-sddm ) consolekit? ( >=sys-auth/consolekit-0.9.4 ) elogind? ( sys-auth/elogind ) pam? ( sys-libs/pam ) systemd? ( sys-apps/systemd:= ) !systemd? ( sys-power/upower )
+RDEPEND=acct-group/sddm acct-user/sddm >=dev-qt/qtcore-5.9.4:5 >=dev-qt/qtdbus-5.9.4:5 >=dev-qt/qtdeclarative-5.9.4:5 >=dev-qt/qtgui-5.9.4:5 >=dev-qt/qtnetwork-5.9.4:5 >=x11-base/xorg-server-1.15.1 x11-libs/libxcb[xkb] branding? ( x11-themes/redcore-theme-sddm ) consolekit? ( >=sys-auth/consolekit-0.9.4 ) elogind? ( sys-auth/elogind ) pam? ( sys-libs/pam ) systemd? ( sys-apps/systemd:= ) !systemd? ( sys-power/upower ) virtual/tmpfiles
REQUIRED_USE=?? ( elogind systemd )
RESTRICT=!test? ( test )
SLOT=0
SRC_URI=https://github.com/sddm/sddm/releases/download/v0.18.1/sddm-0.18.1.tar.xz
-_eclasses_=cmake 44afbf15c35884f7c840470f1cf05d0d edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 8f942ebdcf04334697649d4a0bf65a32 flag-o-matic 29a755b1291d64133634d80b0328f153 multilib 5ca4e49abed8e3a2f7b56920eadee157 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils 8ed38f92fe095be374d6c4c8d4c0dda7 plocale 7ce00136a77130df46fbbd5966f98a61 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 systemd 5f4bb0758df2e483babf68cd517078ca toolchain-funcs 441f754fd75cd4fd1fa06fbc17da6144 user ee8b59cbe68b390f981e3ee247ed908f user-info 69a1ed744ec33cf2c910ff2bd6084d11 wrapper 4a1902f969e5718126434fc35f3a0d9c xdg-utils ac0e315a3688929e34ac75b139e7349a
-_md5_=d5b866bb2f51557072cf044e949a02e8
+_eclasses_=cmake 44afbf15c35884f7c840470f1cf05d0d edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 8f942ebdcf04334697649d4a0bf65a32 flag-o-matic 29a755b1291d64133634d80b0328f153 multilib 5ca4e49abed8e3a2f7b56920eadee157 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils 8ed38f92fe095be374d6c4c8d4c0dda7 plocale 7ce00136a77130df46fbbd5966f98a61 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 systemd 5f4bb0758df2e483babf68cd517078ca tmpfiles 216aa76c3a6fcb5d893c23a0de86048f toolchain-funcs 441f754fd75cd4fd1fa06fbc17da6144 user ee8b59cbe68b390f981e3ee247ed908f user-info 69a1ed744ec33cf2c910ff2bd6084d11 wrapper 4a1902f969e5718126434fc35f3a0d9c xdg-utils ac0e315a3688929e34ac75b139e7349a
+_md5_=d7dd6a588c4560287c19718f86b073ab
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index
index 7b8fe880..52fdf034 100644
--- a/metadata/pkg_desc_index
+++ b/metadata/pkg_desc_index
@@ -87,7 +87,7 @@ x11-libs/libX11 1.8.1-r1: X.Org X11 library
x11-misc/nvidia-prime 314: NVIDIA Prime Render Offload configuration and utilities
x11-misc/nvidia-settings 390.154 470.141.03-r2 515.65.01: NVIDIA Linux X11 Settings Utility
x11-misc/pcmanfm-qt-share 1337: PCManFM-QT custom action to share folder using Samba
-x11-misc/sddm 0.18.1-r100: Simple Desktop Display Manager
+x11-misc/sddm 0.18.1-r10: Simple Desktop Display Manager
x11-themes/material-icon-theme 1.314.1337: Icon theme following the Google's material design specifications
x11-themes/redcore-artwork-calamares 1.314.1337: Redcore Linux branding component for Calamares
x11-themes/redcore-artwork-community 1.314.1337: Redcore Linux Community Wallpapers
diff --git a/x11-misc/sddm/files/sddm-0.18.1-cve-2020-28049.patch b/x11-misc/sddm/files/sddm-0.18.1-cve-2020-28049.patch
new file mode 100644
index 00000000..8209c073
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.18.1-cve-2020-28049.patch
@@ -0,0 +1,94 @@
+From be202f533ab98a684c6a007e8d5b4357846bc222 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Tue, 6 Oct 2020 21:21:38 +0200
+Subject: [PATCH] Fix X not having access control on startup
+
+If the auth file is empty, X allows any local application (= any user on the
+system) to connect. This is currently the case until X wrote the display
+number to sddm and sddm used that to write the entry into the file.
+To work around this chicken-and-egg problem, make use of the fact that X
+doesn't actually look at the display number in the passed auth file and just
+use :0 unconditionally. Also make sure that writing the entry was actually
+successful.
+
+CVE-2020-28049
+---
+ src/daemon/XorgDisplayServer.cpp | 25 ++++++++++++++++++++-----
+ src/daemon/XorgDisplayServer.h | 2 +-
+ 2 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
+index d04f6344..df685b2d 100644
+--- a/src/daemon/XorgDisplayServer.cpp
++++ b/src/daemon/XorgDisplayServer.cpp
+@@ -88,7 +88,7 @@ namespace SDDM {
+ return m_cookie;
+ }
+
+- void XorgDisplayServer::addCookie(const QString &file) {
++ bool XorgDisplayServer::addCookie(const QString &file) {
+ // log message
+ qDebug() << "Adding cookie to" << file;
+
+@@ -104,13 +104,13 @@ namespace SDDM {
+
+ // check file
+ if (!fp)
+- return;
++ return false;
+ fprintf(fp, "remove %s\n", qPrintable(m_display));
+ fprintf(fp, "add %s . %s\n", qPrintable(m_display), qPrintable(m_cookie));
+ fprintf(fp, "exit\n");
+
+ // close pipe
+- pclose(fp);
++ return pclose(fp) == 0;
+ }
+
+ bool XorgDisplayServer::start() {
+@@ -127,6 +127,15 @@ namespace SDDM {
+ // log message
+ qDebug() << "Display server starting...";
+
++ // generate auth file.
++ // For the X server's copy, the display number doesn't matter.
++ // An empty file would result in no access control!
++ m_display = QStringLiteral(":0");
++ if(!addCookie(m_authPath)) {
++ qCritical() << "Failed to write xauth file";
++ return false;
++ }
++
+ if (daemonApp->testing()) {
+ QStringList args;
+ QDir x11socketDir(QStringLiteral("/tmp/.X11-unix"));
+@@ -217,8 +226,14 @@ namespace SDDM {
+ emit started();
+ }
+
+- // generate auth file
+- addCookie(m_authPath);
++ // The file is also used by the greeter, which does care about the
++ // display number. Write the proper entry, if it's different.
++ if(m_display != QStringLiteral(":0")) {
++ if(!addCookie(m_authPath)) {
++ qCritical() << "Failed to write xauth file";
++ return false;
++ }
++ }
+ changeOwner(m_authPath);
+
+ // set flag
+diff --git a/src/daemon/XorgDisplayServer.h b/src/daemon/XorgDisplayServer.h
+index d2bdf6d4..e97a0b53 100644
+--- a/src/daemon/XorgDisplayServer.h
++++ b/src/daemon/XorgDisplayServer.h
+@@ -40,7 +40,7 @@ namespace SDDM {
+
+ const QString &cookie() const;
+
+- void addCookie(const QString &file);
++ bool addCookie(const QString &file);
+
+ public slots:
+ bool start();
diff --git a/x11-misc/sddm/files/sddm-0.18.1-drop-wayland-suffix.patch b/x11-misc/sddm/files/sddm-0.18.1-drop-wayland-suffix.patch
new file mode 100644
index 00000000..70efa284
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.18.1-drop-wayland-suffix.patch
@@ -0,0 +1,28 @@
+From 9a440ba5917ff93c6a78726380c6267d91c13f19 Mon Sep 17 00:00:00 2001
+From: Alex <alex.shaw.as@gmail.com>
+Date: Mon, 30 Sep 2019 16:50:16 -0400
+Subject: [PATCH] Prevent duplicate session name.
+
+Several desktop sessions (e.g. KDE Plasma) already include the string " (Wayland)" in the session name. When this happens, the session name displayed to the user is "Plasma (Wayland) (Wayland)". This change makes it so that only "Plasma (Wayland)" will be displayed.
+
+(cherry picked from commit f9a0648ff3f841b68a07c139c3540b9e75bfd279)
+---
+ src/common/Session.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/common/Session.cpp b/src/common/Session.cpp
+index aa4dad3..923ecd4 100644
+--- a/src/common/Session.cpp
++++ b/src/common/Session.cpp
+@@ -169,7 +169,7 @@ namespace SDDM {
+
+ if (line.startsWith(QLatin1String("Name="))) {
+ if (type == WaylandSession)
+- m_displayName = QObject::tr("%1 (Wayland)").arg(line.mid(5));
++ m_displayName = QObject::tr("%1").arg(line.mid(5));
+ else
+ m_displayName = line.mid(5);
+ }
+--
+2.38.1
+
diff --git a/x11-misc/sddm/files/sddm-0.18.1-fix-qt-5.15.7.patch b/x11-misc/sddm/files/sddm-0.18.1-fix-qt-5.15.7.patch
new file mode 100644
index 00000000..65e9b857
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.18.1-fix-qt-5.15.7.patch
@@ -0,0 +1,33 @@
+From 5fe712d0e73c6263647bf306f40fbac94a52f4a6 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter@kde.org>
+Date: Mon, 24 Oct 2022 13:15:48 +0200
+Subject: disable automatic portal launching
+
+in Qt6 (and the KDE patch collection for Qt 5) genericunixservices will
+internally attempt to probe the portal tech early on in the app life
+cycle. this causes the protal system to launch app and then crash
+because we aren't actually providing a fully functional session. instead
+opt out of this altogether
+
+(cherry picked from commit fc24321541f6f65b7d1aac89cd82336ffd53e1a0)
+---
+ src/greeter/GreeterApp.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp
+index 4e117a7..a491f4d 100644
+--- a/src/greeter/GreeterApp.cpp
++++ b/src/greeter/GreeterApp.cpp
+@@ -318,6 +318,9 @@ int main(int argc, char **argv)
+ QSurfaceFormat::setDefaultFormat(format);
+ }
+
++ // Qt internally may load the xdg portal system early on, prevent this, we do not have a functional session running.
++ qputenv("QT_NO_XDG_DESKTOP_PORTAL", "1");
++
+ QGuiApplication app(argc, argv);
+
+ QCommandLineParser parser;
+--
+2.38.1
+
diff --git a/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch b/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch
new file mode 100644
index 00000000..ab2fc18c
--- /dev/null
+++ b/x11-misc/sddm/files/sddm-0.18.1-nvidia-glitches-vt-switch.patch
@@ -0,0 +1,46 @@
+From 76c11653522453efcf86f6f2f53bca1a497ea350 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Thu, 28 Mar 2019 11:43:37 +0000
+Subject: Enable QSurfaceFormat::ResetNotification on new Qt
+
+This fixes graphical glitches on nvidia after VT switching.
+
+It's opt-in as it requires code paths to handle glGetError differently.
+The version comparison is because my early implementations missed a code
+path. This was fixed in 5.12.2, but we may as well play safe
+
+(cherry picked from commit cd4e1fa21e1ab7178fa5d2ef858f3271575fd315)
+---
+ src/greeter/GreeterApp.cpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp
+index d47998e..4e117a7 100644
+--- a/src/greeter/GreeterApp.cpp
++++ b/src/greeter/GreeterApp.cpp
+@@ -40,6 +40,9 @@
+ #include <QDebug>
+ #include <QTimer>
+ #include <QTranslator>
++#include <QLibraryInfo>
++#include <QVersionNumber>
++#include <QSurfaceFormat>
+
+ #include <iostream>
+
+@@ -309,6 +312,12 @@ int main(int argc, char **argv)
+ qDebug() << "High-DPI autoscaling not Enabled";
+ }
+
++ if (QLibraryInfo::version() >= QVersionNumber(5, 13, 0)) {
++ auto format(QSurfaceFormat::defaultFormat());
++ format.setOption(QSurfaceFormat::ResetNotification);
++ QSurfaceFormat::setDefaultFormat(format);
++ }
++
+ QGuiApplication app(argc, argv);
+
+ QCommandLineParser parser;
+--
+2.38.1
+
diff --git a/x11-misc/sddm/files/sddm.tmpfiles b/x11-misc/sddm/files/sddm.tmpfiles
new file mode 100644
index 00000000..300d6461
--- /dev/null
+++ b/x11-misc/sddm/files/sddm.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/sddm 0755 sddm sddm
diff --git a/x11-misc/sddm/sddm-0.18.1-r100.ebuild b/x11-misc/sddm/sddm-0.18.1-r10.ebuild
index 8b0bf03d..a71a5ceb 100644
--- a/x11-misc/sddm/sddm-0.18.1-r100.ebuild
+++ b/x11-misc/sddm/sddm-0.18.1-r10.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PLOCALES="ar bn ca cs da de es et fi fr hi_IN hu is it ja kk ko lt lv nb nl nn pl pt_BR pt_PT ro ru sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv tr uk zh_CN zh_TW"
-inherit cmake plocale systemd user
+inherit cmake plocale systemd user tmpfiles
DESCRIPTION="Simple Desktop Display Manager"
HOMEPAGE="https://github.com/sddm/sddm"
@@ -49,16 +49,16 @@ PATCHES=(
"${FILESDIR}/${PN}-0.12.0-respect-user-flags.patch"
"${FILESDIR}/${PN}-0.18.0-Xsession.patch" # bug 611210
"${FILESDIR}/${PN}-0.18.0-sddmconfdir.patch"
- # fix for groups: https://github.com/sddm/sddm/issues/1159
"${FILESDIR}/${P}-revert-honor-PAM-supplemental-groups.patch"
"${FILESDIR}/${P}-honor-PAM-supplemental-groups-v2.patch"
- # fix for ReuseSession=true
"${FILESDIR}/${P}-only-reuse-online-sessions.patch"
- # TODO: fix properly
"${FILESDIR}/${PN}-0.16.0-ck2-revert.patch" # bug 633920
"${FILESDIR}/pam-1.4-substack.patch"
- # upstream git develop branch:
"${FILESDIR}/${P}-qt-5.15.2.patch"
+ "${FILESDIR}/${P}-cve-2020-28049.patch"
+ "${FILESDIR}/${P}-drop-wayland-suffix.patch"
+ "${FILESDIR}/${P}-fix-qt-5.15.7.patch"
+ "${FILESDIR}/${P}-nvidia-glitches-vt-switch.patch"
)
src_prepare() {
@@ -89,6 +89,7 @@ src_configure() {
src_install() {
cmake_src_install
+ newtmpfiles "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
# since 0.18.0 sddm no longer installs a config file
# install one ourselves in gentoo's default location