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 2026-08-15 22:40:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng"
Sat Aug 15 22:40:04 2026 rev:188 rq:1370952 version:5.0.50
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes
2026-06-23 17:40:49.534195736 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1258/yast2-storage-ng.changes
2026-08-15 22:40:06.025476063 +0200
@@ -1,0 +2,6 @@
+Wed Aug 12 10:09:27 UTC 2026 - José Iván López González <[email protected]>
+
+- Fix automatic generation of crypt names (bsc#1247173).
+- 5.0.50
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-ng-5.0.49.tar.bz2
New:
----
yast2-storage-ng-5.0.50.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.GoURwE/_old 2026-08-15 22:40:07.146515523 +0200
+++ /var/tmp/diff_new_pack.GoURwE/_new 2026-08-15 22:40:07.151515699 +0200
@@ -17,7 +17,7 @@
Name: yast2-storage-ng
-Version: 5.0.49
+Version: 5.0.50
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
++++++ yast2-storage-ng-5.0.49.tar.bz2 -> yast2-storage-ng-5.0.50.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.49/package/yast2-storage-ng.changes
new/yast2-storage-ng-5.0.50/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-5.0.49/package/yast2-storage-ng.changes
2026-06-22 16:42:43.000000000 +0200
+++ new/yast2-storage-ng-5.0.50/package/yast2-storage-ng.changes
2026-08-13 08:55:35.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Aug 12 10:09:27 UTC 2026 - José Iván López González <[email protected]>
+
+- Fix automatic generation of crypt names (bsc#1247173).
+- 5.0.50
+
+-------------------------------------------------------------------
Fri Jun 19 13:25:53 UTC 2026 - José Iván López González <[email protected]>
- Add method to get the required package objects (needed for
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.49/package/yast2-storage-ng.spec
new/yast2-storage-ng-5.0.50/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-5.0.49/package/yast2-storage-ng.spec 2026-06-22
16:42:43.000000000 +0200
+++ new/yast2-storage-ng-5.0.50/package/yast2-storage-ng.spec 2026-08-13
08:55:35.000000000 +0200
@@ -16,7 +16,7 @@
#
Name: yast2-storage-ng
-Version: 5.0.49
+Version: 5.0.50
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.49/src/lib/y2storage/blk_device.rb
new/yast2-storage-ng-5.0.50/src/lib/y2storage/blk_device.rb
--- old/yast2-storage-ng-5.0.49/src/lib/y2storage/blk_device.rb 2026-06-22
16:42:43.000000000 +0200
+++ new/yast2-storage-ng-5.0.50/src/lib/y2storage/blk_device.rb 2026-08-13
08:55:35.000000000 +0200
@@ -29,7 +29,7 @@
# Base class for most devices having a device name, udev path and udev ids.
#
# This is a wrapper for Storage::BlkDevice
- class BlkDevice < Device
+ class BlkDevice < Device # rubocop:disable Metrics/ClassLength
wrap_class Storage::BlkDevice,
downcast_to: ["Partitionable", "Partition", "Encryption", "LvmLv",
"StrayBlkDevice"]
@@ -64,6 +64,11 @@
# @return [BlkDevice] nil if there is no such block device
storage_class_forward :find_by_any_name, as: "BlkDevice"
+ # @!method self.valid_dm_table_name?(dm_table_name)
+ # @param dm_table_name [String]
+ # @return [Boolean]
+ storage_class_forward :valid_dm_table_name?
+
# @!attribute name
# @return [String] kernel-style device name
# (e.g. "/dev/sda2" or "/dev/vg_name/lv_name")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.49/src/lib/y2storage/encryption.rb
new/yast2-storage-ng-5.0.50/src/lib/y2storage/encryption.rb
--- old/yast2-storage-ng-5.0.49/src/lib/y2storage/encryption.rb 2026-06-22
16:42:43.000000000 +0200
+++ new/yast2-storage-ng-5.0.50/src/lib/y2storage/encryption.rb 2026-08-13
08:55:35.000000000 +0200
@@ -193,36 +193,21 @@
super
end
- # Generates an unused device mapper name for the encryption device
+ # Base name to use as fallback for the auto generated DM name when none of
the candidate names
+ # is valid, see {#auto_dm_table_name}.
+ DM_BASE_NAME_FALLBACK = "device".freeze
+ private_constant :DM_BASE_NAME_FALLBACK
+
+ # Generates a device mapper name for the encryption device
#
# This name is used for devices with auto dm names, see {.update_dm_names}.
#
+ # @note If there is no valid candidate name, then a fallback name like
"cr_device_1" is used
+ #
# @return [String]
def auto_dm_table_name
- # TODO: Better encryption names can be generated for indirectly used
encryption devices (e.g., an
- # encrypted device used as LVM PV). But this implies to update the auto
generated device mapper
- # names at some quite points, for example, when a device is
added/removed to a LVM VG, MD RAID,
- # etc.
- #
- # Another option could be to update the encryption names just before the
commit action, but in that
- # case, the devicegraph would contain temporary encryption names all the
time. Temporary names are
- # a problem if they are presented to the user in the UI.
- #
- # Note that any change to the encryption name generation could affect to
the pervasive encryption
- # key generation, specially when probed encryption names are modified.
Right now, probed names are
- # not touched.
- name =
- if !blk_device.dm_table_name.empty?
- blk_device.dm_table_name
- elsif !mount_point.nil?
- mount_point_to_dm_name
- elsif blk_device.udev_ids.any?
- blk_device.udev_ids.first
- else
- blk_device.basename
- end
-
- self.class.ensure_unused_dm_name(devicegraph, "cr_#{name}")
+ name = candidate_auto_dm_table_names.find { |c|
self.class.valid_dm_table_name?(c) }
+ name || generate_auto_dm_table_name(DM_BASE_NAME_FALLBACK)
end
# Whether {#dm_table_name} was automatically set by YaST.
@@ -570,6 +555,38 @@
end
end
+ # Candidate device mapper names for the encryption device
+ #
+ # TODO: Better encryption names can be generated for indirectly used
encryption devices (e.g., an
+ # encrypted device used as LVM PV). But this implies to update the auto
generated device mapper
+ # names at some quite points, for example, when a device is added/removed
to a LVM VG, MD RAID,
+ # etc.
+ #
+ # Another option could be to update the encryption names just before the
commit action, but in that
+ # case, the devicegraph would contain temporary encryption names all the
time. Temporary names are
+ # a problem if they are presented to the user in the UI.
+ #
+ # Note that any change to the encryption name generation could affect to
the pervasive encryption
+ # key generation, specially when probed encryption names are modified.
Right now, probed names are
+ # not touched.
+ def candidate_auto_dm_table_names
+ candidates = []
+ candidates << blk_device.dm_table_name unless
blk_device.dm_table_name.empty?
+ candidates << mount_point_to_dm_name unless mount_point.nil?
+ candidates += blk_device.udev_ids
+ candidates << blk_device.basename
+
+ candidates.map { |c| generate_auto_dm_table_name(c) }
+ end
+
+ # Generates an unused device mapper name for the encryption device based
on the given name
+ #
+ # @param name [String]
+ # @return [String]
+ def generate_auto_dm_table_name(name)
+ self.class.ensure_unused_dm_name(devicegraph, "cr_#{name}")
+ end
+
# Generates a base dm name from the mount point path
#
# @return [String, nil] nil if the encryption has no mount point.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-storage-ng-5.0.49/test/y2storage/encryption_test.rb
new/yast2-storage-ng-5.0.50/test/y2storage/encryption_test.rb
--- old/yast2-storage-ng-5.0.49/test/y2storage/encryption_test.rb
2026-06-22 16:42:43.000000000 +0200
+++ new/yast2-storage-ng-5.0.50/test/y2storage/encryption_test.rb
2026-08-13 08:55:35.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/env rspec
-# Copyright (c) [2018-2021] SUSE LLC
+# Copyright (c) [2018-2026] SUSE LLC
#
# All Rights Reserved.
#
@@ -132,6 +132,21 @@
include_examples "repeated dm name", "cr_disk-1122-part2"
end
+ context "and udev ids are too long" do
+ let(:udev_ids) do
+ [
+
"cr_nvme-nvme.1c5c-465341434e343332393130313043423356-534b2068796e69782050433731312"
\
+ "048465335313247444539583037334e-00000001-part2"
+ ]
+ end
+
+ it "generates an encryption name based on the underlying device
name" do
+ expect(subject.auto_dm_table_name).to eq("cr_sda2")
+ end
+
+ include_examples "repeated dm name", "cr_sda2"
+ end
+
context "and no udev ids are recognized for the underlying device" do
let(:udev_ids) { [] }