Merge branch 'master' into oem-resizer

main
Adriaan de Groot 6 years ago
commit 869357a89c

11
.gitattributes vendored

@ -1,6 +1,11 @@
.tx/* export-ignore
hacking/* export-ignore
HACKING.md 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

@ -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):

@ -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<QString, QString>;
cDebug() << count << ".. failed"
<< TR( "summary", r.message() )
<< TR( "details", r.details() );
}
++count;
}

@ -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

@ -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 )

@ -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

@ -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

@ -48,6 +48,9 @@
#include <kpmcore/core/device.h>
#include <kpmcore/core/partition.h>
#ifdef WITH_KPMCOREGT33
#include <kpmcore/core/softwareraid.h>
#endif
#include <QBoxLayout>
#include <QButtonGroup>
@ -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 );

@ -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();
}

@ -4,6 +4,7 @@
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org>
* Copyright 2018, Andrius Štikonas <andrius@stikonas.eu>
* Copyright 2018, Caio Jordão Carvalho <caiojcarvalho@gmail.com>
*
* 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 <kpmcore/core/device.h>
#include <kpmcore/core/partition.h>
#ifdef WITH_KPMCOREGT33
#include <kpmcore/core/softwareraid.h>
#endif
#include <kpmcore/ops/deactivatevolumegroupoperation.h>
#include <kpmcore/ops/removevolumegroupoperation.h>
@ -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;

Loading…
Cancel
Save