[neon/3rdparty/sddm/Neon/release] debian/patches: build with qt 5.15
Jonathan Esk-Riddell
null at kde.org
Tue Aug 23 17:11:27 BST 2022
Git commit 7a2ea287c911d67d8e7fff8d8b8b01e4be783cad by Jonathan Esk-Riddell.
Committed on 23/08/2022 at 16:08.
Pushed by jriddell into branch 'Neon/release'.
build with qt 5.15
A +189 -0 debian/patches/qt-5-15.diff
M +1 -0 debian/patches/series
M +9 -9 debian/patches/upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff
https://invent.kde.org/neon/3rdparty/sddm/commit/7a2ea287c911d67d8e7fff8d8b8b01e4be783cad
diff --git a/debian/patches/qt-5-15.diff b/debian/patches/qt-5-15.diff
new file mode 100644
index 0000000..d0a4773
--- /dev/null
+++ b/debian/patches/qt-5-15.diff
@@ -0,0 +1,189 @@
+commit 3eaa0d6ab1c7efc0bdd91fcd789d8187c6c27678
+Author: Aleix Pol <aleixpol at kde.org>
+Date: Thu Jun 24 12:34:13 2021 +0200
+
+ Bump to Qt 5.15, port away from deprecated APIs
+
+Index: sddm-0.19.0/CMakeLists.txt
+===================================================================
+--- sddm-0.19.0.orig/CMakeLists.txt
++++ sddm-0.19.0/CMakeLists.txt
+@@ -95,7 +95,7 @@ find_package(XCB REQUIRED)
+ find_package(XKB REQUIRED)
+
+ # Qt 5
+-find_package(Qt5 5.8.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test)
++find_package(Qt5 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test)
+
+ # find qt5 imports dir
+ get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
+Index: sddm-0.19.0/README.md
+===================================================================
+--- sddm-0.19.0.orig/README.md
++++ sddm-0.19.0/README.md
+@@ -39,7 +39,7 @@ money that can be used to support the fe
+
+ ## INSTALLATION
+
+-Qt >= 5.8.0 is required to use SDDM.
++Qt >= 5.15.0 is required to use SDDM.
+
+ SDDM runs the greeter as a system user named "sddm" whose home directory needs
+ to be set to `/var/lib/sddm`.
+Index: sddm-0.19.0/src/auth/Auth.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/auth/Auth.cpp
++++ sddm-0.19.0/src/auth/Auth.cpp
+@@ -132,7 +132,7 @@ namespace SDDM {
+ env.insert(QStringLiteral("LANG"), QStringLiteral("C"));
+ child->setProcessEnvironment(env);
+ connect(child, QOverload<int,QProcess::ExitStatus>::of(&QProcess::finished), this, &Auth::Private::childExited);
+- connect(child, QOverload<QProcess::ProcessError>::of(&QProcess::error), this, &Auth::Private::childError);
++ connect(child, &QProcess::errorOccurred, this, &Auth::Private::childError);
+ connect(request, &AuthRequest::finished, this, &Auth::Private::requestFinished);
+ connect(request, &AuthRequest::promptsChanged, parent, &Auth::requestChanged);
+ }
+@@ -252,8 +252,8 @@ namespace SDDM {
+ }
+
+ void Auth::registerTypes() {
+- qmlRegisterType<AuthPrompt>();
+- qmlRegisterType<AuthRequest>();
++ qmlRegisterAnonymousType<AuthPrompt>("Auth", 1);
++ qmlRegisterAnonymousType<AuthRequest>("Auth", 1);
+ qmlRegisterType<Auth>("Auth", 1, 0, "Auth");
+ }
+
+Index: sddm-0.19.0/src/auth/AuthRequest.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/auth/AuthRequest.cpp
++++ sddm-0.19.0/src/auth/AuthRequest.cpp
+@@ -73,7 +73,7 @@ namespace SDDM {
+ }
+
+ QQmlListProperty<AuthPrompt> AuthRequest::promptsDecl() {
+- return QQmlListProperty<AuthPrompt>(this, d->prompts);
++ return QQmlListProperty<AuthPrompt>(this, &d->prompts);
+ }
+
+ void AuthRequest::done() {
+Index: sddm-0.19.0/src/common/ConfigReader.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/common/ConfigReader.cpp
++++ sddm-0.19.0/src/common/ConfigReader.cpp
+@@ -265,7 +265,7 @@ namespace SDDM {
+ QByteArray junk;
+ // stores the junk to the temporary storage
+ auto collectJunk = [&junk](const QString &data) {
+- junk.append(data);
++ junk.append(data.toUtf8());
+ };
+
+ // a short function to assign the current junk and current line to the right section, eventually create a new one
+@@ -275,7 +275,7 @@ namespace SDDM {
+ sectionData[currentSection] = QByteArray();
+ }
+ sectionData[currentSection].append(junk);
+- sectionData[currentSection].append(data);
++ sectionData[currentSection].append(data.toUtf8());
+ junk.clear();
+ };
+
+Index: sddm-0.19.0/src/daemon/PowerManager.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/daemon/PowerManager.cpp
++++ sddm-0.19.0/src/daemon/PowerManager.cpp
+@@ -87,11 +87,15 @@ const QString UPOWER_OBJECT = QStringLit
+ }
+
+ void powerOff() const {
+- QProcess::execute(mainConfig.HaltCommand.get());
++ auto command = QProcess::splitCommand(mainConfig.HaltCommand.get());
++ const QString program = command.takeFirst();
++ QProcess::execute(program, command);
+ }
+
+ void reboot() const {
+- QProcess::execute(mainConfig.RebootCommand.get());
++ auto command = QProcess::splitCommand(mainConfig.RebootCommand.get());
++ const QString program = command.takeFirst();
++ QProcess::execute(program, command);
+ }
+
+ void suspend() const {
+Index: sddm-0.19.0/src/daemon/XorgDisplayServer.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/daemon/XorgDisplayServer.cpp
++++ sddm-0.19.0/src/daemon/XorgDisplayServer.cpp
+@@ -171,7 +171,7 @@ namespace SDDM {
+ }
+
+ // start display server
+- QStringList args = mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), QString::SkipEmptyParts);
++ QStringList args = mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), Qt::SkipEmptyParts)
+ args << QStringLiteral("-auth") << m_authPath
+ << QStringLiteral("-background") << QStringLiteral("none")
+ << QStringLiteral("-noreset")
+@@ -270,7 +270,7 @@ namespace SDDM {
+ // log message
+ qDebug() << "Display server stopped.";
+
+- QString displayStopCommand = mainConfig.X11.DisplayStopCommand.get();
++ QStringList displayStopCommand = QProcess::splitCommand(mainConfig.X11.DisplayStopCommand.get());
+
+ // create display setup script process
+ QProcess *displayStopScript = new QProcess();
+@@ -285,7 +285,8 @@ namespace SDDM {
+
+ // start display stop script
+ qDebug() << "Running display stop script " << displayStopCommand;
+- displayStopScript->start(displayStopCommand);
++ const auto program = displayStopCommand.takeFirst();
++ displayStopScript->start(program, displayStopCommand);
+
+ // wait for finished
+ if (!displayStopScript->waitForFinished(5000))
+@@ -307,8 +308,6 @@ namespace SDDM {
+ }
+
+ void XorgDisplayServer::setupDisplay() {
+- QString displayCommand = mainConfig.X11.DisplayCommand.get();
+-
+ // create cursor setup process
+ QProcess *setCursor = new QProcess();
+ // create display setup script process
+@@ -326,7 +325,7 @@ namespace SDDM {
+ displayScript->setProcessEnvironment(env);
+
+ qDebug() << "Setting default cursor";
+- setCursor->start(QStringLiteral("xsetroot -cursor_name left_ptr"));
++ setCursor->start(QStringLiteral("xsetroot"), { QStringLiteral("-cursor_name"), QStringLiteral("left_ptr") });
+
+ // delete setCursor on finish
+ connect(setCursor, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), setCursor, &QProcess::deleteLater);
+@@ -338,8 +337,10 @@ namespace SDDM {
+ }
+
+ // start display setup script
+- qDebug() << "Running display setup script " << displayCommand;
+- displayScript->start(displayCommand);
++ qDebug() << "Running display setup script " << mainConfig.X11.DisplayCommand.get();
++ QStringList displayCommand = QProcess::splitCommand(mainConfig.X11.DisplayCommand.get());
++ const QString program = displayCommand.takeFirst();
++ displayScript->start(program, displayCommand);
+
+ // delete displayScript on finish
+ connect(displayScript, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), displayScript, &QProcess::deleteLater);
+Index: sddm-0.19.0/src/greeter/GreeterProxy.cpp
+===================================================================
+--- sddm-0.19.0.orig/src/greeter/GreeterProxy.cpp
++++ sddm-0.19.0/src/greeter/GreeterProxy.cpp
+@@ -46,7 +46,7 @@ namespace SDDM {
+ connect(d->socket, &QLocalSocket::connected, this, &GreeterProxy::connected);
+ connect(d->socket, &QLocalSocket::disconnected, this, &GreeterProxy::disconnected);
+ connect(d->socket, &QLocalSocket::readyRead, this, &GreeterProxy::readyRead);
+- connect(d->socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error), this, &GreeterProxy::error);
++ connect(d->socket, &QLocalSocket::errorOccurred, this, &GreeterProxy::error);
+
+ // connect to server
+ d->socket->connectToServer(socket);
diff --git a/debian/patches/series b/debian/patches/series
index 917763a..966706d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
upstream-2f034906d-use-only-basename-of-session.patch
upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff
upstream_Fix-compilation-once-QTBUG-88431-gets-fixed.patch
+qt-5-15.diff
diff --git a/debian/patches/upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff b/debian/patches/upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff
index 1ec83cb..868afe9 100644
--- a/debian/patches/upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff
+++ b/debian/patches/upstream-8ad3c5afd-re-add-fish-profile-sourcing.diff
@@ -3,10 +3,10 @@ From: soredake
Date: Tue, 9 Mar 2021 07:28:11 +0000
Subject: Add fish /etc/profile and $HOME/.profile sourcing
---
-diff --git a/data/scripts/Xsession b/data/scripts/Xsession
-index 54498101..d0c2605f 100755
---- a/data/scripts/Xsession
-+++ b/data/scripts/Xsession
+Index: sddm-0.19.0/data/scripts/Xsession
+===================================================================
+--- sddm-0.19.0.orig/data/scripts/Xsession
++++ sddm-0.19.0/data/scripts/Xsession
@@ -39,6 +39,8 @@ case $SHELL in
rm -f $xsess_tmp
;;
@@ -16,11 +16,11 @@ index 54498101..d0c2605f 100755
xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
$SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp"
. $xsess_tmp
-diff --git a/data/scripts/wayland-session b/data/scripts/wayland-session
-index 1f905543..552a39f5 100755
---- a/data/scripts/wayland-session
-+++ b/data/scripts/wayland-session
-@@ -43,6 +43,8 @@ case $SHELL in
+Index: sddm-0.19.0/data/scripts/wayland-session
+===================================================================
+--- sddm-0.19.0.orig/data/scripts/wayland-session
++++ sddm-0.19.0/data/scripts/wayland-session
+@@ -39,6 +39,8 @@ case $SHELL in
rm -f $wlsess_tmp
;;
*/fish)
More information about the Neon-commits
mailing list