Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2019-04-22 12:24:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.5536 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Mon Apr 22 12:24:07 2019 rev:52 rq:695810 version:4.1.112 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2019-04-18 09:55:26.265304040 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.5536/libstorage-ng.changes 2019-04-22 12:24:08.868921631 +0200 @@ -1,0 +2,14 @@ +Thu Apr 18 16:02:17 UTC 2019 - [email protected] + +- Translated using Weblate (Indonesian) +- 4.1.112 + +-------------------------------------------------------------------- +Thu Apr 18 07:55:45 UTC 2019 - [email protected] + +- merge gh#openSUSE/libstorage-ng#638 +- parse devid in output of 'btrfs filesystem show' +- reuse predefined regex +- 4.1.111 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.1.110.tar.xz New: ---- libstorage-ng-4.1.112.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.tY2KLS/_old 2019-04-22 12:24:09.540922151 +0200 +++ /var/tmp/diff_new_pack.tY2KLS/_new 2019-04-22 12:24:09.544922154 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.1.110 +Version: 4.1.112 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.1.110.tar.xz -> libstorage-ng-4.1.112.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/VERSION new/libstorage-ng-4.1.112/VERSION --- old/libstorage-ng-4.1.110/VERSION 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/VERSION 2019-04-18 18:02:17.000000000 +0200 @@ -1 +1 @@ -4.1.110 +4.1.112 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/po/id.po new/libstorage-ng-4.1.112/po/id.po --- old/libstorage-ng-4.1.110/po/id.po 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/po/id.po 2019-04-18 18:02:17.000000000 +0200 @@ -10,10 +10,10 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-25 15:22+0100\n" -"PO-Revision-Date: 2019-01-21 18:29+0000\n" +"PO-Revision-Date: 2019-04-18 16:02+0000\n" "Last-Translator: Kukuh Syafaat <[email protected]>\n" -"Language-Team: Indonesian <https://l10n.opensuse.org/projects/libstorage/ng-" -"master/id/>\n" +"Language-Team: Indonesian <https://l10n.opensuse.org/projects/libstorage/" +"ng-master/id/>\n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -26,14 +26,14 @@ "are you serious?!" msgstr "" "\n" -"apakah kamu serius?!" +"apakah Anda serius?!" #. TRANSLATORS: appended after list of value to indicate that some #. values have been omitted #. %1$d is replaced by the number of elements omitted #, c-format msgid "%1$d more" -msgstr "" +msgstr "%1$d lebih" #. TRANSLATORS: #. %1$s is replaced with the device name (e.g. /dev/sdc1), @@ -48,14 +48,14 @@ #. %2$s is replaced by the number of elements omitted #, c-format msgid "%1$s and %2$d more" -msgstr "" +msgstr "%1$s dan %2$d lebih" #. TRANSLATORS: used to construct list of values #. %1$s is replaced by first value #. %2$s is replaced by second value -#, fuzzy, c-format +#, c-format msgid "%1$s and %2$s" -msgstr "%1$s (%2$s)" +msgstr "%1$s dan %2$s" #. TRANSLATORS: #. %1$s is replaced with the the bcache name (e.g. /dev/bcache0), @@ -68,9 +68,9 @@ #. TRANSLATORS: used to construct list of values #. %1$s is replaced by first value #. %2$s is replaced by second value -#, fuzzy, c-format +#, c-format msgid "%1$s, %2$s" -msgstr "%1$s (%2$s)" +msgstr "%1$s, %2$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/sda1) @@ -481,9 +481,9 @@ #. %3$s is replaced by size (e.g. 2 GiB), #. %4$s is replaced by one or more devices (e.g /dev/sda1 (1 GiB) and #. /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Create MD %1$s %2$s (%3$s) from %4$s" -msgstr "Buat %1$s %2$s (%3$s) dari %4$s" +msgstr "Buat MD %1$s %2$s (%3$s) dari %4$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/sda) @@ -876,9 +876,9 @@ #. %2$s is replaced by size (e.g. 2 GiB), #. %3$s is replaced by one or more devices (e.g /dev/sda1 (1 GiB) and #. /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Create volume group %1$s (%2$s) from %3$s" -msgstr "Buat grup volume %1$s (%2$s) dengan %3$s" +msgstr "Buat grup volume %1$s (%2$s) dari %3$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced with the volume group name (e.g. system), @@ -928,9 +928,9 @@ #. %3$s is replaced by size (e.g. 2 GiB), #. %4$s is replaced by one or more devices (e.g /dev/sda1 (1 GiB) and #. /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Creating MD %1$s %2$s (%3$s) from %4$s" -msgstr "Buat %1$s %2$s (%3$s) dari %4$s" +msgstr "Membuat %1$s %2$s (%3$s) dari %4$s" #. TRANSLATORS: displayed during action, #. %1$s is replaced by device name (e.g. /dev/sda) @@ -1034,9 +1034,9 @@ #. %2$s is replaced by size (e.g. 2 GiB), #. %3$s is replaced by one or more devices (e.g /dev/sda1 (1 GiB) and #. /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Creating volume group %1$s (%2$s) from %3$s" -msgstr "Membuat grup volume %1$s (%2$s)" +msgstr "Membuat grup volume %1$s (%2$s) dari %3$s" #. TRANSLATORS: name of object msgid "DASD" @@ -1181,9 +1181,9 @@ #. %1$s is replaced by file system name (e.g. ext4), #. %2$s is replaced by one or more device names (e.g /dev/sda1 (1 GiB) #. and /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Delete %1$s on %2$s" -msgstr "Hapus %1$s pada %2$s (%3$s)" +msgstr "Hapus %1$s pada %2$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/bcache0), @@ -1340,9 +1340,9 @@ #. %1$s is replaced by file system name (e.g. ext4), #. %2$s is replaced by one or more device names (e.g /dev/sda1 (1 GiB) #. and /dev/sdb2 (1 GiB)) -#, fuzzy, c-format +#, c-format msgid "Deleting %1$s on %2$s" -msgstr "Menghapus %1$s pada %2$s (%3$s)" +msgstr "Menghapus %1$s pada %2$s" #. TRANSLATORS: displayed during action, #. %1$s is replaced by device name (e.g. /dev/bcache0), @@ -1479,17 +1479,18 @@ #. %1$s is replaced by device name (e.g. /dev/sda1), #. %2$s is replaced by device name (e.g. /dev/bcache0), #. %3$s is replaced by size (e.g. 2 GiB) -#, fuzzy, c-format +#, c-format msgid "Detach Bcache cache set on %1$s from Bcache %2$s (%3$s)" -msgstr "Pasang cache Bcache yang ditetapkan pada %1$s ke Bcache %2$s (%3$s)" +msgstr "Lepaskan cache Bcache yang ditetapkan pada %1$s dari Bcache %2$s (%3$s)" #. TRANSLATORS: displayed during action, #. %1$s is replaced by device name (e.g. /dev/sda1), #. %2$s is replaced by device name (e.g. /dev/bcache0), #. %3$s is replaced by size (e.g. 2 GiB) -#, fuzzy, c-format +#, c-format msgid "Detaching Bcache cache set on %1$s from Bcache %2$s (%3$s)" -msgstr "Memasang cache Bcache yang ditetapkan pada %1$s ke Bcache %2$s (%3$s)" +msgstr "" +"Melepaskan cache Bcache yang ditetapkan pada %1$s dari Bcache %2$s (%3$s)" #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by a list of device names joined by newlines (e.g. @@ -1503,6 +1504,12 @@ "These logical volumes are ignored. Operations on the\n" "correponding volume groups may fail." msgstr "" +"Volume logical LVM yang terdeteksi dari jenis yang tidak didukung:\n" +"\n" +"%1$s\n" +"\n" +"Volume ligical ini diabaikan. Operasi pada\n" +"grup volume correponding mungkin gagal." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the device name (e.g. /dev/sda) @@ -1511,6 +1518,8 @@ "Detected a LUKS device next to a partition table on the\n" "device %1$s. The LUKS device will be ignored." msgstr "" +"Mendeteksi perangkat LUKS di sebelah tabel partisi pada menu\n" +"perangkat%1$s. Perangkat LUKS akan diabaikan." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the device name (e.g. /dev/sda) @@ -1519,6 +1528,8 @@ "Detected a LVM logical volume next to a partition table on the\n" "device %1$s. The LVM logical volume will be ignored." msgstr "" +"Terdeteksi volume logical LVM di sebelah tabel partisi pada\n" +"perangkat %1$s. Volume logical LVM akan diabaikan." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the device name (e.g. /dev/sda) @@ -1527,6 +1538,8 @@ "Detected a file system next to a partition table on the\n" "device %1$s. The file system will be ignored." msgstr "" +"Mendeteksi sistem berkas di sebelah tabel partisi pada menu\n" +"perangkat %1$s. Sistem berkas akan diabaikan." #. TRANSLATORS: name of partition type msgid "Diagnostics Partition" @@ -2169,14 +2182,12 @@ msgstr "Gagal memeriksa NFS" #. TRANSLATORS: progress message -#, fuzzy msgid "Probing additional attributes" -msgstr "Gagal memeriksa partisi" +msgstr "Menjajaki atribut tambahan" #. TRANSLATORS: error message -#, fuzzy msgid "Probing additional attributes failed" -msgstr "Gagal memeriksa partisi" +msgstr "Menjajaki atribut tambahan gagal" #. TRANSLATORS: progress message msgid "Probing bcache" @@ -2251,19 +2262,17 @@ msgstr "Gagal memeriksa partisi pada %s" #. TRANSLATORS: error message -#, fuzzy, c-format +#, c-format msgid "Probing stray block device %s failed" -msgstr "Gagal memeriksa Stray Block Device %s" +msgstr "Menjajaki stray block device %s gagal" #. TRANSLATORS: progress message -#, fuzzy msgid "Probing stray block devices" -msgstr "Memeriksa Stray Block Device" +msgstr "Menjajaki stray block devices" #. TRANSLATORS: error message -#, fuzzy msgid "Probing stray block devices failed" -msgstr "Gagal memeriksa Stray Block Device" +msgstr "Menjajaki stray block devices gagal" #. TRANSLATORS: displayed before action, #. %1$s is replaced by volume group name (e.g. system) @@ -2425,9 +2434,9 @@ #. %1$s is replaced by cache mode (e.g. writeback), #. %2$s is replaced by device name (e.g. /dev/bcache0), #. %3$s is replaced by size (e.g. 2 GiB) -#, fuzzy, c-format +#, c-format msgid "Set cache mode to %1$s for Bcache %2$s (%3$s)" -msgstr "Pasang cache Bcache yang ditetapkan pada %1$s ke Bcache %2$s (%3$s)" +msgstr "Atur mode cache ke %1$s untuk Bcache %2$s (%3$s)" #. TRANSLATORS: displayed before action, #. %1$s is replaced by subvolume path (e.g. var/log), @@ -2507,9 +2516,9 @@ #. %1$s is replaced by cache mode (e.g. writeback), #. %2$s is replaced by device name (e.g. /dev/bcache0), #. %3$s is replaced by size (e.g. 2 GiB) -#, fuzzy, c-format +#, c-format msgid "Setting cache mode to %1$s for Bcache %2$s (%3$s)" -msgstr "Memasang cache Bcache yang ditetapkan pada %1$s ke Bcache %2$s (%3$s)" +msgstr "Mengatur mode cache ke %1$s untuk Bcache %2$s (%3$s)" #. TRANSLATORS: displayed during action, #. %1$s is replaced by subvolume path (e.g. var/log), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/storage/Devices/BcacheCsetImpl.cc new/libstorage-ng-4.1.112/storage/Devices/BcacheCsetImpl.cc --- old/libstorage-ng-4.1.110/storage/Devices/BcacheCsetImpl.cc 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/storage/Devices/BcacheCsetImpl.cc 2019-04-18 18:02:17.000000000 +0200 @@ -102,8 +102,7 @@ bool BcacheCset::Impl::is_valid_uuid(const string& uuid) { - static regex uuid_regex("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}", - regex::extended); + static const regex uuid_regex(UUID_REGEX, regex::extended); return regex_match(uuid, uuid_regex); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/storage/Filesystems/BtrfsImpl.cc new/libstorage-ng-4.1.112/storage/Filesystems/BtrfsImpl.cc --- old/libstorage-ng-4.1.110/storage/Filesystems/BtrfsImpl.cc 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/storage/Filesystems/BtrfsImpl.cc 2019-04-18 18:02:17.000000000 +0200 @@ -387,8 +387,8 @@ vector<BlkDevice*> blk_devices; - for (const string& name : detected_btrfs.devices) - blk_devices.push_back(BlkDevice::find_by_any_name(system, name)); + for (const CmdBtrfsFilesystemShow::Device& device : detected_btrfs.devices) + blk_devices.push_back(BlkDevice::find_by_any_name(system, device.name)); BlkFilesystem* blk_filesystem = nullptr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/storage/SystemInfo/CmdBtrfs.cc new/libstorage-ng-4.1.112/storage/SystemInfo/CmdBtrfs.cc --- old/libstorage-ng-4.1.110/storage/SystemInfo/CmdBtrfs.cc 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/storage/SystemInfo/CmdBtrfs.cc 2019-04-18 18:02:17.000000000 +0200 @@ -69,6 +69,10 @@ void CmdBtrfsFilesystemShow::parse(const vector<string>& lines) { + static const regex uuid_regex("uuid: (" UUID_REGEX ")", regex::extended); + + smatch match; + vector<string>::const_iterator it = lines.begin(); while (it != lines.end()) @@ -81,7 +85,11 @@ y2mil( "uuid line:" << *it ); Entry entry; - entry.uuid = extractNthWord( 3, *it ); + + if (!regex_search(*it, match, uuid_regex)) + ST_THROW(Exception("did not find uuid")); + + entry.uuid = match[1]; y2mil("uuid:" << entry.uuid); ++it; @@ -92,9 +100,15 @@ while( it!=lines.end() && boost::contains( *it, "devid " ) ) { y2mil( "devs line:" << *it ); - string device = extractNthWord( 7, *it ); - if ( !boost::contains( device, "/dev" ) ) // Allow /sys/dev or /proc/devices - ST_THROW( ParseException( "Not a valid device name", device, "/dev/..." ) ); + + Device device; + + extractNthWord(1, *it) >> device.id; + + device.name = extractNthWord(7, *it); + if (!boost::contains(device.name, DEV_DIR "/")) // Allow /sys/dev or /proc/devices + ST_THROW( ParseException( "Not a valid device name", device.name, "/dev/..." ) ); + entry.devices.push_back( device ); ++it; } @@ -106,6 +120,7 @@ } y2mil("devices:" << entry.devices); + data.push_back(entry); } } @@ -118,7 +133,7 @@ operator<<(std::ostream& s, const CmdBtrfsFilesystemShow& cmd_btrfs_filesystem_show) { for (const CmdBtrfsFilesystemShow::Entry& entry : cmd_btrfs_filesystem_show) - s << entry; + s << entry << '\n'; return s; } @@ -127,9 +142,14 @@ std::ostream& operator<<(std::ostream& s, const CmdBtrfsFilesystemShow::Entry& entry) { - s << "uuid:" << entry.uuid << " devices:" << entry.devices << '\n'; + return s << "uuid:" << entry.uuid << " devices:" << entry.devices; + } - return s; + + std::ostream& + operator<<(std::ostream& s, const CmdBtrfsFilesystemShow::Device& device) + { + return s << "{ id:" << device.id << " name:" << device.name << " }"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/storage/SystemInfo/CmdBtrfs.h new/libstorage-ng-4.1.112/storage/SystemInfo/CmdBtrfs.h --- old/libstorage-ng-4.1.110/storage/SystemInfo/CmdBtrfs.h 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/storage/SystemInfo/CmdBtrfs.h 2019-04-18 18:02:17.000000000 +0200 @@ -58,14 +58,27 @@ CmdBtrfsFilesystemShow(); /** + * Device of a btrfs filesystem. + */ + struct Device + { + Device() : id(0), name() {} + + unsigned int id; + string name; + }; + + /** * Entry for one btrfs filesystem. Since btrfs includes a volume * manager (independent of LVM or the device mapper), this may be * multiple devices for a single btrfs filesystem. */ struct Entry { + Entry() : uuid(), devices() {} + string uuid; - vector<string> devices; + vector<Device> devices; }; typedef vector<Entry>::value_type value_type; @@ -76,6 +89,7 @@ friend std::ostream& operator<<(std::ostream& s, const CmdBtrfsFilesystemShow& cmd_btrfs_filesystem_show); friend std::ostream& operator<<(std::ostream& s, const Entry& entry); + friend std::ostream& operator<<(std::ostream& s, const Device& device); private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/storage/Utils/StorageDefines.h new/libstorage-ng-4.1.112/storage/Utils/StorageDefines.h --- old/libstorage-ng-4.1.110/storage/Utils/StorageDefines.h 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/storage/Utils/StorageDefines.h 2019-04-18 18:02:17.000000000 +0200 @@ -133,4 +133,7 @@ #define MKFS_UDF_BIN "/usr/sbin/mkfs.udf" +#define UUID_REGEX "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.1.110/testsuite/SystemInfo/btrfs-filesystem-show.cc new/libstorage-ng-4.1.112/testsuite/SystemInfo/btrfs-filesystem-show.cc --- old/libstorage-ng-4.1.110/testsuite/SystemInfo/btrfs-filesystem-show.cc 2019-04-17 12:43:28.000000000 +0200 +++ new/libstorage-ng-4.1.112/testsuite/SystemInfo/btrfs-filesystem-show.cc 2019-04-18 18:02:17.000000000 +0200 @@ -81,9 +81,9 @@ }; vector<string> output = { - "uuid:ea108250-d02c-41dd-b4d8-d4a707a5c649 devices:</dev/mapper/system-test>", - "uuid:d82229f2-f9e4-40fd-b15f-84e2d42e6d0d devices:</dev/mapper/system-testsuite>", - "uuid:653764e0-7ea2-4dbe-9fa1-866f3f7783c9 devices:</dev/mapper/system-btrfs>" + "uuid:ea108250-d02c-41dd-b4d8-d4a707a5c649 devices:<{ id:1 name:/dev/mapper/system-test }>", + "uuid:d82229f2-f9e4-40fd-b15f-84e2d42e6d0d devices:<{ id:1 name:/dev/mapper/system-testsuite }>", + "uuid:653764e0-7ea2-4dbe-9fa1-866f3f7783c9 devices:<{ id:1 name:/dev/mapper/system-btrfs }>" }; check(input, output); @@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(parse_missing) { vector<string> input = { - "Label: none uuid: b0749dbe-7de5-4719-9cb6-043dd5c70d00", + "Label: 'hello world' uuid: b0749dbe-7de5-4719-9cb6-043dd5c70d00", " Total devices 4 FS bytes used 256.00KiB", " devid 1 size 2.00GiB used 417.12MiB path /dev/sdb1", " devid 2 size 2.00GiB used 417.12MiB path /dev/sdc1", @@ -159,7 +159,7 @@ }; vector<string> output = { - "uuid:b0749dbe-7de5-4719-9cb6-043dd5c70d00 devices:</dev/sdb1 /dev/sdc1 /dev/sdd1>" + "uuid:b0749dbe-7de5-4719-9cb6-043dd5c70d00 devices:<{ id:1 name:/dev/sdb1 } { id:2 name:/dev/sdc1 } { id:3 name:/dev/sdd1 }>" }; check(input, output);
