From a374227288ec217d8caf5174ee2aa460f69ab8c9 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Fri, 2 Aug 2019 14:49:33 -0400 Subject: [PATCH] import ppc64-diag-2.7.5-2.el8 --- .gitignore | 1 + .ppc64-diag.metadata | 1 + SOURCES/add_regex.8 | 13 + SOURCES/convert_dt_node_props.8 | 16 + SOURCES/extract_opal_dump.8 | 25 ++ SOURCES/extract_platdump.8 | 12 + SOURCES/ppc64-diag-2.7.5-getopt-help.patch | 12 + SOURCES/ppc64-diag-lpdscriptloc.patch | 55 ++++ .../ppc64-diag-messagecatalog-location.patch | 73 +++++ SOURCES/ppc64-diag-permission.patch | 63 ++++ SOURCES/ppc64-diag-scriptlocation.patch | 138 +++++++++ SOURCES/rtas_errd.8 | 37 +++ SPECS/ppc64-diag.spec | 275 ++++++++++++++++++ 13 files changed, 721 insertions(+) create mode 100644 .gitignore create mode 100644 .ppc64-diag.metadata create mode 100644 SOURCES/add_regex.8 create mode 100644 SOURCES/convert_dt_node_props.8 create mode 100644 SOURCES/extract_opal_dump.8 create mode 100644 SOURCES/extract_platdump.8 create mode 100644 SOURCES/ppc64-diag-2.7.5-getopt-help.patch create mode 100644 SOURCES/ppc64-diag-lpdscriptloc.patch create mode 100644 SOURCES/ppc64-diag-messagecatalog-location.patch create mode 100644 SOURCES/ppc64-diag-permission.patch create mode 100644 SOURCES/ppc64-diag-scriptlocation.patch create mode 100644 SOURCES/rtas_errd.8 create mode 100644 SPECS/ppc64-diag.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..80bc303 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ppc64-diag-2.7.5.tar.gz diff --git a/.ppc64-diag.metadata b/.ppc64-diag.metadata new file mode 100644 index 0000000..b63af14 --- /dev/null +++ b/.ppc64-diag.metadata @@ -0,0 +1 @@ +70dc79cfeb1eed3deeb65465781fa887a0b5333f SOURCES/ppc64-diag-2.7.5.tar.gz diff --git a/SOURCES/add_regex.8 b/SOURCES/add_regex.8 new file mode 100644 index 0000000..03306cf --- /dev/null +++ b/SOURCES/add_regex.8 @@ -0,0 +1,13 @@ +.TH add_regex: "8" "June 2016" "ppc64-diag" "System Administration Utilities" +.SH NAME +add_regex \- catalog parser +.SH SYNOPSIS +.B add_regex +[\fB\-C\fR \fI\,dir\/\fR] +.SH DESCRIPTION +Parse all the catalog files in the specified directory, populating +reporter_catalog, exceptions catalog, and event_catalog. +.SH OPTIONS +.TP +.BR \-C " " \fIdir\fR +Catalog directory in which catalog files are stored. diff --git a/SOURCES/convert_dt_node_props.8 b/SOURCES/convert_dt_node_props.8 new file mode 100644 index 0000000..5e7fef6 --- /dev/null +++ b/SOURCES/convert_dt_node_props.8 @@ -0,0 +1,16 @@ +.TH convert_dt_node_props "8" "June 2016" "ppc64-diag" "System Administration Utilities" +.SH NAME +convert_dt_node_props \- conversion tool +.SH SYNOPSIS +.B convert_dt_node_props +\fB\-\-context\fR \fI\,\fR \fB\-\-from \fI\,\fR \fB\-\-to \fI\,\fR \fI\,\/\fR +.SH DESCRIPTION +.HP +\fB\-c\fR, \fB\-\-context\fR: currently, \fI\,\fR must be cpu +.HP +\fB\-f\fR, \fB\-\-from\fR and \fB\-t\fR, \fB\-\-to\fR: allowed values for \fI\,\fR and \fI\,\fR: interrupt\-server, drc\-index, drc\-name +.IP +if \fI\,\fR is a drc\-index or interrupt\-server, it can be +specified in decimal, hex (with a leading 0x), or octal +(with a leading 0); if it is a drc\-name, it should be +specified as a string in double quotes diff --git a/SOURCES/extract_opal_dump.8 b/SOURCES/extract_opal_dump.8 new file mode 100644 index 0000000..d889ab4 --- /dev/null +++ b/SOURCES/extract_opal_dump.8 @@ -0,0 +1,25 @@ +.TH extract_opal_dump "8" "June 2016" "ppc64-diag" "System Administration Utilities" +.SH NAME +extract_opal_dump \- Extract opal dump +.SH SYNOPSIS +.B extract_opal_dump +[\fI\,OPTION\/\fR]... +.SH DESCRIPTION +.PP +\fB\-A\fR +Don't acknowledge dump +.TP +\fB\-s\fR \fI\,dir\fR +sysfs directory (default \fI\,/sys\/\fP) +.TP +\fB\-o\fR \fI\,dir\fR +directory to save dumps (default \fI\,/var/log/dump\/\fP) +.TP +\fB\-m\fR \fI\,max\fR +maximum number of dumps of a specific type to be saved +.TP +\fB\-w\fR +wait for a dump +.TP +\fB\-h\fR +help (this message) diff --git a/SOURCES/extract_platdump.8 b/SOURCES/extract_platdump.8 new file mode 100644 index 0000000..3088a42 --- /dev/null +++ b/SOURCES/extract_platdump.8 @@ -0,0 +1,12 @@ +.TH extract_platdump "8" "June 2016" "ppc64-diag" "System Administration Utilities" +.SH NAME +extract_platdump: \- Extract platform dump +.SH SYNOPSIS +.B extract_platdump +[\fI\,-h\/\fR] [\fI\,-v\/\fR] \fI\,\/\fR +.SH DESCRIPTION +Extracts a platform dump with a given tag to the filesystem. \fI\,\fR is the tag of the dump(s) to extract, in hex. +.HP +\fB\-h\fR: print this help message +.HP +\fB\-v\fR: verbose output diff --git a/SOURCES/ppc64-diag-2.7.5-getopt-help.patch b/SOURCES/ppc64-diag-2.7.5-getopt-help.patch new file mode 100644 index 0000000..0dcbe44 --- /dev/null +++ b/SOURCES/ppc64-diag-2.7.5-getopt-help.patch @@ -0,0 +1,12 @@ +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; diff --git a/SOURCES/ppc64-diag-lpdscriptloc.patch b/SOURCES/ppc64-diag-lpdscriptloc.patch new file mode 100644 index 0000000..42ada14 --- /dev/null +++ b/SOURCES/ppc64-diag-lpdscriptloc.patch @@ -0,0 +1,55 @@ +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"], + ); + diff --git a/SOURCES/ppc64-diag-messagecatalog-location.patch b/SOURCES/ppc64-diag-messagecatalog-location.patch new file mode 100644 index 0000000..c7cc522 --- /dev/null +++ b/SOURCES/ppc64-diag-messagecatalog-location.patch @@ -0,0 +1,73 @@ +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 + #include + +-#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" diff --git a/SOURCES/ppc64-diag-permission.patch b/SOURCES/ppc64-diag-permission.patch new file mode 100644 index 0000000..feb0894 --- /dev/null +++ b/SOURCES/ppc64-diag-permission.patch @@ -0,0 +1,63 @@ +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 + diff --git a/SOURCES/ppc64-diag-scriptlocation.patch b/SOURCES/ppc64-diag-scriptlocation.patch new file mode 100644 index 0000000..6f358aa --- /dev/null +++ b/SOURCES/ppc64-diag-scriptlocation.patch @@ -0,0 +1,138 @@ +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 () { + 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 diff --git a/SOURCES/rtas_errd.8 b/SOURCES/rtas_errd.8 new file mode 100644 index 0000000..b274f0d --- /dev/null +++ b/SOURCES/rtas_errd.8 @@ -0,0 +1,37 @@ +.TH RTAS_ERRD "8" "rtas_errd" "System Administration Utilities" +.SH NAME +rtas_errd \- rtas_errd +.SH SYNOPSIS +.B rtas_errd +[\fI\,OPTION\/\fR] +.SH DESCRIPTION +.TP +\fB\-c\fR, \fB\-\-config\fR=\fI\,FILE\/\fR +path to config file (default \fI\,/etc/ppc64\-diag/ppc64\-diag.config\/\fP) +.TP +\fB\-d\fR, \fB\-\-debug\fR +don't daemonize, increase librtas debug level +.TP +\fB\-e\fR, \fB\-\-epowfile\fR=\fI\,FILE\/\fR +path to epow status file (default \fI\,/var/log/epow_status\/\fP) +.TP +\fB\-f\fR, \fB\-\-file\fR=\fI\,FILE\/\fR +path to RTAS test file +.TP +\fB\-h\fR, \fB\-\-help\fR +help (this message) +.TP +\fB\-l\fR, \fB\-\-logfile\fR=\fI\,FILE\/\fR +path to rtas_errd debug logfile (default \fI\,/var/log/rtas_errd.log\/\fP) +.TP +\fB\-m\fR, \fB\-\-msgsfile\fR=\fI\,FILE\/\fR +path to syslog +.TP +\fB\-p\fR, \fB\-\-platformfile\fR=\fI\,FILE\/\fR +path to platform_log (default \fI\,/var/log/platform\/\fP) +.TP +\fB\-R\fR, \fB\-\-nodrmgr\fR +no drmgr +.TP +\fB\-s\fR, \fB\-\-scenario\fR=\fI\,FILE\/\fR +path to RTAS scenario file diff --git a/SPECS/ppc64-diag.spec b/SPECS/ppc64-diag.spec new file mode 100644 index 0000000..de0bdbd --- /dev/null +++ b/SPECS/ppc64-diag.spec @@ -0,0 +1,275 @@ +Name: ppc64-diag +Version: 2.7.5 +Release: 2%{?dist} +Summary: PowerLinux Platform Diagnostics +URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/ +Group: System Environment/Base +License: GPLv2 +ExclusiveArch: ppc %{power64} +BuildRequires: libservicelog-devel, flex, perl-interpreter, byacc +BuildRequires: libvpd-devel, systemd-units +BuildRequires: ncurses-devel +BuildRequires: librtas-devel >= 1.4.0 +BuildRequires: systemd-devel +BuildRequires: libtool + +Requires: servicelog, lsvpd +# PCI hotplug support on PowerKVM guest depends on below +# powerpc-utils version. +Requires: powerpc-utils >= 1.3.0 + +Source0: http://downloads.sourceforge.net/project/linux-diag/ppc64-diag/v%{version}/%{name}-%{version}.tar.gz +Source1: add_regex.8 +Source2: convert_dt_node_props.8 +Source3: extract_opal_dump.8 +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 + +%description +This package contains various diagnostic tools for PowerLinux. +These tools captures the diagnostic events from Power Systems +platform firmware, SES enclosures and device drivers, and +write events to servicelog database. It also provides automated +responses to urgent events such as environmental conditions and +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 + +%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 +rm -f $RPM_BUILD_ROOT%{_docdir}/ppc64-diag/* +mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/%{name} +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 +%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/ +%{_libexecdir}/%{name}/ppc64_diag_migrate +%{_libexecdir}/%{name}/ppc64_diag_mkrsrc +%{_libexecdir}/%{name}/ppc64_diag_notify +%{_libexecdir}/%{name}/ppc64_diag_setup +%{_libexecdir}/%{name}/lp_diag_setup +%{_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 + +%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 +elif [ "$1" = "2" ]; then # upgrade + systemctl restart opal_errd.service >/dev/null + systemctl restart rtas_errd.service >/dev/null + 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 + %{_libexecdir}/%{name}/ppc64_diag_setup --unregister >/dev/null + %{_libexecdir}/%{name}/lp_diag_setup --unregister >/dev/null + systemctl daemon-reload > /dev/null 2>&1 +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 +fi + + +%changelog +* Wed Jun 19 2019 Than Ngo - 2.7.5-2 +- Resolves: #1721497, added /var/log/ppc64-diag and systemctl daemon-reload + +* Tue Apr 30 2019 Than Ngo - 2.7.5-1 +- Resolves: #1664093, update to latest upstream 2.7.5 + +* Mon Dec 10 2018 Than Ngo - 2.7.4-4 +- install missing man pages + +* Mon Dec 10 2018 Than Ngo - 2.7.4-3 +- create diag_disk path part of installation +- diags: Increase buffer length size to read complete system vpd information +- diags: Remove timestamp from disk health log file +- diags: Create diag_disk log directory manually if not present + Resolves: #1657757 + +* Thu May 10 2018 Dan Horák - 2.7.4-2 +- fix conditition for rtas_errd service (#1575638) + +* Fri Mar 09 2018 Than Ngo - 2.7.4-1 +- update to latest upstream 2.7.4 + +* Wed Mar 07 2018 Than Ngo - 2.7.1-6 +- fixed bz#1552653 - ppc64-diag: Missing Fedora build flags injection + +* Fri Feb 09 2018 Fedora Release Engineering - 2.7.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 2.7.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon May 9 2016 Vasant Hegde - 2.7.1-1 +- Update to latest upstream 2.7.1 + +* Sat Apr 9 2016 Peter Robinson 2.7.0-2 +- Rebuild for librtas soname bump +- Use %%license + +* Mon Mar 21 2016 Vasant Hegde - 2.7.0-1 +- Update to latest upstream 2.7.0 +- Change license to GPLv2 + +* Thu Feb 04 2016 Fedora Release Engineering - 2.6.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Nov 16 2015 Vasant Hegde - 2.6.10 +- Update to latest upstream 2.6.10 + +* Tue Aug 4 2015 Peter Robinson 2.6.7-4 +- Make the build verbase as per packaging standards + +* Thu Jun 18 2015 Fedora Release Engineering - 2.6.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Sep 25 2014 Vasant Hegde - 2.6.7-2 +- Update dependency list + +* Thu Sep 25 2014 Vasant Hegde - 2.6.7 +- Update to latest upstream 2.6.7 + +* Sat Jun 07 2014 Fedora Release Engineering - 2.6.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 15 2014 Vasant Hegde - 2.6.6 +- Update to latest upstream 2.6.6 + +* Wed Apr 02 2014 Vasant Hegde - 2.6.5 +- Update to latest upstream 2.6.5 + +* Fri Mar 21 2014 Vasant Hegde - 2.6.4 +- Update to latest upstream 2.6.4 + +* Fri Mar 07 2014 Vasant Hegde - 2.6.3 +- Update to latest upstream 2.6.3 + +* Thu Oct 10 2013 Vasant Hegde - 2.6.2-3 +- Add ppc64le architecture + +* Sun Sep 15 2013 Vasant Hegde - 2.6.2-2 +- Fix minor build issue. +- Fix PRRN hotplug script location issue + +* Wed Aug 21 2013 Vasant Hegde - 2.6.2 +- Update to latest upstream 2.6.2 + +* Sun Aug 04 2013 Fedora Release Engineering - 2.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue May 21 2013 Vasant Hegde - 2.6.1-2 +- Add ncurses-devel as build dependency +- Fix script location issue + +* Mon May 20 2013 Vasant Hegde - 2.6.1 +- Update to latest upstream 2.6.1 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.4.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Sep 26 2012 Karsten Hopp 2.4.3-6 +- revert permissions fix, filter requirement instead + +* Mon Sep 24 2012 karsten Hopp 2.4.3-4 +- fix permissions of servevent_parse.pl + +* Fri Jul 27 2012 Lukáš Nykrýn - 2.4.3-3 +- rename .service file +- auto start rtas_errd (#843471) + +* Sat Jul 21 2012 Fedora Release Engineering - 2.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 04 2012 Karsten Hopp 2.4.3-1 +- update to 2.4.3 + +* Wed Feb 15 2012 Karsten Hopp 2.4.2-5 +- don't strip binaries +- fix some build issues + +* Thu Sep 22 2011 Karsten Hopp 2.4.2-4 +- fix preun and post install scriptlets + +* Fri Sep 09 2011 Karsten Hopp 2.4.2-3 +- add buildrequirement systemd-units for _unitdir rpm macro +- move helper scripts to libexecdir/ppc64-diag + +* Wed Sep 07 2011 Karsten Hopp 2.4.2-2 +- additional fixes for Fedora package review (bugzilla #736062) + +* Wed Aug 17 2011 Karsten Hopp 2.4.2-1 +- initial Fedora version, based on IBM spec file with rpmlint cleanups + - move scripts to /usr/share/ppc-diag + - don't start service automatically after install