From 3b30bbde679ce67f6478b537270876f117d19aad Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 25 Oct 2017 08:55:59 -0400 Subject: [PATCH 01/16] Bump version number, pretending 3.1.8-rc1 is pending --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34be91536..fee56b742 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,8 +166,8 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX ### Bump version here set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 1 ) -set( CALAMARES_VERSION_PATCH 7 ) -set( CALAMARES_VERSION_RC 0 ) +set( CALAMARES_VERSION_PATCH 8 ) +set( CALAMARES_VERSION_RC 1 ) set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} ) set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" ) From 274025d04ef4914fe229f646d64688b4344c2c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 27 Oct 2017 02:28:17 +0100 Subject: [PATCH 02/16] Fix reported partition size. --- src/modules/partition/jobs/ResizePartitionJob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/jobs/ResizePartitionJob.cpp b/src/modules/partition/jobs/ResizePartitionJob.cpp index d3fcb75b4..61e85a999 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.cpp +++ b/src/modules/partition/jobs/ResizePartitionJob.cpp @@ -194,7 +194,7 @@ ResizePartitionJob::prettyDescription() const return tr( "Resize %2MB partition %1 to " "%3MB." ) .arg( partition()->partitionPath() ) - .arg( ( m_oldLastSector - m_oldFirstSector ) * partition()->sectorSize() / 1024 / 1024 ) + .arg( ( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ) .arg( ( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ); } From fb1522f6caa82de66d8ad692c5bc529f7ba979a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 27 Oct 2017 12:55:09 +0100 Subject: [PATCH 03/16] Use KPMcore Resize Operation. --- src/modules/partition/CMakeLists.txt | 2 - .../partition/jobs/CheckFileSystemJob.cpp | 83 ------ .../partition/jobs/CheckFileSystemJob.h | 38 --- .../partition/jobs/MoveFileSystemJob.cpp | 239 ----------------- .../partition/jobs/MoveFileSystemJob.h | 76 ------ .../partition/jobs/ResizePartitionJob.cpp | 246 ++---------------- .../partition/jobs/ResizePartitionJob.h | 2 - src/modules/partition/tests/CMakeLists.txt | 2 - 8 files changed, 16 insertions(+), 672 deletions(-) delete mode 100644 src/modules/partition/jobs/CheckFileSystemJob.cpp delete mode 100644 src/modules/partition/jobs/CheckFileSystemJob.h delete mode 100644 src/modules/partition/jobs/MoveFileSystemJob.cpp delete mode 100644 src/modules/partition/jobs/MoveFileSystemJob.h diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 1ea69c027..3f1493f5d 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -58,7 +58,6 @@ calamares_add_plugin( partition gui/PrettyRadioButton.cpp gui/ScanningDialog.cpp gui/ReplaceWidget.cpp - jobs/CheckFileSystemJob.cpp jobs/ClearMountsJob.cpp jobs/ClearTempMountsJob.cpp jobs/CreatePartitionJob.cpp @@ -66,7 +65,6 @@ calamares_add_plugin( partition jobs/DeletePartitionJob.cpp jobs/FillGlobalStorageJob.cpp jobs/FormatPartitionJob.cpp - jobs/MoveFileSystemJob.cpp jobs/PartitionJob.cpp jobs/ResizePartitionJob.cpp jobs/SetPartitionFlagsJob.cpp diff --git a/src/modules/partition/jobs/CheckFileSystemJob.cpp b/src/modules/partition/jobs/CheckFileSystemJob.cpp deleted file mode 100644 index 3d694f69a..000000000 --- a/src/modules/partition/jobs/CheckFileSystemJob.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * Copyright 2016, Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#include "jobs/CheckFileSystemJob.h" - -#include - -// KPMcore -#include -#include -#include - -#include - -CheckFileSystemJob::CheckFileSystemJob( Partition* partition ) - : PartitionJob( partition ) -{} - -QString -CheckFileSystemJob::prettyName() const -{ - QString path = partition()->partitionPath(); - return tr( "Checking file system on partition %1." ).arg( path ); -} - - -QString -CheckFileSystemJob::prettyStatusMessage() const -{ - return prettyName(); -} - - -Calamares::JobResult -CheckFileSystemJob::exec() -{ - FileSystem& fs = partition()->fileSystem(); - - // if we cannot check, assume everything is fine - if ( fs.supportCheck() != FileSystem::cmdSupportFileSystem ) - return Calamares::JobResult::ok(); - - Report report( nullptr ); - bool ok = fs.check( report, partition()->partitionPath() ); - int retries = 0; - const int MAX_RETRIES = 10; - while ( !ok ) - { - cDebug() << "Partition" << partition()->partitionPath() - << "might not be ready yet, retrying (" << ++retries - << "/" << MAX_RETRIES << ") ..."; - QThread::sleep( 2 /*seconds*/ ); - ok = fs.check( report, partition()->partitionPath() ); - - if ( retries == MAX_RETRIES ) - break; - } - - if ( !ok ) - return Calamares::JobResult::error( - tr( "The file system check on partition %1 failed." ) - .arg( partition()->partitionPath() ), - report.toText() - ); - - return Calamares::JobResult::ok(); -} diff --git a/src/modules/partition/jobs/CheckFileSystemJob.h b/src/modules/partition/jobs/CheckFileSystemJob.h deleted file mode 100644 index 7dba8f493..000000000 --- a/src/modules/partition/jobs/CheckFileSystemJob.h +++ /dev/null @@ -1,38 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#ifndef CHECKFILESYSTEMJOB_H -#define CHECKFILESYSTEMJOB_H - -#include - -/** - * Runs a file system check on an existing partition. - */ -class CheckFileSystemJob : public PartitionJob -{ - Q_OBJECT -public: - CheckFileSystemJob( Partition* partition ); - - QString prettyName() const override; - QString prettyStatusMessage() const override; - Calamares::JobResult exec() override; -}; - -#endif /* CHECKFILESYSTEMJOB_H */ diff --git a/src/modules/partition/jobs/MoveFileSystemJob.cpp b/src/modules/partition/jobs/MoveFileSystemJob.cpp deleted file mode 100644 index fbcc4641c..000000000 --- a/src/modules/partition/jobs/MoveFileSystemJob.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -// This class is heavily based on the MoveFileSystemJob class from KDE Partition -// Manager. -// The copyBlock functions come from Partition Manager Job class. -// Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include - -#include - -// KPMcore -#include -#include -#include -#include -#include -#include - -MoveFileSystemJob::MoveFileSystemJob( Device* device, Partition* partition, qint64 oldFirstSector, qint64 newFirstSector, qint64 length ) - : PartitionJob( partition ) - , m_device( device ) - , m_oldFirstSector( oldFirstSector ) - , m_newFirstSector( newFirstSector ) - , m_length( length ) -{} - -QString -MoveFileSystemJob::prettyName() const -{ - return tr( "Move file system of partition %1." ).arg( partition()->partitionPath() ); -} - -Calamares::JobResult -MoveFileSystemJob::exec() -{ - Report report( nullptr ); - QString partitionPath = partition()->partitionPath(); - CopySourceDevice moveSource( *m_device, m_oldFirstSector, m_oldFirstSector + m_length - 1 ); - CopyTargetDevice moveTarget( *m_device, m_newFirstSector, m_newFirstSector + m_length - 1 ); - - if ( !moveSource.open() ) - return Calamares::JobResult::error( - QString(), - tr( "Could not open file system on partition %1 for moving." ).arg( partitionPath ) - ); - - if ( !moveTarget.open() ) - return Calamares::JobResult::error( - QString(), - tr( "Could not create target for moving file system on partition %1." ).arg( partitionPath ) - ); - - bool ok = copyBlocks( report, moveTarget, moveSource ); - if ( !ok ) - { - if ( rollbackCopyBlocks( report, moveTarget, moveSource ) ) - return Calamares::JobResult::error( - QString(), - tr( "Moving of partition %1 failed, changes have been rolled back." ).arg( partitionPath ) - + '\n' + report.toText() - ); - else - return Calamares::JobResult::error( - QString(), - tr( "Moving of partition %1 failed. Roll back of the changes have failed." ).arg( partitionPath ) - + '\n' + report.toText() - ); - } - - FileSystem& fs = partition()->fileSystem(); - fs.setFirstSector( m_newFirstSector ); - fs.setLastSector( m_newFirstSector + m_length - 1 ); - - if ( !fs.updateBootSector( report, partitionPath ) ) - return Calamares::JobResult::error( - QString(), - tr( "Updating boot sector after the moving of partition %1 failed." ).arg( partitionPath ) - + '\n' + report.toText() - ); - - return Calamares::JobResult::ok(); -} - -bool -MoveFileSystemJob::copyBlocks( Report& report, CopyTargetDevice& target, CopySourceDevice& source ) -{ - /** @todo copyBlocks() assumes that source.sectorSize() == target.sectorSize(). */ - - if ( source.sectorSize() != target.sectorSize() ) - { - report.line() << tr( "The logical sector sizes in the source and target for copying are not the same. This is currently unsupported." ); - return false; - } - - bool rval = true; - const qint64 blockSize = 16065 * 8; // number of sectors per block to copy - const qint64 blocksToCopy = source.length() / blockSize; - - qint64 readOffset = source.firstSector(); - qint64 writeOffset = target.firstSector(); - qint32 copyDir = 1; - - if ( target.firstSector() > source.firstSector() ) - { - readOffset = source.firstSector() + source.length() - blockSize; - writeOffset = target.firstSector() + source.length() - blockSize; - copyDir = -1; - } - - qint64 blocksCopied = 0; - - Q_ASSERT( blockSize > 0 ); - Q_ASSERT( source.sectorSize() > 0 ); - Q_ASSERT( blockSize * source.sectorSize() > 0 ); - - void* buffer = malloc( size_t( blockSize * source.sectorSize() ) ); - qint64 percent = 0; - - while ( blocksCopied < blocksToCopy ) - { - rval = source.readSectors( buffer, readOffset + blockSize * blocksCopied * copyDir, blockSize ); - if ( !rval ) - break; - - rval = target.writeSectors( buffer, writeOffset + blockSize * blocksCopied * copyDir, blockSize ); - if ( !rval ) - break; - - if ( ++blocksCopied * 100 / blocksToCopy != percent ) - { - percent = blocksCopied * 100 / blocksToCopy; - progress( percent / 100. ); - } - } - - const qint64 lastBlock = source.length() % blockSize; - - // copy the remainder - if ( rval && lastBlock > 0 ) - { - Q_ASSERT( lastBlock < blockSize ); - - const qint64 lastBlockReadOffset = copyDir > 0 ? readOffset + blockSize * blocksCopied : source.firstSector(); - const qint64 lastBlockWriteOffset = copyDir > 0 ? writeOffset + blockSize * blocksCopied : target.firstSector(); - - rval = source.readSectors( buffer, lastBlockReadOffset, lastBlock ); - - if ( rval ) - rval = target.writeSectors( buffer, lastBlockWriteOffset, lastBlock ); - - if ( rval ) - emit progress( 1.0 ); - } - - free( buffer ); - - return rval; -} - -bool -MoveFileSystemJob::rollbackCopyBlocks( Report& report, CopyTargetDevice& origTarget, CopySourceDevice& origSource ) -{ - if ( !origSource.overlaps( origTarget ) ) - { - report.line() << tr( "Source and target for copying do not overlap: Rollback is not required." ); - return true; - } - - // default: use values as if we were copying from front to back. - qint64 undoSourceFirstSector = origTarget.firstSector(); - qint64 undoSourceLastSector = origTarget.firstSector() + origTarget.sectorsWritten() - 1; - - qint64 undoTargetFirstSector = origSource.firstSector(); - qint64 undoTargetLastSector = origSource.firstSector() + origTarget.sectorsWritten() - 1; - - if ( origTarget.firstSector() > origSource.firstSector() ) - { - // we were copying from back to front - undoSourceFirstSector = origTarget.firstSector() + origSource.length() - origTarget.sectorsWritten(); - undoSourceLastSector = origTarget.firstSector() + origSource.length() - 1; - - undoTargetFirstSector = origSource.lastSector() - origTarget.sectorsWritten() + 1; - undoTargetLastSector = origSource.lastSector(); - } - - CopySourceDevice undoSource( origTarget.device(), undoSourceFirstSector, undoSourceLastSector ); - if ( !undoSource.open() ) - { - report.line() << tr( "Could not open device %1 to rollback copying." ) - .arg( origTarget.device().deviceNode() ); - return false; - } - - CopyTargetDevice undoTarget( origSource.device(), undoTargetFirstSector, undoTargetLastSector ); - if ( !undoTarget.open() ) - { - report.line() << tr( "Could not open device %1 to rollback copying." ) - .arg( origSource.device().deviceNode() ); - return false; - } - - return copyBlocks( report, undoTarget, undoSource ); -} diff --git a/src/modules/partition/jobs/MoveFileSystemJob.h b/src/modules/partition/jobs/MoveFileSystemJob.h deleted file mode 100644 index f2ae6d741..000000000 --- a/src/modules/partition/jobs/MoveFileSystemJob.h +++ /dev/null @@ -1,76 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014, Aurélien Gâteau - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -// This class is heavily based on the MoveFileSystemJob class from KDE Partition -// Manager. Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ -#ifndef MOVEFILESYSTEMJOB_H -#define MOVEFILESYSTEMJOB_H - -#include - -class CopySourceDevice; -class CopyTargetDevice; -class Device; -class Partition; -class Report; - -/** - * This job moves the data of a filesystem from one position on the disk to - * another. - * - * It is used by the ResizePartitionJob. - */ -class MoveFileSystemJob : public PartitionJob -{ - Q_OBJECT -public: - MoveFileSystemJob( Device* device, Partition* partition, qint64 oldFirstSector, qint64 newFirstSector, qint64 length ); - - QString prettyName() const override; - - Calamares::JobResult exec() override; - -private: - Device* m_device; - qint64 m_oldFirstSector; - qint64 m_newFirstSector; - qint64 m_length; - bool copyBlocks( Report& report, CopyTargetDevice& target, CopySourceDevice& source ); - bool rollbackCopyBlocks( Report& report, CopyTargetDevice& origTarget, CopySourceDevice& origSource ); -}; - -#endif /* MOVEFILESYSTEMJOB_H */ diff --git a/src/modules/partition/jobs/ResizePartitionJob.cpp b/src/modules/partition/jobs/ResizePartitionJob.cpp index 61e85a999..41950d4df 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.cpp +++ b/src/modules/partition/jobs/ResizePartitionJob.cpp @@ -2,6 +2,7 @@ * * Copyright 2014, Aurélien Gâteau * Copyright 2015, Teo Mrnjavac + * Copyright 2017, Andrius Štikonas * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,156 +18,12 @@ * along with Calamares. If not, see . */ -// This class is heavily based on the ResizeOperation class from KDE Partition -// Manager. Original copyright follow: - -/*************************************************************************** - * Copyright (C) 2008,2012 by Volker Lanz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - #include "jobs/ResizePartitionJob.h" -#include "jobs/CheckFileSystemJob.h" -#include "jobs/MoveFileSystemJob.h" -#include "utils/Logger.h" - // KPMcore -#include -#include -#include -#include -#include -#include -#include -#include - -// Qt -#include - -//- ResizeFileSystemJob -------------------------------------------------------- -class ResizeFileSystemJob : public Calamares::Job -{ - Q_OBJECT -public: - ResizeFileSystemJob( Device* device, CoreBackendPartitionTable* backendPartitionTable, Partition* partition, qint64 length ) - : m_device( device ) - , m_backendPartitionTable( backendPartitionTable ) - , m_partition( partition ) - , m_length( length ) - {} - - QString prettyName() const override - { - QString path = m_partition->partitionPath(); - return tr( "Resize file system on partition %1." ).arg( path ); - } - - Calamares::JobResult exec() override - { - Report report( nullptr ); - FileSystem& fs = m_partition->fileSystem(); - FileSystem::CommandSupportType support = m_length < fs.length() ? fs.supportShrink() : fs.supportGrow(); - - switch ( support ) - { - case FileSystem::cmdSupportBackend: - if ( !backendResize( &report ) ) - return Calamares::JobResult::error( - QString(), - tr( "Parted failed to resize filesystem." ) + '\n' + report.toText() - ); - break; - case FileSystem::cmdSupportFileSystem: - { - qint64 byteLength = m_device->logicalSize() * m_length; - bool ok = fs.resize( report, m_partition->partitionPath(), byteLength ); - if ( !ok ) - return Calamares::JobResult::error( - QString(), - tr( "Failed to resize filesystem." ) + '\n' + report.toText() - ); - break; - } - default: - break; - } - - fs.setLastSector( fs.firstSector() + m_length - 1 ); - return Calamares::JobResult::ok(); - } - -private: - Device* m_device; - CoreBackendPartitionTable* m_backendPartitionTable; - Partition* m_partition; - qint64 m_length; - - bool backendResize( Report* report ) - { - bool ok = m_backendPartitionTable->resizeFileSystem( *report, *m_partition, m_length ); - if ( !ok ) - return false; - m_backendPartitionTable->commit(); - return true; - } -}; - -//- SetPartGeometryJob --------------------------------------------------------- -class SetPartGeometryJob : public Calamares::Job -{ - Q_OBJECT -public: - SetPartGeometryJob( CoreBackendPartitionTable* backendPartitionTable, Partition* partition, qint64 firstSector, qint64 length ) - : m_backendPartitionTable( backendPartitionTable ) - , m_partition( partition ) - , m_firstSector( firstSector ) - , m_length( length ) - {} - - QString prettyName() const override - { - QString path = m_partition->partitionPath(); - return tr( "Update geometry of partition %1." ).arg( path ); - } - - Calamares::JobResult exec() override - { - Report report( nullptr ); - qint64 lastSector = m_firstSector + m_length - 1; - bool ok = m_backendPartitionTable->updateGeometry( report, *m_partition, m_firstSector, lastSector ); - if ( !ok ) - { - return Calamares::JobResult::error( - QString(), - tr( "Failed to change the geometry of the partition." ) + '\n' + report.toText() ); - } - m_partition->setFirstSector( m_firstSector ); - m_partition->setLastSector( lastSector ); - m_backendPartitionTable->commit(); - return Calamares::JobResult::ok(); - } - -private: - CoreBackendPartitionTable* m_backendPartitionTable; - Partition* m_partition; - qint64 m_firstSector; - qint64 m_length; -}; +#include +#include +#include //- ResizePartitionJob --------------------------------------------------------- ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qint64 firstSector, qint64 lastSector ) @@ -205,7 +62,7 @@ ResizePartitionJob::prettyStatusMessage() const return tr( "Resizing %2MB partition %1 to " "%3MB." ) .arg( partition()->partitionPath() ) - .arg( ( m_oldLastSector - m_oldFirstSector ) * partition()->sectorSize() / 1024 / 1024 ) + .arg( ( m_oldLastSector - m_oldFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ) .arg( ( m_newLastSector - m_newFirstSector + 1 ) * partition()->sectorSize() / 1024 / 1024 ); } @@ -213,64 +70,21 @@ ResizePartitionJob::prettyStatusMessage() const Calamares::JobResult ResizePartitionJob::exec() { - qint64 oldLength = m_oldLastSector - m_oldFirstSector + 1; - qint64 newLength = m_newLastSector - m_newFirstSector + 1; - - // Assuming updatePreview() has been called, `partition` uses its new - // position and size. Reset it to the old values: part of the libparted - // backend relies on this (for example: - // LibPartedPartitionTable::updateGeometry()) - // The jobs are responsible for updating the partition back when they are - // done. + Report report (nullptr); + // Restore partition sectors that were modified for preview m_partition->setFirstSector( m_oldFirstSector ); m_partition->setLastSector( m_oldLastSector ); + ResizeOperation op(*m_device, *m_partition, m_newFirstSector, m_newLastSector); + op.setStatus(Operation::StatusRunning); + connect(&op, &Operation::progress, [&](int percent) { emit progress(percent / 100.0); } ); - CoreBackend* backend = CoreBackendManager::self()->backend(); - QScopedPointer backendDevice( backend->openDevice( m_device->deviceNode() ) ); - if ( !backendDevice.data() ) - { - QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) - .arg( m_partition->partitionPath() ) - .arg( m_device->name() ); - return Calamares::JobResult::error( - errorMessage, - tr( "Could not open device '%1'." ).arg( m_device->deviceNode() ) - ); - } - QScopedPointer backendPartitionTable( backendDevice->openPartitionTable() ); + QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) + .arg( m_partition->partitionPath() ) + .arg( m_device->name() ); + if (op.execute(report)) + return Calamares::JobResult::ok(); - // Create jobs - QList< Calamares::job_ptr > jobs; - jobs << Calamares::job_ptr( new CheckFileSystemJob( partition() ) ); - if ( m_partition->roles().has( PartitionRole::Extended ) ) - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, newLength ) ); - else - { - bool shrink = newLength < oldLength; - bool grow = newLength > oldLength; - bool moveRight = m_newFirstSector > m_oldFirstSector; - bool moveLeft = m_newFirstSector < m_oldFirstSector; - if ( shrink ) - { - jobs << Calamares::job_ptr( new ResizeFileSystemJob( m_device, backendPartitionTable.data(), m_partition, newLength ) ); - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_oldFirstSector, newLength ) ); - } - if ( moveRight || moveLeft ) - { - // At this point, we need to set the partition's length to either the resized length, if it has already been - // shrunk, or to the original length (it may or may not then later be grown, we don't care here) - const qint64 length = shrink ? newLength : oldLength; - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, length ) ); - jobs << Calamares::job_ptr( new MoveFileSystemJob( m_device, m_partition, m_oldFirstSector, m_newFirstSector, length ) ); - } - if ( grow ) - { - jobs << Calamares::job_ptr( new SetPartGeometryJob( backendPartitionTable.data(), m_partition, m_newFirstSector, newLength ) ); - jobs << Calamares::job_ptr( new ResizeFileSystemJob( m_device, backendPartitionTable.data(), m_partition, newLength ) ); - } - } - jobs << Calamares::job_ptr( new CheckFileSystemJob( partition() ) ); - return execJobList( jobs ); + return Calamares::JobResult::error(errorMessage, report.toText()); } void @@ -290,31 +104,3 @@ ResizePartitionJob::device() const { return m_device; } - - -Calamares::JobResult -ResizePartitionJob::execJobList( const QList< Calamares::job_ptr >& jobs ) -{ - QString errorMessage = tr( "The installer failed to resize partition %1 on disk '%2'." ) - .arg( m_partition->partitionPath() ) - .arg( m_device->name() ); - - int nbJobs = jobs.size(); - int count = 0; - for ( Calamares::job_ptr job : jobs ) - { - cLog() << "- " + job->prettyName(); - Calamares::JobResult result = job->exec(); - if ( !result ) - { - if ( result.message().isEmpty() ) - result.setMessage( errorMessage ); - return result; - } - ++count; - progress( qreal( count ) / nbJobs ); - } - return Calamares::JobResult::ok(); -} - -#include "ResizePartitionJob.moc" diff --git a/src/modules/partition/jobs/ResizePartitionJob.h b/src/modules/partition/jobs/ResizePartitionJob.h index 9ae31130f..453461d8d 100644 --- a/src/modules/partition/jobs/ResizePartitionJob.h +++ b/src/modules/partition/jobs/ResizePartitionJob.h @@ -51,8 +51,6 @@ private: qint64 m_oldLastSector; qint64 m_newFirstSector; qint64 m_newLastSector; - - Calamares::JobResult execJobList( const QList< Calamares::job_ptr >& jobs ); }; #endif /* RESIZEPARTITIONJOB_H */ diff --git a/src/modules/partition/tests/CMakeLists.txt b/src/modules/partition/tests/CMakeLists.txt index 1917a226b..41f494ba2 100644 --- a/src/modules/partition/tests/CMakeLists.txt +++ b/src/modules/partition/tests/CMakeLists.txt @@ -9,11 +9,9 @@ set( partitionjobtests_SRCS ${PartitionModule_SOURCE_DIR}/core/KPMHelpers.cpp ${PartitionModule_SOURCE_DIR}/core/PartitionInfo.cpp ${PartitionModule_SOURCE_DIR}/core/PartitionIterator.cpp - ${PartitionModule_SOURCE_DIR}/jobs/CheckFileSystemJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/CreatePartitionTableJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/DeletePartitionJob.cpp - ${PartitionModule_SOURCE_DIR}/jobs/MoveFileSystemJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/PartitionJob.cpp ${PartitionModule_SOURCE_DIR}/jobs/ResizePartitionJob.cpp PartitionJobTests.cpp From d2ea83a0b2157be9db016c70c779448bead4bacd Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Sat, 28 Oct 2017 02:18:36 +0200 Subject: [PATCH 04/16] NetInstallPage.cpp: fix displaying for Name and Description - fixes 1d7ad9e0450d0d069b1496de0c412baab7f7fa96 which sets both header's labels to 0 so 'Name' was always overridden by Description and Description never displayed --- src/modules/netinstall/NetInstallPage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/netinstall/NetInstallPage.cpp b/src/modules/netinstall/NetInstallPage.cpp index 7bfda320c..030537732 100644 --- a/src/modules/netinstall/NetInstallPage.cpp +++ b/src/modules/netinstall/NetInstallPage.cpp @@ -3,6 +3,7 @@ * Copyright 2016, Lisa Vitolo * Copyright 2017, Kyle Robbertze * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,7 +78,7 @@ NetInstallPage::readGroups( const QByteArray& yamlData ) m_groups = new PackageModel( groups ); CALAMARES_RETRANSLATE( m_groups->setHeaderData( 0, Qt::Horizontal, tr( "Name" ) ); - m_groups->setHeaderData( 0, Qt::Horizontal, tr( "Description" ) ); ) + m_groups->setHeaderData( 1, Qt::Horizontal, tr( "Description" ) ); ) return true; } From b15d97084591f3845a352c158177db6a36be1d33 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 28 Oct 2017 03:41:29 -0400 Subject: [PATCH 05/16] [bootloader] fix regression introduced with d179a9e - see also #840 --- src/modules/bootloader/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index cb94ae45d..1759f4500 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -271,9 +271,9 @@ def install_grub(efi_directory, fw_type): # Workaround for some UEFI firmwares efi_file_source = os.path.join(install_efi_directory_firmware, efi_bootloader_id, - efi_grub_file), + efi_grub_file) efi_file_target = os.path.join(install_efi_boot_directory, - efi_boot_file), + efi_boot_file) shutil.copy2(efi_file_source, efi_file_target) else: From a138eb501c37373d6e99f5ce32a7a17bcce1e06e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 06:33:54 -0400 Subject: [PATCH 06/16] Coverity: fix issues reported in QJsonModel - Also reported upstream, in the MIT-licensed version of same. This is a re-hash of b348a458340f59372ba9fa79d8282543246af648, adding memory-leak prevention when load() is called. --- src/libcalamaresui/utils/qjsonitem.cpp | 6 ++---- src/libcalamaresui/utils/qjsonmodel.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/libcalamaresui/utils/qjsonitem.cpp b/src/libcalamaresui/utils/qjsonitem.cpp index 24494f0fd..cdc4b3b13 100644 --- a/src/libcalamaresui/utils/qjsonitem.cpp +++ b/src/libcalamaresui/utils/qjsonitem.cpp @@ -26,11 +26,9 @@ #include "qjsonitem.h" QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent) + : mParent( parent ) + , mType( QJsonValue::Type::Null ) { - - mParent = parent; - - } QJsonTreeItem::~QJsonTreeItem() diff --git a/src/libcalamaresui/utils/qjsonmodel.cpp b/src/libcalamaresui/utils/qjsonmodel.cpp index 5ce0cd695..4238bfd6b 100644 --- a/src/libcalamaresui/utils/qjsonmodel.cpp +++ b/src/libcalamaresui/utils/qjsonmodel.cpp @@ -33,14 +33,19 @@ QJsonModel::QJsonModel(QObject *parent) : QAbstractItemModel(parent) + , mRootItem( new QJsonTreeItem ) { - mRootItem = new QJsonTreeItem; mHeaders.append("key"); mHeaders.append("value"); } +QJsonModel::~QJsonModel() +{ + delete mRootItem; +} + bool QJsonModel::load(const QString &fileName) { QFile file(fileName); @@ -66,6 +71,7 @@ bool QJsonModel::loadJson(const QByteArray &json) if (!mDocument.isNull()) { beginResetModel(); + delete mRootItem; if (mDocument.isArray()) { mRootItem = QJsonTreeItem::load(QJsonValue(mDocument.array())); } else { From e09f179d76fd3375357d39843e6642030cbd9797 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 08:43:09 -0400 Subject: [PATCH 07/16] Coverity: repair previous commit --- src/libcalamaresui/utils/qjsonmodel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcalamaresui/utils/qjsonmodel.h b/src/libcalamaresui/utils/qjsonmodel.h index 6a2399287..0d1b3232d 100644 --- a/src/libcalamaresui/utils/qjsonmodel.h +++ b/src/libcalamaresui/utils/qjsonmodel.h @@ -17,6 +17,7 @@ class QJsonModel : public QAbstractItemModel Q_OBJECT public: explicit QJsonModel(QObject *parent = 0); + ~QJsonModel(); bool load(const QString& fileName); bool load(QIODevice * device); bool loadJson(const QByteArray& json); From 5474dc6d2b1bbe947b71a503253646fb637c9248 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 11:28:47 -0400 Subject: [PATCH 08/16] [partition] allow KPMcore 3.0.2 (with warning) --- src/modules/partition/CMakeLists.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 3f1493f5d..ee96c4275 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -9,10 +9,22 @@ find_package( KF5 REQUIRED CoreAddons ) find_package( KF5 REQUIRED Config I18n IconThemes KIO Service ) find_package( KPMcore 3.1.50 QUIET ) -if ( ${KPMcore_FOUND} ) +if ( KPMcore_FOUND ) add_definitions(-DWITH_KPMCORE22) endif() -find_package( KPMcore 3.0.3 REQUIRED ) +find_package( KPMcore 3.0.3 QUIET ) +# 3.0.3 and newer has fixes for NVMe support; allow 3.0.2, but warn +# about it .. needs to use a different feature name because it otherwise +# gets reported as KPMcore (the package). +if ( KPMcore_FOUND ) + message( STATUS "KPMCore supports NVMe operations" ) + add_feature_info( KPMcoreNVMe KPMcore_FOUND "KPMcore with NVMe support" ) +else() + find_package( KPMcore 3.0.2 REQUIRED ) + message( WARNING "KPMCore 3.0.2 is known to have bugs with NVMe devices" ) + add_feature_info( KPMcoreNVMe KPMcore_FOUND "Older KPMcore with no NVMe support" ) +endif() + find_library( atasmart_LIB atasmart ) find_library( blkid_LIB blkid ) if( NOT atasmart_LIB ) From 4ea8b2e6efe698cb6c4f22aef0775cf1f822467e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 30 Oct 2017 11:43:14 -0400 Subject: [PATCH 09/16] CMake: report on the example-distro feature correctly --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fee56b742..991343614 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,12 +267,9 @@ else() endif() # Doesn't list mksquashfs as an optional dep, though, because it # hasn't been sent through the find_package() scheme. -set_package_properties( mksquashfs PROPERTIES - DESCRIPTION "Create squashed filesystems" - URL "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" - PURPOSE "Create example distro" - TYPE OPTIONAL -) +# +# "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html" +add_feature_info( ExampleDistro ${mksquashfs_FOUND} "Create example-distro target.") # add_subdirectory( thirdparty ) add_subdirectory( src ) From 2e80ab98d72d7752f0aabc02eae1ffc8ab49be85 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 18:49:03 +0100 Subject: [PATCH 10/16] locale.conf: explain what all the settings are about --- src/modules/locale/locale.conf | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index 824c8abeb..fd8e2ba04 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -1,7 +1,28 @@ --- +# This settings are used to set your default system time zone. +# Time zones are usually located under /usr/share/zoneinfo and +# provided by the 'tzdata' package of your Distribution. +# +# Distributions using systemd can list available +# time zones by using the timedatectl command. +# timedatectl list-timezones region: "America" zone: "New_York" -# GeoIP settings. Leave commented out to disable GeoIP. -#localeGenPath: "/etc/locale.gen" + +# System locales are detected in the following order: +# +# /usr/share/i18n/SUPPORTED +# localeGenPath ( when set ) +# /etc/locale.gen +# 'locale -a' output +# Enable only when your Distribution is using an +# custom path for locale.gen +#localeGenPath: "PATH_TO/locale.gen" + +# GeoIP based Language settings: +# GeoIP need an working Internet connecion. +# This can be managed from welcome.conf by adding +# internet to the list of required conditions. +# Leave commented out to disable GeoIP. #geoipUrl: "freegeoip.net" From fc53438be973591a433bdaf48442ed3e5f0d08bb Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 19:21:51 +0100 Subject: [PATCH 11/16] locale.conf: fix localeGenPath comment --- src/modules/locale/locale.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/locale/locale.conf b/src/modules/locale/locale.conf index fd8e2ba04..fdff51721 100644 --- a/src/modules/locale/locale.conf +++ b/src/modules/locale/locale.conf @@ -13,8 +13,7 @@ zone: "New_York" # System locales are detected in the following order: # # /usr/share/i18n/SUPPORTED -# localeGenPath ( when set ) -# /etc/locale.gen +# localeGenPath (defaults to /etc/locale.gen if not set) # 'locale -a' output # Enable only when your Distribution is using an # custom path for locale.gen From 71da7b3a48d2e5d9493c636c3a54fd63e2754787 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 20:11:11 +0100 Subject: [PATCH 12/16] RequirementsChecker.cpp: rearrange cDebug() output --- src/modules/welcome/checker/RequirementsChecker.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp index 3d4e394c4..654434513 100644 --- a/src/modules/welcome/checker/RequirementsChecker.cpp +++ b/src/modules/welcome/checker/RequirementsChecker.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2017, Teo Mrnjavac * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -99,8 +100,12 @@ RequirementsChecker::RequirementsChecker( QObject* parent ) if ( m_entriesToCheck.contains( "root" ) ) isRoot = checkIsRoot(); - cDebug() << "enoughStorage, enoughRam, hasPower, hasInternet, isRoot: " - << enoughStorage << enoughRam << hasPower << hasInternet << isRoot; + cDebug() << "RequirementsChecker output:" + << " enoughStorage:" << enoughStorage + << " enoughRam:" << enoughRam + << " hasPower:" << hasPower + << " hasInternet:" << hasInternet + << " isRoot:" << isRoot; QList< PrepareEntry > checkEntries; foreach ( const QString& entry, m_entriesToCheck ) From 3749beb4e52297c6be57e67641a8a2c75a73eb41 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 20:44:51 +0100 Subject: [PATCH 13/16] modules/users: warn when fallback groups is used - Warn here since it may not be what the Distributor want. Having wrong groups may result in broken permissions for created user. - explain what defaultGroups is for in users.conf --- src/modules/users/UsersViewStep.cpp | 2 ++ src/modules/users/users.conf | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index 73dc98ddc..34c6614f8 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2015, Teo Mrnjavac * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -131,6 +132,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } else { + cDebug() << "WARNING: Using fallback groups. Please check defaultGroups in users.conf"; m_defaultGroups = QStringList{ "lp", "video", "network", "storage", "wheel", "audio" }; } diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index d5466c62f..5e62015a0 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -11,6 +11,8 @@ # These globalconfig keys are set when the jobs for this module # are created. --- +# Used as default groups for the created user. +# Adjust to your Distribution defaults. defaultGroups: - users - lp @@ -19,6 +21,7 @@ defaultGroups: - storage - wheel - audio + autologinGroup: autologin doAutologin: true From 599f9d48ae4e27a0c576be7733fa896926233063 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 23:20:43 +0100 Subject: [PATCH 14/16] users.conf: document some things --- src/modules/users/users.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 5e62015a0..41acbc3a4 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -22,13 +22,26 @@ defaultGroups: - wheel - audio +# Some Distributions require a 'autologin' group for the user. +# Autologin causes a user to become automatically logged in to +# the desktop environment on boot. +# Disable when your Distribution does not require such a group. autologinGroup: autologin +# You can control the initial state for the 'autologin checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# remove the following line to avoid creating /etc/sudoers.d/10-installer +# When enabled calamares creates a sudoers file for the user. +# /etc/sudoers.d/10-installer +# Remember to add sudoersGroup to defaultGroups. sudoersGroup: wheel +# Setting this to false , causes the root account to be disabled. setRootPassword: true +# You can control the initial state for the 'root password checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default. +# When enabled the user password is used for the root account too. +# NOTE: doReusePassword requires setRootPassword to be enabled. doReusePassword: true # These are optional password-requirements that a distro can enforce From 477a9855f6cf02058525c93030400f59aab34b2d Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Tue, 31 Oct 2017 13:09:34 +0100 Subject: [PATCH 15/16] users.conf: made requested changes --- src/modules/users/users.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 41acbc3a4..1f62fc1e5 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -31,9 +31,14 @@ autologinGroup: autologin # Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# When enabled calamares creates a sudoers file for the user. +# When set to a non-empty string, Calamares creates a sudoers file for the user. # /etc/sudoers.d/10-installer # Remember to add sudoersGroup to defaultGroups. +# +# If your Distribution already sets up a group of sudoers in its packaging, +# remove this setting (delete or comment out the line below). Otherwise, +# the setting will be duplicated in the /etc/sudoers.d/10-installer file, +# potentially confusing users. sudoersGroup: wheel # Setting this to false , causes the root account to be disabled. From d2c91dedf3e2f226b1fd6faaae0f6759588c2a9c Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sat, 28 Oct 2017 01:43:48 -0400 Subject: [PATCH 16/16] add kate temp files to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 26e8ff869..d67fee190 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ CMakeLists.txt.user # Backup files *~ + +# Kate +*.kate-swp