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 2023-07-12 17:26:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.8922 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng"
Wed Jul 12 17:26:14 2023 rev:146 rq:1098088 version:4.6.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes
2023-06-08 21:41:50.989739173 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.8922/yast2-storage-ng.changes
2023-07-12 17:26:17.474123597 +0200
@@ -1,0 +2,15 @@
+Wed Jul 5 13:42:12 UTC 2023 - Stefan Hundhammer <[email protected]>
+
+- Ensure adding storage support software packages for MicroOS
+ which uses its custom partitions_proposal client, not the
+ standard inst_disk_proposal client (bsc#1212452)
+ https://github.com/yast/yast-storage-ng/pull/1351
+- 4.6.12
+
+-------------------------------------------------------------------
+Thu Jun 29 11:42:21 UTC 2023 - Ancor Gonzalez Sosa <[email protected]>
+
+- Honor encryption settings if they are set into ProductFeatures
+ by the Common Critera role (jsc#PED-4166, jsc#PED-4474).
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-ng-4.6.11.tar.bz2
New:
----
yast2-storage-ng-4.6.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.vhoq8l/_old 2023-07-12 17:26:18.310128470 +0200
+++ /var/tmp/diff_new_pack.vhoq8l/_new 2023-07-12 17:26:18.314128493 +0200
@@ -17,7 +17,7 @@
Name: yast2-storage-ng
-Version: 4.6.11
+Version: 4.6.12
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
++++++ yast2-storage-ng-4.6.11.tar.bz2 -> yast2-storage-ng-4.6.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/package/yast2-storage-ng.changes
new/yast2-storage-ng-4.6.12/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-4.6.11/package/yast2-storage-ng.changes
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/package/yast2-storage-ng.changes
2023-07-11 11:08:25.000000000 +0200
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Wed Jul 5 13:42:12 UTC 2023 - Stefan Hundhammer <[email protected]>
+
+- Ensure adding storage support software packages for MicroOS
+ which uses its custom partitions_proposal client, not the
+ standard inst_disk_proposal client (bsc#1212452)
+ https://github.com/yast/yast-storage-ng/pull/1351
+- 4.6.12
+
+-------------------------------------------------------------------
+Thu Jun 29 11:42:21 UTC 2023 - Ancor Gonzalez Sosa <[email protected]>
+
+- Honor encryption settings if they are set into ProductFeatures
+ by the Common Critera role (jsc#PED-4166, jsc#PED-4474).
+
+-------------------------------------------------------------------
Wed Jun 7 08:03:52 UTC 2023 - Stefan Hundhammer <[email protected]>
- Prevent setting the volume label for a mounted btrfs or swap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/package/yast2-storage-ng.spec
new/yast2-storage-ng-4.6.12/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-4.6.11/package/yast2-storage-ng.spec 2023-06-07
11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/package/yast2-storage-ng.spec 2023-07-11
11:08:25.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-storage-ng
-Version: 4.6.11
+Version: 4.6.12
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-4.6.11/src/lib/y2storage/clients/inst_disk_proposal.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/clients/inst_disk_proposal.rb
--- old/yast2-storage-ng-4.6.11/src/lib/y2storage/clients/inst_disk_proposal.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/src/lib/y2storage/clients/inst_disk_proposal.rb
2023-07-11 11:08:25.000000000 +0200
@@ -158,23 +158,7 @@
# Add storage-related software packages (filesystem tools etc.) to the
# set of packages to be installed.
def add_storage_packages
- features = storage_manager.staging.used_features
- required_features =
storage_manager.staging.used_features(required_only: true)
-
- required_packages = required_features.pkg_list
- optional_packages = features.pkg_list - required_packages
-
- set_proposal_packages(required_packages, false)
- set_proposal_packages(optional_packages, true)
- end
-
- # @see #add_storage_packages
- #
- # @param pkgs [Array<String>] list of packages
- # @param optional [Boolean] whether the packages in the list are optional
- def set_proposal_packages(pkgs, optional)
- pkg_handler = Y2Storage::PackageHandler.new(pkgs, optional: optional)
- pkg_handler.set_proposal_packages
+
Y2Storage::PackageHandler.set_proposal_packages_for(storage_manager.staging)
end
# Save the list of filesystem to /etc/sysconfig/storage.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/src/lib/y2storage/clients/partitions_proposal.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/clients/partitions_proposal.rb
---
old/yast2-storage-ng-4.6.11/src/lib/y2storage/clients/partitions_proposal.rb
2023-06-07 11:34:17.000000000 +0200
+++
new/yast2-storage-ng-4.6.12/src/lib/y2storage/clients/partitions_proposal.rb
2023-07-11 11:08:25.000000000 +0200
@@ -116,8 +116,9 @@
staging = storage_manager.staging
actiongraph = staging ? staging.actiongraph : nil
self.actions_presenter = ActionsPresenter.new(actiongraph)
- Y2Storage::DumpManager.dump(staging)
- Y2Storage::DumpManager.dump(actions_presenter)
+ DumpManager.dump(staging)
+ DumpManager.dump(actions_presenter)
+ PackageHandler.set_proposal_packages_for(staging)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/src/lib/y2storage/devicegraph.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/devicegraph.rb
--- old/yast2-storage-ng-4.6.11/src/lib/y2storage/devicegraph.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/src/lib/y2storage/devicegraph.rb
2023-07-11 11:08:25.000000000 +0200
@@ -612,6 +612,23 @@
StorageFeaturesList.from_bitfield(storage_used_features(type))
end
+ # List of required (mandatory) storage features used by the devicegraph
+ #
+ # @return [StorageFeaturesList]
+ def required_used_features
+ used_features(required_only: true)
+ end
+
+ # List of optional storage features used by the devicegraph
+ #
+ # @return [StorageFeaturesList]
+ def optional_used_features
+ all =
storage_used_features(Storage::UsedFeaturesDependencyType_SUGGESTED)
+ required =
storage_used_features(Storage::UsedFeaturesDependencyType_REQUIRED)
+ # Using binary XOR in those bit fields to calculate the difference
+ StorageFeaturesList.from_bitfield(all ^ required)
+ end
+
private
# Copy of a device tree where hashes have been substituted by sorted
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/src/lib/y2storage/package_handler.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/package_handler.rb
--- old/yast2-storage-ng-4.6.11/src/lib/y2storage/package_handler.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/src/lib/y2storage/package_handler.rb
2023-07-11 11:08:25.000000000 +0200
@@ -112,6 +112,21 @@
success
end
+ # Add the proposal packages for storage that are needed for the specified
+ # devicegraph's used features. This marks the packages for installation;
+ # it does not install them yet.
+ #
+ # @param devicegraph [Devicegraph] usually StorageManager.instance.staging
+ # @param optional
+ def self.set_proposal_packages_for(devicegraph, optional: true)
+ required_packages = devicegraph.required_used_features.pkg_list
+ PackageHandler.new(required_packages, optional:
false).set_proposal_packages
+ return unless optional
+
+ optional_packages = devicegraph.optional_used_features.pkg_list
+ PackageHandler.new(optional_packages, optional:
true).set_proposal_packages
+ end
+
private
# Whether the packages should be considered as optional when adding them
to the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/src/lib/y2storage/proposal_settings.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/proposal_settings.rb
--- old/yast2-storage-ng-4.6.11/src/lib/y2storage/proposal_settings.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/src/lib/y2storage/proposal_settings.rb
2023-07-11 11:08:25.000000000 +0200
@@ -418,6 +418,23 @@
load_feature(:proposal, :multidisk_first)
load_size_feature(:proposal, :lvm_vg_size)
load_volumes_feature(:volumes)
+ load_encryption
+ end
+
+ # Loads the default encryption settings
+ #
+ # The encryption settings are not part of control.xml, but can be injected
by a previous step of
+ # the installation, eg. the dialog of the Common Criteria system role
+ def load_encryption
+ enc = feature(:proposal, :encryption)
+
+ return unless enc
+ return unless enc.respond_to?(:password)
+
+ passwd = enc.password.to_s
+ return if passwd.nil? || passwd.empty?
+
+ self.encryption_password = passwd
end
def validated_delete_mode(mode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/src/lib/y2storage/storage_feature.rb
new/yast2-storage-ng-4.6.12/src/lib/y2storage/storage_feature.rb
--- old/yast2-storage-ng-4.6.11/src/lib/y2storage/storage_feature.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/src/lib/y2storage/storage_feature.rb
2023-07-11 11:08:25.000000000 +0200
@@ -125,6 +125,14 @@
end
end
+ # Drop the cache of storage packages that are available.
+ #
+ # This is only ever needed if the available packages might have changed
+ # since the last use of this class.
+ def self.drop_cache
+ @all = nil
+ end
+
# Constructor
#
# This looks up a constant in the ::Storage namespace to make sure the id
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/test/y2storage/devicegraph_test.rb
new/yast2-storage-ng-4.6.12/test/y2storage/devicegraph_test.rb
--- old/yast2-storage-ng-4.6.11/test/y2storage/devicegraph_test.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/test/y2storage/devicegraph_test.rb
2023-07-11 11:08:25.000000000 +0200
@@ -1319,4 +1319,54 @@
end
end
end
+
+ describe "#required_used_features" do
+ before { fake_scenario(scenario) }
+
+ context "with local devices combining several filesystem types" do
+ let(:scenario) { "mixed_disks" }
+
+ it "returns only the features for mounted filesystems" do
+ features = fake_devicegraph.required_used_features
+ expect(features).to be_a Y2Storage::StorageFeaturesList
+ expect(features.map(&:id))
+ .to contain_exactly(:UF_BTRFS, :UF_XFS, :UF_SWAP)
+ end
+ end
+
+ context "with an empty disk" do
+ let(:scenario) { "empty_disks" }
+
+ it "Survives not having any storage features" do
+ features = fake_devicegraph.required_used_features
+ expect(features).to be_a Y2Storage::StorageFeaturesList
+ expect(features.map(&:id)).to be == []
+ end
+ end
+ end
+
+ describe "#optional_used_features" do
+ before { fake_scenario(scenario) }
+
+ context "with local devices combining several filesystem types" do
+ let(:scenario) { "mixed_disks" }
+
+ it "returns only the features for filesystems that are not mounted" do
+ features = fake_devicegraph.optional_used_features
+ expect(features).to be_a Y2Storage::StorageFeaturesList
+ expect(features.map(&:id))
+ .to contain_exactly(:UF_EXT4, :UF_NTFS)
+ end
+ end
+
+ context "with an empty disk" do
+ let(:scenario) { "empty_disks" }
+
+ it "Survives not having any storage features" do
+ features = fake_devicegraph.optional_used_features
+ expect(features).to be_a Y2Storage::StorageFeaturesList
+ expect(features.map(&:id)).to be == []
+ end
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/test/y2storage/package_handler_test.rb
new/yast2-storage-ng-4.6.12/test/y2storage/package_handler_test.rb
--- old/yast2-storage-ng-4.6.11/test/y2storage/package_handler_test.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/test/y2storage/package_handler_test.rb
2023-07-11 11:08:25.000000000 +0200
@@ -23,6 +23,7 @@
require_relative "spec_helper"
require "y2storage/package_handler"
+require "y2storage/storage_feature"
describe Y2Storage::PackageHandler do
let(:feature_pkg) { ["lvm2", "btrfsprogs", "e2fsprogs"] }
@@ -135,4 +136,47 @@
end
end
end
+
+ describe ".set_proposal_packages_for" do
+ before do
+ fake_scenario(scenario)
+ Y2Storage::StorageFeature.drop_cache
+ allow(Yast::Mode).to receive(:installation).and_return(installation)
+ allow(Yast::Package).to receive(:Installed).and_return(false)
+ allow(Yast::Package).to receive(:Available).and_return(true)
+ end
+
+ context "with local devices combining several filesystem types" do
+ PROPOSAL_ID = "storage_proposal"
+ let(:scenario) { "mixed_disks" }
+ let(:installation) { true }
+
+ it "Adds the correct required and optional storage packages to the
proposal" do
+ expect(Yast::PackagesProposal).to receive(:SetResolvables)
+ .with(PROPOSAL_ID, :package, ["btrfsprogs", "e2fsprogs",
"xfsprogs"], optional: false)
+ .and_return true
+ expect(Yast::PackagesProposal).to receive(:SetResolvables)
+ .with(PROPOSAL_ID, :package, ["e2fsprogs", "ntfs-3g", "ntfsprogs"],
optional: true)
+ .and_return true
+ described_class.set_proposal_packages_for(fake_devicegraph)
+ end
+
+ it "Adds only required storage packages to the proposal if 'optional' is
'false" do
+ expect(Yast::PackagesProposal).to receive(:SetResolvables)
+ .with(PROPOSAL_ID, :package, ["btrfsprogs", "e2fsprogs",
"xfsprogs"], optional: false)
+ .and_return true
+ described_class.set_proposal_packages_for(fake_devicegraph, optional:
false)
+ end
+ end
+
+ context "with empty disks" do
+ let(:scenario) { "empty_disks" }
+ let(:installation) { true }
+
+ it "Does not add any storage packages to the proposal" do
+ expect(Yast::PackagesProposal).not_to receive(:SetResolvables)
+ described_class.set_proposal_packages_for(fake_devicegraph, optional:
true)
+ end
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/test/y2storage/proposal_settings_test.rb
new/yast2-storage-ng-4.6.12/test/y2storage/proposal_settings_test.rb
--- old/yast2-storage-ng-4.6.11/test/y2storage/proposal_settings_test.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/test/y2storage/proposal_settings_test.rb
2023-07-11 11:08:25.000000000 +0200
@@ -35,6 +35,19 @@
stub_features("partitioning" =>
initial_partitioning_features.merge(features))
end
+ # Used to test the mechanism to inject an encryption password into the
settings
+ class TestInjectedPassword
+ include Y2Storage::SecretAttributes
+
+ # Real password
+ secret_attr :password
+
+ # Constructor
+ def initialize(passwd)
+ self.password = passwd
+ end
+ end
+
before do
Y2Storage::StorageManager.create_test_instance
end
@@ -333,6 +346,15 @@
expect(settings.lvm).to eq false
end
+ it "sets 'encryption_password' based on the 'encryption' feature in the
'proposal' section" do
+ read_feature("encryption", "SuperSecret")
+ expect(settings.use_encryption).to eq false
+ expect(settings.encryption_password).to eq nil
+ read_feature("encryption", TestInjectedPassword.new("SuperSecret"))
+ expect(settings.use_encryption).to eq true
+ expect(settings.encryption_password).to eq "SuperSecret"
+ end
+
it "sets 'delete_resize_configurable' based on the feature in the
'proposal' section" do
read_feature("delete_resize_configurable", true)
expect(settings.delete_resize_configurable).to eq true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.6.11/test/y2storage/storage_features_list_test.rb
new/yast2-storage-ng-4.6.12/test/y2storage/storage_features_list_test.rb
--- old/yast2-storage-ng-4.6.11/test/y2storage/storage_features_list_test.rb
2023-06-07 11:34:17.000000000 +0200
+++ new/yast2-storage-ng-4.6.12/test/y2storage/storage_features_list_test.rb
2023-07-11 11:08:25.000000000 +0200
@@ -22,6 +22,7 @@
# find current contact information at www.suse.com.
require_relative "spec_helper"
+require "y2storage/storage_feature"
require "y2storage/storage_features_list"
describe Y2Storage::StorageFeaturesList do
@@ -84,6 +85,7 @@
let(:bits) { Storage::UF_NTFS | Storage::UF_EXT3 }
before do
+ Y2Storage::StorageFeature.drop_cache
allow(Yast::Package).to receive(:Available).and_return false
allow(Yast::Package).to
receive(:Available).with("ntfsprogs").and_return true
end