[partition] Add a config option for allowing zfs encryption
This commit is contained in:
parent
d88d2ce92e
commit
b7af2dd77d
@ -409,6 +409,8 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
}
|
||||
setSwapChoice( m_initialSwapChoice );
|
||||
|
||||
m_allowZfsEncryption = CalamaresUtils::getBool( configurationMap, "allowZfsEncryption", true );
|
||||
|
||||
m_allowManualPartitioning = CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true );
|
||||
m_requiredPartitionTableType = CalamaresUtils::getStringList( configurationMap, "requiredPartitionTableType" );
|
||||
|
||||
|
@ -159,6 +159,9 @@ public:
|
||||
*/
|
||||
LuksGeneration luksFileSystemType() const { return m_luksFileSystemType; }
|
||||
|
||||
/// @brief If zfs encryption should be allowed
|
||||
bool allowZfsEncryption() const { return m_allowZfsEncryption; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void setInstallChoice( int ); ///< Translates a button ID or so to InstallChoice
|
||||
void setInstallChoice( InstallChoice );
|
||||
@ -189,7 +192,7 @@ private:
|
||||
InstallChoice m_installChoice = NoChoice;
|
||||
qreal m_requiredStorageGiB = 0.0; // May duplicate setting in the welcome module
|
||||
QStringList m_requiredPartitionTableType;
|
||||
|
||||
bool m_allowZfsEncryption = true;
|
||||
bool m_allowManualPartitioning = true;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Collabora Ltd
|
||||
* SPDX-FileCopyrightText: 2021 Anubhav Choudhary <ac.10edu@gmail.com>
|
||||
* SPDX-FileCopyrightText: 2023 Evan James <dalto@fastmail.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
@ -1759,7 +1760,17 @@ ChoicePage::createBootloaderPanel()
|
||||
bool
|
||||
ChoicePage::shouldShowEncryptWidget( Config::InstallChoice choice ) const
|
||||
{
|
||||
bool suitableFS = true;
|
||||
if ( !m_config->allowZfsEncryption()
|
||||
&& ( ( m_eraseFsTypesChoiceComboBox && m_eraseFsTypesChoiceComboBox->isVisible()
|
||||
&& m_eraseFsTypesChoiceComboBox->currentText() == "zfs" )
|
||||
|| ( m_replaceFsTypesChoiceComboBox && m_replaceFsTypesChoiceComboBox->isVisible()
|
||||
&& m_replaceFsTypesChoiceComboBox->currentText() == "zfs" ) ) )
|
||||
{
|
||||
suitableFS = false;
|
||||
}
|
||||
|
||||
const bool suitableChoice
|
||||
= choice == InstallChoice::Erase || choice == InstallChoice::Alongside || choice == InstallChoice::Replace;
|
||||
return suitableChoice && m_enableEncryptionWidget;
|
||||
return suitableChoice && m_enableEncryptionWidget && suitableFS;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2018-2019 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2019 Collabora Ltd
|
||||
* SPDX-FileCopyrightText: 2023 Evan James <dalto@fastmail.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2023 Evan James <dalto@fastmail.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
* SPDX-FileCopyrightText: 2023 Evan James <dalto@fastmail.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* Calamares is Free Software: see the License-Identifier above.
|
||||
|
@ -78,6 +78,16 @@ userSwapChoices:
|
||||
#
|
||||
luksGeneration: luks1
|
||||
|
||||
# This setting determines if encryption should be allowed when using zfs. This
|
||||
# setting has no effect unless zfs support is provided.
|
||||
#
|
||||
# This setting is to handle the fact that some bootloaders(such as grub) do not
|
||||
# support zfs encryption.
|
||||
#
|
||||
# The default is true
|
||||
#
|
||||
# allowZfsEncryption: true
|
||||
|
||||
# Correctly draw nested (e.g. logical) partitions as such.
|
||||
drawNestedPartitions: false
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-FileCopyrightText: 2023 Evan James <dalto@fastmail.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
---
|
||||
$schema: https://json-schema.org/schema#
|
||||
@ -14,6 +15,7 @@ properties:
|
||||
# ensureSuspendToDisk: { type: boolean, default: true } # Legacy
|
||||
# neverCreateSwap: { type: boolean, default: false } # Legacy
|
||||
|
||||
allowZfsEncryption: { type: boolean, default: true }
|
||||
drawNestedPartitions: { type: boolean, default: false }
|
||||
alwaysShowPartitionLabels: { type: boolean, default: true }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user