Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Leap:15.2 
checked in at 2020-05-12 11:31:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.libstorage-ng.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Tue May 12 11:31:49 2020 rev:232 rq:801269 version:4.2.75

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/libstorage-ng/libstorage-ng.changes    
2020-04-22 14:13:09.794524852 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.libstorage-ng.new.2738/libstorage-ng.changes  
2020-05-12 11:32:06.107706734 +0200
@@ -1,0 +2,18 @@
+Thu May 7 08:01:57 UTC 2020 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#734
+- merge gh#openSUSE/libstorage-ng#732
+- merge gh#openSUSE/libstorage-ng#717
+- merge gh#openSUSE/libstorage-ng#715
+- track device block size when creating an Md RAID (bsc#1164295)
+- simplify combining disks with different block sizes into RAID
+  (bsc#1164295)
+- add block_size check for Md::add_device()
+- update doc on RAID block size
+- ignore clusterd VGs also in vgchange command (bsc#1161775)
+- ignore umount/swapoff failure if it looks inactive already
+  (bsc#1168615)
+- fixed typo
+- 4.2.75
+
+--------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.3YJazo/_old  2020-05-12 11:32:06.499707557 +0200
+++ /var/tmp/diff_new_pack.3YJazo/_new  2020-05-12 11:32:06.499707557 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.2.74
+Version:        4.2.75
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.2.74.tar.xz -> libstorage-ng-4.2.75.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.74/LIBVERSION 
new/libstorage-ng-4.2.75/LIBVERSION
--- old/libstorage-ng-4.2.74/LIBVERSION 2020-04-20 10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/LIBVERSION 2020-05-07 10:01:57.000000000 +0200
@@ -1 +1 @@
-1.30.1
+1.30.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.74/VERSION 
new/libstorage-ng-4.2.75/VERSION
--- old/libstorage-ng-4.2.74/VERSION    2020-04-20 10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/VERSION    2020-05-07 10:01:57.000000000 +0200
@@ -1 +1 @@
-4.2.74
+4.2.75
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.2.74/storage/Filesystems/MountableImpl.cc 
new/libstorage-ng-4.2.75/storage/Filesystems/MountableImpl.cc
--- old/libstorage-ng-4.2.74/storage/Filesystems/MountableImpl.cc       
2020-04-20 10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/storage/Filesystems/MountableImpl.cc       
2020-05-07 10:01:57.000000000 +0200
@@ -334,13 +334,6 @@
     }
 
 
-    vector<ExtendedFstabEntry>
-    Mountable::Impl::find_proc_mounts_entries_unfiltered(SystemInfo& 
system_info) const
-    {
-       return {};
-    }
-
-
     Text
     Mountable::Impl::do_mount_text(const MountPoint* mount_point, Tense tense) 
const
     {
@@ -515,6 +508,21 @@
     }
 
 
+    bool
+    Mountable::Impl::is_active_at_present(SystemInfo& system_info, const 
MountPoint* mount_point) const
+    {
+       y2mil("active check begin");
+
+       vector<ExtendedFstabEntry> mount_entries = 
find_proc_mounts_entries(system_info);
+
+       y2mil("active check end");
+
+       y2mil("path:" << mount_point->get_path() << " active:" << 
!mount_entries.empty());
+
+       return !mount_entries.empty();
+    }
+
+
     void
     Mountable::Impl::immediate_activate(MountPoint* mount_point, bool 
force_rw) const
     {
@@ -555,7 +563,21 @@
 
        string cmd_line = UMOUNT_BIN " " + quote(real_mount_point);
 
-       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+       try
+       {
+           SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+       }
+       catch (const Exception& exception)
+       {
+           ST_CAUGHT(exception);
+
+           SystemInfo system_info;
+
+           if (is_active_at_present(system_info, mount_point))
+               ST_RETHROW(exception);
+
+           y2mil("ignoring umount failure since mount point seems already 
inactive");
+       }
 
        if (mount_point->exists_in_system())
            redirect_to_system(mount_point)->set_active(false);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.2.74/storage/Filesystems/MountableImpl.h 
new/libstorage-ng-4.2.75/storage/Filesystems/MountableImpl.h
--- old/libstorage-ng-4.2.74/storage/Filesystems/MountableImpl.h        
2020-04-20 10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/storage/Filesystems/MountableImpl.h        
2020-05-07 10:01:57.000000000 +0200
@@ -192,7 +192,7 @@
         *
         * Used for probe.
         */
-       virtual vector<ExtendedFstabEntry> 
find_proc_mounts_entries_unfiltered(SystemInfo& system_info) const;
+       virtual vector<ExtendedFstabEntry> 
find_proc_mounts_entries_unfiltered(SystemInfo& system_info) const = 0;
 
        /**
         * Predicate for filtering. So far only needed for btrfs where
@@ -219,6 +219,12 @@
        virtual Text do_remove_from_etc_fstab_text(const MountPoint* 
mount_point, Tense tense) const;
        virtual void do_remove_from_etc_fstab(CommitData& commit_data, const 
MountPoint* mount_point) const;
 
+       /**
+        * Checks if the mount point of the mountable is active at
+        * present. Does system lookups via the system_info.
+        */
+       virtual bool is_active_at_present(SystemInfo& system_info, const 
MountPoint* mount_point) const;
+
        virtual void immediate_activate(MountPoint* mount_point, bool force_rw 
= false) const;
        virtual void immediate_deactivate(MountPoint* mount_point) const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.74/storage/Filesystems/NfsImpl.cc 
new/libstorage-ng-4.2.75/storage/Filesystems/NfsImpl.cc
--- old/libstorage-ng-4.2.74/storage/Filesystems/NfsImpl.cc     2020-04-20 
10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/storage/Filesystems/NfsImpl.cc     2020-05-07 
10:01:57.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2017-2019] SUSE LLC
+ * Copyright (c) [2017-2020] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -284,4 +284,24 @@
        rpcbind_started = true;
     }
 
+
+    vector<ExtendedFstabEntry>
+    Nfs::Impl::find_proc_mounts_entries_unfiltered(SystemInfo& system_info) 
const
+    {
+       const ProcMounts& proc_mounts = system_info.getProcMounts();
+
+       vector<ExtendedFstabEntry> ret;
+
+       for (const FstabEntry* mount_entry : proc_mounts.get_all_nfs())
+       {
+           string spec = canonical_path(mount_entry->get_device());
+           pair<string, string> tmp = split_name(spec);
+
+           if (tmp.first == server && tmp.second == path)
+               ret.emplace_back(mount_entry);
+       }
+
+       return ret;
+    }
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.74/storage/Filesystems/NfsImpl.h 
new/libstorage-ng-4.2.75/storage/Filesystems/NfsImpl.h
--- old/libstorage-ng-4.2.74/storage/Filesystems/NfsImpl.h      2020-04-20 
10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/storage/Filesystems/NfsImpl.h      2020-05-07 
10:01:57.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2017-2019] SUSE LLC
+ * Copyright (c) [2017-2020] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -89,6 +89,8 @@
 
        virtual void do_pre_mount() const override;
 
+       virtual vector<ExtendedFstabEntry> 
find_proc_mounts_entries_unfiltered(SystemInfo& system_info) const override;
+
     protected:
 
        void save(xmlNode* node) const override;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.2.74/storage/Filesystems/SwapImpl.cc 
new/libstorage-ng-4.2.75/storage/Filesystems/SwapImpl.cc
--- old/libstorage-ng-4.2.74/storage/Filesystems/SwapImpl.cc    2020-04-20 
10:07:53.000000000 +0200
+++ new/libstorage-ng-4.2.75/storage/Filesystems/SwapImpl.cc    2020-05-07 
10:01:57.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2020] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -31,6 +31,7 @@
 #include "storage/Utils/SystemCmd.h"
 #include "storage/Utils/HumanString.h"
 #include "storage/Utils/ExceptionImpl.h"
+#include "storage/SystemInfo/SystemInfo.h"
 #include "storage/FreeInfo.h"
 #include "storage/UsedFeatures.h"
 #include "storage/Redirect.h"
@@ -188,7 +189,21 @@
 
        string cmd_line = SWAPOFF_BIN " " + quote(blk_device->get_name());
 
-       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+       try
+       {
+           SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+       }
+       catch (const Exception& exception)
+       {
+           ST_CAUGHT(exception);
+
+           SystemInfo system_info;
+
+           if (is_active_at_present(system_info, mount_point))
+               ST_RETHROW(exception);
+
+           y2mil("ignoring swapoff failure since mount point seems already 
inactive");
+       }
 
        if (mount_point->exists_in_system())
            redirect_to_system(mount_point)->set_active(false);


Reply via email to