2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-22 01:21:44 +00:00

ipmitool-xcat version 1.8.17 build tools

This commit is contained in:
Patrick Lundgren 2016-09-26 15:26:39 -04:00
parent 6c97ae24b8
commit 654c56f3cf
7 changed files with 134 additions and 8 deletions

View File

@ -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

View File

@ -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;

View File

@ -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 */

View File

@ -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)
{

Binary file not shown.

View File

@ -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

View File

@ -1,5 +1,5 @@
#!/bin/bash
VERSION=1.8.15
VERSION=1.8.17
tar xvfz ipmitool-$VERSION.tar.gz
cd ipmitool-$VERSION