Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package barrel for openSUSE:Factory checked 
in at 2022-05-28 22:15:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/barrel (Old)
 and      /work/SRC/openSUSE:Factory/.barrel.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "barrel"

Sat May 28 22:15:05 2022 rev:9 rq:979502 version:0.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/barrel/barrel.changes    2022-05-10 
15:12:59.127649839 +0200
+++ /work/SRC/openSUSE:Factory/.barrel.new.2254/barrel.changes  2022-05-28 
22:15:09.656820350 +0200
@@ -1,0 +2,6 @@
+Fri May 27 08:33:33 CEST 2022 - aschn...@suse.com
+
+- support activation of LUKS and BitLocker
+- version 0.1.4
+
+-------------------------------------------------------------------

Old:
----
  barrel-0.1.3.tar.xz

New:
----
  barrel-0.1.4.tar.xz

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

Other differences:
------------------
++++++ barrel.spec ++++++
--- /var/tmp/diff_new_pack.H65PSK/_old  2022-05-28 22:15:10.188821413 +0200
+++ /var/tmp/diff_new_pack.H65PSK/_new  2022-05-28 22:15:10.192821421 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           barrel
-Version:        0.1.3
+Version:        0.1.4
 Release:        0
 Summary:        Tool for storage management
 License:        GPL-2.0-only
@@ -25,12 +25,12 @@
 URL:            https://github.com/openSUSE/barrel
 Source:         barrel-%{version}.tar.xz
 BuildRequires:  fdupes
-BuildRequires:  libstorage-ng-devel >= 4.4.76
+BuildRequires:  libstorage-ng-devel >= 4.5.12
 BuildRequires:  libtool
 BuildRequires:  libxslt
 BuildRequires:  readline-devel
 
-Requires:       libstorage-ng1 >= 4.5.10
+Requires:       libstorage-ng1 >= 4.5.12
 Recommends:     %{name}-lang
 Recommends:     logrotate
 %if 0%{?fedora_version}

++++++ barrel-0.1.3.tar.xz -> barrel-0.1.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/VERSION new/barrel-0.1.4/VERSION
--- old/barrel-0.1.3/VERSION    2022-05-09 10:53:14.000000000 +0200
+++ new/barrel-0.1.4/VERSION    2022-05-27 08:47:25.000000000 +0200
@@ -1 +1 @@
-0.1.3
+0.1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/barrel/Utils/Prompt.cc 
new/barrel-0.1.4/barrel/Utils/Prompt.cc
--- old/barrel-0.1.3/barrel/Utils/Prompt.cc     2022-01-11 10:37:02.000000000 
+0100
+++ new/barrel-0.1.4/barrel/Utils/Prompt.cc     2022-05-27 08:47:25.000000000 
+0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 SUSE LLC
+ * Copyright (c) [2021-2022] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -56,7 +56,7 @@
 
 
     string
-    prompt_password()
+    prompt_password(bool verify)
     {
        if (mockup)
            return "mockup";
@@ -79,18 +79,24 @@
                password1.push_back(c);
            cout << '\n';
 
-           cout << _("Verify password:") << " " << flush;
            string password2;
-           while ((c = getchar())!= '\n' && c != EOF)
-               password2.push_back(c);
-           cout << '\n';
+           if (verify)
+           {
+               cout << _("Verify password:") << " " << flush;
+               while ((c = getchar())!= '\n' && c != EOF)
+                   password2.push_back(c);
+               cout << '\n';
+           }
 
            tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
 
-           if (password1 == password2)
-               return password1;
+           if (verify && password1 != password2)
+           {
+               cout << _("Passwords do not match.") << '\n';
+               continue;
+           }
 
-           cout << _("Passwords do not match.") << '\n';
+           return password1;
        }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/barrel/Utils/Prompt.h 
new/barrel-0.1.4/barrel/Utils/Prompt.h
--- old/barrel-0.1.3/barrel/Utils/Prompt.h      2022-01-11 10:37:02.000000000 
+0100
+++ new/barrel-0.1.4/barrel/Utils/Prompt.h      2022-05-27 08:47:25.000000000 
+0200
@@ -35,7 +35,7 @@
 
     bool prompt(const string& message);
 
-    string prompt_password();
+    string prompt_password(bool verify);
 
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/barrel/create-encryption.cc 
new/barrel-0.1.4/barrel/create-encryption.cc
--- old/barrel-0.1.3/barrel/create-encryption.cc        2022-01-11 
10:37:02.000000000 +0100
+++ new/barrel-0.1.4/barrel/create-encryption.cc        2022-05-27 
08:47:25.000000000 +0200
@@ -278,7 +278,7 @@
            throw runtime_error(sformat(_("block device '%s' cannot be used as 
a regular block device"),
                                        blk_device->get_name().c_str()));
 
-       string password = prompt_password();
+       string password = prompt_password(true);
 
        Encryption* encryption = blk_device->create_encryption(dm_name, type);
        encryption->set_password(password);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/barrel/handle.cc 
new/barrel-0.1.4/barrel/handle.cc
--- old/barrel-0.1.3/barrel/handle.cc   2022-01-11 10:37:02.000000000 +0100
+++ new/barrel-0.1.4/barrel/handle.cc   2022-05-27 08:47:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 SUSE LLC
+ * Copyright (c) [2021-2022] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -134,7 +134,7 @@
     }
 
 
-    class MyActivateCallbacks : public ActivateCallbacksLuks
+    class MyActivateCallbacks : public ActivateCallbacksV3
     {
     public:
 
@@ -143,15 +143,47 @@
        {
        }
 
+       virtual void begin() const override
+       {
+           if (global_options.verbose || global_options.quiet)
+               return;
+
+           cout << _("Activating...") << flush;
+           beginning_of_line = false;
+       }
+
+       virtual void end() const override
+       {
+           if (global_options.verbose || global_options.quiet)
+               return;
+
+           if (!beginning_of_line)
+               cout << " ";
+
+           cout << _("done") << endl;
+           beginning_of_line = true;
+       }
+
        virtual void message(const string& message) const override
        {
-           if (global_options.verbose)
-               cout << message << endl;
+           if (!global_options.verbose)
+               return;
+
+           if (!beginning_of_line)
+               cout << '\n';
+           beginning_of_line = true;
+
+           cout << message << endl;
        }
 
        virtual bool error(const string& message, const string& what) const 
override
        {
+           if (!beginning_of_line)
+               cout << '\n';
+           beginning_of_line = true;
+
            cerr << _("error:") << ' ' << message << endl;
+
            return false;
        }
 
@@ -162,18 +194,74 @@
 
        virtual pair<bool, string> luks(const string& uuid, int attempt) const 
override
        {
-           return make_pair(false, "");
+           return make_pair(false, "");        // unused
        }
 
-       virtual pair<bool, string> luks(const LuksInfo& info, int attempt) 
const override
+       virtual pair<bool, string> luks(const LuksInfo& luks_info, int attempt) 
const override
        {
-           return make_pair(false, "");
+           string message;
+
+           if (luks_info.is_dm_table_name_generated())
+           {
+               message = sformat(_("Activate LUKS on %1$s (%2$s) with UUID 
%3$s..."),
+                                 luks_info.get_device_name().c_str(),
+                                 format_size(luks_info.get_size(), 
false).c_str(),
+                                 luks_info.get_uuid().c_str());
+           }
+           else
+           {
+               message = sformat(_("Activate LUKS %1$s on %2$s (%3$s) with 
UUID %4$s..."),
+                                 luks_info.get_dm_table_name().c_str(),
+                                 luks_info.get_device_name().c_str(),
+                                 format_size(luks_info.get_size(), 
false).c_str(),
+                                 luks_info.get_uuid().c_str());
+           }
+
+           return password(message);
+       }
+
+       virtual pair<bool, string> bitlocker(const BitlockerInfo& 
bitlocker_info, int attempt) const override
+       {
+           string message;
+
+           if (bitlocker_info.is_dm_table_name_generated())
+           {
+               message = sformat(_("Activate BitLocker on %1$s (%2$s) with 
UUID %3$s..."),
+                                 bitlocker_info.get_device_name().c_str(),
+                                 format_size(bitlocker_info.get_size(), 
false).c_str(),
+                                 bitlocker_info.get_uuid().c_str());
+           }
+           else
+           {
+               message = sformat(_("Activate BitLocker %1$s on %2$s (%3$s) 
with UUID %4$s..."),
+                                 bitlocker_info.get_dm_table_name().c_str(),
+                                 bitlocker_info.get_device_name().c_str(),
+                                 format_size(bitlocker_info.get_size(), 
false).c_str(),
+                                 bitlocker_info.get_uuid().c_str());
+           }
+
+           return password(message);
        }
 
     private:
 
+       pair<bool, string> password(const string& message) const
+       {
+           if (!beginning_of_line)
+               cout << '\n';
+           beginning_of_line = true;
+
+           cout << message << endl;
+
+           string password = prompt_password(false);
+
+           return make_pair(!password.empty(), password);
+       }
+
        const GlobalOptions& global_options;
 
+       mutable bool beginning_of_line = true;
+
     };
 
 
@@ -248,14 +336,8 @@
 
        if (global_options.activate)
        {
-           if (!global_options.verbose && !global_options.quiet)
-               cout << _("Activating...") << flush;
-
            MyActivateCallbacks my_activate_callbacks(global_options);
            storage.activate(&my_activate_callbacks);
-
-           if (!global_options.verbose && !global_options.quiet)
-               cout << " " << _("done") << endl;
        }
 
        if (global_options.probe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/barrel-0.1.3/barrel.spec.in 
new/barrel-0.1.4/barrel.spec.in
--- old/barrel-0.1.3/barrel.spec.in     2022-05-10 10:54:23.000000000 +0200
+++ new/barrel-0.1.4/barrel.spec.in     2022-05-27 08:47:25.000000000 +0200
@@ -25,12 +25,12 @@
 URL:            https://github.com/openSUSE/barrel
 Source:         barrel-%{version}.tar.xz
 BuildRequires:  fdupes
-BuildRequires:  libstorage-ng-devel >= 4.4.76
+BuildRequires:  libstorage-ng-devel >= 4.5.12
 BuildRequires:  libtool
 BuildRequires:  libxslt
 BuildRequires:  readline-devel
 
-Requires:       libstorage-ng1 >= 4.5.10
+Requires:       libstorage-ng1 >= 4.5.12
 Recommends:     %{name}-lang
 Recommends:     logrotate
 %if 0%{?fedora_version}

Reply via email to