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 2022-04-09 01:43:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Sat Apr  9 01:43:59 2022 rev:158 rq:967547 version:4.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2022-04-02 18:20:09.070537347 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1900/libstorage-ng.changes    
2022-04-09 01:44:10.498645901 +0200
@@ -1,0 +2,14 @@
+Thu Apr 7 16:15:26 UTC 2022 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#867
+- escape more special characters in fstab
+- extended documentation
+- coding style
+- 4.5.2
+
+--------------------------------------------------------------------
+Wed Apr 6 20:45:06 UTC 2022 - opensuse-packag...@opensuse.org
+
+- Translated using Weblate (Czech) (bsc#1149754)
+
+--------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.irjEpG/_old  2022-04-09 01:44:11.266636809 +0200
+++ /var/tmp/diff_new_pack.irjEpG/_new  2022-04-09 01:44:11.270636762 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.1.tar.xz -> libstorage-ng-4.5.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/VERSION 
new/libstorage-ng-4.5.2/VERSION
--- old/libstorage-ng-4.5.1/VERSION     2022-03-31 16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/VERSION     2022-04-07 18:15:26.000000000 +0200
@@ -1 +1 @@
-4.5.1
+4.5.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/po/cs.po 
new/libstorage-ng-4.5.2/po/cs.po
--- old/libstorage-ng-4.5.1/po/cs.po    2022-03-31 16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/po/cs.po    2022-04-07 18:15:26.000000000 +0200
@@ -13,16 +13,16 @@
 "Project-Id-Version: YaST (@memory@)\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2021-12-20 12:10+0100\n"
-"PO-Revision-Date: 2021-10-19 20:11+0000\n"
-"Last-Translator: Ale?? Kastner <al...@volny.cz>\n"
-"Language-Team: Czech <https://l10n.opensuse.org/projects/libstorage/ng-";
-"master/cs/>\n"
+"PO-Revision-Date: 2022-04-06 23:12+0000\n"
+"Last-Translator: Jan Pape?? <honyc...@centrum.cz>\n"
+"Language-Team: Czech <https://l10n.opensuse.org/projects/libstorage/";
+"ng-master/cs/>\n"
 "Language: cs\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.8.1\n"
+"X-Generator: Weblate 4.9.1\n"
 
 msgid ""
 "\n"
@@ -368,15 +368,15 @@
 #. %1$s is replaced by file system name (e.g. ext4),
 #. %2$s is replaced by one or more devices (e.g /dev/sda1 (1.00 GiB) and
 #. /dev/sdb2 (1.00 GiB)),
-#, fuzzy, c-format
+#, c-format
 msgid "Clear label of %1$s on %2$s"
-msgstr "Nastavit popisek z %1$s na %2$s na %3$s"
+msgstr "Vymazat popisek z %1$s na %2$s"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1),
-#, fuzzy, c-format
+#, c-format
 msgid "Clear label of partition %1$s"
-msgstr "Ru????m boot p????znak odd??lu %1$s"
+msgstr "Vymazat ??t??tek odd??lu %1$s"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1)
@@ -410,15 +410,15 @@
 #. %1$s is replaced by file system name (e.g. ext4),
 #. %2$s is replaced by one or more devices (e.g /dev/sda1 (1.00 GiB) and
 #. /dev/sdb2 (1.00 GiB)),
-#, fuzzy, c-format
+#, c-format
 msgid "Clearing label of %1$s on %2$s"
-msgstr "Nastavuji popisek z %1$s na %2$s na %3$s"
+msgstr "Maz??n?? popisku z %1$s na %2$s"
 
 #. TRANSLATORS: displayed during action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1),
-#, fuzzy, c-format
+#, c-format
 msgid "Clearing label of partition %1$s"
-msgstr "Ru????m zav??d??c?? (boot) p????znak odd??lu %1$s"
+msgstr "Maz??n?? ??t??tku na odd??lu %1$s"
 
 #. TRANSLATORS: displayed during action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1)
@@ -1678,35 +1678,35 @@
 #. %1$s is replaced by the filesystem type (e.g. ext4),
 #. %2$s is replaced by the partition table type (e.g. GPT),
 #. %3$s is replaced by the device name (e.g. /dev/sda)
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Detected a %1$s file system next to a partition table of type %2$s on the\n"
 "device %3$s. The file system will be ignored."
 msgstr ""
-"Rozpozn??n syst??m soubor?? vedle tabulky odd??l?? jednotky\n"
-"%1$s. Syst??m soubor?? bude ignorov??n."
+"Rozpozn??n syst??m soubor?? %1$s vedle tabulky odd??l?? jednotky typu %2$s\n"
+"na za????zen?? %3$s. Tento syst??m soubor?? bude ignorov??n."
 
 #. TRANSLATORS: Error message displayed during probing,
 #. %1$s is replaced by the partition table type (e.g. GPT),
 #. %2$s is replaced by the device name (e.g. /dev/sda)
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Detected a LUKS device next to a partition table of type %1$s on the\n"
 "device %2$s. The LUKS device will be ignored."
 msgstr ""
-"Rozpozn??na jednotka LUKS vedle tabulky odd??l?? jednotky\n"
-"%1$s. Jednotka LUKS bude ignorov??na."
+"Rozpozn??no za????zen?? LUKS vedle tabulky odd??l?? jednotky typu %1$s\n"
+"na za????zen?? %2$s. Za????zen?? LUKS bude ignorov??no."
 
 #. TRANSLATORS: Error message displayed during probing,
 #. %1$s is replaced by the partition table type (e.g. GPT),
 #. %2$s is replaced by the device name (e.g. /dev/sda)
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Detected a LVM logical volume next to a partition table of type %1$s on the\n"
 "device %2$s. The LVM logical volume will be ignored as good as possible."
 msgstr ""
-"Rozpozn??n logick?? svazek LVM vedle tabulky odd??l?? jednotky\n"
-"%1$s. Logick?? svazek LVM bude ignorov??n."
+"Rozpozn??n logick?? svazek LVM vedle tabulky odd??l?? jednotky typu %1$s\n"
+"na za????zen?? %2$s. Logick?? svazek LVM bude ignorov??n."
 
 #. TRANSLATORS: Error message displayed during probing,
 #. %1$s is replaced by the filesystem type (e.g. minix),
@@ -1716,6 +1716,8 @@
 "Detected an unsupported file system of type %1$s on the\n"
 "device %2$s."
 msgstr ""
+"Na za????zen?? %2$s byl zji??t??n nepodporovan?? souborov?? syst??m\n"
+"typu %1$s."
 
 #. TRANSLATORS: Error message displayed during probing,
 #. %1$s is replaced by the partition table type (e.g. BSD),
@@ -1725,6 +1727,8 @@
 "Detected an unsupported partition table of type %1$s on the\n"
 "device %2$s."
 msgstr ""
+"Na za????zen?? %2$s byla zji??t??na nepodporovan?? tabulka odd??l??\n"
+"typu %1$s."
 
 #. TRANSLATORS: name of partition type
 msgid "Diagnostics Partition"
@@ -2816,14 +2820,14 @@
 #. %3$s is replaced by label (e.g. ROOT)
 #, c-format
 msgid "Set label of %1$s on %2$s to %3$s"
-msgstr "Nastavit popisek z %1$s na %2$s na %3$s"
+msgstr "Nastavit popisek %1$s u %2$s na hodnotu %3$s"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1),
 #. %2$s is replaced by partition label (e.g. ROOT),
-#, fuzzy, c-format
+#, c-format
 msgid "Set label of partition %1$s to %2$s"
-msgstr "Nastavit id odd??lu %1$s na %2$s"
+msgstr "Nastavit ??t??tek odd??lu %1$s na %2$s"
 
 #. TRANSLATORS: displayed before action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1)
@@ -2876,7 +2880,7 @@
 #. %3$s is replaced by UUID (e.g. 3cfa63b5-4d29-43e6-8658-57b74f68fd7f)
 #, c-format
 msgid "Setting UUID of %1$s on %2$s to %3$s"
-msgstr "Nastavuji UUID z %1$s na %2$s na %3$s"
+msgstr "Nastavuji UUID %1$s u %2$s na %3$s"
 
 #. TRANSLATORS: displayed during action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1)
@@ -2930,14 +2934,14 @@
 #. %3$s is replaced by label (e.g. ROOT)
 #, c-format
 msgid "Setting label of %1$s on %2$s to %3$s"
-msgstr "Nastavuji popisek z %1$s na %2$s na %3$s"
+msgstr "Nastavov??n?? popisku %1$s u %2$s na %3$s"
 
 #. TRANSLATORS: displayed during action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1),
 #. %2$s is replaced by partition label (e.g. ROOT),
-#, fuzzy, c-format
+#, c-format
 msgid "Setting label of partition %1$s to %2$s"
-msgstr "Nastavuji id odd??lu %1$s na %2$s"
+msgstr "Nastavuji ??t??tek odd??lu %1$s na %2$s"
 
 #. TRANSLATORS: displayed during action,
 #. %1$s is replaced by partition name (e.g. /dev/sda1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/Devices/BlkDeviceImpl.cc 
new/libstorage-ng-4.5.2/storage/Devices/BlkDeviceImpl.cc
--- old/libstorage-ng-4.5.1/storage/Devices/BlkDeviceImpl.cc    2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Devices/BlkDeviceImpl.cc    2022-04-07 
18:15:26.000000000 +0200
@@ -714,8 +714,8 @@
     Encryption*
     BlkDevice::Impl::create_encryption(const string& dm_name, EncryptionType 
type)
     {
-       map<EncryptionType, encryption_create_fnc>::const_iterator it = 
encryption_create_fnc_registry.find(type);
-       if (it == encryption_create_fnc_registry.end())
+       map<EncryptionType, encryption_create_fnc>::const_iterator it = 
encryption_create_registry.find(type);
+       if (it == encryption_create_registry.end())
        {
            ST_THROW(Exception("invalid encryption type"));
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/Devices/LvmVg.h 
new/libstorage-ng-4.5.2/storage/Devices/LvmVg.h
--- old/libstorage-ng-4.5.1/storage/Devices/LvmVg.h     2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Devices/LvmVg.h     2022-04-07 
18:15:26.000000000 +0200
@@ -89,10 +89,14 @@
         */
        static bool is_valid_vg_name(const std::string& vg_name);
 
+       /**
+        * Get the region of the volume group. The start of the region is 
always 0, the
+        * length is the number of extents and the block size in the extent 
size.
+        */
        const Region& get_region() const;
 
        /**
-        * Returns the size of the volume group.
+        * Returns the size of the volume group in bytes.
         */
        unsigned long long get_size() const;
 
@@ -125,7 +129,7 @@
        void set_extent_size(unsigned long long extent_size);
 
        /**
-        * Calculates the number of extents in the volume group.
+        * Returns the number of extents in the volume group.
         */
        unsigned long long number_of_extents() const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/EtcFstab.cc 
new/libstorage-ng-4.5.2/storage/EtcFstab.cc
--- old/libstorage-ng-4.5.1/storage/EtcFstab.cc 2022-03-31 16:28:54.000000000 
+0200
+++ new/libstorage-ng-4.5.2/storage/EtcFstab.cc 2022-04-07 18:15:26.000000000 
+0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2004-2015] Novell, Inc.
- * Copyright (c) [2017-2021] SUSE LLC
+ * Copyright (c) [2017-2022] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -551,15 +551,38 @@
     }
 
 
-    string EtcFstab::fstab_encode( const string & unencoded )
+    string
+    EtcFstab::fstab_encode(const string& unencoded)
     {
-       return boost::replace_all_copy( unencoded, " ", "\\040" );
+       string tmp = unencoded;
+
+       // see fstab(5) and getmntent(3)
+
+       boost::replace_all(tmp, "\\", "\\\\");
+
+       boost::replace_all(tmp, "\t", "\\011");
+       boost::replace_all(tmp, "\n", "\\012");
+       boost::replace_all(tmp, " ", "\\040");
+
+       return tmp;
     }
 
 
-    string EtcFstab::fstab_decode( const string & encoded )
+    string
+    EtcFstab::fstab_decode(const string& encoded)
     {
-       return boost::replace_all_copy( encoded, "\\040", " " );
+       string tmp = encoded;
+
+       // see fstab(5) and getmntent(3)
+
+       boost::replace_all(tmp, "\\011", "\t");
+       boost::replace_all(tmp, "\\012", "\n");
+       boost::replace_all(tmp, "\\040", " ");
+       boost::replace_all(tmp, "\\123", "\\");
+
+       boost::replace_all(tmp, "\\\\", "\\");
+
+       return tmp;
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/Registries.cc 
new/libstorage-ng-4.5.2/storage/Registries.cc
--- old/libstorage-ng-4.5.1/storage/Registries.cc       2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Registries.cc       2022-04-07 
18:15:26.000000000 +0200
@@ -152,7 +152,7 @@
     };
 
 
-    const map<EncryptionType, encryption_create_fnc> 
encryption_create_fnc_registry = {
+    const map<EncryptionType, encryption_create_fnc> 
encryption_create_registry = {
        { EncryptionType::PLAIN, &PlainEncryption::create },
        { EncryptionType::LUKS1, &Luks::create },
        { EncryptionType::LUKS2, &Luks::create }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/Registries.h 
new/libstorage-ng-4.5.2/storage/Registries.h
--- old/libstorage-ng-4.5.1/storage/Registries.h        2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Registries.h        2022-04-07 
18:15:26.000000000 +0200
@@ -69,7 +69,7 @@
      * Map with encryption type of all non-abstract encryptions and 
corresponding create
      * function.
      */
-    extern const map<EncryptionType, encryption_create_fnc> 
encryption_create_fnc_registry;
+    extern const map<EncryptionType, encryption_create_fnc> 
encryption_create_registry;
 
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.1/storage/Utils/CommentedConfigFile.h 
new/libstorage-ng-4.5.2/storage/Utils/CommentedConfigFile.h
--- old/libstorage-ng-4.5.1/storage/Utils/CommentedConfigFile.h 2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Utils/CommentedConfigFile.h 2022-04-07 
18:15:26.000000000 +0200
@@ -228,7 +228,7 @@
        string     line_comment;   // at the end of the line
        string     content;
 
-       CommentedConfigFile * parent;
+       CommentedConfigFile* parent = nullptr;
     };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/storage/Utils/JsonFile.h 
new/libstorage-ng-4.5.2/storage/Utils/JsonFile.h
--- old/libstorage-ng-4.5.1/storage/Utils/JsonFile.h    2022-03-31 
16:28:54.000000000 +0200
+++ new/libstorage-ng-4.5.2/storage/Utils/JsonFile.h    2022-04-07 
18:15:26.000000000 +0200
@@ -35,6 +35,13 @@
     using namespace std;
 
 
+    /*
+     * The user might expect more use of const here but in the end it does not 
work out
+     * since json_object_get_string does not take a const (likely due to 
reference
+     * counting).
+     */
+
+
     class JsonFile : private boost::noncopyable
     {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.1/testsuite/fstab.cc 
new/libstorage-ng-4.5.2/testsuite/fstab.cc
--- old/libstorage-ng-4.5.1/testsuite/fstab.cc  2022-03-31 16:28:54.000000000 
+0200
+++ new/libstorage-ng-4.5.2/testsuite/fstab.cc  2022-04-07 18:15:26.000000000 
+0200
@@ -430,3 +430,30 @@
     for ( size_t i=0; i < output.size(); ++i )
         BOOST_CHECK_EQUAL( output[i], initial[i] );
 }
+
+
+BOOST_AUTO_TEST_CASE(escape_and_unescape)
+{
+    // input needs to be formatted exactly like the expected output
+
+    string_vec input = {
+        "LABEL=a\\040b  /test\\0111  ext4  defaults  0  0",
+        "LABEL=c\\012d  /test\\\\2    ext4  defaults  0  0"
+    };
+
+    EtcFstab fstab;
+    fstab.parse(input);
+
+    BOOST_CHECK_EQUAL(fstab.get_entry_count(), 2);
+
+    BOOST_CHECK_EQUAL(fstab.get_entry(0)->get_spec(), "LABEL=a b");
+    BOOST_CHECK_EQUAL(fstab.get_entry(0)->get_mount_point(), "/test\t1");
+
+    BOOST_CHECK_EQUAL(fstab.get_entry(1)->get_spec(), "LABEL=c\nd");
+    BOOST_CHECK_EQUAL(fstab.get_entry(1)->get_mount_point(), "/test\\2");
+
+    vector<string> output = fstab.format_lines();
+
+    for (int i = 0; i < fstab.get_entry_count(); ++i)
+        BOOST_CHECK_EQUAL(output[i], input[i]);
+}

Reply via email to