Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-storage-ng for
openSUSE:Factory checked in at 2024-03-26 19:24:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng"
Tue Mar 26 19:24:33 2024 rev:155 rq:1160689 version:5.0.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes
2024-03-13 22:18:00.827025136 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1905/yast2-storage-ng.changes
2024-03-26 19:25:13.072424921 +0100
@@ -1,0 +2,8 @@
+Thu Mar 21 12:28:56 UTC 2024 - Ancor Gonzalez Sosa <[email protected]>
+
+- GuidedProposal: internal settings to control the configuration
+ of boot-related partitions and the usage of adjust_by_ram.
+- Needed for gh#openSUSE/agama#1111
+- 5.0.10
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-ng-5.0.9.tar.bz2
New:
----
yast2-storage-ng-5.0.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.4qnnoH/_old 2024-03-26 19:25:14.044460688 +0100
+++ /var/tmp/diff_new_pack.4qnnoH/_new 2024-03-26 19:25:14.044460688 +0100
@@ -17,7 +17,7 @@
Name: yast2-storage-ng
-Version: 5.0.9
+Version: 5.0.10
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
++++++ yast2-storage-ng-5.0.9.tar.bz2 -> yast2-storage-ng-5.0.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/package/yast2-storage-ng.changes
new/yast2-storage-ng-5.0.10/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-5.0.9/package/yast2-storage-ng.changes 2024-03-12
15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/package/yast2-storage-ng.changes
2024-03-22 13:14:07.000000000 +0100
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Mar 21 12:28:56 UTC 2024 - Ancor Gonzalez Sosa <[email protected]>
+
+- GuidedProposal: internal settings to control the configuration
+ of boot-related partitions and the usage of adjust_by_ram.
+- Needed for gh#openSUSE/agama#1111
+- 5.0.10
+
+-------------------------------------------------------------------
Tue Mar 12 13:57:30 UTC 2024 - Stefan Hundhammer <[email protected]>
- Fix unlimited-sized fake device graphs (bsc#1221222)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-storage-ng-5.0.9/package/yast2-storage-ng.spec
new/yast2-storage-ng-5.0.10/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-5.0.9/package/yast2-storage-ng.spec 2024-03-12
15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/package/yast2-storage-ng.spec 2024-03-22
13:14:07.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: yast2-storage-ng
-Version: 5.0.9
+Version: 5.0.10
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/src/lib/y2storage/proposal/devices_planner.rb
new/yast2-storage-ng-5.0.10/src/lib/y2storage/proposal/devices_planner.rb
--- old/yast2-storage-ng-5.0.9/src/lib/y2storage/proposal/devices_planner.rb
2024-03-12 15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/src/lib/y2storage/proposal/devices_planner.rb
2024-03-22 13:14:07.000000000 +0100
@@ -75,6 +75,8 @@
# @param devicegraph [Devicegraph]
# @return [Array<Planned::Device>]
def add_boot_devices(devices, target, devicegraph)
+ return unless settings.boot
+
@target = target
devices.unshift(*planned_boot_devices(devices, devicegraph))
remove_shadowed_subvolumes(devices)
@@ -285,6 +287,8 @@
planned_device.min_size = min_size(volume)
planned_device.max_size = max_size(volume)
+ return if volume.ignore_adjust_by_ram?
+
if volume.adjust_by_ram?
planned_device.min_size = [planned_device.min_size, ram_size].max
planned_device.max_size = [planned_device.max_size, ram_size].max
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/src/lib/y2storage/proposal_settings.rb
new/yast2-storage-ng-5.0.10/src/lib/y2storage/proposal_settings.rb
--- old/yast2-storage-ng-5.0.9/src/lib/y2storage/proposal_settings.rb
2024-03-12 15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/src/lib/y2storage/proposal_settings.rb
2024-03-22 13:14:07.000000000 +0100
@@ -213,6 +213,10 @@
alias_method :lvm, :use_lvm
alias_method :lvm=, :use_lvm=
+ # @return [Boolean] whether the proposal should automatically configure
any partition
+ # possibly needed for booting the system.
+ attr_accessor :boot
+
# @return [ProposalSpaceSettings]
attr_reader :space_settings
@@ -313,7 +317,7 @@
# List of all the supported settings
SETTINGS = [
:multidisk_first, :root_device, :explicit_root_device,
- :candidate_devices, :explicit_candidate_devices,
+ :candidate_devices, :explicit_candidate_devices, :boot,
:windows_delete_mode, :linux_delete_mode, :other_delete_mode,
:resize_windows,
:delete_resize_configurable,
:lvm, :separate_vgs, :allocate_volume_mode, :lvm_vg_strategy,
:lvm_vg_size
@@ -389,6 +393,7 @@
# Defaults when a setting is not specified
DEFAULTS = {
allocate_volume_mode: :auto,
+ boot: true,
delete_resize_configurable: true,
linux_delete_mode: :ondemand,
lvm: false,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/src/lib/y2storage/volume_specification.rb
new/yast2-storage-ng-5.0.10/src/lib/y2storage/volume_specification.rb
--- old/yast2-storage-ng-5.0.9/src/lib/y2storage/volume_specification.rb
2024-03-12 15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/src/lib/y2storage/volume_specification.rb
2024-03-22 13:14:07.000000000 +0100
@@ -177,10 +177,16 @@
# @return [Boolean] true if #snapshots_size and #snapshots_percentage
should be ignored
attr_accessor :ignore_snapshots_sizes
+ # Whether to ignore any possible effect on the size derived from RAM size
+ #
+ # @return [Boolean] true if #adjust_by_ram should be ignored
+ attr_accessor :ignore_adjust_by_ram
+
alias_method :proposed?, :proposed
alias_method :proposed_configurable?, :proposed_configurable
alias_method :adjust_by_ram?, :adjust_by_ram
alias_method :adjust_by_ram_configurable?, :adjust_by_ram_configurable
+ alias_method :ignore_adjust_by_ram?, :ignore_adjust_by_ram
alias_method :snapshots?, :snapshots
alias_method :snapshots_configurable?, :snapshots_configurable
alias_method :ignore_snapshots_sizes?, :ignore_snapshots_sizes
@@ -380,6 +386,7 @@
@fs_types = []
@ignore_fallback_sizes = false
@ignore_snapshots_sizes = false
+ @ignore_adjust_by_ram = false
@reformat = true
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/test/y2storage/proposal/devices_planner_test.rb
new/yast2-storage-ng-5.0.10/test/y2storage/proposal/devices_planner_test.rb
--- old/yast2-storage-ng-5.0.9/test/y2storage/proposal/devices_planner_test.rb
2024-03-12 15:29:11.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/test/y2storage/proposal/devices_planner_test.rb
2024-03-22 13:14:07.000000000 +0100
@@ -108,6 +108,15 @@
)
end
+ context "if ProposalSettings#boot is set to false" do
+ before { settings.boot = false }
+
+ it "does not include the partitions needed by BootRequirementChecker"
do
+ mount_points = subject.planned_devices(:desired,
devicegraph).map(&:mount_point)
+ expect(mount_points).to_not include("/one_boot", "/other_boot")
+ end
+ end
+
context "when a volume is specified in <volumes> section" do
let(:volumes) { [volume] }
@@ -463,6 +472,12 @@
expect(planned_device.min_size).to eq(8.GiB)
expect(planned_device.max_size).to eq(8.GiB)
end
+
+ it "does not extend the sizes to ram size if #ignore_adjust_by_ram
is set" do
+ vol_in_settings.ignore_adjust_by_ram = true
+ expect(planned_device.min_size).to eq(1.GiB)
+ expect(planned_device.max_size).to eq(2.GiB)
+ end
end
context "when it is planning a device with btrfs filesystem" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.9/test/y2storage/proposal_agama_boot_test.rb
new/yast2-storage-ng-5.0.10/test/y2storage/proposal_agama_boot_test.rb
--- old/yast2-storage-ng-5.0.9/test/y2storage/proposal_agama_boot_test.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-ng-5.0.10/test/y2storage/proposal_agama_boot_test.rb
2024-03-22 13:14:07.000000000 +0100
@@ -0,0 +1,95 @@
+#!/usr/bin/env rspec
+
+# Copyright (c) [2024] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "spec_helper"
+require "storage"
+require "y2storage"
+require_relative "#{TEST_PATH}/support/proposal_examples"
+require_relative "#{TEST_PATH}/support/proposal_context"
+
+describe Y2Storage::MinGuidedProposal do
+ describe "#propose with settings in the Agama style" do
+ subject(:proposal) { described_class.new(settings: settings) }
+
+ include_context "proposal"
+ let(:scenario) { "empty_hard_disk_gpt_50GiB" }
+ let(:architecture) { :x86 }
+ let(:settings_format) { :ng }
+ let(:control_file_content) { { "partitioning" => { "volumes" => volumes }
} }
+ let(:volumes) { [{ "mount_point" => "/", "fs_type" => "xfs", "min_size" =>
"10 GiB" }] }
+
+ before do
+ # Speed-up things by avoiding calls to hwinfo
+ allow_any_instance_of(Y2Storage::Disk).to
receive(:hwinfo).and_return(Y2Storage::HWInfoDisk.new)
+
+ settings.candidate_devices = ["/dev/sda"]
+ settings.root_device = "/dev/sda"
+
+ allow(storage_arch).to receive(:efiboot?).and_return(efi)
+ end
+
+ context "in an EFI system" do
+ let(:efi) { true }
+
+ it "creates an ESP partition" do
+ proposal.propose
+ mount_points = proposal.devices.mount_points.map(&:path)
+ expect(proposal.devices.partitions.size).to eq 2
+ expect(mount_points).to contain_exactly("/boot/efi", "/")
+ end
+
+ context "if ProposalSettings#boot is set to false" do
+ before { settings.boot = false }
+
+ it "does not create any extra partition for booting" do
+ proposal.propose
+ mount_points = proposal.devices.mount_points.map(&:path)
+ expect(proposal.devices.partitions.size).to eq 1
+ expect(mount_points).to contain_exactly("/")
+ end
+ end
+ end
+
+ context "in an legacy x86 system" do
+ let(:efi) { false }
+
+ it "creates a bios boot partition" do
+ proposal.propose
+ partitions = proposal.devices.partitions
+ expect(partitions.size).to eq 2
+ expect(partitions.map(&:id)).to contain_exactly(
+ Y2Storage::PartitionId::BIOS_BOOT, Y2Storage::PartitionId::LINUX
+ )
+ end
+
+ context "if ProposalSettings#boot is set to false" do
+ before { settings.boot = false }
+
+ it "does not create any extra partition for booting" do
+ proposal.propose
+ partitions = proposal.devices.partitions
+ expect(partitions.size).to eq 1
+ expect(partitions.first.id.to_sym).to eq :linux
+ end
+ end
+ end
+ end
+end