From 2529743bfce918fa5c836fa6edcaa0ef72ce6daa Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:03:40 +0100 Subject: [PATCH] fix for kdm detection in displaymanager patch patch to fix reboot by not using /bin/sh patch to read locale from LANG [release 1.0.1-6mamba;Fri Feb 20 2015] --- ...1-displaymanager_fix_paths_openmamba.patch | 17 +++++++-- calamares-1.0.1-dracut_hostonly.patch | 11 ++++++ calamares-1.0.1-fix_reboot.patch | 11 ++++++ calamares-1.0.1-locale_use_LANG.patch | 38 +++++++++++++++++++ calamares.spec | 13 ++++++- 5 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 calamares-1.0.1-dracut_hostonly.patch create mode 100644 calamares-1.0.1-fix_reboot.patch create mode 100644 calamares-1.0.1-locale_use_LANG.patch diff --git a/calamares-1.0.1-displaymanager_fix_paths_openmamba.patch b/calamares-1.0.1-displaymanager_fix_paths_openmamba.patch index 346612d..bdfa025 100644 --- a/calamares-1.0.1-displaymanager_fix_paths_openmamba.patch +++ b/calamares-1.0.1-displaymanager_fix_paths_openmamba.patch @@ -1,5 +1,5 @@ ---- calamares-1.0.1/src/modules/displaymanager/main.py.orig 2015-02-19 16:30:17.096993788 +0100 -+++ calamares-1.0.1/src/modules/displaymanager/main.py 2015-02-19 16:31:34.302058388 +0100 +--- calamares-1.0.1/src/modules/displaymanager/main.py.orig 2015-02-03 22:15:35.000000000 +0100 ++++ calamares-1.0.1/src/modules/displaymanager/main.py 2015-02-20 12:52:59.619944277 +0100 @@ -30,7 +30,7 @@ desktop_environments = [ @@ -9,7 +9,18 @@ DesktopEnvironment('/usr/bin/gnome-session', 'gnome'), DesktopEnvironment('/usr/bin/startxfce4', 'xfce'), DesktopEnvironment('/usr/bin/cinnamon-session', 'cinnamon-session'), -@@ -104,7 +104,7 @@ +@@ -50,7 +50,9 @@ + return None + + def have_dm(dm_name, root_mount_point): +- return os.path.exists("%s/usr/bin/%s" % (root_mount_point, dm_name)) or os.path.exists("%s/usr/sbin/%s" % (root_mount_point, dm_name)) ++ return os.path.exists("%s/usr/bin/%s" % (root_mount_point, dm_name)) \ ++ or os.path.exists("%s/usr/sbin/%s" % (root_mount_point, dm_name)) \ ++ or os.path.exists("%s/opt/kde/bin/%s" % (root_mount_point, dm_name)) + + def set_autologin(username, displaymanagers, default_desktop_environment, root_mount_point): + """ Enables automatic login for the installed desktop managers """ +@@ -104,7 +106,7 @@ if "kdm" in displaymanagers: # Systems with KDM as Desktop Manager kdm_conf_path = os.path.join( diff --git a/calamares-1.0.1-dracut_hostonly.patch b/calamares-1.0.1-dracut_hostonly.patch new file mode 100644 index 0000000..8e81076 --- /dev/null +++ b/calamares-1.0.1-dracut_hostonly.patch @@ -0,0 +1,11 @@ +--- calamares-1.0.1/src/modules/dracut/main.py.orig 2015-02-20 13:25:10.608600896 +0100 ++++ calamares-1.0.1/src/modules/dracut/main.py 2015-02-20 13:25:20.870604022 +0100 +@@ -22,7 +22,7 @@ + from libcalamares.utils import chroot_call + + def run_dracut(): +- return chroot_call(['dracut', '-f']) ++ return chroot_call(['dracut', '-f', '-H']) + + def run(): + returnCode = run_dracut() diff --git a/calamares-1.0.1-fix_reboot.patch b/calamares-1.0.1-fix_reboot.patch new file mode 100644 index 0000000..4058cb1 --- /dev/null +++ b/calamares-1.0.1-fix_reboot.patch @@ -0,0 +1,11 @@ +--- calamares-1.0.1/src/modules/finished/FinishedPage.cpp.orig 2015-02-20 15:57:02.785426632 +0100 ++++ calamares-1.0.1/src/modules/finished/FinishedPage.cpp 2015-02-20 15:57:20.687409146 +0100 +@@ -90,7 +90,7 @@ + { + if ( ui->restartCheckBox->isVisible() && + ui->restartCheckBox->isChecked() ) +- QProcess::execute( "/bin/sh", { m_restartNowCommand } ); ++ QProcess::execute( { m_restartNowCommand } ); + } ); + } + } diff --git a/calamares-1.0.1-locale_use_LANG.patch b/calamares-1.0.1-locale_use_LANG.patch new file mode 100644 index 0000000..9eea7dd --- /dev/null +++ b/calamares-1.0.1-locale_use_LANG.patch @@ -0,0 +1,38 @@ +--- calamares-1.0.1/src/modules/locale/LocalePage.cpp.orig 2015-02-20 15:17:31.878095644 +0100 ++++ calamares-1.0.1/src/modules/locale/LocalePage.cpp 2015-02-20 15:51:22.166759362 +0100 +@@ -303,7 +303,7 @@ + QLocale myLocale = QLocale(); + + if ( m_localeGenLines.isEmpty() ) +- return "en_US.UTF-8 UTF-8"; ++ return QString::fromUtf8(getenv("LANG")) + " UTF-8"; + + QString myLanguage = myLocale.name().split( '_' ).first(); + QStringList linesForLanguage; +@@ -314,7 +314,7 @@ + } + + if ( linesForLanguage.length() == 0 ) +- return "en_US.UTF-8 UTF-8"; ++ return QString::fromUtf8(getenv("LANG")) + " UTF-8"; + else if ( linesForLanguage.length() == 1 ) + return linesForLanguage.first(); + else +@@ -340,7 +340,7 @@ + } + + if ( linesForLanguageAndCountry.length() == 0 ) +- return "en_US.UTF-8 UTF-8"; ++ return QString::fromUtf8(getenv("LANG")) + " UTF-8"; + else if ( linesForLanguageAndCountry.length() == 1 ) + return linesForLanguageAndCountry.first(); + else +@@ -356,7 +356,7 @@ + return linesForLanguageAndCountryUtf.first(); + } + +- return "en_US.UTF-8 UTF-8"; ++ return QString::fromUtf8(getenv("LANG")) + " UTF-8"; + } + + diff --git a/calamares.spec b/calamares.spec index c13f00c..8b2c101 100644 --- a/calamares.spec +++ b/calamares.spec @@ -1,6 +1,6 @@ Name: calamares Version: 1.0.1 -Release: 5mamba +Release: 6mamba Summary: Distribution-independent installer framework Group: Graphical Desktop/Applications/Utilities Vendor: openmamba @@ -13,6 +13,9 @@ Source1: https://github.com/calamares/partitionmanager.git/calamares/parti Patch0: calamares-1.0.1-add_smart_package_manager_support.patch Patch1: calamares-1.0.1-plymouth_path.patch Patch2: calamares-1.0.1-displaymanager_fix_paths_openmamba.patch +Patch3: calamares-1.0.1-fix_reboot.patch +Patch4: calamares-1.0.1-dracut_hostonly.patch +Patch5: calamares-1.0.1-locale_use_LANG.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -64,6 +67,9 @@ This package contains libraries and header files for developing applications tha %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 rmdir src/modules/partition/partitionmanager mv partitionmanager-%{version} src/modules/partition/partitionmanager @@ -186,6 +192,11 @@ install -D -m0755 src/branding/default/squid.png %{buildroot}%{_datadir}/pixmaps %changelog +* Fri Feb 20 2015 Silvan Calarco 1.0.1-6mamba +- fix for kdm detection in displaymanager patch +- patch to fix reboot by not using /bin/sh +- patch to read locale from LANG + * Thu Feb 19 2015 Silvan Calarco 1.0.1-5mamba - patch packages module to support smart package manager - patch to fix plymouth path in grubcfg module for openmamba