Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2014-05-14 10:26:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2014-05-06 13:40:37.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new/yast2-installation.changes   
    2014-05-14 10:26:16.000000000 +0200
@@ -1,0 +2,27 @@
+Tue May 13 13:51:52 UTC 2014 - [email protected]
+
+- Fix haveged path to kill it properly (patch by Ihno) (bnc#876876)
+- 3.1.80
+
+-------------------------------------------------------------------
+Tue May 13 10:09:55 CEST 2014 - [email protected]
+
+- enable services for FCoE by calling fcoe-client finish script
+  (bnc#877352)
+- 3.1.79
+
+-------------------------------------------------------------------
+Fri May  9 10:44:11 UTC 2014 - [email protected]
+
+- ensure maximum size of prep partition for ppc64 (bnc#867345)
+  ( part of patch made by [email protected] )
+- 3.1.78
+
+-------------------------------------------------------------------
+Fri May  9 10:15:34 UTC 2014 - [email protected]
+
+- adjusted downloading release notes to work also for extensions
+  (bnc#876700)
+- 3.1.77
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-3.1.76.tar.bz2

New:
----
  yast2-installation-3.1.80.tar.bz2

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.1PlxN1/_old  2014-05-14 10:26:17.000000000 +0200
+++ /var/tmp/diff_new_pack.1PlxN1/_new  2014-05-14 10:26:17.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.1.76
+Version:        3.1.80
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-installation-3.1.76.tar.bz2 -> yast2-installation-3.1.80.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/package/yast2-installation.changes 
new/yast2-installation-3.1.80/package/yast2-installation.changes
--- old/yast2-installation-3.1.76/package/yast2-installation.changes    
2014-04-30 16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/package/yast2-installation.changes    
2014-05-13 16:35:47.000000000 +0200
@@ -1,4 +1,31 @@
 -------------------------------------------------------------------
+Tue May 13 13:51:52 UTC 2014 - [email protected]
+
+- Fix haveged path to kill it properly (patch by Ihno) (bnc#876876)
+- 3.1.80
+
+-------------------------------------------------------------------
+Tue May 13 10:09:55 CEST 2014 - [email protected]
+
+- enable services for FCoE by calling fcoe-client finish script
+  (bnc#877352)
+- 3.1.79
+
+-------------------------------------------------------------------
+Fri May  9 10:44:11 UTC 2014 - [email protected]
+
+- ensure maximum size of prep partition for ppc64 (bnc#867345)
+  ( part of patch made by [email protected] )
+- 3.1.78
+
+-------------------------------------------------------------------
+Fri May  9 10:15:34 UTC 2014 - [email protected]
+
+- adjusted downloading release notes to work also for extensions
+  (bnc#876700)
+- 3.1.77
+
+-------------------------------------------------------------------
 Wed Apr 30 11:01:12 UTC 2014 - [email protected]
 
 - use correct keywords for cio ignore kernel params (bnc#874902)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/package/yast2-installation.spec 
new/yast2-installation-3.1.80/package/yast2-installation.spec
--- old/yast2-installation-3.1.76/package/yast2-installation.spec       
2014-04-30 16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/package/yast2-installation.spec       
2014-05-13 16:35:47.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        3.1.76
+Version:        3.1.80
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.76/src/Makefile.am 
new/yast2-installation-3.1.80/src/Makefile.am
--- old/yast2-installation-3.1.76/src/Makefile.am       2014-04-30 
16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/src/Makefile.am       2014-05-13 
16:35:47.000000000 +0200
@@ -60,6 +60,7 @@
   clients/ldconfig_finish.rb \
   clients/network_finish.rb \
   clients/pre_umount_finish.rb \
+  clients/prep_shrink_finish.rb \
   clients/proxy_finish.rb \
   clients/random_finish.rb \
   clients/save_config_finish.rb \
@@ -104,9 +105,10 @@
 
 ylibdir = "${yast2dir}/lib/installation"
 ylib_DATA = \
+  lib/installation/cio_ignore.rb \
   lib/installation/clone_settings.rb \
   lib/installation/minimal_installation.rb \
-  lib/installation/cio_ignore.rb
+  lib/installation/prep_shrink.rb
 
 
 EXTRA_DIST = $(module_DATA) $(client_DATA) $(ynclude_DATA) $(scrconf_DATA) 
$(schemafiles_DATA) $(desktop_DATA) $(fillup_DATA) $(ylib_DATA)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/src/clients/inst_download_release_notes.rb 
new/yast2-installation-3.1.80/src/clients/inst_download_release_notes.rb
--- old/yast2-installation-3.1.76/src/clients/inst_download_release_notes.rb    
2014-04-30 16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/src/clients/inst_download_release_notes.rb    
2014-05-13 16:35:47.000000000 +0200
@@ -33,6 +33,8 @@
     Yast.import "Proxy"
     Yast.import "Directory"
     Yast.import "InstData"
+    Yast.import "Stage"
+    Yast.import "GetInstArgs"
 
     include Yast::Logger
 
@@ -68,10 +70,13 @@
         end
       end
 
-      products = Pkg.ResolvableDependencies("", :product, "").select { | 
product |
-        [:selected, :installed].include? product["status"]
+      # installed may mean old (before upgrade) in initial stage
+      # product may not yet be selected although repo is already added
+      required_product_statuses = Stage.initial ? [:selected, :available] : 
[:selected, :installed]
+      products = Pkg.ResolvableProperties("", :product, "").select { | product 
|
+        required_product_statuses.include? product["status"]
       }
-      log.debug("Products: #{products}")
+      log.info("Products: #{products}")
       products.each do | product |
         if InstData.downloaded_release_notes.include? product["name"]
           log.info("Release notes for #{product['name']} already downloaded, 
skipping...")
@@ -127,6 +132,10 @@
     def main
       textdomain "installation"
 
+      if GetInstArgs.going_back
+        return :back
+      end
+
       download_release_notes
       :auto
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.76/src/clients/inst_finish.rb 
new/yast2-installation-3.1.80/src/clients/inst_finish.rb
--- old/yast2-installation-3.1.76/src/clients/inst_finish.rb    2014-04-30 
16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/src/clients/inst_finish.rb    2014-05-13 
16:35:47.000000000 +0200
@@ -149,6 +149,7 @@
             "desktop",
             "storage",
             "iscsi-client",
+            "fcoe-client",
             "kernel",
             "x11",
             "proxy",
@@ -186,6 +187,7 @@
           # progress stage
           "label" => _("Install boot manager"),
           "steps" => [
+            "prep_shrink", # ensure that prep partition is small enough for 
boot sector (bnc#867345)
             "bootloader",
             ProductFeatures.GetBooleanFeature("globals", "enable_kdump") == 
true ? "kdump" : "",
             "cio_ignore"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/src/clients/prep_shrink_finish.rb 
new/yast2-installation-3.1.80/src/clients/prep_shrink_finish.rb
--- old/yast2-installation-3.1.76/src/clients/prep_shrink_finish.rb     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.80/src/clients/prep_shrink_finish.rb     
2014-05-13 16:35:47.000000000 +0200
@@ -0,0 +1,3 @@
+require "installation/prep_shrink"
+
+::Installation::PrepShrinkFinish.new.run(*Yast::WFM.Args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/src/clients/umount_finish.rb 
new/yast2-installation-3.1.80/src/clients/umount_finish.rb
--- old/yast2-installation-3.1.76/src/clients/umount_finish.rb  2014-04-30 
16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/src/clients/umount_finish.rb  2014-05-13 
16:35:47.000000000 +0200
@@ -352,7 +352,7 @@
 
       Builtins.y2milestone("Saving the current randomness state...")
 
-      service_bin = "/sbin/haveged"
+      service_bin = "/usr/sbin/haveged"
       random_path = "/dev/urandom"
       store_to = Builtins.sformat(
         "%1/var/lib/misc/random-seed",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-3.1.76/src/lib/installation/prep_shrink.rb 
new/yast2-installation-3.1.80/src/lib/installation/prep_shrink.rb
--- old/yast2-installation-3.1.76/src/lib/installation/prep_shrink.rb   
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.80/src/lib/installation/prep_shrink.rb   
2014-05-13 16:35:47.000000000 +0200
@@ -0,0 +1,79 @@
+module Installation
+  class PrepShrinkFinish
+    include Yast::Logger
+    include Yast::I18n
+
+    USABLE_WORKFLOWS = [
+      :installation,
+      :live_installation,
+      :autoinst,
+      :update,
+      :autoupg #TODO is autoupgrade still live?
+    ]
+
+    YAST_BASH_PATH = Yast::Path.new ".target.bash_output"
+
+
+    def initialize
+      textdomain "installation"
+    end
+
+    def run(*args)
+      func = args.first
+      param = args[1] || {}
+
+      log.debug "prep shrink finish client called with #{func} and #{param}"
+
+      case func
+      when "Info"
+        Yast.import "Arch"
+        usable = Yast::Arch.board_chrp
+
+        {
+          "steps" => 1,
+          # progress step title
+          "title" => _("Shrinking PREP partition..."),
+          "when"  => usable ? USABLE_WORKFLOWS : []
+        }
+
+      when "Write"
+        shrink_partitions
+
+        nil
+      else
+        raise "Uknown action #{func} passed as first parameter"
+      end
+    end
+
+  private
+    MAXIMAL_SIZE_KB = 8192
+    def shrink_partitions
+      target_map = Yast::Storage.GetTargetMap
+      target_map.each do |disk, disk_values|
+        (disk_values["partitions"] || []).each do |part_values|
+          if need_shrink?(part_values)
+            cmd = shrink_command(disk_values, part_values)
+            log.info "shrinking command #{cmd}"
+            Yast::SCR.Execute(YAST_BASH_PATH, cmd)
+          end
+        end
+      end
+    end
+
+    # 0x41 is PPC PREP Boot
+    # 0x108 is DOS PREP boot
+    PREP_IDS = [0x41, 0x108]
+    def need_shrink?(partition)
+      PREP_IDS.include?(partition["fsid"]) &&
+        partition["size_k"] > MAXIMAL_SIZE_KB
+    end
+
+    def shrink_command(disk_values, part_values)
+      cmd = "parted -s -a minimal "
+      cmd << disk_values["device"]
+      cmd << " resize "
+      cmd << part_values["nr"].to_s
+      cmd << " #{MAXIMAL_SIZE_KB}k"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.76/test/Makefile.am 
new/yast2-installation-3.1.80/test/Makefile.am
--- old/yast2-installation-3.1.76/test/Makefile.am      2014-04-30 
16:20:51.000000000 +0200
+++ new/yast2-installation-3.1.80/test/Makefile.am      2014-05-13 
16:35:47.000000000 +0200
@@ -1,6 +1,7 @@
 TESTS = \
   inst_functions_test.rb \
-  cio_ignore_test.rb
+  cio_ignore_test.rb \
+  prep_shrink_test.rb
 
 TEST_EXTENSIONS = .rb
 RB_LOG_COMPILER = rspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-3.1.76/test/prep_shrink_test.rb 
new/yast2-installation-3.1.80/test/prep_shrink_test.rb
--- old/yast2-installation-3.1.76/test/prep_shrink_test.rb      1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-installation-3.1.80/test/prep_shrink_test.rb      2014-05-13 
16:35:47.000000000 +0200
@@ -0,0 +1,235 @@
+#! /usr/bin/env rspec
+
+require_relative "./test_helper"
+
+require "installation/prep_shrink"
+
+describe ::Installation::PrepShrinkFinish do
+  subject { ::Installation::PrepShrinkFinish.new }
+
+  describe "#run" do
+    describe "first paramater \"Info\"" do
+      it "returns info entry hash with empty \"when\" key for non chrp boarch" 
do
+        arch_mock = double("Yast::Arch", :board_chrp => false)
+        stub_const("Yast::Arch", arch_mock)
+
+        result = subject.run("Info")
+
+        expect(result["when"]).to be_empty
+      end
+
+      it "returns info entry hash with scenarios in \"when\" key for chrp 
board" do
+        arch_mock = double("Yast::Arch", :board_chrp => true)
+        stub_const("Yast::Arch", arch_mock)
+
+        result = subject.run("Info")
+
+        expect(result["when"]).to_not be_empty
+      end
+    end
+
+    describe "first parameter \"Write\"" do
+      # TODO create factory like method for Storage
+      STORAGE_DATA = {
+        "/dev/sda" =>  {
+          "unique" => "3OOL.41o+EUK3QE2",
+          "bus" => "IDE",
+          "device" => "/dev/sda",
+          "vendor" => "HITACHI",
+          "model" => "HTS72323",
+          "driver" => "ahci",
+          "driver_module" => "ahci",
+          "partitions" => [
+          {
+            "device" => "/dev/sda1",
+            "name" => "sda1",
+            "used_by_type" => :UB_NONE,
+            "used_by_device" => "",
+            "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part1",
+            "udev_id" =>  [
+              "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part1",
+              "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part1",
+              "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part1",
+              "wwn-0x5000cca6d4c3bbb8-part1"
+            ],
+            "size_k" => 2104515,
+            "detected_fs" => :unknown,
+            "nr" => 1,
+            "fsid" => 130,
+            "fstype" => "Linux swap",
+            "region" => [0, 262],
+            "type" => :primary
+          },
+          {
+            "device" => "/dev/sda2",
+            "name" => "sda2",
+            "used_by_type" => :UB_NONE,
+            "used_by_device" => "",
+            "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part2",
+            "udev_id" =>  [
+              "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part2",
+              "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part2",
+              "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part2",
+              "wwn-0x5000cca6d4c3bbb8-part2"
+            ],
+            "size_k" => 20980890,
+            "detected_fs" => :unknown,
+            "nr" => 2,
+            "fsid" => 131,
+            "fstype" => "Linux native",
+            "region" => [261, 2612],
+            "type" => :primary,
+            "boot" => true
+          },
+          {
+            "device" => "/dev/sda3",
+            "name" => "sda3",
+            "used_by_type" => :UB_NONE,
+            "used_by_device" => "",
+            "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part3",
+            "udev_id" =>  [
+              "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part3",
+              "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part3",
+              "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part3",
+              "wwn-0x5000cca6d4c3bbb8-part3"
+            ],
+            "size_k" => 289499332,
+            "detected_fs" => :unknown,
+            "nr" => 3,
+            "fsid" => 131,
+            "fstype" => "Linux native",
+            "region" => [2872, 36041],
+            "type" => :primary
+            }
+          ],
+          "size_k" => 312571224,
+          "cyl_size" => 8225280,
+          "cyl_count" => 38913,
+          "sector_size" => 512,
+          "label" => "msdos",
+          "name" => "sda",
+          "max_logical" => 255,
+          "max_primary" => 4,
+          "type" => :CT_DISK,
+          "transport" => :sata,
+          "used_by_type" => :UB_NONE,
+          "used_by_device" => "",
+          "udev_id" => [
+          "ata-HITACHI_HTS723232A7A364_E3834563C86LDM",
+          "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM",
+          "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM",
+          "wwn-0x5000cca6d4c3bbb8"],
+          "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0"
+        },
+        "/dev/sdb" =>  {
+          "unique" => "uI_Q.Uy_iBFnqnWC",
+          "bus" => "SCSI",
+          "device" => "/dev/sdb",
+          "vendor" => "Linux",
+          "model" => "scsi_debug",
+          "driver" => "scsi_debug",
+          "partitions" => [
+            {
+              "device" => "/dev/sdb1",
+              "name" => "sdb1",
+              "used_by_type" => :UB_NONE,
+              "used_by_device" => "",
+              "udev_path" => "scsi-0:0:0:0-part1",
+              "udev_id" => [
+                "scsi-1Linux_scsi_debug_16000-part1",
+                "scsi-35333333000003e80-part1",
+                "wwn-0x5333333000003e80-part1"
+              ],
+              "size_k" => 64260,
+              "detected_fs" => :unknown,
+              "nr" => 1,
+              "fsid" => 65,
+              "fstype" => "PPC PReP Boot",
+              "region" => [0, 1],
+              "type" => :primary,
+              "boot" => true
+            },
+            {
+              "device" => "/dev/sdb2",
+              "name" => "sdb2",
+              "used_by_type" => :UB_NONE,
+              "used_by_device" => "",
+              "udev_path" => "scsi-0:0:0:0-part2",
+              "udev_id" => [
+                "scsi-1Linux_scsi_debug_16000-part2",
+                "scsi-35333333000003e80-part2",
+                "wwn-0x5333333000003e80-part2"
+              ],
+              "size_k" => 4260,
+              "detected_fs" => :unknown,
+              "nr" => 2,
+              "fsid" => 65,
+              "fstype" => "PPC PReP Boot",
+              "region" => [0, 1],
+              "type" => :primary,
+              "boot" => true
+            }
+          ],
+          "size_k" => 307200,
+          "cyl_size" => 65802240,
+          "cyl_count" => 4,
+          "sector_size" => 4096,
+          "label" => "msdos",
+          "name" => "sdb",
+          "max_logical" => 255,
+          "max_primary" => 4,
+          "type" => :CT_DISK,
+          "transport" => :unknown,
+          "used_by_type" => :UB_NONE,
+          "used_by_device" => "",
+          "udev_id" => [
+            "scsi-1Linux_scsi_debug_16000",
+            "scsi-35333333000003e80",
+            "wwn-0x5333333000003e80"
+          ],
+          "udev_path" => "scsi-0:0:0:0"
+        }
+      }
+
+      before(:each) do
+        stub_const("Yast::Storage", double(:GetTargetMap => STORAGE_DATA))
+
+        allow(Yast::SCR).to receive(:Execute).
+          and_return({"exit" => 0, "stdout" => "", "stderr" => ""})
+      end
+
+      it "do nothing for non-prep partitions" do
+        expect(Yast::SCR).to receive(:Execute).
+          with(
+            ::Installation::PrepShrinkFinish::YAST_BASH_PATH,
+            /sda.*resize 1/
+          ).
+          never
+
+        subject.run("Write")
+      end
+
+      it "do nothing for prep partitions small enough" do
+        expect(Yast::SCR).to receive(:Execute).
+          with(
+            ::Installation::PrepShrinkFinish::YAST_BASH_PATH,
+            /sdb.*resize 2/
+          ).
+          never
+
+        subject.run("Write")
+      end
+
+      it "shrink prep partitions too big" do
+        expect(Yast::SCR).to receive(:Execute).
+          with(
+            ::Installation::PrepShrinkFinish::YAST_BASH_PATH,
+            /parted.*sdb.*resize 1/
+          ).
+          once
+
+        subject.run("Write")
+      end
+    end
+  end
+end

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to