Accepting request 868921 from systemsmanagement

OBS-URL: https://build.opensuse.org/request/show/868921
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ipmitool?expand=0&rev=39
This commit is contained in:
Dominique Leuenberger 2021-02-04 19:22:49 +00:00 committed by Git OBS Bridge
commit 77e284a3fc
5 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,13 @@
Index: ipmitool-1.8.18+git20200916.1245aaa387dc/lib/helper.c
===================================================================
--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/lib/helper.c
+++ ipmitool-1.8.18+git20200916.1245aaa387dc/lib/helper.c
@@ -935,7 +935,7 @@ ipmi_start_daemon(struct ipmi_intf *intf
exit(1);
}
ret = dup(fd);
- if (ret != STDOUT_FILENO) {
+ if (ret != STDERR_FILENO) {
lprintf(LOG_ERR, "failed to reset stderr: %s (%d)", strerror(errno), errno);
exit(1);
}

View File

@ -0,0 +1,39 @@
Index: ipmitool-1.8.18+git20200916.1245aaa387dc/src/ipmievd.c
===================================================================
--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/src/ipmievd.c
+++ ipmitool-1.8.18+git20200916.1245aaa387dc/src/ipmievd.c
@@ -702,8 +702,8 @@ ipmievd_main(struct ipmi_event_intf * ei
struct sigaction act;
mode_t oldumask;
- memset(pidfile, 0, 64);
- sprintf(pidfile, "%s%d", DEFAULT_PIDFILE, eintf->intf->devnum);
+ memset(pidfile, 0, sizeof(pidfile));
+ strncpy(pidfile, DEFAULT_PIDFILE, sizeof(pidfile)-1);
for (i = 0; i < argc; i++) {
if (strcasecmp(argv[i], "help") == 0) {
Index: ipmitool-1.8.18+git20200916.1245aaa387dc/doc/ipmievd.8.in
===================================================================
--- ipmitool-1.8.18+git20200916.1245aaa387dc.orig/doc/ipmievd.8.in
+++ ipmitool-1.8.18+git20200916.1245aaa387dc/doc/ipmievd.8.in
@@ -174,8 +174,7 @@ Do NOT become a daemon, instead log all
.TP
\fIpidfile\fP=<\fBfilename\fR>
Save process ID to this file when in daemon mode. Defaults to
-/var/run/ipmievd.pid\fIN\fP (where \fIN\fP is the ipmi device
-number -- defaults to 0).
+/var/run/ipmievd.pid.
.RE
.TP
@@ -197,8 +196,7 @@ Do NOT become a daemon, instead log all
.TP
\fIpidfile\fP=<\fBfilename\fR>
Save process ID to this file when in daemon mode. Defaults to
-/var/run/ipmievd.pid\fIN\fP (where \fIN\fP is the ipmi device
-number -- defaults to 0).
+/var/run/ipmievd.pid.
.TP
\fItimeout\fP=<\fBseconds\fR>
Time between checks for SEL polling method. Default is 10 seconds.

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Feb 3 11:08:48 UTC 2021 - Thomas Renninger <trenn@suse.de>
- Fixes (bsc#1179133) lanplus: hanging on getting cipher suites for 10 seconds
A lanplus-don-t-retry-pre-session-Get-cipher-suites.patch
-------------------------------------------------------------------
Thu Jan 28 13:53:14 UTC 2021 - Josef Möllers <josef.moellers@suse.com>
- Do not append the device number to the PIDFILE pathname
as this will confuse systemd.
[bsc#1181063, 0008-bsc#1181063-dont-parametrize-pidfile-name.patch]
-------------------------------------------------------------------
Thu Jan 28 09:10:47 UTC 2021 - Josef Möllers <josef.moellers@suse.com>
- When really starting the daemon, in lib/helper.c::ipmi_start_daemon()
stdin/stdout/stderr are redirected to /dev/null and this is checked
but the check for stderr tests for STDOUT_FILENO. This is, most
likely, a copy-paste error.
[bsc#1175328, 0007-bsc#1175328-check-for-correct-fd.patch]
-------------------------------------------------------------------
Wed Sep 23 07:49:45 UTC 2020 - Klaus Kämpf <kkaempf@suse.com>

View File

@ -33,6 +33,9 @@ Patch3: 0003-Cleanup-and-compiler-issues-only-no-functional-chang.patch
Patch4: 0004-Adjust-SUSE-paths.patch
Patch5: 0005-HPM-x-compatibility-message-is-DEBUG-only.patch
Patch6: 0006-Make-IANA-PEN-download-configurable-fix-uninitalized.patch
Patch7: 0007-bsc#1175328-check-for-correct-fd.patch
Patch8: 0008-bsc#1181063-dont-parametrize-pidfile-name.patch
Patch9: lanplus-don-t-retry-pre-session-Get-cipher-suites.patch
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: readline-devel

View File

@ -0,0 +1,35 @@
From: Václav Doležal <vdolezal@redhat.com>
Subject: lanplus: don't retry pre-session Get cipher suites
References: bsc#1179133
Patch-Mainline:
Git-commit: 0de01deddb0aca475b3929c372ca2448d6858a89
Git-repo: https://github.com/yontalcar/ipmitool.git.git
Some BMCs are ignoring it, causing needless delay.
Addresses: https://github.com/ipmitool/ipmitool/issues/199
Signed-off-by: Václav Doležal <vdolezal@redhat.com>
Signed-off-by: <trenn@suse.com>
diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
index f5aba5e..06b29a0 100644
--- a/src/plugins/lanplus/lanplus.c
+++ b/src/plugins/lanplus/lanplus.c
@@ -3390,9 +3390,13 @@ ipmi_find_best_cipher_suite(struct ipmi_intf *intf)
};
const size_t nr_preferred = ARRAY_SIZE(cipher_order_preferred);
size_t ipref, i;
+ int rc;
+ int retry_old = intf->ssn_params.retry;
- if (ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E,
- suites, &nr_suites) < 0)
+ ipmi_intf_session_set_retry(intf, 1);
+ rc = ipmi_get_channel_cipher_suites(intf, "ipmi", IPMI_LAN_CHANNEL_E, suites, &nr_suites);
+ ipmi_intf_session_set_retry(intf, retry_old);
+ if (rc < 0)
{
/* default legacy behavior - fall back to cipher suite 3 */
return IPMI_LANPLUS_CIPHER_SUITE_3;