In order to get rasdaemon packaging to work well in Debian, I had to make a few minor fixes -- a printf missing a "%s", a manpage in the wrong section, and a dependency on having system logging running before starting the daemon itself. These are the patches for those fixes (they're already in the 0.5.6 Debian package).
Al Stone (3): rasdaemon: correct a printf that was missing a field to print to rasdaemon: the man page should be section 8 not 1 rasdaemon: make sure daemon does not start until after logging does
configure.ac | 2 +- man/Makefile.am | 2 +- man/rasdaemon.1.in | 67 ----------------------------------------------- man/rasdaemon.8.in | 67 +++++++++++++++++++++++++++++++++++++++++++++++ mce-intel-p4-p6.c | 2 +- misc/rasdaemon.service.in | 1 - 6 files changed, 70 insertions(+), 71 deletions(-) delete mode 100644 man/rasdaemon.1.in create mode 100644 man/rasdaemon.8.in
Minor correction to a printf to add a field for a string being printed out.
Signed-off-by: Al Stone al.stone@linaro.org --- mce-intel-p4-p6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mce-intel-p4-p6.c b/mce-intel-p4-p6.c index c8e219d..4615e1a 100644 --- a/mce-intel-p4-p6.c +++ b/mce-intel-p4-p6.c @@ -127,7 +127,7 @@ void p4_decode_model(struct mce_event *e)
for (i = 0; i < ARRAY_SIZE(p4_model); i++) { if (model & (1 << p4_model[i].value)) - mce_snprintf(e->error_msg, p4_model[i].str); + mce_snprintf(e->error_msg, "%s", p4_model[i].str); } }
Admin tools normally have man pages in section 8, not section 1, so move the rasdaemon man page to 8.
Signed-off-by: Al Stone al.stone@linaro.org --- configure.ac | 2 +- man/Makefile.am | 2 +- man/rasdaemon.1.in | 67 ------------------------------------------------------ man/rasdaemon.8.in | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 man/rasdaemon.1.in create mode 100644 man/rasdaemon.8.in
diff --git a/configure.ac b/configure.ac index 559f70a..871aca4 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ AC_CONFIG_FILES([ libtrace/Makefile man/Makefile man/ras-mc-ctl.8 - man/rasdaemon.1 + man/rasdaemon.8 misc/rasdaemon.spec util/Makefile util/ras-mc-ctl diff --git a/man/Makefile.am b/man/Makefile.am index 2e66237..a181173 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,2 +1,2 @@ -man_MANS = ras-mc-ctl.8 rasdaemon.1 +man_MANS = ras-mc-ctl.8 rasdaemon.8
diff --git a/man/rasdaemon.1.in b/man/rasdaemon.1.in deleted file mode 100644 index 7a8b60f..0000000 --- a/man/rasdaemon.1.in +++ /dev/null @@ -1,67 +0,0 @@ -."**************************************************************************** -." $Id$ -."**************************************************************************** -."Copyright (c) 2013 Mauro Carvalho Chehab mchehab@redhat.com -." -." This is free software; you can redistribute it and/or modify it -." under the terms of the GNU General Public License as published by -." the Free Software Foundation; either version 2 of the License, or -." (at your option) any later version. -." -." This is distributed in the hope that it will be useful, but WITHOUT -." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -." for more details. -." -." You should have received a copy of the GNU General Public License along -." with this program; if not, write to the Free Software Foundation, Inc., -." 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -."**************************************************************************** - -.TH RASDAEMON 8 "@META_DATE@" "@META_ALIAS@" "RAS memory controller admin utility" - -.SH NAME -rasdaemon - RAS daemon to log the RAS events. - -.SH SYNOPSIS -.B rasdaemon -[\fIOPTION\fR]... - -.SH DESCRIPTION - -The \fBrasdaemon\fR program is a daemon which monitors the platform -Reliablity, Availability and Serviceability (RAS) reports from the -Linux kernel trace events. These trace events are logged in -/sys/kernel/debug/tracing, reporting them via syslog/journald. - -.SH OPTIONS -.TP -.BI "--usage" -Display a brief usage message and exit. -.TP -.BI "--help" -Display a help message and exit. -.TP -.BI "--disable" -Disable RAS tracing events and exit. -.TP -.BI "--enable" -Enable RAS tracing events and exit. -.TP -.BI "--foreground" -Executes in foreground, printing the events at console. Useful for testing it, -and to be used by systemd or Unix System V respan. -If not specified, the program runs in daemon mode. -.TP -.BI "--record" -Record RAS events via Sqlite3. The Sqlite3 database has the benefit of -keeping a persistent record of the RAS events. This feature is used with -the ras-mc-ctl utility. Note that rasdaemon may be compiled without this -feature. -.TP -.BI "--version" -Print the program version and exit. - -.SH SEE ALSO -\fBras-mc-ctl\fR(8) - diff --git a/man/rasdaemon.8.in b/man/rasdaemon.8.in new file mode 100644 index 0000000..7a8b60f --- /dev/null +++ b/man/rasdaemon.8.in @@ -0,0 +1,67 @@ +."**************************************************************************** +." $Id$ +."**************************************************************************** +."Copyright (c) 2013 Mauro Carvalho Chehab mchehab@redhat.com +." +." This is free software; you can redistribute it and/or modify it +." under the terms of the GNU General Public License as published by +." the Free Software Foundation; either version 2 of the License, or +." (at your option) any later version. +." +." This is distributed in the hope that it will be useful, but WITHOUT +." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +." for more details. +." +." You should have received a copy of the GNU General Public License along +." with this program; if not, write to the Free Software Foundation, Inc., +." 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +."**************************************************************************** + +.TH RASDAEMON 8 "@META_DATE@" "@META_ALIAS@" "RAS memory controller admin utility" + +.SH NAME +rasdaemon - RAS daemon to log the RAS events. + +.SH SYNOPSIS +.B rasdaemon +[\fIOPTION\fR]... + +.SH DESCRIPTION + +The \fBrasdaemon\fR program is a daemon which monitors the platform +Reliablity, Availability and Serviceability (RAS) reports from the +Linux kernel trace events. These trace events are logged in +/sys/kernel/debug/tracing, reporting them via syslog/journald. + +.SH OPTIONS +.TP +.BI "--usage" +Display a brief usage message and exit. +.TP +.BI "--help" +Display a help message and exit. +.TP +.BI "--disable" +Disable RAS tracing events and exit. +.TP +.BI "--enable" +Enable RAS tracing events and exit. +.TP +.BI "--foreground" +Executes in foreground, printing the events at console. Useful for testing it, +and to be used by systemd or Unix System V respan. +If not specified, the program runs in daemon mode. +.TP +.BI "--record" +Record RAS events via Sqlite3. The Sqlite3 database has the benefit of +keeping a persistent record of the RAS events. This feature is used with +the ras-mc-ctl utility. Note that rasdaemon may be compiled without this +feature. +.TP +.BI "--version" +Print the program version and exit. + +.SH SEE ALSO +\fBras-mc-ctl\fR(8) +
Signed-off-by: Al Stone al.stone@linaro.org --- misc/rasdaemon.service.in | 1 - 1 file changed, 1 deletion(-)
diff --git a/misc/rasdaemon.service.in b/misc/rasdaemon.service.in index be9ad5a..4e2393a 100644 --- a/misc/rasdaemon.service.in +++ b/misc/rasdaemon.service.in @@ -1,6 +1,5 @@ [Unit] Description=RAS daemon to log the RAS events -After=syslog.target
[Service] ExecStart=@sbindir@/rasdaemon -f -r