diff --git a/ipmitool/bldipmi.pl b/ipmitool/bldipmi.pl index ef160c5..bfe63be 100755 --- a/ipmitool/bldipmi.pl +++ b/ipmitool/bldipmi.pl @@ -37,12 +37,13 @@ if ( ! grep /openssl-devel|libopenssl/, @output ) { # check the source files my $pwd = `pwd`; -my $version = "1.8.15"; +my $version = "1.8.17"; chomp($pwd); if ( (! -f "$pwd/ipmitool-$version.tar.gz") || (! -f "$pwd/ipmitool.spec") || (! -f "$pwd/ipmitool-$version-saneretry.patch") - || (! -f "$pwd/ipmitool-$version-rflash.patch")) { + || (! -f "$pwd/ipmitool-$version-rflash.patch") + || (! -f "$pwd/ipmitool-$version-signal.patch")) { print "missed some necessary files for building.\n"; exit 1; } @@ -93,7 +94,7 @@ if (! grep /libcrypto.so/, @output) { exit 1; } -my $objrpm = "$blddir/RPMS/$arch/ipmitool-xcat-$version-3.$arch.rpm"; +my $objrpm = "$blddir/RPMS/$arch/ipmitool-xcat-$version-0.$arch.rpm"; my $dstdir = "/tmp/build/$os/$arch"; # check the build result diff --git a/ipmitool/ipmitool-1.8.17-rflash.patch b/ipmitool/ipmitool-1.8.17-rflash.patch new file mode 100644 index 0000000..d88fdb3 --- /dev/null +++ b/ipmitool/ipmitool-1.8.17-rflash.patch @@ -0,0 +1,21 @@ +--- ipmitool-1.8.17/lib/ipmi_hpmfwupg.c 2016-05-06 10:48:54.000000000 -0400 ++++ ipmitool-1.8.17-rflash/lib/ipmi_hpmfwupg.c 2016-09-08 15:00:12.441654169 -0400 +@@ -730,18 +730,6 @@ + lprintf(LOG_NOTICE, "\n Upgrade undesirable at this moment"); + return HPMFWUPG_ERROR; + } +- /* Get confimation from the user if he wants to continue when +- * service affected during upgrade +- */ +- if (!(option & COMPARE_MODE) +- && (pFwupgCtx->targetCap.GlobalCapabilities.bitField.servAffectDuringUpg == 1 +- || pImageHeader->imageCapabilities.bitField.servAffected == 1)) { +- if (HpmGetUserInput("\nServices may be affected during upgrade. Do you wish to continue? (y/n): ")) { +- rc = HPMFWUPG_SUCCESS; +- } else { +- return HPMFWUPG_ERROR; +- } +- } + } + /* Get the general properties of each component present in image */ + for (componentId = HPMFWUPG_COMPONENT_ID_0; diff --git a/ipmitool/ipmitool-1.8.17-saneretry.patch b/ipmitool/ipmitool-1.8.17-saneretry.patch new file mode 100644 index 0000000..e40fdf4 --- /dev/null +++ b/ipmitool/ipmitool-1.8.17-saneretry.patch @@ -0,0 +1,50 @@ +--- ipmitool-1.8.17/lib/ipmi_sol.c 2016-05-06 10:48:54.000000000 -0400 ++++ ipmitool-1.8.17-saneretry/lib/ipmi_sol.c 2016-09-08 14:55:18.201644718 -0400 +@@ -76,7 +76,6 @@ + #define SOL_PARAMETER_SOL_PAYLOAD_CHANNEL 0x07 + #define SOL_PARAMETER_SOL_PAYLOAD_PORT 0x08 + +-#define MAX_SOL_RETRY 6 + + const struct valstr sol_parameter_vals[] = { + { SOL_PARAMETER_SET_IN_PROGRESS, "Set In Progress (0)" }, +@@ -1535,7 +1534,6 @@ + int retval; + int buffer_size = intf->session->sol_data.max_inbound_payload_size; + int keepAliveRet = 0; +- int retrySol = 0; + + /* Subtract SOL header from max_inbound_payload_size */ + if (buffer_size > 4) +@@ -1572,29 +1570,8 @@ + + if (keepAliveRet != 0) + { +- /* +- * Retrying the keep Alive before declaring a communication +- * lost state with the IPMC. Helpful when the payload is +- * reset and brings down the connection temporarily. Otherwise, +- * if we send getDevice Id to check the status of IPMC during +- * this down time when the connection is restarting, SOL will +- * exit even though the IPMC is available and the session is open. +- */ +- if (retrySol == MAX_SOL_RETRY) +- { +- /* no response to Get Device ID keepalive message */ +- bShouldExit = 1; +- continue; +- } +- else +- { +- retrySol++; +- } +- } +- else +- { +- /* if the keep Alive is successful reset retries to zero */ +- retrySol = 0; ++ bShouldExit = 1; ++ continue; + } + } /* !oem="i82571spt" */ + /* Wait up to half a second */ diff --git a/ipmitool/ipmitool-1.8.17-signal.patch b/ipmitool/ipmitool-1.8.17-signal.patch new file mode 100644 index 0000000..b5ff435 --- /dev/null +++ b/ipmitool/ipmitool-1.8.17-signal.patch @@ -0,0 +1,54 @@ +--- ipmitool-1.8.17/include/ipmitool/ipmi_sol.h 2016-05-06 10:48:54.000000000 -0400 ++++ ipmitool-1.8.17-signal/include/ipmitool/ipmi_sol.h 2016-09-08 14:28:20.051574790 -0400 +@@ -104,5 +104,6 @@ + uint8_t channel, + struct sol_config_parameters * params); + ++void leave_raw_mode(void); + + #endif /* IPMI_SOL_H */ +--- ipmitool-1.8.17/lib/ipmi_main.c 2016-05-06 10:48:54.000000000 -0400 ++++ ipmitool-1.8.17-signal/lib/ipmi_main.c 2016-09-08 14:32:32.011584407 -0400 +@@ -271,23 +271,25 @@ + if (cmdlist != NULL) + ipmi_cmd_print(cmdlist); + } +-/* ipmi_catch_sigint - Handle the interrupt signal (Ctrl-C), close the +- * interface, and exit ipmitool with error (-1) ++ /* ipmi_catch_sig - Handle the interrupt signal (Ctrl-C),TERM signal, ++ * and HUP signal. Close the interface, and exit ++ * ipmitool with error (-1) + * +- * This insures that the IOL session gets freed +- * for other callers. ++ * This insures that the IOL session gets freed ++ * for other callers. + * + * returns -1 + */ +-void ipmi_catch_sigint() ++void ipmi_catch_sig(const int sig) + { + if (ipmi_main_intf != NULL) { +- printf("\nSIGN INT: Close Interface %s\n",ipmi_main_intf->desc); ++ printf("\nSIGN %s: Close Interface %s\n",strsignal(sig), ipmi_main_intf->desc); + /* reduce retry count to a single retry */ + ipmi_main_intf->ssn_params.retry = 1; + /* close interface */ + ipmi_main_intf->close(ipmi_main_intf); + } ++ leave_raw_mode(); + exit(-1); + } + +@@ -420,7 +422,9 @@ + /* save program name */ + progname = strrchr(argv[0], '/'); + progname = ((progname == NULL) ? argv[0] : progname+1); +- signal(SIGINT, ipmi_catch_sigint); ++ signal(SIGINT, ipmi_catch_sig); ++ signal(SIGTERM, ipmi_catch_sig); ++ signal(SIGHUP, ipmi_catch_sig); + + while ((argflag = getopt(argc, (char **)argv, OPTION_STRING)) != -1) + { diff --git a/ipmitool/ipmitool-1.8.17.tar.gz b/ipmitool/ipmitool-1.8.17.tar.gz new file mode 100644 index 0000000..fa56f74 Binary files /dev/null and b/ipmitool/ipmitool-1.8.17.tar.gz differ diff --git a/ipmitool/ipmitool.spec b/ipmitool/ipmitool.spec index f938992..2d736be 100644 --- a/ipmitool/ipmitool.spec +++ b/ipmitool/ipmitool.spec @@ -1,14 +1,14 @@ Name: ipmitool-xcat Summary: ipmitool - Utility for IPMI control -Version: 1.8.15 -Release: 3 +Version: 1.8.17 +Release: 0 License: BSD Group: Utilities Packager: IBM Corp. Source: ipmitool-%{version}.tar.gz Patch: ipmitool-%{version}-saneretry.patch Patch2: ipmitool-%{version}-rflash.patch -Patch3: ipmitool-%{version}-solactivate.patch +#Patch3: ipmitool-%{version}-solactivate.patch Patch4: ipmitool-%{version}-signal.patch Buildroot: /var/tmp/ipmitool-root @@ -35,7 +35,7 @@ fi %setup -n ipmitool-%{version} %patch -p1 %patch2 -p1 -%patch3 -p1 +#%patch3 -p1 %patch4 -p1 %build diff --git a/ipmitool/make_deb.sh b/ipmitool/make_deb.sh index 8c6813b..ba3bcfc 100755 --- a/ipmitool/make_deb.sh +++ b/ipmitool/make_deb.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION=1.8.15 +VERSION=1.8.17 tar xvfz ipmitool-$VERSION.tar.gz cd ipmitool-$VERSION