Hello community,

here is the log from the commit of package iprutils for openSUSE:Factory 
checked in at 2018-03-07 10:31:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/iprutils (Old)
 and      /work/SRC/openSUSE:Factory/.iprutils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iprutils"

Wed Mar  7 10:31:15 2018 rev:59 rq:582547 version:2.4.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/iprutils/iprutils.changes        2017-10-28 
14:18:45.981953340 +0200
+++ /work/SRC/openSUSE:Factory/.iprutils.new/iprutils.changes   2018-03-07 
10:31:17.373811191 +0100
@@ -1,0 +2,7 @@
+Tue Feb 27 18:25:09 UTC 2018 - msucha...@suse.com
+
+- Fix microcode download (bsc#1082712)
+  + iprutils-Fix-download-microcode-to-all-devices.patch
+  + iprutils-Fix-microcode-image-sorting-on-little-endian-systems.patch
+
+-------------------------------------------------------------------

New:
----
  iprutils-Fix-download-microcode-to-all-devices.patch
  iprutils-Fix-microcode-image-sorting-on-little-endian-systems.patch

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

Other differences:
------------------
++++++ iprutils.spec ++++++
--- /var/tmp/diff_new_pack.8ZuDGp/_old  2018-03-07 10:31:18.045786953 +0100
+++ /var/tmp/diff_new_pack.8ZuDGp/_new  2018-03-07 10:31:18.049786808 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package iprutils
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,8 @@
 Url:            https://sourceforge.net/projects/iprdd
 Source0:        
https://sourceforge.net/projects/iprdd/files/iprutils%%20for%%202.6%%20kernels/%{version}/%{name}-%{version}.%{revision}.tar.gz
 Patch0:         iprutils.fix_ncurses_cflags_var.patch
+Patch1:         iprutils-Fix-download-microcode-to-all-devices.patch
+Patch2:         
iprutils-Fix-microcode-image-sorting-on-little-endian-systems.patch
 BuildRequires:  libtool
 BuildRequires:  pkgconfig
 BuildRequires:  systemd-rpm-macros
@@ -49,6 +51,8 @@
 %prep
 %setup -q -n %{name}-%{version}.%{revision}
 %patch0 -p2
+%patch1 -p1
+%patch2 -p1
 
 %build
 export CPPFLAGS="$(pkg-config ncurses form --cflags)"

++++++ iprutils-Fix-download-microcode-to-all-devices.patch ++++++
>From 1d7c258706d65ef0ed4090d5df2627ac696f0770 Mon Sep 17 00:00:00 2001
From: Brian King <brk...@linux.vnet.ibm.com>
Date: Thu, 16 Nov 2017 15:12:31 -0600
Subject: [PATCH 1/2] iprutils: Fix download microcode to all devices

Git-commit: 1d7c258706d65ef0ed4090d5df2627ac696f0770

This fixes a regression that was introduced which broke the
iprconfig option to download microcode to all devices.

Fixes: bcfcda764d10 ("iprutils: Fix iprconfig dump option to log full IOA 
details")
Signed-off-by: Brian King <brk...@linux.vnet.ibm.com>
---
 iprconfig.c | 4 ++--
 iprlib.h    | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/iprconfig.c b/iprconfig.c
index 11233cfc5fc0..5da12ccc2bf7 100644
--- a/iprconfig.c
+++ b/iprconfig.c
@@ -11842,7 +11842,7 @@ int download_all_ucode(i_container *i_con)
                if (!ioa->ioa.scsi_dev_data || ioa->ioa_dead)
                        continue;
 
-               for_each_dev (ioa, dev) {
+               for_ioa_and_each_dev (ioa, dev) {
                        if (ipr_is_volume_set(dev))
                                continue;
 
@@ -15754,7 +15754,7 @@ static int update_all_ucodes(char **args, int num_args)
        for_each_ioa(ioa) {
                if (!ioa->ioa.scsi_dev_data)
                        continue;
-               for_each_dev(ioa, dev) {
+               for_ioa_and_each_dev(ioa, dev) {
                        if (ipr_is_volume_set(dev))
                                continue;
 
diff --git a/iprlib.h b/iprlib.h
index 4fe98233a3b5..f7155228f240 100644
--- a/iprlib.h
+++ b/iprlib.h
@@ -1594,6 +1594,10 @@ struct ipr_ioa {
 
 #define for_each_dev(i, d) for (d = (i)->dev; (d - (i)->dev) < 
(i)->num_devices; d++)
 
+#define for_ioa_and_each_dev(i, d) for (d = &((i)->ioa); \
+                                       (d == &((i)->ioa)) || ((d - (i)->dev) < 
(i)->num_devices); \
+                                       d = (d == &((i)->ioa)) ? (i)->dev : d + 
1)
+
 #define for_each_hotplug_dev(i, d) \
       for_each_dev(i, d) \
            if (ipr_is_af_dasd_device(d) || ipr_is_gscsi(d))
-- 
2.13.6

++++++ iprutils-Fix-microcode-image-sorting-on-little-endian-systems.patch 
++++++
>From 35e85f59ef4bc16e78979684e318b44e76f14330 Mon Sep 17 00:00:00 2001
From: Brian King <brk...@linux.vnet.ibm.com>
Date: Thu, 16 Nov 2017 15:12:32 -0600
Subject: [PATCH 2/2] iprutils: Fix microcode image sorting on little endian
 systems

Git-commit: 35e85f59ef4bc16e78979684e318b44e76f14330

Fixes the sorting of microcode images from the filesystem
on little endian systems so that when using the ncurses
interface to download microcode, the latest version shows
up as the top option.

Signed-off-by: Brian King <brk...@linux.vnet.ibm.com>
---
 iprlib.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/iprlib.c b/iprlib.c
index 97653e4232ab..bc4afe35ed76 100644
--- a/iprlib.c
+++ b/iprlib.c
@@ -8369,8 +8369,11 @@ static int fw_compare(const void *parm1,
        struct ipr_fw_images *first = (struct ipr_fw_images *)parm1;
        struct ipr_fw_images *second = (struct ipr_fw_images *)parm2;
 
-       return memcmp(&second->version, &first->version,
-                     sizeof(second->version));
+       if (first->version < second->version)
+               return 1;
+       if (second->version > first->version)
+               return -1;
+       return 0;
 }
 
 /**
-- 
2.13.6


Reply via email to