Skip to content
Snippets Groups Projects
Commit 11dd15f1 authored by Teo Mrnjavac's avatar Teo Mrnjavac Committed by Philip
Browse files

Allow disabling automated LUKS modes.

parent 36a96fed
No related branches found
No related tags found
No related merge requests found
...@@ -82,12 +82,16 @@ ChoicePage::ChoicePage( QWidget* parent ) ...@@ -82,12 +82,16 @@ ChoicePage::ChoicePage( QWidget* parent )
, m_beforePartitionLabelsView( nullptr ) , m_beforePartitionLabelsView( nullptr )
, m_bootloaderComboBox( nullptr ) , m_bootloaderComboBox( nullptr )
, m_lastSelectedDeviceIndex( -1 ) , m_lastSelectedDeviceIndex( -1 )
, m_enableEncryptionWidget( true )
{ {
setupUi( this ); setupUi( this );
m_defaultFsType = Calamares::JobQueue::instance()-> m_defaultFsType = Calamares::JobQueue::instance()->
globalStorage()-> globalStorage()->
value( "defaultFileSystemType" ).toString(); value( "defaultFileSystemType" ).toString();
m_enableEncryptionWidget = Calamares::JobQueue::instance()->
globalStorage()->
value( "enableLuksAutomatedPartitioning" ).toBool();
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown ) if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
m_defaultFsType = "ext4"; m_defaultFsType = "ext4";
...@@ -884,6 +888,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice ) ...@@ -884,6 +888,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
{ {
case Alongside: case Alongside:
{ {
if ( m_enableEncryptionWidget )
m_encryptWidget->show(); m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) ); m_previewBeforeLabel->setText( tr( "Current:" ) );
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, " m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
...@@ -930,6 +935,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice ) ...@@ -930,6 +935,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
case Erase: case Erase:
case Replace: case Replace:
{ {
if ( m_enableEncryptionWidget )
m_encryptWidget->show(); m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) ); m_previewBeforeLabel->setText( tr( "Current:" ) );
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame ); m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
......
...@@ -123,6 +123,7 @@ private: ...@@ -123,6 +123,7 @@ private:
int m_lastSelectedDeviceIndex; int m_lastSelectedDeviceIndex;
QString m_defaultFsType; QString m_defaultFsType;
bool m_enableEncryptionWidget;
QMutex m_coreMutex; QMutex m_coreMutex;
}; };
......
...@@ -508,6 +508,17 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) ...@@ -508,6 +508,17 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) ); gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
} }
if ( configurationMap.contains( "enableLuksAutomatedPartitioning" ) &&
configurationMap.value( "enableLuksAutomatedPartitioning" ).type() == QVariant::Bool )
{
gs->insert( "enableLuksAutomatedPartitioning",
configurationMap.value( "enableLuksAutomatedPartitioning" ).toBool() );
}
else
{
gs->insert( "enableLuksAutomatedPartitioning", true );
}
// Now that we have the config, we load the PartitionCoreModule in the background // Now that we have the config, we load the PartitionCoreModule in the background
// because it could take a while. Then when it's done, we can set up the widgets // because it could take a while. Then when it's done, we can set up the widgets
......
...@@ -18,3 +18,23 @@ alwaysShowPartitionLabels: true ...@@ -18,3 +18,23 @@ alwaysShowPartitionLabels: true
# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs # Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs
# If nothing is specified, Calamares defaults to "ext4". # If nothing is specified, Calamares defaults to "ext4".
defaultFileSystemType: "ext4" defaultFileSystemType: "ext4"
# Show/hide LUKS related functionality in automated partitioning modes.
# Disable this if you choose not to deploy early unlocking support in GRUB2
# and/or your distribution's initramfs solution.
#
# BIG FAT WARNING:
# This option is unsupported, as it cuts out a crucial security feature.
# Disabling LUKS and shipping Calamares without a correctly configured GRUB2
# and initramfs is considered suboptimal use of the Calamares software. The
# Calamares team will not provide user support for any potential issue that
# may arise as a consequence of setting this option to false.
# It is strongly recommended that system integrators put in the work to support
# LUKS unlocking support in GRUB2 and initramfs/dracut/mkinitcpio/etc.
# Support is offered to system integrators that wish to do so, through the
# Calamares bug tracker, as well as in #calamares on Freenode.
# For more information on setting up GRUB2 for Calamares with LUKS, see
# https://github.com/calamares/calamares/wiki/LUKS-Deployment
#
# If nothing is specified, LUKS is enabled in automated modes.
#enableLuksAutomatedPartitioning: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment