The package rpms/lsvpd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/lsvpd.git/commit/?id=564b09e196c2....
Change:
+ExclusiveArch: %{power64}
Thanks.
Full change:
============
commit 564b09e196c2f386e9c8f4f672d6c5517e6084b4
Author: Sinny Kumari <sinny(a)redhat.com>
Date: Fri Jul 6 16:29:01 2018 +0530
Rebase to 1.7.9
diff --git a/.gitignore b/.gitignore
index 46b3a95..853c6dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ lsvpd-1.6.8.tar.gz
/lsvpd-1.7.6.tar.gz
/lsvpd-1.7.7.tar.gz
/lsvpd-1.7.8.tar.gz
+/lsvpd-1.7.9.tar.gz
diff --git a/0001-lsvpd-Add-workaround-for-std-ios_base-failure-issue.patch
b/0001-lsvpd-Add-workaround-for-std-ios_base-failure-issue.patch
deleted file mode 100644
index b856008..0000000
--- a/0001-lsvpd-Add-workaround-for-std-ios_base-failure-issue.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From c36b20b7dc2e787f7285e459851df1a74368e8e3 Mon Sep 17 00:00:00 2001
-From: Vasant Hegde <hegdevasant(a)linux.vnet.ibm.com>
-Date: Wed, 20 Sep 2017 16:52:35 +0530
-Subject: [PATCH 1/3] lsvpd: Add workaround for std::ios_base::failure' issue
-
-Recently on P9 we started seeing below error.
-
-#vpdupdate
-terminate called after throwing an instance of 'std::ios_base::failure'
-what(): basic_filebuf::underflow error reading the file
-Aborted (core dumped)
-
-It turns out that we needed c++ fix. Lets add workaround so that we
-don't crash.
-
-Signed-off-by: Vasant Hegde <hegdevasant(a)linux.vnet.ibm.com>
-Reviewed-by: Ankit Kumar <ankit(a)linux.vnet.ibm.com>
----
- src/internal/sys_interface/icollector.cpp | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/internal/sys_interface/icollector.cpp
b/src/internal/sys_interface/icollector.cpp
-index 0d48c93..d6407d9 100644
---- a/src/internal/sys_interface/icollector.cpp
-+++ b/src/internal/sys_interface/icollector.cpp
-@@ -104,6 +104,17 @@ namespace lsvpd
- */
- string ICollector::getBinaryData( const string& path )
- {
-+ struct stat sbuf;
-+
-+ /*
-+ * Check file existence and size before calling ifstream
-+ *
-+ * Workaround for libstdc++ issue.
-+ *
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=250545
-+ */
-+ if ((stat(path.c_str(), &sbuf) != 0) || (sbuf.st_size == 0))
-+ return "";
-+
- ifstream fi(path.c_str(), ios::binary);
- string str;
-
---
-2.14.3
-
diff --git a/0002-Add-host-number-in-device-location-code-to-distingui.patch
b/0002-Add-host-number-in-device-location-code-to-distingui.patch
deleted file mode 100644
index 53ef969..0000000
--- a/0002-Add-host-number-in-device-location-code-to-distingui.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From f5a8a079dff00e3d71631a9d8899bfa5c11028e1 Mon Sep 17 00:00:00 2001
-From: Ankit Kumar <ankit(a)linux.vnet.ibm.com>
-Date: Wed, 15 Nov 2017 15:40:02 +0530
-Subject: [PATCH 2/3] Add host number in device location code to distinguish
- different devices
-
-This patch adds host number in location code as well to differentiate
-two different devices if both has same bus, target and lun number.
-
-H1-B0-T0-L0 [on]
-H0-B0-T0-L0 [off]
-
-Signed-off-by: Ankit Kumar <ankit(a)linux.vnet.ibm.com>
-[Added host value check and removing hyphen so that location code start
- with H<x> - Vasant]
-Signed-off-by: Vasant Hegde <hegdevasant(a)linux.vnet.ibm.com>
----
- src/internal/sys_interface/devicetreecollector.cpp | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/src/internal/sys_interface/devicetreecollector.cpp
b/src/internal/sys_interface/devicetreecollector.cpp
-index dc7ff54..6afbe85 100644
---- a/src/internal/sys_interface/devicetreecollector.cpp
-+++ b/src/internal/sys_interface/devicetreecollector.cpp
-@@ -765,7 +765,7 @@ ERROR:
- {
- Component *parent;
- ostringstream val;
-- const DataItem *target, *lun, *bus;
-+ const DataItem *target, *lun, *bus, *host;
-
- /* Build up a distinct YL based on parents YL - for device such as
- * scsi, ide, usb, etc that do not generate ibm,loc-code
-@@ -778,7 +778,9 @@ ERROR:
- target = fillMe->getDeviceSpecific("XT");
- lun = fillMe->getDeviceSpecific("XL");
- bus = fillMe->getDeviceSpecific("XB");
-- if (target != NULL && lun != NULL && bus != NULL) {
-+ host = fillMe->getDeviceSpecific("XH");
-+ if (host != NULL && target != NULL &&
-+ lun != NULL && bus != NULL) {
- if (fillMe->mPhysicalLocation.dataValue != "")
- val << fillMe->mPhysicalLocation.dataValue;
- else if
-@@ -787,8 +789,8 @@ ERROR:
- else
- val << getAttrValue( parent->deviceTreeNode.dataValue,
- "ibm,loc-code" );
-- val << "-B" << bus->dataValue << "-T"
<< target->dataValue
-- << "-L" << lun->dataValue;
-+ val << "H" << host->dataValue << "-B"
<< bus->dataValue
-+ << "-T" << target->dataValue << "-L"
<< lun->dataValue;
- fillMe->mPhysicalLocation.setValue( val.str( ), 60 ,
- __FILE__, __LINE__ );
- }
---
-2.14.3
-
diff --git a/0003-lsmcode-Support-firmware-info-on-BMC-based-Power9-sy.patch
b/0003-lsmcode-Support-firmware-info-on-BMC-based-Power9-sy.patch
deleted file mode 100644
index c0c84d7..0000000
--- a/0003-lsmcode-Support-firmware-info-on-BMC-based-Power9-sy.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-From 68a4d47bdfbe4ebcc048e9f08862e2639bbec2e7 Mon Sep 17 00:00:00 2001
-From: Ankit Kumar <ankit(a)linux.vnet.ibm.com>
-Date: Thu, 21 Sep 2017 18:34:20 +0530
-Subject: [PATCH 3/3] lsmcode: Support firmware info on BMC based Power9 system
-
-P9 system supports various service processor stack like FSP based system,
-SMC system, AMI with OpenBMC stack etc. Some of these systems supports full
-ipmi stack and few other systems doesn't (at least for now).
-
-lsmcode uses ipmi interface (ipmitool fru) to get firmware information. It
-fails on some of the P9 system where we donot have full ipmi support.
-
-Recently we added support in OPAL to export firmware information via device
-tree for P9 BMC systems (/ibm,firmware-versions node). Even recent hostboot
-firmware on P8 BMC system exports these information via mini device tree.
-
-This patch enables lsmcode to collect firmware information via device tree.
-
-Sample output on Power9 system after applying this patch:
-./lsmcode
-Version of System Firmware :
- Product Name : OpenPOWER Firmware
- Product Version : open-power-firestone-v1.17-101-g1c57f18-dirty
- Product Extra : occ-site_local-akshay-28f2cec-dirty
- Product Extra : skiboot-5.6.0-158-ga1e0a047b2a0
- Product Extra : buildroot-2017.02.2-7-g23118ce
- Product Extra : capp-ucode-9c73e9f
- Product Extra : petitboot-v1.4.3-pa6836f6
- Product Extra : hostboot-binaries-711147e
- Product Extra : machine-xml-2494a43
- Product Extra : hostboot-695bd89
- Product Extra : linux-4.11.6-openpower1-p1e59f24
-
-root@fir02:/home/ankit/lsvpd# ./lsmcode --All
-sys0!system: open-power-firestone-v1.17-101-g1c57f18-dirty
-sg0 0:0:0:0 sda !ST1000NX0313.BE33
-
-Sample output on Power8 system after applying this patch:
-./lsmcode
-Version of System Firmware :
- Product Name : OpenPOWER Firmware
- Product Version : open-power-firestone-v1.17-101-g1c57f18-dirty
- Product Extra : buildroot-2017.02.2-7-g23118ce
- Product Extra : skiboot-5.6.0-158-ga1e0a047b2a0
- Product Extra : hostboot-695bd89
- Product Extra : linux-4.11.6-openpower1-p1e59f24
- Product Extra : petitboot-v1.4.3-pa6836f6
- Product Extra : machine-xml-2494a43
- Product Extra : occ-site_local-28f2cec-dirty
-
-root@fir:lsvpd# ./lsmcode --All
-sys0!system: open-power-firestone-v1.17-101-g1c57f18-dirty
-sg0 0:0:0:0 sda !ST1000NX0313.BE33
-
-Signed-off-by: Ankit Kumar <ankit(a)linux.vnet.ibm.com>
-[Updated description, Changed "product version" property name - Vasant]
-Signed-off-by: Vasant Hegde <hegdevasant(a)linux.vnet.ibm.com>
----
- src/output/lsmcode.cpp | 135 ++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 129 insertions(+), 6 deletions(-)
-
-diff --git a/src/output/lsmcode.cpp b/src/output/lsmcode.cpp
-index a8d9f11..c96a176 100644
---- a/src/output/lsmcode.cpp
-+++ b/src/output/lsmcode.cpp
-@@ -23,6 +23,7 @@
-
- #include <rtascollector.hpp>
- #include <platformcollector.hpp>
-+#include <devicetreecollector.hpp>
- #include <libvpd-2/vpdretriever.hpp>
- #include <libvpd-2/component.hpp>
- #include <libvpd-2/dataitem.hpp>
-@@ -39,6 +40,7 @@
- #define _GNU_SOURCE // for getopt_long
- #endif
-
-+#include <dirent.h>
- #include <unistd.h>
- #include <getopt.h>
- #include <zlib.h>
-@@ -50,6 +52,9 @@
- #include <iomanip>
- #include <limits.h>
-
-+/* Firmware information device tree node on PowerNV system */
-+#define FW_VERSION_DT_NODE DEVTREEPATH"/ibm,firmware-versions/"
-+
- /* IPMI tool */
- #define CMD_IPMITOOL "ipmitool"
-
-@@ -152,6 +157,117 @@ parse_err:
- return string();
- }
-
-+static string read_dt_property(const string& path, const string& attrName)
-+{
-+ struct stat info;
-+ string fullPath;
-+ string ret = "";
-+
-+ ostringstream os;
-+ os << path << "/" << attrName;
-+ fullPath = os.str( );
-+
-+ if (stat(fullPath.c_str( ), &info) != 0) {
-+ ostringstream os;
-+ if (errno != ENOENT) {
-+ os << "Error statting " << fullPath << ", errno:
" << errno;
-+ Logger().log( os.str( ), LOG_ERR );
-+ }
-+ return ret;
-+ }
-+
-+ ifstream attrIn;
-+ attrIn.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
-+ try {
-+ attrIn.open( fullPath.c_str( ) );
-+ }
-+ catch (std::ifstream::failure e) {
-+ ostringstream os;
-+ os << "Error opening " << fullPath;
-+ Logger().log(os.str( ), LOG_WARNING);
-+ return ret;
-+ }
-+
-+ if (attrIn) {
-+ char * strBuf;
-+ try
-+ {
-+ strBuf = new char [ info.st_size + 1 ];
-+ }
-+ catch (exception& e)
-+ {
-+ return ret;
-+ }
-+ memset( strBuf, '\0', info.st_size + 1 );
-+ attrIn.read( strBuf, info.st_size );
-+ ret = strBuf;
-+ attrIn.close( );
-+ delete [] strBuf;
-+ }
-+ return ret;
-+}
-+
-+/* Get system firmware information on BMC based system via device tree */
-+static string bmc_get_fw_dt_info(void)
-+{
-+ string fwdata, tag, val, prod_ver = "", prod_extra = "";
-+ struct dirent *ent;
-+ DIR * pDBdir = NULL;
-+ /* Properties to ignore from DT/ibm,firmware-versions node */
-+ const char *ignore_dt[] = {"phandle", "name"};
-+ int i;
-+ bool ignore_dt_flag = false;
-+
-+ pDBdir = opendir(FW_VERSION_DT_NODE);
-+ if (pDBdir == NULL) {
-+ stringstream os;
-+ os << "Error opening directory " << FW_VERSION_DT_NODE <<
endl;
-+ Logger().log(os.str( ), LOG_ERR);
-+ return string("");
-+ }
-+
-+ fwdata = string("\n Product Name : OpenPOWER Firmware\n");
-+ while ((ent = readdir( pDBdir )) != NULL) {
-+ string fname = ent->d_name;
-+ for (i = 0; i < (int)(sizeof(ignore_dt)/sizeof(char *)); i++) {
-+ if (fname.compare(string(ignore_dt[i])) == 0) {
-+ ignore_dt_flag = true;
-+ break;
-+ }
-+ }
-+
-+ if (ignore_dt_flag == true) {
-+ ignore_dt_flag = false;
-+ continue;
-+ }
-+
-+ /*
-+ * Looks like some system has open-power property and some
-+ * other has "IBM" property. Lets use one of these property
-+ * for Product Version.
-+ */
-+ if (fname.compare("IBM") == 0 || fname.compare("open-power") == 0)
{
-+ if (prod_ver == string("")) {
-+ tag = string(" Product Version : ");
-+ prod_ver = read_dt_property(string(FW_VERSION_DT_NODE), fname);
-+ if (prod_ver == string(""))
-+ continue;
-+ prod_ver = tag + fname + string("-") + prod_ver + string("\n");
-+ continue;
-+ }
-+ }
-+
-+ tag = string(" Product Extra : \t");
-+ val = read_dt_property(string(FW_VERSION_DT_NODE), fname);
-+ if (val == string(""))
-+ continue;
-+ prod_extra = prod_extra + tag + fname + string("-") + val +
string("\n");
-+ }
-+
-+ fwdata = fwdata + prod_ver + prod_extra;
-+ return fwdata;
-+}
-+
- /* Get production version */
- static string bmc_get_product_version(string fwData)
- {
-@@ -181,13 +297,20 @@ bool printSystem( const vector<Component*>& leaves )
- * based system. Hence we don't store this information in VPD db.
- */
- if (PlatformCollector::isBMCBasedSystem()) {
-- string ipmitool = get_ipmitool_path();
-- if (ipmitool.empty())
-- return false;
-+ string fwData;
-+ if (!access(FW_VERSION_DT_NODE, F_OK | R_OK)) {
-+ fwData = bmc_get_fw_dt_info();
-+ if (fwData.empty())
-+ return false;
-+ } else {
-+ string ipmitool = get_ipmitool_path();
-+ if (ipmitool.empty())
-+ return false;
-
-- string fwData = bmc_get_fw_fru_info(ipmitool);
-- if (fwData.empty())
-- return false;
-+ fwData = bmc_get_fw_fru_info(ipmitool);
-+ if (fwData.empty())
-+ return false;
-+ }
-
- if ( all ) {
- string pVersion = bmc_get_product_version(fwData);
---
-2.14.3
-
diff --git a/lsvpd.spec b/lsvpd.spec
index 5e1fa1b..4afc2ea 100644
--- a/lsvpd.spec
+++ b/lsvpd.spec
@@ -1,18 +1,15 @@
%define name lsvpd
-%define version 1.7.8
+%define version 1.7.9
Name: %{name}
Version: %{version}
-Release: 5%{?dist}
+Release: 1%{?dist}
Summary: VPD/hardware inventory utilities for Linux
Group: Applications/System
License: GPLv2+
URL:
http://linux-diag.sf.net/Lsvpd.html
Source0:
https://sourceforge.net/projects/linux-diag/files/lsvpd-new/%{version}/%{...
-Patch0: 0001-lsvpd-Add-workaround-for-std-ios_base-failure-issue.patch
-Patch1: 0002-Add-host-number-in-device-location-code-to-distingui.patch
-Patch2: 0003-lsmcode-Support-firmware-info-on-BMC-based-Power9-sy.patch
BuildRequires: libvpd-devel >= 2.2.1
BuildRequires: sg3_utils-devel zlib-devel automake libtool
@@ -20,7 +17,7 @@ BuildRequires: librtas-devel
Requires(post): %{_sbindir}/vpdupdate
-ExclusiveArch: ppc %{power64}
+ExclusiveArch: %{power64}
%description
The lsvpd package contains all of the lsvpd, lscfg and lsmcode
@@ -34,7 +31,7 @@ firmware levels. lsvio lists virtual devices, usually only found
on POWER PC based systems.
%prep
-%autosetup -p1
+%autosetup
%build
./bootstrap.sh
@@ -69,6 +66,9 @@ exit 0
%dir %{_sysconfdir}/lsvpd
%changelog
+* Fri Jul 06 2018 Sinny Kumari<sinnykumari(a)fedoraproject.org> - 1.7.9-1
+- Rebase to 1.7.9
+
* Thu Feb 08 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.7.8-5
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
diff --git a/sources b/sources
index b11583b..fbf8660 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (lsvpd-1.7.8.tar.gz) =
7f8f6de653a097928dabf21974855875118b35196dac17f184e6b31b85426ec018a06efc45d574e4385443c6345e250f69e52f48d0cafcfc87334f14bbf8624f
+SHA512 (lsvpd-1.7.9.tar.gz) =
5cbec15f821d9da5ea55fccda7f3fa813d66e5a5bda9f6199b3e33e22734c43a6496434b5c61ed8fecf9728827af59c235eb72f24b7cd43fedb8d9cd98ef841c