diff --git a/calamares-2.4.6-default-settings.patch b/calamares-2.4.6-default-settings.patch index ce557c0..9b9c81b 100644 --- a/calamares-2.4.6-default-settings.patch +++ b/calamares-2.4.6-default-settings.patch @@ -204,7 +204,7 @@ diff -ur calamares-2.4.6/src/modules/unpackfs/unpackfs.conf calamares-2.4.6-defa diff -ur calamares-2.4.6/src/modules/users/users.conf calamares-2.4.6-default-settings/src/modules/users/users.conf --- calamares-2.4.6/src/modules/users/users.conf 2016-04-12 11:23:47.000000000 +0200 +++ calamares-2.4.6-default-settings/src/modules/users/users.conf 2017-01-15 03:36:24.891168965 +0100 -@@ -3,12 +3,11 @@ +@@ -3,12 +3,13 @@ - users - lp - video @@ -216,6 +216,9 @@ diff -ur calamares-2.4.6/src/modules/users/users.conf calamares-2.4.6-default-se autologinGroup: autologin -doAutologin: true +doAutologin: false - sudoersGroup: wheel +-sudoersGroup: wheel ++# this is already the default in /etc/sudoers, so do NOT set it here, as that ++# would create a confusing /etc/sudoers.d/10-installer file that sets it again ++# sudoersGroup: wheel setRootPassword: true doReusePassword: true diff --git a/calamares-2.4.6-fix-displaymanager.patch b/calamares-2.4.6-fix-displaymanager.patch new file mode 100644 index 0000000..d4a29d1 --- /dev/null +++ b/calamares-2.4.6-fix-displaymanager.patch @@ -0,0 +1,64 @@ +From 7f7627bc21ac8693e19c65c8dc3f31c10a786d57 Mon Sep 17 00:00:00 2001 +Message-Id: <7f7627bc21ac8693e19c65c8dc3f31c10a786d57.1492299277.git.kevin.kofler@chello.at> +From: Teo Mrnjavac +Date: Tue, 17 Jan 2017 17:02:53 +0100 +Subject: [PATCH] Unbreak autologin setting. + +Don't assume 'User' exists in autologin section. +https://github.com/calamares/calamares/commit/8d5e4cdb1629fb7e16336ccdfe7950bd6767cde9 + +Unbreak autologin setting. +https://github.com/calamares/calamares/commit/68e2c4f9013d8a555021b0fed46a0892663ee2af +--- + src/modules/displaymanager/main.py | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py +index 57945fa..0418f4a 100644 +--- a/src/modules/displaymanager/main.py ++++ b/src/modules/displaymanager/main.py +@@ -261,19 +261,16 @@ def set_autologin(username, displaymanagers, default_desktop_environment, root_m + if os.path.isfile(sddm_conf_path): + sddm_config.read(sddm_conf_path) + +- autologin_section = {} +- if 'Autologin' in sddm_config: +- autologin_section = sddm_config['Autologin'] ++ if 'Autologin' not in sddm_config: ++ sddm_config.add_section('Autologin') + + if do_autologin: +- autologin_section['User'] = username +- else: +- del autologin_section['User'] ++ sddm_config.set('Autologin', 'User', username) ++ elif sddm_config.has_option('Autologin', 'User'): ++ sddm_config.remove_option('Autologin', 'User') + + if default_desktop_environment is not None: +- autologin_section['Session'] = default_desktop_environment.desktop_file +- +- sddm_config['Autologin'] = autologin_section ++ sddm_config.set('Autologin', 'Session', default_desktop_environment.desktop_file) + + with open(sddm_conf_path, 'w') as sddm_config_file: + sddm_config.write(sddm_config_file, space_around_delimiters=False) +@@ -351,7 +348,7 @@ def run(): + if default_desktop_environment.desktop_file == "deepin": + os.system("sed -i -e \"s/^.greeter-session=.*/greeter-session=lightdm-deepin-greeter/\" {!s}/etc/lightdm/lightdm.conf".format( + root_mount_point)) +- ++ + else: + libcalamares.utils.debug("lightdm selected but not installed") + displaymanagers.remove("lightdm") +@@ -437,5 +434,5 @@ def run(): + libcalamares.utils.debug("Unsetting autologin.") + + libcalamares.globalstorage.insert("displayManagers", displaymanagers) +- ++ + return set_autologin(username, displaymanagers, default_desktop_environment, root_mount_point) +-- +2.9.3 + diff --git a/calamares-2.4.6-utf8-passwords.patch b/calamares-2.4.6-utf8-passwords.patch new file mode 100644 index 0000000..b5b8274 --- /dev/null +++ b/calamares-2.4.6-utf8-passwords.patch @@ -0,0 +1,37 @@ +From db093bf04ca1e42efa543f064d826775edf8c845 Mon Sep 17 00:00:00 2001 +Message-Id: +From: Teo Mrnjavac +Date: Tue, 24 Jan 2017 11:24:46 +0100 +Subject: [PATCH] Fix issue which disallowed non-Latin1 characters in + passwords. + +Fix issue which disallowed non-Latin1 characters in passwords. +https://github.com/calamares/calamares/commit/20d279a40921992c15e670c86d486985a555cf83 + +[users] SetPasswordJob: Also encode m_userName in UTF-8, not Latin1. +(Kevin Kofler) +https://github.com/calamares/calamares/commit/97c9a7c6e4f0207959b427ce8e2732051b2f574b +--- + src/modules/users/SetPasswordJob.cpp | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/modules/users/SetPasswordJob.cpp b/src/modules/users/SetPasswordJob.cpp +index 5121a76..79b3eeb 100644 +--- a/src/modules/users/SetPasswordJob.cpp ++++ b/src/modules/users/SetPasswordJob.cpp +@@ -74,10 +74,9 @@ SetPasswordJob::exec() + } + + QString encrypted = QString::fromLatin1( +- crypt( m_newPassword.toLatin1(), ++ crypt( m_newPassword.toUtf8(), + QString( "$6$%1$" ) +- .arg( m_userName ) +- .toLatin1() ) ); ++ .arg( m_userName ).toUtf8() ) ); + + int ec = CalamaresUtils::System::instance()-> + targetEnvCall( { "usermod", +-- +2.9.3 + diff --git a/calamares.spec b/calamares.spec index 6dd7e07..44c11a4 100644 --- a/calamares.spec +++ b/calamares.spec @@ -9,7 +9,7 @@ Name: calamares Version: 2.4.6 -Release: 1%{?snaphash:.%{snapdate}git%(echo %{snaphash} | cut -c -13)}%{?dist} +Release: 2%{?snaphash:.%{snapdate}git%(echo %{snaphash} | cut -c -13)}%{?dist} Summary: Installer from a live CD/DVD/USB to disk License: GPLv3+ @@ -35,6 +35,12 @@ Patch0: calamares-2.4.6-default-settings.patch # use kdesu instead of pkexec (works around #1171779) Patch1: calamares-2.4.1-kdesu.patch +# backport fix for the displaymanager module (Python exception with SDDM) +Patch2: calamares-2.4.6-fix-displaymanager.patch + +# backport fix for non-Latin1 user names and passwords +Patch3: calamares-2.4.6-utf8-passwords.patch + # Calamares is only supported where live images (and GRUB) are. (#1171380) # This list matches the livearches global from anaconda.spec ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le @@ -172,6 +178,8 @@ developing custom modules for Calamares. # delete backup files so they don't get installed rm -f src/modules/*/*.conf.default-settings %patch1 -p1 -b .kdesu +%patch2 -p1 -b .fix-displaymanager +%patch3 -p1 -b .utf8-passwords %build mkdir -p %{_target_platform} @@ -316,6 +324,11 @@ fi %changelog +* Sat Apr 15 2017 Kevin Kofler - 2.4.6-2 +- Backport fix for the displaymanager module (Python exception with SDDM) +- Backport fix for non-Latin1 user names and passwords +- default-settings: comment out unneeded and problematic "sudoersGroup: wheel" + * Sun Jan 15 2017 Kevin Kofler - 2.4.6-1 - Update to 2.4.6 (bugfix release) - Rebase default-settings patch