Accepting request 339092 from systemsmanagement
- Update to latest ipmitool source code commit 999cd0ad9192b19ec57574e7aca111571f4d21d8 Date: Fri Mar 6 09:03:05 2015 -0600 and throw away patches that went mainline. * Remove: fix_dell_oem_exitcode - Add correct exit code on Dell specific commands which did not get mainline yet (bnc#886184) * Add patch: fix_dell_oem_exitcode - Update to latest ipmitool sources. This is version 1.8.15 (git tag: IPMITOOL_1_8_15) plus mainline patches up to commit 708be8bc450f907cddb6d9e4b83aee6ba67b7d04 Date: Fri Jan 9 12:48:35 2015 +0100 * Add: latest_compile_fixes.patch * Add: ipmitool-1_8_15_HEAD.patch * Remove: automake-1.13.patch * Remove: sdradd_close_file_handle.patch * Remove: ipmitool-1.8.10-implicit-fortify-decl.patch OBS-URL: https://build.opensuse.org/request/show/339092 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ipmitool?expand=0&rev=30
This commit is contained in:
commit
e45873fca8
@ -8,10 +8,10 @@ Subject: [PATCH] Incorporate upstream comments to #289, add whitespace, other
|
||||
contrib/bmc-snmp-proxy | 130 +++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 76 insertions(+), 54 deletions(-)
|
||||
|
||||
diff --git a/contrib/bmc-snmp-proxy b/contrib/bmc-snmp-proxy
|
||||
index 1704ef3..98479b9 100644
|
||||
--- a/contrib/bmc-snmp-proxy
|
||||
+++ b/contrib/bmc-snmp-proxy
|
||||
Index: ipmitool-1.8.15/contrib/bmc-snmp-proxy
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/contrib/bmc-snmp-proxy 2015-01-14 14:34:05.488699284 +0100
|
||||
+++ ipmitool-1.8.15/contrib/bmc-snmp-proxy 2015-01-14 14:34:05.508699284 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# bmc-snmp-proxy: Set SNMP proxy to BMC (Baseboard Management Controller)
|
||||
@ -21,7 +21,7 @@ index 1704ef3..98479b9 100644
|
||||
#
|
||||
# Authors: Charles Rose <charles_rose@dell.com>
|
||||
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||
@@ -20,9 +20,9 @@
|
||||
@@ -24,9 +24,9 @@
|
||||
SYSCONF_DIR="/etc/sysconfig"
|
||||
CONFIG="${SYSCONF_DIR}/bmc-snmp-proxy"
|
||||
|
||||
@ -34,7 +34,7 @@ index 1704ef3..98479b9 100644
|
||||
|
||||
TRAPD_CONF="/etc/snmp/snmptrapd.conf"
|
||||
|
||||
@@ -57,14 +57,16 @@ bmc_info_exists()
|
||||
@@ -61,14 +61,16 @@
|
||||
else
|
||||
RETVAL=2
|
||||
fi
|
||||
@ -52,7 +52,7 @@ index 1704ef3..98479b9 100644
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
@@ -77,11 +79,12 @@ write_snmp_conf()
|
||||
@@ -81,11 +83,12 @@
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "###############################################\n"
|
||||
@ -70,7 +70,7 @@ index 1704ef3..98479b9 100644
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
@@ -92,6 +95,7 @@ valid_ip()
|
||||
@@ -96,6 +99,7 @@
|
||||
|
||||
printf -- "%s" "${1}"| grep -Eq \
|
||||
"^${octet}\\.${octet}\\.${octet}\\.${octet}$"
|
||||
@ -78,7 +78,7 @@ index 1704ef3..98479b9 100644
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -112,37 +116,38 @@ set_snmp_proxy()
|
||||
@@ -116,37 +120,38 @@
|
||||
if check_vars; then
|
||||
PROXY_TOKEN="-c ${BMC_COMMUNITY} ${BMC_IPv4} ${BMC_OID}"
|
||||
|
||||
@ -132,7 +132,7 @@ index 1704ef3..98479b9 100644
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
@@ -152,6 +157,7 @@ disable_snmp_proxy()
|
||||
@@ -156,6 +161,7 @@
|
||||
pick_alert_dest()
|
||||
{
|
||||
test_ip="$1"
|
||||
@ -140,7 +140,7 @@ index 1704ef3..98479b9 100644
|
||||
for ALERT_DEST in `seq 1 4`
|
||||
do
|
||||
temp_ip=$(${IPMITOOL} lan alert print ${CHANNEL} ${ALERT_DEST}\
|
||||
@@ -165,12 +171,12 @@ pick_alert_dest()
|
||||
@@ -169,12 +175,12 @@
|
||||
set_alert_dest_ip()
|
||||
{
|
||||
${IPMITOOL} lan alert set ${CHANNEL} ${ALERT_DEST} ipaddr ${1} \
|
||||
@ -156,7 +156,7 @@ index 1704ef3..98479b9 100644
|
||||
# Pick the first active LAN channel
|
||||
for CHANNEL in `seq 1 14`
|
||||
do
|
||||
@@ -180,12 +186,12 @@ bmc_alert_dest()
|
||||
@@ -184,12 +190,12 @@
|
||||
|
||||
# If TRAPD_IP is already set as an alert dest,
|
||||
if pick_alert_dest "${TRAPD_IP}"; then
|
||||
@ -172,7 +172,7 @@ index 1704ef3..98479b9 100644
|
||||
return $RETVAL
|
||||
# set: the TRAPD_IP
|
||||
set_alert_dest_ip "${TRAPD_IP}"
|
||||
@@ -193,42 +199,54 @@ bmc_alert_dest()
|
||||
@@ -197,42 +203,54 @@
|
||||
# No free alert destinations
|
||||
RETVAL=9
|
||||
fi
|
||||
@ -236,7 +236,7 @@ index 1704ef3..98479b9 100644
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
@@ -236,10 +254,9 @@ config_trapd()
|
||||
@@ -240,10 +258,9 @@
|
||||
{
|
||||
# Proceed only if snmptrapd is available on the system
|
||||
if [ -f ${TRAPD_CONF} ]; then
|
||||
@ -249,7 +249,7 @@ index 1704ef3..98479b9 100644
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -249,6 +266,7 @@ trap_sink_exists()
|
||||
@@ -253,6 +270,7 @@
|
||||
# multiple
|
||||
FORWARD_HOST=$(awk '/^trap.*sink/{print $2}; /^informsink/{print $2}' \
|
||||
/etc/snmp/snmpd*conf | head -1)
|
||||
@ -257,7 +257,7 @@ index 1704ef3..98479b9 100644
|
||||
if [ -z "${FORWARD_HOST}" ]; then
|
||||
# there is no trapsink setup.
|
||||
return 1
|
||||
@@ -261,19 +279,20 @@ trap_sink_exists()
|
||||
@@ -265,19 +283,20 @@
|
||||
trap_forward()
|
||||
{
|
||||
NO_TRAP=0
|
||||
@ -283,7 +283,7 @@ index 1704ef3..98479b9 100644
|
||||
else
|
||||
NO_TRAP=1
|
||||
fi
|
||||
@@ -288,7 +307,6 @@ service_reload()
|
||||
@@ -292,7 +311,6 @@
|
||||
service $1 reload
|
||||
[ $? -ne 0 ] && RETVAL=6
|
||||
fi
|
||||
@ -291,7 +291,7 @@ index 1704ef3..98479b9 100644
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
@@ -296,11 +314,12 @@ start()
|
||||
@@ -300,11 +318,12 @@
|
||||
{
|
||||
if bmc_info_exists && check_snmp; then
|
||||
touch ${LOCKFILE}
|
||||
@ -305,7 +305,7 @@ index 1704ef3..98479b9 100644
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
@@ -316,10 +335,11 @@ stop()
|
||||
@@ -320,10 +339,11 @@
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
@ -318,7 +318,7 @@ index 1704ef3..98479b9 100644
|
||||
rm -f ${LOCKFILE}
|
||||
fi
|
||||
}
|
||||
@@ -329,12 +349,13 @@ status()
|
||||
@@ -333,12 +353,13 @@
|
||||
{
|
||||
eval_gettext "${SCRIPT_NAME}: snmp proxy to BMC is "
|
||||
# Checking for lockfile is better.
|
||||
@ -333,7 +333,7 @@ index 1704ef3..98479b9 100644
|
||||
echo
|
||||
RETVAL=0
|
||||
}
|
||||
@@ -360,10 +381,10 @@ case "$RETVAL" in
|
||||
@@ -364,10 +385,10 @@
|
||||
0|1) ;;
|
||||
2) eval_gettext "${SCRIPT_NAME}: failed to read ${BMC_INFO} " 1>&2 ;;
|
||||
3) eval_gettext "${SCRIPT_NAME}: failed to get proxy config." 1>&2 ;;
|
||||
@ -346,7 +346,7 @@ index 1704ef3..98479b9 100644
|
||||
8) eval_gettext "${SCRIPT_NAME}: failed to set IPMI alert dest." 1>&2 ;;
|
||||
9) eval_gettext "${SCRIPT_NAME}: no free IPMI alert dest." 1>&2 ;;
|
||||
10) eval_gettext "${SCRIPT_NAME}: failed to set IPMI PEF." 1>&2 ;;
|
||||
@@ -375,6 +396,7 @@ esac
|
||||
@@ -379,6 +400,7 @@
|
||||
if [ ${RETVAL} -gt 1 ]; then
|
||||
eval_gettext " Return code: ${RETVAL}"; echo
|
||||
fi
|
||||
@ -354,6 +354,3 @@ index 1704ef3..98479b9 100644
|
||||
exit ${RETVAL}
|
||||
#############################################################################
|
||||
# end of file
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
Index: ipmitool-1.8.13/configure.in
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/configure.in
|
||||
+++ ipmitool-1.8.13/configure.in
|
||||
@@ -4,7 +4,7 @@ dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.13-cvs])
|
||||
-AM_CONFIG_HEADER(config.h)
|
||||
+AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
AC_SUBST(ac_configure_args)
|
@ -1,8 +1,8 @@
|
||||
Index: ipmitool-1.8.13/lib/helper.c
|
||||
Index: ipmitool-1.8.15/lib/helper.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/helper.c
|
||||
+++ ipmitool-1.8.13/lib/helper.c
|
||||
@@ -657,7 +657,6 @@ ipmi_start_daemon(struct ipmi_intf *intf
|
||||
--- ipmitool-1.8.15.orig/lib/helper.c 2015-01-14 14:28:25.104693872 +0100
|
||||
+++ ipmitool-1.8.15/lib/helper.c 2015-01-14 14:28:30.392693957 +0100
|
||||
@@ -659,7 +659,6 @@
|
||||
#endif
|
||||
|
||||
chdir("/");
|
||||
@ -10,11 +10,11 @@ Index: ipmitool-1.8.13/lib/helper.c
|
||||
|
||||
for (fd=0; fd<64; fd++) {
|
||||
if (fd != intf->fd)
|
||||
Index: ipmitool-1.8.13/src/ipmievd.c
|
||||
Index: ipmitool-1.8.15/src/ipmievd.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/src/ipmievd.c
|
||||
+++ ipmitool-1.8.13/src/ipmievd.c
|
||||
@@ -700,6 +700,7 @@ ipmievd_main(struct ipmi_event_intf * ei
|
||||
--- ipmitool-1.8.15.orig/src/ipmievd.c 2015-01-14 14:28:25.112693873 +0100
|
||||
+++ ipmitool-1.8.15/src/ipmievd.c 2015-01-14 14:28:30.392693957 +0100
|
||||
@@ -701,6 +701,7 @@
|
||||
int i, rc;
|
||||
int daemon = 1;
|
||||
struct sigaction act;
|
||||
@ -22,7 +22,7 @@ Index: ipmitool-1.8.13/src/ipmievd.c
|
||||
|
||||
memset(pidfile, 0, 64);
|
||||
sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
|
||||
@@ -761,8 +762,9 @@ ipmievd_main(struct ipmi_event_intf * ei
|
||||
@@ -762,8 +763,9 @@
|
||||
|
||||
ipmi_start_daemon(eintf->intf);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: ipmitool-1.8.13/lib/ipmi_fwum.c
|
||||
Index: ipmitool-1.8.15/lib/ipmi_fwum.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_fwum.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_fwum.c
|
||||
@@ -1102,12 +1102,14 @@ ipmi_kfwum_checkfwcompat(tKFWUM_BoardInf
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_fwum.c 2015-01-14 14:28:25.108693872 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_fwum.c 2015-01-14 14:28:27.080693904 +0100
|
||||
@@ -1099,12 +1099,14 @@
|
||||
int compatible = 0;
|
||||
if (boardInfo.iana != firmInfo.iana) {
|
||||
lprintf(LOG_ERR,
|
||||
@ -19,7 +19,7 @@ Index: ipmitool-1.8.13/lib/ipmi_fwum.c
|
||||
compatible = (-1);
|
||||
}
|
||||
if (compatible != 0) {
|
||||
@@ -1125,6 +1127,10 @@ printf_kfwum_info(tKFWUM_BoardInfo board
|
||||
@@ -1122,6 +1124,10 @@
|
||||
printf(
|
||||
"Target IANA number : %u\n", boardInfo.iana);
|
||||
printf(
|
||||
|
@ -6,8 +6,8 @@ forwardported from 1.8.10 to 1.8.11.
|
||||
|
||||
Index: lib/ipmi_sdradd.c
|
||||
===================================================================
|
||||
--- lib/ipmi_sdradd.c.orig
|
||||
+++ lib/ipmi_sdradd.c
|
||||
--- lib/ipmi_sdradd.c.orig 2015-01-14 15:38:00.728760259 +0100
|
||||
+++ lib/ipmi_sdradd.c 2015-01-14 15:38:11.500760430 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
@ -18,8 +18,8 @@ Index: lib/ipmi_sdradd.c
|
||||
#include <ipmitool/log.h>
|
||||
Index: lib/ipmi_hpmfwupg.c
|
||||
===================================================================
|
||||
--- lib/ipmi_hpmfwupg.c.orig
|
||||
+++ lib/ipmi_hpmfwupg.c
|
||||
--- lib/ipmi_hpmfwupg.c.orig 2015-01-14 15:38:00.728760259 +0100
|
||||
+++ lib/ipmi_hpmfwupg.c 2015-01-14 15:38:11.504760430 +0100
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "../src/plugins/lan/md5.h"
|
||||
#include <stdio.h>
|
||||
@ -29,15 +29,24 @@ Index: lib/ipmi_hpmfwupg.c
|
||||
#include <sys/param.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
Index: configure.in
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.in.orig
|
||||
+++ configure.in
|
||||
@@ -25,6 +25,7 @@ AC_CHECK_HEADERS([sys/byteorder.h bytesw
|
||||
--- configure.ac.orig 2015-01-14 15:38:00.728760259 +0100
|
||||
+++ configure.ac 2015-01-14 16:29:03.744808956 +0100
|
||||
@@ -25,6 +25,7 @@
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
+AC_GNU_SOURCE
|
||||
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_STRTOD
|
||||
@@ -32,7 +33,7 @@
|
||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||
AC_CHECK_FUNCS([getpassphrase])
|
||||
|
||||
-CFLAGS="$CFLAGS -Wall -Wextra -std=c99 -pedantic -Wformat -Wformat-nonliteral"
|
||||
+CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type -std=c99"
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
LIBTOOL="$LIBTOOL --silent"
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:df2f7f44b6f72db87fb33e99a7df02ae2dec6cf915322b9bab0c0745bf8d5748
|
||||
size 426220
|
3
ipmitool-1.8.15.tar.bz2
Normal file
3
ipmitool-1.8.15.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4acd2df5f8740fef5c032cebee0113ec4d3bbef04a6f4dbfaf7fcc7f3eb08c40
|
||||
size 747174
|
14169
ipmitool-1_8_15_HEAD.patch
Normal file
14169
ipmitool-1_8_15_HEAD.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,32 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 14 16:02:43 UTC 2015 - trenn@suse.de
|
||||
|
||||
- Update to latest ipmitool source code
|
||||
commit 999cd0ad9192b19ec57574e7aca111571f4d21d8
|
||||
Date: Fri Mar 6 09:03:05 2015 -0600
|
||||
and throw away patches that went mainline.
|
||||
* Remove: fix_dell_oem_exitcode
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 11 15:21:40 UTC 2015 - trenn@suse.de
|
||||
|
||||
- Add correct exit code on Dell specific commands which did not get mainline
|
||||
yet (bnc#886184)
|
||||
* Add patch: fix_dell_oem_exitcode
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 15 13:56:40 UTC 2015 - trenn@suse.de
|
||||
|
||||
- Update to latest ipmitool sources.
|
||||
This is version 1.8.15 (git tag: IPMITOOL_1_8_15) plus mainline patches up
|
||||
to commit 708be8bc450f907cddb6d9e4b83aee6ba67b7d04
|
||||
Date: Fri Jan 9 12:48:35 2015 +0100
|
||||
* Add: latest_compile_fixes.patch
|
||||
* Add: ipmitool-1_8_15_HEAD.patch
|
||||
* Remove: automake-1.13.patch
|
||||
* Remove: sdradd_close_file_handle.patch
|
||||
* Remove: ipmitool-1.8.10-implicit-fortify-decl.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 6 11:50:59 UTC 2014 - trenn@suse.de
|
||||
|
||||
|
@ -27,19 +27,20 @@ Url: http://ipmitool.sourceforge.net/
|
||||
Summary: Utility for IPMI Control
|
||||
License: BSD-3-Clause
|
||||
Group: System/Management
|
||||
Version: 1.8.13
|
||||
Version: 1.8.15
|
||||
Release: 0
|
||||
Source: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
||||
Source1: ipmievd.service
|
||||
Source2: ipmievd.sysconf
|
||||
Patch1: ipmitool-1.8.10-implicit-fortify-decl.patch
|
||||
Patch1: ipmitool-1_8_15_HEAD.patch
|
||||
Patch3: fwum_enhance_output.patch
|
||||
Patch4: sdradd_close_file_handle.patch
|
||||
Patch6: fix_file_permissions.patch
|
||||
Patch8: several_more_compile_fixes.patch
|
||||
Patch9: automake-1.13.patch
|
||||
Patch10: ipmitool_adjust_suse.paths
|
||||
Patch11: 0001-Incorporate-upstream-comments-to-289-add-whitespace.patch
|
||||
Patch9: ipmitool_adjust_suse.paths
|
||||
Patch10: 0001-Incorporate-upstream-comments-to-289-add-whitespace.patch
|
||||
Patch11: ipmitool-1.8.10-implicit-fortify-decl.patch
|
||||
Patch12: latest_compile_fixes.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# bmc-snmp-proxy needs /usr/sbin/snmpd
|
||||
Requires: net-snmp
|
||||
@ -66,14 +67,14 @@ and setting LAN configuration, and chassis power control.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p0
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch11 -p0
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
touch INSTALL NEWS
|
||||
@ -90,18 +91,18 @@ install -D -m 0755 contrib/exchange-bmc-os-info.init.redhat "$RPM_BUILD_ROOT\
|
||||
"/%{_sbindir}/exchange-bmc-os-info
|
||||
install -D -m 0644 contrib/exchange-bmc-os-info.service.redhat "$RPM_BUILD_ROOT"/usr/lib/systemd/system/exchange-bmc-os-info.service
|
||||
install -D -m 0644 contrib/exchange-bmc-os-info.sysconf "$RPM_BUILD_ROOT"/%{_sysconfdir}/exchange-bmc-os-info
|
||||
#ln -s /etc/init.d/exchange-bmc-os-info $RPM_BUILD_ROOT/%{_sbindir}/rcexchange-bmc-os-info
|
||||
ln -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcexchange-bmc-os-info
|
||||
|
||||
# ipmievd service
|
||||
install -D -m 644 %{S:1} "$RPM_BUILD_ROOT"/usr/lib/systemd/system/ipmievd.service
|
||||
install -D -m 644 %{S:2} "$RPM_BUILD_ROOT"/%{_sysconfdir}/ipmievd
|
||||
#ln -s %{_sbindir}/ipmievd $RPM_BUILD_ROOT/%{_sbindir}/ipmievd
|
||||
ln -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcipmievd
|
||||
|
||||
# bmc-snmp-proxy
|
||||
install -D -m 755 contrib/bmc-snmp-proxy "$RPM_BUILD_ROOT"/%{_sbindir}/bmc-snmp-proxy
|
||||
install -D -m 644 contrib/bmc-snmp-proxy.service "$RPM_BUILD_ROOT"/usr/lib/systemd/system/bmc-snmp-proxy.service
|
||||
install -D -m 755 contrib/bmc-snmp-proxy.sysconf "$RPM_BUILD_ROOT"/%{_sysconfdir}/bmc-snmp-proxy
|
||||
#ln -s /etc/init.d/bmc-snmp-proxy $RPM_BUILD_ROOT/%{_sbindir}/rcbmc-snmp-proxy
|
||||
ln -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcbmc-snmp-proxy
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -126,14 +127,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(755,root,root) %{_sbindir}/ipmievd
|
||||
%attr(755,root,root) %{_sbindir}/exchange-bmc-os-info
|
||||
%attr(755,root,root) %{_sbindir}/bmc-snmp-proxy
|
||||
%{_sbindir}/rcipmievd
|
||||
%{_sbindir}/rcexchange-bmc-os-info
|
||||
%{_sbindir}/rcbmc-snmp-proxy
|
||||
%config(noreplace) %{_sysconfdir}/exchange-bmc-os-info
|
||||
%config(noreplace) %{_sysconfdir}/bmc-snmp-proxy
|
||||
%config(noreplace) %{_sysconfdir}/ipmievd
|
||||
%{_prefix}/lib/systemd/system/exchange-bmc-os-info.service
|
||||
%{_prefix}/lib/systemd/system/ipmievd.service
|
||||
%{_prefix}/lib/systemd/system/bmc-snmp-proxy.service
|
||||
|
||||
#%{_datadir}/doc/packages/ipmitool/*
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc %{_mandir}/man8/*
|
||||
|
||||
|
175
latest_compile_fixes.patch
Normal file
175
latest_compile_fixes.patch
Normal file
@ -0,0 +1,175 @@
|
||||
Fix compile issues
|
||||
|
||||
Use _XOPEN_SOURCE 500 in ipmi_main to get getpass defined.
|
||||
from manpage:
|
||||
getpass():
|
||||
Since glibc 2.2.2:
|
||||
_BSD_SOURCE ||
|
||||
(_XOPEN_SOURCE >= 500 ||
|
||||
_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
|
||||
!(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
|
||||
|
||||
and more compiler warning fixing stuff...
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
|
||||
Index: ipmitool-1.8.15/lib/ipmi_chassis.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_chassis.c 2015-01-14 16:28:54.020808802 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_chassis.c 2015-01-15 10:16:29.193827184 +0100
|
||||
@@ -30,6 +30,7 @@
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
+#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
Index: ipmitool-1.8.15/lib/ipmi_main.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_main.c 2015-01-14 14:44:12.916708941 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_main.c 2015-01-15 10:17:02.977827721 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
-#define _XOPEN_SOURCE 700
|
||||
+#define _XOPEN_SOURCE 500
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
Index: ipmitool-1.8.15/lib/ipmi_sel.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_sel.c 2015-01-14 14:44:12.916708941 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_sel.c 2015-01-15 10:25:03.161835356 +0100
|
||||
@@ -2391,18 +2391,18 @@
|
||||
evt.sel_type.standard_type.timestamp;
|
||||
|
||||
/* skip timestamp */
|
||||
- cursor = index((const char *)cursor, ';');
|
||||
+ cursor = strchr((const char *)cursor, ';');
|
||||
cursor++;
|
||||
|
||||
/* FIXME: parse originator */
|
||||
evt.sel_type.standard_type.gen_id = 0x0020;
|
||||
|
||||
/* skip originator info */
|
||||
- cursor = index((const char *)cursor, ';');
|
||||
+ cursor = strchr((const char *)cursor, ';');
|
||||
cursor++;
|
||||
|
||||
/* Get sensor type */
|
||||
- cursor = index((const char *)cursor, '(');
|
||||
+ cursor = strchr((const char *)cursor, '(');
|
||||
cursor++;
|
||||
|
||||
errno = 0;
|
||||
@@ -2413,7 +2413,7 @@
|
||||
status = (-1);
|
||||
break;
|
||||
}
|
||||
- cursor = index((const char *)cursor, ',');
|
||||
+ cursor = strchr((const char *)cursor, ',');
|
||||
cursor++;
|
||||
|
||||
errno = 0;
|
||||
@@ -2426,7 +2426,7 @@
|
||||
}
|
||||
|
||||
/* skip to event type info */
|
||||
- cursor = index((const char *)cursor, ':');
|
||||
+ cursor = strchr((const char *)cursor, ':');
|
||||
cursor++;
|
||||
|
||||
errno = 0;
|
||||
@@ -2439,7 +2439,7 @@
|
||||
}
|
||||
|
||||
/* skip to event dir info */
|
||||
- cursor = index((const char *)cursor, '(');
|
||||
+ cursor = strchr((const char *)cursor, '(');
|
||||
cursor++;
|
||||
if (*cursor == 'a') {
|
||||
evt.sel_type.standard_type.event_dir = 0;
|
||||
@@ -2447,7 +2447,7 @@
|
||||
evt.sel_type.standard_type.event_dir = 1;
|
||||
}
|
||||
/* skip to data info */
|
||||
- cursor = index((const char *)cursor, ' ');
|
||||
+ cursor = strchr((const char *)cursor, ' ');
|
||||
cursor++;
|
||||
|
||||
if (evt.sel_type.standard_type.sensor_type == 0xF0) {
|
||||
@@ -2466,7 +2466,7 @@
|
||||
}
|
||||
|
||||
/* Get to previous state */
|
||||
- cursor = index((const char *)cursor, 'M');
|
||||
+ cursor = strchr((const char *)cursor, 'M');
|
||||
cursor++;
|
||||
|
||||
/* Set previous state */
|
||||
@@ -2480,7 +2480,7 @@
|
||||
}
|
||||
|
||||
/* Get to current state */
|
||||
- cursor = index((const char *)cursor, 'M');
|
||||
+ cursor = strchr((const char *)cursor, 'M');
|
||||
cursor++;
|
||||
|
||||
/* Set current state */
|
||||
@@ -2494,7 +2494,7 @@
|
||||
}
|
||||
|
||||
/* skip to cause */
|
||||
- cursor = index((const char *)cursor, '=');
|
||||
+ cursor = strchr((const char *)cursor, '=');
|
||||
cursor++;
|
||||
errno = 0;
|
||||
evt.sel_type.standard_type.event_data[1] |=
|
||||
@@ -2513,7 +2513,7 @@
|
||||
status = (-1);
|
||||
break;
|
||||
}
|
||||
- cursor = index((const char *)cursor, ' ');
|
||||
+ cursor = strchr((const char *)cursor, ' ');
|
||||
cursor++;
|
||||
|
||||
errno = 0;
|
||||
@@ -2525,7 +2525,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
- cursor = index((const char *)cursor, ' ');
|
||||
+ cursor = strchr((const char *)cursor, ' ');
|
||||
cursor++;
|
||||
|
||||
errno = 0;
|
||||
Index: ipmitool-1.8.15/src/ipmishell.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/src/ipmishell.c 2015-01-14 14:44:12.924708941 +0100
|
||||
+++ ipmitool-1.8.15/src/ipmishell.c 2015-01-15 10:27:18.445837506 +0100
|
||||
@@ -30,6 +30,9 @@
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
+/* strdup needs this */
|
||||
+#define _XOPEN_SOURCE 500
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
Index: ipmitool-1.8.15/lib/log.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.15.orig/lib/log.c 2015-01-14 15:37:57.444760206 +0100
|
||||
+++ ipmitool-1.8.15/lib/log.c 2015-01-15 10:28:25.441838572 +0100
|
||||
@@ -30,6 +30,9 @@
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
+/* strdup needs this */
|
||||
+#define _XOPEN_SOURCE 500
|
||||
+
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
@ -1,11 +0,0 @@
|
||||
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-ipmitool-1.8.13/lib/ipmi_sdradd.c ./lib/ipmi_sdradd.c
|
||||
--- ../orig-ipmitool-1.8.13/lib/ipmi_sdradd.c 2013-10-04 09:06:38.279805998 +0200
|
||||
+++ ./lib/ipmi_sdradd.c 2013-10-04 09:08:04.979355617 +0200
|
||||
@@ -634,6 +634,7 @@
|
||||
queue->tail->next = sdrr;
|
||||
queue->tail = sdrr;
|
||||
}
|
||||
+ close(fd);
|
||||
return rc;
|
||||
}
|
||||
|
@ -1,71 +1,45 @@
|
||||
Index: ipmitool-1.8.13/lib/ipmi_ekanalyzer.c
|
||||
Cleanup and compiler issues only, no functional change
|
||||
|
||||
Changes partly very old and not possible to find the original author.
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
|
||||
Index: ipmitool-1.8.15/lib/ipmi_ekanalyzer.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_ekanalyzer.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_ekanalyzer.c
|
||||
@@ -397,7 +397,6 @@ ipmi_ekanalyzer_usage( void )
|
||||
static int
|
||||
ipmi_ek_get_file_type( char * argument )
|
||||
{
|
||||
- int index_name=0;
|
||||
int filetype = ERROR_STATUS;
|
||||
|
||||
if( strlen (argument) > MIN_ARGUMENT ){
|
||||
@@ -3383,7 +3382,7 @@ ipmi_ek_display_board_p2p_record( struct
|
||||
offset += sizeof(struct fru_picmgext_guid);
|
||||
}
|
||||
|
||||
- for ( offset;
|
||||
+ for ( ;
|
||||
offset < record->header.len;
|
||||
offset += sizeof(struct fru_picmgext_link_desc)
|
||||
) {
|
||||
@@ -3552,7 +3551,7 @@ ipmi_ek_display_radial_ipmb0_record( str
|
||||
|
||||
printf(" IPMB-0 Hub Descriptor Count: 0x%02x", record->data[offset++]);
|
||||
if (record->data[offset] > 0){
|
||||
- for (offset; offset < record->header.len;){
|
||||
+ for (; offset < record->header.len;){
|
||||
unsigned char entry_count = 0;
|
||||
printf(" IPMB-0 Hub Descriptor\n");
|
||||
printf("\tHardware Address: 0x%02x\n", record->data[offset++]);
|
||||
@@ -3995,7 +3994,7 @@ ipmi_ek_display_clock_config_record( str
|
||||
(feature > 1) & 1,
|
||||
(feature&1)?"Source":"Receiver");
|
||||
printf("\tFamily: 0x%02x - AccLVL: 0x%02x\n", family, accuracy);
|
||||
- printf("\tFRQ: %-9ld - min: %-9ld - max: %-9ld\n",
|
||||
+ printf("\tFRQ: %-9lu - min: %-9ld - max: %-9ld\n",
|
||||
freq, min_freq, max_freq);
|
||||
}
|
||||
printf("\n");
|
||||
Index: ipmitool-1.8.13/lib/ipmi_fwum.c
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_ekanalyzer.c 2015-01-14 14:27:59.116693459 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_ekanalyzer.c 2015-01-14 14:28:08.504693609 +0100
|
||||
@@ -3366,7 +3365,7 @@
|
||||
printf("\n");
|
||||
offset += sizeof(struct fru_picmgext_guid);
|
||||
}
|
||||
- for (offset;
|
||||
+ for (;
|
||||
offset < record->header.len;
|
||||
offset += sizeof(struct fru_picmgext_link_desc)) {
|
||||
/* to solve little endian/big endian problem */
|
||||
@@ -3525,7 +3524,7 @@
|
||||
if (record->data[offset] < 1) {
|
||||
return;
|
||||
}
|
||||
- for (offset; offset < record->header.len;) {
|
||||
+ for (; offset < record->header.len;) {
|
||||
unsigned char entry_count = 0;
|
||||
printf(" IPMB-0 Hub Descriptor\n");
|
||||
printf("\tHardware Address: 0x%02x\n",
|
||||
@@ -3983,7 +3982,7 @@
|
||||
(feature & 1) ? "Source" : "Receiver");
|
||||
printf("\tFamily: 0x%02x - AccLVL: 0x%02x\n",
|
||||
family, accuracy);
|
||||
- printf("\tFRQ: %-9ld - min: %-9ld - max: %-9ld\n",
|
||||
+ printf("\tFRQ: %-9lu - min: %-9lu - max: %-9lu\n",
|
||||
freq, min_freq, max_freq);
|
||||
}
|
||||
printf("\n");
|
||||
Index: ipmitool-1.8.15/lib/ipmi_picmg.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_fwum.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_fwum.c
|
||||
@@ -861,7 +861,6 @@ KfwumUploadFirmware(struct ipmi_intf *in
|
||||
unsigned long lastAddress = 0;
|
||||
unsigned char sequenceNumber = 0;
|
||||
unsigned char retry = FWUM_MAX_UPLOAD_RETRY;
|
||||
- unsigned char isLengthValid = 1;
|
||||
do {
|
||||
writeSize = save_fw_nfo.bufferSize - save_fw_nfo.overheadSize;
|
||||
/* Reach the end */
|
||||
Index: ipmitool-1.8.13/lib/ipmi_isol.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_isol.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_isol.c
|
||||
@@ -413,7 +413,6 @@ ipmi_isol_deactivate(struct ipmi_intf *
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t data[6];
|
||||
- struct isol_config_parameters params;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_ISOL;
|
||||
Index: ipmitool-1.8.13/lib/ipmi_picmg.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_picmg.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_picmg.c
|
||||
@@ -878,7 +878,7 @@ ipmi_picmg_portstate_get(struct ipmi_int
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_picmg.c 2015-01-14 14:25:17.556690891 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_picmg.c 2015-01-14 14:28:08.504693609 +0100
|
||||
@@ -878,7 +878,7 @@
|
||||
}
|
||||
else if (d->type >= 0x06 && d->type <= 0xef)
|
||||
{
|
||||
@ -74,7 +48,7 @@ Index: ipmitool-1.8.13/lib/ipmi_picmg.c
|
||||
}
|
||||
else if (d->type >= 0xf0 && d->type <= 0xfe)
|
||||
{
|
||||
@@ -1690,7 +1690,7 @@ ipmi_picmg_clk_get(struct ipmi_intf * in
|
||||
@@ -1690,7 +1690,7 @@
|
||||
oemval2str( rsp->data[3], rsp->data[4],
|
||||
picmg_clk_accuracy_vals));
|
||||
|
||||
@ -83,31 +57,10 @@ Index: ipmitool-1.8.13/lib/ipmi_picmg.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1751,7 +1751,7 @@ printf("## index: %d\n", msg_data[2]);
|
||||
printf("## setting: 0x%02x\n", msg_data[3]);
|
||||
printf("## family: %d\n", msg_data[4]);
|
||||
printf("## acc: %d\n", msg_data[5]);
|
||||
-printf("## freq: %ld\n", freq );
|
||||
+printf("## freq: %lu\n", freq );
|
||||
printf("## res: %d\n", msg_data[10]);
|
||||
#endif
|
||||
|
||||
Index: ipmitool-1.8.13/lib/ipmi_sdradd.c
|
||||
Index: ipmitool-1.8.15/lib/ipmi_sdr.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_sdradd.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_sdradd.c
|
||||
@@ -576,7 +576,6 @@ ipmi_sdr_add_from_list(struct ipmi_intf
|
||||
static int
|
||||
ipmi_sdr_read_records(const char *filename, struct sdrr_queue *queue)
|
||||
{
|
||||
- struct sdr_get_rs header;
|
||||
int rc = 0;
|
||||
int fd;
|
||||
uint8_t binHdr[5];
|
||||
Index: ipmitool-1.8.13/lib/ipmi_sdr.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.13.orig/lib/ipmi_sdr.c
|
||||
+++ ipmitool-1.8.13/lib/ipmi_sdr.c
|
||||
--- ipmitool-1.8.15.orig/lib/ipmi_sdr.c 2015-01-14 14:27:59.120693459 +0100
|
||||
+++ ipmitool-1.8.15/lib/ipmi_sdr.c 2015-01-14 14:28:08.508693609 +0100
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <ipmitool/ipmi_entity.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
|
Loading…
Reference in New Issue
Block a user