forked from QubesOS/qubes-anaconda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
6,588 additions
and
8,348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pkgs/ | ||
*.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
From 3a50b65a3ef639fef02aa708a6b5bca32d3aa3ec Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<frederic.pierret@qubes-os.org> | ||
Date: Sat, 30 Nov 2019 17:30:35 +0100 | ||
Subject: [PATCH] Define QUBESOS partitionning | ||
|
||
--- | ||
pyanaconda/core/configuration/storage.py | 2 ++ | ||
.../partitioning/automatic_partitioning.py | 22 +++++++++++++++++++ | ||
2 files changed, 24 insertions(+) | ||
|
||
diff --git a/pyanaconda/core/configuration/storage.py b/pyanaconda/core/configuration/storage.py | ||
index d01bd8a89..140c6153c 100644 | ||
--- a/pyanaconda/core/configuration/storage.py | ||
+++ b/pyanaconda/core/configuration/storage.py | ||
@@ -26,6 +26,7 @@ class PartitioningType(Enum): | ||
"""Type of the default partitioning.""" | ||
SERVER = "SERVER" | ||
WORKSTATION = "WORKSTATION" | ||
+ QUBESOS = "QUBESOS" | ||
|
||
|
||
class StorageSection(Section): | ||
@@ -82,6 +83,7 @@ class StorageSection(Section): | ||
|
||
SERVER Choose partitioning for servers. | ||
WORKSTATION Choose partitioning for workstations. | ||
+ QUBESOS Choose partitioning for QubesOS. | ||
|
||
:return: an instance of PartitioningType | ||
""" | ||
diff --git a/pyanaconda/modules/storage/partitioning/automatic_partitioning.py b/pyanaconda/modules/storage/partitioning/automatic_partitioning.py | ||
index 59306585e..b057a2484 100644 | ||
--- a/pyanaconda/modules/storage/partitioning/automatic_partitioning.py | ||
+++ b/pyanaconda/modules/storage/partitioning/automatic_partitioning.py | ||
@@ -81,6 +81,25 @@ WORKSTATION_PARTITIONING = [ | ||
) | ||
] | ||
|
||
+# Partitioning requirements for QubesOS. | ||
+QUBESOS_PARTITIONING = [ | ||
+ PartSpec( | ||
+ mountpoint="/", | ||
+ size=Size("1GiB"), | ||
+ required_space=Size("10GiB"), | ||
+ grow=True, | ||
+ btr=True, | ||
+ lv=True, | ||
+ thin=True, | ||
+ encrypted=True), | ||
+ PartSpec( | ||
+ fstype="swap", | ||
+ grow=False, | ||
+ lv=True, | ||
+ encrypted=True | ||
+ ) | ||
+] | ||
+ | ||
|
||
def get_default_partitioning(partitioning_type=None): | ||
"""Get the default partitioning requests. | ||
@@ -97,6 +116,9 @@ def get_default_partitioning(partitioning_type=None): | ||
if partitioning_type is PartitioningType.WORKSTATION: | ||
return platform.set_default_partitioning() + WORKSTATION_PARTITIONING | ||
|
||
+ if partitioning_type is PartitioningType.QUBESOS: | ||
+ return platform.set_default_partitioning() + QUBESOS_PARTITIONING | ||
+ | ||
raise ValueError("Invalid partitioning type: {}".format(conf.storage.default_partitioning)) | ||
|
||
|
||
-- | ||
2.21.0 | ||
|
Oops, something went wrong.