# this package links to the scripts Xsession and Xsetup from the xinitrc # package. Check that these links are always matching each other, across the future # versions, should their path change. # %define xinitrc_xdmpath %{_datadir}/X11/xdm %define rel 12.1 %if %mgaver >= 10 %global use_qt6 1 %else %global use_qt6 0 %endif Name: sddm Version: 0.21.0 Release: %mkrel %rel License: GPLv2+ Summary: QML based X11 display manager Group: Graphical desktop/KDE Url: https://github.com/sddm/sddm Source0: https://github.com/sddm/sddm/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz # PAM configs shamelessly stolen from our gdm package Source1: sddm.pam Source2: sddm-autologin.pam # Adds sddm to drakedm Source3: 11sddm.conf # default /etc/sddm.conf, created from man sddm.conf # similar can be obtained via sddm --example-config # show users with UID >= 500 and hide system users # allow display of custom user icons read from /var/lib/AccountsService/icons/ # ( by default SDDM reads user icon from either ~/.face.icon or FacesDir/username.face.icon ) Source6: sddm.conf # new default theme without a userlist, provided by Chris Denice # https://bugs.mageia.org/show_bug.cgi?id=16493 # (patched from Papoteur included) # https://gitweb.mageia.org/software/design/mga-coffee/ Source7: mga-coffee-20260218.tar.gz # sysconfig snippet Source15: sddm.sysconfig # workaround to enable autofocus on (password) input fields # taken from examples at https://github.com/sddm/sddm/issues/501 Patch0: sddm-0.12.0-mga-autofocus.patch Patch2: sddm-0.19.0-cmake-display-command.patch # from FC: Workaround lack of Qt 5 greeter build Source105: sddm-0.21.0-qt6greeter.patch # Patches backported from git Patch0201: 0001-VirtualTerminal-Export-defaultVtPath.patch Patch0202: 0002-Allow-non-root-greeters-and-sessions-to-start-on-ker.patch Patch0203: 0003-Conditionalize-more-VT-related-calls.patch Patch0204: 0004-UserSession-Only-act-on-the-VT-when-XDG_VTNR-is-set.patch Patch0205: 0005-Mark-keyboard-backend-as-disabled-on-Wayland.patch Patch0206: 0006-Themes-hide-LayoutBox-when-keyboard-model-is-empty-o.patch Patch0207: 0007-Themes-explicitly-resolve-image-URLs.patch Patch0208: 0008-Components-use-Transitions-instead-of-Behaviors.patch Patch0209: 0009-Themes-fix-deprecated-signal-handler-declarations.patch Patch0210: 0010-Themes-set-QtVersion-QT_MAJOR_VERSION.patch Patch0211: 0011-Docs-add-QtVersion-information-to-THEMING.patch # to review Source0212: 0012-cmake-drop-FreeBSD-specific-PAM-modules.patch Source0213: 0013-cmake-drop-Debian-specific-PAM-modules.patch Source0214: 0014-cmake-remove-the-final-Arch-PAM-modules.patch # Patch0215: 0015-Prevent-the-greeter-display-server-from-hanging-if-S.patch Patch0216: 0016-Switch-back-to-greeter-when-logind-emits-SecureAtten.patch Patch0217: 0017-Introduce-utmps-support-1962.patch Patch0218: 0018-Use-xrdb-to-set-Xcursor.theme-and-Xcursor.size.patch Patch0219: 0019-Add-translation-for-Persian.patch Patch0220: 0020-Update-Czech-translations.patch Patch0221: 0021-Fix-for-issue-Suspicious-code-in-PamHandle-end-1990.patch Patch0222: 0022-xcb-use-xcb_connection_has_error-to-check-for-failue.patch Patch0223: 0023-Remove-unused-Display-m_relogin-variable.patch Patch0224: 0024-Set-Display-m_started-early.patch Patch0225: 0025-Load-autologin-configuration-in-Display-Display.patch Patch0226: 0026-Reset-daemonApp-first-in-the-Display-constructor.patch Patch0227: 0027-If-autologin-is-used-avoid-starting-a-display-server.patch Patch0228: 0028-Updated-spanish-translation.patch Patch0229: 0029-Update-es.ts.patch Patch0230: 0030-Update-he.ts.patch Patch0231: 0031-Hebrew-translation-update.patch Patch0232: 0032-Update-Japanese-translation.patch Patch0233: 0033-Apply-suggestions-from-code-review.patch Patch0234: 0034-Apply-suggestions-from-review.patch Patch0235: 0035-Less-strict-Section-Header-parsing-for-session-.desk.patch Patch0236: 0036-Simplify-Seat-displayStopped.patch Patch0237: 0037-Redesign-login-shell-use-in-session-scripts.patch Patch0238: 0038-CMake-Raise-required-version-to-3.5.patch Patch0239: 0039-Update-Traditional-Chinese-translation.patch Patch0240: 0040-Fix-index-check-for-UserModel.patch Patch0241: 0041-Remove-use-of-qAsConst-which-is-deprecated.patch Patch0242: 0042-Bump-minimal-timeout-for-waitForFinished-to-5-second.patch Patch0243: 0043-xorg-user-Allow-overriding-verbose-Xorg-option.patch Patch0244: 0044-Delete-QProcess-objects-only-after-waiting-for-proce.patch Patch0245: 0045-Do-not-manage-setCursor-with-startProcess-as-latter-.patch Patch0246: 0046-Update-Arabic-Translation-2067.patch Patch0247: 0050-fixed-wrong-string-literal-assignment.patch Patch0248: 0051-Display-also-reuse-session-created-by-sddm-autologin.patch Patch0249: 0052-sddm.service-conflicts-with-kmsconvt-ttyX.patch # # https://github.com/sddm/sddm/pull/1951 Patch0300: 3024a1e0b7086089d3479588337cfa0440eddf95.patch # deprecated workaround, to be reviewed # https://github.com/sddm/sddm/issues/1917, https://github.com/sddm/sddm/pull/1924/ Patch0301: 111907ad7c604d264ec7bd078a7bcf1721d6eab8.patch # SDDM crashes on loginctl terminate-user/terminate-session # Submitted: https://github.com/sddm/sddm/pull/2103 Patch0302: sddm-0.21.0-fix-restart-greeter-when-helper-is-in-a-wrong-state.patch # # From FC # sddm.service: +EnvironmentFile=-/etc/sysconfig/sddm Patch0403: sddm-0.18.0-environment_file.patch # Fix race with logind restart, and start seat0 if !CanGraphical on timer # https://bugzilla.redhat.com/show_bug.cgi?id=2011991 # https://bugzilla.redhat.com/show_bug.cgi?id=2016310 # Submmited: https://github.com/sddm/sddm/pull/1494 Patch0413: 0001-Delay-for-logind-and-fallback-to-seat0.patch # BuildRequires: extra-cmake-modules BuildRequires: cmake BuildRequires: systemd-devel BuildRequires: upower-devel BuildRequires: pam-devel BuildRequires: python3-docutils BuildRequires: libxcb-devel %if %use_qt6 BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Network) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6Help) BuildRequires: cmake(Qt6Qml) BuildRequires: cmake(Qt6Quick) BuildRequires: cmake(Qt6LinguistTools) BuildRequires: cmake(Qt6Test) BuildRequires: cmake(Qt6QuickTest) %if %mgaver >= 10 BuildRequires: cmake(LayerShellQt) >= 5.90 %endif %else BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(Qt5Help) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5QuickTest) %endif BuildRequires: cmake(LayerShellQt) Obsoletes: slim < 1.3.6 # /etc/dbus-1/system.d/org.freedesktop.DisplayManager.conf is also provided by lightdm, # and the upgrade files if the packages are not updated in the same transaction (mga#18633) Conflicts: lightdm < 1.14.4-2 # For default background Requires: mageia-theme # For themes, without this one gets # "module "QtQuick" is not installed" errors %if %use_qt6 Requires: qt6-qtdeclarative %else Requires: qtdeclarative5 %endif Requires: xinitrc Requires: pam Requires: systemd Requires: x11-server-xorg Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %description SDDM is a modern display manager for X11 aiming to be fast, simple and beautiful. It uses modern technologies like QtQuick, which in turn gives the designer the ability to create smooth, animated user interfaces. %prep %autosetup -p1 %if %use_qt6 patch -p1 < %{SOURCE105} %endif # use default mga background image in themes # # (doktor5000) - this makes most part of the themes useless and ugly (default.jpg is not resolution-optimized) # instead, a separate Mageia theme is created further below and used by default # sed -i -e 's,\(^background=\).*,\1%{_datadir}/mga/backgrounds/default.jpg,' data/themes/*/theme.conf %build # set UID_MIN and UID_MAX here as autodetection from /etc/login.defs is not # possible for normal users due to missing read permissions %if %use_qt6 %cmake_qt6 \ -DBUILD_WITH_QT6:BOOL=ON \ %else %cmake_qt5 \ %endif -DBUILD_MAN_PAGES=ON \ -DDBUS_CONFIG_FILENAME:STRING=org.freedesktop.DisplayManager-sddm.conf \ -DENABLE_JOURNALD=ON \ -DUID_MIN=500 \ -DUID_MAX=60000 %cmake_build %install %cmake_install # dm config install -Dpm 644 %{_sourcedir}/11sddm.conf %{buildroot}%{_datadir}/X11/dm.d/11sddm.conf mkdir -p %{buildroot}%{_sysconfdir}/sddm/ mkdir -p %{buildroot}%{_sysconfdir}/sddm.conf.d mkdir -p %{buildroot}%{_prefix}/lib/sddm/sddm.conf.d mkdir -p %{buildroot}%{_rundir}/sddm # PAM config stolen from our gdm package install -Dpm 644 %{_sourcedir}/sddm.pam %{buildroot}%{_sysconfdir}/pam.d/sddm install -Dpm 644 %{_sourcedir}/sddm-autologin.pam %{buildroot}%{_sysconfdir}/pam.d/sddm-autologin install -Dpm 644 %{SOURCE15} %{buildroot}%{_sysconfdir}/sysconfig/sddm # system user home dir mkdir -p %{buildroot}%{_localstatedir}/lib/%{name} # extract new default theme mga-coffee tar -xf %{SOURCE7} -C %{buildroot}%{_datadir}/sddm/themes sed -i 's/jpg/png/' %{buildroot}%{_datadir}/sddm/themes/mga-coffee/theme.conf # replace upstream Xsession and Xsetup scripts with the same links from the xinitrc package # (and preserve the upstream Xsession and Xsetup under the names Xsession.sddm and Xsetup.sddm) mv -f %{buildroot}%{_datadir}/sddm/scripts/Xsession %{buildroot}%{_datadir}/sddm/scripts/Xsession.sddm mv -f %{buildroot}%{_datadir}/sddm/scripts/Xsetup %{buildroot}%{_datadir}/sddm/scripts/Xsetup.sddm ln -sf %{xinitrc_xdmpath}/Xsession %{buildroot}%{_datadir}/sddm/scripts/Xsession ln -sf %{xinitrc_xdmpath}/Xsetup_0 %{buildroot}%{_datadir}/sddm/scripts/Xsetup # install default sddm.conf install -Dpm 644 %{_sourcedir}/sddm.conf %{buildroot}%{_sysconfdir}/ # fix mgangle.png icon permission find %{buildroot}%{_datadir} -not -type d -a \( -type f -name '*.png' \) -perm /u=x,g=x,o=x -exec chmod -x '{}' \; %if %use_qt6 ln -sr %{buildroot}%{_bindir}/sddm-greeter-qt6 %{buildroot}%{_bindir}/sddm-greeter %endif # (ngompa) pretrans must be Lua # See https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/Symlink_Workarounds %pretrans -p xsetuppath = "%{_datadir}/sddm/scripts/Xsetup" st1 = posix.stat(xsetuppath) if st1 and st1.type ~= "link" then os.execute("rm -f " .. xsetuppath) end xsessionpath = "%{_datadir}/sddm/scripts/Xsession" st2 = posix.stat(xsessionpath) if st2 and st2.type ~= "link" then os.execute("rm -f " .. xsessionpath) end %pre %_pre_useradd %{name} %{_localstatedir}/lib/%{name} /sbin/nologin %if 0 %post %_post_service sddm %preun %_preun_service sddm %endif %files %license LICENSE %doc README.md CONTRIBUTORS %dir %{_sysconfdir}/sddm/ %dir %{_sysconfdir}/sddm.conf.d %dir %{_prefix}/lib/sddm %dir %{_prefix}/lib/sddm/sddm.conf.d %ghost %attr(0711,root,sddm) %dir %{_rundir}/%{name} %attr(700,sddm,sddm) %{_localstatedir}/lib/%{name}/ %config(noreplace) %{_sysconfdir}/sddm.conf %config(noreplace) %{_sysconfdir}/pam.d/sddm %config(noreplace) %{_sysconfdir}/pam.d/sddm-autologin %config(noreplace) %{_sysconfdir}/pam.d/sddm-greeter %config(noreplace) %{_sysconfdir}/sysconfig/sddm %{_datadir}/X11/dm.d/11sddm.conf %{_datadir}/dbus-1/system.d/org.freedesktop.DisplayManager-sddm.conf %{_libexecdir}/sddm-helper %{_bindir}/sddm %{_bindir}/sddm-greeter* %{_unitdir}/sddm.service %if %use_qt6 %if %mgaver >= 10 %{_qt6_qmldir}/SddmComponents/ %else %{_qt6_archdatadir}/qml/SddmComponents/ %endif %else %{_qt5_qml}/SddmComponents %endif %dir %{_datadir}/sddm %{_datadir}/sddm/faces %{_datadir}/sddm/scripts %{_datadir}/sddm/themes %{_datadir}/sddm/flags %{_datadir}/sddm/translations* %{_mandir}/man?/%{name}* %{_sysusersdir}/sddm.conf %{_tmpfilesdir}/sddm.conf %{_libexecdir}/sddm-helper-start-wayland %{_libexecdir}/sddm-helper-start-x11user