forked from pool/ipmitool
Accepting request 514253 from systemsmanagement
1 OBS-URL: https://build.opensuse.org/request/show/514253 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ipmitool?expand=0&rev=31
This commit is contained in:
commit
ae27c70730
@ -1,356 +0,0 @@
|
||||
From f48ce96e7fd0d2fe198845f0e2bd76f95d221fb3 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Rose <charles_rose@dell.com>
|
||||
Date: Thu, 12 Dec 2013 16:10:11 -0500
|
||||
Subject: [PATCH] Incorporate upstream comments to #289, add whitespace, other
|
||||
cleanup
|
||||
|
||||
---
|
||||
contrib/bmc-snmp-proxy | 130 +++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 76 insertions(+), 54 deletions(-)
|
||||
|
||||
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)
|
||||
#
|
||||
-# version: 0.6
|
||||
+# version: 0.62
|
||||
#
|
||||
# Authors: Charles Rose <charles_rose@dell.com>
|
||||
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||
@@ -24,9 +24,9 @@
|
||||
SYSCONF_DIR="/etc/sysconfig"
|
||||
CONFIG="${SYSCONF_DIR}/bmc-snmp-proxy"
|
||||
|
||||
-SNMPD_LOCAL_CONF_DIR="/etc/snmp/bmc"
|
||||
-SNMPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmpd.local.conf"
|
||||
-TRAPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmptrapd.local.conf"
|
||||
+SNMPD_BMC_CONF_DIR="/etc/snmp/bmc"
|
||||
+SNMPD_BMC_CONF="${SNMPD_BMC_CONF_DIR}/snmpd.local.conf"
|
||||
+TRAPD_BMC_CONF="${SNMPD_BMC_CONF_DIR}/snmptrapd.local.conf"
|
||||
|
||||
TRAPD_CONF="/etc/snmp/snmptrapd.conf"
|
||||
|
||||
@@ -61,14 +61,16 @@
|
||||
else
|
||||
RETVAL=2
|
||||
fi
|
||||
+
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
check_snmp()
|
||||
{
|
||||
- if [ ! -d /etc/snmp ] && [ ! -x /usr/sbin/snmpd ]; then
|
||||
+ if [ ! -d /etc/snmp ] || [ ! -x /usr/sbin/snmpd ]; then
|
||||
RETVAL=12
|
||||
fi
|
||||
+
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
@@ -81,11 +83,12 @@
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "###############################################\n"
|
||||
- printf "view bmcview included %s 80\n" "${BMC_OID}"
|
||||
- printf "com2sec -Cn bmc_ctx bmc_sec default bmc_cmty\n"
|
||||
- printf "group bmc_grp v1 bmc_sec\n"
|
||||
- printf "access bmc_grp bmc_ctx any noauth exact bmcview none none\n"
|
||||
- printf "proxy -Cn bmc_ctx -v 1 %s\n" "${PROXY_TOKEN}"
|
||||
+ printf "#view bmcview included %s 80\n" "${BMC_OID}"
|
||||
+ printf "#com2sec -Cn bmc_ctx bmc_sec default bmc_cmty\n"
|
||||
+ printf "#group bmc_grp v1 bmc_sec\n"
|
||||
+ printf "#access bmc_grp bmc_ctx any noauth exact bmcview none none\n"
|
||||
+ printf "#proxy -Cn bmc_ctx -v 1 %s\n" "${PROXY_TOKEN}"
|
||||
+ printf "proxy -v 1 %s\n" "${PROXY_TOKEN}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
@@ -96,6 +99,7 @@
|
||||
|
||||
printf -- "%s" "${1}"| grep -Eq \
|
||||
"^${octet}\\.${octet}\\.${octet}\\.${octet}$"
|
||||
+
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -116,37 +120,38 @@
|
||||
if check_vars; then
|
||||
PROXY_TOKEN="-c ${BMC_COMMUNITY} ${BMC_IPv4} ${BMC_OID}"
|
||||
|
||||
- if [ ! -d ${SNMPD_LOCAL_CONF_DIR} ] && \
|
||||
- mkdir ${SNMPD_LOCAL_CONF_DIR}; then
|
||||
- write_snmp_conf > ${SNMPD_LOCAL_CONF}
|
||||
- [ $? -ne 0 ] && RETVAL=4
|
||||
+ if [ -d ${SNMPD_BMC_CONF_DIR} ]; then
|
||||
+ write_snmp_conf > ${SNMPD_BMC_CONF} || RETVAL=4
|
||||
fi
|
||||
else
|
||||
RETVAL=3
|
||||
fi
|
||||
}
|
||||
|
||||
-
|
||||
set_snmpd_conf_path()
|
||||
{
|
||||
- for SYSCONF in ${SYSCONF_DIR}/snmp*d;
|
||||
+ if [ ! -d ${SNMPD_BMC_CONF_DIR} ]; then
|
||||
+ mkdir ${SNMPD_BMC_CONF_DIR} || RETVAL=7
|
||||
+ fi
|
||||
+
|
||||
+ # We need SNMPCONFPATH set for both snmpd and snmptrapd
|
||||
+ for sysconf in ${SYSCONF_DIR}/snmp*d;
|
||||
do
|
||||
- if grep -q "${SNMPD_LOCAL_CONF_DIR}" "${SYSCONF}" > \
|
||||
- /dev/null 2>&1; then
|
||||
- continue
|
||||
- else
|
||||
- printf "SNMPCONFPATH=%s\n" "${SNMPD_LOCAL_CONF_DIR}" \
|
||||
- >> ${SYSCONF} || RETVAL=7
|
||||
+ if ! grep -q "^SNMPCONFPATH.*${SNMPD_BMC_CONF_DIR}" \
|
||||
+ "${sysconf}" > /dev/null 2>&1; then
|
||||
+ printf "SNMPCONFPATH=/etc/snmp:%s\n" \
|
||||
+ "${SNMPD_BMC_CONF_DIR}" >> ${sysconf} || \
|
||||
+ RETVAL=7
|
||||
fi
|
||||
done
|
||||
+
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
disable_snmp_proxy()
|
||||
{
|
||||
- if [ -f ${SNMPD_LOCAL_CONF} ]; then
|
||||
- rm -f ${SNMPD_LOCAL_CONF}
|
||||
- [ $? -ne 0 ] && RETVAL=5
|
||||
+ if [ -f ${SNMPD_BMC_CONF} ]; then
|
||||
+ rm -f ${SNMPD_BMC_CONF} || RETVAL=5
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
@@ -156,6 +161,7 @@
|
||||
pick_alert_dest()
|
||||
{
|
||||
test_ip="$1"
|
||||
+ # We have 4 IPv4 and 4 IPv6 alert dest. We will set IPv4 for now.
|
||||
for ALERT_DEST in `seq 1 4`
|
||||
do
|
||||
temp_ip=$(${IPMITOOL} lan alert print ${CHANNEL} ${ALERT_DEST}\
|
||||
@@ -169,12 +175,12 @@
|
||||
set_alert_dest_ip()
|
||||
{
|
||||
${IPMITOOL} lan alert set ${CHANNEL} ${ALERT_DEST} ipaddr ${1} \
|
||||
- retry 4 type pet >/dev/null 2>&1
|
||||
- [ $? -ne 0 ] && RETVAL=8
|
||||
+ retry 4 type pet >/dev/null 2>&1 || RETVAL=8
|
||||
}
|
||||
|
||||
-bmc_alert_dest()
|
||||
+config_bmc_alert_dest()
|
||||
{
|
||||
+ # call with enable|disable
|
||||
# Pick the first active LAN channel
|
||||
for CHANNEL in `seq 1 14`
|
||||
do
|
||||
@@ -184,12 +190,12 @@
|
||||
|
||||
# If TRAPD_IP is already set as an alert dest,
|
||||
if pick_alert_dest "${TRAPD_IP}"; then
|
||||
- # reset: reset it if we are called with reset
|
||||
- [ "${1}" = "reset" ] && \
|
||||
+ # disable: reset it if we are called with disable
|
||||
+ [ "${1}" = "disable" ] && \
|
||||
set_alert_dest_ip "0.0.0.0"
|
||||
# else, find the next free alert dest,
|
||||
elif pick_alert_dest "0.0.0.0"; then
|
||||
- [ "${1}" = "reset" ] && \
|
||||
+ [ "${1}" = "disable" ] && \
|
||||
return $RETVAL
|
||||
# set: the TRAPD_IP
|
||||
set_alert_dest_ip "${TRAPD_IP}"
|
||||
@@ -197,42 +203,54 @@
|
||||
# No free alert destinations
|
||||
RETVAL=9
|
||||
fi
|
||||
+
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
-set_ipmi_alert()
|
||||
+set_ipmi_pef()
|
||||
{
|
||||
- ${IPMITOOL} lan set ${CHANNEL} alert "${1}" >/dev/null 2>&1
|
||||
- [ $? -ne 0 ] && RETVAL=10
|
||||
+ # Needs ipmitool-1.8.13 + patches
|
||||
+ ${IPMITOOL} pef setpolicy ${ALERT_DEST} "${1}" >/dev/null 2>&1 || \
|
||||
+ RETVAL=10
|
||||
}
|
||||
|
||||
get_host_ip()
|
||||
{
|
||||
- # Get host's IP that the BMC can reach.
|
||||
+ # Get host's IP that the BMC can reach. This is at best a hack.
|
||||
IFACE=$(/usr/sbin/ip -o -f inet address |awk '!/: lo/ {print $2}')
|
||||
+
|
||||
for dev in ${IFACE}
|
||||
do
|
||||
- ping -c 1 -I ${dev} ${BMC_IPv4} > /dev/null 2>&1
|
||||
+ temp_ping=$(ping -c 1 -I ${dev} ${BMC_IPv4})
|
||||
+ [ $? -ne 0 ] && continue
|
||||
+
|
||||
+ printf -- "%s" "$temp_ping"| awk 'NR==1{print $5}' && break
|
||||
done
|
||||
}
|
||||
|
||||
config_bmc_alert()
|
||||
{
|
||||
+ # Do two things
|
||||
+ # Set/Reset TRAP IP in BMC
|
||||
+ # Enable/Disable PEF alerting in BMC for TRAP
|
||||
+
|
||||
# Get Host's IP that the BMC can send traps to
|
||||
TRAPD_IP=$(get_host_ip)
|
||||
|
||||
# Set Host's IP as the alert destination in the BMC
|
||||
- valid_ip ${TRAPD_IP} && bmc_alert_dest "${ACTION}"
|
||||
+ valid_ip ${TRAPD_IP} && config_bmc_alert_dest "${ACTION}"
|
||||
+
|
||||
+ # Enable/Disable alerting on the LAN channel
|
||||
+ [ $RETVAL -eq 0 ] && set_ipmi_pef "${ACTION}"
|
||||
|
||||
- # Enable alerting on the LAN channel
|
||||
- [ $RETVAL -eq 0 ] && set_ipmi_alert "${ACTION}"
|
||||
+ return $RETVAL
|
||||
}
|
||||
|
||||
write_trapd_conf()
|
||||
{
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
- printf "forward %s %s\n" "${BMC_OID}*" "${FORWARD_HOST}"
|
||||
+ printf "forward default %s\n" "${FORWARD_HOST}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
@@ -240,10 +258,9 @@
|
||||
{
|
||||
# Proceed only if snmptrapd is available on the system
|
||||
if [ -f ${TRAPD_CONF} ]; then
|
||||
- write_trapd_conf > ${TRAPD_LOCAL_CONF}
|
||||
- [ $? -ne 0 ] && RETVAL=11
|
||||
+ write_trapd_conf > ${TRAPD_BMC_CONF} || RETVAL=11
|
||||
else
|
||||
- return 1
|
||||
+ RETVAL=11
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -253,6 +270,7 @@
|
||||
# multiple
|
||||
FORWARD_HOST=$(awk '/^trap.*sink/{print $2}; /^informsink/{print $2}' \
|
||||
/etc/snmp/snmpd*conf | head -1)
|
||||
+
|
||||
if [ -z "${FORWARD_HOST}" ]; then
|
||||
# there is no trapsink setup.
|
||||
return 1
|
||||
@@ -265,19 +283,20 @@
|
||||
trap_forward()
|
||||
{
|
||||
NO_TRAP=0
|
||||
- ACTION=${1} # set or reset
|
||||
+ ACTION=${1} # enable or disable
|
||||
|
||||
- if [ "${ACTION}" = "set" ]; then
|
||||
+ if [ "${ACTION}" = "enable" ]; then
|
||||
# Get trapd config,
|
||||
if trap_sink_exists; then
|
||||
- config_trapd && config_bmc_alert
|
||||
+ config_bmc_alert && config_trapd
|
||||
else
|
||||
# exit silently if there is no sink
|
||||
NO_TRAP=1
|
||||
fi
|
||||
else
|
||||
- if [ -f ${TRAPD_LOCAL_CONF} ]; then
|
||||
- rm -f ${TRAPD_LOCAL_CONF} >/dev/null 2>&1
|
||||
+ if [ -f ${TRAPD_BMC_CONF} ]; then
|
||||
+ rm -f ${TRAPD_BMC_CONF} >/dev/null 2>&1
|
||||
+ config_bmc_alert
|
||||
else
|
||||
NO_TRAP=1
|
||||
fi
|
||||
@@ -292,7 +311,6 @@
|
||||
service $1 reload
|
||||
[ $? -ne 0 ] && RETVAL=6
|
||||
fi
|
||||
- return
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
@@ -300,11 +318,12 @@
|
||||
{
|
||||
if bmc_info_exists && check_snmp; then
|
||||
touch ${LOCKFILE}
|
||||
+
|
||||
set_snmpd_conf_path && set_snmp_proxy
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
- trap_forward "set"
|
||||
+ trap_forward "enable"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
@@ -320,10 +339,11 @@
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
- trap_forward "reset"
|
||||
+ trap_forward "disable"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
+
|
||||
rm -f ${LOCKFILE}
|
||||
fi
|
||||
}
|
||||
@@ -333,12 +353,13 @@
|
||||
{
|
||||
eval_gettext "${SCRIPT_NAME}: snmp proxy to BMC is "
|
||||
# Checking for lockfile is better.
|
||||
- #if grep -q "^proxy" "${SNMPD_LOCAL_CONF}" > /dev/null 2>&1 ; then
|
||||
+ #if grep -q "^proxy" "${SNMPD_BMC_CONF}" > /dev/null 2>&1 ; then
|
||||
if [ -f ${LOCKFILE} ]; then
|
||||
eval_gettext "set"
|
||||
else
|
||||
eval_gettext "not set"
|
||||
fi
|
||||
+
|
||||
echo
|
||||
RETVAL=0
|
||||
}
|
||||
@@ -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 ;;
|
||||
- 4) eval_gettext "${SCRIPT_NAME}: failed to set ${SNMPD_LOCAL_CONF}." 1>&2 ;;
|
||||
+ 4) eval_gettext "${SCRIPT_NAME}: failed to set ${SNMPD_BMC_CONF}." 1>&2 ;;
|
||||
5) eval_gettext "${SCRIPT_NAME}: failed to disable snmp proxy." 1>&2 ;;
|
||||
6) eval_gettext "${SCRIPT_NAME}: failed to reload snmpd." 1>&2 ;;
|
||||
- 7) eval_gettext "${SCRIPT_NAME}: failed to update ${SYSCONF}." 1>&2 ;;
|
||||
+ 7) eval_gettext "${SCRIPT_NAME}: failed to set snmpd config." 1>&2 ;;
|
||||
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 ;;
|
||||
@@ -379,6 +400,7 @@
|
||||
if [ ${RETVAL} -gt 1 ]; then
|
||||
eval_gettext " Return code: ${RETVAL}"; echo
|
||||
fi
|
||||
+
|
||||
exit ${RETVAL}
|
||||
#############################################################################
|
||||
# end of file
|
14
_service
Normal file
14
_service
Normal file
@ -0,0 +1,14 @@
|
||||
<services>
|
||||
<service mode="disabled" name="tar_scm">
|
||||
<param name="url">https://git.code.sf.net/p/ipmitool/source</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="filename">ipmitool</param>
|
||||
<param name="versionformat">1.8.18</param>
|
||||
</service>
|
||||
<service mode="disabled" name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service mode="disabled" name="set_version"/>
|
||||
</services>
|
@ -1,8 +1,8 @@
|
||||
Index: ipmitool-1.8.15/lib/helper.c
|
||||
Index: ipmitool-1.8.18/lib/helper.c
|
||||
===================================================================
|
||||
--- 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 @@
|
||||
--- ipmitool-1.8.18.orig/lib/helper.c
|
||||
+++ ipmitool-1.8.18/lib/helper.c
|
||||
@@ -829,7 +829,6 @@ ipmi_start_daemon(struct ipmi_intf *intf
|
||||
#endif
|
||||
|
||||
chdir("/");
|
||||
@ -10,11 +10,11 @@ Index: ipmitool-1.8.15/lib/helper.c
|
||||
|
||||
for (fd=0; fd<64; fd++) {
|
||||
if (fd != intf->fd)
|
||||
Index: ipmitool-1.8.15/src/ipmievd.c
|
||||
Index: ipmitool-1.8.18/src/ipmievd.c
|
||||
===================================================================
|
||||
--- 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 @@
|
||||
--- ipmitool-1.8.18.orig/src/ipmievd.c
|
||||
+++ ipmitool-1.8.18/src/ipmievd.c
|
||||
@@ -701,6 +701,7 @@ ipmievd_main(struct ipmi_event_intf * ei
|
||||
int i, rc;
|
||||
int daemon = 1;
|
||||
struct sigaction act;
|
||||
@ -22,7 +22,7 @@ Index: ipmitool-1.8.15/src/ipmievd.c
|
||||
|
||||
memset(pidfile, 0, 64);
|
||||
sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
|
||||
@@ -762,8 +763,9 @@
|
||||
@@ -763,8 +764,9 @@ ipmievd_main(struct ipmi_event_intf * ei
|
||||
|
||||
ipmi_start_daemon(eintf->intf);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: ipmitool-1.8.15/lib/ipmi_fwum.c
|
||||
Index: ipmitool-1.8.16/lib/ipmi_fwum.c
|
||||
===================================================================
|
||||
--- 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 @@
|
||||
--- ipmitool-1.8.16.orig/lib/ipmi_fwum.c 2015-11-22 13:50:54.000000000 +0100
|
||||
+++ ipmitool-1.8.16/lib/ipmi_fwum.c 2016-02-25 13:25:35.907249893 +0100
|
||||
@@ -1098,12 +1098,14 @@ ipmi_kfwum_checkfwcompat(tKFWUM_BoardInf
|
||||
int compatible = 0;
|
||||
if (boardInfo.iana != firmInfo.iana) {
|
||||
lprintf(LOG_ERR,
|
||||
@ -19,7 +19,7 @@ Index: ipmitool-1.8.15/lib/ipmi_fwum.c
|
||||
compatible = (-1);
|
||||
}
|
||||
if (compatible != 0) {
|
||||
@@ -1122,6 +1124,10 @@
|
||||
@@ -1121,6 +1123,10 @@ printf_kfwum_info(tKFWUM_BoardInfo board
|
||||
printf(
|
||||
"Target IANA number : %u\n", boardInfo.iana);
|
||||
printf(
|
||||
|
17
hpm_x_compatibility_msg_is_debug_only.patch
Normal file
17
hpm_x_compatibility_msg_is_debug_only.patch
Normal file
@ -0,0 +1,17 @@
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.com>
|
||||
|
||||
bsc#948540
|
||||
|
||||
Index: ipmitool-1.8.18/lib/hpm2.c
|
||||
===================================================================
|
||||
--- ipmitool-1.8.18.orig/lib/hpm2.c 2016-10-08 10:17:55.000000000 +0200
|
||||
+++ ipmitool-1.8.18/lib/hpm2.c 2017-07-05 16:04:42.438268644 +0200
|
||||
@@ -99,7 +99,7 @@ int hpm2_get_capabilities(struct ipmi_in
|
||||
lprintf(LOG_DEBUG, "IPM Controller is not HPM.2 compatible");
|
||||
return rsp->ccode;
|
||||
} else if (rsp->ccode) {
|
||||
- lprintf(LOG_NOTICE, "Get HPM.x Capabilities request failed,"
|
||||
+ lprintf(LOG_DEBUG, "Get HPM.x Capabilities request failed,"
|
||||
" compcode = %x", rsp->ccode);
|
||||
return rsp->ccode;
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
More compiler warning fixes
|
||||
|
||||
These were in SUSE distris for quite some time and got
|
||||
forwardported from 1.8.10 to 1.8.11.
|
||||
|
||||
|
||||
Index: 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>
|
||||
#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
Index: 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>
|
||||
#include <time.h>
|
||||
+#include <ctype.h>
|
||||
+#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- 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_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:4acd2df5f8740fef5c032cebee0113ec4d3bbef04a6f4dbfaf7fcc7f3eb08c40
|
||||
size 747174
|
3
ipmitool-1.8.18.tar.xz
Normal file
3
ipmitool-1.8.18.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0f4c195b963b549fe325f32e17a9b24fb59fbe6fe0688a6d7d69381a1edf4478
|
||||
size 435312
|
File diff suppressed because it is too large
Load Diff
102
ipmitool.changes
102
ipmitool.changes
@ -1,3 +1,105 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 27 18:58:24 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
- Switch to OBS service to generate the tarball and changelog
|
||||
automatically from git "osc service dr"
|
||||
- Update to version git checkout 20170406.ecb4cfb:
|
||||
* Prevent autoreconf from complaining about missing NEWS
|
||||
* Add git hash and dirty mark to ipmitool version
|
||||
- Remove patch ipmitool_1_8_18_ecb4cfbff855_to_HEAD.patch as the
|
||||
patch is directly in the tarball
|
||||
- Rename patch:
|
||||
ipmitool_adjust_suse.paths to ipmitool_adjust_suse_paths.patch
|
||||
- Drop the --pic switch as it was only for static library
|
||||
- Reduce the suse_version for 1210 check to switch systemd on as
|
||||
the package is not building on sle11 anyway
|
||||
* properly depend on systemd-rpm-macros and not full systemd
|
||||
- Enable switch for file-security to be more strict on open files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 5 14:07:41 UTC 2017 - trenn@suse.de
|
||||
|
||||
- Update to latest git HEAD revision of 1.8.18 version
|
||||
commit ecb4cfbff855bb24099f2a80a6dd558518702c7d
|
||||
All these patches are now included in one big revision (1.8.18) to
|
||||
HEAD patch:
|
||||
D 0001-fix-typo.patch
|
||||
D 0002-added-microTCA-major-version.patch
|
||||
D 0003-replaced-removed-defines-which-are-already-present-i.patch
|
||||
D 0004-fix-typo.patch
|
||||
D 0006-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch
|
||||
D 0007-ID-461-Make-compiler-happier-about-changes-related-t.patch
|
||||
D 0008-ID-474-Compile-fix-on-nonlinux-systems.patch
|
||||
D 0009-Add-bootstrap-support-for-Mac.patch
|
||||
D 0013-ID-478-ekanalyzer-Fixed-decoding-of-FRU-fields.patch
|
||||
D 0014-ID-479-ekanalyzer-fix-processing-of-custom-mfg.-fiel.patch
|
||||
D 0015-ID-477-fru-Fix-decoding-of-non-text-data-in-get_fru_.patch
|
||||
D 0017-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch
|
||||
|
||||
This is the big revision (1.8.18) to HEAD patch:
|
||||
A ipmitool_1_8_18_ecb4cfbff855_to_HEAD.patch
|
||||
|
||||
- Note: the tarball has been generated with git archive from the git
|
||||
repo. It slightly differs (.gitignore and configure.ac) from what
|
||||
was in osc before. No idea why, but the change is tiny and does not matter.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 28 15:22:39 UTC 2017 - trenn@suse.de
|
||||
|
||||
- Lower prio of message from error to debug (bsc#948540)
|
||||
A hpm_x_compatibility_msg_is_debug_only.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 28 16:41:02 UTC 2017 - trenn@suse.de
|
||||
|
||||
- Update to latest git HEAD version adding quite some fixes (fate#321578)
|
||||
* Add:
|
||||
0001-fix-typo.patch
|
||||
0002-added-microTCA-major-version.patch
|
||||
0003-replaced-removed-defines-which-are-already-present-i.patch
|
||||
0004-fix-typo.patch
|
||||
0006-ID-461-OpenSSL-1.1-compatibility-error-storage-size-.patch
|
||||
0007-ID-461-Make-compiler-happier-about-changes-related-t.patch
|
||||
0008-ID-474-Compile-fix-on-nonlinux-systems.patch
|
||||
0009-Add-bootstrap-support-for-Mac.patch
|
||||
0013-ID-478-ekanalyzer-Fixed-decoding-of-FRU-fields.patch
|
||||
0014-ID-479-ekanalyzer-fix-processing-of-custom-mfg.-fiel.patch
|
||||
0015-ID-477-fru-Fix-decoding-of-non-text-data-in-get_fru_.patch
|
||||
0017-ID-480-ipmitool-coredumps-in-EVP_CIPHER_CTX_init.patch
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 12:23:27 UTC 2017 - felix.gerling@suse.com
|
||||
|
||||
- Update to latest version: 1.8.18 (fate#321579)
|
||||
D 0001-Incorporate-upstream-comments-to-289-add-whitespace.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 13:08:43 UTC 2016 - trenn@suse.de
|
||||
|
||||
- Update to latest version: 1.8.17
|
||||
D ipmitool-1.8.10-implicit-fortify-decl.patch
|
||||
D ipmitool-1_8_16_HEAD.patch
|
||||
D latest_compile_fixes.patch
|
||||
D ipmitool-sol_memleak.patch
|
||||
D ipmitool-1_8_15_HEAD.patch
|
||||
- Remove whitespace changes from:
|
||||
M 0001-Incorporate-upstream-comments-to-289-add-whitespace.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 25 11:57:55 UTC 2016 - trenn@suse.de
|
||||
|
||||
- Update to latest ipmitool source code
|
||||
commit 9020b67347f46554009591ae91e4fa8875c65dfa
|
||||
Date: Tue Jan 12 21:16:37 2016 +0500
|
||||
- Fix memleak: bnc#968105
|
||||
Add: ipmitool-sol_memleak.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 24 20:34:19 CET 2016 - ro@suse.de
|
||||
|
||||
- do not use systemd macros for non-systemd distributions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 14 16:02:43 UTC 2015 - trenn@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ipmitool
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,34 +17,25 @@
|
||||
|
||||
|
||||
Name: ipmitool
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: readline-devel
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
Url: http://ipmitool.sourceforge.net/
|
||||
Version: 1.8.18
|
||||
Release: 0
|
||||
Summary: Utility for IPMI Control
|
||||
License: BSD-3-Clause
|
||||
Group: System/Management
|
||||
Version: 1.8.15
|
||||
Release: 0
|
||||
Source: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
||||
Url: http://ipmitool.sourceforge.net/
|
||||
Source: %{name}/%{name}-%{version}.tar.xz
|
||||
Source1: ipmievd.service
|
||||
Source2: ipmievd.sysconf
|
||||
Patch1: ipmitool-1_8_15_HEAD.patch
|
||||
Patch3: fwum_enhance_output.patch
|
||||
Patch6: fix_file_permissions.patch
|
||||
Patch8: several_more_compile_fixes.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
|
||||
Patch100: fwum_enhance_output.patch
|
||||
Patch101: fix_file_permissions.patch
|
||||
Patch102: several_more_compile_fixes.patch
|
||||
Patch103: ipmitool_adjust_suse_paths.patch
|
||||
Patch104: hpm_x_compatibility_msg_is_debug_only.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: net-snmp
|
||||
# ToDo: Convert old init scripts to systemd with next submit iteration
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
@ -63,49 +54,37 @@ displaying sensor values, displaying the contents of the System Event
|
||||
Log (SEL), printing Field Replaceable Unit (FRU) information, reading
|
||||
and setting LAN configuration, and chassis power control.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch6 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p0
|
||||
%patch12 -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
touch INSTALL NEWS
|
||||
autoreconf -fiv
|
||||
%configure --with-pic
|
||||
%{__make} %{?jobs:-j%jobs}
|
||||
# file-security: enables more security checks on files
|
||||
%configure \
|
||||
--enable-file-security
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/ipmitool
|
||||
# exchange-bmc-os-info service
|
||||
%make_install
|
||||
rm -rf %{buildroot}%{_datadir}/doc/ipmitool
|
||||
|
||||
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 -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcexchange-bmc-os-info
|
||||
# exchange-bmc-os-info service
|
||||
install -D -m 0755 contrib/exchange-bmc-os-info.init.redhat %{buildroot}/%{_sbindir}/exchange-bmc-os-info
|
||||
install -D -m 0644 contrib/exchange-bmc-os-info.service.redhat %{buildroot}%{_unitdir}/exchange-bmc-os-info.service
|
||||
install -D -m 0644 contrib/exchange-bmc-os-info.sysconf %{buildroot}/%{_sysconfdir}/exchange-bmc-os-info
|
||||
ln -sf service %{buildroot}%{_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 -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcipmievd
|
||||
install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/ipmievd.service
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/ipmievd
|
||||
ln -sf service %{buildroot}%{_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 -sf %_sbindir/service ${RPM_BUILD_ROOT}%{_sbindir}/rcbmc-snmp-proxy
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -D -m 755 contrib/bmc-snmp-proxy %{buildroot}/%{_sbindir}/bmc-snmp-proxy
|
||||
install -D -m 644 contrib/bmc-snmp-proxy.service %{buildroot}%{_unitdir}/bmc-snmp-proxy.service
|
||||
install -D -m 755 contrib/bmc-snmp-proxy.sysconf %{buildroot}/%{_sysconfdir}/bmc-snmp-proxy
|
||||
ln -sf service %{buildroot}%{_sbindir}/rcbmc-snmp-proxy
|
||||
|
||||
%pre
|
||||
%service_add_pre bmc-snmp-proxy.service exchange-bmc-os-info.service ipmievd.service
|
||||
@ -120,7 +99,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%service_del_postun bmc-snmp-proxy.service exchange-bmc-os-info.service ipmievd.service
|
||||
|
||||
%files
|
||||
%defattr(644,root,root)
|
||||
%doc AUTHORS COPYING README
|
||||
%{_datadir}/ipmitool
|
||||
%attr(755,root,root) %{_bindir}/ipmitool
|
||||
@ -133,10 +111,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%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
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc %{_mandir}/man8/*
|
||||
%{_unitdir}/exchange-bmc-os-info.service
|
||||
%{_unitdir}/ipmievd.service
|
||||
%{_unitdir}/bmc-snmp-proxy.service
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
|
@ -1,175 +0,0 @@
|
||||
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>
|
@ -4,29 +4,11 @@ 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
|
||||
Index: ipmitool-1.8.18/lib/ipmi_ekanalyzer.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 @@
|
||||
--- ipmitool-1.8.18.orig/lib/ipmi_ekanalyzer.c 2017-07-05 16:04:30.733605009 +0200
|
||||
+++ ipmitool-1.8.18/lib/ipmi_ekanalyzer.c 2017-07-05 16:04:33.905784815 +0200
|
||||
@@ -4010,7 +4010,7 @@ ipmi_ek_display_clock_config_record(stru
|
||||
(feature & 1) ? "Source" : "Receiver");
|
||||
printf("\tFamily: 0x%02x - AccLVL: 0x%02x\n",
|
||||
family, accuracy);
|
||||
@ -35,11 +17,11 @@ Index: ipmitool-1.8.15/lib/ipmi_ekanalyzer.c
|
||||
freq, min_freq, max_freq);
|
||||
}
|
||||
printf("\n");
|
||||
Index: ipmitool-1.8.15/lib/ipmi_picmg.c
|
||||
Index: ipmitool-1.8.18/lib/ipmi_picmg.c
|
||||
===================================================================
|
||||
--- 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 @@
|
||||
--- ipmitool-1.8.18.orig/lib/ipmi_picmg.c 2017-07-05 16:04:30.737605232 +0200
|
||||
+++ ipmitool-1.8.18/lib/ipmi_picmg.c 2017-07-05 16:04:33.905784815 +0200
|
||||
@@ -850,7 +850,7 @@ ipmi_picmg_portstate_get(struct ipmi_int
|
||||
}
|
||||
else if (d->type >= 0x06 && d->type <= 0xef)
|
||||
{
|
||||
@ -48,7 +30,7 @@ Index: ipmitool-1.8.15/lib/ipmi_picmg.c
|
||||
}
|
||||
else if (d->type >= 0xf0 && d->type <= 0xfe)
|
||||
{
|
||||
@@ -1690,7 +1690,7 @@
|
||||
@@ -1702,7 +1702,7 @@ ipmi_picmg_clk_get(struct ipmi_intf * in
|
||||
oemval2str( rsp->data[3], rsp->data[4],
|
||||
picmg_clk_accuracy_vals));
|
||||
|
||||
@ -57,11 +39,11 @@ Index: ipmitool-1.8.15/lib/ipmi_picmg.c
|
||||
}
|
||||
}
|
||||
}
|
||||
Index: ipmitool-1.8.15/lib/ipmi_sdr.c
|
||||
Index: ipmitool-1.8.18/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 @@
|
||||
--- ipmitool-1.8.18.orig/lib/ipmi_sdr.c 2017-07-05 16:04:30.741605453 +0200
|
||||
+++ ipmitool-1.8.18/lib/ipmi_sdr.c 2017-07-05 16:04:33.909785056 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <ipmitool/ipmi_entity.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
|
Loading…
Reference in New Issue
Block a user