From 44a61e226553254df49733d5b7a6481a875c6523 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 15 Nov 2015 08:11:49 -0600 Subject: [PATCH] merge Configuration.h into fedora_config.patch - copy all scripts into /etc/sddm as %config(noreplace) --- Configuration.h | 99 --------------------------------- sddm-0.11.0-fedora_config.patch | 12 ---- sddm-0.13.0-fedora_config.patch | 33 +++++++++++ sddm.spec | 14 +++-- 4 files changed, 43 insertions(+), 115 deletions(-) delete mode 100644 Configuration.h delete mode 100644 sddm-0.11.0-fedora_config.patch create mode 100644 sddm-0.13.0-fedora_config.patch diff --git a/Configuration.h b/Configuration.h deleted file mode 100644 index 817a96d..0000000 --- a/Configuration.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * SDDM Fedora configuration - */ - -#ifndef SDDM_CONFIGURATION_H -#define SDDM_CONFIGURATION_H - -#include -#include -#include -#include -#include -#include - -#include "Constants.h" - -#include "ConfigReader.h" - -namespace SDDM { - // Name File Sections and/or Entries (but anything else too, it's a class) - Entries in a Config are assumed to be in the General section - Config(MainConfig, CONFIG_FILE, - enum NumState { NUM_NONE, NUM_SET_ON, NUM_SET_OFF }; - - // Name Type Default value Description - Entry(HaltCommand, QString, _S("/usr/bin/systemctl poweroff"), _S("Halt command")); - Entry(RebootCommand, QString, _S("/usr/bin/systemctl reboot"), _S("Reboot command")); - Entry(Numlock, NumState, NUM_NONE, _S("Initial NumLock state\n" - "Valid values: on|off|none\n" - "If property is set to none, numlock won't be changed")); - // 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("fedora"), _S("Current theme name")); - Entry(FacesDir, QString, _S(DATA_INSTALL_DIR "/faces"), _S("Face icon directory\n" - "The files should be in username.face.icon format")); - Entry(CursorTheme, QString, QString(), _S("Cursor theme")); - ); - // TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal - Section(XDisplay, - Entry(ServerPath, QString, _S("/usr/bin/X"), _S("X server path")); - Entry(XauthPath, QString, _S("/usr/bin/xauth"), _S("Xauth path")); - Entry(SessionDir, QString, _S("/usr/share/xsessions"), _S("Session description directory")); - Entry(SessionCommand, QString, _S("/etc/X11/xinit/Xsession"), _S("Xsession script path\n" - "A script to execute when starting the desktop session")); - Entry(DisplayCommand, QString, _S("/etc/sddm/Xsetup"), _S("Xsetup script path\n" - "A script to execute when starting the display server")); - Entry(MinimumVT, int, 1, _S("Minimum VT\n" - "The lowest virtual terminal number that will be used.")); - ); - Section(Users, - Entry(DefaultPath, QString, _S("/usr/local/bin:/usr/bin:/bin"), _S("Default $PATH")); - Entry(MinimumUid, int, 1000, _S("Minimum user id for displayed users")); - Entry(MaximumUid, int, 65000, _S("Maximum user id for displayed users")); - Entry(HideUsers, QStringList, QStringList(), _S("Hidden users")); - Entry(HideShells, QStringList, QStringList(), _S("Hidden shells\n" - "Users with these shells as their default won't be listed")); - Entry(RememberLastUser, bool, true, _S("Remember the last successfully logged in user")); - Entry(RememberLastSession, bool, true, _S("Remember the session of the last successfully logged in user")); - ); - Section(Autologin, - Entry(User, QString, QString(), _S("Autologin user")); - Entry(Session, QString, QString(), _S("Autologin session")); - Entry(Relogin, bool, false, _S("Autologin again on session exit")); - ); - ); - - Config(StateConfig, []()->QString{auto tmp = getpwnam("sddm"); return tmp ? tmp->pw_dir : STATE_DIR;}().append("/state.conf"), - Section(Last, - Entry(Session, QString, QString(), _S("Name of the session file of the last session selected. This session will be preselected when the login screen shows up.")); - Entry(User, QString, QString(), _S("Name of the last logged-in user. This username will be preselected/shown when the login screen shows up")); - ); - ); - - extern MainConfig mainConfig; - extern StateConfig stateConfig; - - inline QTextStream& operator>>(QTextStream &str, MainConfig::NumState &state) { - QString text = str.readLine().trimmed(); - if (text.compare("on", Qt::CaseInsensitive) == 0) - state = MainConfig::NUM_SET_ON; - else if (text.compare("off", Qt::CaseInsensitive) == 0) - state = MainConfig::NUM_SET_OFF; - else - state = MainConfig::NUM_NONE; - return str; - } - - inline QTextStream& operator<<(QTextStream &str, const MainConfig::NumState &state) { - if (state == MainConfig::NUM_SET_ON) - str << "on"; - else if (state == MainConfig::NUM_SET_OFF) - str << "off"; - else - str << "none"; - return str; - } -} - -#endif // SDDM_CONFIGURATION_H diff --git a/sddm-0.11.0-fedora_config.patch b/sddm-0.11.0-fedora_config.patch deleted file mode 100644 index 5e91748..0000000 --- a/sddm-0.11.0-fedora_config.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up sddm-0.11.0/src/common/Configuration.h.orig sddm-0.11.0/src/common/Configuration.h ---- sddm-0.11.0/src/common/Configuration.h.orig 2014-11-20 09:47:24.000000000 -0600 -+++ sddm-0.11.0/src/common/Configuration.h 2015-08-06 08:51:38.203801508 -0500 -@@ -46,7 +46,7 @@ namespace SDDM { - // 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("maui"), _S("Current theme name")); -+ Entry(Current, QString, _S("01-breeze-fedora"), _S("Current theme name")); - Entry(FacesDir, QString, _S(DATA_INSTALL_DIR "/faces"), _S("Face icon directory\n" - "The files should be in username.face.icon format")); - Entry(CursorTheme, QString, QString(), _S("Cursor theme")); diff --git a/sddm-0.13.0-fedora_config.patch b/sddm-0.13.0-fedora_config.patch new file mode 100644 index 0000000..84cba0f --- /dev/null +++ b/sddm-0.13.0-fedora_config.patch @@ -0,0 +1,33 @@ +diff -up sddm-0.13.0/src/common/Configuration.h.orig sddm-0.13.0/src/common/Configuration.h +--- sddm-0.13.0/src/common/Configuration.h.orig 2015-11-04 14:41:36.000000000 -0600 ++++ sddm-0.13.0/src/common/Configuration.h 2015-11-15 08:04:54.585633353 -0600 +@@ -45,7 +45,7 @@ namespace SDDM { + // 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("maui"), _S("Current theme name")); ++ Entry(Current, QString, _S("01-breeze-fedora"), _S("Current theme name")); + Entry(FacesDir, QString, _S(DATA_INSTALL_DIR "/faces"), _S("Face icon directory\n" + "The files should be in username.face.icon format")); + Entry(CursorTheme, QString, QString(), _S("Cursor theme")); +@@ -59,9 +59,9 @@ namespace SDDM { + Entry(SessionDir, QString, _S("/usr/share/xsessions"), _S("Session description directory")); + Entry(SessionCommand, QString, _S(SESSION_COMMAND), _S("Xsession script path\n" + "A script to execute when starting the desktop session")); +- Entry(DisplayCommand, QString, _S(DATA_INSTALL_DIR "/scripts/Xsetup"), _S("Xsetup script path\n" ++ Entry(DisplayCommand, QString, _S("/etc/sddm/Xsetup"), _S("Xsetup script path\n" + "A script to execute when starting the display server")); +- Entry(DisplayStopCommand, QString, _S(DATA_INSTALL_DIR "/scripts/Xstop"), _S("Xstop script path\n" ++ Entry(DisplayStopCommand, QString, _S("/etc/sddm/Xstop"), _S("Xstop script path\n" + "A script to execute when stopping the display server")); + Entry(MinimumVT, int, MINIMUM_VT, _S("Minimum VT\n" + "The lowest virtual terminal number that will be used.")); +@@ -72,7 +72,7 @@ namespace SDDM { + "A script to execute when starting the desktop session")); + ); + Section(Users, +- Entry(DefaultPath, QString, _S("/bin:/usr/bin:/usr/local/bin"), _S("Default $PATH")); ++ Entry(DefaultPath, QString, _S("/usr/local/bin:/usr/bin:/bin"), _S("Default $PATH")); + Entry(MinimumUid, int, UID_MIN, _S("Minimum user id for displayed users")); + Entry(MaximumUid, int, UID_MAX, _S("Maximum user id for displayed users")); + Entry(HideUsers, QStringList, QStringList(), _S("Hidden users")); diff --git a/sddm.spec b/sddm.spec index 1e6d8df..2e71547 100644 --- a/sddm.spec +++ b/sddm.spec @@ -2,7 +2,7 @@ Name: sddm Version: 0.13.0 -Release: 2%{?dist} +Release: 3%{?dist} # code GPLv2+, fedora theme CC-BY-SA License: GPLv2+ and CC-BY-SA Summary: QML based X11 desktop manager @@ -14,7 +14,7 @@ Source0: https://github.com/sddm/sddm/archive/v%{version}.tar.gz ## downstream patches # downstream fedora-specific configuration -Patch101: sddm-0.11.0-fedora_config.patch +Patch101: sddm-0.13.0-fedora_config.patch # Shamelessly stolen from gdm Source11: sddm.pam @@ -41,6 +41,8 @@ BuildRequires: python-docutils BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qttools-devel +# verify presence to pull defaults from /etc/login.defs +BuildRequires: shadow-utils BuildRequires: systemd Obsoletes: kde-settings-sddm < 20-5 @@ -102,7 +104,7 @@ install -Dpm 644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sddm.conf mkdir -p %{buildroot}%{_localstatedir}/run/sddm mkdir -p %{buildroot}%{_localstatedir}/lib/sddm mkdir -p %{buildroot}%{_sysconfdir}/sddm/ -cp -a %{buildroot}%{_datadir}/sddm/scripts/Xsetup \ +cp -a %{buildroot}%{_datadir}/sddm/scripts/* \ %{buildroot}%{_sysconfdir}/sddm/ # install fedora theme @@ -138,7 +140,7 @@ exit 0 %license COPYING %doc README.md CONTRIBUTORS %dir %{_sysconfdir}/sddm/ -%config(noreplace) %{_sysconfdir}/sddm/Xsetup +%config(noreplace) %{_sysconfdir}/sddm/* %config(noreplace) %{_sysconfdir}/sddm.conf %config(noreplace) %{_sysconfdir}/pam.d/sddm %config(noreplace) %{_sysconfdir}/pam.d/sddm-autologin @@ -175,6 +177,10 @@ exit 0 %changelog +* Sun Nov 15 2015 Rex Dieter - 0.13.0-3 +- merge Configuration.h into fedora_config.patch +- copy all scripts into /etc/sddm as %%config(noreplace) + * Sun Nov 15 2015 Rex Dieter 0.13.0-2 - %%config(noreplace) /etc/sddm/Xsetup