integ/bmc/Redfishtool/centos/redfishtool.spec
zhipengl f5db9e98f4 Add redfishtool package
Add redfishtool package to controller nodes
It will be used by maintenance processes(mtcAgent and hwmon).
Two patches are required.
1. python2 support patch
2. config file support patch

Deploy test pass
redfishtool can run normally in controller node.

Story: 2005861
Task: 34187

Depends-On: https://review.opendev.org/665993/
Change-Id: I69e08cffd8587cb4287394f2b7a2f46fd3d054d9
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2019-07-05 01:22:19 +00:00

64 lines
1.3 KiB
RPMSpec

#
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2016, Contributing Member(s) of Distributed Management
# Task Force, Inc.. All rights reserved.
Summary: Redfish Tool Package
Name: Redfishtool
Version: 1.0.8
Release: %{?_tis_dist}.%{tis_patch_ver}
#For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md
License: BSD-3-Clause.
Group: base
Packager: StarlingX
URL: https://github.com/DMTF/Redfishtool
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
Patch01: 0001-Adapt-redfishtool-to-python2.patch
Patch02: 0002-Add-configfile-option-support.patch
BuildRequires: python-setuptools
Requires: python-requests
%description
Redfish Tool Package
%define pythonroot /usr/lib64/python2.7/site-packages
%define debug_package %{nil}
%prep
%setup
%patch01 -p1
%patch02 -p1
# Remove bundled egg-info
rm -rf *.egg-info
%build
%{__python} setup.py build
%install
%{__python} setup.py install --root=%{buildroot} \
--install-lib=%{pythonroot} \
--prefix=/usr \
--install-data=/usr/share \
--single-version-externally-managed
%post
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc LICENSE.md
%{pythonroot}/redfishtool/*
%{pythonroot}/redfishtool-%{version}*.egg-info
%{_bindir}/redfishtool