diff --git a/calamares-2.4.1-locale-utf8.patch b/calamares-2.4.1-locale-utf8.patch new file mode 100644 index 0000000..43353ce --- /dev/null +++ b/calamares-2.4.1-locale-utf8.patch @@ -0,0 +1,44 @@ +From effc8b4496df7783fd274ab37320d0a167def1f7 Mon Sep 17 00:00:00 2001 +From: Kevin Kofler +Date: Mon, 26 Sep 2016 01:47:58 +0200 +Subject: [PATCH] Fix locale filtering for UTF-8 on Fedora. + +locale -a returns the locales using ".utf8" names rather than ".UTF-8". +The case-insensitive match does not help because it is "utf8" rather +than "UTF-8". So we need to match both with and without the dash. +--- + src/modules/locale/LocaleConfiguration.cpp | 3 ++- + src/modules/locale/LocalePage.cpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/modules/locale/LocaleConfiguration.cpp b/src/modules/locale/LocaleConfiguration.cpp +index ca6316f..096d0dc 100644 +--- a/src/modules/locale/LocaleConfiguration.cpp ++++ b/src/modules/locale/LocaleConfiguration.cpp +@@ -60,7 +60,8 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale, + // FIXME: this might be useless if we already filter out non-UTF8 locales + foreach ( QString line, linesForLanguage ) + { +- if ( line.contains( "UTF-8" ) ) ++ if ( line.contains( "UTF-8", Qt::CaseInsensitive ) || ++ line.contains( "utf8", Qt::CaseInsensitive ) ) + linesForLanguageUtf.append( line ); + } + +diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp +index ed166ea..88b030f 100644 +--- a/src/modules/locale/LocalePage.cpp ++++ b/src/modules/locale/LocalePage.cpp +@@ -365,7 +365,8 @@ LocalePage::init( const QString& initialRegion, + // because it's not 1995. + for ( auto it = m_localeGenLines.begin(); it != m_localeGenLines.end(); ) + { +- if ( !it->contains( "UTF-8", Qt::CaseInsensitive ) ) ++ if ( !it->contains( "UTF-8", Qt::CaseInsensitive ) && ++ !it->contains( "utf8", Qt::CaseInsensitive ) ) + it = m_localeGenLines.erase( it ); + else + ++it; +-- +2.1.0 + diff --git a/calamares.spec b/calamares.spec index 949aa8f..3abbcae 100644 --- a/calamares.spec +++ b/calamares.spec @@ -9,7 +9,7 @@ Name: calamares Version: 2.4.1 -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+ @@ -36,6 +36,10 @@ Patch0: calamares-2.4.1-default-settings.patch # submitted and merged upstream: https://github.com/calamares/calamares/pull/260 Patch100: calamares-2.4.1-users-no-chfn.patch +# locale module: Fix locale filtering for UTF-8 on Fedora +# https://github.com/calamares/calamares/commit/effc8b4496df7783fd274ab37320d0a167def1f7 +Patch101: calamares-2.4.1-locale-utf8.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 @@ -170,6 +174,7 @@ developing custom modules for Calamares. # delete backup files so they don't get installed rm -f src/modules/*/*.conf.default-settings %patch100 -p1 -b .users-no-chfn +%patch101 -p1 -b .locale-utf8 %build mkdir -p %{_target_platform} @@ -315,6 +320,9 @@ fi %changelog +* Sun Sep 25 2016 Kevin Kofler - 2.4.1-2 +- locale module: Fix locale filtering for UTF-8 on Fedora + * Mon Sep 19 2016 Kevin Kofler - 2.4.1-1 - Update to 2.4.1 - Drop support for separate partitionmanager tarball, kpmcore is now an external