Hello community,

here is the log from the commit of package yast2-storage-ng for 
openSUSE:Factory checked in at 2018-07-01 21:24:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-storage-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-storage-ng"

Sun Jul  1 21:24:45 2018 rev:24 rq:618957 version:4.0.194

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes        
2018-06-23 19:57:56.178412670 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-storage-ng.new/yast2-storage-ng.changes   
2018-07-01 21:24:46.376895221 +0200
@@ -1,0 +2,7 @@
+Fri Jun 22 12:23:51 CEST 2018 - aschn...@suse.com
+
+- mask systemd mount and swap units while expert partitioner is
+  running (bsc#1073633)
+- 4.0.194
+
+-------------------------------------------------------------------

Old:
----
  yast2-storage-ng-4.0.193.tar.bz2

New:
----
  yast2-storage-ng-4.0.194.tar.bz2

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

Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.yfGqqO/_old  2018-07-01 21:24:46.772894705 +0200
+++ /var/tmp/diff_new_pack.yfGqqO/_new  2018-07-01 21:24:46.776894701 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-storage-ng
-Version:        4.0.193
+Version:        4.0.194
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -33,6 +33,8 @@
 Requires:       rubygem(ruby-dbus)
 # Y2Packager::Repository
 Requires:       yast2-packager >= 3.3.7
+# findutils for xargs
+Requires:       findutils
 
 BuildRequires:  update-desktop-files
 # BlkDevice#active?
@@ -89,6 +91,7 @@
 %{yast_dir}/lib
 %{yast_desktopdir}/*.desktop
 %{yast_fillupdir}/*
+%{yast_ybindir}/*
 
 # agents-scr
 %{yast_scrconfdir}/*.scr

++++++ yast2-storage-ng-4.0.193.tar.bz2 -> yast2-storage-ng-4.0.194.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.0.193/package/yast2-storage-ng.changes 
new/yast2-storage-ng-4.0.194/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-4.0.193/package/yast2-storage-ng.changes       
2018-06-21 17:26:32.000000000 +0200
+++ new/yast2-storage-ng-4.0.194/package/yast2-storage-ng.changes       
2018-06-25 14:42:41.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Jun 22 12:23:51 CEST 2018 - aschn...@suse.com
+
+- mask systemd mount and swap units while expert partitioner is
+  running (bsc#1073633)
+- 4.0.194
+
+-------------------------------------------------------------------
 Tue Jun 19 15:25:36 UTC 2018 - jlo...@suse.com
 
 - Partitioner: add checkbox to format system volumes when importing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.0.193/package/yast2-storage-ng.spec 
new/yast2-storage-ng-4.0.194/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-4.0.193/package/yast2-storage-ng.spec  2018-06-21 
17:26:32.000000000 +0200
+++ new/yast2-storage-ng-4.0.194/package/yast2-storage-ng.spec  2018-06-25 
14:42:41.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:          yast2-storage-ng
-Version:        4.0.193
+Version:        4.0.194
 Release:       0
 
 BuildRoot:     %{_tmppath}/%{name}-%{version}-build
@@ -32,6 +32,8 @@
 Requires:      rubygem(ruby-dbus)
 # Y2Packager::Repository
 Requires:      yast2-packager >= 3.3.7
+# findutils for xargs
+Requires:      findutils
 
 BuildRequires: update-desktop-files
 # BlkDevice#active?
@@ -88,6 +90,7 @@
 %{yast_dir}/lib
 %{yast_desktopdir}/*.desktop
 %{yast_fillupdir}/*
+%{yast_ybindir}/*
 
 # agents-scr
 %{yast_scrconfdir}/*.scr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-ng-4.0.193/src/bin/mask-systemd-units 
new/yast2-storage-ng-4.0.194/src/bin/mask-systemd-units
--- old/yast2-storage-ng-4.0.193/src/bin/mask-systemd-units     1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-storage-ng-4.0.194/src/bin/mask-systemd-units     2018-06-25 
14:42:41.000000000 +0200
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+
+# This script can mask or unmask systemd mount and swap units since systemd
+# and YaST mounting the same file system leads to race conditions (see bsc
+# #1073633). Unfortunately there is no single systemctl command to mask those
+# units - so each must be masked individually.
+
+# Since it is unclear how to identify mount and swap units generated by the
+# systemd-gpt-auto-generator (see bsc #1073633 comment #79) this script
+# masks/unmasks almost all mount and swap units.
+
+# Error messages about non-existing units may be wrong (see bsc #1095973).
+
+
+query_units()
+{
+    systemctl list-units --full --all --type mount,swap --no-legend | while 
read -r unit dummy ; do
+
+       # skip root and sysroot
+       if [[ $unit == -.mount || $unit == sysroot.mount ]] ; then
+          continue
+       fi
+
+       # skip mount points below /dev, /run, /proc and /sys since these are
+       # usually not on block devices and masking them could maybe lead to
+       # problems
+       if [[ $unit == dev-* || $unit == run-* || $unit == proc-* || $unit == 
sys-* ]] ; then
+          continue
+       fi
+
+       echo "$unit"
+
+    done
+}
+
+
+mask_units()
+{
+    query_units | xargs --verbose --no-run-if-empty --delimiter='\n' systemctl 
--runtime $1 --
+}
+
+usage()
+{
+    echo "Usage: $0 --mask/--unmask" 1>&2
+    exit 1
+}
+
+
+case "$1" in
+
+    --mask)
+       mask_units mask
+       ;;
+
+    --unmask)
+       mask_units unmask
+       ;;
+
+    *)
+       usage
+       ;;
+
+esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.0.193/src/lib/y2storage/inhibitors/systemd_units.rb 
new/yast2-storage-ng-4.0.194/src/lib/y2storage/inhibitors/systemd_units.rb
--- old/yast2-storage-ng-4.0.193/src/lib/y2storage/inhibitors/systemd_units.rb  
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-storage-ng-4.0.194/src/lib/y2storage/inhibitors/systemd_units.rb  
2018-06-25 14:42:41.000000000 +0200
@@ -0,0 +1,43 @@
+# encoding: utf-8
+
+# Copyright (c) 2018 SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast2/execute"
+
+module Y2Storage
+  # class to inhibit systemd mount and swap units
+  class SystemdUnits
+    include Yast::Logger
+
+    def inhibit
+      log.info "mask systemd units"
+      Yast::Execute.locally!("/usr/lib/YaST2/bin/mask-systemd-units", "--mask")
+    rescue Cheetah::ExecutionFailed => e
+      log.error "masking systemd units failed #{e.message}"
+    end
+
+    def uninhibit
+      log.info "unmask systemd units"
+      Yast::Execute.locally!("/usr/lib/YaST2/bin/mask-systemd-units", 
"--unmask")
+    rescue Cheetah::ExecutionFailed => e
+      log.error "unmasking systemd units failed #{e.message}"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.0.193/src/lib/y2storage/inhibitors.rb 
new/yast2-storage-ng-4.0.194/src/lib/y2storage/inhibitors.rb
--- old/yast2-storage-ng-4.0.193/src/lib/y2storage/inhibitors.rb        
2018-06-21 17:26:32.000000000 +0200
+++ new/yast2-storage-ng-4.0.194/src/lib/y2storage/inhibitors.rb        
2018-06-25 14:42:41.000000000 +0200
@@ -21,6 +21,7 @@
 
 require "y2storage/inhibitors/mdadm_auto_assembly"
 require "y2storage/inhibitors/udisks"
+require "y2storage/inhibitors/systemd_units"
 
 module Y2Storage
   # class to inhibit various storage subsystem to automatically do things,
@@ -34,11 +35,13 @@
 
       @mdadm_auto_assembly.inhibit
       @udisks.inhibit
+      @systemd_units.inhibit
     end
 
     def uninhibit
       log.info "uninhibit"
 
+      @systemd_units.uninhibit
       @udisks.uninhibit
       @mdadm_auto_assembly.uninhibit
     end
@@ -48,6 +51,7 @@
     def initialize
       @mdadm_auto_assembly = Y2Storage::MdadmAutoAssembly.new
       @udisks = Y2Storage::Udisks.new
+      @systemd_units = Y2Storage::SystemdUnits.new
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-4.0.193/test/y2partitioner/clients/main_test.rb 
new/yast2-storage-ng-4.0.194/test/y2partitioner/clients/main_test.rb
--- old/yast2-storage-ng-4.0.193/test/y2partitioner/clients/main_test.rb        
2018-06-21 17:26:32.000000000 +0200
+++ new/yast2-storage-ng-4.0.194/test/y2partitioner/clients/main_test.rb        
2018-06-25 14:42:41.000000000 +0200
@@ -99,6 +99,15 @@
         it "runs the partitioner dialog" do
           expect(partitioner_dialog).to receive(:run)
 
+          expect(Yast::Execute).to receive(:locally!).with("/sbin/udevadm", 
"control",
+            "--property=ANACONDA=yes").ordered
+          expect(Yast::Execute).to 
receive(:locally!).with("/usr/lib/YaST2/bin/mask-systemd-units",
+            "--mask").ordered
+          expect(Yast::Execute).to 
receive(:locally!).with("/usr/lib/YaST2/bin/mask-systemd-units",
+            "--unmask").ordered
+          expect(Yast::Execute).to receive(:locally!).with("/sbin/udevadm", 
"control",
+            "--property=ANACONDA=").ordered
+
           subject.run
         end
 


Reply via email to