Merge branch 'master' of https://github.com/calamares/calamares into development

This commit is contained in:
Philip Müller 2018-12-08 12:37:13 +01:00
commit 404cfc451d
12 changed files with 162 additions and 90 deletions

View File

@ -46,6 +46,7 @@ option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." ON )
option( WITH_KF5Crash "Enable crash reporting with KCrash." ON )
### USE_*
#
# By convention, when there are multiple modules that implement similar
@ -77,6 +78,7 @@ set( CALAMARES_VERSION_MINOR 2 )
set( CALAMARES_VERSION_PATCH 3 )
set( CALAMARES_VERSION_RC 1 )
### Transifex (languages) info
#
# complete = 100% translated,
@ -142,6 +144,26 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_C_STANDARD 99 )
set( CMAKE_C_STANDARD_REQUIRED ON )
# Debugging flags
#
# Possible debugging flags are:
# - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone
# widget and enables chatty debug logging, for dealing with the timezone
# location database.
# - DEBUG_FILESYSTEMS does extra logging and checking when looking at
# partition configuration. Lists known KPMCore FS types.
#
# The flags listed here are enabled in Debug builds. By default, none
# are **actually** listed, because they're for such specific scenarios.
set( _enable_debug_flags
# DEBUG_TIMEZONES
# DEBUG_FILESYSTEMS
)
# Add those flags to the CXX flags in a suitable format.
foreach( _edf ${_enable_debug_flags} )
string( APPEND CMAKE_CXX_FLAGS_DEBUG " -D${_edf}" )
endforeach()
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
message( STATUS "Found Clang ${CMAKE_CXX_COMPILER_VERSION}, setting up Clang-specific compiler flags." )
@ -175,7 +197,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" )
set( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" )
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
set( CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG" )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )

View File

@ -14,168 +14,168 @@ Categories=Qt;System;
X-AppStream-Ignore=true
Name[ar]=نظام التثبيت
Comment[be]=Calamares усталёўшчык сістэмы
Icon[be]=calamares
Name[be]=Усталяваць сістэму
Icon[be]=calamares
GenericName[be]=Усталёўшчык сістэмы
Comment[bg]=Calamares Системен Инсталатор
Icon[bg]=calamares
Comment[be]=Calamares усталёўшчык сістэмы
Name[bg]=Инсталирай системата
Icon[bg]=calamares
GenericName[bg]=Системен Инсталатор
Comment[ca]=Calamares Instal·lador de sistema
Icon[ca]=calamares
Comment[bg]=Calamares Системен Инсталатор
Name[ca]=Instal·la el sistema
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema
Comment[da]=Calamares Systeminstallationsprogram
Icon[da]=calamares
Comment[ca]=Calamares Instal·lador de sistema
Name[da]=Installér system
Icon[da]=calamares
GenericName[da]=Systeminstallationsprogram
Comment[de]=Calamares - Installation des Betriebssystems
Icon[de]=calamares
Comment[da]=Calamares Systeminstallationsprogram
Name[de]=System installieren
Icon[de]=calamares
GenericName[de]=Installation des Betriebssystems
Comment[el]=Calamares Εγκατάσταση συστήματος
Icon[el]=calamares
Comment[de]=Calamares - Installation des Betriebssystems
Name[el]=Εγκατάσταση συστήματος
Icon[el]=calamares
GenericName[el]=Εγκατάσταση συστήματος
Comment[en_GB]=Calamares System Installer
Icon[en_GB]=calamares
Comment[el]=Calamares Εγκατάσταση συστήματος
Name[en_GB]=Install System
Icon[en_GB]=calamares
GenericName[en_GB]=System Installer
Comment[es]=Calamares Instalador del Sistema
Icon[es]=calamares
Comment[en_GB]=Calamares System Installer
Name[es]=Instalar Sistema
Icon[es]=calamares
GenericName[es]=Instalador del Sistema
Comment[et]=Calamares süsteemipaigaldaja
Icon[et]=calamares
Comment[es]=Calamares Instalador del Sistema
Name[et]=Paigalda süsteem
Icon[et]=calamares
GenericName[et]=Süsteemipaigaldaja
Comment[et]=Calamares süsteemipaigaldaja
Name[eu]=Sistema instalatu
Name[es_PR]=Instalar el sistema
Comment[fr]=Calamares - Installateur système
Icon[fr]=calamares
Name[fr]=Installer le système
Icon[fr]=calamares
GenericName[fr]=Installateur système
Comment[gl]=Calamares Instalador de sistemas
Icon[gl]=calamares
Comment[fr]=Calamares - Installateur système
Name[gl]=Instalación do Sistema
Icon[gl]=calamares
GenericName[gl]=Instalador de sistemas
Comment[he]=Calamares - אשף התקנה
Icon[he]=calamares
Comment[gl]=Calamares Instalador de sistemas
Name[he]=התקנת מערכת
Icon[he]=calamares
GenericName[he]=אשף התקנה
Comment[hi]=Calamares ि
Icon[hi]=calamares
Comment[he]=Calamares - אשף התקנה
Name[hi]=ि
Icon[hi]=calamares
GenericName[hi]=ि
Comment[hr]=Calamares Instalacija sustava
Icon[hr]=calamares
Comment[hi]=Calamares ि
Name[hr]=Instaliraj sustav
Icon[hr]=calamares
GenericName[hr]=Instalacija sustava
Comment[hu]=Calamares Rendszertelepítő
Icon[hu]=calamares
Comment[hr]=Calamares Instalacija sustava
Name[hu]=Rendszer telepítése
Icon[hu]=calamares
GenericName[hu]=Rendszertelepítő
Comment[id]=Calamares Pemasang Sistem
Icon[id]=calamares
Comment[hu]=Calamares Rendszertelepítő
Name[id]=Instal Sistem
Icon[id]=calamares
GenericName[id]=Pemasang
Comment[is]=Calamares Kerfis uppsetning
Icon[is]=calamares
Comment[id]=Calamares Pemasang Sistem
Name[is]=Setja upp kerfið
Icon[is]=calamares
GenericName[is]=Kerfis uppsetning
Comment[cs_CZ]=Calamares instalátor operačních systémů
Icon[cs_CZ]=calamares
Comment[is]=Calamares Kerfis uppsetning
Name[cs_CZ]=Nainstalovat
Icon[cs_CZ]=calamares
GenericName[cs_CZ]=Instalátor systému
Comment[ja]=Calamares
Icon[ja]=calamares
Comment[cs_CZ]=Calamares instalátor operačních systémů
Name[ja]=
Icon[ja]=calamares
GenericName[ja]=
Comment[ko]=
Icon[ko]=
Comment[ja]=Calamares
Name[ko]=
Icon[ko]=
GenericName[ko]=
Comment[lt]=Calamares Sistemos diegimo programa
Icon[lt]=calamares
Comment[ko]=
Name[lt]=Įdiegti Sistemą
Icon[lt]=calamares
GenericName[lt]=Sistemos diegimas į kompiuterį
Comment[it_IT]=Calamares Programma d'installazione del sistema
Icon[it_IT]=calamares
Comment[lt]=Calamares Sistemos diegimo programa
Name[it_IT]=Installa il sistema
Icon[it_IT]=calamares
GenericName[it_IT]=Programma d'installazione del sistema
Comment[nb]=Calamares-systeminstallatør
Icon[nb]=calamares
Comment[it_IT]=Calamares Programma d'installazione del sistema
Name[nb]=Installer System
Icon[nb]=calamares
GenericName[nb]=Systeminstallatør
Comment[nl]=Calamares Installatieprogramma
Icon[nl]=calamares
Comment[nb]=Calamares-systeminstallatør
Name[nl]=Installeer systeem
Icon[nl]=calamares
GenericName[nl]=Installatieprogramma
Comment[pl]=Calamares Instalator systemu
Icon[pl]=calamares
Comment[nl]=Calamares Installatieprogramma
Name[pl]=Zainstaluj system
Icon[pl]=calamares
GenericName[pl]=Instalator systemu
Comment[pt_BR]=Calamares Instalador de Sistema
Icon[pt_BR]=calamares
Comment[pl]=Calamares Instalator systemu
Name[pt_BR]=Sistema de Instalação
Icon[pt_BR]=calamares
GenericName[pt_BR]=Instalador de Sistema
Comment[ro]=Calamares Instalator de sistem
Icon[ro]=calamares
Comment[pt_BR]=Calamares Instalador de Sistema
Name[ro]=Instalează sistemul
Icon[ro]=calamares
GenericName[ro]=Instalator de sistem
Comment[ru]=Calamares - Установщик системы
Icon[ru]=calamares
Comment[ro]=Calamares Instalator de sistem
Name[ru]=Установить систему
Icon[ru]=calamares
GenericName[ru]=Установщик системы
Comment[sk]=Calamares Inštalátor systému
Icon[sk]=calamares
Comment[ru]=Calamares - Установщик системы
Name[sk]=Inštalovať systém
Icon[sk]=calamares
GenericName[sk]=Inštalátor systému
Comment[sk]=Calamares Inštalátor systému
Name[sl]=Namesti sistem
Comment[sq]=Calamares Instalues Sistemi
Icon[sq]=calamares
Name[sq]=Instalo Sistemin
Icon[sq]=calamares
GenericName[sq]=Instalues Sistemi
Comment[fi_FI]=Calamares Järjestelmän Asentaja
Icon[fi_FI]=calamares
Comment[sq]=Calamares Instalues Sistemi
Name[fi_FI]=Asenna Järjestelmä
Icon[fi_FI]=calamares
GenericName[fi_FI]=Järjestelmän Asennusohjelma
Comment[fi_FI]=Calamares Järjestelmän Asentaja
Name[sr@latin]=Instaliraj sistem
Name[sr]=Инсталирај систем
Comment[sv]=Calamares Systeminstallerare
Icon[sv]=calamares
Name[sv]=Installera system
Icon[sv]=calamares
GenericName[sv]=Systeminstallerare
Comment[sv]=Calamares Systeminstallerare
Name[th]=
Comment[uk]=Calamares - Встановлювач системи
Name[uk]=Встановити Систему
GenericName[uk]=Встановлювач системи
Comment[zh_CN]=Calamares
Icon[zh_CN]=calamares
Comment[uk]=Calamares - Встановлювач системи
Name[zh_CN]=
Icon[zh_CN]=calamares
GenericName[zh_CN]=
Comment[zh_TW]=Calamares
Icon[zh_TW]=calamares
Comment[zh_CN]=Calamares
Name[zh_TW]=
Icon[zh_TW]=calamares
GenericName[zh_TW]=
Comment[ast]=Calamares Instalador del sistema
Icon[ast]=calamares
Comment[zh_TW]=Calamares
Name[ast]=Instalar sistema
Icon[ast]=calamares
GenericName[ast]=Instalador del sistema
Comment[eo]=Calamares Sistema Instalilo
Icon[eo]=calamares
Comment[ast]=Calamares Instalador del sistema
Name[eo]=Instali Sistemo
Icon[eo]=calamares
GenericName[eo]=Sistema Instalilo
Comment[es_MX]=Calamares - Instalador del sistema
Icon[es_MX]=calamares
Comment[eo]=Calamares Sistema Instalilo
Name[es_MX]=Instalar el Sistema
Icon[es_MX]=calamares
GenericName[es_MX]=Instalador del sistema
Comment[pt_PT]=Calamares - Instalador de Sistema
Icon[pt_PT]=calamares
Comment[es_MX]=Calamares - Instalador del sistema
Name[pt_PT]=Instalar Sistema
Icon[pt_PT]=calamares
GenericName[pt_PT]=Instalador de Sistema
Comment[tr_TR]=Calamares Sistem Yükleyici
Icon[tr_TR]=calamares
Comment[pt_PT]=Calamares - Instalador de Sistema
Name[tr_TR]=Sistemi Yükle
Icon[tr_TR]=calamares
GenericName[tr_TR]=Sistem Yükleyici
Comment[tr_TR]=Calamares Sistem Yükleyici

View File

@ -5,6 +5,7 @@
# This file is sourced by travis.sh, and exports the variables
# to the environment.
CMAKE_ARGS="\
-DCMAKE_BUILD_TYPE=Debug \
-DWEBVIEW_FORCE_WEBKIT=1 \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DWITH_PYTHONQT=OFF"

View File

@ -2746,7 +2746,7 @@ Ausgabe:
<message>
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="56"/>
<source>Physical Extent Size:</source>
<translation type="unfinished"/>
<translation>Größe der Körpergröße:</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/VolumeGroupBaseDialog.ui" line="66"/>

View File

@ -821,7 +821,7 @@ The installer will quit and all changes will be lost.</source>
<message>
<location filename="../src/modules/partition/core/DeviceModel.cpp" line="89"/>
<source>%1 - (%2)</source>
<translation type="unfinished"/>
<translation>%1 - (%2)</translation>
</message>
</context>
<context>
@ -1724,7 +1724,7 @@ The installer will quit and all changes will be lost.</source>
<message>
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="132"/>
<source>New Volume Group</source>
<translation type="unfinished"/>
<translation>Новая группа томов</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/PartitionPage.ui" line="139"/>

View File

@ -6,7 +6,7 @@
# Translators:
# Paul Combal <abonnementspaul@gmail.com>, 2017
# Abdallah B <bahassinea@gmail.com>, 2017
# Aestan <anthony.margerand@gmail.com>, 2018
# Aestan <anthony.margerand@protonmail.com>, 2018
# Jeremy Gourmel <jgourmel@free.fr>, 2018
#
#, fuzzy

View File

@ -5,7 +5,7 @@
#
# Translators:
# Paul Combal <abonnementspaul@gmail.com>, 2017
# Aestan <anthony.margerand@gmail.com>, 2018
# Aestan <anthony.margerand@protonmail.com>, 2018
#
#, fuzzy
msgid ""
@ -14,7 +14,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-05 11:34-0400\n"
"PO-Revision-Date: 2016-12-16 12:18+0000\n"
"Last-Translator: Aestan <anthony.margerand@gmail.com>, 2018\n"
"Last-Translator: Aestan <anthony.margerand@protonmail.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/calamares/teams/20061/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -80,26 +80,47 @@ bool
canBeResized( Partition* candidate )
{
if ( !candidate )
{
cDebug() << "Partition* is NULL";
return false;
}
cDebug() << "Checking if" << candidate->partitionPath() << "can be resized.";
if ( !candidate->fileSystem().supportGrow() ||
!candidate->fileSystem().supportShrink() )
{
cDebug() << " .. filesystem" << candidate->fileSystem().name()
<< "does not support resize.";
return false;
}
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
{
cDebug() << " .. partition is free space";
return false;
}
if ( candidate->isMounted() )
{
cDebug() << " .. partition is mounted";
return false;
}
if ( candidate->roles().has( PartitionRole::Primary ) )
{
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
if ( !table )
{
cDebug() << " .. no partition table found";
return false;
}
if ( table->numPrimaries() >= table->maxPrimaries() )
{
cDebug() << " .. partition table already has"
<< table->maxPrimaries() << "primary partitions.";
return false;
}
}
bool ok = false;
@ -136,11 +157,10 @@ bool
canBeResized( PartitionCoreModule* core, const QString& partitionPath )
{
//FIXME: check for max partitions count on DOS MBR
cDebug() << "checking if" << partitionPath << "can be resized.";
cDebug() << "Checking if" << partitionPath << "can be resized.";
QString partitionWithOs = partitionPath;
if ( partitionWithOs.startsWith( "/dev/" ) )
{
cDebug() << partitionWithOs << "seems like a good path";
DeviceModel* dm = core->deviceModel();
for ( int i = 0; i < dm->rowCount(); ++i )
{
@ -148,10 +168,11 @@ canBeResized( PartitionCoreModule* core, const QString& partitionPath )
Partition* candidate = KPMHelpers::findPartitionByPath( { dev }, partitionWithOs );
if ( candidate )
{
cDebug() << "found Partition* for" << partitionWithOs;
cDebug() << " .. found Partition* for" << partitionWithOs;
return canBeResized( candidate );
}
}
cDebug() << " .. no Partition* found for" << partitionWithOs;
}
cDebug() << "Partition" << partitionWithOs << "CANNOT BE RESIZED FOR AUTOINSTALL.";
@ -177,6 +198,9 @@ lookForFstabEntries( const QString& partitionPath )
mountOptions.append( "noload" );
}
cDebug() << "Checking device" << partitionPath
<< "for fstab (fs=" << r.getOutput() << ')';
FstabEntryList fstabEntries;
QTemporaryDir mountsDir;
mountsDir.setAutoRemove( false );
@ -185,6 +209,9 @@ lookForFstabEntries( const QString& partitionPath )
if ( !exit ) // if all is well
{
QFile fstabFile( mountsDir.path() + "/etc/fstab" );
cDebug() << " .. reading" << fstabFile.fileName();
if ( fstabFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
{
const QStringList fstabLines = QString::fromLocal8Bit( fstabFile.readAll() )
@ -193,12 +220,18 @@ lookForFstabEntries( const QString& partitionPath )
for ( const QString& rawLine : fstabLines )
fstabEntries.append( FstabEntry::fromEtcFstab( rawLine ) );
fstabFile.close();
cDebug() << " .. got" << fstabEntries.count() << "lines.";
std::remove_if( fstabEntries.begin(), fstabEntries.end(), [](const FstabEntry& x) { return !x.isValid(); } );
cDebug() << " .. got" << fstabEntries.count() << "fstab entries.";
}
else
cWarning() << "Could not read fstab from mounted fs";
if ( QProcess::execute( "umount", { "-R", mountsDir.path() } ) )
cWarning() << "Could not unmount" << mountsDir.path();
}
else
cWarning() << "Could not mount existing fs";
return fstabEntries;
}

View File

@ -249,7 +249,7 @@ ChoicePage::setupChoices()
// Fill up swap options
// .. TODO: only if enabled in the config
m_eraseSwapChoices = createCombo( { SwapChoice::NoSwap, SwapChoice::SmallSwap, SwapChoice:: FullSwap } );
m_eraseSwapChoices = createCombo( { SwapChoice::NoSwap, SwapChoice::SmallSwap, SwapChoice::FullSwap } );
m_eraseButton->addOptionsComboBox( m_eraseSwapChoices );
#if 0

View File

@ -574,10 +574,24 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
QString defaultFS = CalamaresUtils::getString( configurationMap, "defaultFileSystemType" );
if ( defaultFS.isEmpty() )
defaultFS = QStringLiteral( "ext4" );
else
cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS;
if ( FileSystem::typeForName( defaultFS ) == FileSystem::Unknown )
{
cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4.";
defaultFS = QStringLiteral( "ext4" );
#ifdef DEBUG_FILESYSTEMS
// This bit is for distro's debugging their settings, and shows
// all the strings that KPMCore is matching against for FS type.
{
Logger::CLog d( Logger::LOGDEBUG );
using TR = Logger::DebugRow< int, QString >;
const auto fstypes = FileSystem::types();
d << "Available types (" << fstypes.count() << ')';
for ( FileSystem::Type t : fstypes )
d << TR( static_cast<int>( t ), FileSystem::nameForType( t ) );
}
#endif
}
gs->insert( "defaultFileSystemType", defaultFS );

View File

@ -53,6 +53,8 @@ alwaysShowPartitionLabels: true
#
# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs
# If nothing is specified, Calamares defaults to "ext4".
#
# Names are case-sensitive and defined by KPMCore.
defaultFileSystemType: "ext4"
# Show/hide LUKS related functionality in automated partitioning modes.