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-03-04 22:43:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng"
Sat Mar 4 22:43:14 2023 rev:136 rq:1069279 version:4.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes
2023-01-18 13:08:35.336048248 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.31432/yast2-storage-ng.changes
2023-03-04 22:43:53.963949306 +0100
@@ -1,0 +2,12 @@
+Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák <[email protected]>
+
+- Bump version to 4.6.0 (bsc#1208913)
+
+-------------------------------------------------------------------
+Thu Mar 2 10:13:14 UTC 2023 - Martin Vidner <[email protected]>
+
+- Fix comparing ProposalSettings in tests, avoid using Marshal
+ (bsc#1208259)
+- 4.5.17
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-ng-4.5.16.tar.bz2
New:
----
yast2-storage-ng-4.6.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.U0mSIA/_old 2023-03-04 22:43:54.903953824 +0100
+++ /var/tmp/diff_new_pack.U0mSIA/_new 2023-03-04 22:43:54.907953844 +0100
@@ -17,7 +17,7 @@
Name: yast2-storage-ng
-Version: 4.5.16
+Version: 4.6.0
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
++++++ yast2-storage-ng-4.5.16.tar.bz2 -> yast2-storage-ng-4.6.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/package/yast2-storage-ng.changes
new/yast2-storage-ng-4.6.0/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-4.5.16/package/yast2-storage-ng.changes
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/package/yast2-storage-ng.changes 2023-03-03
16:02:03.000000000 +0100
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Fri Mar 03 14:44:07 UTC 2023 - Ladislav Slezák <[email protected]>
+
+- Bump version to 4.6.0 (bsc#1208913)
+
+-------------------------------------------------------------------
+Thu Mar 2 10:13:14 UTC 2023 - Martin Vidner <[email protected]>
+
+- Fix comparing ProposalSettings in tests, avoid using Marshal
+ (bsc#1208259)
+- 4.5.17
+
+-------------------------------------------------------------------
Tue Jan 17 14:32:36 UTC 2023 - Stefan Hundhammer <[email protected]>
- Extended regexp to identify Dell BOSS storage devices (bsc#1200975)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/package/yast2-storage-ng.spec
new/yast2-storage-ng-4.6.0/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-4.5.16/package/yast2-storage-ng.spec 2023-01-17
16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/package/yast2-storage-ng.spec 2023-03-03
16:02:03.000000000 +0100
@@ -16,7 +16,7 @@
#
Name: yast2-storage-ng
-Version: 4.5.16
+Version: 4.6.0
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.5.16/src/lib/y2storage/equal_by_instance_variables.rb
new/yast2-storage-ng-4.6.0/src/lib/y2storage/equal_by_instance_variables.rb
---
old/yast2-storage-ng-4.5.16/src/lib/y2storage/equal_by_instance_variables.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/src/lib/y2storage/equal_by_instance_variables.rb
2023-03-03 16:02:03.000000000 +0100
@@ -0,0 +1,38 @@
+# Copyright (c) [2023] 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.
+
+module Y2Storage
+ # Define `==` by having the same class and same (==) instance variables.
+ #
+ # The strict comparison (`eql?`) is unchanged and will be `false`
+ # for different objects. See Yast2::Equatable which can also
+ # specify the instance variables used for the comparison:
+ #
https://github.com/yast/yast-yast2/blob/master/library/general/src/lib/yast2/equatable.rb
+ module EqualByInstanceVariables
+ # TODO: move to base library?
+
+ def ==(other)
+ return false if other.class != self.class
+
+ instance_variables.all? do |iv|
+ instance_variable_get(iv) == other.instance_variable_get(iv)
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/src/lib/y2storage/proposal_settings.rb
new/yast2-storage-ng-4.6.0/src/lib/y2storage/proposal_settings.rb
--- old/yast2-storage-ng-4.5.16/src/lib/y2storage/proposal_settings.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/src/lib/y2storage/proposal_settings.rb
2023-03-03 16:02:03.000000000 +0100
@@ -26,6 +26,7 @@
require "y2storage/partitioning_features"
require "y2storage/volume_specifications_set"
require "y2storage/encryption_method"
+require "y2storage/equal_by_instance_variables"
module Y2Storage
# Class to manage settings used by the proposal (typically read from
control.xml)
@@ -35,6 +36,7 @@
class ProposalSettings
include SecretAttributes
include PartitioningFeatures
+ include EqualByInstanceVariables
# @return [Boolean] whether to use LVM
attr_accessor :use_lvm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/src/lib/y2storage/secret_attributes.rb
new/yast2-storage-ng-4.6.0/src/lib/y2storage/secret_attributes.rb
--- old/yast2-storage-ng-4.5.16/src/lib/y2storage/secret_attributes.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/src/lib/y2storage/secret_attributes.rb
2023-03-03 16:02:03.000000000 +0100
@@ -44,6 +44,15 @@
# use deep instrospection
[]
end
+
+ # Enable comparison
+ #
+ # The motivation for this is cooperation with EqualByInstanceVariables,
+ # and another way would be to simply include that mixin here,
+ # but it is more understandable to inline it like this.
+ def ==(other)
+ other.class == self.class && other.value == value
+ end
end
# Class methods for the mixin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/src/lib/y2storage/subvol_specification.rb
new/yast2-storage-ng-4.6.0/src/lib/y2storage/subvol_specification.rb
--- old/yast2-storage-ng-4.5.16/src/lib/y2storage/subvol_specification.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/src/lib/y2storage/subvol_specification.rb
2023-03-03 16:02:03.000000000 +0100
@@ -19,6 +19,7 @@
require "yast"
require "y2storage/shadower"
+require "y2storage/equal_by_instance_variables"
Yast.import "Arch"
Yast.import "ProductFeatures"
@@ -29,6 +30,7 @@
#
class SubvolSpecification
include Yast::Logger
+ include EqualByInstanceVariables
attr_accessor :path, :copy_on_write, :archs, :referenced_limit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/src/lib/y2storage/volume_specification.rb
new/yast2-storage-ng-4.6.0/src/lib/y2storage/volume_specification.rb
--- old/yast2-storage-ng-4.5.16/src/lib/y2storage/volume_specification.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/src/lib/y2storage/volume_specification.rb
2023-03-03 16:02:03.000000000 +0100
@@ -20,6 +20,7 @@
require "yast"
require "y2storage/partitioning_features"
require "y2storage/subvol_specification"
+require "y2storage/equal_by_instance_variables"
Yast.import "Kernel"
@@ -27,6 +28,7 @@
# Helper class to represent a volume specification as defined in control.xml
class VolumeSpecification
include PartitioningFeatures
+ include EqualByInstanceVariables
# @return [PartitionId] when the volume needs to be a partition with a
specific id
attr_accessor :partition_id
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/test/y2storage/equal_by_instance_variables_test.rb
new/yast2-storage-ng-4.6.0/test/y2storage/equal_by_instance_variables_test.rb
---
old/yast2-storage-ng-4.5.16/test/y2storage/equal_by_instance_variables_test.rb
1970-01-01 01:00:00.000000000 +0100
+++
new/yast2-storage-ng-4.6.0/test/y2storage/equal_by_instance_variables_test.rb
2023-03-03 16:02:03.000000000 +0100
@@ -0,0 +1,68 @@
+#!/usr/bin/env rspec
+
+# Copyright (c) [2023] 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 "y2storage/equal_by_instance_variables"
+
+# skeleton for the mixin
+class TestEquality
+ include Y2Storage::EqualByInstanceVariables
+
+ attr_accessor :a, :b
+
+ def initialize(aaa, bbb)
+ @a = aaa
+ @b = bbb
+ end
+end
+
+describe Y2Storage::EqualByInstanceVariables do
+ describe "#==" do
+ it "returns true for same class, same ivars" do
+ a = TestEquality.new(1, 2)
+ b = TestEquality.new(1, 2)
+
+ expect(a).to eq b
+ end
+
+ it "returns true for same class, different ivars" do
+ a = TestEquality.new(1, 2)
+ b = TestEquality.new(2, 1)
+
+ expect(a).to_not eq b
+ end
+
+ it "returns false for different class, same ivars" do
+ a = TestEquality.new(1, 2)
+ bb = Struct.new(:a, :b)
+ b = bb.new(1, 2)
+
+ expect(a).to_not eq b
+ end
+
+ it "returns false for a completely different class" do
+ a = TestEquality.new(1, 2)
+ b = Object.new
+
+ expect(a).to_not eq b
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/test/y2storage/filesystems/btrfs_test.rb
new/yast2-storage-ng-4.6.0/test/y2storage/filesystems/btrfs_test.rb
--- old/yast2-storage-ng-4.5.16/test/y2storage/filesystems/btrfs_test.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/test/y2storage/filesystems/btrfs_test.rb
2023-03-03 16:02:03.000000000 +0100
@@ -648,9 +648,13 @@
end
it "returns a copy of the stored objects instead of the original ones" do
- filesystem.auto_deleted_subvolumes = [subvol1, subvol2]
+ subvols = [subvol1, subvol2]
+ filesystem.auto_deleted_subvolumes = subvols
+ returned_subvols = filesystem.auto_deleted_subvolumes
- expect(filesystem.auto_deleted_subvolumes).to_not eq [subvol1, subvol2]
+ expect(returned_subvols).to_not equal subvols
+ expect(returned_subvols[0]).to_not equal subvols[0]
+ expect(returned_subvols[1]).to_not equal subvols[1]
end
it "shares the stored value with all the instances of the filesystem" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/test/y2storage/proposal/settings_generator_test.rb
new/yast2-storage-ng-4.6.0/test/y2storage/proposal/settings_generator_test.rb
---
old/yast2-storage-ng-4.5.16/test/y2storage/proposal/settings_generator_test.rb
2023-01-17 16:31:37.000000000 +0100
+++
new/yast2-storage-ng-4.6.0/test/y2storage/proposal/settings_generator_test.rb
2023-03-03 16:02:03.000000000 +0100
@@ -83,10 +83,9 @@
context "when called for first time" do
it "returns the same values as the initial settings" do
- settings_values = Marshal.dump(settings)
- next_settings_values = Marshal.dump(subject.next_settings)
+ next_settings = subject.next_settings
- expect(next_settings_values).to eq(settings_values)
+ expect(next_settings).to eq(settings)
end
it "creates an empty SettingsAdjustment object" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/test/y2storage/proposal_settings_test.rb
new/yast2-storage-ng-4.6.0/test/y2storage/proposal_settings_test.rb
--- old/yast2-storage-ng-4.5.16/test/y2storage/proposal_settings_test.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/test/y2storage/proposal_settings_test.rb
2023-03-03 16:02:03.000000000 +0100
@@ -68,10 +68,7 @@
end
it "creates an object with the same values" do
- settings_values = Marshal.dump(settings)
- settings_deep_copy_values = Marshal.dump(settings.deep_copy)
-
- expect(settings_deep_copy_values).to eq(settings_values)
+ expect(settings.deep_copy).to eq(settings)
end
it "creates an object with different references" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-4.5.16/test/y2storage/secret_attributes_test.rb
new/yast2-storage-ng-4.6.0/test/y2storage/secret_attributes_test.rb
--- old/yast2-storage-ng-4.5.16/test/y2storage/secret_attributes_test.rb
2023-01-17 16:31:37.000000000 +0100
+++ new/yast2-storage-ng-4.6.0/test/y2storage/secret_attributes_test.rb
2023-03-03 16:02:03.000000000 +0100
@@ -21,6 +21,7 @@
require_relative "spec_helper"
require "y2storage"
require "pp"
+require "y2storage/equal_by_instance_variables"
describe Y2Storage::SecretAttributes do
# Dummy test clase
@@ -35,6 +36,7 @@
# Another dummy test clase
class ClassWithData
include Y2Storage::SecretAttributes
+ include Y2Storage::EqualByInstanceVariables
attr_accessor :name
@@ -128,6 +130,30 @@
expect(with_password2.password).to eq "xx2X"
end
+ context "when comparing (==) by instance variables" do
+ let(:with_data2) { ClassWithData.new }
+
+ it "compares as equal when the secret is equal" do
+ with_data.name = "name"
+ with_data.data = "data"
+
+ with_data2.name = "name"
+ with_data2.data = "data"
+
+ expect(with_data).to eq with_data2
+ end
+
+ it "compares as different when the secret is different" do
+ with_data.name = "name"
+ with_data.data = "data"
+
+ with_data2.name = "name"
+ with_data2.data = "somethingelse"
+
+ expect(with_data).to_not eq with_data2
+ end
+ end
+
context "when the attribute has never been set" do
it "is not displayed in #inspect (like .attr_accessor)" do
expect(with_password.inspect).to_not include "@name"