diff --git a/.gitattributes b/.gitattributes index d7a0364e1..3b8a7f1e8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,11 @@ -.tx/* export-ignore -hacking/* export-ignore -HACKING.md export-ignore -.editorconfig export-ignore -src/modules/testmodule.py export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.github export-ignore +.gitignore export-ignore +.gitmodules export-ignore +.travis.yml export-ignore +.tx export-ignore + +src/modules/testmodule.py export-ignore src/modules/globalStorage.yaml export-ignore + diff --git a/CHANGES b/CHANGES index f4d86a0e2..a996526a3 100644 --- a/CHANGES +++ b/CHANGES @@ -6,16 +6,23 @@ website will have to do for older versions. # 3.2.3 (unreleased) # This release contains contributions from (alphabetically by first name): + - Alf Gaida + - Caio Carvalho + - Kevin Kofler + - Philip Mueller ## Core ## ## Modules ## + * The *partition* module supports RAID devices, but only when Calamares + is compiled with the newest KPMCore release. + * The *keyboard* module now handles the (bogus) Austrian keymap for + the system console properly. - New module *fsresizer* can be used to resize filesystems. It is intended for use in OEM installs where an image of fixed size is created, and then sized to the actual SD card the user has used. - # 3.2.2 (2018-09-04) # This release contains contributions from (alphabetically by first name): diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index 8efdfd80d..a8b363209 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -193,7 +193,12 @@ main( int argc, char* argv[] ) cDebug() << "Job #" << count << "name" << p->prettyName(); Calamares::JobResult r = p->exec(); if ( !r ) - cDebug() << count << ".. failed" << r; + { + using TR = Logger::DebugRow; + cDebug() << count << ".. failed" + << TR( "summary", r.message() ) + << TR( "details", r.details() ); + } ++count; } diff --git a/src/libcalamaresui/ViewManager.cpp b/src/libcalamaresui/ViewManager.cpp index 2b9f87db8..4d1f3591e 100644 --- a/src/libcalamaresui/ViewManager.cpp +++ b/src/libcalamaresui/ViewManager.cpp @@ -191,7 +191,7 @@ ViewManager::onInitFailed( const QStringList& modules) detailString = details.join( QString() ); } - insertViewStep( 0, new BlankViewStep( title, description.arg( *Calamares::Branding::ShortProductName ), detailString ) ); + insertViewStep( 0, new BlankViewStep( title, description.arg( *Calamares::Branding::ProductName ), detailString ) ); } ViewStepList diff --git a/src/modules/keyboard/SetKeyboardLayoutJob.cpp b/src/modules/keyboard/SetKeyboardLayoutJob.cpp index 02d807045..75c52bb51 100644 --- a/src/modules/keyboard/SetKeyboardLayoutJob.cpp +++ b/src/modules/keyboard/SetKeyboardLayoutJob.cpp @@ -65,6 +65,8 @@ SetKeyboardLayoutJob::prettyName() const QString SetKeyboardLayoutJob::findConvertedKeymap( const QString& convertedKeymapPath ) const { + cDebug() << "Looking for converted keymap in" << convertedKeymapPath; + // No search path supplied, assume the distribution does not provide // converted keymaps if ( convertedKeymapPath.isEmpty() ) @@ -76,8 +78,7 @@ SetKeyboardLayoutJob::findConvertedKeymap( const QString& convertedKeymapPath ) if ( convertedKeymapDir.exists( name + ".map" ) || convertedKeymapDir.exists( name + ".map.gz" ) ) { - cDebug() << "Found converted keymap" << name; - + cDebug() << ".. Found converted keymap" << name; return name; } @@ -88,6 +89,8 @@ SetKeyboardLayoutJob::findConvertedKeymap( const QString& convertedKeymapPath ) QString SetKeyboardLayoutJob::findLegacyKeymap() const { + cDebug() << "Looking for legacy keymap in QRC"; + int bestMatching = 0; QString name; @@ -137,7 +140,7 @@ SetKeyboardLayoutJob::findLegacyKeymap() const // The best matching entry so far, then let's save that if ( matching >= qMax( bestMatching, 1 ) ) { - cDebug() << "Found legacy keymap" << mapping[0] + cDebug() << ".. Found legacy keymap" << mapping[0] << "with score" << matching; if ( matching > bestMatching ) diff --git a/src/modules/keyboard/kbd-model-map b/src/modules/keyboard/kbd-model-map index 8555adfdf..49ec4ad75 100644 --- a/src/modules/keyboard/kbd-model-map +++ b/src/modules/keyboard/kbd-model-map @@ -1,6 +1,14 @@ # Copied from systemd-localed -# http://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map +# +# https://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map # (originally under LGPLv2.1+, used under the LGPL to GPL conversion clause) +# +# This is the version from 534644b7be7b240eb0fbbe06e20cbecbe8206767, +# committed 2015-01-22 01:07:24 . +# +# Updates: +# - 2018-09-26 Added "Austrian" keyboard (de at). Issue #1035 +# # Generated from system-config-keyboard's model list # consolelayout xlayout xmodel xvariant xoptions sg ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp @@ -10,6 +18,7 @@ trq tr pc105 - terminate:ctrl_alt_bksp uk gb pc105 - terminate:ctrl_alt_bksp is-latin1 is pc105 - terminate:ctrl_alt_bksp de de pc105 - terminate:ctrl_alt_bksp +de at pc105 - terminate:ctrl_alt_bksp la-latin1 latam pc105 - terminate:ctrl_alt_bksp us us pc105+inet - terminate:ctrl_alt_bksp ko kr pc105 - terminate:ctrl_alt_bksp diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index d35345424..677c3778d 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -104,10 +104,7 @@ swapSuggestion( const qint64 availableSpaceB ) constexpr qint64 alignBytesToBlockSize( qint64 bytes, qint64 blocksize ) { - Q_ASSERT( bytes >= 0 ); - Q_ASSERT( blocksize > 0 ); qint64 blocks = bytes / blocksize; - Q_ASSERT( blocks >= 0 ); if ( blocks * blocksize != bytes ) ++blocks; @@ -135,17 +132,17 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass // the logical sector size (usually 512B). EFI starts with 2MiB // empty and a 300MiB EFI boot partition, while BIOS starts at // the 1MiB boundary (usually sector 2048). - int uefisys_part_size = isEfi ? 300 : 0; - int empty_space_size = isEfi ? 2 : 1; + int uefisys_part_sizeB = isEfi ? 300_MiB : 0_MiB; + int empty_space_sizeB = isEfi ? 2_MiB : 1_MiB; // Since sectors count from 0, if the space is 2048 sectors in size, // the first free sector has number 2048 (and there are 2048 sectors // before that one, numbered 0..2047). - qint64 firstFreeSector = bytesToSectors( MiBtoBytes(empty_space_size), dev->logicalSize() ); + qint64 firstFreeSector = bytesToSectors( empty_space_sizeB, dev->logicalSize() ); if ( isEfi ) { - qint64 efiSectorCount = bytesToSectors( MiBtoBytes(uefisys_part_size), dev->logicalSize() ); + qint64 efiSectorCount = bytesToSectors( uefisys_part_sizeB, dev->logicalSize() ); Q_ASSERT( efiSectorCount > 0 ); // Since sectors count from 0, and this partition is created starting diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index bef6e4966..abe7795c0 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -48,6 +48,9 @@ #include #include +#ifdef WITH_KPMCOREGT33 +#include +#endif #include #include @@ -1182,6 +1185,13 @@ ChoicePage::setupActions() bool atLeastOneCanBeResized = false; bool atLeastOneCanBeReplaced = false; bool atLeastOneIsMounted = false; // Suppress 'erase' if so + bool isInactiveRAID = false; + +#ifdef WITH_KPMCOREGT33 + if ( currentDevice->type() == Device::Type::SoftwareRAID_Device && + static_cast< SoftwareRAID* >(currentDevice)->status() == SoftwareRAID::Status::Inactive ) + isInactiveRAID = true; +#endif for ( auto it = PartitionIterator::begin( currentDevice ); it != PartitionIterator::end( currentDevice ); ++it ) @@ -1305,7 +1315,7 @@ ChoicePage::setupActions() else force_uncheck( m_grp, m_alongsideButton ); - if ( !atLeastOneIsMounted ) + if ( !atLeastOneIsMounted && !isInactiveRAID ) m_eraseButton->show(); // None mounted else force_uncheck( m_grp, m_eraseButton ); diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp index 0e7602c08..7823d743d 100644 --- a/src/modules/partition/gui/CreatePartitionDialog.cpp +++ b/src/modules/partition/gui/CreatePartitionDialog.cpp @@ -72,7 +72,7 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par m_ui->encryptWidget->setText( tr( "En&crypt" ) ); m_ui->encryptWidget->hide(); - if (m_device->type() == Device::Type::Disk_Device) { + if (m_device->type() != Device::Type::LVM_Device) { m_ui->lvNameLabel->hide(); m_ui->lvNameLineEdit->hide(); } diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index 994adc3e8..9d972c8fd 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -4,6 +4,7 @@ * Copyright 2015-2016, Teo Mrnjavac * Copyright 2018, Adriaan de Groot * Copyright 2018, Andrius Štikonas + * Copyright 2018, Caio Jordão Carvalho * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,6 +48,9 @@ // KPMcore #include #include +#ifdef WITH_KPMCOREGT33 +#include +#endif #include #include @@ -146,6 +150,7 @@ PartitionPage::updateButtons() bool isInVG = m_core->isInVG( partition ); create = isFree; + // Keep it simple for now: do not support editing extended partitions as // it does not work with our current edit implementation which is // actually remove + add. This would not work with extended partitions @@ -160,8 +165,20 @@ PartitionPage::updateButtons() if ( m_ui->deviceComboBox->currentIndex() >= 0 ) { QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 ); - if ( m_core->deviceModel()->deviceForIndex( deviceIndex )->type() != Device::Type::LVM_Device ) + auto device = m_core->deviceModel()->deviceForIndex( deviceIndex ); + if ( device->type() != Device::Type::LVM_Device ) + { createTable = true; + +#ifdef WITH_KPMCOREGT33 + if ( device->type() == Device::Type::SoftwareRAID_Device && + static_cast< SoftwareRAID* >(device)->status() == SoftwareRAID::Status::Inactive ) + { + createTable = false; + create = false; + } +#endif + } else { currentDeviceIsVG = true;