mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-12-25 04:31:40 +00:00
Add support for building ipmitool-xcat 1.8.18 for xcat-deps
and created the patches that are needed
This commit is contained in:
parent
f81246c0b8
commit
9410306529
1
ipmitool/debian/patches/ipmitool-1.8.18-rflash.patch
Symbolic link
1
ipmitool/debian/patches/ipmitool-1.8.18-rflash.patch
Symbolic link
@ -0,0 +1 @@
|
||||
../../ipmitool-1.8.18-rflash.patch
|
1
ipmitool/debian/patches/ipmitool-1.8.18-saneretry.patch
Symbolic link
1
ipmitool/debian/patches/ipmitool-1.8.18-saneretry.patch
Symbolic link
@ -0,0 +1 @@
|
||||
../../ipmitool-1.8.18-saneretry.patch
|
1
ipmitool/debian/patches/ipmitool-1.8.18-signal.patch
Symbolic link
1
ipmitool/debian/patches/ipmitool-1.8.18-signal.patch
Symbolic link
@ -0,0 +1 @@
|
||||
../../ipmitool-1.8.18-signal.patch
|
21
ipmitool/ipmitool-1.8.18-rflash.patch
Normal file
21
ipmitool/ipmitool-1.8.18-rflash.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- ./ipmitool-1.8.18/lib/ipmi_hpmfwupg.c 2016-06-29 14:01:49.000000000 -0400
|
||||
+++ ./ipmitool-1.8.18-rflash/lib/ipmi_hpmfwupg.c 2017-05-30 13:32:44.751054806 -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;
|
50
ipmitool/ipmitool-1.8.18-saneretry.patch
Normal file
50
ipmitool/ipmitool-1.8.18-saneretry.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- ./ipmitool-1.8.18/lib/ipmi_sol.c 2016-06-29 14:06:29.000000000 -0400
|
||||
+++ ./ipmitool-1.8.18-saneretry/lib/ipmi_sol.c 2017-05-30 13:41:12.462969340 -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 */
|
135
ipmitool/ipmitool-1.8.18-signal.patch
Normal file
135
ipmitool/ipmitool-1.8.18-signal.patch
Normal file
@ -0,0 +1,135 @@
|
||||
--- ./ipmitool-1.8.18/lib/ipmi_main.c 2016-07-31 02:56:33.000000000 -0400
|
||||
+++ ./ipmitool-1.8.18-signal/lib/ipmi_main.c 2017-05-30 14:04:11.798264910 -0400
|
||||
@@ -92,6 +92,7 @@
|
||||
|
||||
extern int verbose;
|
||||
extern int csv_output;
|
||||
+extern int sol_activated;
|
||||
extern const struct valstr ipmi_privlvl_vals[];
|
||||
extern const struct valstr ipmi_authtype_session_vals[];
|
||||
|
||||
@@ -271,24 +272,30 @@
|
||||
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);
|
||||
- /* reduce retry count to a single retry */
|
||||
- ipmi_main_intf->ssn_params.retry = 1;
|
||||
- /* close interface */
|
||||
- ipmi_main_intf->close(ipmi_main_intf);
|
||||
+ if (sol_activated == 1) {
|
||||
+ printf("\nSIGN %s: Deactivate sol session\r\n",strsignal(sig));
|
||||
+ sol_activated = 0;
|
||||
+ } else {
|
||||
+ if (ipmi_main_intf != NULL) {
|
||||
+ 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);
|
||||
+ }
|
||||
+ exit(-1);
|
||||
}
|
||||
- exit(-1);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
@@ -357,7 +364,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);
|
||||
memset(kgkey, 0, sizeof(kgkey));
|
||||
|
||||
while ((argflag = getopt(argc, (char **)argv, OPTION_STRING)) != -1)
|
||||
--- ./ipmitool-1.8.18/lib/ipmi_sol.c 2016-06-29 14:06:29.000000000 -0400
|
||||
+++ ./ipmitool-1.8.18-signal/lib/ipmi_sol.c 2017-05-30 14:28:55.503571252 -0400
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
@@ -99,6 +100,7 @@
|
||||
static int _use_sol_for_keepalive = 0;
|
||||
|
||||
extern int verbose;
|
||||
+int sol_activated = 0;
|
||||
|
||||
/*
|
||||
* ipmi_sol_payload_access
|
||||
@@ -1558,6 +1560,12 @@
|
||||
FD_SET(0, &read_fds);
|
||||
FD_SET(intf->fd, &read_fds);
|
||||
|
||||
+ if (sol_activated == 0) {
|
||||
+ bBmcClosedSession = 0;
|
||||
+ keepAliveRet = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if (!ipmi_oem_active(intf,"i82571spt"))
|
||||
{
|
||||
/* Send periodic keepalive packet */
|
||||
@@ -1668,22 +1676,24 @@
|
||||
}
|
||||
|
||||
leave_raw_mode();
|
||||
+ ipmi_sol_deactivate(intf, instance);
|
||||
|
||||
if (keepAliveRet != 0)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error: No response to keepalive - Terminating session");
|
||||
- /* attempt to clean up anyway */
|
||||
- ipmi_sol_deactivate(intf, instance);
|
||||
- exit(1);
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
if (bBmcClosedSession)
|
||||
{
|
||||
lprintf(LOG_ERR, "SOL session closed by BMC");
|
||||
- exit(1);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ else if (sol_activated == 0)
|
||||
+ {
|
||||
+ lprintf(LOG_ERR, "SOL session closed by signal");
|
||||
+ return -1;
|
||||
}
|
||||
- else
|
||||
- ipmi_sol_deactivate(intf, instance);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1768,6 +1778,8 @@
|
||||
data[4] = 0x00; /* reserved */
|
||||
data[5] = 0x00; /* reserved */
|
||||
|
||||
+ /* Make sure deactivate code sent to BMC no matter what the status is */
|
||||
+ sol_activated = 1;
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
if (NULL != rsp) {
|
BIN
ipmitool/ipmitool-1.8.18.tar.gz
Normal file
BIN
ipmitool/ipmitool-1.8.18.tar.gz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user