Compare commits
No commits in common. 'ubuntu/plucky' and 'ubuntu/kinetic' have entirely different histories.
ubuntu/plu
...
ubuntu/kin
@ -1,120 +0,0 @@
|
||||
Description: Allow specifying partitions that are only present when FDE is used.
|
||||
Author: Aaron Rainbolt <arraybolt3@ubuntu.com>
|
||||
Origin: ubuntu
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2024-02-26
|
||||
|
||||
--- a/src/modules/partition/core/PartitionLayout.cpp
|
||||
+++ b/src/modules/partition/core/PartitionLayout.cpp
|
||||
@@ -62,6 +62,7 @@ PartitionLayout::PartitionEntry::Partiti
|
||||
const QString& mountPoint,
|
||||
const QString& fs,
|
||||
const bool& noEncrypt,
|
||||
+ const bool& onlyPresentWithEncryption,
|
||||
const QVariantMap& features,
|
||||
const QString& size,
|
||||
const QString& minSize,
|
||||
@@ -72,6 +73,7 @@ PartitionLayout::PartitionEntry::Partiti
|
||||
, partAttributes( attributes )
|
||||
, partMountPoint( mountPoint )
|
||||
, partNoEncrypt( noEncrypt )
|
||||
+ , partOnlyPresentWithEncryption ( onlyPresentWithEncryption )
|
||||
, partFeatures( features )
|
||||
, partSize( size )
|
||||
, partMinSize( minSize )
|
||||
@@ -119,6 +121,7 @@ PartitionLayout::init( FileSystem::Type
|
||||
Calamares::getString( pentry, "mountPoint" ),
|
||||
Calamares::getString( pentry, "filesystem", "unformatted" ),
|
||||
Calamares::getBool( pentry, "noEncrypt", false ),
|
||||
+ Calamares::getBool( pentry, "onlyPresentWithEncryption", false ),
|
||||
Calamares::getSubMap( pentry, "features", ok ),
|
||||
Calamares::getString( pentry, "size", QStringLiteral( "0" ) ),
|
||||
Calamares::getString( pentry, "minSize", QStringLiteral( "0" ) ),
|
||||
@@ -228,6 +231,10 @@ PartitionLayout::createPartitions( Devic
|
||||
cWarning() << "Partition" << entry.partMountPoint << "size is invalid, skipping...";
|
||||
continue;
|
||||
}
|
||||
+ if ( luksPassphrase.isEmpty() && entry.partOnlyPresentWithEncryption ) {
|
||||
+ // this partition is being skipped entirely
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
// Calculate partition size: Rely on "possibly uninitialized use"
|
||||
// warnings to ensure that all the cases are covered below.
|
||||
@@ -252,6 +259,10 @@ PartitionLayout::createPartitions( Devic
|
||||
availableSectors = totalSectors;
|
||||
for ( const auto& entry : qAsConst( m_partLayout ) )
|
||||
{
|
||||
+ if ( luksPassphrase.isEmpty() && entry.partOnlyPresentWithEncryption ) {
|
||||
+ // this partition is being skipped entirely
|
||||
+ continue;
|
||||
+ }
|
||||
qint64 sectors = partSectorsMap.value( &entry );
|
||||
if ( entry.partMinSize.isValid() )
|
||||
{
|
||||
@@ -265,6 +276,10 @@ PartitionLayout::createPartitions( Devic
|
||||
// Assign sectors for percentage-defined partitions.
|
||||
for ( const auto& entry : qAsConst( m_partLayout ) )
|
||||
{
|
||||
+ if ( luksPassphrase.isEmpty() && entry.partOnlyPresentWithEncryption ) {
|
||||
+ // this partition is being skipped entirely
|
||||
+ continue;
|
||||
+ }
|
||||
if ( entry.partSize.unit() == Calamares::Partition::SizeUnit::Percent )
|
||||
{
|
||||
qint64 sectors
|
||||
@@ -288,6 +303,10 @@ PartitionLayout::createPartitions( Devic
|
||||
availableSectors = totalSectors;
|
||||
for ( const auto& entry : qAsConst( m_partLayout ) )
|
||||
{
|
||||
+ if ( luksPassphrase.isEmpty() && entry.partOnlyPresentWithEncryption ) {
|
||||
+ // this partition is being skipped entirely
|
||||
+ continue;
|
||||
+ }
|
||||
// Adjust partition size based on available space.
|
||||
qint64 sectors = partSectorsMap.value( &entry );
|
||||
sectors = std::min( sectors, availableSectors );
|
||||
--- a/src/modules/partition/core/PartitionLayout.h
|
||||
+++ b/src/modules/partition/core/PartitionLayout.h
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
QString partMountPoint;
|
||||
FileSystem::Type partFileSystem = FileSystem::Unknown;
|
||||
bool partNoEncrypt = false;
|
||||
+ bool partOnlyPresentWithEncryption;
|
||||
QVariantMap partFeatures;
|
||||
Calamares::Partition::PartitionSize partSize;
|
||||
Calamares::Partition::PartitionSize partMinSize;
|
||||
@@ -63,6 +64,7 @@ public:
|
||||
const QString& mountPoint,
|
||||
const QString& fs,
|
||||
const bool& noEncrypt,
|
||||
+ const bool& onlyPresentWithEncryption,
|
||||
const QVariantMap& features,
|
||||
const QString& size,
|
||||
const QString& minSize = QString(),
|
||||
--- a/src/modules/partition/partition.conf
|
||||
+++ b/src/modules/partition/partition.conf
|
||||
@@ -266,6 +266,7 @@ defaultFileSystemType: "ext4"
|
||||
# type: "4f68bce3-e8cd-4db1-96e7-fbcaf984b709"
|
||||
# filesystem: "ext4"
|
||||
# noEncrypt: false
|
||||
+# onlyPresentWithEncryption: false
|
||||
# mountPoint: "/"
|
||||
# size: 20%
|
||||
# minSize: 500M
|
||||
@@ -275,6 +276,7 @@ defaultFileSystemType: "ext4"
|
||||
# type: "933ac7e1-2eb4-4f13-b844-0e14e2aef915"
|
||||
# filesystem: "ext4"
|
||||
# noEncrypt: false
|
||||
+# onlyPresentWithEncryption: false
|
||||
# mountPoint: "/home"
|
||||
# size: 3G
|
||||
# minSize: 1.5G
|
||||
@@ -303,6 +305,7 @@ defaultFileSystemType: "ext4"
|
||||
# default filesystem type, or the user's choice, will be applied instead
|
||||
# of "unknown" (e.g. the user might pick ext4, or xfs).
|
||||
# - noEncrypt: whether this partition is exempt from encryption if enabled (optional parameter; default is false)
|
||||
+# - onlyPresentWithEncryption: whether this partition is only created when encryption is enabled (optional parameter; default is false; ONLY SUPPORTED IN UBUNTU)
|
||||
# - mountPoint: partition mount point (optional parameter; not mounted if unset)
|
||||
# - size: partition size in bytes (append 'K', 'M' or 'G' for KiB, MiB or GiB)
|
||||
# or
|
@ -1,22 +0,0 @@
|
||||
Description: Fix a syntax error in Presentation.qml which prevents the slideshow from displaying
|
||||
Author: Simon Quigley <tsimonq2@lubuntu.me>
|
||||
Origin: vendor
|
||||
Last-Update: 2024-10-15
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/qml/calamares-qt6/slideshow/Presentation.qml
|
||||
+++ b/src/qml/calamares-qt6/slideshow/Presentation.qml
|
||||
@@ -196,12 +196,7 @@ Item {
|
||||
Text {
|
||||
id: notesText
|
||||
|
||||
- property real padding: 16;
|
||||
-
|
||||
- x: padding
|
||||
- y: padding
|
||||
- width: parent.width - 2 * padding
|
||||
-
|
||||
+ anchors.margins: 16
|
||||
|
||||
font.pixelSize: 16
|
||||
wrapMode: Text.WordWrap
|
@ -1,82 +0,0 @@
|
||||
Description: Populate grub-{efi,pc}/install_devices debconf config
|
||||
Author: Simon Quigley <tsimonq2@ubuntu.com>
|
||||
Origin: vendor
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/calamares/+bug/2063354
|
||||
Last-Update: 2024-04-24
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/modules/bootloader/main.py
|
||||
+++ b/src/modules/bootloader/main.py
|
||||
@@ -25,6 +25,7 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
+import tempfile
|
||||
|
||||
import libcalamares
|
||||
|
||||
@@ -586,6 +587,46 @@ def get_grub_efi_parameters():
|
||||
return None
|
||||
|
||||
|
||||
+def get_disk_id(device_name, efi):
|
||||
+ by_id_path = "/dev/disk/by-id"
|
||||
+
|
||||
+ if efi:
|
||||
+ partitions = libcalamares.globalstorage.value("partitions")
|
||||
+ device_name = None
|
||||
+
|
||||
+ for partition in partitions:
|
||||
+ if "/boot/efi" in partition["mountPoint"]:
|
||||
+ device_name = partition["device"]
|
||||
+ break
|
||||
+
|
||||
+ device_path = os.path.realpath(device_name)
|
||||
+
|
||||
+ for entry in os.listdir(by_id_path):
|
||||
+ full_entry_path = os.path.join(by_id_path, entry)
|
||||
+ if os.path.realpath(full_entry_path) == device_path:
|
||||
+ return full_entry_path
|
||||
+
|
||||
+ return None
|
||||
+
|
||||
+
|
||||
+def set_grub_debconf_config(device_name, efi=False):
|
||||
+ dev_id_path = get_disk_id(device_name, efi=efi)
|
||||
+
|
||||
+ if not dev_id_path:
|
||||
+ return None
|
||||
+
|
||||
+ temp_dir = libcalamares.globalstorage.value("rootMountPoint") + "/tmp/"
|
||||
+ with tempfile.NamedTemporaryFile(mode="w", delete=False, dir=temp_dir) as tmpfile:
|
||||
+ debconf_target = "grub-efi" if efi else "grub-pc"
|
||||
+
|
||||
+ tmpfile.write(f"grub-pc {debconf_target}/install_devices multiselect {dev_id_path}\n")
|
||||
+ tmpfile_path = tmpfile.name
|
||||
+
|
||||
+ debconf_config = "/tmp/" + os.path.basename(tmpfile_path)
|
||||
+ check_target_env_call(["/usr/bin/debconf-set-selections", debconf_config])
|
||||
+ os.remove(tmpfile_path)
|
||||
+
|
||||
+
|
||||
def run_grub_mkconfig(partitions, output_file):
|
||||
"""
|
||||
Runs grub-mkconfig in the target environment
|
||||
@@ -636,6 +677,8 @@ def run_grub_install(fw_type, partitions
|
||||
"--efi-directory=" + efi_directory,
|
||||
"--bootloader-id=" + efi_bootloader_id,
|
||||
"--force"])
|
||||
+
|
||||
+ set_grub_debconf_config(efi_target, efi=True)
|
||||
else:
|
||||
assert efi_directory is None
|
||||
if libcalamares.globalstorage.value("bootLoader") is None:
|
||||
@@ -657,6 +700,8 @@ def run_grub_install(fw_type, partitions
|
||||
"--force",
|
||||
boot_loader["installPath"]])
|
||||
|
||||
+ set_grub_debconf_config(boot_loader["installPath"])
|
||||
+
|
||||
|
||||
def install_grub(efi_directory, fw_type):
|
||||
"""
|
@ -1,6 +0,0 @@
|
||||
Name: calamares
|
||||
Bug-Database: https://github.com/calamares/calamares/issues
|
||||
Bug-Submit: https://github.com/calamares/calamares/issues/new?assignees=&labels=&projects=&template=bug_report.md
|
||||
Changelog: https://github.com/calamares/calamares/blob/calamares/CHANGES-3.3
|
||||
Repository: https://github.com/calamares/calamares.git
|
||||
Repository-Browse: https://github.com/calamares/calamares
|
@ -1,5 +1,3 @@
|
||||
version=4
|
||||
opts="searchmode=plain, \
|
||||
pgpsigurlmangle=s/$/.asc/, \
|
||||
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
||||
https://api.github.com/repos/calamares/@PACKAGE@/releases https:\/\/github.com\/calamares\/calamares\/releases\/download\/v(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))\/calamares-(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*)).tar.gz
|
||||
opts="pgpsigurlmangle=s/$/.asc/, uversionmangle=s/\..$/-alpha2/" \
|
||||
https://github.com/calamares/calamares/releases .*/calamares-([\d\.]+)-alpha([\d]+).tar.gz
|
||||
|
Loading…
Reference in new issue