Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2023-03-31 21:15:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Fri Mar 31 21:15:14 2023 rev:211 rq:1075587 version:4.5.91

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2023-03-29 23:26:25.175236342 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.31432/libstorage-ng.changes   
2023-03-31 21:15:16.958320417 +0200
@@ -1,0 +2,20 @@
+Thu Mar 30 15:53:17 UTC 2023 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#922
+- add PCIe as disk transport
+- 4.5.91
+
+--------------------------------------------------------------------
+Thu Mar 30 09:49:34 UTC 2023 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#921
+- fixed setting sysfs-name for partitions on nvme disks
+- 4.5.90
+
+--------------------------------------------------------------------
+Thu Mar 30 04:56:07 UTC 2023 - aschn...@suse.com
+
+- Translated using Weblate (Georgian) (bsc#1149754)
+- 4.5.89
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.5.88.tar.xz

New:
----
  libstorage-ng-4.5.91.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.0h2Ukz/_old  2023-03-31 21:15:17.574322614 +0200
+++ /var/tmp/diff_new_pack.0h2Ukz/_new  2023-03-31 21:15:17.578322628 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.88
+Version:        4.5.91
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.88.tar.xz -> libstorage-ng-4.5.91.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/LIBVERSION 
new/libstorage-ng-4.5.91/LIBVERSION
--- old/libstorage-ng-4.5.88/LIBVERSION 2023-03-27 00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/LIBVERSION 2023-03-30 17:53:17.000000000 +0200
@@ -1 +1 @@
-1.84.2
+1.85.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/VERSION 
new/libstorage-ng-4.5.91/VERSION
--- old/libstorage-ng-4.5.88/VERSION    2023-03-27 00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/VERSION    2023-03-30 17:53:17.000000000 +0200
@@ -1 +1 @@
-4.5.88
+4.5.91
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/po/ka.po 
new/libstorage-ng-4.5.91/po/ka.po
--- old/libstorage-ng-4.5.88/po/ka.po   2023-03-27 00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/po/ka.po   2023-03-30 17:53:17.000000000 +0200
@@ -8,10 +8,10 @@
 "Project-Id-Version: YaST (@memory@)\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2023-03-09 09:55+0100\n"
-"PO-Revision-Date: 2023-02-04 20:14+0000\n"
+"PO-Revision-Date: 2023-03-30 07:14+0000\n"
 "Last-Translator: Temuri Doghonadze <temuri.doghona...@gmail.com>\n"
-"Language-Team: Georgian <https://l10n.opensuse.org/projects/libstorage/ng-";
-"master/ka/>\n"
+"Language-Team: Georgian <https://l10n.opensuse.org/projects/libstorage/";
+"ng-master/ka/>\n"
 "Language: ka\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -79,17 +79,17 @@
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by the device name (e.g. /dev/loop0),
 #. %2$s is replaced by the size (e.g. 20.00 GiB)
-#, fuzzy, c-format
+#, c-format
 msgid "Activate hard disk %1$s (%2$s)"
-msgstr "%1 დანაყოფის შემოწმება"
+msgstr "%1$s (%2$s) დისკის აქტივაცია"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by logical volume name (e.g. root),
 #. %2$s is replaced by size (e.g. 2.00 GiB),
 #. %3$s is replaced by volume group name (e.g. system)
-#, fuzzy, c-format
+#, c-format
 msgid "Activate logical volume %1$s (%2$s) on volume group %3$s"
-msgstr "%1 დანაყოფის შემოწმება"
+msgstr "ლოგიკური ტომის %1$s (%2$s) 
აქტივაცია ტომების ჯგუფზე %3$s"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by logical volume name (e.g. root),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/storage/Devices/Disk.h 
new/libstorage-ng-4.5.91/storage/Devices/Disk.h
--- old/libstorage-ng-4.5.88/storage/Devices/Disk.h     2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/Devices/Disk.h     2023-03-30 
17:53:17.000000000 +0200
@@ -35,7 +35,7 @@
      * Data Transport Layer
      */
     enum class Transport {
-       UNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE
+       UNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE, PCIE
     };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/storage/Devices/DiskImpl.cc 
new/libstorage-ng-4.5.91/storage/Devices/DiskImpl.cc
--- old/libstorage-ng-4.5.88/storage/Devices/DiskImpl.cc        2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/Devices/DiskImpl.cc        2023-03-30 
17:53:17.000000000 +0200
@@ -21,7 +21,7 @@
  */
 
 
-#include <ctype.h>
+#include <cctype>
 #include <boost/algorithm/string.hpp>
 
 #include "storage/Devices/DiskImpl.h"
@@ -54,7 +54,7 @@
 
 
     const vector<string> EnumTraits<Transport>::names({
-       "UNKNOWN", "SBP", "ATA", "FC", "iSCSI", "SAS", "SATA", "SPI", "USB", 
"FCoE"
+       "UNKNOWN", "SBP", "ATA", "FC", "iSCSI", "SAS", "SATA", "SPI", "USB", 
"FCoE", "PCIe"
     });
 
 
@@ -211,7 +211,7 @@
        dax = dax_file.get<bool>();
 
        Lsscsi::Entry entry;
-       if (system_info.getLsscsi().getEntry(get_name(), entry))
+       if (system_info.getLsscsi().get_entry(get_name(), entry))
            transport = entry.transport;
 
        const File& zoned_file = get_sysfs_file(system_info, "queue/zoned");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.88/storage/Devices/PartitionImpl.cc 
new/libstorage-ng-4.5.91/storage/Devices/PartitionImpl.cc
--- old/libstorage-ng-4.5.88/storage/Devices/PartitionImpl.cc   2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/Devices/PartitionImpl.cc   2023-03-30 
17:53:17.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2022] SUSE LLC
+ * Copyright (c) [2016-2023] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -21,6 +21,7 @@
  */
 
 
+#include <cctype>
 #include <boost/algorithm/string.hpp>
 
 #include "storage/Utils/AppUtil.h"
@@ -630,11 +631,17 @@
     {
        const Partitionable* partitionable = get_partitionable();
 
-       if ((!partitionable->get_sysfs_name().empty() && 
!partitionable->get_sysfs_path().empty()) &&
-           partitionable->get_dm_table_name().empty())
+       const string& sysfs_name = partitionable->get_sysfs_name();
+       const string& sysfs_path = partitionable->get_sysfs_path();
+
+       if ((!sysfs_name.empty() && !sysfs_path.empty()) && 
partitionable->get_dm_table_name().empty())
        {
-           set_sysfs_name(partitionable->get_sysfs_name() + 
to_string(get_number()));
-           set_sysfs_path(partitionable->get_sysfs_path() + "/" + 
get_sysfs_name());
+           if (isdigit(sysfs_name.back()))
+               set_sysfs_name(sysfs_name + "p" + to_string(get_number()));
+           else
+               set_sysfs_name(sysfs_name + to_string(get_number()));
+
+           set_sysfs_path(sysfs_path + "/" + get_sysfs_name());
        }
        else
        {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.88/storage/Devices/PartitionableImpl.cc 
new/libstorage-ng-4.5.91/storage/Devices/PartitionableImpl.cc
--- old/libstorage-ng-4.5.88/storage/Devices/PartitionableImpl.cc       
2023-03-27 00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/Devices/PartitionableImpl.cc       
2023-03-30 17:53:17.000000000 +0200
@@ -21,6 +21,7 @@
  */
 
 
+#include <cctype>
 #include <boost/algorithm/string.hpp>
 
 #include "storage/Devices/PartitionableImpl.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/storage/SystemInfo/CmdLsscsi.cc 
new/libstorage-ng-4.5.91/storage/SystemInfo/CmdLsscsi.cc
--- old/libstorage-ng-4.5.88/storage/SystemInfo/CmdLsscsi.cc    2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/SystemInfo/CmdLsscsi.cc    2023-03-30 
17:53:17.000000000 +0200
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) [2010-2020] Novell, Inc.
+ * Copyright (c) 2023 SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -48,16 +49,19 @@
     {
        data.clear();
 
-       for (vector<string>::const_iterator it = lines.begin(); it != 
lines.end(); ++it)
+       for (const string& line : lines)
        {
-           string line = boost::replace_all_copy(*it, " usb: ", " usb:");
-
            string type = extractNthWord(1, line);
            if (type != "disk")
                continue;
 
-           string transport = extractNthWord(2, line);
-           string device = extractNthWord(3, line);
+           string tmp = line;
+
+           boost::replace_all(tmp, " usb: ", " usb:");
+           boost::replace_all(tmp, " pcie 0x", " pcie:0x");
+
+           string transport = extractNthWord(2, tmp);
+           string device = extractNthWord(3, tmp);
            if (boost::starts_with(transport, "/dev/"))
            {
                device = transport;
@@ -87,6 +91,8 @@
                entry.transport = Transport::SPI;
            else if (boost::starts_with(transport, "usb:"))
                entry.transport = Transport::USB;
+           else if (boost::starts_with(transport, "pcie:"))
+               entry.transport = Transport::PCIE;
 
            data[device] = entry;
        }
@@ -96,13 +102,13 @@
 
 
     bool
-    Lsscsi::getEntry(const string& device, Entry& entry) const
+    Lsscsi::get_entry(const string& device, Entry& entry) const
     {
-       const_iterator i = data.find(device);
-       if (i == data.end())
+       const_iterator it = data.find(device);
+       if (it == data.end())
            return false;
 
-       entry = i->second;
+       entry = it->second;
        return true;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/storage/SystemInfo/CmdLsscsi.h 
new/libstorage-ng-4.5.91/storage/SystemInfo/CmdLsscsi.h
--- old/libstorage-ng-4.5.88/storage/SystemInfo/CmdLsscsi.h     2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/storage/SystemInfo/CmdLsscsi.h     2023-03-30 
17:53:17.000000000 +0200
@@ -52,7 +52,7 @@
        friend std::ostream& operator<<(std::ostream& s, const Lsscsi& lsscsi);
        friend std::ostream& operator<<(std::ostream& s, const Entry& entry);
 
-       bool getEntry(const string& device, Entry& entry) const;
+       bool get_entry(const string& device, Entry& entry) const;
 
     private:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.88/testsuite/SystemInfo/lsscsi.cc 
new/libstorage-ng-4.5.91/testsuite/SystemInfo/lsscsi.cc
--- old/libstorage-ng-4.5.88/testsuite/SystemInfo/lsscsi.cc     2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/testsuite/SystemInfo/lsscsi.cc     2023-03-30 
17:53:17.000000000 +0200
@@ -110,3 +110,17 @@
 
     check(input, output);
 }
+
+
+BOOST_AUTO_TEST_CASE(parse6)
+{
+    vector<string> input = {
+       "[N:0:0:1]    disk    pcie 0x1d4c:0x03e2              /dev/nvme0n1"
+    };
+
+    vector<string> output = {
+       "data[/dev/nvme0n1] -> transport:PCIe"
+    };
+
+    check(input, output);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.88/testsuite/partitions/set-number.cc 
new/libstorage-ng-4.5.91/testsuite/partitions/set-number.cc
--- old/libstorage-ng-4.5.88/testsuite/partitions/set-number.cc 2023-03-27 
00:14:42.000000000 +0200
+++ new/libstorage-ng-4.5.91/testsuite/partitions/set-number.cc 2023-03-30 
17:53:17.000000000 +0200
@@ -7,11 +7,13 @@
 
 #include "storage/Devices/DiskImpl.h"
 #include "storage/Devices/Msdos.h"
+#include "storage/Devices/Gpt.h"
 #include "storage/Devices/PartitionImpl.h"
 #include "storage/Devicegraph.h"
 #include "storage/Storage.h"
 #include "storage/Environment.h"
 #include "storage/Utils/Region.h"
+#include "storage/Utils/HumanString.h"
 
 
 using namespace std;
@@ -47,9 +49,9 @@
     BOOST_REQUIRE_EQUAL(partitions.size(), 2);
 
     BOOST_CHECK_EQUAL(partitions[1]->get_name(), "/dev/sda6");
+    BOOST_CHECK_EQUAL(partitions[1]->get_number(), 6);
 
     BOOST_CHECK_EQUAL(partitions[1]->get_sysfs_name(), "sda6");
-
     BOOST_CHECK_EQUAL(partitions[1]->get_sysfs_path(), 
"/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda6");
 
     BOOST_REQUIRE_EQUAL(partitions[1]->get_udev_paths().size(), 1);
@@ -59,3 +61,49 @@
     BOOST_CHECK_EQUAL(partitions[1]->get_udev_ids()[0], 
"ata-WDC_WD10EADS-00M2B0_WD-WCAV52321683-part6");
     BOOST_CHECK_EQUAL(partitions[1]->get_udev_ids()[1], 
"scsi-350014ee203733bb5-part6");
 }
+
+
+BOOST_AUTO_TEST_CASE(test2)
+{
+    Environment environment(true, ProbeMode::NONE, TargetMode::DIRECT);
+
+    Storage storage(environment);
+
+    Devicegraph* staging = storage.get_staging();
+
+    Disk* nvme0n1 = Disk::create(staging, "/dev/nvme0n1");
+    nvme0n1->set_size(16 * GiB);
+    nvme0n1->get_impl().set_sysfs_name("nvme0n1");
+    
nvme0n1->get_impl().set_sysfs_path("/devices/pci0000:00/0000:00:1d.0/0000:3c:00.0/nvme/nvme0/nvme0n1");
+    nvme0n1->get_impl().set_udev_paths({ "pci-0000:3c:00.0-nvme-1" });
+    nvme0n1->get_impl().set_udev_ids({ "nvme-eui.008738c571d83492" });
+
+    Gpt* gpt = to_gpt(nvme0n1->create_partition_table(PtType::GPT));
+    Partition* partition = gpt->create_partition("/dev/nvme0n1p1", 
Region(2048, 1048576, 512), PartitionType::PRIMARY);
+
+    BOOST_CHECK_EQUAL(partition->get_name(), "/dev/nvme0n1p1");
+    BOOST_CHECK_EQUAL(partition->get_number(), 1);
+
+    BOOST_CHECK_EQUAL(partition->get_sysfs_name(), "nvme0n1p1");
+    BOOST_CHECK_EQUAL(partition->get_sysfs_path(), 
"/devices/pci0000:00/0000:00:1d.0/0000:3c:00.0/nvme/nvme0/nvme0n1/nvme0n1p1");
+
+    BOOST_REQUIRE_EQUAL(partition->get_udev_paths().size(), 1);
+    BOOST_CHECK_EQUAL(partition->get_udev_paths()[0], 
"pci-0000:3c:00.0-nvme-1-part1");
+
+    BOOST_REQUIRE_EQUAL(partition->get_udev_ids().size(), 1);
+    BOOST_CHECK_EQUAL(partition->get_udev_ids()[0], 
"nvme-eui.008738c571d83492-part1");
+
+    partition->get_impl().set_number(2);
+
+    BOOST_CHECK_EQUAL(partition->get_name(), "/dev/nvme0n1p2");
+    BOOST_CHECK_EQUAL(partition->get_number(), 2);
+
+    BOOST_CHECK_EQUAL(partition->get_sysfs_name(), "nvme0n1p2");
+    BOOST_CHECK_EQUAL(partition->get_sysfs_path(), 
"/devices/pci0000:00/0000:00:1d.0/0000:3c:00.0/nvme/nvme0/nvme0n1/nvme0n1p2");
+
+    BOOST_REQUIRE_EQUAL(partition->get_udev_paths().size(), 1);
+    BOOST_CHECK_EQUAL(partition->get_udev_paths()[0], 
"pci-0000:3c:00.0-nvme-1-part2");
+
+    BOOST_REQUIRE_EQUAL(partition->get_udev_ids().size(), 1);
+    BOOST_CHECK_EQUAL(partition->get_udev_ids()[0], 
"nvme-eui.008738c571d83492-part2");
+}

Reply via email to