SHA256
1
0
forked from pool/ipmiutil

Accepting request 827047 from home:dirkmueller:branches:systemsmanagement

- update to 3.1.6:
  - add -fno-strict-aliasing flag
  - handle if dmidecode is missing
  - default to -V4 admin privilege for lan
  - show & clear GetSOL error if present
  - add decode_rv to ipmi_open errors
  - handle sensor type 0x17 (RSA II, Mem1) for SFBug#31
  - fixed (data1 & 0x0f) for BIOS POST events
  - add decode_mem_default routine for AMI,HP mem events
  - add acpi_ipmi module handling
  - add invalid type/len check for mult-record area
  - handle analog readings in HP discrete Fan sensors
  - added more SuperMicro boot events
  - ipv6 handling
  - skip overflow message if len=0
  - handle detecting NIC if default devnum is not 0
  - workaround for Pigeon Point bad sa in SDR
  - aarch64 fixes
  - show version with usage (-?) if no subcommand
- remove support for non-systemd distros, cleans up spec file
- remove warnings.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/827047
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmiutil?expand=0&rev=39
This commit is contained in:
Andy Cress 2020-09-08 16:03:26 +00:00 committed by Git OBS Bridge
parent 03015885ae
commit 81975516ab
5 changed files with 99 additions and 226 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:defc2fad88c184d953b5e37c42a95b0b14ed9772c097b00471e157be3e23542f
size 1694854

3
ipmiutil-3.1.6.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8814828c6c245140a5c867d8def8e88a72e90f67c79282008303de1c1d598e4a
size 1693461

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Sun Aug 16 14:04:56 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 3.1.6:
- add -fno-strict-aliasing flag
- handle if dmidecode is missing
- default to -V4 admin privilege for lan
- show & clear GetSOL error if present
- add decode_rv to ipmi_open errors
- handle sensor type 0x17 (RSA II, Mem1) for SFBug#31
- fixed (data1 & 0x0f) for BIOS POST events
- add decode_mem_default routine for AMI,HP mem events
- add acpi_ipmi module handling
- add invalid type/len check for mult-record area
- handle analog readings in HP discrete Fan sensors
- added more SuperMicro boot events
- ipv6 handling
- skip overflow message if len=0
- handle detecting NIC if default devnum is not 0
- workaround for Pigeon Point bad sa in SDR
- aarch64 fixes
- show version with usage (-?) if no subcommand
- remove support for non-systemd distros, cleans up spec file
- remove warnings.patch (upstream)
-------------------------------------------------------------------
Mon Feb 3 13:59:17 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -17,39 +17,23 @@
#
%{!?_unitdir: %define _unitdir %{_prefix}/lib/systemd/system}
Name: ipmiutil
Version: 3.0.7
Release: 1%{?dist}
Version: 3.1.6
Release: 0
Summary: Easy-to-use IPMI server management utilities
License: BSD-3-Clause
Group: System/Management
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
URL: http://ipmiutil.sourceforge.net
Patch0: warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?sles_version} > 10
%define bldreq0 libopenssl-devel
%else
%define bldreq0 openssl-devel
%endif
%if 0%{?suse_version} >= 1210
%define req_systemd 1
%endif
%{!?_unitdir: %define _unitdir /usr/lib/systemd/system}
%define unit_dir %{_unitdir}
%if 0%{?req_systemd}
BuildRequires: pkgconfig(systemd)
%define systemd_fls %{_unitdir}
%else
%define systemd_fls %{_datadir}/%{name}
%endif
BuildRequires: autoconf automake %{bldreq0}
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: perl(Exporter)
%define init_dir %{_initrddir}
BuildRequires: pkgconfig(systemd)
%description
The ipmiutil package provides easy-to-use utilities to view the SEL,
@ -83,26 +67,16 @@ useful for building custom IPMI applications.
%prep
%setup -q
%patch0 -p1
%build
autoreconf -fiv
%if 0%{?req_systemd}
%configure --enable-systemd
%else
%configure
%endif
make
%make_build
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%clean
rm -rf %{buildroot}
%make_install
%files
%defattr(-, root, root, -)
%dir %{_datadir}/%{name}
%dir %{_var}/lib/%{name}
%{_bindir}/ipmiutil
@ -134,50 +108,51 @@ rm -rf %{buildroot}
%{_datadir}/%{name}/ipmi_port
%{_datadir}/%{name}/ipmi_info
%{_datadir}/%{name}/checksel
%{systemd_fls}/ipmiutil_evt.service
%{systemd_fls}/ipmiutil_asy.service
%{systemd_fls}/ipmiutil_wdt.service
%{systemd_fls}/ipmi_port.service
%{_datadir}/%{name}/ipmiutil.env
%{_unitdir}/ipmiutil_evt.service
%{_unitdir}/ipmiutil_asy.service
%{_unitdir}/ipmiutil_wdt.service
%{_unitdir}/ipmi_port.service
%{_datadir}/%{name}/ipmiutil.pre
%{_datadir}/%{name}/ipmiutil.setup
%{_datadir}/%{name}/ipmi_if.sh
%{_datadir}/%{name}/evt.sh
%{_datadir}/%{name}/ipmi.init.basic
%{_datadir}/%{name}/bmclanpet.mib
%{_mandir}/man8/isel.8*
%{_mandir}/man8/isensor.8*
%{_mandir}/man8/ireset.8*
%{_mandir}/man8/igetevent.8*
%{_mandir}/man8/ihealth.8*
%{_mandir}/man8/iconfig.8*
%{_mandir}/man8/ialarms.8*
%{_mandir}/man8/iwdt.8*
%{_mandir}/man8/ilan.8*
%{_mandir}/man8/iserial.8*
%{_mandir}/man8/ifru.8*
%{_mandir}/man8/icmd.8*
%{_mandir}/man8/isol.8*
%{_mandir}/man8/ipmiutil.8*
%{_mandir}/man8/idiscover.8*
%{_mandir}/man8/ievents.8*
%{_mandir}/man8/ipmi_port.8*
%{_mandir}/man8/ipicmg.8*
%{_mandir}/man8/ifirewall.8*
%{_mandir}/man8/ifwum.8*
%{_mandir}/man8/ihpm.8*
%{_mandir}/man8/isunoem.8*
%{_mandir}/man8/idelloem.8*
%{_mandir}/man8/ismcoem.8*
%{_mandir}/man8/iekanalyzer.8*
%{_mandir}/man8/itsol.8*
%{_mandir}/man8/idcmi.8*
%{_mandir}/man8/iuser.8*
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_datadir}/%{name}/ipmiutil.env.template
%{_mandir}/man8/isel.8%{?ext_man}
%{_mandir}/man8/isensor.8%{?ext_man}
%{_mandir}/man8/ireset.8%{?ext_man}
%{_mandir}/man8/igetevent.8%{?ext_man}
%{_mandir}/man8/ihealth.8%{?ext_man}
%{_mandir}/man8/iconfig.8%{?ext_man}
%{_mandir}/man8/ialarms.8%{?ext_man}
%{_mandir}/man8/iwdt.8%{?ext_man}
%{_mandir}/man8/ilan.8%{?ext_man}
%{_mandir}/man8/iserial.8%{?ext_man}
%{_mandir}/man8/ifru.8%{?ext_man}
%{_mandir}/man8/icmd.8%{?ext_man}
%{_mandir}/man8/isol.8%{?ext_man}
%{_mandir}/man8/ipmiutil.8%{?ext_man}
%{_mandir}/man8/idiscover.8%{?ext_man}
%{_mandir}/man8/ievents.8%{?ext_man}
%{_mandir}/man8/ipmi_port.8%{?ext_man}
%{_mandir}/man8/ipicmg.8%{?ext_man}
%{_mandir}/man8/ifirewall.8%{?ext_man}
%{_mandir}/man8/ifwum.8%{?ext_man}
%{_mandir}/man8/ihpm.8%{?ext_man}
%{_mandir}/man8/isunoem.8%{?ext_man}
%{_mandir}/man8/idelloem.8%{?ext_man}
%{_mandir}/man8/ismcoem.8%{?ext_man}
%{_mandir}/man8/iseltime.8%{?ext_man}
%{_mandir}/man8/iekanalyzer.8%{?ext_man}
%{_mandir}/man8/itsol.8%{?ext_man}
%{_mandir}/man8/idcmi.8%{?ext_man}
%{_mandir}/man8/iuser.8%{?ext_man}
%license COPYING
%doc AUTHORS ChangeLog NEWS README TODO
%doc doc/UserGuide
%files devel
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/ipmi_sample.c
%{_datadir}/%{name}/ipmi_sample_evt.c
@ -191,19 +166,12 @@ rm -rf %{buildroot}
%{_includedir}/ipmicmd.h
%files static
%defattr(-,root,root)
%{_libdir}/libipmiutil.a
%post devel
/sbin/ldconfig
%postun devel
/sbin/ldconfig
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%pre
%if 0%{?req_systemd}
%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%endif
%post
# POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U
@ -214,24 +182,7 @@ then
vardir=%{_var}/lib/%{name}
scr_dir=%{_datadir}/%{name}
%if 0%{?req_systemd}
%service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%else
if [ -x /bin/systemctl ] && [ -d %{unit_dir} ]; then
echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env
cp -f ${scr_dir}/ipmiutil_evt.service %{unit_dir}
cp -f ${scr_dir}/ipmiutil_asy.service %{unit_dir}
cp -f ${scr_dir}/ipmiutil_wdt.service %{unit_dir}
cp -f ${scr_dir}/ipmi_port.service %{unit_dir}
# systemctl enable ipmi_port.service >/dev/null 2>&1 || :
else
cp -f ${scr_dir}/ipmiutil_wdt %{init_dir}
cp -f ${scr_dir}/ipmiutil_asy %{init_dir}
cp -f ${scr_dir}/ipmiutil_evt %{init_dir}
cp -f ${scr_dir}/ipmi_port %{init_dir}
cp -f ${scr_dir}/ipmi_info %{init_dir}
fi
%endif
# Test whether an IPMI interface is known to the motherboard
IPMIret=1
@ -244,15 +195,15 @@ then
# some kernels may have IPMI driver partially loaded, which breaks this
%{_bindir}/ipmiutil sel -v >/dev/null 2>&1 && IPMIret=0
if [ $IPMIret -eq 0 ]; then
if [ ! -x %{init_dir}/ipmi ]; then
cp -f %{scr_dir}/ipmi.init.basic %{init_dir}/ipmi
if [ ! -x %{_initddir}/ipmi ]; then
cp -f %{scr_dir}/ipmi.init.basic %{_initddir}/ipmi
fi
# If IPMI is enabled, automate managing the IPMI SEL
if [ -d %{_sysconfdir}/cron.daily ]; then
cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily
fi
# IPMI_IS_ENABLED, so enable services, but only if Red Hat
if [ -f /etc/redhat-release ]; then
if [ -f %{_sysconfdir}/redhat-release ]; then
if [ -x /bin/systemctl ]; then
touch ${scr_dir}/ipmi_port.service
elif [ -x /sbin/chkconfig ]; then
@ -293,35 +244,7 @@ fi
# before uninstall, $1 = 1 if rpm -U, $1 = 0 if rpm -e
if [ "$1" = "0" ]
then
%if 0%{?req_systemd}
%service_del_preun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%else
if [ -x /bin/systemctl ]; then
if [ -f %{unit_dir}/ipmiutil_evt.service ]; then
systemctl disable ipmi_port.service >/dev/null 2>&1 || :
systemctl disable ipmiutil_evt.service >/dev/null 2>&1 || :
systemctl disable ipmiutil_asy.service >/dev/null 2>&1 || :
systemctl disable ipmiutil_wdt.service >/dev/null 2>&1 || :
systemctl stop ipmiutil_evt.service >/dev/null 2>&1 || :
systemctl stop ipmiutil_asy.service >/dev/null 2>&1 || :
systemctl stop ipmiutil_wdt.service >/dev/null 2>&1 || :
systemctl stop ipmi_port.service >/dev/null 2>&1 || :
fi
else
if [ -x /sbin/service ]; then
/sbin/service ipmi_port stop >/dev/null 2>&1 || :
/sbin/service ipmiutil_wdt stop >/dev/null 2>&1 || :
/sbin/service ipmiutil_asy stop >/dev/null 2>&1 || :
/sbin/service ipmiutil_evt stop >/dev/null 2>&1 || :
fi
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del ipmi_port >/dev/null 2>&1 || :
/sbin/chkconfig --del ipmiutil_wdt >/dev/null 2>&1 || :
/sbin/chkconfig --del ipmiutil_asy >/dev/null 2>&1 || :
/sbin/chkconfig --del ipmiutil_evt >/dev/null 2>&1 || :
fi
fi
%endif
if [ -f %{_sysconfdir}/cron.daily/checksel ]; then
rm -f %{_sysconfdir}/cron.daily/checksel
fi
@ -330,29 +253,6 @@ fi
%postun
# after uninstall, $1 = 1 if update, $1 = 0 if rpm -e
/sbin/ldconfig
%if 0%{?req_systemd}
%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%else
if [ -x /bin/systemctl ]; then
systemctl daemon-reload || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
systemctl try-restart ipmi_port.service || :
fi
if [ -f %{unit_dir}/ipmiutil_evt.service ]; then
rm -f %{unit_dir}/ipmiutil_evt.service 2>/dev/null || :
rm -f %{unit_dir}/ipmiutil_asy.service 2>/dev/null || :
rm -f %{unit_dir}/ipmiutil_wdt.service 2>/dev/null || :
rm -f %{unit_dir}/ipmi_port.service 2>/dev/null || :
fi
else
if [ -f %{init_dir}/ipmiutil_evt.service ]; then
rm -f %{init_dir}/ipmiutil_wdt 2>/dev/null || :
rm -f %{init_dir}/ipmiutil_asy 2>/dev/null || :
rm -f %{init_dir}/ipmiutil_evt 2>/dev/null || :
rm -f %{init_dir}/ipmi_port 2>/dev/null || :
fi
fi
%endif
%changelog

View File

@ -1,52 +0,0 @@
--- ipmiutil-3.0.7/configure.ac 2017-09-20 11:08:20.000000000 -0400
+++ ipmiutil-new/configure.ac 2017-12-05 14:10:10.773545568 -0500
@@ -342,6 +342,17 @@
echo "ok, suppress excess warnings"
fi
rm -f $tmpc $tmpo >/dev/null 2>&1
+ echo $ECHO_N "checking strict aliasing warning flags ... $ECHO_C"
+ cfalias="-fno-strict-aliasing"
+ echo "int main() { return(1); }" >$tmpc
+ $CC -o $tmpo -c $cfalias $tmpc >/dev/null 2>&1
+ if test $? -ne 0 ; then
+ cfalias=
+ echo "skip"
+ else
+ echo "ok, suppress aliasing warnings"
+ fi
+ rm -f $tmpc $tmpo >/dev/null 2>&1
echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
echo "int main() { alloca(100); return(1); }" >$tmpc
@@ -405,16 +416,19 @@
sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts
fi
# The openssl rpm might not be installed
+ sslver=""
which rpm >/dev/null 2>&1
if test $? -eq 0 ; then
sslver=`rpm -q openssl-devel |cut -f3 -d'-' |cut -f1-2 -d'.'`
- else
- sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'`
- fi
+ fi
+ if test "$sslver" = ""; then
+ sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'`
+ fi
if test "$sslver" = "1.1"; then
echo "Detected openssl-$sslver"
MD2_CFLAGS="-DSKIP_MD2 -DSSL11"
else
+ echo "Detected openssl-$sslver"
if test -f "$LIB_DIR/libcrypto.so"; then
strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1
if test $? -ne 0; then
@@ -426,7 +440,7 @@
MD2_CFLAGS="-DSKIP_MD2"
fi
fi
- OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfhard"
+ OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfalias $cfhard"
else
macos=1 # =1 means not mac
# usually "x$sysname" = "xFreeBSD", but allow NetBSD