Skip to content

Commit

Permalink
Merge bbf0a78 into f149247
Browse files Browse the repository at this point in the history
  • Loading branch information
jsrain committed Oct 27, 2017
2 parents f149247 + bbf0a78 commit c9dce86
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions package/yast2-storage-ng.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 27 11:33:55 UTC 2017 - jsrain@suse.cz

- Limit maximal proposed size of EFI partition (bsc#1062775)
- 4.0.13

-------------------------------------------------------------------
Thu Oct 26 15:30:53 UTC 2017 - ancor@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-storage-ng.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-storage-ng
Version: 4.0.12
Version: 4.0.13
Release: 0
BuildArch: noarch

Expand Down
3 changes: 2 additions & 1 deletion src/lib/y2storage/boot_requirements_strategies/uefi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def needed_partitions(target)

MIN_SIZE = DiskSize.MiB(33).freeze
DESIRED_SIZE = DiskSize.MiB(500).freeze
MAX_SIZE = DiskSize.MiB(500).freeze

def efi_missing?
free_mountpoint?("/boot/efi")
Expand All @@ -51,7 +52,7 @@ def efi_partition(target)
else
vol.partition_id = PartitionId::ESP
vol.min_size = target == :min ? MIN_SIZE : DESIRED_SIZE
vol.max_size = DiskSize.unlimited
vol.max_size = MAX_SIZE
vol.max_start_offset = DiskSize.TiB(2)
end
vol
Expand Down
6 changes: 4 additions & 2 deletions test/support/proposed_partitions_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,18 @@
context "when aiming for the recommended size" do
let(:target) { :desired }

it "requires /boot/efi to be at least 500 MiB large" do
it "requires /boot/efi to be exactly 500 MiB large" do
expect(efi_part.min_size).to eq 500.MiB
expect(efi_part.max_size).to eq 500.MiB
end
end

context "when aiming for the minimal size" do
let(:target) { :min }

it "requires /boot/efi to be at least 33 MiB large" do
it "requires /boot/efi to be between 33 MiB and 500 MiB large" do
expect(efi_part.min_size).to eq 33.MiB
expect(efi_part.max_size).to eq 500.MiB
end
end
end
Expand Down

0 comments on commit c9dce86

Please sign in to comment.