Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2018 10:28:12 +0000 (UTC)
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r479245 - in head/x11: plasma5-plasma-workspace plasma5-plasma-workspace/files sddm sddm/files
Message-ID:  <201809081028.w88ASCYt075396@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adridg
Date: Sat Sep  8 10:28:11 2018
New Revision: 479245
URL: https://svnweb.freebsd.org/changeset/ports/479245

Log:
  Update x11/sddm to 0.17.
  
  This is still one minor release behind, but a big update relative to
  the previous version. Thanks to tijl@ for the patches, dbn@ for
  initial testing.
  
  PR:		228116
  Submitted by:	tijl

Added:
  head/x11/sddm/files/patch-data_scripts_Xsession   (contents, props changed)
  head/x11/sddm/files/patch-services_sddm-autologin.pam   (contents, props changed)
  head/x11/sddm/files/patch-services_sddm-greeter.pam   (contents, props changed)
  head/x11/sddm/files/patch-services_sddm.pam   (contents, props changed)
  head/x11/sddm/files/patch-src_daemon_DaemonApp.cpp   (contents, props changed)
  head/x11/sddm/files/patch-src_daemon_LogindDBusTypes.cpp   (contents, props changed)
  head/x11/sddm/files/patch-src_daemon_SignalHandler.cpp   (contents, props changed)
  head/x11/sddm/files/patch-src_helper_HelperApp.cpp   (contents, props changed)
  head/x11/sddm/files/xinitrc.desktop.in   (contents, props changed)
Deleted:
  head/x11/plasma5-plasma-workspace/files/patch-plasma.desktop.cmake
  head/x11/sddm/files/patch-src_helper_backend_PasswdBackend.cpp
  head/x11/sddm/files/xinitrc.desktop
Modified:
  head/x11/plasma5-plasma-workspace/Makefile
  head/x11/sddm/Makefile
  head/x11/sddm/distinfo
  head/x11/sddm/files/patch-CMakeLists.txt
  head/x11/sddm/files/patch-src_common_Configuration.h
  head/x11/sddm/files/patch-src_daemon_CMakeLists.txt
  head/x11/sddm/files/patch-src_daemon_Display.cpp
  head/x11/sddm/files/patch-src_greeter_UserModel.cpp
  head/x11/sddm/files/patch-src_helper_UserSession.cpp
  head/x11/sddm/files/sddm.in
  head/x11/sddm/pkg-plist

Modified: head/x11/plasma5-plasma-workspace/Makefile
==============================================================================
--- head/x11/plasma5-plasma-workspace/Makefile	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/plasma5-plasma-workspace/Makefile	Sat Sep  8 10:28:11 2018	(r479245)
@@ -2,7 +2,7 @@
 
 PORTNAME=	plasma-workspace
 DISTVERSION=	${KDE_PLASMA_VERSION}
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	x11 kde kde-plasma
 
 MAINTAINER=	kde@FreeBSD.org

Modified: head/x11/sddm/Makefile
==============================================================================
--- head/x11/sddm/Makefile	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/Makefile	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,14 +1,16 @@
 # $FreeBSD$
 
 PORTNAME=	sddm
-PORTVERSION=	0.14.0
+PORTVERSION=	0.17.0
 DISTVERSIONPREFIX=	v
 CATEGORIES=	x11
 
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	QML based login manager
 
-USES=		cmake:outsource desktop-file-utils kde:5 qt:5
+RUN_DEPENDS=	dbus-run-session:devel/dbus
+
+USES=		cmake:outsource kde:5 qt:5
 USE_KDE=	ecm
 USE_QT=		concurrent core dbus gui linguisttools multimedia network \
 		printsupport qml quick script sql webkit widgets \
@@ -18,12 +20,9 @@ USE_XORG=	xcb
 CMAKE_ARGS=	-DUID_MIN=1000 \
 		-DUID_MAX=65000 \
 		-DCMAKE_INSTALL_SYSCONFDIR:PATH=${LOCALBASE}/etc
-# We need to disable PAM at the moment and use the passwd-based backend;
-# the two backend are mutually exclusive, and we have to investigate how
-# to make it compatible with OpenPAM.
-CMAKE_ARGS+=	-DENABLE_PAM:BOOL=FALSE
 
 USE_RC_SUBR=	sddm
+SUB_FILES=	xinitrc.desktop
 
 USERS=		sddm
 GROUPS=		sddm
@@ -31,16 +30,18 @@ GROUPS=		sddm
 USE_GITHUB=	yes
 
 post-patch:
-# Patch in the correct location for X11 startup files, and make the session start
-# script of sddm use the value of ${STARTUP} defined by 90-consolekit
-	${REINPLACE_CMD} -e 's#/etc/X11#${LOCALBASE}/etc/X11#g' \
-			 -e '/exec.*session/s#exec#exec $${STARTUP}#g' \
-		${PATCH_WRKSRC}/data/scripts/Xsession
+	@${REINPLACE_CMD} -e 's#/etc/X11#${LOCALBASE}/etc/X11#' \
+		-e 's#/usr/bin/#${LOCALBASE}/bin/#g' \
+		-e 's#/usr/share/#${LOCALBASE}/share/#' \
+		${WRKSRC}/data/scripts/Xsession \
+		${WRKSRC}/src/common/Configuration.h
 
 post-install:
+	${MV} ${STAGEDIR}${PREFIX}/etc/sddm.conf \
+		${STAGEDIR}${PREFIX}/etc/sddm.conf.sample
 # Install xsession.desktop to launch .xinitrc via sddm.
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/xsessions
-	${INSTALL_DATA} ${FILESDIR}/xinitrc.desktop ${STAGEDIR}${PREFIX}/share/xsessions
+	${INSTALL_DATA} ${WRKDIR}/xinitrc.desktop ${STAGEDIR}${PREFIX}/share/xsessions
 	${INSTALL_SCRIPT} ${FILESDIR}/xinit-session ${STAGEDIR}${PREFIX}/share/sddm/scripts
 
 .include <bsd.port.mk>

Modified: head/x11/sddm/distinfo
==============================================================================
--- head/x11/sddm/distinfo	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/distinfo	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1488014449
-SHA256 (sddm-sddm-v0.14.0_GH0.tar.gz) = a551551a6ba324e9c384c89bc63e871de65fea3740eadbea2d63df86045f8205
-SIZE (sddm-sddm-v0.14.0_GH0.tar.gz) = 3367582
+TIMESTAMP = 1525019041
+SHA256 (sddm-sddm-v0.17.0_GH0.tar.gz) = c6da2862688d21a091f1568b78a5f5900cd2e02a83dd42c016f0c5867e69a92d
+SIZE (sddm-sddm-v0.17.0_GH0.tar.gz) = 3524362

Modified: head/x11/sddm/files/patch-CMakeLists.txt
==============================================================================
--- head/x11/sddm/files/patch-CMakeLists.txt	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-CMakeLists.txt	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,16 +1,16 @@
 1) On FreeBSD X is normally started on VT9.
 2) The shutdown command uses '-p' and not '-P' on FreeBSD.
 
---- CMakeLists.txt.orig	2016-08-28 11:54:03 UTC
+--- CMakeLists.txt.orig	2017-12-05 16:00:16 UTC
 +++ CMakeLists.txt
-@@ -143,8 +143,8 @@ if(SYSTEMD_FOUND)
-     set(REBOOT_COMMAND "/usr/bin/systemctl reboot")
- else()
-     set(SYSTEMD_FOUND 0)
+@@ -168,8 +168,8 @@ add_feature_info("elogind" ELOGIND_FOUND "elogind supp
+ 
+ # Default behaviour if neither systemd nor elogind is used
+ if (NOT ELOGIND_FOUND AND NOT SYSTEMD_FOUND)
 -    set(MINIMUM_VT 7)
 -    set(HALT_COMMAND "/sbin/shutdown -h -P now")
 +    set(MINIMUM_VT 9)
-+    set(HALT_COMMAND "/sbin/shutdown -h -p now")
++    set(HALT_COMMAND "/sbin/shutdown -p now")
      set(REBOOT_COMMAND "/sbin/shutdown -r now")
  endif()
- add_feature_info("systemd" SYSTEMD_FOUND "systemd support")
+ 

Added: head/x11/sddm/files/patch-data_scripts_Xsession
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-data_scripts_Xsession	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,23 @@
+Fix use of "$@" (see sh(1)).
+
+There's no systemd on FreeBSD so start the session using $STARTUP which is
+defined in 90-consolekit if ConsoleKit2 is installed.  By default this allows
+local users to shutdown/reboot the machine and access devices like USB keys.
+
+Also use dbus-run-session so libdbus doesn't have to autolauch the session bus
+daemon on first use.  Autolaunched dbus daemons tend to linger and may only
+exit if the X server exits.
+
+--- data/scripts/Xsession.orig	2017-12-05 16:00:16 UTC
++++ data/scripts/Xsession
+@@ -94,8 +94,8 @@ if [ -f "$USERXSESSION" ]; then
+   . "$USERXSESSION"
+ fi
+ 
+-if [ -z "$@" ]; then
++if [ -z "$1" ]; then
+     exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ else
+-    exec $@
++    exec $STARTUP /usr/bin/dbus-run-session --dbus-daemon=/usr/bin/dbus-daemon -- "$@"
+ fi

Added: head/x11/sddm/files/patch-services_sddm-autologin.pam
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-services_sddm-autologin.pam	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,23 @@
+--- services/sddm-autologin.pam.orig	2017-12-05 16:00:16 UTC
++++ services/sddm-autologin.pam
+@@ -1,13 +1,9 @@
+ #%PAM-1.0
+-auth        required    pam_env.so
+-auth        required    pam_tally.so file=/var/log/faillog onerr=succeed
+-auth        required    pam_shells.so
+-auth        required    pam_nologin.so
+ auth        required    pam_permit.so
+--auth       optional    pam_gnome_keyring.so
+--auth       optional    pam_kwallet5.so
+-account     include     system-local-login
+-password    include     system-local-login
+-session     include     system-local-login
+--session    optional    pam_gnome_keyring.so auto_start
+--session    optional    pam_kwallet5.so auto_start
++#auth       optional    pam_gnome_keyring.so
++#auth       optional    pam_kwallet5.so
++account     include     login
++password    required    pam_deny.so
++session     include     login
++#session    optional    pam_gnome_keyring.so auto_start
++#session    optional    pam_kwallet5.so auto_start

Added: head/x11/sddm/files/patch-services_sddm-greeter.pam
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-services_sddm-greeter.pam	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,19 @@
+--- services/sddm-greeter.pam.orig	2017-12-05 16:00:16 UTC
++++ services/sddm-greeter.pam
+@@ -1,8 +1,5 @@
+ #%PAM-1.0
+ 
+-# Load environment from /etc/environment and ~/.pam_environment
+-auth		required pam_env.so
+-
+ # Always let the greeter start without authentication
+ auth		required pam_permit.so
+ 
+@@ -13,6 +10,4 @@ account		required pam_permit.so
+ password	required pam_deny.so
+ 
+ # Setup session
+-session		required pam_unix.so
+--session		optional pam_systemd.so
+--session		optional pam_elogind.so
++session		required pam_permit.so

Added: head/x11/sddm/files/patch-services_sddm.pam
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-services_sddm.pam	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,27 @@
+--- services/sddm.pam.orig	2017-12-05 16:00:16 UTC
++++ services/sddm.pam
+@@ -1,15 +1,14 @@
+ #%PAM-1.0
+ 
+-auth		include		system-login
+--auth		optional	pam_gnome_keyring.so
+--auth   optional  pam_kwallet5.so
++auth		include		login
++#auth		optional	pam_gnome_keyring.so
++#auth		optional	pam_kwallet5.so
+ 
+-account		include		system-login
++account		include		login
+ 
+-password	include		system-login
+--password	optional	pam_gnome_keyring.so use_authtok
++password	include		login
++#password	optional	pam_gnome_keyring.so use_authtok
+ 
+-session		optional	pam_keyinit.so force revoke
+-session		include		system-login
+--session		optional	pam_gnome_keyring.so auto_start
+--session  optional  pam_kwallet5.so auto_start
++session 	include		login
++#session 	optional	pam_gnome_keyring.so auto_start
++#session 	optional	pam_kwallet5.so auto_start

Modified: head/x11/sddm/files/patch-src_common_Configuration.h
==============================================================================
--- head/x11/sddm/files/patch-src_common_Configuration.h	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-src_common_Configuration.h	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,38 +1,36 @@
-Modify the default configuration to fit in to FreeBSD. That is replace '/usr/bin'
-with '/usr/local/bin' and so on.
-The setting of '$PATH' I find a bit dumb... this should respect the values of the
-users profile...
+Leave InputMethod empty by default since qtvirtualkeyboard does not appear to
+be supported by the included themes.  The keyboard is drawn on top of the
+login screen and has to be clicked away (button lower-right).
 
---- src/common/Configuration.h.orig	2016-08-28 11:54:03 UTC
+Set the default theme and cursor theme to breeze, because sddm is most likely
+used together with Plasma.  If they aren't available sddm falls back to a
+compiled-in theme.
+
+--- src/common/Configuration.h.orig	2017-12-05 16:00:16 UTC
 +++ src/common/Configuration.h
-@@ -58,11 +58,11 @@ namespace SDDM {
- 
-         // TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal
-         Section(X11,
--            Entry(ServerPath,          QString,     _S("/usr/bin/X"),                           _S("Path to X server binary"));
-+            Entry(ServerPath,          QString,     _S("/usr/local/bin/X"),                           _S("Path to X server binary"));
-             Entry(ServerArguments,     QString,     _S("-nolisten tcp"),                        _S("Arguments passed to the X server invocation"));
--            Entry(XephyrPath,          QString,     _S("/usr/bin/Xephyr"),                      _S("Path to Xephyr binary"));
--            Entry(XauthPath,           QString,     _S("/usr/bin/xauth"),                       _S("Path to xauth binary"));
--            Entry(SessionDir,          QString,     _S("/usr/share/xsessions"),                 _S("Directory containing available X sessions"));
-+            Entry(XephyrPath,          QString,     _S("/usr/local/bin/Xephyr"),                      _S("Path to Xephyr binary"));
-+            Entry(XauthPath,           QString,     _S("/usr/local/bin/xauth"),                       _S("Path to xauth binary"));
-+            Entry(SessionDir,          QString,     _S("/usr/local/share/xsessions"),                 _S("Directory containing available X sessions"));
-             Entry(SessionCommand,      QString,     _S(SESSION_COMMAND),                        _S("Path to a script to execute when starting the desktop session"));
- 	    Entry(SessionLogFile,      QString,     _S(".local/share/sddm/xorg-session.log"),   _S("Path to the user session log file"));
- 	    Entry(UserAuthFile,        QString,     _S(".Xauthority"),                          _S("Path to the Xauthority file"));
-@@ -72,13 +72,13 @@ namespace SDDM {
+@@ -42,14 +42,14 @@ namespace SDDM {
+         Entry(Numlock,             NumState,    NUM_NONE,                                       _S("Initial NumLock state. Can be on, off or none.\n"
+                                                                                                    "If property is set to none, numlock won't be changed\n"
+                                                                                                    "NOTE: Currently ignored if autologin is enabled."));
+-        Entry(InputMethod,         QString,     QStringLiteral("qtvirtualkeyboard"),                   _S("Input method module"));
++        Entry(InputMethod,         QString,     QString(),                                      _S("Input method module"));
+         //  Name   Entries (but it's a regular class again)
+         Section(Theme,
+             Entry(ThemeDir,            QString,     _S(DATA_INSTALL_DIR "/themes"),             _S("Theme directory path"));
+-            Entry(Current,             QString,     _S(""),                                     _S("Current theme name"));
++            Entry(Current,             QString,     _S("breeze"),                               _S("Current theme name"));
+             Entry(FacesDir,            QString,     _S(DATA_INSTALL_DIR "/faces"),              _S("Global directory for user avatars\n"
+                                                                                                    "The files should be named <username>.face.icon"));
+-            Entry(CursorTheme,         QString,     QString(),                                  _S("Cursor theme used in the greeter"));
++            Entry(CursorTheme,         QString,     _S("breeze_cursors"),                       _S("Cursor theme used in the greeter"));
+             Entry(EnableAvatars,       bool,        true,                                       _S("Enable display of custom user avatars"));
+             Entry(DisableAvatarsThreshold,int,      7,                                          _S("Number of users to use as threshold\n"
+                                                                                                    "above which avatars are disabled\n"
+@@ -80,7 +80,7 @@ namespace SDDM {
          );
  
-         Section(Wayland,
--            Entry(SessionDir,          QString,     _S("/usr/share/wayland-sessions"),          _S("Directory containing available Wayland sessions"));
-+            Entry(SessionDir,          QString,     _S("/usr/local/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"));
-         );
- 
          Section(Users,
--            Entry(DefaultPath,         QString,     _S("/bin:/usr/bin:/usr/local/bin"),         _S("Default $PATH for logged in users"));
+-            Entry(DefaultPath,         QString,     _S("/usr/local/bin:/usr/bin:/bin"),         _S("Default $PATH for logged in users"));
 +            Entry(DefaultPath,         QString,     _S("/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"),         _S("Default $PATH for logged in users"));
              Entry(MinimumUid,          int,         UID_MIN,                                    _S("Minimum user id for displayed users"));
              Entry(MaximumUid,          int,         UID_MAX,                                    _S("Maximum user id for displayed users"));

Modified: head/x11/sddm/files/patch-src_daemon_CMakeLists.txt
==============================================================================
--- head/x11/sddm/files/patch-src_daemon_CMakeLists.txt	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-src_daemon_CMakeLists.txt	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,19 +1,9 @@
-This patch does two things:
-1) Add the include directories for 'libxcb' to the compiler search directories,
-2) Remove VirtualTerminal.cpp from the sources that need to be built.
-   see also 'patch-src_daemon_Display.cpp'
+Remove VirtualTerminal.cpp from the sources that need to be built.
+See also 'patch-src_daemon_Display.cpp'.
 
---- src/daemon/CMakeLists.txt.orig	2016-08-28 11:54:03 UTC
+--- src/daemon/CMakeLists.txt.orig	2017-12-05 16:00:16 UTC
 +++ src/daemon/CMakeLists.txt
-@@ -3,6 +3,7 @@ include_directories(
-     "${CMAKE_SOURCE_DIR}/src/auth"
- )
- include_directories("${CMAKE_BINARY_DIR}/src/common")
-+include_directories("${LIBXCB_INCLUDE_DIR}")
- 
- set(DAEMON_SOURCES
-     ${CMAKE_SOURCE_DIR}/src/common/Configuration.cpp
-@@ -26,7 +27,6 @@ set(DAEMON_SOURCES
+@@ -29,7 +29,6 @@ set(DAEMON_SOURCES
      SeatManager.cpp
      SignalHandler.cpp
      SocketServer.cpp

Added: head/x11/sddm/files/patch-src_daemon_DaemonApp.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-src_daemon_DaemonApp.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,22 @@
+On FreeBSD console-kit-daemon isn't started by the init system, so try to
+start it from sddm.
+
+--- src/daemon/DaemonApp.cpp.orig	2017-12-05 16:00:16 UTC
++++ src/daemon/DaemonApp.cpp
+@@ -28,6 +28,7 @@
+ 
+ #include "MessageHandler.h"
+ 
++#include <QDBusConnectionInterface>
+ #include <QDebug>
+ #include <QHostInfo>
+ #include <QTimer>
+@@ -48,6 +49,8 @@ namespace SDDM {
+ 
+         // set testing parameter
+         m_testing = (arguments().indexOf(QStringLiteral("--test-mode")) != -1);
++
++        QDBusConnection::systemBus().interface()->startService(QStringLiteral("org.freedesktop.ConsoleKit"));
+ 
+         // create display manager
+         m_displayManager = new DisplayManager(this);

Modified: head/x11/sddm/files/patch-src_daemon_Display.cpp
==============================================================================
--- head/x11/sddm/files/patch-src_daemon_Display.cpp	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-src_daemon_Display.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -2,7 +2,12 @@ VirtualTerminal for Wayland is only present on Linux a
 As we are only interested in an X11 session at the moment, we therefore
 can hide it behind a Q_OS_LINUX.
 
---- src/daemon/Display.cpp.orig	2016-08-28 11:54:03 UTC
+Only set XDG_CURRENT_DESKTOP and XDG_SESSION_DESKTOP if the xsession .desktop
+file defines DesktopNames.  Our xinitrc.desktop does not set it because that
+may confuse the desktop session started from ~/.xinitrc.  These environment
+variables are used for OnlyShowIn and NotShowIn in .desktop files.
+
+--- src/daemon/Display.cpp.orig	2017-12-05 16:00:16 UTC
 +++ src/daemon/Display.cpp
 @@ -30,7 +30,9 @@
  #include "Greeter.h"
@@ -14,7 +19,7 @@ can hide it behind a Q_OS_LINUX.
  
  #include <QDebug>
  #include <QFile>
-@@ -280,8 +282,10 @@ namespace SDDM {
+@@ -310,8 +312,10 @@ namespace SDDM {
  
          // create new VT for Wayland sessions otherwise use greeter vt
          int vt = terminalId();
@@ -25,7 +30,21 @@ can hide it behind a Q_OS_LINUX.
          m_lastSession.setVt(vt);
  
          QProcessEnvironment env;
-@@ -321,9 +325,11 @@ namespace SDDM {
+@@ -321,11 +325,13 @@ namespace SDDM {
+         env.insert(QStringLiteral("XDG_SEAT_PATH"), daemonApp->displayManager()->seatPath(seat()->name()));
+         env.insert(QStringLiteral("XDG_SESSION_PATH"), daemonApp->displayManager()->sessionPath(QStringLiteral("Session%1").arg(daemonApp->newSessionId())));
+         env.insert(QStringLiteral("DESKTOP_SESSION"), session.desktopSession());
++        if (!session.desktopNames().isEmpty())
+         env.insert(QStringLiteral("XDG_CURRENT_DESKTOP"), session.desktopNames());
+         env.insert(QStringLiteral("XDG_SESSION_CLASS"), QStringLiteral("user"));
+         env.insert(QStringLiteral("XDG_SESSION_TYPE"), session.xdgSessionType());
+         env.insert(QStringLiteral("XDG_SEAT"), seat()->name());
+ 
++        if (!session.desktopNames().isEmpty())
+         env.insert(QStringLiteral("XDG_SESSION_DESKTOP"), session.desktopNames());
+         if (seat()->name() == QLatin1String("seat0")) {
+             env.insert(QStringLiteral("XDG_VTNR"), QString::number(vt));
+@@ -366,9 +372,11 @@ namespace SDDM {
                  stateConfig.Last.Session.setDefault();
              stateConfig.save();
  

Added: head/x11/sddm/files/patch-src_daemon_LogindDBusTypes.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-src_daemon_LogindDBusTypes.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,13 @@
+Disable ConsoleKit seat management for now.  It is mistakenly assumed to have
+the same D-Bus interface as logind.
+
+--- src/daemon/LogindDBusTypes.cpp.orig	2017-12-05 16:00:16 UTC
++++ src/daemon/LogindDBusTypes.cpp
+@@ -58,6 +58,7 @@ LogindPathInternal::LogindPathInternal()
+         return;
+     }
+ 
++    if (0)
+     if (QDBusConnection::systemBus().interface()->isServiceRegistered(QStringLiteral("org.freedesktop.ConsoleKit"))) {
+         qDebug() << "Console kit interface found";
+         available = true;

Added: head/x11/sddm/files/patch-src_daemon_SignalHandler.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-src_daemon_SignalHandler.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,45 @@
+From 62d776518594f517dc59de3c87e53afdda339079 Mon Sep 17 00:00:00 2001
+From: Romain Labolle <ravomavain@gmail.com>
+Date: Sat, 3 Mar 2018 22:09:30 +0100
+Subject: [PATCH] Add SOCK_CLOEXEC to signal handling sockets
+
+SDDM is currennty leaking 8 sockets file descriptors to the user session.
+Adding the CLOEXEC flag to the fd to avoid thoses leaks.
+---
+ src/daemon/SignalHandler.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/daemon/SignalHandler.cpp b/src/daemon/SignalHandler.cpp
+index 5c536603..3054e635 100644
+--- src/daemon/SignalHandler.cpp.orig	2017-12-05 16:00:16 UTC
++++ src/daemon/SignalHandler.cpp
+@@ -34,25 +34,25 @@ namespace SDDM {
+     int sigusr1Fd[2];
+ 
+     SignalHandler::SignalHandler(QObject *parent) : QObject(parent) {
+-        if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sighupFd))
++        if (::socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sighupFd))
+             qCritical() << "Failed to create socket pair for SIGHUP handling.";
+ 
+         snhup = new QSocketNotifier(sighupFd[1], QSocketNotifier::Read, this);
+         connect(snhup, SIGNAL(activated(int)), this, SLOT(handleSighup()));
+ 
+-        if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigintFd))
++        if (::socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sigintFd))
+             qCritical() << "Failed to create socket pair for SIGINT handling.";
+ 
+         snint = new QSocketNotifier(sigintFd[1], QSocketNotifier::Read, this);
+         connect(snint, SIGNAL(activated(int)), this, SLOT(handleSigint()));
+ 
+-        if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd))
++        if (::socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sigtermFd))
+             qCritical() << "Failed to create socket pair for SIGTERM handling.";
+ 
+         snterm = new QSocketNotifier(sigtermFd[1], QSocketNotifier::Read, this);
+         connect(snterm, SIGNAL(activated(int)), this, SLOT(handleSigterm()));
+ 
+-        if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigusr1Fd))
++        if (::socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sigusr1Fd))
+             qCritical() << "Failed to create socket pair for SIGUSR1 handling.";
+ 
+         snusr1 = new QSocketNotifier(sigusr1Fd[1], QSocketNotifier::Read, this);

Modified: head/x11/sddm/files/patch-src_greeter_UserModel.cpp
==============================================================================
--- head/x11/sddm/files/patch-src_greeter_UserModel.cpp	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-src_greeter_UserModel.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,12 +1,12 @@
 Call 'setpwent' to rewind to the beginning of the passwd database.
 
---- src/greeter/UserModel.cpp.orig	2016-07-10 21:26:13 UTC
+--- src/greeter/UserModel.cpp.orig	2017-12-05 16:00:16 UTC
 +++ src/greeter/UserModel.cpp
 @@ -55,6 +55,7 @@ namespace SDDM {
-         const QString defaultFace = QStringLiteral("%1/.face.icon").arg(facesDir);
-
+         const QString defaultFace = QStringLiteral("file://%1/.face.icon").arg(facesDir);
+ 
          struct passwd *current_pw;
 +        setpwent();
          while ((current_pw = getpwent()) != nullptr) {
-
+ 
              // skip entries with uids smaller than minimum uid

Added: head/x11/sddm/files/patch-src_helper_HelperApp.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/patch-src_helper_HelperApp.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,48 @@
+--- src/helper/HelperApp.cpp.orig	2017-12-05 16:00:16 UTC
++++ src/helper/HelperApp.cpp
+@@ -33,8 +33,11 @@
+ #include <iostream>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
+ 
++#if defined(Q_OS_LINUX)
+ #include <utmp.h>
++#endif
+ #include <utmpx.h>
+ #include <QByteArray>
+ 
+@@ -301,12 +304,20 @@ namespace SDDM {
+ 
+         // append to failed login database btmp
+         if (!authSuccessful) {
++#if defined(Q_OS_FREEBSD)
++            pututxline(&entry);
++#else
+             updwtmpx("/var/log/btmp", &entry);
++#endif
+         }
+ 
+         // append to wtmp
+         else {
++#if defined(Q_OS_FREEBSD)
++            pututxline(&entry);
++#else
+             updwtmpx("/var/log/wtmp", &entry);
++#endif
+         }
+     }
+ 
+@@ -342,8 +353,12 @@ namespace SDDM {
+             qWarning() << "Failed to write utmpx: " << strerror(errno);
+         endutxent();
+ 
++#if defined(Q_OS_FREEBSD)
++        pututxline(&entry);
++#else
+         // append to wtmp
+         updwtmpx("/var/log/wtmp", &entry);
++#endif
+     }
+ }
+ 

Modified: head/x11/sddm/files/patch-src_helper_UserSession.cpp
==============================================================================
--- head/x11/sddm/files/patch-src_helper_UserSession.cpp	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/patch-src_helper_UserSession.cpp	Sat Sep  8 10:28:11 2018	(r479245)
@@ -1,12 +1,24 @@
-Include '<errno.h>' as 'errno' is used.
+Run sddm-greeter via the session command (Xsession script) so it also gets X
+resources and a ConsoleKit and D-Bus session.  The ConsoleKit session has its
+session-class set to "user" instead of "greeter" because ck-launch-session
+doesn't provide a way to change this.  ConsoleKit doesn't do anything with
+this value though so it is believed to be harmless.  The XDG_SESSION_CLASS
+environment variable does have the value "greeter".
 
---- src/helper/UserSession.cpp.orig	2016-07-06 14:00:10 UTC
+Remove double quotes because we fixed the use of "$@" in the script.
+
+--- src/helper/UserSession.cpp.orig	2017-12-05 16:00:16 UTC
 +++ src/helper/UserSession.cpp
-@@ -25,6 +25,7 @@
+@@ -45,10 +45,8 @@ namespace SDDM {
+     bool UserSession::start() {
+         QProcessEnvironment env = qobject_cast<HelperApp*>(parent())->session()->processEnvironment();
  
- #include <sys/types.h>
- #include <sys/ioctl.h>
-+#include <errno.h>
- #include <unistd.h>
- #include <pwd.h>
- #include <grp.h>
+-        if (env.value(QStringLiteral("XDG_SESSION_CLASS")) == QLatin1String("greeter")) {
+-            QProcess::start(m_path);
+-        } else if (env.value(QStringLiteral("XDG_SESSION_TYPE")) == QLatin1String("x11")) {
+-            const QString cmd = QStringLiteral("%1 \"%2\"").arg(mainConfig.X11.SessionCommand.get()).arg(m_path);
++        if (env.value(QStringLiteral("XDG_SESSION_TYPE")) == QLatin1String("x11")) {
++            const QString cmd = QStringLiteral("%1 %2").arg(mainConfig.X11.SessionCommand.get()).arg(m_path);
+             qInfo() << "Starting:" << cmd;
+             QProcess::start(cmd);
+         } else if (env.value(QStringLiteral("XDG_SESSION_TYPE")) == QLatin1String("wayland")) {

Modified: head/x11/sddm/files/sddm.in
==============================================================================
--- head/x11/sddm/files/sddm.in	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/files/sddm.in	Sat Sep  8 10:28:11 2018	(r479245)
@@ -19,28 +19,16 @@ load_rc_config ${name}
 : ${sddm_lang="en_US"} # .UTF-8 suffix will be added later to comply with locale format
 : ${sddm_enable="NO"}
 
-command="/usr/local/bin/sddm"
-pidfile="/var/run/sddm.pid"
+command="%%PREFIX%%/bin/sddm"
 start_cmd="sddm_start"
-stop_cmd="sddm_stop"
 
-# Creates /etc/sddm.conf after `sddm --example-config` if it's not there already.
-sddm_genconf()
-{
-	if [ ! -r /etc/sddm.conf ]; then
-		echo "Generating SDDM configuration."
-		${command} --example-config > /etc/sddm.conf
-	fi
-}
-
 sddm_start()
 {
 	echo "Starting ${name}."
 	local iter
-	sddm_genconf
 
 	( iter=0
-	while ! ps -axoargs | grep "^/usr/libexec/getty" | grep -qv grep > /dev/null 2>&1; do
+	while ! pgrep -f "^/usr/libexec/getty " > /dev/null; do
 		if [ ${iter} -eq 60 ]; then
 			break
 		fi
@@ -49,28 +37,19 @@ sddm_start()
 	done
 
 	if checkyesno hald_enable; then
-		if [ ! -x /usr/local/sbin/hald ]; then
+		if [ ! -x %%LOCALBASE%%/sbin/hald ]; then
 			err 1 "Hald does not seem to be installed."
 		fi
 
 		iter=0
 		while [ ${iter} -lt 60 ] &&
-			!pgrep -f "^/usr/local/sbin/hald" > /dev/null 2>&1; do
+			! pgrep -f "^%%LOCALBASE%%/sbin/hald" > /dev/null; do
 			sleep 1
 			iter=$((${iter} + 1))
 		done
 	fi
 
 	LANG=${sddm_lang}.UTF-8 ${command} ${sddm_flags} ) &
-}
-
-# Only takes the user back to the sddm screen when run from X
-sddm_stop()
-{
-	echo "Stopping ${name}."
-	/bin/kill -9 $(/bin/cat "${pidfile}")
-	pkill -9 -U ${name}
-	pkill -9 X
 }
 
 run_rc_command "$1"

Added: head/x11/sddm/files/xinitrc.desktop.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11/sddm/files/xinitrc.desktop.in	Sat Sep  8 10:28:11 2018	(r479245)
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=XSession
+Exec=%%PREFIX%%/share/sddm/scripts/xinit-session
+TryExec=%%PREFIX%%/share/sddm/scripts/xinit-session
+Name=User Session

Modified: head/x11/sddm/pkg-plist
==============================================================================
--- head/x11/sddm/pkg-plist	Sat Sep  8 10:04:17 2018	(r479244)
+++ head/x11/sddm/pkg-plist	Sat Sep  8 10:28:11 2018	(r479245)
@@ -4,7 +4,7 @@ etc/dbus-1/system.d/org.freedesktop.DisplayManager.con
 etc/pam.d/sddm
 etc/pam.d/sddm-autologin
 etc/pam.d/sddm-greeter
-etc/sddm.conf
+@sample etc/sddm.conf.sample
 %%QT_QMLDIR%%/SddmComponents/Background.qml
 %%QT_QMLDIR%%/SddmComponents/Button.qml
 %%QT_QMLDIR%%/SddmComponents/Clock.qml
@@ -132,33 +132,52 @@ libexec/sddm-helper
 %%DATADIR%%/themes/maldives/metadata.desktop
 %%DATADIR%%/themes/maldives/rectangle.png
 %%DATADIR%%/themes/maldives/theme.conf
+%%DATADIR%%/themes/maya/LICENSE
+%%DATADIR%%/themes/maya/Main.qml
+%%DATADIR%%/themes/maya/README
+%%DATADIR%%/themes/maya/components/SpButton.qml
+%%DATADIR%%/themes/maya/components/SpClock.qml
+%%DATADIR%%/themes/maya/fonts/OpenSans_CondLight.ttf
+%%DATADIR%%/themes/maya/images/ic_arrow_drop_down_white_24px.svg
+%%DATADIR%%/themes/maya/images/ic_power_settings_new_white_24px.svg
+%%DATADIR%%/themes/maya/images/ic_refresh_white_24px.svg
+%%DATADIR%%/themes/maya/images/ic_warning_white_24px.svg
+%%DATADIR%%/themes/maya/metadata.desktop
+%%DATADIR%%/themes/maya/screenshots/hi_IN.png
+%%DATADIR%%/themes/maya/theme.conf
 %%DATADIR%%/translations/ar.qm
 %%DATADIR%%/translations/ca.qm
 %%DATADIR%%/translations/cs.qm
+%%DATADIR%%/translations/da.qm
 %%DATADIR%%/translations/de.qm
 %%DATADIR%%/translations/es.qm
 %%DATADIR%%/translations/et.qm
 %%DATADIR%%/translations/fi.qm
 %%DATADIR%%/translations/fr.qm
+%%DATADIR%%/translations/hi_IN.qm
 %%DATADIR%%/translations/hu.qm
 %%DATADIR%%/translations/it.qm
 %%DATADIR%%/translations/ja.qm
+%%DATADIR%%/translations/kk.qm
 %%DATADIR%%/translations/ko.qm
 %%DATADIR%%/translations/lt.qm
 %%DATADIR%%/translations/lv.qm
 %%DATADIR%%/translations/nb.qm
+%%DATADIR%%/translations/nl.qm
 %%DATADIR%%/translations/nn.qm
 %%DATADIR%%/translations/pl.qm
 %%DATADIR%%/translations/pt_BR.qm
 %%DATADIR%%/translations/pt_PT.qm
 %%DATADIR%%/translations/ro.qm
 %%DATADIR%%/translations/ru.qm
+%%DATADIR%%/translations/sk.qm
 %%DATADIR%%/translations/sr.qm
 %%DATADIR%%/translations/sr@ijekavian.qm
 %%DATADIR%%/translations/sr@ijekavianlatin.qm
 %%DATADIR%%/translations/sr@latin.qm
 %%DATADIR%%/translations/sv.qm
 %%DATADIR%%/translations/tr.qm
+%%DATADIR%%/translations/uk.qm
 %%DATADIR%%/translations/zh_CN.qm
 %%DATADIR%%/translations/zh_TW.qm
 share/xsessions/xinitrc.desktop



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809081028.w88ASCYt075396>