sddm: various modifications -> party time

* ship a valid configuration
* ship pam - this might need further alignment
* align qml paths
* hack around [1] - leave patch (0002-Xorg..) trying to solve properly in

[1] https://github.com/sddm/sddm/issues/390

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2015-05-08 16:14:39 +02:00
parent 6b2ccd350c
commit a6ceabeffd
7 changed files with 245 additions and 50 deletions

View File

@@ -1,44 +0,0 @@
From b8a111ae9033ff490432d032f3cbe06ec1e5507c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sat, 21 Feb 2015 19:57:41 +0100
Subject: [PATCH] handle merge of libsystemd-journal -> libsystemd for systemd
>= 209
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
see [1]:
'The APIs "sd-journal.h", "sd-login.h", "sd-id128.h", "sd-daemon.h" are no
longer found in individual libraries libsystemd-journal.so, , libsystemd-login.so,
libsystemd-id128.so, libsystemd-daemon.so. Instead, we have merged them into
a single library, libsystemd.so, which provides all symbols.
[1] http://cgit.freedesktop.org/systemd/systemd/tree/NEWS
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61230a4..3a34ba6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,7 +98,12 @@ if(SYSTEMD_FOUND)
add_definitions(-DHAVE_SYSTEMD)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_SYSTEMD)
- pkg_check_modules(JOURNALD "libsystemd-journal")
+ # libsystemd-journal was merged into libsystemd in 209
+ if(${SYSTEMD_VERSION} VERSION_LESS 209)
+ pkg_check_modules(JOURNALD "libsystemd-journal")
+ else()
+ pkg_check_modules(JOURNALD "libsystemd")
+ endif()
if(ENABLE_JOURNALD)
if(JOURNALD_FOUND)
--
1.9.3

View File

@@ -0,0 +1,91 @@
From 1a0bbae083aa2b73615ee006708f8bd5433ec8a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 29 Apr 2015 11:01:47 +0200
Subject: [PATCH] XorgDisplayServer.cpp: create pipe earlier to extract display
number
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
addCookie() requires m_display properly set otherwise we get
| sddm[309]: /usr/bin/xauth: (stdin):1: bad "remove" command line
| sddm[309]: /usr/bin/xauth: (stdin):2: bad "add" command line
Motivated by [1]
https://github.com/sddm/sddm/issues/390
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/daemon/XorgDisplayServer.cpp | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
index 407dd3e..4b3ca01 100644
--- a/src/daemon/XorgDisplayServer.cpp
+++ b/src/daemon/XorgDisplayServer.cpp
@@ -116,6 +116,26 @@ namespace SDDM {
if (m_started)
return false;
+ //create pipe for communicating with X server
+ //0 == read from X, 1== write to from X
+ int pipeFds[2];
+ if (pipe(pipeFds) != 0) {
+ qCritical("Could not create pipe to start X server");
+ }
+
+ QFile readPipe;
+
+ if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
+ qCritical("Failed to open pipe to start X Server ");
+
+ close(pipeFds[0]);
+ return false;
+ }
+ QByteArray displayNumber = readPipe.readLine();
+ displayNumber.prepend(QByteArray(":"));
+ displayNumber.remove(displayNumber.size() -1, 1); //trim trailing whitespace
+ m_display = displayNumber;
+
// generate auth file
addCookie(m_authPath);
changeOwner(m_authPath);
@@ -150,13 +170,6 @@ namespace SDDM {
env.insert("XCURSOR_THEME", mainConfig.Theme.CursorTheme.get());
process->setProcessEnvironment(env);
- //create pipe for communicating with X server
- //0 == read from X, 1== write to from X
- int pipeFds[2];
- if (pipe(pipeFds) != 0) {
- qCritical("Could not create pipe to start X server");
- }
-
// start display server
QStringList args;
args << "-auth" << m_authPath
@@ -180,19 +193,6 @@ namespace SDDM {
return false;
}
- QFile readPipe;
-
- if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
- qCritical("Failed to open pipe to start X Server ");
-
- close(pipeFds[0]);
- return false;
- }
- QByteArray displayNumber = readPipe.readLine();
- displayNumber.prepend(QByteArray(":"));
- displayNumber.remove(displayNumber.size() -1, 1); //trim trailing whitespace
- m_display= displayNumber;
-
// close our pipe
close(pipeFds[0]);
--
1.9.3

View File

@@ -0,0 +1,33 @@
From 870f32a2cdd47078c463b0f35c9324a1cfca451c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Fri, 8 May 2015 11:26:32 +0200
Subject: [PATCH] temporary hack
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
see [1] for further details
https://github.com/sddm/sddm/issues/390
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/daemon/DisplayServer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/DisplayServer.h b/src/daemon/DisplayServer.h
index 97cd772..fa65987 100644
--- a/src/daemon/DisplayServer.h
+++ b/src/daemon/DisplayServer.h
@@ -53,7 +53,7 @@ namespace SDDM {
protected:
bool m_started { false };
- QString m_display { "" };
+ QString m_display { ":0" };
private:
Display *m_displayPtr { nullptr };
--
1.9.3

View File

@@ -0,0 +1,84 @@
[Autologin]
# Autologin again on session exit
#Relogin=false
# Autologin session
#Session=
# Autologin user
#User=
[General]
# Halt command
HaltCommand=/bin/systemctl poweroff
# Initial NumLock state
# Valid values: on|off|none
# If property is set to none, numlock won't be changed
#Numlock=none
# Reboot command
RebootCommand=/bin/systemctl reboot
[Theme]
# Current theme name
Current=maui
# Cursor theme
#CursorTheme=
# Face icon directory
# The files should be in username.face.icon format
FacesDir=/usr/share/sddm/faces
# Theme directory path
ThemeDir=/usr/share/sddm/themes
[Users]
# Default $PATH
DefaultPath=/usr/bin:/usr/bin/qt5
# Hidden shells
# Users with these shells as their default won't be listed
#HideShells=
# Hidden users
#HideUsers=
# Maximum user id for displayed users
#MaximumUid=65000
# Minimum user id for displayed users
MinimumUid=1000
# Remember the session of the last successfully logged in user
#RememberLastSession=true
# Remember the last successfully logged in user
#RememberLastUser=true
[XDisplay]
# Xsetup script path
# A script to execute when starting the display server
#DisplayCommand=/usr/share/sddm/scripts/Xsetup
# Minimum VT
# The lowest virtual terminal number that will be used.
#MinimumVT=1
# X server path
ServerPath=/usr/bin/X
# Xsession script path
# A script to execute when starting the desktop session
#SessionCommand=/etc/X11/xinit/Xsession
# Session description directory
SessionDir=/usr/share/xsessions
# Xauth path
XauthPath=/usr/bin/xauth

View File

@@ -0,0 +1,17 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so
#auth required pam_unix.so
# To deny passwordless login comment next line and uncomment previous line
auth required pam_unix.so nullok
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
-session optional pam_systemd.so
-session optional pam_kwallet.so
password required pam_unix.so

View File

@@ -16,20 +16,34 @@ DEPENDS += "libpam"
SRC_URI = " \
git://github.com/sddm/${BPN}.git;protocol=git;branch=master \
file://0001-handle-merge-of-libsystemd-journal-libsystemd-for-sy.patch \
file://0002-fix-qml-install-dir.patch \
file://0001-fix-qml-install-dir.patch \
file://0002-temporary-hack.patch \
file://sddm.pam \
file://sddm.conf \
"
SRCREV = "5fef418d71730f631fa313a521b23fa1b40a332c"
SRCREV = "a6cb08074fdfdee8673a910ef64eb17428b0b390"
PV = "0.11.0+git${SRCPV}"
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DQML_INSTALL_DIR=${libdir}/qml"
EXTRA_OECMAKE += "-DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML}"
FILES_${PN} += "${libdir}/qml"
do_install_append() {
install -d ${D}/${sysconfdir}
install -m 644 ${WORKDIR}/sddm.conf ${D}/${sysconfdir}
install -d ${D}${sysconfdir}/pam.d
install -m 644 ${WORKDIR}/sddm.pam ${D}${sysconfdir}/pam.d/sddm
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 /var/lib/sddm --shell /bin/false --user-group sddm"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/sddm --shell /bin/false --user-group --groups video sddm"