Compare commits
No commits in common. "imports/c8s/ppc64-diag-2.7.6-1.el8" and "c8" have entirely different histories.
imports/c8
...
c8
|
@ -1 +1 @@
|
|||
SOURCES/ppc64-diag-2.7.6.tar.gz
|
||||
SOURCES/ppc64-diag-2.7.9.tar.gz
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
1e787343b4b9fa598fd5882bbad2c7f4ac541786 SOURCES/ppc64-diag-2.7.6.tar.gz
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ppc64-diag-2.7.5/opal-dump-parse/opal-dump-parse.c.me ppc64-diag-2.7.5/opal-dump-parse/opal-dump-parse.c
|
||||
--- ppc64-diag-2.7.5/opal-dump-parse/opal-dump-parse.c.me 2019-04-30 05:45:13.441888580 -0400
|
||||
+++ ppc64-diag-2.7.5/opal-dump-parse/opal-dump-parse.c 2019-04-30 06:02:49.102876167 -0400
|
||||
@@ -461,7 +461,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int opt = 0;
|
||||
|
||||
- while ((opt = getopt(argc, argv, "lh:s:o:")) != -1) {
|
||||
+ while ((opt = getopt(argc, argv, ":s:o:lh")) != -1) {
|
||||
switch (opt) {
|
||||
case 'l':
|
||||
opt_mdst = 1;
|
|
@ -0,0 +1,71 @@
|
|||
commit db0c6d7974d7f8909878384d77ec02457759d6df
|
||||
Author: Nilay Shroff <nilay@linux.ibm.com>
|
||||
Date: Tue Jan 16 13:55:03 2024 +0530
|
||||
|
||||
diags/diag_nvme: call_home command fails on nvmf drive
|
||||
|
||||
The diag_nvme command needs to retrieve the VPD log page from NVMe for
|
||||
filling in the product data while generating the call-home event.
|
||||
However, call-home feature is supported for directly attached NVMe
|
||||
module. In the current diag_nvme implementation, if user doesn't
|
||||
provide NVMe device name for diagnostics then it(diag_nvme) loops
|
||||
through each NVMe moudle (directly connected to the system/LPAR as
|
||||
well as discovered over fabrics) and attempt retrieving the SMART log
|
||||
page as well as VPD page. Unfortunately, diag_nvme fails to retrieve
|
||||
the VPD page for NVMe connected over fabrics and that causes the
|
||||
diag_nvme to print "not-so-nice" failure messages on console.
|
||||
|
||||
Henec fixed the diag_nvme code so that for call-home event reporting,
|
||||
it skips the NVMe which is connected over fabrics and prints a
|
||||
"nice-message" informing the user that it's skipping diagnosting for
|
||||
NVMe module connected over fabrics. In a nutshell, with this fix now
|
||||
diag_nvme would only diagnose the NVMe module which is directtly
|
||||
attached (over PCIe) to the system.
|
||||
|
||||
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
|
||||
|
||||
diff --git a/diags/diag_nvme.c b/diags/diag_nvme.c
|
||||
index c1c0a20..e86786c 100644
|
||||
--- a/diags/diag_nvme.c
|
||||
+++ b/diags/diag_nvme.c
|
||||
@@ -375,9 +375,40 @@ static int diagnose_nvme(char *device_name, struct notify *notify, char *file_pa
|
||||
char endurance_s[sizeof(vpd.endurance) + 1], capacity_s[sizeof(vpd.capacity)+1];
|
||||
uint64_t event_id;
|
||||
uint8_t severity;
|
||||
+ FILE *fp;
|
||||
+ char tr_file_path[PATH_MAX];
|
||||
uint32_t raw_data_len = 0;
|
||||
unsigned char *raw_data = NULL;
|
||||
|
||||
+ /*
|
||||
+ * Skip diag test if NVMe is connected over fabric
|
||||
+ */
|
||||
+ snprintf(tr_file_path, sizeof(tr_file_path),
|
||||
+ NVME_SYS_PATH"/%s/%s", device_name, "transport");
|
||||
+ fp = fopen(tr_file_path, "r");
|
||||
+ if (fp) {
|
||||
+ char buf[12];
|
||||
+ int n = fread(buf, 1, sizeof(buf), fp);
|
||||
+
|
||||
+ if (n) {
|
||||
+ /*
|
||||
+ * If NVMe transport is anything but pcie then skip the diag test
|
||||
+ */
|
||||
+ if (strncmp(buf, "pcie", 4) != 0) {
|
||||
+ fprintf(stdout, "Skipping diagnostics for nvmf : %s\n",
|
||||
+ device_name);
|
||||
+ fclose(fp);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(fp);
|
||||
+ } else {
|
||||
+ fprintf(stderr, "Skipping diagnostics for %s:\n"
|
||||
+ "Unable to find the nvme transport type\n",
|
||||
+ device_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
tmp_rc = regex_controller(controller_name, device_name);
|
||||
if (tmp_rc != 0)
|
||||
return -1;
|
|
@ -0,0 +1,63 @@
|
|||
commit 0fa486dbe800bea05c81fc33eee197873573fefb
|
||||
Author: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Date: Fri Sep 8 12:35:14 2023 +0530
|
||||
|
||||
ppc64-diag/lp_diag: Enable light path diagnostics for RTAS events
|
||||
|
||||
Currently, Light Path Diagnostics support is enabled only for OS and
|
||||
Enclosure type events. Enable light path diagnostics support for RTAS
|
||||
type events by turning on only the high priority FRU callouts.
|
||||
|
||||
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
|
||||
|
||||
diff --git a/lpd/lp_diag.c b/lpd/lp_diag.c
|
||||
index e6f5d3c..e67db02 100644
|
||||
--- a/lpd/lp_diag.c
|
||||
+++ b/lpd/lp_diag.c
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "lp_util.h"
|
||||
#include "utils.h"
|
||||
|
||||
+static int rtas_event;
|
||||
+
|
||||
/* FRU callout priority as defined in PAPR+
|
||||
*
|
||||
* Note: Order of the priority is important!
|
||||
@@ -173,8 +175,10 @@ service_event_supported(struct sl_event *event)
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
- case SL_TYPE_BMC:
|
||||
case SL_TYPE_RTAS:
|
||||
+ rtas_event = 1;
|
||||
+ break;
|
||||
+ case SL_TYPE_BMC:
|
||||
case SL_TYPE_BASIC:
|
||||
default:
|
||||
return 0;
|
||||
@@ -446,14 +450,20 @@ parse_service_event(int event_id)
|
||||
attn_loc = &list[0];
|
||||
|
||||
if (operating_mode == LED_MODE_LIGHT_PATH) {
|
||||
- if (event->callouts)
|
||||
+ if (event->callouts) {
|
||||
/* Run over FRU callout priority in order and
|
||||
* enable fault indicator
|
||||
*/
|
||||
- for (i = 0; FRU_CALLOUT_PRIORITY[i]; i++)
|
||||
+ if (!rtas_event) {
|
||||
+ for (i = 0; FRU_CALLOUT_PRIORITY[i]; i++)
|
||||
+ rc = event_fru_callout(event->callouts, list,
|
||||
+ FRU_CALLOUT_PRIORITY[i],
|
||||
+ &attn_on);
|
||||
+ } else {
|
||||
rc = event_fru_callout(event->callouts, list,
|
||||
- FRU_CALLOUT_PRIORITY[i],
|
||||
- &attn_on);
|
||||
+ 'H', &attn_on);
|
||||
+ }
|
||||
+ }
|
||||
else {
|
||||
/* No callout list, enable check log indicator */
|
||||
indicator_log_write("Empty callout list");
|
|
@ -0,0 +1,378 @@
|
|||
From 9e2a0ee2356b2416479affe5e56903a265303cf4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Thu, 7 Apr 2022 19:08:47 +0200
|
||||
Subject: [PATCH 1/4] fix message catalog location
|
||||
|
||||
---
|
||||
ela/Makefile.am | 22 +++++++++++-----------
|
||||
ela/catalogs.h | 2 +-
|
||||
ela/explain_syslog.cpp | 2 +-
|
||||
ela/syslog_to_svclog.cpp | 2 +-
|
||||
4 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/ela/Makefile.am b/ela/Makefile.am
|
||||
index 9dcb81c..a7d5a3f 100644
|
||||
--- a/ela/Makefile.am
|
||||
+++ b/ela/Makefile.am
|
||||
@@ -62,22 +62,22 @@ clean-local-ela:
|
||||
CLEAN_LOCALS += clean-local-ela
|
||||
|
||||
install-exec-hook-ela:
|
||||
- install -d --mode=755 $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/
|
||||
- install -D --mode=644 $(CATALOG) $(DESTDIR)/etc/ppc64-diag/message_catalog/
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
+ install -D --mode=644 $(CATALOG) $(DESTDIR)/usr/share/ppc64-diag/message_catalog/
|
||||
install -D --mode=644 $(CATALOG_REGEX) \
|
||||
- $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/
|
||||
+ $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-ela
|
||||
|
||||
uninstall-hook-ela:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/cxgb3
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/e1000e
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/exceptions
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/reporters
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/gpfs
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/cxgb3
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/e1000e
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/gpfs
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/cxgb3
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/e1000e
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/exceptions
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/reporters
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/gpfs
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/cxgb3
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/e1000e
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/gpfs
|
||||
|
||||
UNINSTALL_HOOKS += uninstall-hook-ela
|
||||
|
||||
diff --git a/ela/catalogs.h b/ela/catalogs.h
|
||||
index ce68a86..f77ee01 100644
|
||||
--- a/ela/catalogs.h
|
||||
+++ b/ela/catalogs.h
|
||||
@@ -34,7 +34,7 @@ using namespace std;
|
||||
#include <stdio.h>
|
||||
#include <regex.h>
|
||||
|
||||
-#define ELA_CATALOG_DIR "/etc/ppc64-diag/message_catalog"
|
||||
+#define ELA_CATALOG_DIR "/usr/share/ppc64-diag/message_catalog"
|
||||
|
||||
class Parser {
|
||||
protected:
|
||||
diff --git a/ela/explain_syslog.cpp b/ela/explain_syslog.cpp
|
||||
index f8a0dc7..4b26418 100644
|
||||
--- a/ela/explain_syslog.cpp
|
||||
+++ b/ela/explain_syslog.cpp
|
||||
@@ -97,7 +97,7 @@ print_help(void)
|
||||
printf(
|
||||
"-b begin_time\tIgnore messages with timestamps prior to begin_time.\n"
|
||||
"-C catalog_dir\tUse message catalog in catalog_dir. Defaults to\n"
|
||||
-"\t\t\t/etc/ppc64-diag/message_catalog.\n"
|
||||
+"\t\t\t/usr/share/ppc64-diag/message_catalog.\n"
|
||||
"-d\t\tPrint debugging output on stderr.\n"
|
||||
"-e end_time\tStop upon reading message with timestamp after end_time.\n"
|
||||
"-h\t\tPrint this help text and exit.\n"
|
||||
diff --git a/ela/syslog_to_svclog.cpp b/ela/syslog_to_svclog.cpp
|
||||
index 35adca2..2b3d945 100644
|
||||
--- a/ela/syslog_to_svclog.cpp
|
||||
+++ b/ela/syslog_to_svclog.cpp
|
||||
@@ -682,7 +682,7 @@ print_help(void)
|
||||
printf(
|
||||
"-b begin_time\tIgnore messages with timestamps prior to begin_time.\n"
|
||||
"-C catalog_dir\tUse message catalog in catalog_dir. Defaults to\n"
|
||||
-"\t\t\t/etc/ppc64-diag/message_catalog.\n"
|
||||
+"\t\t\t/usr/share/ppc64-diag/message_catalog.\n"
|
||||
"-d\t\tPrint debugging output on stderr.\n"
|
||||
"-e end_time\tStop upon reading message with timestamp after end_time.\n"
|
||||
"-F\t\tDon't stop at EOF; process newly logged messages as they occur.\n"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
From 1f962c902b170f073af51693182d2b4e3ec4f174 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Thu, 7 Apr 2022 19:09:21 +0200
|
||||
Subject: [PATCH 2/4] fix script location
|
||||
|
||||
---
|
||||
scripts/Makefile.am | 15 ++++++++-------
|
||||
scripts/ppc64_diag_migrate | 2 +-
|
||||
scripts/ppc64_diag_mkrsrc | 4 ++--
|
||||
scripts/ppc64_diag_notify | 6 +++---
|
||||
scripts/ppc64_diag_servagent | 4 ++--
|
||||
scripts/ppc64_diag_setup | 6 +++---
|
||||
scripts/rtas_errd | 2 +-
|
||||
7 files changed, 20 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/scripts/ppc64_diag_migrate
|
||||
+++ b/scripts/ppc64_diag_migrate
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for performing whatever actions may be necessary following
|
||||
diff --git a/scripts/ppc64_diag_mkrsrc b/scripts/ppc64_diag_mkrsrc
|
||||
index 53e7a27..4df8b72 100755
|
||||
--- a/scripts/ppc64_diag_mkrsrc
|
||||
+++ b/scripts/ppc64_diag_mkrsrc
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for creating a new IBM.ServiceEvent RMC resource when a
|
||||
@@ -27,7 +27,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
# Check to make sure that devices.chrp.base.ServiceRM is installed
|
||||
$rc = system("which rpm >/dev/null 2>&1");
|
||||
diff --git a/scripts/ppc64_diag_notify b/scripts/ppc64_diag_notify
|
||||
index 9f198d9..607bb7f 100755
|
||||
--- a/scripts/ppc64_diag_notify
|
||||
+++ b/scripts/ppc64_diag_notify
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for sending out e-mail notifications of new ppc64 platform
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
sub usage {
|
||||
print "$0 [OPTIONS]\n";
|
||||
@@ -156,7 +156,7 @@ if ($flag_email) {
|
||||
chomp $hostname;
|
||||
$subject = "$hostname: serviceable platform event logged";
|
||||
|
||||
- if (open(MAILLIST, "< /etc/ppc64-diag/mail_list")) {
|
||||
+ if (open(MAILLIST, "< /usr/libexec/ppc64-diag/mail_list")) {
|
||||
while (<MAILLIST>) {
|
||||
chomp;
|
||||
$pos = index($_, "#");
|
||||
diff --git a/scripts/ppc64_diag_servagent b/scripts/ppc64_diag_servagent
|
||||
index 4f45983..9966302 100755
|
||||
--- a/scripts/ppc64_diag_servagent
|
||||
+++ b/scripts/ppc64_diag_servagent
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for invoking Electronic Service Agent in response to a
|
||||
@@ -25,7 +25,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
if (!-e "/usr/svcagent/bin/callsa2") {
|
||||
# eSA is not installed; exit quietly
|
||||
diff --git a/scripts/ppc64_diag_setup b/scripts/ppc64_diag_setup
|
||||
index 283c357..2c80c5c 100755
|
||||
--- a/scripts/ppc64_diag_setup
|
||||
+++ b/scripts/ppc64_diag_setup
|
||||
@@ -89,15 +89,15 @@ sub unregister {
|
||||
|
||||
@notification_tools = (
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_notify -q -e root -l /var/log/platform",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_notify -q -e root -l /var/log/platform",
|
||||
"--match='serviceable=1' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_mkrsrc",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_mkrsrc",
|
||||
"--match='serviceable=1' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_migrate",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_migrate",
|
||||
"--match=\'refcode=\"#MIGRATE\" and serviceable=0\' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
);
|
||||
diff --git a/scripts/rtas_errd b/scripts/rtas_errd
|
||||
index d5d40fe..fd9d5d2 100755
|
||||
--- a/scripts/rtas_errd
|
||||
+++ b/scripts/rtas_errd
|
||||
@@ -66,7 +66,7 @@ case "$1" in
|
||||
echo "registering ppc64-diag with system"
|
||||
rm -f /var/cache/ppc64-diag.registered
|
||||
mkdir -v /var/cache/ppc64-diag.registered
|
||||
- /etc/ppc64-diag/ppc64_diag_setup --register
|
||||
+ /usr/libexec/ppc64-diag/ppc64_diag_setup --register
|
||||
fi
|
||||
echo -n "Starting rtas_errd (platform error handling) daemon: "
|
||||
if [ $INSSERV -eq 1 ]; then
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
From 6d56d9d7b96232d2e75800282a86760ba87b9204 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Thu, 7 Apr 2022 19:10:32 +0200
|
||||
Subject: [PATCH 3/4] fix lpd script location
|
||||
|
||||
---
|
||||
lpd/Makefile.am | 8 ++++----
|
||||
lpd/scripts/lp_diag_notify | 2 +-
|
||||
lpd/scripts/lp_diag_setup | 6 +++---
|
||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/lpd/Makefile.am b/lpd/Makefile.am
|
||||
index 4e0c03f..df362c0 100644
|
||||
--- a/lpd/Makefile.am
|
||||
+++ b/lpd/Makefile.am
|
||||
@@ -46,16 +46,16 @@ all-local-lpd:
|
||||
AM_LOCALS += all-local-lpd
|
||||
|
||||
install-exec-hook-lpd:
|
||||
- install -d --mode=755 $(DESTDIR)/etc/ppc64-diag
|
||||
- install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/etc/ppc64-diag/
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag
|
||||
+ install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
(cd $(DESTDIR)/$(sbindir) && $(LN_S) -f usysident usysattn)
|
||||
(cd $(DESTDIR)/$(sbindir) && $(LN_S) -f usysident usysfault)
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-lpd
|
||||
|
||||
uninstall-hook-lpd:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/lp_diag_setup
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/lp_diag_notify
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/lp_diag_setup
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/lp_diag_notify
|
||||
rm -f $(sbindir)/usysattn
|
||||
rm -f $(sbindir)/usysfault
|
||||
|
||||
diff --git a/lpd/scripts/lp_diag_notify b/lpd/scripts/lp_diag_notify
|
||||
index 52dc242..f500299 100755
|
||||
--- a/lpd/scripts/lp_diag_notify
|
||||
+++ b/lpd/scripts/lp_diag_notify
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I /etc/ppc64-diag
|
||||
+#!/usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
# @file lp_diag_notify
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool.
|
||||
diff --git a/lpd/scripts/lp_diag_setup b/lpd/scripts/lp_diag_setup
|
||||
index 8dabb75..4b4d0a2 100755
|
||||
--- a/lpd/scripts/lp_diag_setup
|
||||
+++ b/lpd/scripts/lp_diag_setup
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I /etc/ppc64-diag
|
||||
+#!/usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
# @file lp_diag_setup
|
||||
# @brief Register/unregister Light Path notification tools
|
||||
# with servicelog
|
||||
@@ -91,10 +91,10 @@ sub unregister {
|
||||
}
|
||||
|
||||
@notification_tools = (
|
||||
- ["/etc/ppc64-diag/lp_diag_notify -e",
|
||||
+ ["/usr/libexec/ppc64-diag/lp_diag_notify -e",
|
||||
"--match='disposition>=1 and severity>=4 and serviceable=1' ".
|
||||
"--type=EVENT --method=num_arg"],
|
||||
- ["/etc/ppc64-diag/lp_diag_notify -r",
|
||||
+ ["/usr/libexec/ppc64-diag/lp_diag_notify -r",
|
||||
"--type=REPAIR --method=num_arg"],
|
||||
);
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
From 156ec91278ba350a4cd7a722a2431e07e4f461bc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Thu, 7 Apr 2022 19:11:02 +0200
|
||||
Subject: [PATCH 4/4] fix permissions
|
||||
|
||||
---
|
||||
diags/Makefile.am | 2 +-
|
||||
lpd/Makefile.am | 2 +-
|
||||
rtas_errd/Makefile.am | 2 +-
|
||||
scripts/Makefile.am | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/diags/Makefile.am b/diags/Makefile.am
|
||||
index f513cec..268d5f4 100644
|
||||
--- a/diags/Makefile.am
|
||||
+++ b/diags/Makefile.am
|
||||
@@ -43,7 +43,7 @@ DIAG_CRONTAB_SCRIPT = diags/run_diag_encl
|
||||
install-exec-hook-diag:
|
||||
install -d --mode=755 $(DESTDIR)/var/log/ppc64-diag/diag_disk
|
||||
install -d --mode=755 $(DESTDIR)/etc/cron.daily/
|
||||
- install -D --mode=744 $(DIAG_CRONTAB_SCRIPT) $(DESTDIR)/etc/cron.daily/
|
||||
+ install -D --mode=644 $(DIAG_CRONTAB_SCRIPT) $(DESTDIR)/etc/cron.daily/
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-diag
|
||||
|
||||
diff --git a/lpd/Makefile.am b/lpd/Makefile.am
|
||||
index df362c0..c430b9a 100644
|
||||
--- a/lpd/Makefile.am
|
||||
+++ b/lpd/Makefile.am
|
||||
@@ -47,7 +47,7 @@ AM_LOCALS += all-local-lpd
|
||||
|
||||
install-exec-hook-lpd:
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag
|
||||
- install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
+ install -D --mode=755 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
(cd $(DESTDIR)/$(sbindir) && $(LN_S) -f usysident usysattn)
|
||||
(cd $(DESTDIR)/$(sbindir) && $(LN_S) -f usysident usysfault)
|
||||
|
||||
diff --git a/rtas_errd/Makefile.am b/rtas_errd/Makefile.am
|
||||
index f475840..ed70978 100644
|
||||
--- a/rtas_errd/Makefile.am
|
||||
+++ b/rtas_errd/Makefile.am
|
||||
@@ -47,7 +47,7 @@ dist_man_MANS += rtas_errd/man/rtas_errd.8
|
||||
|
||||
install-exec-hook-rtas-errd:
|
||||
install -d --mode=755 $(DESTDIR)/etc/
|
||||
- install -D --mode=744 $(rtas_scripts) $(DESTDIR)/etc/
|
||||
+ install -D --mode=755 $(rtas_scripts) $(DESTDIR)/etc/
|
||||
|
||||
uninstall-hook-rtas-errd:
|
||||
rm -f $(DESTDIR)/etc/rc.powerfail
|
||||
diff -up ppc64-diag-2.7.9/scripts/Makefile.am.me ppc64-diag-2.7.9/scripts/Makefile.am
|
||||
--- ppc64-diag-2.7.9/scripts/Makefile.am.me 2022-10-18 16:32:52.476721485 +0200
|
||||
+++ ppc64-diag-2.7.9/scripts/Makefile.am 2022-10-18 16:36:34.798721016 +0200
|
||||
@@ -12,20 +12,21 @@ INIT_FILES = scripts/rtas_errd scripts/o
|
||||
SERVICE_SCRIPT = scripts/rtas_errd.service scripts/opal_errd.service
|
||||
|
||||
install-exec-hook-scripts:
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/etc/ppc64-diag/
|
||||
- install -D --mode=744 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/etc/ppc64-diag/
|
||||
- install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag
|
||||
+ install -D --mode=755 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
+ install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -D --mode=755 $(INIT_FILES) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/usr/lib/systemd/system/
|
||||
install -D --mode=644 $(SERVICE_SCRIPT) $(DESTDIR)/usr/lib/systemd/system/
|
||||
|
||||
uninstall-hook-scripts:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_setup
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_mkrsrc
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_notify
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_migrate
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/servevent_parse.pl
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_setup
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_mkrsrc
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_notify
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_migrate
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/servevent_parse.pl
|
||||
rm -f $(DESTDIR)/etc/ppc64-diag/ppc64-diag.config
|
||||
rm -f $(DESTDIR)/etc/ppc64-diag/diag_nvme.config
|
||||
rm -f $(DESTDIR)/usr/libexec/ppc64-diag/rtas_errd
|
|
@ -0,0 +1,100 @@
|
|||
commit d05654e5ec6f37cf6caa491fc7d95b336f9603e2
|
||||
Author: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Date: Mon Jul 10 13:43:21 2023 +0530
|
||||
|
||||
rtas_errd: Handle multiple platform dumps
|
||||
|
||||
Currently, whenever a new dump arrives, old dump file of that specific dump
|
||||
type is removed before writing the new dump out. Any dump file with the
|
||||
same prefix (dump type) gets deleted. This means only one set of dump files
|
||||
is saved, since only one dump file per dump type is saved.
|
||||
|
||||
Handle multiple dumps on Linux by allowing as many dumps to be offloaded
|
||||
until disk space is available. To do this, remove the function that checks
|
||||
for prefix size and removes old dump files. In the event of not enough
|
||||
disk space available, log an error to the user along with the dump tag.
|
||||
User will free up space and run extract_platdump tool using the dump tag
|
||||
provided in the error message to offload the dump. Error log can be viewed
|
||||
by the user by issuing 'journalctl -p err -t rtas_errd' command.
|
||||
|
||||
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
|
||||
|
||||
diff --git a/rtas_errd/dump.c b/rtas_errd/dump.c
|
||||
index cc50d91..494c322 100644
|
||||
--- a/rtas_errd/dump.c
|
||||
+++ b/rtas_errd/dump.c
|
||||
@@ -30,8 +30,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <librtas.h>
|
||||
#include <librtasevent.h>
|
||||
+#include <syslog.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
+#include <sys/statvfs.h>
|
||||
#include "utils.h"
|
||||
#include "rtas_errd.h"
|
||||
|
||||
@@ -284,7 +286,9 @@ void
|
||||
check_platform_dump(struct event *event)
|
||||
{
|
||||
struct rtas_dump_scn *dump_scn;
|
||||
+ struct statvfs vfs;
|
||||
uint64_t dump_tag;
|
||||
+ uint64_t dump_size;
|
||||
char filename[DUMP_MAX_FNAME_LEN + 20], *pos;
|
||||
char *pathname = NULL;
|
||||
FILE *f;
|
||||
@@ -306,11 +310,34 @@ check_platform_dump(struct event *event)
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Retrieve the dump */
|
||||
+ /* Retrieve the dump tag */
|
||||
dump_tag = dump_scn->id;
|
||||
dump_tag |= ((uint64_t)dump_scn->v6hdr.subtype << 32);
|
||||
dbg("Dump ID: 0x%016LX", dump_tag);
|
||||
|
||||
+ if (statvfs(d_cfg.platform_dump_path, &vfs) == -1) {
|
||||
+ log_msg(event, "statvfs() failed on %s: %s",
|
||||
+ d_cfg.platform_dump_path, strerror(errno));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Retrieve the size of the platform dump */
|
||||
+ dump_size = dump_scn->size_hi;
|
||||
+ dump_size <<= 32;
|
||||
+ dump_size |= dump_scn->size_lo;
|
||||
+
|
||||
+ /* Check if there is sufficient space in the file system to store the dump */
|
||||
+ if (vfs.f_bavail * vfs.f_frsize < dump_size) {
|
||||
+ syslog(LOG_ERR, "Insufficient space in %s to store platform dump for dump ID: "
|
||||
+ "0x%016lX (required: %lu bytes, available: %lu bytes)",
|
||||
+ d_cfg.platform_dump_path, dump_tag, dump_size,
|
||||
+ (vfs.f_bavail * vfs.f_frsize));
|
||||
+ syslog(LOG_ERR, "After clearing space, run 'extract_platdump "
|
||||
+ "0x%016lX'.\n", dump_tag);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Retrieve the dump */
|
||||
snprintf(tmp_sys_arg, 60, "0x%016LX", (long long unsigned int)dump_tag);
|
||||
system_args[0] = EXTRACT_PLATDUMP_CMD;
|
||||
system_args[1] = tmp_sys_arg;
|
||||
diff --git a/rtas_errd/extract_platdump.c b/rtas_errd/extract_platdump.c
|
||||
index fbe65b2..831e57e 100644
|
||||
--- a/rtas_errd/extract_platdump.c
|
||||
+++ b/rtas_errd/extract_platdump.c
|
||||
@@ -290,12 +290,6 @@ extract_platform_dump(uint64_t dump_tag)
|
||||
}
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Before writing the new dump out, we need to see if any older
|
||||
- * dumps need to be removed first
|
||||
- */
|
||||
- remove_old_dumpfiles(filename, prefix_size);
|
||||
-
|
||||
/* Copy the dump off to the filesystem */
|
||||
pathname[0] = '\0';
|
||||
strcpy(pathname, d_cfg.platform_dump_path);
|
|
@ -0,0 +1,136 @@
|
|||
commit c507319d1b5f0286d67e08a3598949ca4144f475
|
||||
Author: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Date: Fri Sep 8 12:35:12 2023 +0530
|
||||
|
||||
ppc64-diag: Move trim_trail_space() function to common/utils.c
|
||||
|
||||
Currently, trim_trail_space() function is used in diags/diag_nvme.c file
|
||||
to be able to trim trailing white spaces from a given location code. Allow
|
||||
code reusability by moving the trim_trail_space() function from
|
||||
diags/diag_nvme.c to common/utils.c.
|
||||
|
||||
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
|
||||
|
||||
diff --git a/common/utils.c b/common/utils.c
|
||||
index 0312943..2349878 100644
|
||||
--- a/common/utils.c
|
||||
+++ b/common/utils.c
|
||||
@@ -24,9 +24,34 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
+/* trim_trail_space - Trim trailing white spaces from string
|
||||
+ * @string - Null terminated string to remove white spaces from
|
||||
+ *
|
||||
+ * This function will alter the passed string by removing any trailing white spaces and null
|
||||
+ * terminating it at that point.
|
||||
+ */
|
||||
+void trim_trail_space(char *string)
|
||||
+{
|
||||
+ char *end;
|
||||
+ size_t length;
|
||||
+
|
||||
+ if (string == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ length = strlen(string);
|
||||
+ if (length == 0)
|
||||
+ return;
|
||||
+
|
||||
+ end = string + length - 1;
|
||||
+ while (end >= string && isspace(*end))
|
||||
+ end--;
|
||||
+ *(end + 1) = '\0';
|
||||
+}
|
||||
+
|
||||
static int process_child(char *argv[], int pipefd[])
|
||||
{
|
||||
int nullfd;
|
||||
diff --git a/common/utils.h b/common/utils.h
|
||||
index ec2072d..2459b5b 100644
|
||||
--- a/common/utils.h
|
||||
+++ b/common/utils.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
+void trim_trail_space(char *string);
|
||||
FILE *spopen(char **, pid_t *);
|
||||
int spclose(FILE *, pid_t);
|
||||
|
||||
diff --git a/diags/Makefile.am b/diags/Makefile.am
|
||||
index 4ac81b8..dea0a79 100644
|
||||
--- a/diags/Makefile.am
|
||||
+++ b/diags/Makefile.am
|
||||
@@ -13,7 +13,8 @@ encl_led_h_files = diags/encl_led.h \
|
||||
$(diag_common_h_files)
|
||||
|
||||
diag_nvme_h_files = diags/diag_nvme.h \
|
||||
- common/platform.h
|
||||
+ common/platform.h \
|
||||
+ common/utils.h
|
||||
|
||||
sbin_PROGRAMS += diags/diag_encl diags/encl_led diags/diag_nvme
|
||||
|
||||
@@ -41,6 +42,7 @@ diags_encl_led_SOURCES = diags/encl_led.c \
|
||||
|
||||
diags_diag_nvme_SOURCES = diags/diag_nvme.c \
|
||||
common/platform.c \
|
||||
+ common/utils.c \
|
||||
$(diag_nvme_h_files)
|
||||
diags_diag_nvme_LDADD = -lservicelog -lm
|
||||
diags_diag_nvme_CFLAGS = $(AM_CFLAGS) -Wno-stringop-truncation
|
||||
diff --git a/diags/diag_nvme.c b/diags/diag_nvme.c
|
||||
index 2a78034..2606f2c 100644
|
||||
--- a/diags/diag_nvme.c
|
||||
+++ b/diags/diag_nvme.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <sys/utsname.h>
|
||||
#include "diag_nvme.h"
|
||||
#include "platform.h"
|
||||
+#include "utils.h"
|
||||
|
||||
#define ITEM_DATA_LENGTH 255
|
||||
#define MIN_HOURS_ON 720
|
||||
@@ -71,7 +72,6 @@ static int raw_data_smart(unsigned char **raw_data, uint32_t *raw_data_len, stru
|
||||
static int raw_data_vpd(unsigned char **raw_data, uint32_t *raw_data_len, struct nvme_ibm_vpd *vpd);
|
||||
static int regex_controller(char *controller_name, char *device_name);
|
||||
static void set_notify(struct notify *notify, struct dictionary *dict, int num_elements);
|
||||
-static void trim_trail_space(char *string);
|
||||
static long double uint128_to_long_double(uint8_t *data);
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
@@ -1426,28 +1426,6 @@ extern void set_vpd_pcie_field(const char *keyword, const char *vpd_data, struct
|
||||
strncpy(vpd->firmware_level, vpd_data, sizeof(vpd->firmware_level));
|
||||
}
|
||||
|
||||
-/* trim_trail_space - Trim trailing white spaces from string
|
||||
- * @string - Null terminated string to remove white spaces from
|
||||
- *
|
||||
- * This function will alter the passed string by removing any trailing white spaces and null
|
||||
- * terminating it at that point.
|
||||
- */
|
||||
-static void trim_trail_space(char *string) {
|
||||
- char *end;
|
||||
- size_t length;
|
||||
-
|
||||
- if (string == NULL)
|
||||
- return;
|
||||
-
|
||||
- if ((length = strlen(string)) == 0)
|
||||
- return;
|
||||
-
|
||||
- end = string + length - 1;
|
||||
- while (end >= string && isspace(*end))
|
||||
- end--;
|
||||
- *(end + 1) = '\0';
|
||||
-}
|
||||
-
|
||||
static long double uint128_to_long_double(uint8_t *data) {
|
||||
int i;
|
||||
long double value = 0;
|
|
@ -0,0 +1,37 @@
|
|||
commit 476b0af7516b86c4d98cfa229fb0c6b856eea31d
|
||||
Author: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Date: Fri Sep 8 12:35:13 2023 +0530
|
||||
|
||||
ppc64-diag/lp_diag: Utilize trim_trail_space() function in event_fru_callout()
|
||||
|
||||
Update the event_fru_callout() function to use the trim_trail_space()
|
||||
function to be able to remove any trailing spaces from the location code.
|
||||
This change aims to address an issue where the presence of trailing spaces
|
||||
in the location code results in failure to find an indicator for the given
|
||||
location code. Use trim_trail_space() on the location to ensure that the
|
||||
device location code is properly compared with the indicator list.
|
||||
|
||||
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
|
||||
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
|
||||
|
||||
diff --git a/lpd/lp_diag.c b/lpd/lp_diag.c
|
||||
index 988a021..e6f5d3c 100644
|
||||
--- a/lpd/lp_diag.c
|
||||
+++ b/lpd/lp_diag.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "servicelog.h"
|
||||
#include "indicator.h"
|
||||
#include "lp_util.h"
|
||||
+#include "utils.h"
|
||||
|
||||
/* FRU callout priority as defined in PAPR+
|
||||
*
|
||||
@@ -344,6 +345,8 @@ event_fru_callout(struct sl_callout *callouts, struct loc_code *list,
|
||||
/* get FRUs nearest fault indicator */
|
||||
strncpy(location, callout->location, LOCATION_LENGTH);
|
||||
location[LOCATION_LENGTH - 1] = '\0';
|
||||
+ trim_trail_space(location);
|
||||
+
|
||||
loc_led = get_fru_indicator(list, location, &truncated);
|
||||
if (!loc_led) { /* No indicator found for the given loc code */
|
||||
*attn_on = 1;
|
|
@ -1,55 +0,0 @@
|
|||
diff -up ppc64-diag-2.7.4/lpd/Makefile.am.than ppc64-diag-2.7.4/lpd/Makefile.am
|
||||
--- ppc64-diag-2.7.4/lpd/Makefile.am.than 2018-03-08 16:44:34.393958279 +0100
|
||||
+++ ppc64-diag-2.7.4/lpd/Makefile.am 2018-03-08 16:45:29.624967349 +0100
|
||||
@@ -46,16 +46,16 @@ all-local-lpd:
|
||||
AM_LOCALS += all-local-lpd
|
||||
|
||||
install-exec-hook-lpd:
|
||||
- install -d --mode=755 $(DESTDIR)/etc/ppc64-diag
|
||||
- install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/etc/ppc64-diag/
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag
|
||||
+ install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
$(LN_S) $(sbindir)/usysident $(DESTDIR)/$(sbindir)/usysattn
|
||||
$(LN_S) $(sbindir)/usysident $(DESTDIR)/$(sbindir)/usysfault
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-lpd
|
||||
|
||||
uninstall-hook-lpd:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/lp_diag_setup
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/lp_diag_notify
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/lp_diag_setup
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/lp_diag_notify
|
||||
rm -f $(sbindir)/usysattn
|
||||
rm -f $(sbindir)/usysfault
|
||||
|
||||
diff -up ppc64-diag-2.7.4/lpd/scripts/lp_diag_notify.than ppc64-diag-2.7.4/lpd/scripts/lp_diag_notify
|
||||
--- ppc64-diag-2.7.4/lpd/scripts/lp_diag_notify.than 2018-03-08 16:43:08.482388675 +0100
|
||||
+++ ppc64-diag-2.7.4/lpd/scripts/lp_diag_notify 2018-03-08 16:43:32.732831731 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I /etc/ppc64-diag
|
||||
+#!/usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
# @file lp_diag_notify
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool.
|
||||
diff -up ppc64-diag-2.7.4/lpd/scripts/lp_diag_setup.than ppc64-diag-2.7.4/lpd/scripts/lp_diag_setup
|
||||
--- ppc64-diag-2.7.4/lpd/scripts/lp_diag_setup.than 2018-03-08 16:43:46.263078928 +0100
|
||||
+++ ppc64-diag-2.7.4/lpd/scripts/lp_diag_setup 2018-03-08 16:44:04.193406516 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/perl -I /etc/ppc64-diag
|
||||
+#!/usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
# @file lp_diag_setup
|
||||
# @brief Register/unregister Light Path notification tools
|
||||
# with servicelog
|
||||
@@ -91,10 +91,10 @@ sub unregister {
|
||||
}
|
||||
|
||||
@notification_tools = (
|
||||
- ["/etc/ppc64-diag/lp_diag_notify -e",
|
||||
+ ["/usr/libexec/ppc64-diag/lp_diag_notify -e",
|
||||
"--match='disposition>=1 and severity>=4 and serviceable=1' ".
|
||||
"--type=EVENT --method=num_arg"],
|
||||
- ["/etc/ppc64-diag/lp_diag_notify -r",
|
||||
+ ["/usr/libexec/ppc64-diag/lp_diag_notify -r",
|
||||
"--type=REPAIR --method=num_arg"],
|
||||
);
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
diff -up ppc64-diag-2.7.4/ela/Makefile.am.than ppc64-diag-2.7.4/ela/Makefile.am
|
||||
--- ppc64-diag-2.7.4/ela/Makefile.am.than 2018-03-08 15:41:37.994892051 +0100
|
||||
+++ ppc64-diag-2.7.4/ela/Makefile.am 2018-03-08 15:43:58.847464269 +0100
|
||||
@@ -68,22 +68,22 @@ clean-local-ela:
|
||||
CLEAN_LOCALS += clean-local-ela
|
||||
|
||||
install-exec-hook-ela:
|
||||
- install -d --mode=755 $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/
|
||||
- install -D --mode=744 $(CATALOG) $(DESTDIR)/etc/ppc64-diag/message_catalog/
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
+ install -D --mode=744 $(CATALOG) $(DESTDIR)/usr/share/ppc64-diag/message_catalog/
|
||||
install -D --mode=744 $(CATALOG_REGEX) \
|
||||
- $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/
|
||||
+ $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-ela
|
||||
|
||||
uninstall-hook-ela:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/cxgb3
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/e1000e
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/exceptions
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/reporters
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/gpfs
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/cxgb3
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/e1000e
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/message_catalog/with_regex/gpfs
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/cxgb3
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/e1000e
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/exceptions
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/reporters
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/gpfs
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/cxgb3
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/e1000e
|
||||
+ rm -f $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/gpfs
|
||||
|
||||
UNINSTALL_HOOKS += uninstall-hook-ela
|
||||
|
||||
diff -up ppc64-diag-2.7.4/ela/catalogs.h.than ppc64-diag-2.7.4/ela/catalogs.h
|
||||
--- ppc64-diag-2.7.4/ela/catalogs.h.than 2018-03-08 15:44:23.267910229 +0100
|
||||
+++ ppc64-diag-2.7.4/ela/catalogs.h 2018-03-08 15:46:08.669835054 +0100
|
||||
@@ -34,7 +34,7 @@ using namespace std;
|
||||
#include <stdio.h>
|
||||
#include <regex.h>
|
||||
|
||||
-#define ELA_CATALOG_DIR "/etc/ppc64-diag/message_catalog"
|
||||
+#define ELA_CATALOG_DIR "/usr/share/ppc64-diag/message_catalog"
|
||||
|
||||
class Parser {
|
||||
protected:
|
||||
diff -up ppc64-diag-2.7.4/ela/explain_syslog.cpp.than ppc64-diag-2.7.4/ela/explain_syslog.cpp
|
||||
--- ppc64-diag-2.7.4/ela/explain_syslog.cpp.than 2018-03-08 15:46:24.470123596 +0100
|
||||
+++ ppc64-diag-2.7.4/ela/explain_syslog.cpp 2018-03-08 15:46:49.630583070 +0100
|
||||
@@ -97,7 +97,7 @@ print_help(void)
|
||||
printf(
|
||||
"-b begin_time\tIgnore messages with timestamps prior to begin_time.\n"
|
||||
"-C catalog_dir\tUse message catalog in catalog_dir. Defaults to\n"
|
||||
-"\t\t\t/etc/ppc64-diag/message_catalog.\n"
|
||||
+"\t\t\t/usr/share/ppc64-diag/message_catalog.\n"
|
||||
"-d\t\tPrint debugging output on stderr.\n"
|
||||
"-e end_time\tStop upon reading message with timestamp after end_time.\n"
|
||||
"-h\t\tPrint this help text and exit.\n"
|
||||
diff -up ppc64-diag-2.7.4/ela/syslog_to_svclog.cpp.than ppc64-diag-2.7.4/ela/syslog_to_svclog.cpp
|
||||
--- ppc64-diag-2.7.4/ela/syslog_to_svclog.cpp.than 2018-03-08 15:47:03.030827782 +0100
|
||||
+++ ppc64-diag-2.7.4/ela/syslog_to_svclog.cpp 2018-03-08 15:47:10.770969131 +0100
|
||||
@@ -682,7 +682,7 @@ print_help(void)
|
||||
printf(
|
||||
"-b begin_time\tIgnore messages with timestamps prior to begin_time.\n"
|
||||
"-C catalog_dir\tUse message catalog in catalog_dir. Defaults to\n"
|
||||
-"\t\t\t/etc/ppc64-diag/message_catalog.\n"
|
||||
+"\t\t\t/usr/share/ppc64-diag/message_catalog.\n"
|
||||
"-d\t\tPrint debugging output on stderr.\n"
|
||||
"-e end_time\tStop upon reading message with timestamp after end_time.\n"
|
||||
"-F\t\tDon't stop at EOF; process newly logged messages as they occur.\n"
|
|
@ -1,63 +0,0 @@
|
|||
diff -up ppc64-diag-2.7.4/diags/Makefile.am.than ppc64-diag-2.7.4/diags/Makefile.am
|
||||
--- ppc64-diag-2.7.4/diags/Makefile.am.than 2018-03-09 14:23:50.504115816 +0100
|
||||
+++ ppc64-diag-2.7.4/diags/Makefile.am 2018-03-09 14:24:31.454855174 +0100
|
||||
@@ -43,7 +43,7 @@ DIAG_CRONTAB_SCRIPT = diags/run_diag_enc
|
||||
install-exec-hook-diag:
|
||||
install -d --mode=755 $(DESTDIR)/var/log/ppc64-diag/diag_disk
|
||||
install -d --mode=755 $(DESTDIR)/etc/cron.daily/
|
||||
- install -D --mode=744 $(DIAG_CRONTAB_SCRIPT) $(DESTDIR)/etc/cron.daily/
|
||||
+ install -D --mode=644 $(DIAG_CRONTAB_SCRIPT) $(DESTDIR)/etc/cron.daily/
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-diag
|
||||
|
||||
diff -up ppc64-diag-2.7.4/ela/Makefile.am.than ppc64-diag-2.7.4/ela/Makefile.am
|
||||
--- ppc64-diag-2.7.4/ela/Makefile.am.than 2018-03-09 14:12:39.942018046 +0100
|
||||
+++ ppc64-diag-2.7.4/ela/Makefile.am 2018-03-09 14:13:19.962739978 +0100
|
||||
@@ -69,8 +69,8 @@ CLEAN_LOCALS += clean-local-ela
|
||||
|
||||
install-exec-hook-ela:
|
||||
install -d --mode=755 $(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
- install -D --mode=744 $(CATALOG) $(DESTDIR)/usr/share/ppc64-diag/message_catalog/
|
||||
- install -D --mode=744 $(CATALOG_REGEX) \
|
||||
+ install -D --mode=644 $(CATALOG) $(DESTDIR)/usr/share/ppc64-diag/message_catalog/
|
||||
+ install -D --mode=644 $(CATALOG_REGEX) \
|
||||
$(DESTDIR)/usr/share/ppc64-diag/message_catalog/with_regex/
|
||||
|
||||
INSTALL_EXEC_HOOKS += install-exec-hook-ela
|
||||
diff -up ppc64-diag-2.7.4/rtas_errd/Makefile.am.than ppc64-diag-2.7.4/rtas_errd/Makefile.am
|
||||
--- ppc64-diag-2.7.4/rtas_errd/Makefile.am.than 2018-03-09 14:21:08.211186688 +0100
|
||||
+++ ppc64-diag-2.7.4/rtas_errd/Makefile.am 2018-03-09 14:21:16.781341284 +0100
|
||||
@@ -46,7 +46,7 @@ rtas_scripts = rtas_errd/rc.powerfail
|
||||
|
||||
install-exec-hook-rtas-errd:
|
||||
install -d --mode=755 $(DESTDIR)/etc/
|
||||
- install -D --mode=744 $(rtas_scripts) $(DESTDIR)/etc/
|
||||
+ install -D --mode=755 $(rtas_scripts) $(DESTDIR)/etc/
|
||||
|
||||
uninstall-hook-rtas-errd:
|
||||
rm -f $(DESTDIR)/etc/rc.powerfail
|
||||
diff -up ppc64-diag-2.7.4/scripts/Makefile.am.than ppc64-diag-2.7.4/scripts/Makefile.am
|
||||
diff -up ppc64-diag-2.7.4/scripts/Makefile.am.than ppc64-diag-2.7.4/scripts/Makefile.am
|
||||
--- ppc64-diag-2.7.4/scripts/Makefile.am.than 2018-03-09 14:32:56.393971751 +0100
|
||||
+++ ppc64-diag-2.7.4/scripts/Makefile.am 2018-03-09 14:33:18.374368602 +0100
|
||||
@@ -13,7 +13,7 @@ SERVICE_SCRIPT = scripts/rtas_errd.servi
|
||||
install-exec-hook-scripts:
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/etc/ppc64-diag/
|
||||
- install -D --mode=744 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
+ install -D --mode=755 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -D --mode=755 $(INIT_FILES) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
diff -up ppc64-diag-2.7.4/lpd/Makefile.am.than ppc64-diag-2.7.4/lpd/Makefile.am
|
||||
--- ppc64-diag-2.7.4/lpd/Makefile.am.than 2018-03-09 14:35:40.576936043 +0100
|
||||
+++ ppc64-diag-2.7.4/lpd/Makefile.am 2018-03-09 14:36:05.927393740 +0100
|
||||
@@ -47,7 +47,7 @@ AM_LOCALS += all-local-lpd
|
||||
|
||||
install-exec-hook-lpd:
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag
|
||||
- install -D --mode=744 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
+ install -D --mode=755 $(LPD_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
$(LN_S) $(sbindir)/usysident $(DESTDIR)/$(sbindir)/usysattn
|
||||
$(LN_S) $(sbindir)/usysident $(DESTDIR)/$(sbindir)/usysfault
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
diff -up ppc64-diag-2.7.4/scripts/Makefile.am.script_loc ppc64-diag-2.7.4/scripts/Makefile.am
|
||||
--- ppc64-diag-2.7.4/scripts/Makefile.am.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/Makefile.am 2018-03-08 17:14:52.827188427 +0100
|
||||
@@ -11,20 +11,21 @@ INIT_FILES = scripts/rtas_errd scripts/o
|
||||
SERVICE_SCRIPT = scripts/rtas_errd.service scripts/opal_errd.service
|
||||
|
||||
install-exec-hook-scripts:
|
||||
+ install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/etc/ppc64-diag/
|
||||
- install -D --mode=744 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/etc/ppc64-diag/
|
||||
- install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag
|
||||
+ install -D --mode=744 $(PPC64_DIAG_SCRIPT) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
+ install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -D --mode=755 $(INIT_FILES) $(DESTDIR)/usr/libexec/ppc64-diag/
|
||||
install -d --mode=755 $(DESTDIR)/usr/lib/systemd/system/
|
||||
install -D --mode=644 $(SERVICE_SCRIPT) $(DESTDIR)/usr/lib/systemd/system/
|
||||
|
||||
uninstall-hook-scripts:
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_setup
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_mkrsrc
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_notify
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_migrate
|
||||
- rm -f $(DESTDIR)/etc/ppc64-diag/servevent_parse.pl
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_setup
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_mkrsrc
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_notify
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/ppc64_diag_migrate
|
||||
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/servevent_parse.pl
|
||||
rm -f $(DESTDIR)/etc/ppc64-diag/ppc64-diag.config
|
||||
rm -f $(DESTDIR)/usr/libexec/ppc64-diag/rtas_errd
|
||||
rm -f $(DESTDIR)/usr/libexec/ppc64-diag/opal_errd
|
||||
diff -up ppc64-diag-2.7.4/scripts/ppc64_diag_migrate.script_loc ppc64-diag-2.7.4/scripts/ppc64_diag_migrate
|
||||
--- ppc64-diag-2.7.4/scripts/ppc64_diag_migrate.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/ppc64_diag_migrate 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for performing whatever actions may be necessary following
|
||||
diff -up ppc64-diag-2.7.4/scripts/ppc64_diag_mkrsrc.script_loc ppc64-diag-2.7.4/scripts/ppc64_diag_mkrsrc
|
||||
--- ppc64-diag-2.7.4/scripts/ppc64_diag_mkrsrc.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/ppc64_diag_mkrsrc 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for creating a new IBM.ServiceEvent RMC resource when a
|
||||
@@ -27,7 +27,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
# Check to make sure that devices.chrp.base.ServiceRM is installed
|
||||
$rc = system("which rpm >/dev/null 2>&1");
|
||||
diff -up ppc64-diag-2.7.4/scripts/ppc64_diag_notify.script_loc ppc64-diag-2.7.4/scripts/ppc64_diag_notify
|
||||
--- ppc64-diag-2.7.4/scripts/ppc64_diag_notify.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/ppc64_diag_notify 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for sending out e-mail notifications of new ppc64 platform
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
sub usage {
|
||||
print "$0 [OPTIONS]\n";
|
||||
@@ -156,7 +156,7 @@ if ($flag_email) {
|
||||
chomp $hostname;
|
||||
$subject = "$hostname: serviceable platform event logged";
|
||||
|
||||
- if (open(MAILLIST, "< /etc/ppc64-diag/mail_list")) {
|
||||
+ if (open(MAILLIST, "< /usr/libexec/ppc64-diag/mail_list")) {
|
||||
while (<MAILLIST>) {
|
||||
chomp;
|
||||
$pos = index($_, "#");
|
||||
diff -up ppc64-diag-2.7.4/scripts/ppc64_diag_servagent.script_loc ppc64-diag-2.7.4/scripts/ppc64_diag_servagent
|
||||
--- ppc64-diag-2.7.4/scripts/ppc64_diag_servagent.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/ppc64_diag_servagent 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/perl -I /etc/ppc64-diag
|
||||
+#! /usr/bin/perl -I /usr/libexec/ppc64-diag
|
||||
#
|
||||
# This script is to be registered with servicelog as a notification tool. It
|
||||
# is responsible for invoking Electronic Service Agent in response to a
|
||||
@@ -25,7 +25,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
-require "/etc/ppc64-diag/servevent_parse.pl";
|
||||
+require "/usr/libexec/ppc64-diag/servevent_parse.pl";
|
||||
|
||||
if (!-e "/usr/svcagent/bin/callsa2") {
|
||||
# eSA is not installed; exit quietly
|
||||
diff -up ppc64-diag-2.7.4/scripts/ppc64_diag_setup.script_loc ppc64-diag-2.7.4/scripts/ppc64_diag_setup
|
||||
--- ppc64-diag-2.7.4/scripts/ppc64_diag_setup.script_loc 2017-07-24 06:43:44.000000000 +0200
|
||||
+++ ppc64-diag-2.7.4/scripts/ppc64_diag_setup 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -89,15 +89,15 @@ sub unregister {
|
||||
|
||||
@notification_tools = (
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_notify -q -e root -l /var/log/platform",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_notify -q -e root -l /var/log/platform",
|
||||
"--match='serviceable=1' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_mkrsrc",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_mkrsrc",
|
||||
"--match='serviceable=1' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
|
||||
- ["/etc/ppc64-diag/ppc64_diag_migrate",
|
||||
+ ["/usr/libexec/ppc64-diag/ppc64_diag_migrate",
|
||||
"--match=\'refcode=\"#MIGRATE\" and serviceable=0\' ".
|
||||
"--type=EVENT --method=pairs_stdin"],
|
||||
);
|
||||
diff -up ppc64-diag-2.7.4/scripts/rtas_errd.script_loc ppc64-diag-2.7.4/scripts/rtas_errd
|
||||
--- ppc64-diag-2.7.4/scripts/rtas_errd.script_loc 2018-03-08 17:11:16.833240678 +0100
|
||||
+++ ppc64-diag-2.7.4/scripts/rtas_errd 2018-03-08 17:11:16.843240860 +0100
|
||||
@@ -69,7 +69,7 @@ case "$1" in
|
||||
echo "registering ppc64-diag with system"
|
||||
rm -f /var/cache/ppc64-diag.registered
|
||||
mkdir -v /var/cache/ppc64-diag.registered
|
||||
- /etc/ppc64-diag/ppc64_diag_setup --register
|
||||
+ /usr/libexec/ppc64-diag/ppc64_diag_setup --register
|
||||
fi
|
||||
echo -n "Starting rtas_errd (platform error handling) daemon: "
|
||||
if [ $INSSERV -eq 1 ]; then
|
|
@ -1,25 +1,35 @@
|
|||
# BZ#860040:
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl
|
||||
|
||||
Name: ppc64-diag
|
||||
Version: 2.7.6
|
||||
Release: 1%{?dist}
|
||||
Version: 2.7.9
|
||||
Release: 3%{?dist}
|
||||
Summary: PowerLinux Platform Diagnostics
|
||||
URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/
|
||||
URL: https://github.com/power-ras/ppc64-diag
|
||||
Group: System Environment/Base
|
||||
License: GPLv2
|
||||
ExclusiveArch: ppc %{power64}
|
||||
BuildRequires: libservicelog-devel, flex, perl-interpreter, byacc
|
||||
BuildRequires: libvpd-devel, systemd-units
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libservicelog-devel
|
||||
BuildRequires: flex
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: byacc
|
||||
BuildRequires: libvpd-devel >= 2.2.9
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: librtas-devel >= 1.4.0
|
||||
BuildRequires: systemd-units
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: bison
|
||||
|
||||
Requires: servicelog, lsvpd
|
||||
# PCI hotplug support on PowerKVM guest depends on below
|
||||
# powerpc-utils version.
|
||||
Requires: ppc64-diag-rtas >= 2.7.6
|
||||
Requires: servicelog
|
||||
Requires: lsvpd
|
||||
Requires: powerpc-utils >= 1.3.0
|
||||
|
||||
Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: add_regex.8
|
||||
Source2: convert_dt_node_props.8
|
||||
Source3: extract_opal_dump.8
|
||||
|
@ -27,11 +37,17 @@ Source4: extract_platdump.8
|
|||
Source5: rtas_errd.8
|
||||
|
||||
# fix paths and permissions
|
||||
Patch0: ppc64-diag-messagecatalog-location.patch
|
||||
Patch2: ppc64-diag-scriptlocation.patch
|
||||
Patch3: ppc64-diag-lpdscriptloc.patch
|
||||
Patch4: ppc64-diag-permission.patch
|
||||
Patch5: ppc64-diag-2.7.5-getopt-help.patch
|
||||
Patch0: ppc64-diag-2.7.9-fedora.patch
|
||||
|
||||
# upstream fixes
|
||||
# rtas_errd: Handle multiple platform dumps
|
||||
Patch10: ppc64-diag-2.7.9-handle_multiple_platform_dumps.patch
|
||||
# ppc64-diag/lp_diag: Enable light path diagnostics for RTAS events
|
||||
Patch11: ppc64-diag-2.7.9-moving-trim_trail_space-function.patch
|
||||
Patch12: ppc64-diag-2.7.9-utilize-trim_trail_space-in-event_fru_callout.patch
|
||||
Patch13: ppc64-diag-2.7.9-enable-light-path-diagnostics-for-RTAS-events.patch
|
||||
# call_home command "diag_nvme" fails on nvmf drive(nvmf/lpfc/Power10)
|
||||
Patch14: ppc64-diag-2.7.9-call_home-fail-on-nvmf-device
|
||||
|
||||
%description
|
||||
This package contains various diagnostic tools for PowerLinux.
|
||||
|
@ -43,19 +59,21 @@ predictive failures, if appropriate modifies the FRUs fault
|
|||
indicator(s) and provides event notification to system
|
||||
administrators or connected service frameworks.
|
||||
|
||||
# BZ#860040:
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}\/usr\/libexec\/ppc64-diag\/servevent_parse.pl
|
||||
%package rtas
|
||||
Summary: rtas_errd daemon
|
||||
Requires: powerpc-utils-core >= 1.3.6-6
|
||||
|
||||
%description rtas
|
||||
This package contains only rtas_errd daemon.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure
|
||||
LDFLAGS="%{build_ldflags}" CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cflags}" make %{?_smp_mflags} V=1
|
||||
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
chmod 644 COPYING
|
||||
|
@ -65,23 +83,19 @@ mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
|||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ses_pages
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/dump
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/opal-elog
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}/diag_disk
|
||||
|
||||
ln -sfv %{_sbindir}/usysattn $RPM_BUILD_ROOT/%{_sbindir}/usysfault
|
||||
install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT/%{_mandir}/man8/
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README
|
||||
%doc README.md
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%dir %{_sysconfdir}/%{name}/ses_pages
|
||||
%dir %{_localstatedir}/log/%{name}
|
||||
%dir %{_localstatedir}/log/%{name}/diag_disk
|
||||
%dir %{_localstatedir}/log/dump
|
||||
%dir %{_localstatedir}/log/opal-elog
|
||||
%{_mandir}/man8/*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config
|
||||
%{_sbindir}/*
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/message_catalog/
|
||||
|
@ -93,35 +107,53 @@ install -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} $RPM_BUILD
|
|||
%{_libexecdir}/%{name}/lp_diag_notify
|
||||
%{_libexecdir}/%{name}/servevent_parse.pl
|
||||
%{_datadir}/%{name}/message_catalog/*
|
||||
%{_sysconfdir}/rc.powerfail
|
||||
%{_libexecdir}/%{name}/rtas_errd
|
||||
%{_libexecdir}/%{name}/opal_errd
|
||||
%{_unitdir}/rtas_errd.service
|
||||
%{_unitdir}/opal_errd.service
|
||||
%{_sysconfdir}/cron.daily/run_diag_encl
|
||||
%{_sysconfdir}/cron.daily/run_diag_nvme
|
||||
|
||||
# get rid of obsolete initscripts for rhel >=7
|
||||
%exclude %{_libexecdir}/%{name}/rtas_errd
|
||||
%exclude %{_libexecdir}/%{name}/opal_errd
|
||||
|
||||
# exclude stuffs which are moved to rtas
|
||||
%exclude %{_mandir}/man8/convert_dt_node_props*
|
||||
%exclude %{_mandir}/man8/extract_platdump*
|
||||
%exclude %{_mandir}/man8/rtas_errd*
|
||||
%exclude %{_sbindir}/convert_dt_node_props
|
||||
%exclude %{_sbindir}/extract_platdump
|
||||
%exclude %{_sbindir}/rtas_errd
|
||||
|
||||
%files rtas
|
||||
%license COPYING
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%{_mandir}/man8/convert_dt_node_props*
|
||||
%{_mandir}/man8/extract_platdump*
|
||||
%{_mandir}/man8/rtas_errd*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/ppc64-diag.config
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/diag_nvme.config
|
||||
%{_sbindir}/convert_dt_node_props
|
||||
%{_sbindir}/extract_platdump
|
||||
%{_sbindir}/rtas_errd
|
||||
%{_sysconfdir}/rc.powerfail
|
||||
%{_unitdir}/rtas_errd.service
|
||||
|
||||
%post
|
||||
# Post-install script --------------------------------------------------
|
||||
%{_libexecdir}/%{name}/lp_diag_setup --register >/dev/null 2>&1
|
||||
%{_libexecdir}/%{name}/ppc64_diag_setup --register >/dev/null 2>&1
|
||||
if [ "$1" = "1" ]; then # first install
|
||||
systemctl -q enable opal_errd.service >/dev/null
|
||||
systemctl -q enable rtas_errd.service >/dev/null
|
||||
systemctl start opal_errd.service >/dev/null
|
||||
systemctl start rtas_errd.service >/dev/null
|
||||
systemctl -q enable opal_errd.service >/dev/null 2>&1
|
||||
systemctl start opal_errd.service >/dev/null 2>&1
|
||||
elif [ "$1" = "2" ]; then # upgrade
|
||||
systemctl restart opal_errd.service >/dev/null
|
||||
systemctl restart rtas_errd.service >/dev/null
|
||||
systemctl restart opal_errd.service >/dev/null 2>&1
|
||||
systemctl daemon-reload > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
%preun
|
||||
# Pre-uninstall script -------------------------------------------------
|
||||
if [ "$1" = "0" ]; then # last uninstall
|
||||
systemctl stop opal_errd.service >/dev/null
|
||||
systemctl stop rtas_errd.service >/dev/null
|
||||
systemctl -q disable opal_errd.service
|
||||
systemctl -q disable rtas_errd.service
|
||||
systemctl stop opal_errd.service >/dev/null 2>&1
|
||||
systemctl -q disable opal_errd.service >/dev/null 2>&1
|
||||
%{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null
|
||||
%{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null
|
||||
systemctl daemon-reload > /dev/null 2>&1
|
||||
|
@ -130,12 +162,48 @@ fi
|
|||
%triggerin -- librtas
|
||||
# trigger on librtas upgrades ------------------------------------------
|
||||
if [ "$2" = "2" ]; then
|
||||
systemctl restart opal_errd.service >/dev/null
|
||||
systemctl restart rtas_errd.service >/dev/null
|
||||
systemctl restart opal_errd.service >/dev/null 2>&1
|
||||
systemctl restart rtas_errd.service >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
%post rtas
|
||||
if [ "$1" = "1" ]; then # first install
|
||||
systemctl -q enable rtas_errd.service >/dev/null
|
||||
systemctl start rtas_errd.service >/dev/null
|
||||
elif [ "$1" = "2" ]; then # upgrade
|
||||
systemctl restart rtas_errd.service >/dev/null
|
||||
systemctl daemon-reload > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
%preun rtas
|
||||
if [ "$1" = "0" ]; then # last uninstall
|
||||
systemctl stop rtas_errd.service >/dev/null
|
||||
systemctl -q disable rtas_errd.service
|
||||
systemctl daemon-reload > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Jan 31 2024 Than Ngo <than@redhat.com> - 2.7.9-3
|
||||
- call_home command "diag_nvme" fails on nvmf drive
|
||||
Resolves: RHEL-23437
|
||||
|
||||
* Sun Dec 10 2023 Than Ngo <than@redhat.com> - 2.7.9-2
|
||||
- Enable light path diagnostics for RTAS events
|
||||
- Handle multiple platform dumps
|
||||
Resolves: RHEL-11454
|
||||
|
||||
* Wed Oct 19 2022 Than Ngo <than@redhat.com> - 2.7.9-1
|
||||
- Resolves: #2114591, rebase to 2.7.9
|
||||
|
||||
* Fri May 13 2022 Than Ngo <than@redhat.com> - 2.7.8-1
|
||||
- Resolves: #2051313, rebase to 2.7.8
|
||||
|
||||
* Mon May 17 2021 Than Ngo <than@redhat.com> - 2.7.7-1
|
||||
- Resolves: #1779206, rebase to 2.7.7
|
||||
|
||||
* Thu Mar 26 2020 Than Ngo <than@redhat.com> - 2.7.6-2
|
||||
- Resolves: #1814335, create rtas subpackage to avoid the perl dependency
|
||||
|
||||
* Thu Nov 07 2019 Than Ngo <than@redhat.com> - 2.7.6-1
|
||||
- Resolves: #1725200, rebase to 2.7.6
|
||||
|
||||
|
|
Loading…
Reference in New Issue