From a0c1eb5a6c74a68db57b3e0720fbc4401a9b05e3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 15 Feb 2012 18:54:36 +0100 Subject: [PATCH] fix some build issues --- ppc64-diag-unistd.patch | 11 ++ ppc64-diag-unusedvar.patch | 199 +++++++++++++++++++++++++++++++++++++ ppc64-diag.spec | 5 + 3 files changed, 215 insertions(+) create mode 100644 ppc64-diag-unistd.patch create mode 100644 ppc64-diag-unusedvar.patch diff --git a/ppc64-diag-unistd.patch b/ppc64-diag-unistd.patch new file mode 100644 index 0000000..7d8d681 --- /dev/null +++ b/ppc64-diag-unistd.patch @@ -0,0 +1,11 @@ +diff -up ppc64-diag-2.4.2/ela/add_regex.cpp.unistd ppc64-diag-2.4.2/ela/add_regex.cpp +--- ppc64-diag-2.4.2/ela/add_regex.cpp.unistd 2012-02-15 18:30:39.940068887 +0100 ++++ ppc64-diag-2.4.2/ela/add_regex.cpp 2012-02-15 18:29:58.710066673 +0100 +@@ -1,6 +1,7 @@ + using namespace std; + + #include ++#include + #include + #include "catalogs.h" + diff --git a/ppc64-diag-unusedvar.patch b/ppc64-diag-unusedvar.patch new file mode 100644 index 0000000..02b3f73 --- /dev/null +++ b/ppc64-diag-unusedvar.patch @@ -0,0 +1,199 @@ +diff -urN ppc64-diag-2.4.2/debugfiles.list ppc64-diag-2.4.2_/debugfiles.list +--- ppc64-diag-2.4.2/debugfiles.list 1970-01-01 01:00:00.000000000 +0100 ++++ ppc64-diag-2.4.2_/debugfiles.list 2012-02-15 18:32:36.350076243 +0100 +@@ -0,0 +1,33 @@ ++%dir /usr/lib/debug ++%dir /usr/lib/debug/usr ++%dir /usr/lib/debug/usr/sbin ++%dir /usr/lib/debug/.build-id ++%dir /usr/lib/debug/.build-id/cf ++%dir /usr/lib/debug/.build-id/e8 ++%dir /usr/lib/debug/.build-id/52 ++%dir /usr/lib/debug/.build-id/33 ++%dir /usr/lib/debug/.build-id/1f ++%dir /usr/lib/debug/.build-id/fc ++%dir /usr/lib/debug/.build-id/53 ++/usr/lib/debug/usr/sbin/add_regex.debug ++/usr/lib/debug/usr/sbin/explain_syslog.debug ++/usr/lib/debug/usr/sbin/diag_encl.debug ++/usr/lib/debug/usr/sbin/syslog_to_svclog.debug ++/usr/lib/debug/usr/sbin/convert_dt_node_props.debug ++/usr/lib/debug/usr/sbin/extract_platdump.debug ++/usr/lib/debug/usr/sbin/rtas_errd.debug ++/usr/lib/debug/.build-id/cf/40e1d05eeaa88a0c22de7dac2155d7e8265711.debug ++/usr/lib/debug/.build-id/cf/40e1d05eeaa88a0c22de7dac2155d7e8265711 ++/usr/lib/debug/.build-id/e8/0835ed18839177f3f032dbf367e9b1fdbe0386.debug ++/usr/lib/debug/.build-id/e8/0835ed18839177f3f032dbf367e9b1fdbe0386 ++/usr/lib/debug/.build-id/52/7125c988384abdc3a6ac4852251409a7900a80 ++/usr/lib/debug/.build-id/52/7125c988384abdc3a6ac4852251409a7900a80.debug ++/usr/lib/debug/.build-id/33/af8793081b0cae2cb4d7af5ebf346cc0308539 ++/usr/lib/debug/.build-id/33/af8793081b0cae2cb4d7af5ebf346cc0308539.debug ++/usr/lib/debug/.build-id/1f/6cec3538e91c9186f5253ffae91f0e7b1efc4d.debug ++/usr/lib/debug/.build-id/1f/6cec3538e91c9186f5253ffae91f0e7b1efc4d ++/usr/lib/debug/.build-id/fc/15dc81966a3a395f9c3be6a2a7142be5faa656 ++/usr/lib/debug/.build-id/fc/15dc81966a3a395f9c3be6a2a7142be5faa656.debug ++/usr/lib/debug/.build-id/53/fcee5d68c321cdb967e9a22f7fcf0fe8bc920b ++/usr/lib/debug/.build-id/53/fcee5d68c321cdb967e9a22f7fcf0fe8bc920b.debug ++/usr/src/debug/ppc64-diag-2.4.2 +diff -urN ppc64-diag-2.4.2/debuglinks.list ppc64-diag-2.4.2_/debuglinks.list +--- ppc64-diag-2.4.2/debuglinks.list 1970-01-01 01:00:00.000000000 +0100 ++++ ppc64-diag-2.4.2_/debuglinks.list 2012-02-15 18:32:36.310076243 +0100 +@@ -0,0 +1,14 @@ ++/usr/lib/debug/.build-id/53/fcee5d68c321cdb967e9a22f7fcf0fe8bc920b /usr/sbin/add_regex ++/usr/lib/debug/.build-id/53/fcee5d68c321cdb967e9a22f7fcf0fe8bc920b.debug /usr/lib/debug/usr/sbin/add_regex.debug ++/usr/lib/debug/.build-id/1f/6cec3538e91c9186f5253ffae91f0e7b1efc4d /usr/sbin/convert_dt_node_props ++/usr/lib/debug/.build-id/1f/6cec3538e91c9186f5253ffae91f0e7b1efc4d.debug /usr/lib/debug/usr/sbin/convert_dt_node_props.debug ++/usr/lib/debug/.build-id/33/af8793081b0cae2cb4d7af5ebf346cc0308539 /usr/sbin/syslog_to_svclog ++/usr/lib/debug/.build-id/33/af8793081b0cae2cb4d7af5ebf346cc0308539.debug /usr/lib/debug/usr/sbin/syslog_to_svclog.debug ++/usr/lib/debug/.build-id/cf/40e1d05eeaa88a0c22de7dac2155d7e8265711 /usr/sbin/explain_syslog ++/usr/lib/debug/.build-id/cf/40e1d05eeaa88a0c22de7dac2155d7e8265711.debug /usr/lib/debug/usr/sbin/explain_syslog.debug ++/usr/lib/debug/.build-id/fc/15dc81966a3a395f9c3be6a2a7142be5faa656 /usr/sbin/rtas_errd ++/usr/lib/debug/.build-id/fc/15dc81966a3a395f9c3be6a2a7142be5faa656.debug /usr/lib/debug/usr/sbin/rtas_errd.debug ++/usr/lib/debug/.build-id/e8/0835ed18839177f3f032dbf367e9b1fdbe0386 /usr/sbin/extract_platdump ++/usr/lib/debug/.build-id/e8/0835ed18839177f3f032dbf367e9b1fdbe0386.debug /usr/lib/debug/usr/sbin/extract_platdump.debug ++/usr/lib/debug/.build-id/52/7125c988384abdc3a6ac4852251409a7900a80 /usr/sbin/diag_encl ++/usr/lib/debug/.build-id/52/7125c988384abdc3a6ac4852251409a7900a80.debug /usr/lib/debug/usr/sbin/diag_encl.debug +Binärdateien ppc64-diag-2.4.2/debugsources.list and ppc64-diag-2.4.2_/debugsources.list sind verschieden. +diff -urN ppc64-diag-2.4.2/diags/7031_D24_T24.c ppc64-diag-2.4.2_/diags/7031_D24_T24.c +--- ppc64-diag-2.4.2/diags/7031_D24_T24.c 2009-05-21 23:33:06.000000000 +0200 ++++ ppc64-diag-2.4.2_/diags/7031_D24_T24.c 2012-02-15 18:36:47.170113915 +0100 +@@ -64,7 +64,8 @@ + static int + print_drive_status(uint32_t status) + { +- int fail = 0, printed = 0, rc = OK; ++ __attribute__((unused)) int fail = 0; ++ int printed = 0, rc = OK; + + if ((status & 0x0F000000) == 0x05000000) { + printf("(empty) "); +@@ -162,7 +163,8 @@ + static int + print_repeater_status(uint32_t status) + { +- int printed = 0, fail = 0, rc = OK; ++ int printed = 0, rc = OK; ++ __attribute__((unused)) int fail = 0; + + if ((status & 0x0F000000) == 0x01000000) + printf("ok "); +@@ -348,7 +350,8 @@ + diag_7031_D24_T24(int fd, struct dev_vpd *vpd, int se, int verbose) + { + struct pearl_diag_page2 dp; +- int failure = 0, rc, encl_id; ++ int failure = 0, encl_id; ++ __attribute__((unused)) int rc; + int buf_len = sizeof(dp); + int ps1, ps2, fan1, fan2, fan3, rpt, vpd_card; + +Binärdateien ppc64-diag-2.4.2/ela/syslog_to_svclog and ppc64-diag-2.4.2_/ela/syslog_to_svclog sind verschieden. +diff -urN ppc64-diag-2.4.2/install.log ppc64-diag-2.4.2_/install.log +--- ppc64-diag-2.4.2/install.log 2011-06-29 19:15:46.000000000 +0200 ++++ ppc64-diag-2.4.2_/install.log 2012-02-15 18:32:35.090076243 +0100 +@@ -45,3 +45,30 @@ + /etc/ppc64-diag/message_catalog/with_regex/message_catalog/with_regex/e1000e + //usr/share/man/man8/doc/explain_syslog.8.gz + //usr/share/man/man8/doc/syslog_to_svclog.8.gz ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/doc/packages/ppc64-diag/COPYRIGHT ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/rtas_errd ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/convert_dt_node_props ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/extract_platdump ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/etc/rc.powerfail ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/diag_encl ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/ppc64_diag_setup ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/ppc64_diag_mkrsrc ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/ppc64_diag_notify ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/ppc64_diag_servagent ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/ppc64_diag_migrate ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/libexec/ppc64-diag/servevent_parse.pl ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/etc/init.d/rtas_errd ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/etc/ppc64-diag/ppc64-diag.config ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/explain_syslog ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/add_regex ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/sbin/syslog_to_svclog ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/message_catalog/cxgb3 ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/message_catalog/e1000e ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/message_catalog/exceptions ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/message_catalog/reporters ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/message_catalog/gpfs ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/with_regex/message_catalog/with_regex/cxgb3 ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/with_regex/message_catalog/with_regex/e1000e ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64/usr/share/ppc64-diag/message_catalog/with_regex/message_catalog/with_regex/gpfs ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/share/man/man8/doc/explain_syslog.8.gz ++/builddir/build/BUILDROOT/ppc64-diag-2.4.2-4.fc17.ppc64//usr/share/man/man8/doc/syslog_to_svclog.8.gz +diff -urN ppc64-diag-2.4.2/rtas_errd/ela.c ppc64-diag-2.4.2_/rtas_errd/ela.c +--- ppc64-diag-2.4.2/rtas_errd/ela.c 2009-05-21 23:33:07.000000000 +0200 ++++ ppc64-diag-2.4.2_/rtas_errd/ela.c 2012-02-15 18:44:36.870078704 +0100 +@@ -1787,7 +1787,7 @@ + int class; + int ext_epow; + int ext_epow_nofan; +- int fan_num; ++ __attribute__((unused)) int fan_num; + + /* + * The following EPOW error logs found in CHRP, Ver. 1 +diff -urN ppc64-diag-2.4.2/rtas_errd/epow.c ppc64-diag-2.4.2_/rtas_errd/epow.c +--- ppc64-diag-2.4.2/rtas_errd/epow.c 2010-02-27 02:14:00.000000000 +0100 ++++ ppc64-diag-2.4.2_/rtas_errd/epow.c 2012-02-15 18:48:42.460078703 +0100 +@@ -48,7 +48,7 @@ + void + epow_timer_handler(int sig, siginfo_t siginfo, void *context) + { +- int rc, state; ++ int __attribute__((unused)) rc, state; + struct itimerval tv; + + if (time_remaining <= 0) { +@@ -149,7 +149,7 @@ + struct rtas_epow_scn *epow; + struct itimerval tv; + char *event_type; +- int rc, state; ++ int __attribute__((unused)) rc, state; + + /* + * Check the sensor state; this will be used to ensure +@@ -371,7 +371,7 @@ + { + pid_t child; + char *childargs[2]; +- int rc, current_status; ++ int __attribute__((unused)) rc, current_status; + + /* + * Dissect the EPOW extended error information; +diff -urN ppc64-diag-2.4.2/rtas_errd/files.c ppc64-diag-2.4.2_/rtas_errd/files.c +--- ppc64-diag-2.4.2/rtas_errd/files.c 2009-06-27 01:20:43.000000000 +0200 ++++ ppc64-diag-2.4.2_/rtas_errd/files.c 2012-02-15 18:43:59.950079214 +0100 +@@ -161,7 +161,7 @@ + { + struct stat sbuf; + char *tmp; +- int fd, len; ++ int fd, __attribute__((unused)) len; + int i; + + if (scenario_file == NULL) +diff -urN ppc64-diag-2.4.2/rtas_errd/guard.c ppc64-diag-2.4.2_/rtas_errd/guard.c +--- ppc64-diag-2.4.2/rtas_errd/guard.c 2009-06-27 01:20:43.000000000 +0200 ++++ ppc64-diag-2.4.2_/rtas_errd/guard.c 2012-02-15 18:46:45.870082813 +0100 +@@ -40,7 +40,7 @@ + unsigned int value, int wait) + { + pid_t child; +- int status, rc; ++ int status, __attribute__((unused)) rc; + char capacity[6], quant_str[5]; + char *drmgr_args[] = {DRMGR_PROGRAM_NOPATH, "-r", "-c", NULL, + NULL, NULL, NULL, NULL, NULL}; +@@ -368,7 +368,7 @@ + static void + guard_spcpu(struct event *event, int ent_loss) + { +- int n_cpus, rc, quant, ent_cap; ++ int n_cpus, __attribute__((unused)) rc = 0, quant, ent_cap; + int min_ent_cap = d_cfg.min_entitled_capacity; + + /* diff --git a/ppc64-diag.spec b/ppc64-diag.spec index c44679c..522b5f4 100644 --- a/ppc64-diag.spec +++ b/ppc64-diag.spec @@ -15,6 +15,8 @@ Source1: ppc64-diag.service Patch0: ppc64-diag-2.4.2-messagecatalog-location.patch Patch1: ppc64-diag-2.4.2-chkconfig.patch Patch2: ppc64-diag-2.4.2-scriptlocation.patch +Patch3: ppc64-diag-unistd.patch +Patch4: ppc64-diag-unusedvar.patch %description Platform diagnostics for Linux for Power writes events reported by the @@ -29,6 +31,8 @@ configured in /etc/ppc64-diag/ppc64-diag.config. %patch0 -p1 -b .msg_loc %patch1 -p1 -b .chkconfig %patch2 -p1 -b .script_loc +%patch3 -p1 -b .unistd +%patch4 -p1 -b .unusevar %build make %{?_smp_mflags} @@ -94,6 +98,7 @@ fi %changelog * 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