fd3128
%global _hardened_build 1
fd3128
fd3128
Name:         ipmitool
fd3128
Summary:      Utility for IPMI control
fd3128
Version:      1.8.18
9bc273
Release:      9%{?dist}
fd3128
License:      BSD
fd3128
Group:        System Environment/Base
fd3128
URL:          http://ipmitool.sourceforge.net/
fd3128
Source0:      http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.bz2
fd3128
Source1:      openipmi-ipmievd.sysconf
fd3128
Source2:      ipmievd.service
fd3128
Source3:      exchange-bmc-os-info.service
fd3128
Source4:      exchange-bmc-os-info.sysconf
fd3128
Source5:      set-bmc-url.sh
fd3128
Source6:      exchange-bmc-os-info
fd3128
fd3128
BuildRequires: openssl-devel readline-devel ncurses-devel
fd3128
BuildRequires: systemd-units
fd3128
# bootstrap
fd3128
BuildRequires: automake autoconf libtool
fd3128
Requires:OpenIPMI-modalias
fd3128
Requires(post): systemd-sysv
fd3128
Requires(post): systemd-units
fd3128
Requires(preun): systemd-units
fd3128
Requires(postun): systemd-units
fd3128
Obsoletes: OpenIPMI-tools < 2.0.14-3
fd3128
Provides: OpenIPMI-tools = 2.0.14-3
fd3128
fd3128
Patch1:  0001-ipmitool-1.8.10-ipmievd-init.patch.patch
fd3128
Patch2:  0002-ipmitool-1.8.10-ipmievd-condrestart.patch.patch
fd3128
Patch4:  0004-ipmitool-1.8.11-set-kg-key.patch.patch
fd3128
Patch7:  0007-ipmitool-1.8.11-remove-umask0.patch.patch
fd3128
Patch9:  0009-ipmitool-1.8.11-bz1126333-slowswid.patch.patch
fd3128
Patch10: 0010-ipmitool-1.8.11-bz878614-overname.patch.patch
fd3128
Patch15: 0015-ID-390-Support-for-new-Communication-Interface-USB-M.patch
fd3128
Patch16: 0016-ipmitool-1.8.18-verbose.patch
fd3128
Patch17: 0017-ipmitool-1.8.18-check-input-values.patch
9bc273
Patch18: 0018-CVE-2020-5208.patch
9bc273
Patch19: 0019-CVE-2020-5208_2.patch
fd3128
fd3128
fd3128
%description
fd3128
This package contains a utility for interfacing with devices that support
fd3128
the Intelligent Platform Management Interface specification.  IPMI is
fd3128
an open standard for machine health, inventory, and remote power control.
fd3128
fd3128
This utility can communicate with IPMI-enabled devices through either a
fd3128
kernel driver such as OpenIPMI or over the RMCP LAN protocol defined in
fd3128
the IPMI specification.  IPMIv2 adds support for encrypted LAN
fd3128
communications and remote Serial-over-LAN functionality.
fd3128
fd3128
It provides commands for reading the Sensor Data Repository (SDR) and
fd3128
displaying sensor values, displaying the contents of the System Event
fd3128
Log (SEL), printing Field Replaceable Unit (FRU) information, reading and
fd3128
setting LAN configuration, and chassis power control.
fd3128
fd3128
%package -n bmc-snmp-proxy
fd3128
Requires: net-snmp
fd3128
Requires: exchange-bmc-os-info
fd3128
Requires:OpenIPMI-modalias
fd3128
BuildArch: noarch
fd3128
Summary: Reconfigure SNMP to include host SNMP agent within BMC
fd3128
%description -n bmc-snmp-proxy
fd3128
Given a host with BMC, this package would extend system configuration
fd3128
of net-snmp to include redirections to BMC based SNMP.
fd3128
fd3128
fd3128
%package -n exchange-bmc-os-info
fd3128
Requires: hostname
fd3128
Requires: ipmitool OpenIPMI
fd3128
Requires:OpenIPMI-modalias
fd3128
BuildArch: noarch
fd3128
Requires(post): systemd-sysv
fd3128
Requires(post): systemd-units
fd3128
Requires(preun): systemd-units
fd3128
Requires(postun): systemd-units
fd3128
fd3128
Summary: Let OS and BMC exchange info
fd3128
fd3128
%description -n exchange-bmc-os-info
fd3128
Given a host with BMC, this package would pass the hostname &
fd3128
OS information to the BMC and also capture the BMC ip info
fd3128
for the host OS to use.
fd3128
fd3128
fd3128
%prep
fd3128
fd3128
%setup -q
fd3128
fd3128
%patch1 -p1
fd3128
%patch2 -p1
fd3128
%patch4 -p1
fd3128
%patch7 -p1
fd3128
%patch9 -p1
fd3128
%patch10 -p1
fd3128
%patch15 -p1
fd3128
%patch16 -p1
fd3128
%patch17 -p1
9bc273
%patch18 -p1
9bc273
%patch19 -p1
fd3128
fd3128
for f in AUTHORS ChangeLog; do
fd3128
    iconv -f iso-8859-1 -t utf8 < ${f} > ${f}.utf8
fd3128
    mv ${f}.utf8 ${f}
fd3128
done
fd3128
fd3128
%build
fd3128
# --disable-dependency-tracking speeds up the build
fd3128
# --enable-file-security adds some security checks
fd3128
# --disable-intf-free disables FreeIPMI support - we don't want to depend on
fd3128
#   FreeIPMI libraries, FreeIPMI has its own ipmitoool-like utility.
fd3128
fd3128
# begin: release auto-tools
fd3128
# Used to be needed by aarch64 support, now only cxoem patch makefiles are left.
fd3128
aclocal
fd3128
libtoolize --automake --copy
fd3128
autoheader
fd3128
automake --foreign --add-missing --copy
fd3128
aclocal
fd3128
autoconf
fd3128
automake --foreign
fd3128
# end: release auto-tools
fd3128
9bc273
%configure \
9bc273
    CFLAGS="%{optflags} -fno-strict-aliasing" \
9bc273
    --disable-dependency-tracking --enable-file-security --disable-intf-free
fd3128
make %{?_smp_mflags}
fd3128
fd3128
%install
fd3128
make DESTDIR=%{buildroot} install
fd3128
fd3128
install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/ipmievd.service
fd3128
install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/ipmievd
fd3128
install -Dm 644 %{SOURCE3} %{buildroot}%{_unitdir}/exchange-bmc-os-info.service
fd3128
install -Dm 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/exchange-bmc-os-info
fd3128
install -Dm 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/profile.d/set-bmc-url.sh
fd3128
install -Dm 755 %{SOURCE6} %{buildroot}%{_libexecdir}/exchange-bmc-os-info
fd3128
fd3128
fd3128
install -Dm 644 contrib/bmc-snmp-proxy.sysconf %{buildroot}%{_sysconfdir}/sysconfig/bmc-snmp-proxy
fd3128
install -Dm 644 contrib/bmc-snmp-proxy.service %{buildroot}%{_unitdir}/bmc-snmp-proxy.service
fd3128
install -Dm 755 contrib/bmc-snmp-proxy         %{buildroot}%{_libexecdir}/bmc-snmp-proxy
fd3128
fd3128
%post
fd3128
%systemd_post ipmievd.service
fd3128
fd3128
%preun
fd3128
%systemd_preun ipmievd.service
fd3128
fd3128
%postun
fd3128
%systemd_postun_with_restart ipmievd.service
fd3128
fd3128
%post -n exchange-bmc-os-info
fd3128
%systemd_post exchange-bmc-os-info.service
fd3128
fd3128
%preun -n exchange-bmc-os-info
fd3128
%systemd_preun exchange-bmc-os-info.service
fd3128
fd3128
%postun -n exchange-bmc-os-info
fd3128
%systemd_postun_with_restart exchange-bmc-os-info.service
fd3128
fd3128
fd3128
%triggerun -- ipmievd < 1.8.11-7
fd3128
# Save the current service runlevel info
fd3128
# User must manually run systemd-sysv-convert --apply ipmievd
fd3128
# to migrate them to systemd targets
fd3128
/usr/bin/systemd-sysv-convert --save ipmievd >/dev/null 2>&1 ||:
fd3128
fd3128
# Run these because the SysV package being removed won't do them
fd3128
/sbin/chkconfig --del ipmievd >/dev/null 2>&1 || :
fd3128
/bin/systemctl try-restart ipmievd.service >/dev/null 2>&1 || :
fd3128
fd3128
%files
fd3128
%config(noreplace) %{_sysconfdir}/sysconfig/ipmievd
fd3128
%{_unitdir}/ipmievd.service
fd3128
%{_bindir}/*
fd3128
%{_sbindir}/*
fd3128
%{_mandir}/man*/*
fd3128
%doc %{_datadir}/doc/ipmitool
fd3128
%{_datadir}/ipmitool
fd3128
fd3128
%files -n exchange-bmc-os-info
fd3128
%config(noreplace) %{_sysconfdir}/sysconfig/exchange-bmc-os-info
fd3128
%{_sysconfdir}/profile.d/set-bmc-url.sh
fd3128
%{_unitdir}/exchange-bmc-os-info.service
fd3128
%{_libexecdir}/exchange-bmc-os-info
fd3128
fd3128
%files -n bmc-snmp-proxy
fd3128
%config(noreplace) %{_sysconfdir}/sysconfig/bmc-snmp-proxy
fd3128
%{_unitdir}/bmc-snmp-proxy.service
fd3128
%{_libexecdir}/bmc-snmp-proxy
fd3128
fd3128
%changelog
9bc273
* Wed Mar 04 2020 Václav Doležal <vdolezal@redhat.com> - 0:1.8.18-9
9bc273
- Disable -fstrict-aliasing (RPMDiff issue)
9bc273
9bc273
* Tue Mar 03 2020 Václav Doležal <vdolezal@redhat.com> - 0:1.8.18-8
9bc273
- Backport fix for CVE-2020-5208
9bc273
fd3128
* Tue Feb 06 2018 Josef Ridky <jridky@redhat.com> - 0:1.8.18-7
fd3128
- Remove debug prints shown without -v option (#1483163)
fd3128
fd3128
* Tue Oct 03 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-6
fd3128
- Hide unrequested verbose output (#1483163)
fd3128
- Fix doc for check input values (#1495098)
fd3128
fd3128
* Mon Apr 10 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-5
fd3128
- Remove RPMDiff fix file (#1439269) related to #1398658
fd3128
fd3128
* Tue Feb 21 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-4
fd3128
- Fix RPMDiff issues and rebuild
fd3128
fd3128
* Thu Feb 16 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-3
fd3128
- Fix issues with warning: dereferencing type-punned pointer 
fd3128
  will break strict-aliasing rules from RPMDiff
fd3128
fd3128
* Mon Feb 13 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-2
fd3128
- Fix issue in file sources
fd3128
fd3128
* Thu Feb 02 2017 Josef Ridky <jridky@redhat.com> - 0:1.8.18-1
fd3128
- New upstream release 1.8.18 (#1398658)
fd3128
fd3128
* Tue May 03 2016 Boris Ranto <branto@redhat.com> - 0:1.8.15-7
fd3128
- New release (0:1.8.15-7)
fd3128
- ID:437 - sel: Fix "sel time set <time>"
fd3128
- ID 408 - fix sel list last X listing
fd3128
fd3128
* Thu Mar 24 2016 Boris Ranto <branto@redhat.com> - 1.8.15-6
fd3128
- Fix missing return in ipmi_kontronoem_main() - CID#1261317
fd3128
fd3128
* Fri Feb 19 2016 Boris Ranto <branto@redhat.com> - 1.8.15-5
fd3128
- allow to upgrade the latest HPM files using usb options
fd3128
- resolves: rhbz#1257316
fd3128
fd3128
* Thu Feb 18 2016 Boris Ranto <branto@redhat.com> - 1.8.15-4
fd3128
- use meaningful generator ID for ipmitool sel
fd3128
- resolves: rhbz#1289507
fd3128
fd3128
* Thu Feb 18 2016 Boris Ranto <branto@redhat.com> - 1.8.15-3
fd3128
- perform a hardened build
fd3128
- resolves: rhbz#1092551
fd3128
fd3128
* Thu Feb 18 2016 Boris Ranto <branto@redhat.com> - 1.8.15-2
fd3128
- avoid assert on mismatched session ID
fd3128
- resolves: rhbz#1286035
fd3128
fd3128
* Fri Dec 11 2015 Boris Ranto <branto@redhat.com> - 1.8.15-1
fd3128
- rebase to latest stable upstream version
fd3128
- resolves: rhbz#1269523
fd3128
fd3128
* Mon Mar 09 2015 Ales Ledvinka <aledvink@redhat.com> - 1.8.13-8
fd3128
- Chassis boot parameter settings support.
fd3128
fd3128
* Wed Mar 05 2014 Ales Ledvinka <aledvink@redhat.com> - 1.8.13-7
fd3128
- Allow setting channel Kg key.
fd3128
fd3128
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.8.13-6
fd3128
- Mass rebuild 2014-01-24
fd3128
fd3128
* Mon Jan 20 2014 Ales Ledvinka <aledvink@redhat.com> 1.8.13-5
fd3128
- bmc-snmp-proxy upstream bugfixes.
fd3128
fd3128
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.8.13-4
fd3128
- Mass rebuild 2013-12-27
fd3128
fd3128
* Tue Nov  5 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.13-3
fd3128
- Cleanup of dual bridge option.
fd3128
fd3128
* Tue Oct 15 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.13-2
fd3128
- BMC SNMP agent redirection
fd3128
fd3128
* Mon Oct 14 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.13-1
fd3128
- Upstream release 1.8.13
fd3128
fd3128
* Fri Aug 09 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.12-13073103
fd3128
- Avoid FIPS mode crashes if possible.
fd3128
- Document FIPS limitations.
fd3128
fd3128
* Wed Jul  31 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.12-13073101
fd3128
- Include current upstream bugfixes.
fd3128
fd3128
* Thu Jul 25 2013 Ales Ledvinka <aledvink@redhat.com> 1.8.12-16
fd3128
- Calxeda OEM extensions.
fd3128
fd3128
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.12-15
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fd3128
fd3128
* Mon Dec 17 2012 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.8.12-14
fd3128
- Updated the exchange-bmc-os-info's service file with Requires stmt
fd3128
fd3128
* Fri Dec 14 2012 Ales Ledvinka <aledvink@redhat.com> 1.8.12-13
fd3128
- fixed argument parsing leaks
fd3128
- ask user for password only once and do so only when interactive password
fd3128
  is the chosen password method.
fd3128
fd3128
* Thu Dec 13 2012 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.8.12-12
fd3128
- Removed the extra symbols in the patch, as the build is failing.
fd3128
fd3128
* Thu Dec 13 2012 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.8.12-11
fd3128
- Subpackage for exchange-bmc-os-info as it requires OPenIPMI
fd3128
fd3128
* Wed Dec 12 2012 Ales Ledvinka <aledvink@redhat.com> 1.8.12-10
fd3128
- documented fixed and conditional defaults. adjusted synopsis
fd3128
fd3128
* Tue Dec 4 2012 Ales Ledvinka <aledvink@redhat.com> 1.8.12-9
fd3128
- fixed ipmitool documentation
fd3128
fd3128
* Fri Nov 30 2012 Praveen K Paladugu <praveen_paladugu@dell.com> 1.8.12-8
fd3128
- service & scripts to allow OS to capture BMC's IP & URL info
fd3128
- Also pass the OS information to BMC
fd3128
- patches submitted by Charles Rose (charles_rose[at]dell.com)
fd3128
fd3128
* Fri Nov 16 2012 Ales Ledvinka <aledvink@redhat.com> 1.8.12-7
fd3128
- failed sol session activation crashes while logging exit
fd3128
fd3128
* Fri Nov 16 2012 Ales Ledvinka <aledvink@redhat.com> 1.8.12-6
fd3128
- revert default cipersuite back to 3 which includes integrity and confidentiality
fd3128
fd3128
* Thu Oct 18 2012 Dan Horák <dan[at]danny.cz> - 1.8.12-5
fd3128
- fix build on big endian arches
fd3128
fd3128
* Wed Oct 17 2012 Ales Ledvinka <aledvink@redhat.cz> 1.8.12-4
fd3128
- support setting OS name and Hostname on BMC
fd3128
fd3128
* Tue Sep 04 2012 Dan Horák <dan[at]danny.cz> - 1.8.12-3
fd3128
- fix build on big endian arches
fd3128
fd3128
* Mon Aug 27 2012 Jan Safranek <jsafrane@redhat.com> - 1.8.12-2
fd3128
- Fixed starting ipmievd under systemd (#819234).
fd3128
- Updated RPM scriplets with latest systemd-rpm macros (#850161)
fd3128
fd3128
* Fri Aug 10 2012 Jan Safranek <jsafrane@redhat.com> - 1.8.12-1
fd3128
- update to ipmitool-1.8.12
fd3128
fd3128
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-12
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fd3128
fd3128
* Tue May 22 2012 Jan Safranek <jsafrane@redhat.com> - 1.8.11-11
fd3128
- start ipmievd.service after ipmi (#819234)
fd3128
fd3128
* Thu Apr 26 2012 Jan Safranek <jsafrane@redhat.com> - 1.8.11-10
fd3128
- fixed ipmievd.service systemd unit (#807757)
fd3128
fd3128
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-9
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fd3128
fd3128
* Tue Dec 13 2011 Jan Safranek <jsafrane@redhat.com> - 1.8.11-8
fd3128
- fixed CVE-2011-4339
fd3128
fd3128
* Mon Sep 12 2011 Tom Callaway <spot@fedoraproject.org> - 1.8.11-7
fd3128
- convert to systemd
fd3128
fd3128
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-6
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
fd3128
fd3128
* Wed Mar  3 2010 Jan Safranek <jsafrane@redhat.com> - 1.8.11-5
fd3128
- Fixed exit code of ipmievd initscript with wrong arguments
fd3128
fd3128
* Mon Nov  2 2009 Jan Safranek  <jsafrane@redhat.com> 1.8.11-4
fd3128
- fix ipmievd initscript 'condrestart' action (#532188)
fd3128
fd3128
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.8.11-3
fd3128
- rebuilt with new openssl
fd3128
fd3128
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-2
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fd3128
fd3128
* Thu Feb 26 2009 Jan Safranek <jsafrane@redhat.com> 1.8.11-1
fd3128
- updated to new version
fd3128
fd3128
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.10-4
fd3128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
fd3128
fd3128
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> 1.8.10-3
fd3128
- rebuild with new openssl
fd3128
fd3128
* Tue Oct 14 2008 Jan Safranek <jsafrane@redhat.com> 1.8.10-2
fd3128
- fix issues found during package review:
fd3128
  - clear Default-Start: line in the init script, the service should be 
fd3128
    disabled by default
fd3128
  - added Obsoletes: OpenIPMI-tools
fd3128
  - compile with --disable-dependency-tracking to speed things up
fd3128
  - compile with --enable-file-security
fd3128
  - compile with --disable-intf-free, don't depend on FreeIPMI libraries
fd3128
    (FreeIPMI has its own ipmitool-like utility)
fd3128
fd3128
* Mon Oct 13 2008 Jan Safranek <jsafrane@redhat.com> 1.8.10-1
fd3128
- package created, based on upstream .spec file