Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sddm for openSUSE:Factory checked in at 2024-03-11 15:27:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sddm (Old) and /work/SRC/openSUSE:Factory/.sddm.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sddm" Mon Mar 11 15:27:18 2024 rev:68 rq:1151254 version:0.21.0 Changes: -------- --- /work/SRC/openSUSE:Factory/sddm/sddm.changes 2024-02-01 18:04:12.452574650 +0100 +++ /work/SRC/openSUSE:Factory/.sddm.new.1770/sddm.changes 2024-03-11 15:29:47.989282399 +0100 @@ -1,0 +2,25 @@ +Mon Feb 26 11:17:45 UTC 2024 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to 0.21.0: + + sddm-greeter can now be built for both Qt5 and Qt6 + + Themes can now declare their Qt version compatibility to control which greeter gets used + + New CMake option INSTALL_PAM_CONFIGURATION (defaults to ON) + + Bulgarian translation added + * DBus policy files are now installed in /usr rather than /etc + * Do not show keyboard layouts on wayland as switching is not implemented + * Switch the default commandline for Weston to use the kiosk shell (available in 9.0+) + - Fix building with Qt 6.7 + - Handle autologin failure by falling back to the greeter (#1775) + - Fix session names containing ',' (#1745) + - Don't let tmpfiles delete x11 auth files for very long running sessions + - Many improvements for the **experimental** wayland support +- Drop patches, now upstream: + * 0001-Session-Parse-.desktop-files-manually-again.patch + * 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch + * 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch + * 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch + * 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch + * 0003-Let-themes-specify-the-used-version-of-Qt.patch +- Remove leftover sddm.obsinfo file + +------------------------------------------------------------------- Old: ---- 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch 0001-Session-Parse-.desktop-files-manually-again.patch 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch 0003-Let-themes-specify-the-used-version-of-Qt.patch sddm-0.20.0.tar.gz sddm.obsinfo New: ---- sddm-0.21.0.tar.gz BETA DEBUG BEGIN: Old: * 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch * 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch * 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch Old:- Drop patches, now upstream: * 0001-Session-Parse-.desktop-files-manually-again.patch * 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch Old: * 0001-Session-Parse-.desktop-files-manually-again.patch * 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch * 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch Old: * 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch * 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch * 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch Old: * 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch * 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch * 0003-Let-themes-specify-the-used-version-of-Qt.patch Old: * 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch * 0003-Let-themes-specify-the-used-version-of-Qt.patch - Remove leftover sddm.obsinfo file BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sddm.spec ++++++ --- /var/tmp/diff_new_pack.3ZFnKe/_old 2024-03-11 15:29:48.697308383 +0100 +++ /var/tmp/diff_new_pack.3ZFnKe/_new 2024-03-11 15:29:48.697308383 +0100 @@ -1,7 +1,7 @@ # # spec file for package sddm # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -40,7 +40,7 @@ %else Name: sddm-qt6 %endif -Version: 0.20.0 +Version: 0.21.0 Release: 0 Summary: QML-based display manager (Qt%{qtver}) License: GPL-2.0-or-later @@ -59,16 +59,6 @@ Source21: sddm-autologin.pam Source22: sddm-greeter.pam # Patch0-100: PATCH-FIX-UPSTREAM -# https://github.com/sddm/sddm/pull/1746 -Patch0: 0001-Session-Parse-.desktop-files-manually-again.patch -# https://github.com/sddm/sddm/pull/1753 -Patch1: 0001-greeter-Look-at-WAYLAND_DISPLAY-for-platform-detecti.patch -Patch2: 0002-Ignore-InputMethod-qtvirtualkeyboard-on-wayland.patch -# https://github.com/sddm/sddm/pull/1792 -Patch3: 0001-Drop-unnecessary-ECM-dependency-and-dead-uninstall-t.patch -# https://github.com/sddm/sddm/pull/1789 -Patch4: 0002-Make-sddm-greeter-for-Qt-5-and-Qt-6-coinstallable.patch -Patch5: 0003-Let-themes-specify-the-used-version-of-Qt.patch # Patch100-?: PATCH-FIX-OPENSUSE Patch101: 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch Patch102: 0001-Set-XAUTHLOCALHOSTNAME-in-sessions.patch @@ -113,7 +103,7 @@ %sysusers_requires BuildRequires: update-alternatives Requires(post): %{_sbindir}/update-alternatives -Requires(postun):%{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Requires: %{name}-branding = %{version} Requires: sddm-greeter-qt%{qtver} = %{version} Requires: xdm @@ -198,6 +188,7 @@ -DRUNTIME_DIR="/run/sddm" \ -DPID_FILE="/run/sddm.pid" \ -DLOGIN_DEFS_PATH:path="${LOGIN_DEFS_PATH}" \ + -DINSTALL_PAM_CONFIGURATION:BOOL=OFF \ %if 0%{?suse_version} <= 1500 -DCMAKE_C_COMPILER:STRING=gcc-13 \ -DCMAKE_CXX_COMPILER:STRING=g++-13 \ @@ -222,7 +213,6 @@ %endif # Install PAM config - rm -r %{buildroot}%{_sysconfdir}/pam.d # Remove sddm's config, for debian only pam_dest="%{?_pam_vendordir}%{!?_pam_vendordir:%{_sysconfdir}/pam.d}" install -Dm 0644 %{SOURCE20} %{buildroot}${pam_dest}/sddm install -Dm 0644 %{SOURCE21} %{buildroot}${pam_dest}/sddm-autologin ++++++ sddm-0.20.0.tar.gz -> sddm-0.21.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/.github/workflows/checks.yml new/sddm-0.21.0/.github/workflows/checks.yml --- old/sddm-0.20.0/.github/workflows/checks.yml 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/.github/workflows/checks.yml 2024-02-26 11:23:03.000000000 +0100 @@ -14,28 +14,7 @@ - reopened - edited -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: -# No longer works as of 2020-11-03 due to npm 7.0.3 -> 7.0.7 -# wip: -# if: "!contains(github.event.head_commit.message, 'ci skip') && github.event_name == 'pull_request'" -# runs-on: ubuntu-latest -# steps: -# - name: Work in progress -# uses: wip/action@master - xdg: - if: "!contains(github.event.head_commit.message, 'ci skip')" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - name: Validate XDG files - uses: liri-infra/xdg-validator-action@master - with: - strict: false qml: if: "!contains(github.event.head_commit.message, 'ci skip')" runs-on: ubuntu-latest @@ -44,4 +23,6 @@ with: fetch-depth: 1 - name: Validate QML and JavaScript files - uses: liri-infra/qmllint-action@master + uses: liri-infra/qmllint-action@8bfbc8ec90b2f48147db9b47403448eda7b20a31 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/CMakeLists.txt new/sddm-0.21.0/CMakeLists.txt --- old/sddm-0.20.0/CMakeLists.txt 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/CMakeLists.txt 2024-02-26 11:23:03.000000000 +0100 @@ -8,34 +8,23 @@ # Set version set(SDDM_VERSION_MAJOR 0) -set(SDDM_VERSION_MINOR 20) +set(SDDM_VERSION_MINOR 21) set(SDDM_VERSION_PATCH 0) set(SDDM_VERSION_STRING "${SDDM_VERSION_MAJOR}.${SDDM_VERSION_MINOR}.${SDDM_VERSION_PATCH}") add_compile_definitions("SDDM_VERSION=\"${SDDM_VERSION_STRING}\"") -# Set up packaging -set(CPACK_PACKAGE_NAME "sddm") -set(CPACK_PACKAGE_VERSION "${SDDM_VERSION_STRING}") -set(CPACK_GENERATOR "TGZ") -set(CPACK_SET_DESTDIR FALSE) -set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") -set(CPACK_SOURCE_IGNORE_FILES "/build/;/.git;/*.user;/.tx/;~$;${CPACK_SOURCE_IGNORE_FILES}") -include(CPack) -add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) - # Options option(BUILD_MAN_PAGES "Build man pages" OFF) option(ENABLE_JOURNALD "Enable logging to journald" ON) option(NO_SYSTEMD "Disable systemd support" OFF) option(USE_ELOGIND "Use elogind instead of logind" OFF) option(BUILD_WITH_QT6 "Build with Qt 6" OFF) +option(INSTALL_PAM_CONFIGURATION "Install PAM configuration files" ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -# ECM -find_package(ECM 1.4.0 REQUIRED NO_MODULE) -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH};${ECM_MODULE_PATH}") +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") # Definitions add_definitions(-Wall -Wextra -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_FOREACH) @@ -102,14 +91,6 @@ execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_INSTALL_QML OUTPUT_VARIABLE QT_IMPORTS_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) endif() -# Uninstall target -if ("${ECM_VERSION}" VERSION_LESS "1.7.0") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) - add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -endif() - # systemd if(NOT NO_SYSTEMD AND NOT USE_ELOGIND) pkg_check_modules(SYSTEMD "systemd") @@ -191,7 +172,7 @@ # Set constants set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm" CACHE PATH "System application data install directory") -set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d" CACHE PATH "DBus config files directory") +set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_FULL_DATADIR}/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 "${RUNTIME_DIR_DEFAULT}" CACHE PATH "Runtime data storage directory") set(QML_INSTALL_DIR "${QT_IMPORTS_DIR}" CACHE PATH "QML component installation directory") @@ -205,7 +186,7 @@ set(SYSTEM_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/sddm/sddm.conf.d" CACHE PATH "Path of the system sddm config directory") 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") +set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations-qt${QT_MAJOR_VERSION}" CACHE PATH "Components translations directory") set(SDDM_INITIAL_VT "1" CACHE STRING "Initial tty to use") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/ChangeLog new/sddm-0.21.0/ChangeLog --- old/sddm-0.20.0/ChangeLog 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/ChangeLog 2024-02-26 11:23:03.000000000 +0100 @@ -4,6 +4,21 @@ - Bug fixes * Others +## 0.21.0 +---------------------- + + sddm-greeter can now be built for both Qt5 and Qt6 + + Themes can now declare their Qt version compatibility to control which greeter gets used + + New CMake option INSTALL_PAM_CONFIGURATION (defaults to ON) + + Bulgarian translation added + * DBus policy files are now installed in /usr rather than /etc + * Do not show keyboard layouts on wayland as switching is not implemented + * Switch the default commandline for Weston to use the kiosk shell (available in 9.0+) + - Fix building with Qt 6.7 + - Handle autologin failure by falling back to the greeter (#1775) + - Fix session names containing ',' (#1745) + - Don't let tmpfiles delete x11 auth files for very long running sessions + - Many improvements for the **experimental** wayland support + ## 0.20.0 - 2023-06-23 ---------------------- + Initial Qt6 support (Will break themes which rely on Qt 5) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/cmake/cmake_uninstall.cmake.in new/sddm-0.21.0/cmake/cmake_uninstall.cmake.in --- old/sddm-0.20.0/cmake/cmake_uninstall.cmake.in 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/cmake/cmake_uninstall.cmake.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") - -file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -string(REGEX REPLACE "\n" ";" files "${files}") -list(REVERSE files) -foreach (file ${files}) - message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") - if (EXISTS "$ENV{DESTDIR}${file}") - execute_process( - COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" - OUTPUT_VARIABLE rm_out - RESULT_VARIABLE rm_retval - ) - if(NOT ${rm_retval} EQUAL 0) - message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") - endif (NOT ${rm_retval} EQUAL 0) - else (EXISTS "$ENV{DESTDIR}${file}") - message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") - endif (EXISTS "$ENV{DESTDIR}${file}") -endforeach(file) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/interfaces/org.freedesktop.login1.Seat.xml new/sddm-0.21.0/data/interfaces/org.freedesktop.login1.Seat.xml --- old/sddm-0.20.0/data/interfaces/org.freedesktop.login1.Seat.xml 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/interfaces/org.freedesktop.login1.Seat.xml 2024-02-26 11:23:03.000000000 +0100 @@ -17,7 +17,7 @@ <property name="CanGraphical" type="b" access="read"> </property> <property name="Sessions" type="a(so)" access="read"> - <annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/> </property> <property name="IdleHint" type="b" access="read"> </property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/interfaces/org.freedesktop.login1.User.xml new/sddm-0.21.0/data/interfaces/org.freedesktop.login1.User.xml --- old/sddm-0.20.0/data/interfaces/org.freedesktop.login1.User.xml 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/interfaces/org.freedesktop.login1.User.xml 2024-02-26 11:23:03.000000000 +0100 @@ -33,7 +33,7 @@ <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/> </property> <property name="Sessions" type="a(so)" access="read"> - <annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<NamedSessionPath>"/> </property> <property name="IdleHint" type="b" access="read"> </property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/man/sddm.conf.rst.in new/sddm-0.21.0/data/man/sddm.conf.rst.in --- old/sddm-0.20.0/data/man/sddm.conf.rst.in 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/man/sddm.conf.rst.in 2024-02-26 11:23:03.000000000 +0100 @@ -170,7 +170,7 @@ `CompositorCommand=` Path of the compositor to execute when starting the greeter. - Default value is "weston --shell=fullscreen-shell.so". + Default value is "weston --shell=kiosk". `SessionDir=` Comma-separated list of directories containing session files. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/translations/CMakeLists.txt new/sddm-0.21.0/data/translations/CMakeLists.txt --- old/sddm-0.20.0/data/translations/CMakeLists.txt 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/translations/CMakeLists.txt 2024-02-26 11:23:03.000000000 +0100 @@ -1,5 +1,6 @@ set(TRANSLATION_FILES ar.ts + bg.ts bn.ts ca.ts cs.ts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/translations/bg.ts new/sddm-0.21.0/data/translations/bg.ts --- old/sddm-0.20.0/data/translations/bg.ts 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/data/translations/bg.ts 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bg"> +<context> + <name>PictureBox</name> + <message> + <source>Press to login</source> + <translation>ÐаÑиÑнеÑе, за да влезеÑе</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <source>%1 (Wayland)</source> + <translation>%1 (Wayland)</translation> + </message> +</context> +<context> + <name>TextConstants</name> + <message> + <source>Welcome to %1</source> + <translation>ÐобÑе доÑли в %1</translation> + </message> + <message> + <source>Warning, Caps Lock is ON!</source> + <translation>Ðнимание, Caps Lock е вклÑÑен!</translation> + </message> + <message> + <source>Layout</source> + <translation>ÐлавиаÑÑÑа</translation> + </message> + <message> + <source>Login</source> + <translation>Ðлизане</translation> + </message> + <message> + <source>Login failed</source> + <translation>ÐеÑÑпеÑно влизане</translation> + </message> + <message> + <source>Login succeeded</source> + <translation>УÑпеÑно влизане</translation> + </message> + <message> + <source>Password</source> + <translation>ÐаÑола</translation> + </message> + <message> + <source>Enter your username and password</source> + <translation>ÐÑведеÑе поÑÑебиÑелÑко име и паÑола</translation> + </message> + <message> + <source>Reboot</source> + <translation>РеÑÑаÑÑиÑане</translation> + </message> + <message> + <source>Suspend</source> + <translation>ÐÑиÑпиване</translation> + </message> + <message> + <source>Hibernate</source> + <translation>ÐÑлбоко заÑпиване</translation> + </message> + <message> + <source>Session</source> + <translation>СеÑиÑ</translation> + </message> + <message> + <source>Shutdown</source> + <translation>ÐзклÑÑване</translation> + </message> + <message> + <source>Username</source> + <translation>ÐоÑÑебиÑелÑко име</translation> + </message> + <message> + <source>Enter your username</source> + <translation>ÐÑведеÑе поÑÑебиÑелÑкоÑо Ñи име</translation> + </message> + <message> + <source>Enter your password</source> + <translation>ÐÑведеÑе паÑолаÑа Ñи</translation> + </message> + <message> + <source>Select your user and enter password</source> + <translation>ÐзбеÑеÑе поÑÑебиÑел и вÑведеÑе паÑола</translation> + </message> + <message> + <source>Show password</source> + <translation>Ðоказване на паÑола</translation> + </message> + <message> + <source>Hide password</source> + <translation>СкÑиване на паÑола</translation> + </message> + <message> + <source>Please enter a password!</source> + <translation>ÐолÑ, вÑведеÑе паÑола!</translation> + </message> + <message> + <source>Change password</source> + <translation>ÐÑомÑна на паÑола</translation> + </message> + <message> + <source>Password:</source> + <translation>ÐаÑола:</translation> + </message> + <message> + <source>Password change aborted because maximum tries reached</source> + <translation>ÐÑомÑнаÑа на паÑолаÑа е пÑекÑаÑена, ÑÑй каÑо е доÑÑÐ¸Ð³Ð½Ð°Ñ Ð¼Ð°ÐºÑÐ¸Ð¼Ð°Ð»Ð½Ð¸Ñ Ð±Ñой опиÑи</translation> + </message> + <message> + <source>New password change round! Please input current password again!</source> + <translation>Ðов ÑÑнд за пÑомÑна на паÑолаÑа! ÐолÑ, вÑведеÑе ÑекÑÑаÑа паÑола оÑново!</translation> + </message> +</context> +</TS> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/translations/pt_BR.ts new/sddm-0.21.0/data/translations/pt_BR.ts --- old/sddm-0.20.0/data/translations/pt_BR.ts 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/translations/pt_BR.ts 2024-02-26 11:23:03.000000000 +0100 @@ -5,14 +5,14 @@ <name>PictureBox</name> <message> <source>Press to login</source> - <translation type="unfinished"></translation> + <translation>Aperte para fazer login</translation> </message> </context> <context> <name>QObject</name> <message> <source>%1 (Wayland)</source> - <translation type="unfinished"></translation> + <translation>%1 (Wayland)</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/data/translations/pt_PT.ts new/sddm-0.21.0/data/translations/pt_PT.ts --- old/sddm-0.20.0/data/translations/pt_PT.ts 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/data/translations/pt_PT.ts 2024-02-26 11:23:03.000000000 +0100 @@ -5,14 +5,14 @@ <name>PictureBox</name> <message> <source>Press to login</source> - <translation type="unfinished"></translation> + <translation>Pressione para fazer login</translation> </message> </context> <context> <name>QObject</name> <message> <source>%1 (Wayland)</source> - <translation type="unfinished"></translation> + <translation>%1 (Wayland)</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/services/CMakeLists.txt new/sddm-0.21.0/services/CMakeLists.txt --- old/sddm-0.20.0/services/CMakeLists.txt 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/services/CMakeLists.txt 2024-02-26 11:23:03.000000000 +0100 @@ -19,17 +19,23 @@ endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sddm-greeter.pam.in" "${CMAKE_CURRENT_BINARY_DIR}/sddm-greeter.pam") -if(EXISTS "/etc/debian_version") - install(FILES debian.sddm-autologin.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) - install(FILES debian.sddm-greeter.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-greeter) - install(FILES debian.sddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm) -else() - if(HAVE_PAM_FAILLOCK) - install(FILES sddm-autologin.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) +if(INSTALL_PAM_CONFIGURATION) + if(EXISTS "/etc/debian_version") + install(FILES debian.sddm-autologin.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) + install(FILES debian.sddm-greeter.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-greeter) + install(FILES debian.sddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm) + elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + install(FILES freebsd.sddm-autologin.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) + install(FILES freebsd.sddm-greeter.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-greeter) + install(FILES freebsd.sddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm) else() - install(FILES sddm-autologin-tally2.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) - endif() + if(HAVE_PAM_FAILLOCK) + install(FILES sddm-autologin.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) + else() + install(FILES sddm-autologin-tally2.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-autologin) + endif() - install(FILES sddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sddm-greeter.pam" DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-greeter) + install(FILES sddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sddm-greeter.pam" DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME sddm-greeter) + endif() endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/services/freebsd.sddm-autologin.pam new/sddm-0.21.0/services/freebsd.sddm-autologin.pam --- old/sddm-0.20.0/services/freebsd.sddm-autologin.pam 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/services/freebsd.sddm-autologin.pam 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,12 @@ +#%PAM-1.0 +auth required pam_permit.so +#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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/services/freebsd.sddm-greeter.pam new/sddm-0.21.0/services/freebsd.sddm-greeter.pam --- old/sddm-0.20.0/services/freebsd.sddm-greeter.pam 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/services/freebsd.sddm-greeter.pam 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,13 @@ +#%PAM-1.0 + +# Always let the greeter start without authentication +auth required pam_permit.so + +# No action required for account management +account required pam_permit.so + +# Can't change password +password required pam_deny.so + +# Setup session +session required pam_permit.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/services/freebsd.sddm.pam new/sddm-0.21.0/services/freebsd.sddm.pam --- old/sddm-0.20.0/services/freebsd.sddm.pam 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/services/freebsd.sddm.pam 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,14 @@ +#%PAM-1.0 + +auth include login +#auth optional pam_gnome_keyring.so +#auth optional pam_kwallet5.so + +account include login + +password include login +#password optional pam_gnome_keyring.so use_authtok + +session include login +#session optional pam_gnome_keyring.so auto_start +#session optional pam_kwallet5.so auto_start diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/services/sddm-tmpfiles.conf.in new/sddm-0.21.0/services/sddm-tmpfiles.conf.in --- old/sddm-0.20.0/services/sddm-tmpfiles.conf.in 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/services/sddm-tmpfiles.conf.in 2024-02-26 11:23:03.000000000 +0100 @@ -6,3 +6,9 @@ r! /tmp/sddm-auth* # xauth files passed to user sessions r! /tmp/xauth_* +# "r!" above means to remove the files if existent (r), but only at boot (!). +# tmpfiles.d/tmp.conf declares a periodic cleanup of old /tmp/ files, which +# would ordinarily result in the deletion of our xauth files. To prevent that +# from happening, explicitly tag these as X (ignore). +X /tmp/sddm-auth* +X /tmp/xauth_* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/common/Configuration.h new/sddm-0.21.0/src/common/Configuration.h --- old/sddm-0.20.0/src/common/Configuration.h 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/common/Configuration.h 2024-02-26 11:23:03.000000000 +0100 @@ -78,7 +78,7 @@ ); Section(Wayland, - Entry(CompositorCommand, QString, _S("weston --shell=fullscreen-shell.so"), _S("Path of the Wayland compositor to execute when starting the greeter")); + Entry(CompositorCommand, QString, _S("weston --shell=kiosk"), _S("Path of the Wayland compositor to execute when starting the greeter")); Entry(SessionDir, QStringList, {_S("/usr/local/share/wayland-sessions"), _S("/usr/share/wayland-sessions")}, _S("Comma-separated list of directories containing available Wayland sessions")); Entry(SessionCommand, QString, _S(WAYLAND_SESSION_COMMAND), _S("Path to a script to execute when starting the desktop session")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/common/Session.cpp new/sddm-0.21.0/src/common/Session.cpp --- old/sddm-0.20.0/src/common/Session.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/common/Session.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -34,6 +34,56 @@ const QString s_entryExtention = QStringLiteral(".desktop"); namespace SDDM { + // QSettings::IniFormat can't be used to read .desktop files due to different + // syntax of values (escape sequences, quoting, automatic QStringList detection). + // So implement yet another .desktop file parser. + class DesktopFileFormat { + static bool readFunc(QIODevice &device, QSettings::SettingsMap &map) + { + QString currentSectionName; + while(!device.atEnd()) + { + // Iterate each line, remove line terminators + const auto line = device.readLine().replace("\r", "").replace("\n", ""); + if(line.isEmpty() || line.startsWith('#')) + continue; // Ignore empty lines and comments + + if(line.startsWith('[')) // Section header + { + // Remove [ and ]. + currentSectionName = QString::fromUtf8(line.mid(1, line.length() - 2)); + } + else if(int equalsPos = line.indexOf('='); equalsPos > 0) // Key=Value + { + const auto key = QString::fromUtf8(line.left(equalsPos)); + + // Read the value, handle escape sequences + auto valueBytes = line.mid(equalsPos + 1); + valueBytes.replace("\\s", " ").replace("\\n", "\n"); + valueBytes.replace("\\t", "\t").replace("\\r", "\r"); + valueBytes.replace("\\\\", "\\"); + + auto value = QString::fromUtf8(valueBytes); + map.insert(currentSectionName + QLatin1Char('/') + key, value); + } + } + + return true; + } + public: + // Register the .desktop file format if necessary, return its id. + static QSettings::Format format() + { + static QSettings::Format s_format = QSettings::InvalidFormat; + if (s_format == QSettings::InvalidFormat) + s_format = QSettings::registerFormat(QStringLiteral("desktop"), + DesktopFileFormat::readFunc, nullptr, + Qt::CaseSensitive); + + return s_format; + } + }; + Session::Session() : m_valid(false) , m_type(UnknownSession) @@ -169,7 +219,7 @@ if (!file.isOpen()) return; - QSettings settings(m_fileName, QSettings::IniFormat); + QSettings settings(m_fileName, DesktopFileFormat::format()); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) settings.setIniCodec("UTF-8"); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/common/ThemeMetadata.cpp new/sddm-0.21.0/src/common/ThemeMetadata.cpp --- old/sddm-0.20.0/src/common/ThemeMetadata.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/common/ThemeMetadata.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -28,6 +28,7 @@ QString mainScript { QStringLiteral("Main.qml") }; QString configFile; QString translationsDirectory { QStringLiteral(".") }; + int qtVersion = 5; }; ThemeMetadata::ThemeMetadata(const QString &path, QObject *parent) : QObject(parent), d(new ThemeMetadataPrivate()) { @@ -50,11 +51,16 @@ return d->translationsDirectory; } + int ThemeMetadata::qtVersion() const { + return d->qtVersion; + } + void ThemeMetadata::setTo(const QString &path) { QSettings settings(path, QSettings::IniFormat); // read values d->mainScript = settings.value(QStringLiteral("SddmGreeterTheme/MainScript"), QStringLiteral("Main.qml")).toString(); d->configFile = settings.value(QStringLiteral("SddmGreeterTheme/ConfigFile"), QStringLiteral("theme.conf")).toString(); d->translationsDirectory = settings.value(QStringLiteral("SddmGreeterTheme/TranslationsDirectory"), QStringLiteral(".")).toString(); + d->qtVersion = settings.value(QStringLiteral("SddmGreeterTheme/QtVersion"), 5).toInt(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/common/ThemeMetadata.h new/sddm-0.21.0/src/common/ThemeMetadata.h --- old/sddm-0.20.0/src/common/ThemeMetadata.h 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/common/ThemeMetadata.h 2024-02-26 11:23:03.000000000 +0100 @@ -36,6 +36,7 @@ const QString &mainScript() const; const QString &configFile() const; const QString &translationsDirectory() const; + int qtVersion() const; void setTo(const QString &path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/daemon/Display.cpp new/sddm-0.21.0/src/daemon/Display.cpp --- old/sddm-0.20.0/src/daemon/Display.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/daemon/Display.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -224,38 +224,10 @@ session.setTo(sessionType, autologinSession); m_auth->setAutologin(true); - startAuth(mainConfig.Autologin.User.get(), QString(), session); - - return true; + return startAuth(mainConfig.Autologin.User.get(), QString(), session); } - void Display::displayServerStarted() { - // check flag - if (m_started) - return; - - // setup display - m_displayServer->setupDisplay(); - - // log message - qDebug() << "Display server started."; - - if ((daemonApp->first || mainConfig.Autologin.Relogin.get()) && - !mainConfig.Autologin.User.get().isEmpty()) { - // reset first flag - daemonApp->first = false; - - // set flags - m_started = true; - - bool success = attemptAutologin(); - if (success) { - return; - } else { - qWarning() << "Autologin failed!"; - } - } - + void Display::startSocketServerAndGreeter() { // start socket server m_socketServer->start(m_displayServer->display()); @@ -283,6 +255,41 @@ m_started = true; } + void Display::handleAutologinFailure() { + qWarning() << "Autologin failed!"; + m_auth->setAutologin(false); + startSocketServerAndGreeter(); + } + + void Display::displayServerStarted() { + // check flag + if (m_started) + return; + + // setup display + m_displayServer->setupDisplay(); + + // log message + qDebug() << "Display server started."; + + if ((daemonApp->first || mainConfig.Autologin.Relogin.get()) && + !mainConfig.Autologin.User.get().isEmpty()) { + // reset first flag + daemonApp->first = false; + + // set flags + m_started = true; + + const bool autologinStarted = attemptAutologin(); + if (!autologinStarted) + handleAutologinFailure(); + + return; + } + + startSocketServerAndGreeter(); + } + void Display::stop() { // check flag if (!m_started) @@ -365,11 +372,11 @@ return false; } - void Display::startAuth(const QString &user, const QString &password, const Session &session) { + bool Display::startAuth(const QString &user, const QString &password, const Session &session) { if (m_auth->isActive()) { qWarning() << "Existing authentication ongoing, aborting"; - return; + return false; } m_passPhrase = password; @@ -377,15 +384,15 @@ // sanity check if (!session.isValid()) { qCritical() << "Invalid session" << session.fileName(); - return; + return false; } if (session.xdgSessionType().isEmpty()) { qCritical() << "Failed to find XDG session type for session" << session.fileName(); - return; + return false; } if (session.exec().isEmpty()) { qCritical() << "Failed to find command for session" << session.fileName(); - return; + return false; } m_reuseSessionId = QString(); @@ -451,9 +458,16 @@ } m_auth->insertEnvironment(env); m_auth->start(); + + return true; } void Display::slotAuthenticationFinished(const QString &user, bool success) { + if (m_auth->autologin() && !success) { + handleAutologinFailure(); + return; + } + if (success) { qDebug() << "Authentication for user " << user << " successful"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/daemon/Display.h new/sddm-0.21.0/src/daemon/Display.h --- old/sddm-0.20.0/src/daemon/Display.h 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/daemon/Display.h 2024-02-26 11:23:03.000000000 +0100 @@ -86,9 +86,12 @@ QString findGreeterTheme() const; bool findSessionEntry(const QStringList &dirPaths, const QString &name) const; - void startAuth(const QString &user, const QString &password, + bool startAuth(const QString &user, const QString &password, const Session &session); + void startSocketServerAndGreeter(); + void handleAutologinFailure(); + DisplayServerType m_displayServerType = X11DisplayServerType; bool m_relogin { true }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/daemon/Greeter.cpp new/sddm-0.21.0/src/daemon/Greeter.cpp --- old/sddm-0.20.0/src/daemon/Greeter.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/daemon/Greeter.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -80,11 +80,26 @@ m_displayServerCmd = cmd; } + QString Greeter::greeterPathForQt(int qtVersion) + { + const QString suffix = qtVersion == 5 ? QString() : QStringLiteral("-qt%1").arg(qtVersion); + return QStringLiteral(BIN_INSTALL_DIR "/sddm-greeter%1").arg(suffix); + } + bool Greeter::start() { // check flag if (m_started) return false; + // If no theme is given, use the default theme of the default greeter version + const int themeQtVersion = m_themePath.isEmpty() ? (QT_VERSION >> 16) : m_metadata->qtVersion(); + QString greeterPath = greeterPathForQt(themeQtVersion); + if (!QFileInfo(greeterPath).isExecutable()) { + qWarning() << "The theme at" << m_themePath << "requires missing" << greeterPath << ". Using fallback theme."; + setTheme(QString()); + greeterPath = greeterPathForQt(QT_VERSION >> 16); + } + // themes QString xcursorTheme = mainConfig.Theme.CursorTheme.get(); if (m_themeConfig->contains(QLatin1String("cursorTheme"))) @@ -139,7 +154,7 @@ m_process->setProcessEnvironment(env); } // Greeter command - m_process->start(QStringLiteral("%1/sddm-greeter").arg(QStringLiteral(BIN_INSTALL_DIR)), args); + m_process->start(greeterPath, args); //if we fail to start bail immediately, and don't block in waitForStarted if (m_process->state() == QProcess::NotRunning) { @@ -173,8 +188,7 @@ // command QStringList cmd; - cmd << QStringLiteral("%1/sddm-greeter").arg(QStringLiteral(BIN_INSTALL_DIR)) - << args; + cmd << greeterPath << args; // greeter environment QProcessEnvironment env; @@ -207,7 +221,7 @@ m_auth->setCookie(qobject_cast<XorgDisplayServer*>(displayServer)->cookie()); } else if (m_display->displayServerType() == Display::WaylandDisplayServerType) { env.insert(QStringLiteral("QT_QPA_PLATFORM"), QStringLiteral("wayland")); - env.insert(QStringLiteral("QT_WAYLAND_SHELL_INTEGRATION"), QStringLiteral("fullscreen-shell-v1")); + env.insert(QStringLiteral("QT_WAYLAND_SHELL_INTEGRATION"), QStringLiteral("xdg-shell")); } m_auth->insertEnvironment(env); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/daemon/Greeter.h new/sddm-0.21.0/src/daemon/Greeter.h --- old/sddm-0.20.0/src/daemon/Greeter.h 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/daemon/Greeter.h 2024-02-26 11:23:03.000000000 +0100 @@ -79,6 +79,7 @@ QProcess *m_process { nullptr }; static void insertEnvironmentList(QStringList names, QProcessEnvironment sourceEnv, QProcessEnvironment &targetEnv); + static QString greeterPathForQt(int qtVersion); }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/greeter/CMakeLists.txt new/sddm-0.21.0/src/greeter/CMakeLists.txt --- old/sddm-0.20.0/src/greeter/CMakeLists.txt 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/greeter/CMakeLists.txt 2024-02-26 11:23:03.000000000 +0100 @@ -1,3 +1,14 @@ +if(QT_MAJOR_VERSION EQUAL "5") + # Keep the unversioned name for Qt5. When upgrading SDDM, the old daemon + # might still be running and only know about "sddm-greeter". Keeping the + # previous name around also helps users calling it directly. + set(GREETER_TARGET sddm-greeter) +else() + set(GREETER_TARGET sddm-greeter-qt${QT_MAJOR_VERSION}) +endif() + +message(STATUS "Building greeter for Qt ${QT_MAJOR_VERSION} as ${GREETER_TARGET}") + include_directories( "${CMAKE_SOURCE_DIR}/src/common" "${CMAKE_BINARY_DIR}/src/common" @@ -28,18 +39,17 @@ qt_add_resources(RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/theme.qrc) -add_executable(sddm-greeter ${GREETER_SOURCES} ${RESOURCES}) -target_link_libraries(sddm-greeter +add_executable(${GREETER_TARGET} ${GREETER_SOURCES} ${RESOURCES}) +target_link_libraries(${GREETER_TARGET} Qt${QT_MAJOR_VERSION}::Quick ${LIBXCB_LIBRARIES} ${LIBXKB_LIBRARIES}) if(JOURNALD_FOUND) - target_link_libraries(sddm-greeter ${JOURNALD_LIBRARIES}) + target_link_libraries(${GREETER_TARGET} ${JOURNALD_LIBRARIES}) endif() # Translations -add_dependencies(sddm-greeter components-translation) -add_dependencies(sddm-greeter themes-translation) +add_dependencies(${GREETER_TARGET} components-translation themes-translation) -install(TARGETS sddm-greeter DESTINATION "${CMAKE_INSTALL_BINDIR}") +install(TARGETS ${GREETER_TARGET} DESTINATION "${CMAKE_INSTALL_BINDIR}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/greeter/GreeterApp.cpp new/sddm-0.21.0/src/greeter/GreeterApp.cpp --- old/sddm-0.20.0/src/greeter/GreeterApp.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/greeter/GreeterApp.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -319,7 +319,7 @@ platform = QString::fromUtf8(qgetenv("QT_QPA_PLATFORM")); } if (platform.isEmpty()) { - platform = QStringLiteral("xcb"); + platform = qEnvironmentVariableIsSet("WAYLAND_DISPLAY") ? QStringLiteral("wayland") : QStringLiteral("xcb"); } // Install message handler @@ -351,8 +351,14 @@ qputenv("KDE_DEBUG", "1"); // Qt IM module - if (!SDDM::mainConfig.InputMethod.get().isEmpty()) - qputenv("QT_IM_MODULE", SDDM::mainConfig.InputMethod.get().toLocal8Bit().constData()); + QString inputMethod = SDDM::mainConfig.InputMethod.get(); + // Using qtvirtualkeyboard as IM on wayland doesn't really work, + // it has to be done by the compositor instead. + if (platform.startsWith(QStringLiteral("wayland")) && inputMethod == QStringLiteral("qtvirtualkeyboard")) + inputMethod = QString{}; + + if (!inputMethod.isEmpty()) + qputenv("QT_IM_MODULE", inputMethod.toLocal8Bit()); QGuiApplication app(argc, argv); SDDM::SignalHandler s; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/greeter/SessionModel.h new/sddm-0.21.0/src/greeter/SessionModel.h --- old/sddm-0.20.0/src/greeter/SessionModel.h 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/greeter/SessionModel.h 2024-02-26 11:23:03.000000000 +0100 @@ -34,6 +34,7 @@ Q_OBJECT Q_DISABLE_COPY(SessionModel) Q_PROPERTY(int lastIndex READ lastIndex CONSTANT) + Q_PROPERTY(int count READ rowCount CONSTANT) public: enum SessionRole { DirectoryRole = Qt::UserRole + 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/greeter/waylandkeyboardbackend.cpp new/sddm-0.21.0/src/greeter/waylandkeyboardbackend.cpp --- old/sddm-0.20.0/src/greeter/waylandkeyboardbackend.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/greeter/waylandkeyboardbackend.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -92,7 +92,9 @@ void WaylandKeyboardBackend::init() { - d->layouts = parseRules(QStringLiteral("/usr/share/X11/xkb/rules/evdev.xml"), d->layout_id); + // TODO: We can't actually switch keyboard layout yet, so don't populate a list of layouts + // so that themes can know to not show the option to change layout + // d->layouts = parseRules(QStringLiteral("/usr/share/X11/xkb/rules/evdev.xml"), d->layout_id); } void WaylandKeyboardBackend::disconnect() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/helper/Backend.cpp new/sddm-0.21.0/src/helper/Backend.cpp --- old/sddm-0.20.0/src/helper/Backend.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/helper/Backend.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -59,10 +59,10 @@ } bool Backend::openSession() { + QProcessEnvironment env = m_app->session()->processEnvironment(); struct passwd *pw; pw = getpwnam(qPrintable(qobject_cast<HelperApp*>(parent())->user())); if (pw) { - QProcessEnvironment env = m_app->session()->processEnvironment(); env.insert(QStringLiteral("HOME"), QString::fromLocal8Bit(pw->pw_dir)); env.insert(QStringLiteral("PWD"), QString::fromLocal8Bit(pw->pw_dir)); env.insert(QStringLiteral("SHELL"), QString::fromLocal8Bit(pw->pw_shell)); @@ -104,9 +104,21 @@ QProcessEnvironment::systemEnvironment().insert(savedEnv); } #endif - // TODO: I'm fairly sure this shouldn't be done for PAM sessions, investigate! - m_app->session()->setProcessEnvironment(env); } + if (env.value(QStringLiteral("XDG_SESSION_CLASS")) == QLatin1String("greeter")) { + // Qt internally may load the xdg portal system early on, prevent this, we do not have a functional session running. + env.insert(QStringLiteral("QT_NO_XDG_DESKTOP_PORTAL"), QStringLiteral("1")); + for (const auto &entry : mainConfig.GreeterEnvironment.get()) { + const int index = entry.indexOf(QLatin1Char('=')); + if (index < 0) { + qWarning() << "Malformed environment variable" << entry; + continue; + } + env.insert(entry.left(index), entry.mid(index + 1)); + } + } + // TODO: I'm fairly sure this shouldn't be done for PAM sessions, investigate! + m_app->session()->setProcessEnvironment(env); return m_app->session()->start(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/src/helper/HelperApp.cpp new/sddm-0.21.0/src/helper/HelperApp.cpp --- old/sddm-0.20.0/src/helper/HelperApp.cpp 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/src/helper/HelperApp.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -167,19 +167,6 @@ m_user = m_backend->userName(); QProcessEnvironment env = authenticated(m_user); - if (env.value(QStringLiteral("XDG_SESSION_CLASS")) == QLatin1String("greeter")) { - // Qt internally may load the xdg portal system early on, prevent this, we do not have a functional session running. - env.insert(QStringLiteral("QT_NO_XDG_DESKTOP_PORTAL"), QStringLiteral("1")); - for (const auto &entry : mainConfig.GreeterEnvironment.get()) { - const int index = entry.indexOf(QLatin1Char('=')); - if (index < 0) { - qWarning() << "Malformed environment variable" << entry; - continue; - } - env.insert(entry.left(index), entry.mid(index + 1)); - } - } - if (!m_session->path().isEmpty()) { env.insert(m_session->processEnvironment()); m_session->setProcessEnvironment(env); @@ -349,20 +336,8 @@ qWarning() << "Failed to write utmpx: " << strerror(errno); endutxent(); -#if !defined(Q_OS_FREEBSD) - // append to failed login database btmp - if (!authSuccessful) { #if defined(Q_OS_LINUX) - updwtmpx("/var/log/btmp", &entry); -#endif - } - - // append to wtmp - else { -#if defined(Q_OS_LINUX) - updwtmpx("/var/log/wtmp", &entry); -#endif - } + updwtmpx(authSuccessful ? "/var/log/wtmp" : "/var/log/btmp", &entry); #endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/test/CMakeLists.txt new/sddm-0.21.0/test/CMakeLists.txt --- old/sddm-0.20.0/test/CMakeLists.txt 2023-06-23 14:28:38.000000000 +0200 +++ new/sddm-0.21.0/test/CMakeLists.txt 2024-02-26 11:23:03.000000000 +0100 @@ -13,3 +13,9 @@ target_include_directories(QMLThemeConfigTest PRIVATE ../src/common/) add_test(NAME QMLThemeConfig COMMAND QMLThemeConfigTest -platform offscreen -input ${CMAKE_CURRENT_SOURCE_DIR}/QMLThemeConfigTest.qml WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(QMLThemeConfigTest PRIVATE Qt${QT_MAJOR_VERSION}::Quick Qt${QT_MAJOR_VERSION}::QuickTest) + +set(SessionTest_SRCS SessionTest.cpp ../src/common/Configuration.cpp ../src/common/ConfigReader.cpp ../src/common/Session.cpp) +add_executable(SessionTest ${SessionTest_SRCS}) +target_include_directories(SessionTest PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../src/common) +add_test(NAME Session COMMAND SessionTest) +target_link_libraries(SessionTest Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Test) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/test/SessionTest.cpp new/sddm-0.21.0/test/SessionTest.cpp --- old/sddm-0.20.0/test/SessionTest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/test/SessionTest.cpp 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,66 @@ +/*************************************************************************** +* Copyright (c) 2023 Fabian Vogt <fv...@suse.de> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the +* Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +***************************************************************************/ + +#include "Session.h" + +#include <QLocale> +#include <QTest> + +class SessionTest : public QObject { + Q_OBJECT +private slots: + void testCLocale() + { + QLocale::setDefault(QLocale::c()); + auto fileName = QFINDTESTDATA("plasmawayland-dev.desktop"); + SDDM::Session session(SDDM::Session::WaylandSession, fileName); + QVERIFY(session.isValid()); + QCOMPARE(session.xdgSessionType(), QStringLiteral("wayland")); + QCOMPARE(session.fileName(), fileName); + QCOMPARE(session.displayName(), QStringLiteral("Plasma (Development, Wayland /usr/bin)")); + QCOMPARE(session.comment(), QStringLiteral("Plasma by KDE")); + QCOMPARE(session.exec(), QStringLiteral("/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/lib64/libexec/startplasma-dev.sh -wayland")); + QCOMPARE(session.tryExec(), QString()); + QCOMPARE(session.desktopSession(), QStringLiteral("plasmawayland-dev")); + QCOMPARE(session.desktopNames(), QStringLiteral("KDE")); + QCOMPARE(session.isHidden(), false); + QCOMPARE(session.isNoDisplay(), false); + } + void testKOLocale() + { + QLocale::setDefault(QLocale{QStringLiteral("ko_KO")}); + auto fileName = QFINDTESTDATA("plasmawayland-dev.desktop"); + SDDM::Session session(SDDM::Session::WaylandSession, fileName); + QVERIFY(session.isValid()); + QCOMPARE(session.xdgSessionType(), QStringLiteral("wayland")); + QCOMPARE(session.fileName(), fileName); + QCOMPARE(session.displayName(), QStringLiteral("Plasma(\uAC1C\uBC1C, Wayland /usr/bin)")); + QCOMPARE(session.comment(), QStringLiteral("KDE Plasma")); + QCOMPARE(session.exec(), QStringLiteral("/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/lib64/libexec/startplasma-dev.sh -wayland")); + QCOMPARE(session.tryExec(), QString()); + QCOMPARE(session.desktopSession(), QStringLiteral("plasmawayland-dev")); + QCOMPARE(session.desktopNames(), QStringLiteral("KDE")); + QCOMPARE(session.isHidden(), false); + QCOMPARE(session.isNoDisplay(), false); + } +}; + +QTEST_MAIN(SessionTest); + +#include "SessionTest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sddm-0.20.0/test/plasmawayland-dev.desktop new/sddm-0.21.0/test/plasmawayland-dev.desktop --- old/sddm-0.20.0/test/plasmawayland-dev.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/sddm-0.21.0/test/plasmawayland-dev.desktop 2024-02-26 11:23:03.000000000 +0100 @@ -0,0 +1,106 @@ +[Desktop Entry] +Exec=/usr/lib64/libexec/plasma-dbus-run-session-if-needed /usr/lib64/libexec/startplasma-dev.sh -wayland +DesktopNames=KDE +Name=Plasma (Development, Wayland /usr/bin) +Name[ar]=Ø¨ÙØ§Ø²Ù ا (تطÙÙØ±, ÙÙÙØ§Ùد /usr/bin) +Name[az]=Plasma (TÉrtib mÉrhÉlÉsindÉ olan Wayland /usr/bin) +Name[be]=Plasma (Development, Wayland /usr/bin) +Name[bg]=Plasma (Development, Wayland /usr/bin) +Name[ca]=Plasma (Desenvolupament, Wayland /usr/bin) +Name[ca@valencia]=Plasma (Desenvolupament, Wayland /usr/bin) +Name[da]=Plasma (udvikling, Wayland /usr/bin) +Name[de]=Plasma (Development, Wayland /usr/bin) +Name[en_GB]=Plasma (Development, Wayland /usr/bin) +Name[es]=Plasma (Desarrollo, Wayland /usr/bin) +Name[et]=Plasma (arendus, Wayland /usr/bin) +Name[eu]=Plasma (Garapena, Wayland /usr/bin) +Name[fi]=Plasma (kehitys, Wayland /usr/bin) +Name[fr]=Plasma (Développement, Wayland /usr/bin) +Name[gl]=Plasma (desenvolvemento, Wayland /usr/bin) +Name[hi]=पà¥à¤²à¤¾à¤à¤¼à¥à¤®à¤¾ (विà¤à¤¾à¤¸, वà¥à¤²à¥à¤à¤¡ /usr/bin) +Name[hu]=Plasma (FejlesztÅi verzió, Wayland /usr/bin) +Name[ia]=Plasma (Disveloppamento, Wayland /usr/bin) +Name[id]=Plasma (Development, Wayland /usr/bin) +Name[is]=Plasma (Ãróunarútgáfa, Wayland /usr/bin) +Name[it]=Plasma (Sviluppo, Wayland /usr/bin) +Name[ja]=Plasma (Development, Wayland /usr/bin) +Name[ka]=Plasma (Development, Wayland /usr/bin) +Name[ko]=Plasma(ê°ë°, Wayland /usr/bin) +Name[lt]=Plasma (PlÄtojimas, Wayland /usr/bin) +Name[ml]=à´ªàµà´²à´¾à´¸àµà´® (വിà´à´¸à´¨à´, à´µàµà´²à´¾àµ»à´¡àµ /usr/bin) +Name[nl]=Plasma (Ontwikkeling, Wayland /usr/bin) +Name[nn]=Plasma (utvikling, Wayland /usr/bin) +Name[pa]=ਪਲਾà©à¨®à¨¾ (ਡਿਵà©à¨²à¨ªà¨®à©à¨à¨, ਵà©à¨ ਲà©à¨à¨¡ /usr/bin) +Name[pl]=Plazma (Rozwój , Wayland /usr/bin) +Name[pt]=Plasma (Desenvolvimento, Wayland /usr/bin) +Name[pt_BR]=Plasma (Desenvolvimento, Wayland /usr/bin) +Name[ro]=Plasma (Dezvoltare, Wayland /usr/bin) +Name[ru]=Plasma (ÑазÑабаÑÑÐ²Ð°ÐµÐ¼Ð°Ñ Ð²ÐµÑÑиÑ, Wayland /usr/bin) +Name[sk]=Plasma (Development, Wayland /usr/bin) +Name[sl]=Plasma (Razvoj, Wayland /usr/bin) +Name[sv]=Plasma (utveckling, Wayland /usr/bin) +Name[ta]=பிளாஸà¯à®®à®¾ (Development, Wayland /usr/bin) +Name[tr]=Plasma (GeliÅtirme, Wayland $ {CMAKE_INSTALL_FULL_BINDIR}) +Name[uk]=Ðлазма (РозÑобка, Wayland /usr/bin) +Name[vi]=Plasma (Phát triá»n, Wayland /usr/bin) +Name[x-test]=xxPlasma (Development, Wayland /usr/bin)xx +Name[zh_CN]=Plasma (Development, Wayland /usr/bin) +Name[zh_TW]=Plasma (éç¼çæ¬ï¼Wayland /usr/bin) +Comment=Plasma by KDE +Comment[ar]=Ø¨ÙØ§Ø²Ù ا ÙØ¯Ù +Comment[az]=KDE Plasma +Comment[be]=Plasma KDE +Comment[bg]=Plasma Ð¾Ñ KDE +Comment[bs]=Plazma od strane KDe +Comment[ca]=Plasma, creat per la comunitat KDE +Comment[ca@valencia]=Plasma, creat per la comunitat KDE +Comment[cs]=Plasma z KDE +Comment[da]=Plasma fra KDE +Comment[de]=Plasma von KDE +Comment[el]=Plasma αÏÏ Ïο KDE +Comment[en_GB]=Plasma by KDE +Comment[es]=Plasma, por KDE +Comment[et]=KDE Plasma +Comment[eu]=KDEren Plasma +Comment[fi]=Plasma KDE:ltä +Comment[fr]=Plasma, par KDE +Comment[gl]=Plasma, fornecido por KDE. +Comment[he]=פ×××× ×××צע×ת KDE +Comment[hi]=à¤à¥à¤¡à¥à¤ दà¥à¤µà¤¾à¤°à¤¾ पà¥à¤²à¤¾à¤à¤¼à¥à¤®à¤¾ +Comment[hsb]=Plasma wot KDE +Comment[hu]=Plasma a KDE-tÅl +Comment[ia]=Plasma per KDE +Comment[id]=Plasma oleh KDE +Comment[is]=Plasma frá KDE +Comment[it]=Plasma di KDE +Comment[ja]=Plasma by KDE +Comment[ka]=Plasma, KDE-á¡ááá +Comment[ko]=KDE Plasma +Comment[lt]=Plasma pagal KDE +Comment[ml]=à´àµà´¡à´¿à´à´¯àµà´àµ à´ªàµà´²à´¾à´¸àµà´® +Comment[nb]=Plasma av KDE +Comment[nds]=Plasma vun KDE +Comment[nl]=Plasma door KDE +Comment[nn]=Plasma frÃ¥ KDE +Comment[pa]=KDE ਵਲà©à¨ ਪਲਾà©à¨®à¨¾ +Comment[pl]=Plazma dziÄki KDE +Comment[pt]=Plasma do KDE +Comment[pt_BR]=Plasma do KDE +Comment[ro]=Plasma, de cÄtre KDE +Comment[ru]=KDE Plasma +Comment[sk]=Plasma od KDE +Comment[sl]=KDE Plasma +Comment[sr]=Ðлазма од ÐÐÐâа +Comment[sr@ijekavian]=Ðлазма од ÐÐÐâа +Comment[sr@ijekavianlatin]=Plasma od KDEâa +Comment[sr@latin]=Plasma od KDEâa +Comment[sv]=Plasma av KDE +Comment[ta]=à®à¯.à®à¯.யà¯. வழà®à¯à®à¯à®®à¯ பிளாஸà¯à®®à®¾ +Comment[tg]=Plasma аз ҷониби KDE +Comment[tr]=KDE Plasma +Comment[uk]=Ðлазма KDE +Comment[vi]=Plasma, do KDE +Comment[x-test]=xxPlasma by KDExx +Comment[zh_CN]=KDE Plasma +Comment[zh_TW]=Plasma by KDE +X-KDE-PluginInfo-Version=5.27.0