Blame SPECS/ipmitool.spec

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