sddm: Bump to version 0.18

Summary:
Bump sddm to version 0.18 based on the recipe in meta-qt5-extra and also move sddm into it's own directory.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Reviewers: vkrause

Reviewed By: vkrause

Differential Revision: https://phabricator.kde.org/D18540
This commit is contained in:
Alistair Francis
2019-01-28 10:55:19 -08:00
parent e480e1c682
commit 07e136f77a
10 changed files with 166 additions and 104 deletions

View File

@@ -1,62 +0,0 @@
DESCRIPTION = "QML based X11 and Wayland display manager"
HOMEPAGE = "https://github.com/sddm/sddm"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4641e94ec96f98fabc56ff9cc48be14b"
PR = "r0"
DEPENDS = " \
qtdeclarative \
qttools \
qttools-native \
extra-cmake-modules \
libpam \
libxcb \
"
SRC_URI = " \
git://github.com/sddm/${BPN};nobranch=1 \
file://0001-fix-qml-installation.diff \
file://sddm.conf \
file://sddm.pam \
file://sddm-autologin.pam \
"
S = "${WORKDIR}/git"
inherit cmake_qt5 pkgconfig systemd useradd
EXTRA_OECMAKE += "-DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML}"
do_install_append() {
mkdir -p ${d}${sysconfdir}
cp ${WORKDIR}/sddm.conf ${D}${sysconfdir}/sddm.conf
# ensure the home dir exists, sddm doesn't start without that
mkdir -p ${D}${localstatedir}/lib/sddm
chown -R sddm:sddm ${D}${localstatedir}/lib/sddm
chmod 0750 ${D}${localstatedir}/lib/sddm
# deploy PAM files
cp ${WORKDIR}/sddm.pam ${D}${sysconfdir}/pam.d/sddm
cp ${WORKDIR}/sddm-autologin.pam ${D}${sysconfdir}/pam.d/sddm-autologin
# make SDDM actually auto-start
echo "WantedBy=multi-user.target" >> ${D}/lib/systemd/system/sddm.service
}
FILES_${PN} += " \
${libdir}/qml \
"
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/sddm --shell /bin/false --user-group --groups video sddm"
RDEPENDS_${PN} += "\
packagegroup-core-x11-xserver \
xauth \
xinit \
xmessage \
xrdb \
qtbase-plugins \
qtdeclarative-plugins \
qtdeclarative-qmlplugins \
"

View File

@@ -1,38 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8903b52..ce9b5bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -178,6 +178,7 @@ set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm"
set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_SYSCONFDIR}/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 "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/sddm" CACHE PATH "Runtime data storage directory")
+set(QML_INSTALL_DIR "${QT_IMPORTS_DIR}" CACHE PATH "QML component installation directory")
set(SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/Xsession" CACHE PATH "Script to execute when starting the X11 desktop session")
set(WAYLAND_SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/wayland-session" CACHE PATH "Script to execute when starting the Wayland desktop session")
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
index 33920a6..22d75c9 100644
--- a/components/CMakeLists.txt
+++ b/components/CMakeLists.txt
@@ -1,5 +1,5 @@
configure_file("2.0/LayoutBox.qml" "2.0/LayoutBox.qml")
-install(DIRECTORY "2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
-install(DIRECTORY "common/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
-install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
+install(DIRECTORY "2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
+install(DIRECTORY "common/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
+install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
diff --git a/src/common/Constants.h.in b/src/common/Constants.h.in
index 7500a49..e174b5b 100644
--- a/src/common/Constants.h.in
+++ b/src/common/Constants.h.in
@@ -24,7 +24,7 @@
#define LIBEXEC_INSTALL_DIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@"
#define DATA_INSTALL_DIR "@DATA_INSTALL_DIR@"
#define SYS_CONFIG_DIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@"
-#define IMPORTS_INSTALL_DIR "@QT_IMPORTS_DIR@"
+#define IMPORTS_INSTALL_DIR "@QML_INSTALL_DIR@"
#define COMPONENTS_TRANSLATION_DIR "@COMPONENTS_TRANSLATION_DIR@"
#define RUNTIME_DIR "@RUNTIME_DIR@"
#define STATE_DIR "@STATE_DIR@"

View File

@@ -0,0 +1,79 @@
DESCRIPTION = "QML based X11 and Wayland display manager"
HOMEPAGE = "https://github.com/sddm/sddm"
LICENSE = "GPLv2 & CC-BY-3.0"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=4641e94ec96f98fabc56ff9cc48be14b \
file://LICENSE.CC-BY-3.0;md5=36b7342d5619a3a0d3b581e89803ec25 \
"
REQUIRED_DISTRO_FEATURES = "x11"
DEPENDS = " \
qtdeclarative \
qttools \
qttools-native \
extra-cmake-modules \
libpam \
libxcb \
"
SRC_URI = " \
git://github.com/sddm/${BPN};nobranch=1 \
file://0001-fix-qml-install-dir.patch \
file://0002-Workaround-missing-sessions.patch \
file://sddm.conf \
file://sddm.pam \
file://sddm-autologin.pam \
"
S = "${WORKDIR}/git"
inherit cmake_qt5 pkgconfig systemd useradd
EXTRA_OECMAKE += " \
-DLOGIN_DEFS_PATH=${STAGING_DIR_HOST}${sysconfdir}/login.defs \
-DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML} \
"
do_configure_append() {
# fix sysroot path
sed -i 's:${STAGING_DIR_HOST}.*${libdir}:${libdir}:g' ${B}/src/common/Constants.h
}
do_install_append() {
install -d ${D}/${sysconfdir}/sddm.conf.d
install -m 644 ${WORKDIR}/sddm.conf ${D}/${sysconfdir}/sddm.conf.d/00-default.conf
install -d ${D}${sysconfdir}/pam.d
install -m 644 ${WORKDIR}/sddm.pam ${D}${sysconfdir}/pam.d/sddm
install -m 644 ${WORKDIR}/sddm-autologin.pam ${D}${sysconfdir}/pam.d/sddm-autologin
install -d ${D}${localstatedir}/lib/sddm
chown -R sddm:sddm ${D}${localstatedir}/lib/sddm
chmod 0750 ${D}${localstatedir}/lib/sddm
}
FILES_${PN} += "${OE_QMAKE_PATH_QML}"
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/sddm --shell /bin/false --user-group --groups video sddm"
RDEPENDS_${PN} += "\
bash \
packagegroup-core-x11-xserver \
xcb-util \
xauth \
xinit \
xmessage \
xrdb \
qtbase-plugins \
qtdeclarative-plugins \
qtdeclarative-qmlplugins \
pam-plugin-tally \
"
RRECOMMENDS_${PN += " \
qtvirtualkeyboard-plugins \
qtvirtualkeyboard-qmlplugins \
"

View File

@@ -0,0 +1,28 @@
From 45038115cf962f0b5923a74ae362e3a430ec5a3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 8 Nov 2018 10:37:24 +0100
Subject: [PATCH] fix qml install dir
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
components/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
index 33920a6..22d75c9 100644
--- a/components/CMakeLists.txt
+++ b/components/CMakeLists.txt
@@ -1,5 +1,5 @@
configure_file("2.0/LayoutBox.qml" "2.0/LayoutBox.qml")
-install(DIRECTORY "2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
-install(DIRECTORY "common/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
-install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
+install(DIRECTORY "2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
+install(DIRECTORY "common/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
+install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
--
2.14.5

View File

@@ -0,0 +1,57 @@
From 68dbaac218216d001706c1a72d2db4819e3ca8cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 25 Nov 2018 00:29:17 +0100
Subject: [PATCH] Workaround missing sessions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The current approach is wrong in many ways:
* In case a session file does not set TryExec it is kept enabled accidentlty
* Session files with TryExec without full path are ignored. Problem here: sddm
tries to find executables based on PATH environment. Problem at least for my
environment: There is no PATH variable set by systemd. So for session files
without path: Do not perform further checks / just trust for now.
Upstream-Sttaus: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/greeter/SessionModel.cpp | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp
index 2a3c091..927bce2 100644
--- a/src/greeter/SessionModel.cpp
+++ b/src/greeter/SessionModel.cpp
@@ -124,22 +124,11 @@ namespace SDDM {
Session *si = new Session(type, session);
bool execAllowed = true;
- QFileInfo fi(si->tryExec());
- if (fi.isAbsolute()) {
- if (!fi.exists() || !fi.isExecutable())
+ if(!si->tryExec().isEmpty()) {
+ QFileInfo fi(si->tryExec());
+ if (fi.isAbsolute()) {
+ if (!fi.exists() || !fi.isExecutable())
execAllowed = false;
- } else {
- execAllowed = false;
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- QString envPath = env.value(QStringLiteral("PATH"));
- QStringList pathList = envPath.split(QLatin1Char(':'));
- foreach(const QString &path, pathList) {
- QDir pathDir(path);
- fi.setFile(pathDir, si->tryExec());
- if (fi.exists() && fi.isExecutable()) {
- execAllowed = true;
- break;
- }
}
}
// add to sessions list
--
2.14.5

View File

@@ -0,0 +1,2 @@
require ${PN}.inc
SRCREV = "v${PV}"

View File

@@ -1,4 +0,0 @@
require ${PN}.inc
# SRCREV = "v${PV}"
# 0.17.0 tries to run generated binaries durign the build, which fails when cross-compiling
SRCREV = "develop"