Hello community, here is the log from the commit of package sddm for openSUSE:Factory checked in at 2017-12-21 11:22:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sddm (Old) and /work/SRC/openSUSE:Factory/.sddm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sddm" Thu Dec 21 11:22:41 2017 rev:27 rq:557251 version:0.17.0 Changes: -------- --- /work/SRC/openSUSE:Factory/sddm/sddm.changes 2017-12-03 10:11:40.386802549 +0100 +++ /work/SRC/openSUSE:Factory/.sddm.new/sddm.changes 2017-12-21 11:22:46.754753700 +0100 @@ -1,0 +2,51 @@ +Thu Dec 14 08:20:25 UTC 2017 - fab...@ritter-vogt.de + +- Update to 0.17.0: + + Added possibility to change border width of ComboBox widget. + + Added missing utmp/wtmp/btmp handling. + + Make greeter see icons set by AccountsServices. + - Fix sddm.conf man page syntax error and update. + - Fix ComboBox widget. + - Fix connection of PropertiesChanged event for LogindSeat. + - Avoid race conditions with Xsetup. + * Update de translation. + * Update lt translation. + * Update zh_TW translation. + * Adjust order of components in the default PATH. + * Set default input method to qtvirtualkeyboard. +- Update to 0.16.0: + + Support non-latin characters in theme settings. + + Support fish shell in Xsession and wayland-session. + + Unlock GNOME keyring at login. + + Configuration directory. + - Make the default cursor themed. + - Update date and time in elarun theme. + - Fix theme metadata default values. + - Fix session selection in elarun. + - Do not truncate XAUTHORITY on login. + - Make enabled property of Button functional. + - Fix typos in documentation. + * Re-use existing sessions. + * Add ConsoleKit 2 support. + * Stop assuming shadow(5) is always available. + * Explicitely set XDG_SEAT when starting a user session. + * Suppress errors when pam_elogind is not available. + * Suppress errors when pam_systemd is not available. + * Added possibility to change color of dropdown menu. + * Add Hindi translation. + * Completed Swedish translation. + * Update French translation. +- Move to system configuration dirs, replace sddm.conf with + 00-general.conf and 10-theme.conf +- Refresh patches: + * 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch + * proper_pam.diff +- Rename patches: + * sysconfig-support.patch: + 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch + * create_pid_file.patch: + 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch +- Remove patches, now upstream: + * 0001-Do-not-truncate-XAUTHORITY-file-on-login.patch + +------------------------------------------------------------------- Old: ---- 0001-Do-not-truncate-XAUTHORITY-file-on-login.patch create_pid_file.patch sddm-0.15.0.tar.gz sddm.conf sysconfig-support.patch New: ---- 00-general.conf 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch 10-theme.conf sddm-0.17.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sddm.spec ++++++ --- /var/tmp/diff_new_pack.JhrvaM/_old 2017-12-21 11:22:47.466718985 +0100 +++ /var/tmp/diff_new_pack.JhrvaM/_new 2017-12-21 11:22:47.466718985 +0100 @@ -1,7 +1,7 @@ # # spec file for package sddm # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,54 +16,44 @@ # -%{!?_rundir: %global _rundir /run} -%{!?_unitdir: %global _unitdir /usr/lib/systemd/system} - Name: sddm -Version: 0.15.0 +Version: 0.17.0 Release: 0 Summary: QML-based display manager License: GPL-2.0+ Group: System/GUI/KDE Url: https://github.com/sddm/sddm Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz -Source1: %{name}.conf -Source2: X11-displaymanagers-%{name} -# PATCH-FIX-UPSTREAM 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch -- Revert to 0.13.0 config syntax +Source1: X11-displaymanagers-%{name} +Source2: 00-general.conf +Source3: 10-theme.conf +# PATCH-FIX-OPENSUSE 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch -- Revert to 0.13.0 config syntax Patch0: 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch # PATCH-FIX-OPENSUSE proper_pam.diff -- Use openSUSE pam config Patch1: proper_pam.diff -# PATCH-FIX-OPENSUSE create_pid_file.patch -- openSUSE's generic display-manager service doesn't know what to do without a pid file. drop the patch as soon as that sick dinosaur is killed -Patch2: create_pid_file.patch +# PATCH-FIX-OPENSUSE +Patch2: 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch # PATCH-FIX-OPENSUSE sddm-relaxed-auth.diff -- Insert XAUTHLOCALHOSTNAME into users enviroment, so the session handles hostname changes with a single X instance/run # related patches: libxcb/bug-262309_xcb-xauthlocalhostname.diff, xauth/xauth-tolerant-hostname-changes.diff, kdebase4-workspace/kdm-relaxed-auth.diff Patch3: sddm-relaxed-auth.diff -# PATCH-FIX-OPENSUSE sysconfig-support.patch -- Support DISPLAYMANAGER_AUTOLOGIN entry from /etc/sysconfig/displaymanager, the value overwrites -# any entry in sddm.conf/[Autologin]/User. Patch also defaults to plasma5.desktop as default autologin session. This is controlled only by sddm.conf file. -Patch4: sysconfig-support.patch +# PATCH-FIX-OPENSUSE +Patch4: 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch # PATCH-FIX-OPENSUSE sddm-service-handle-plymouth.patch -- sddm has some rudimentary support for plymouth handling, which only works with plymouth-quit.service # (the servce is not enabled on openSUSE). For users of sddm.service, we need to issue plymouth quit command by hand in this case Patch5: sddm-service-handle-plymouth.patch # PATCH-FIX-OPENSUSE 0001-Systemd-service-unit-Use-tty7-by-default.patch -- Use tty7 by default in the systemd service unit Patch8: 0001-Systemd-service-unit-Use-tty7-by-default.patch # PATCH-FIX-OPENSUSE +Patch9: 0001-Move-Xauthority-to-a-different-location-and-truncate.patch +# PATCH-FIX-OPENSUSE Patch18: 0003-Leave-duplicate-symlinks-out-of-the-SessionModel.patch -# PATCH-FIX-UPSTREAM -Patch19: 0001-Do-not-truncate-XAUTHORITY-file-on-login.patch -# PATCH-FIX-UPSTREAM -Patch20: 0001-Move-Xauthority-to-a-different-location-and-truncate.patch BuildRequires: cmake BuildRequires: extra-cmake-modules >= 1.4.0 BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: libqt5-linguist-devel BuildRequires: pam-devel -BuildRequires: pkg-config -%if 0%{?sle_version} && !0%{?is_opensuse} -BuildRequires: python-docutils -%else -BuildRequires: python3-docutils -%endif +BuildRequires: pkgconfig # Autodetect UID_MIN and UID_MAX from /etc/login.defs BuildRequires: shadow BuildRequires: pkgconfig(Qt5Core) >= 5.6.0 @@ -74,12 +64,17 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(xcb-xkb) +Requires(post): diffutils Requires: sddm-branding = %{version} Requires: xdm # Merged the -lang package back into the main package Provides: %{name}-lang = %{version} Obsoletes: %{name}-lang < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?sle_version} && !0%{?is_opensuse} +BuildRequires: python-docutils +%else +BuildRequires: python3-docutils +%endif %description SDDM is a display manager for X11. It uses technologies like QtQuick, @@ -89,11 +84,13 @@ %package branding-openSUSE Summary: openSUSE branding for SDDM, a QML-based display manager Group: System/GUI/KDE -PreReq: sddm Requires: sddm-theme-openSUSE +Requires: %{name} = %{version} +Requires(post): %{name} +Requires(post): diffutils Supplements: packageand(plasma5-workspace:branding-openSUSE) -Provides: sddm-branding = %{version} Conflicts: otherproviders(sddm-branding) +Provides: sddm-branding = %{version} %description branding-openSUSE SDDM is a display manager for X11. It uses technologies like QtQuick, @@ -104,9 +101,12 @@ %package branding-upstream Summary: Upstream branding for SDDM, a QML-based display manager Group: System/GUI/KDE -Supplements: packageand(plasma5-workspace:branding-upstream) -Provides: sddm-branding = %{version} +Requires: %{name} = %{version} +Requires(post): %{name} +Requires(post): diffutils +Supplements: packageand(%{name}:branding-upstream) Conflicts: otherproviders(sddm-branding) +Provides: sddm-branding = %{version} %description branding-upstream SDDM is a display manager for X11. It uses technologies like QtQuick, @@ -115,7 +115,7 @@ This package provides upstream branding for SDDM. %prep -%setup -q -n %{name}-%{version} +%setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 @@ -123,9 +123,8 @@ %patch4 -p1 %patch5 -p1 %patch8 -p1 +%patch9 -p1 %patch18 -p1 -%patch19 -p1 -%patch20 -p1 %build %cmake \ @@ -133,9 +132,9 @@ -DMINIMUM_VT=7 \ -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir}/%{name} \ -DIMPORTS_INSTALL_DIR="%{_libdir}/qt5/qml" \ - -DSESSION_COMMAND="/etc/X11/xdm/Xsession" \ + -DSESSION_COMMAND="%{_sysconfdir}/X11/xdm/Xsession" \ -DBUILD_MAN_PAGES=ON \ - -DSTATE_DIR="/var/lib/sddm" \ + -DSTATE_DIR="%{_localstatedir}/lib/sddm" \ -DRUNTIME_DIR="/run/sddm" \ -DPID_FILE="/run/sddm.pid" %make_jobs @@ -143,29 +142,50 @@ %install %kf5_makeinstall -C build + # We don't want the example config. + # However, we need to package the file so it does not end up being removed. + echo > %{buildroot}%{_sysconfdir}/sddm.conf + pushd %{buildroot}%{_sysconfdir}/dbus-1/system.d mv org.freedesktop.DisplayManager.conf sddm_org.freedesktop.DisplayManager.conf popd - install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}.conf - install -Dm 0644 %{SOURCE2} %{buildroot}%{_libexecdir}/X11/displaymanagers/%{name} + install -Dm 0644 %{SOURCE1} %{buildroot}%{_libexecdir}/X11/displaymanagers/%{name} + install -Dm 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/sddm/sddm.conf.d/00-general.conf + install -Dm 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/sddm/sddm.conf.d/10-theme.conf + mkdir -p %{buildroot}%{_sysconfdir}/alternatives touch %{buildroot}%{_sysconfdir}/alternatives/default-displaymanager ln -s %{_sysconfdir}/alternatives/default-displaymanager %{buildroot}%{_libexecdir}/X11/displaymanagers/default-displaymanager install -d %{buildroot}%{_rundir}/sddm install -d %{buildroot}%{_localstatedir}/lib/sddm + install -d %{buildroot}%{_sysconfdir}/sddm.conf.d %fdupes -s %{buildroot}%{_datadir}/sddm %pre -/usr/sbin/groupadd -r sddm 2> /dev/null || : -/usr/sbin/useradd -r -g sddm -s /bin/false -c "SDDM daemon" \ - -d /var/lib/sddm sddm 2> /dev/null || : +%{_sbindir}/groupadd -r sddm 2> /dev/null || : +%{_sbindir}/useradd -r -g sddm -s /bin/false -c "SDDM daemon" \ + -d %{_localstatedir}/lib/sddm sddm 2> /dev/null || : %post -if [ $1 -eq 2 -a -f /etc/sddm.conf ]; then - sed -i -e 's/^Current=maui$/Current=/g' /etc/sddm.conf +if [ $1 -eq 2 -a -f %{_sysconfdir}/sddm.conf ]; then + # Avoid changing sddm.conf's timestamp if no modifications done + tempconf="$(mktemp)" + + # SDDM 0.14.0 moved maui into the built-in resources + # SDDM <= 0.15.0 had no system config dir, so we need to remove the + # moved configuration options from the old single config file + sed -e 's/^Current=maui$/Current=/g' \ + -e '\#^DisplayCommand=%{_sysconfdir}/X11/xdm/Xsetup#d' \ + -e '\#^MinimumVT=7$#d' \ + -e '\#^ServerPath=%{_bindir}/X$#d' \ + -e '\#^SessionCommand=%{_sysconfdir}/X11/xdm/Xsession$#d' \ + %{_sysconfdir}/sddm.conf > "${tempconf}" + + cmp -s "${tempconf}" "%{_sysconfdir}/sddm.conf" || cp "${tempconf}" "%{_sysconfdir}/sddm.conf" + rm "${tempconf}" fi %{_sbindir}/update-alternatives --install %{_libexecdir}/X11/displaymanagers/default-displaymanager \ default-displaymanager %{_libexecdir}/X11/displaymanagers/sddm 25 @@ -174,28 +194,46 @@ [ -f %{_libexecdir}/X11/displaymanagers/sddm ] || %{_sbindir}/update-alternatives \ --remove default-displaymanager %{_libexecdir}/X11/displaymanagers/sddm +%post branding-upstream +if [ $1 -eq 2 -a -f %{_sysconfdir}/sddm.conf ]; then + # Avoid changing sddm.conf's timestamp if no modifications done + tempconf="$(mktemp)" + + # SDDM <= 0.15.0 had no system config dir, so we need to remove the + # theme configuration from the old single config file + sed -e '/^Current=$/d' %{_sysconfdir}/sddm.conf > "${tempconf}" + + cmp -s "${tempconf}" "%{_sysconfdir}/sddm.conf" || cp "${tempconf}" "%{_sysconfdir}/sddm.conf" + rm "${tempconf}" +fi +: + %post branding-openSUSE -if [ $1 -ge 1 -a -f /etc/sddm.conf ]; then +if [ $1 -eq 2 -a -f %{_sysconfdir}/sddm.conf ]; then + # Avoid changing sddm.conf's timestamp if no modifications done + tempconf="$(mktemp)" + # Upgrade from previous theme name - sed -i -e 's/^Current=breeze$/Current=breeze-openSUSE/g' /etc/sddm.conf - sed -i -e 's/^Current=maui$/Current=breeze-openSUSE/g' /etc/sddm.conf -fi -sed -i -e 's/^Current=$/Current=breeze-openSUSE/g' /etc/sddm.conf + # SDDM <= 0.15.0 had no system config dir, so we need to remove the + # theme configuration from the old single config file + sed -e 's/^Current=breeze$/Current=breeze-openSUSE/g' \ + -e 's/^Current=maui$/Current=breeze-openSUSE/g' \ + -e '/^Current=breeze-openSUSE$/d' \ + -e '/^CursorTheme=breeze_cursors$/d' %{_sysconfdir}/sddm.conf > "${tempconf}" -%postun branding-openSUSE -if [ $1 -eq 0 -a -f /etc/sddm.conf ]; then - sed -i -e 's/^Current=breeze-openSUSE$/Current=/g' /etc/sddm.conf + cmp -s "${tempconf}" "%{_sysconfdir}/sddm.conf" || cp "${tempconf}" "%{_sysconfdir}/sddm.conf" + rm "${tempconf}" fi +: %files -%defattr(-,root,root) %doc LICENSE* README* -%config(noreplace) %{_sysconfdir}/%{name}.conf +%config(noreplace) %{_sysconfdir}/sddm.conf +%dir %{_sysconfdir}/sddm.conf.d/ %config %{_sysconfdir}/pam.d/sddm %config %{_sysconfdir}/pam.d/sddm-autologin %config %{_sysconfdir}/pam.d/sddm-greeter %config(noreplace) %{_sysconfdir}/dbus-1/system.d/sddm_org.freedesktop.DisplayManager.conf -%{_libexecdir}/sddm/ %dir %{_libexecdir}/X11/displaymanagers/ %{_libexecdir}/X11/displaymanagers/%{name} %{_libexecdir}/X11/displaymanagers/default-displaymanager @@ -204,22 +242,25 @@ %{_bindir}/sddm-greeter %{_libdir}/qt5/qml/ %dir %{_datadir}/sddm/ +%dir %{_prefix}/lib/sddm/ +%dir %{_prefix}/lib/sddm/sddm.conf.d/ +%{_prefix}/lib/sddm/sddm.conf.d/00-general.conf +%{_libexecdir}/sddm/sddm-helper %{_datadir}/sddm/faces/ %{_datadir}/sddm/flags/ %{_datadir}/sddm/scripts/ %{_datadir}/sddm/themes/ %{_datadir}/sddm/translations/ -%{_mandir}/man*/sddm*.* +%{_mandir}/man*/sddm*%{ext_man} %ghost %attr(711,sddm,sddm) %dir %{_rundir}/sddm %attr(750,sddm,sddm) %dir %{_localstatedir}/lib/sddm %{_unitdir}/sddm.service %files branding-openSUSE -%defattr(-,root,root) %doc LICENSE* README* +%{_prefix}/lib/sddm/sddm.conf.d/10-theme.conf %files branding-upstream -%defattr(-,root,root) %doc LICENSE* README* %changelog ++++++ 00-general.conf ++++++ [XDisplay] ServerPath=/usr/bin/X SessionCommand=/etc/X11/xdm/Xsession DisplayCommand=/etc/X11/xdm/Xsetup MinimumVT=7 ++++++ 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch ++++++ >From 25cc8be1ccb41de8f789ac4ea55437a3159e5d4e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan <hrvoje.sen...@gmail.com> Date: Sat, 2 Sep 2017 11:27:01 +0200 Subject: [PATCH] Read the DISPLAYMANAGER_AUTOLOGIN value from sysconfig/displaymanager Support DISPLAYMANAGER_AUTOLOGIN entry from /etc/sysconfig/displaymanager, the value overwrites any entry in sddm.conf/[Autologin]/User. Patch also defaults to default.desktop as default autologin session. This is controlled only by sddm.conf file. --- CMakeLists.txt | 1 + src/common/Configuration.h | 5 +++-- src/common/Constants.h.in | 1 + src/daemon/Display.cpp | 12 ++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 764765e..fca2147 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,7 @@ set(WAYLAND_SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/wayland-session" set(CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf" CACHE PATH "Path of the sddm config file") set(CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf.d" CACHE PATH "Path of the sddm config directory") set(SYSTEM_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/sddm/sddm.conf.d" CACHE PATH "Path of the system sddm config directory") +set(DISPLAY_MANAGER_CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sysconfig/displaymanager" CACHE PATH "Path of the sysconfig/displaymanager config file") set(LOG_FILE "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/sddm.log" CACHE PATH "Path of the sddm log file") set(DBUS_CONFIG_FILENAME "org.freedesktop.DisplayManager.conf" CACHE STRING "Name of the sddm config file") set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations" CACHE PATH "Components translations directory") diff --git a/src/common/Configuration.h b/src/common/Configuration.h index e6ca79e..a1ec53c 100644 --- a/src/common/Configuration.h +++ b/src/common/Configuration.h @@ -94,14 +94,15 @@ namespace SDDM { Section(Autologin, Entry(User, QString, QString(), _S("Username for autologin session")); - Entry(Session, QString, QString(), _S("Name of session file for autologin session (if empty try last logged in)")); + Entry(Session, QString, _S("default.desktop"), _S("Name of session file for autologin session (if empty try last logged in)")); + Entry(Relogin, bool, false, _S("Whether sddm should automatically log back into sessions when they exit")); ); ); Config(StateConfig, []()->QString{auto tmp = getpwnam("sddm"); return tmp ? QString::fromLocal8Bit(tmp->pw_dir) : QStringLiteral(STATE_DIR);}().append(QStringLiteral("/state.conf")), QString(), QString(), Section(Last, - Entry(Session, QString, QString(), _S("Name of the session for the last logged-in user.\n" + Entry(Session, QString, _S("/usr/share/xsessions/default.desktop"), _S("Name of the session for the last logged-in user.\n" "This session will be preselected when the login screen appears.")); Entry(User, QString, QString(), _S("Name of the last logged-in user.\n" "This user will be preselected when the login screen appears")); diff --git a/src/common/Constants.h.in b/src/common/Constants.h.in index 09b80a7..b23045c 100644 --- a/src/common/Constants.h.in +++ b/src/common/Constants.h.in @@ -35,6 +35,7 @@ #define CONFIG_FILE "@CONFIG_FILE@" #define CONFIG_DIR "@CONFIG_DIR@" #define SYSTEM_CONFIG_DIR "@SYSTEM_CONFIG_DIR@" +#define DISPLAY_MANAGER_CONFIG_FILE "@DISPLAY_MANAGER_CONFIG_FILE@" #define LOG_FILE "@LOG_FILE@" #define PID_FILE "@PID_FILE@" diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index 50961e4..485ee4b 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -35,6 +35,7 @@ #include <QDebug> #include <QFile> #include <QTimer> +#include <QSettings> #include <pwd.h> #include <unistd.h> @@ -151,6 +152,11 @@ namespace SDDM { // log message qDebug() << "Display server started."; + QSettings sysconfSettings(QStringLiteral(DISPLAY_MANAGER_CONFIG_FILE), QSettings::NativeFormat); + QString sysconfigUser = sysconfSettings.value(QStringLiteral("DISPLAYMANAGER_AUTOLOGIN"), QStringLiteral("")).toString(); + + mainConfig.Autologin.User.set(sysconfigUser); + if ((daemonApp->first || mainConfig.Autologin.Relogin.get()) && !mainConfig.Autologin.User.get().isEmpty()) { // reset first flag -- 2.14.1 ++++++ 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch ++++++ --- /var/tmp/diff_new_pack.JhrvaM/_old 2017-12-21 11:22:47.510716839 +0100 +++ /var/tmp/diff_new_pack.JhrvaM/_new 2017-12-21 11:22:47.510716839 +0100 @@ -1,4 +1,4 @@ -From 3433d340ed936160c2178f3c021308d44008cf48 Mon Sep 17 00:00:00 2001 +From a43b731a6fdf44b43cfad560cfaa90d347d69763 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini <pierluigi.fior...@gmail.com> Date: Mon, 29 Aug 2016 12:11:03 +0200 Subject: [PATCH] Revert "Rename XDisplay and WaylandDisplay config sections" @@ -18,16 +18,17 @@ src/daemon/Display.cpp | 4 ++-- src/daemon/Seat.cpp | 2 +- src/daemon/XorgDisplayServer.cpp | 14 +++++++------- + src/greeter/GreeterApp.cpp | 4 ++-- src/greeter/SessionModel.cpp | 12 ++++++------ src/helper/Backend.cpp | 2 +- src/helper/UserSession.cpp | 10 +++++----- - 9 files changed, 28 insertions(+), 28 deletions(-) + 10 files changed, 30 insertions(+), 30 deletions(-) -Index: sddm-0.15.0~git/data/man/sddm.conf.rst.in +Index: sddm-0.17.0/data/man/sddm.conf.rst.in =================================================================== ---- sddm-0.15.0~git.orig/data/man/sddm.conf.rst.in -+++ sddm-0.15.0~git/data/man/sddm.conf.rst.in -@@ -76,7 +76,7 @@ OPTIONS +--- sddm-0.17.0.orig/data/man/sddm.conf.rst.in ++++ sddm-0.17.0/data/man/sddm.conf.rst.in +@@ -85,7 +85,7 @@ OPTIONS them altogether. Default value is true. @@ -36,7 +37,7 @@ `ServerPath=` Path of the X server. -@@ -131,7 +131,7 @@ OPTIONS +@@ -140,7 +140,7 @@ OPTIONS Can be either "true" or "false". Default value is "false". @@ -45,10 +46,10 @@ `SessionDir=` Path of the directory containing session files. -Index: sddm-0.15.0~git/src/common/Configuration.h +Index: sddm-0.17.0/src/common/Configuration.h =================================================================== ---- sddm-0.15.0~git.orig/src/common/Configuration.h -+++ sddm-0.15.0~git/src/common/Configuration.h +--- sddm-0.17.0.orig/src/common/Configuration.h ++++ sddm-0.17.0/src/common/Configuration.h @@ -57,7 +57,7 @@ namespace SDDM { ); @@ -67,10 +68,10 @@ Entry(SessionDir, QString, _S("/usr/share/wayland-sessions"), _S("Directory containing available Wayland sessions")); Entry(SessionCommand, QString, _S(WAYLAND_SESSION_COMMAND), _S("Path to a script to execute when starting the desktop session")); Entry(SessionLogFile, QString, _S(".local/share/sddm/wayland-session.log"),_S("Path to the user session log file")); -Index: sddm-0.15.0~git/src/common/Session.cpp +Index: sddm-0.17.0/src/common/Session.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/common/Session.cpp -+++ sddm-0.15.0~git/src/common/Session.cpp +--- sddm-0.17.0.orig/src/common/Session.cpp ++++ sddm-0.17.0/src/common/Session.cpp @@ -125,11 +125,11 @@ namespace SDDM { switch (type) { @@ -85,11 +86,11 @@ m_xdgSessionType = QStringLiteral("wayland"); break; default: -Index: sddm-0.15.0~git/src/daemon/Display.cpp +Index: sddm-0.17.0/src/daemon/Display.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/daemon/Display.cpp -+++ sddm-0.15.0~git/src/daemon/Display.cpp -@@ -114,9 +114,9 @@ namespace SDDM { +--- sddm-0.17.0.orig/src/daemon/Display.cpp ++++ sddm-0.17.0/src/daemon/Display.cpp +@@ -122,9 +122,9 @@ namespace SDDM { if (autologinSession.isEmpty()) { autologinSession = stateConfig.Last.Session.get(); } @@ -101,10 +102,10 @@ sessionType = Session::WaylandSession; } else { qCritical() << "Unable to find autologin session entry" << autologinSession; -Index: sddm-0.15.0~git/src/daemon/Seat.cpp +Index: sddm-0.17.0/src/daemon/Seat.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/daemon/Seat.cpp -+++ sddm-0.15.0~git/src/daemon/Seat.cpp +--- sddm-0.17.0.orig/src/daemon/Seat.cpp ++++ sddm-0.17.0/src/daemon/Seat.cpp @@ -57,7 +57,7 @@ namespace SDDM { if (terminalId == -1) { @@ -114,12 +115,12 @@ return m_terminalIds.contains(number); }); } -Index: sddm-0.15.0~git/src/daemon/XorgDisplayServer.cpp +Index: sddm-0.17.0/src/daemon/XorgDisplayServer.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/daemon/XorgDisplayServer.cpp -+++ sddm-0.15.0~git/src/daemon/XorgDisplayServer.cpp -@@ -95,7 +95,7 @@ namespace SDDM { - file_handler.open(QIODevice::WriteOnly); +--- sddm-0.17.0.orig/src/daemon/XorgDisplayServer.cpp ++++ sddm-0.17.0/src/daemon/XorgDisplayServer.cpp +@@ -96,7 +96,7 @@ namespace SDDM { + file_handler.open(QIODevice::Append); file_handler.close(); - QString cmd = QStringLiteral("%1 -f %2 -q").arg(mainConfig.X11.XauthPath.get()).arg(file); @@ -127,7 +128,7 @@ // execute xauth FILE *fp = popen(qPrintable(cmd), "w"); -@@ -128,7 +128,7 @@ namespace SDDM { +@@ -129,7 +129,7 @@ namespace SDDM { if (daemonApp->testing()) { QStringList args; args << m_display << QStringLiteral("-ac") << QStringLiteral("-br") << QStringLiteral("-noreset") << QStringLiteral("-screen") << QStringLiteral("800x600"); @@ -136,7 +137,7 @@ // wait for display server to start -@@ -154,16 +154,16 @@ namespace SDDM { +@@ -155,7 +155,7 @@ namespace SDDM { } // start display server @@ -145,8 +146,9 @@ args << QStringLiteral("-auth") << m_authPath << QStringLiteral("-background") << QStringLiteral("none") << QStringLiteral("-noreset") - << QStringLiteral("-displayfd") << QString::number(pipeFds[1]) - << QStringLiteral("vt%1").arg(displayPtr()->terminalId()); +@@ -166,9 +166,9 @@ namespace SDDM { + args << QStringLiteral("vt%1").arg(displayPtr()->terminalId()); + } qDebug() << "Running:" - << qPrintable(mainConfig.X11.ServerPath.get()) + << qPrintable(mainConfig.XDisplay.ServerPath.get()) @@ -156,7 +158,7 @@ // wait for display server to start if (!process->waitForStarted()) { -@@ -236,7 +236,7 @@ namespace SDDM { +@@ -241,7 +241,7 @@ namespace SDDM { // log message qDebug() << "Display server stopped."; @@ -165,19 +167,35 @@ // create display setup script process QProcess *displayStopScript = new QProcess(); -@@ -273,7 +273,7 @@ namespace SDDM { +@@ -278,7 +278,7 @@ namespace SDDM { } void XorgDisplayServer::setupDisplay() { - QString displayCommand = mainConfig.X11.DisplayCommand.get(); + QString displayCommand = mainConfig.XDisplay.DisplayCommand.get(); - // create display setup script process - QProcess *displayScript = new QProcess(); -Index: sddm-0.15.0~git/src/greeter/SessionModel.cpp + // create cursor setup process + QProcess *setCursor = new QProcess(); +Index: sddm-0.17.0/src/greeter/GreeterApp.cpp +=================================================================== +--- sddm-0.17.0.orig/src/greeter/GreeterApp.cpp ++++ sddm-0.17.0/src/greeter/GreeterApp.cpp +@@ -249,9 +249,9 @@ int main(int argc, char **argv) { + // HiDPI + bool hiDpiEnabled = false; + if (QGuiApplication::platformName() == QLatin1String("xcb")) +- hiDpiEnabled = SDDM::mainConfig.X11.EnableHiDPI.get(); ++ hiDpiEnabled = SDDM::mainConfig.XDisplay.EnableHiDPI.get(); + else if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) +- hiDpiEnabled = SDDM::mainConfig.Wayland.EnableHiDPI.get(); ++ hiDpiEnabled = SDDM::mainConfig.WaylandDisplay.EnableHiDPI.get(); + if (hiDpiEnabled) { + qDebug() << "High-DPI autoscaling Enabled"; + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +Index: sddm-0.17.0/src/greeter/SessionModel.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/greeter/SessionModel.cpp -+++ sddm-0.15.0~git/src/greeter/SessionModel.cpp +--- sddm-0.17.0.orig/src/greeter/SessionModel.cpp ++++ sddm-0.17.0/src/greeter/SessionModel.cpp @@ -41,8 +41,8 @@ namespace SDDM { SessionModel::SessionModel(QObject *parent) : QAbstractListModel(parent), d(new SessionModelPrivate()) { // initial population @@ -206,10 +224,10 @@ } SessionModel::~SessionModel() { -Index: sddm-0.15.0~git/src/helper/Backend.cpp +Index: sddm-0.17.0/src/helper/Backend.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/helper/Backend.cpp -+++ sddm-0.15.0~git/src/helper/Backend.cpp +--- sddm-0.17.0.orig/src/helper/Backend.cpp ++++ sddm-0.17.0/src/helper/Backend.cpp @@ -67,7 +67,7 @@ namespace SDDM { // determine Xauthority path QString value = QStringLiteral("%1/%2") @@ -219,10 +237,10 @@ env.insert(QStringLiteral("XAUTHORITY"), value); } // TODO: I'm fairly sure this shouldn't be done for PAM sessions, investigate! -Index: sddm-0.15.0~git/src/helper/UserSession.cpp +Index: sddm-0.17.0/src/helper/UserSession.cpp =================================================================== ---- sddm-0.15.0~git.orig/src/helper/UserSession.cpp -+++ sddm-0.15.0~git/src/helper/UserSession.cpp +--- sddm-0.17.0.orig/src/helper/UserSession.cpp ++++ sddm-0.17.0/src/helper/UserSession.cpp @@ -48,11 +48,11 @@ namespace SDDM { if (env.value(QStringLiteral("XDG_SESSION_CLASS")) == QLatin1String("greeter")) { QProcess::start(m_path); @@ -249,7 +267,7 @@ // create the path QFileInfo finfo(sessionLog); @@ -182,7 +182,7 @@ namespace SDDM { - file_handler.open(QIODevice::WriteOnly); + file_handler.open(QIODevice::Append); file_handler.close(); - QString cmd = QStringLiteral("%1 -f %2 -q").arg(mainConfig.X11.XauthPath.get()).arg(file); @@ -257,19 +275,3 @@ // execute xauth FILE *fp = popen(qPrintable(cmd), "w"); -Index: sddm-0.15.0~git/src/greeter/GreeterApp.cpp -=================================================================== ---- sddm-0.15.0~git.orig/src/greeter/GreeterApp.cpp -+++ sddm-0.15.0~git/src/greeter/GreeterApp.cpp -@@ -249,9 +249,9 @@ int main(int argc, char **argv) { - // HiDPI - bool hiDpiEnabled = false; - if (QGuiApplication::platformName() == QLatin1String("xcb")) -- hiDpiEnabled = SDDM::mainConfig.X11.EnableHiDPI.get(); -+ hiDpiEnabled = SDDM::mainConfig.XDisplay.EnableHiDPI.get(); - else if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) -- hiDpiEnabled = SDDM::mainConfig.Wayland.EnableHiDPI.get(); -+ hiDpiEnabled = SDDM::mainConfig.WaylandDisplay.EnableHiDPI.get(); - if (hiDpiEnabled) { - qDebug() << "High-DPI autoscaling Enabled"; - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); ++++++ 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch ++++++ >From e88acb4c8971992bbde1a2e22b04353b0deef0ea Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan <hrvoje.sen...@gmail.com> Date: Sat, 2 Sep 2017 11:09:51 +0200 Subject: [PATCH] Write the daemon's PID to a file on startup openSUSE's generic display-manager service doesn't know what to do without a pid file. drop the patch as soon as that sick dinosaur is killed. --- src/common/Constants.h.in | 1 + src/daemon/DaemonApp.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/common/Constants.h.in b/src/common/Constants.h.in index 7500a49..09b80a7 100644 --- a/src/common/Constants.h.in +++ b/src/common/Constants.h.in @@ -37,6 +37,7 @@ #define SYSTEM_CONFIG_DIR "@SYSTEM_CONFIG_DIR@" #define LOG_FILE "@LOG_FILE@" +#define PID_FILE "@PID_FILE@" #define MINIMUM_VT @MINIMUM_VT@ #define UID_MIN @UID_MIN@ diff --git a/src/daemon/DaemonApp.cpp b/src/daemon/DaemonApp.cpp index b5c8d49..c38e5a4 100644 --- a/src/daemon/DaemonApp.cpp +++ b/src/daemon/DaemonApp.cpp @@ -31,6 +31,7 @@ #include <QDebug> #include <QHostInfo> #include <QTimer> +#include <QFile> #include <iostream> @@ -46,6 +47,16 @@ namespace SDDM { // log message qDebug() << "Initializing..."; + // Write PID File + if ( ! QString(QStringLiteral(PID_FILE)).isEmpty() ) { + QFile pidFile(QStringLiteral(PID_FILE)); + QString pid = QString::number(QCoreApplication::applicationPid()); + if ( pidFile.open(QIODevice::WriteOnly | QIODevice::Text) ) { + pidFile.write(pid.toLatin1().data(), qstrlen(pid.toLatin1().data())); + pidFile.close(); + } + } + // set testing parameter m_testing = (arguments().indexOf(QStringLiteral("--test-mode")) != -1); -- 2.14.1 ++++++ 10-theme.conf ++++++ [Theme] Current=breeze-openSUSE CursorTheme=breeze_cursors ++++++ proper_pam.diff ++++++ --- /var/tmp/diff_new_pack.JhrvaM/_old 2017-12-21 11:22:47.574713719 +0100 +++ /var/tmp/diff_new_pack.JhrvaM/_new 2017-12-21 11:22:47.574713719 +0100 @@ -1,7 +1,7 @@ -Index: sddm-0.15.0/services/sddm-autologin.pam +Index: sddm-0.15.0~git/services/sddm-autologin.pam =================================================================== ---- sddm-0.15.0.orig/services/sddm-autologin.pam -+++ sddm-0.15.0/services/sddm-autologin.pam +--- sddm-0.15.0~git.orig/services/sddm-autologin.pam ++++ sddm-0.15.0~git/services/sddm-autologin.pam @@ -1,13 +1,6 @@ #%PAM-1.0 -auth required pam_env.so @@ -21,10 +21,10 @@ +password include common-password +session required pam_loginuid.so +session include common-session -Index: sddm-0.15.0/services/sddm-greeter.pam +Index: sddm-0.15.0~git/services/sddm-greeter.pam =================================================================== ---- sddm-0.15.0.orig/services/sddm-greeter.pam -+++ sddm-0.15.0/services/sddm-greeter.pam +--- sddm-0.15.0~git.orig/services/sddm-greeter.pam ++++ sddm-0.15.0~git/services/sddm-greeter.pam @@ -1,18 +1,7 @@ #%PAM-1.0 - @@ -42,18 +42,18 @@ - -# Setup session -session required pam_unix.so --session optional pam_systemd.so --session optional pam_elogind.so +--session optional pam_systemd.so +--session optional pam_elogind.so +# PAM configuration used only for the greeter session +auth required pam_permit.so +account required pam_permit.so +password include common-password +session required pam_loginuid.so +session include common-session -Index: sddm-0.15.0/services/sddm.pam +Index: sddm-0.15.0~git/services/sddm.pam =================================================================== ---- sddm-0.15.0.orig/services/sddm.pam -+++ sddm-0.15.0/services/sddm.pam +--- sddm-0.15.0~git.orig/services/sddm.pam ++++ sddm-0.15.0~git/services/sddm.pam @@ -1,15 +1,6 @@ #%PAM-1.0 - ++++++ sddm-0.15.0.tar.gz -> sddm-0.17.0.tar.gz ++++++ ++++ 3816 lines of diff (skipped)