debian/0000775000000000000000000000000012301777763007205 5ustar debian/changelog0000664000000000000000000003467612301777763011077 0ustar mcelog (100-1fakesync1) trusty-proposed; urgency=medium * Fake sync due to mismatching orig tarball. -- Steve Langasek Fri, 21 Feb 2014 17:40:03 -0800 mcelog (100-1) unstable; urgency=medium * New upstream snapshot * Upload to unstable * Source /lib/lsb/init-functions in the init script * Use canonical URLs in Vcs-* * Bump Standards-Version to 3.9.5 (no change needed) -- Andrey Rahmatullin Thu, 13 Feb 2014 02:39:38 +0600 mcelog (1.0~snapshot20121127-1~exp1) experimental; urgency=low * New upstream snapshot + Don't call all unsupported systems "new" (Closes: #676573) * Upload to experimental * Adopt the package (Closes: #688540) * Switch to debhelper v9 and to dh(1) * Rewrite debian/copyright in the machine-readable format, mention the license of rbtree.* * Add the Homepage field * Add the Vcs-* fields * Bump Standards-Version to 3.9.4 (no change needed) * Fix a spelling error * Escape hyphens in the manpage * Add proper Default-Stop: to the initscript -- Andrey Rahmatullin Fri, 30 Nov 2012 23:14:24 +0600 mcelog (1.0~pre3-72-gcbd4da4-1) unstable; urgency=low * New git snapshot. * debian/control: + Rework package description; mcelog is now required on i386 kernels too, since the x86 and x86-64 MCE support got merged together after the big x86 merge (closes: #629408). -- Julien BLACHE Wed, 20 Jul 2011 18:41:03 +0200 mcelog (1.0~pre3-66-g39f5b74-1) unstable; urgency=low * New git snapshot. * Removed sourceless PDF files. * debian/control: + Bump Standards-Version to 3.9.2 (no changes). * debian/rules: + Do not define DOCDIR at install time, PDFs have been removed so there is no additional documentation to install anymore. * debian/patches/fix_timeout_bit.patch, debian/patches/fix_trigger_typo.dpatch: + Removed; merged upstream. -- Julien BLACHE Fri, 03 Jun 2011 19:04:47 +0200 mcelog (1.0~pre3-3) unstable; urgency=low * debian/patches/fix_timeout_bit.patch: + Added; fix interpretation of the timeout bit (closes: #587365). -- Julien BLACHE Mon, 28 Jun 2010 18:15:24 +0200 mcelog (1.0~pre3-2) unstable; urgency=low * debian/copyright: + Update. * debian/patches/fix_dmi_segfault.patch: + Added; fix segfault when SMBIOS tables cannot be mmaped (closes: #585853). -- Julien BLACHE Tue, 22 Jun 2010 18:45:02 +0200 mcelog (1.0~pre3-1) unstable; urgency=low * New upstream release. * Package converted to source format 3.0 (quilt). + Patches now have DEP-3 headers. * debian/rules: + Remove dpatch code. * debian/control: + Remove dpatch from Build-Depends. + Bump Standards-Version to 3.8.4 (no changes). * debian/mcelog.init: + Add $remote_fs to Required-{Start,Stop}. * debian/patches/01_64bit_mem_addr.dpatch: + Renamed to fix_64bit_mem_addr.patch, refreshed, content unchanged. * debian/patches/10_trigger_typo.dpatch: + Renamed to fix_trigger_typo.patch, refreshed, content unchanged. -- Julien BLACHE Tue, 09 Mar 2010 19:39:16 +0100 mcelog (1.0~pre1-1) unstable; urgency=low * New upstream release (closes: #561163). + Disk DB for memory errors is deprecated upstream and disabled. * debian/mcelog.init: + Add support for daemon mode, keep support for trigger mode. * debian/mcelog.default: + Added; default to daemon mode for mcelog. * debian/mcelog.postinst: + Remove code handling /var/lib/memory-errors on upgrade from versions < 0.8~pre-5 (0.8~pre-8 in Lenny). * debian/mcelog.preinst: + Move /etc/mcelog.conf to /etc/mcelog/mcelog.conf. * debian/mcelog.NEWS, debian/README.Debian: + Updated. * debian/rules: + Restart mcelog on upgrade (remove -r from dh_installinit). * debian/patches/03_memory_errors.dpatch: + Removed; no longer needed as disk DB is now disabled. * debian/patches/10_trigger_typo.dpatch: + Added; fix a small typo in cache-error-trigger. -- Julien BLACHE Fri, 18 Dec 2009 19:06:09 +0100 mcelog (0.9~pre+2gitb7ddf8-2) unstable; urgency=low * debian/mcelog.init: + Check for existence of $TRIGGER in all actions (closes: #553200). -- Julien BLACHE Thu, 29 Oct 2009 17:51:05 +0100 mcelog (0.9~pre+2gitb7ddf8-1) unstable; urgency=low * New git snapshot, b7ddf8dbc7ad289f8e316e730b7f6d0f97720a82. + Several fixes, including Nehalem channel decoding. -- Julien BLACHE Sun, 11 Oct 2009 11:23:14 +0200 mcelog (0.9~pre+1git543dbb-2) unstable; urgency=low * debian/control: + Swap udev and makedev in the alternative (closes: #546875). + Bump Standards-Version to 3.8.3 (no changes). -- Julien BLACHE Wed, 16 Sep 2009 18:58:09 +0200 mcelog (0.9~pre+1git543dbb-1) unstable; urgency=low * Snapshot from git (543dbb) (closes: #538163). * Makefile: + Enable disk db (was always enabled in previous versions). * debian/copyright: + Mention upstream git tree location. * debian/rules: + Pass etcprefix at install time. * debian/dirs: + Add etc for conffile installation. * debian/patches/01_64bit_mem_addr.dpatch: + Updated. * debian/patches/02_tsc_secs_fix.dpatch: + Removed; fixed upstream. * debian/patches/03_memory_errors.dpatch: + Updated. -- Julien BLACHE Fri, 24 Jul 2009 09:02:07 +0200 mcelog (0.9~pre1-3) unstable; urgency=low * Reupload to unstable. -- Julien BLACHE Thu, 09 Jul 2009 13:27:33 +0200 mcelog (0.9~pre1-2) experimental; urgency=low * Switch to running mcelog via the kernel MCE trigger instead of running via cron (closes: #535180). * debian/README.Debian: + Updated for trigger mode. * debian/mcelog.NEWS: + Document switch to trigger mode. * debian/control: + Remove po-debconf build-dep. + Add fixed dependencies on debconf for purging the templates. + Fix description, MCE will now be logged to syslog. * debian/rules: + Do not install logrotate config snippet. + Do not install cron config snippet. + Do not install debconf scripts. + Install mcelog init script. * debian/mcelog.postinst: + Remove debconf code and stop checking for /dev/mcelog usability. * debian/mcelog.postrm: + Purge debconf templates on purge (manually). * debian/mcelog.preinst: + Remove obsolete conffiles: /etc/logrotate.d/mcelog, /etc/cron.d/mcelog, /etc/mcelog-disabled. * debian/mcelog.init: + Added; simple init script to set up the kernel trigger. * debian/patches/10_debian_test.dpatch, debian/patches/11_logrotate.dpatch, debian/mcelog.cron.d, debian/mcelog.templates, debian/po/*: + Removed. -- Julien BLACHE Thu, 02 Jul 2009 18:41:32 +0200 mcelog (0.9~pre1-1) unstable; urgency=low * New upstream (pre) release. * debian/control: + Bump Standards-Version to 3.8.2 (no changes). + Remove supported processors from the description; the list is growing and is pointless now. * debian/copyright: + Updated. * debian/patches/03_memory_errors.dpatch: + Updated. * debian/patches/10_debian_test.dpatch: + Updated. -- Julien BLACHE Tue, 30 Jun 2009 19:19:29 +0200 mcelog (0.8~pre-8) unstable; urgency=low * debian/mcelog.postrm: + Check for /var/lib/mcelog existence, in case it's been removed by dpkg before postrm is run (closes: #507349). -- Julien BLACHE Sun, 30 Nov 2008 13:38:11 +0100 mcelog (0.8~pre-7) unstable; urgency=low * debian/control: + Fix typo in description (closes: #505441). * debian/mcelog.postinst, debian/mcelog.postrm: + Make postinst and postrm scripts set -e. -- Julien BLACHE Wed, 12 Nov 2008 13:43:07 +0100 mcelog (0.8~pre-6) unstable; urgency=low * debian/control: + Bump Standards-Version to 3.8.0 (no changes). * debconf translations: + sv.po: courtesy of Martin Ågren (closes: #492064). -- Julien BLACHE Wed, 23 Jul 2008 18:44:15 +0200 mcelog (0.8~pre-5) unstable; urgency=low * debian/mcelog.postinst: + Move /var/lib/memory-errors to /var/lib/mcelog/memory-errors. * debian/mcelog.postrm: + Remove /var/lib/mcelog/memory-errors and /var/lib/mcelog (if empty) on purge. + Remove /var/log/mcelog & /var/log/mcelog.* on purge. * debian/patches/03_memory_errors.dpatch: + Added; store memory-errors state file in /var/lib/mcelog (closes: #458030). * debian/control: + Bump Standards-Version to 3.7.3 (no changes). -- Julien BLACHE Mon, 31 Dec 2007 18:36:29 +0100 mcelog (0.8~pre-4) unstable; urgency=low * debian/po/ja.po: + Added Japanese debconf translation courtesy of Kenshi Muto (closes: #446587). -- Julien BLACHE Sun, 14 Oct 2007 11:44:29 +0200 mcelog (0.8~pre-3) unstable; urgency=low * debian/README.Debian: + mcelog must be run via annotate-output for timestamping, piping its output to annotate-output doesn't work (closes: #439223). -- Julien BLACHE Thu, 23 Aug 2007 16:18:54 +0200 mcelog (0.8~pre-2) unstable; urgency=low * debian/rules: + Build with standard -g -O2 -Wall CFLAGS. * debian/patches/02_tsc_secs_fix.dpatch: + Added; Fix typo in TSC-to-uptime computation. -- Julien BLACHE Thu, 16 Aug 2007 18:40:09 +0200 mcelog (0.8~pre-1) unstable; urgency=low * New upstream release. * debian/control, debian/rules: + Use dpatch. * debian/patches/10_debian_test.dpatch: + Added (from Debian diff); Add the --debian-test option. * debian/patches/11_logrotate.dpatch: + Added (from Debian diff); Slightly change logrotate options. * debian/patches/01_64bit_mem_addr.dpatch: + Added; Use 64bit variables on 32bit architectures to pass memory addresses around, otherwise the --dmi output is incorrect for machines with more than 4 GB of RAM. Adapted from the patch contributed by Anders Kaseorg for v0.7 (closes: #437022). -- Julien BLACHE Wed, 15 Aug 2007 12:17:58 +0200 mcelog (0.7-6) unstable; urgency=low * debian/po/pt.po: + Add Portuguese debconf translation by Américo Monteiro (closes: #434200). * debian/control: + Depend on makedev | udev (closes: #434162). * debian/mcelog.postinst: + Fix MAKEDEV invocation. * debian/rules: + Do not ignore make clean failures in clean target. -- Julien BLACHE Mon, 23 Jul 2007 00:24:50 +0200 mcelog (0.7-5) unstable; urgency=low * debian/po/nl.po: + Add dutch debconf translation by Bart Cornelis (closes: #419726). -- Julien BLACHE Tue, 17 Apr 2007 19:54:11 +0200 mcelog (0.7-4) unstable; urgency=low * debian/README.Debian: + Document the lack of MCE support on Xen kernels (closes: #410023). -- Julien BLACHE Sun, 11 Feb 2007 17:01:38 +0100 mcelog (0.7-3) unstable; urgency=low * debian/po/de.po: german debconf translation courtesy of Alwin Meschede (closes: #400658). -- Julien BLACHE Thu, 30 Nov 2006 20:09:25 +0100 mcelog (0.7-2) unstable; urgency=low * debian/README.Debian: + Explain why timestamping mcelog's output isn't very useful, and how to easily add the timestamping. -- Julien BLACHE Sun, 8 Oct 2006 18:55:27 +0200 mcelog (0.7-1) unstable; urgency=low * New upstream release (closes: #367247). * debian/control: + Bumped Standards-Version to 3.7.2 (no changes). -- Julien BLACHE Sun, 14 May 2006 20:31:49 +0200 mcelog (0.6-5) unstable; urgency=low * debian/po/fr.po + Added french translation (closes: #364263). -- Julien BLACHE Sat, 29 Apr 2006 13:15:32 +0200 mcelog (0.6-4) unstable; urgency=low * debian/control: + Depends: makedev (>= 2.3.1-81). * debian/mcelog.config: + Removed; merged into the postinst, as it needs mcelog itself and apt runs the config script before unpacking. * debian/mcelog.postinst: + Create /dev/mcelog if it doesn't exist. + Merge mcelog.config back in the postinst. * Added Czech debconf translation (closes: #361122). -- Julien BLACHE Fri, 14 Apr 2006 12:50:07 +0200 mcelog (0.6-3) unstable; urgency=low * debian/mcelog.postinst, debian/rules, debian/control: + Use a debconf note instead of mailing root when mcelog can't be used on the machine (closes: #327532). * mcelog.c: + Remove the -t option. -- Julien BLACHE Sat, 1 Apr 2006 17:15:05 +0200 mcelog (0.6-2) unstable; urgency=low * mcelog.c: + Introduce the --debian-test switch to replace -t; avoid possible clash with upstream's options. ** -t will go away at the next revision, you've been warned ** * debian/mcelog.postinst, debian/README.Debian: + Replace mcelog -t with mcelog --debian-test. -- Julien BLACHE Tue, 14 Mar 2006 19:40:20 +0100 mcelog (0.6-1) unstable; urgency=low * New upstream release. * debian/mcelog.cron.d: + Add --ignorenodev and --filter to match the sample cron script. -- Julien BLACHE Tue, 28 Feb 2006 17:13:41 +0100 mcelog (0.4-4) unstable; urgency=low * debian/control, debian/README.Debian + Highlight the fact that mcelog works only with x86-64 kernels. * debian/mcelog.postinst: + Do not test /dev/mcelog if /etc/mcelog-disabled exists. * debian/mcelog.postrm: + Remove /etc/mcelog-disabled on purge. -- Julien BLACHE Thu, 31 Mar 2005 13:39:15 +0200 mcelog (0.4-3) unstable; urgency=low * mcelog.c, postinst, README.Debian: + Add a -t option to mcelog to test /dev/mcelog; use it in postinst to enable/disable the mcelog crontab (and mail root if needed); document the procedure in README.Debian (closes: #302041). Thanks to Loïc Minier and Mario Holbe for their input. -- Julien BLACHE Tue, 29 Mar 2005 23:31:45 +0200 mcelog (0.4-2) unstable; urgency=low * Rewritten the description, it sucked badly. -- Julien BLACHE Tue, 29 Mar 2005 21:42:34 +0200 mcelog (0.4-1) unstable; urgency=low * New upstream release. -- Julien BLACHE Mon, 28 Mar 2005 22:59:25 +0200 mcelog (0.3-1) unstable; urgency=low * Initial Release (closes: #292559). -- Julien BLACHE Fri, 28 Jan 2005 22:24:58 +0100 debian/gbp.conf0000664000000000000000000000010212276756176010623 0ustar [DEFAULT] upstream-tag = upstream/%(version)s pristine-tar = True debian/mcelog.preinst0000664000000000000000000000272412276756176012074 0ustar #!/bin/sh set -e # From http://wiki.debian.org/DpkgConffileHandling # Remove a no-longer used conffile rm_conffile() { local PKGNAME="$1" local CONFFILE="$2" [ -e "$CONFFILE" ] || return 0 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi } if [ "$1" = install ] || [ "$1" = upgrade ]; then # Cleanup files related to cron-mode if dpkg --compare-versions "$2" le "0.9~pre1-1"; then rm_conffile mcelog /etc/logrotate.d/mcelog rm_conffile mcelog /etc/cron.d/mcelog if [ -e /etc/cron.d/mcelog ]; then # Disable the crontab to avoid annoying messages touch /etc/mcelog-disabled else # Cleanup now-useless file rm -f /etc/mcelog-disabled fi fi # Move /etc/mcelog.conf to /etc/mcelog/mcelog.conf if dpkg --compare-versions "$2" lt "1.0~pre1-1"; then if [ -e /etc/mcelog.conf ] && [ ! -e /etc/mcelog/mcelog.conf ]; then [ -d /etc/mcelog ] || mkdir -p /etc/mcelog mv /etc/mcelog.conf /etc/mcelog/mcelog.conf fi fi fi #DEBHELPER# debian/mcelog.postrm0000664000000000000000000000104712276756176011731 0ustar #!/bin/sh set -e # Remove /etc/mcelog-disabled on purge if [ "$1" = "purge" ]; then if [ -d /var/lib/mcelog ]; then rm -f /var/lib/mcelog/memory-errors rmdir --ignore-fail-on-non-empty /var/lib/mcelog fi # Remove files and logs created by versions prior to 0.9~pre1-2. rm -f /etc/mcelog-disabled rm -f /var/log/mcelog /var/log/mcelog.* # Purge debconf templates; debconf removed starting with 0.9~pre1-2. if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi fi #DEBHELPER# debian/mcelog.postinst0000664000000000000000000000033412276756176012266 0ustar #!/bin/sh set -e if [ "$1" = configure ] || [ "$1" = reconfigure ] ; then # create the device node if it doesn't exist if [ -e /dev/MAKEDEV ]; then (cd /dev && ./MAKEDEV mcelog) || true fi fi #DEBHELPER# debian/patches/0000775000000000000000000000000012276756176010642 5ustar debian/patches/series0000664000000000000000000000013412276756176012055 0ustar fix_64bit_mem_addr.patch fix_dmi_segfault.patch fix-spelling.patch fix-manpage-hyphen.patch debian/patches/fix-spelling.patch0000664000000000000000000000074512276756176014272 0ustar Description: Fix a spelling error in dmi_sanity_check() Author: Andrey Rahmatullin Last-Update: 2012-11-27 diff --git a/dmi.c b/dmi.c index 373837e..4558e7b 100644 --- a/dmi.c +++ b/dmi.c @@ -494,7 +494,7 @@ int dmi_sanity_check(void) dmi_dimms[i]->device_locator); if (!strcmp(b, loc)) { if (verbose > 0) - printf("Ambigious locators `%s'<->`%s'." + printf("Ambiguous locators `%s'<->`%s'." FAILED, b, loc); return 0; } debian/patches/fix-manpage-hyphen.patch0000664000000000000000000000107612276756176015354 0ustar Description: Escape hyphens in mcelog.8 Author: Andrey Rahmatullin Last-Update: 2012-11-27 diff --git a/mcelog.8 b/mcelog.8 index fa923e7..036ffe2 100644 --- a/mcelog.8 +++ b/mcelog.8 @@ -279,7 +279,7 @@ use The kernel prefers old messages over new. If the log buffer overflows only old ones will be kept. -The exact output in the log file depends on the CPU, unless the --raw option is used. +The exact output in the log file depends on the CPU, unless the \-\-raw option is used. mcelog will report serious errors to the syslog during decoding. debian/patches/fix_64bit_mem_addr.patch0000664000000000000000000001125212276756176015312 0ustar Description: Use 64bit types for memory addresses mcelog reads 64-bit addresses from the MCE, but passes them around with type unsigned long, which causes mcelog --dmi to give incorrect results on 32-bit systems with more than 4 GiB of RAM. Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=437022 Bug-Debian: http://bugs.debian.org/437022 Author: Anders Kaseorg Author: Julien BLACHE Index: mcelog-1.0~pre3-72-gcbd4da4/dimm.c =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/dimm.c 2011-07-20 18:44:28.505446683 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/dimm.c 2011-07-20 18:44:29.961434285 +0200 @@ -351,14 +351,14 @@ Eprintf("Cannot run error trigger %s for %s\n", trigger, loc); open_dimm_db(NULL); } -void new_error(unsigned long addr, unsigned long max_error, char *trigger) +void new_error(unsigned long long addr, unsigned long max_error, char *trigger) { struct dmi_memdev **devs; int i; devs = dmi_find_addr(addr); if (devs[0] == NULL) { - Wprintf("No memory found for address %lx\n", addr); + Wprintf("No memory found for address %Lx\n", addr); exit(1); } for (i = 0; devs[i]; i++) { @@ -366,7 +366,7 @@ char *loc = dmi_getstring(&d->header, d->device_locator); struct group *g = find_entry(dimm_db, NULL, "Locator", loc); if (!g) { // shouldn't happen - Eprintf("No record found for %lx\n", addr); + Eprintf("No record found for %Lx\n", addr); return; } unsigned long val = inc_val(g, "corrected errors"); Index: mcelog-1.0~pre3-72-gcbd4da4/dimm.h =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/dimm.h 2011-07-20 18:44:28.521446547 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/dimm.h 2011-07-20 18:44:29.969434217 +0200 @@ -1,6 +1,6 @@ void close_dimm_db(void); int open_dimm_db(char *fn); -void new_error(unsigned long addr, unsigned long max_error, char *trigger); +void new_error(unsigned long long addr, unsigned long max_error, char *trigger); void reset_dimm(char *locator); void gc_dimms(void); void dump_all_dimms(void); Index: mcelog-1.0~pre3-72-gcbd4da4/dmi.c =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/dmi.c 2011-07-20 18:44:28.541446377 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/dmi.c 2011-07-20 18:44:29.989434047 +0200 @@ -331,7 +331,7 @@ Wprintf("%s ", type_details[i]); } -static void dump_memdev(struct dmi_memdev *md, unsigned long addr) +static void dump_memdev(struct dmi_memdev *md, unsigned long long addr) { char tmp[20]; char unit[10]; @@ -340,7 +340,7 @@ if (md->header.length < offsetof(struct dmi_memdev, manufacturer)) { if (verbose > 0) - printf("Memory device for address %lx too short %u\n", + printf("Memory device for address %llx too short %u\n", addr, md->header.length); return; } @@ -532,7 +532,7 @@ DMIGET(dmi_dimms[i],device_set)); } -struct dmi_memdev **dmi_find_addr(unsigned long addr) +struct dmi_memdev **dmi_find_addr(unsigned long long addr) { struct dmi_memdev **devs; int i, k; @@ -576,7 +576,7 @@ return devs; } -void dmi_decodeaddr(unsigned long addr) +void dmi_decodeaddr(unsigned long long addr) { struct dmi_memdev **devs = dmi_find_addr(addr); if (devs[0]) { @@ -585,7 +585,7 @@ for (i = 0; devs[i]; i++) dump_memdev(devs[i], addr); } else { - Wprintf("No DIMM found for %lx in SMBIOS\n", addr); + Wprintf("No DIMM found for %llx in SMBIOS\n", addr); } free(devs); } Index: mcelog-1.0~pre3-72-gcbd4da4/dmi.h =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/dmi.h 2011-07-20 18:44:28.561446205 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/dmi.h 2011-07-20 18:44:30.005433911 +0200 @@ -62,10 +62,10 @@ } __attribute__((packed)); int opendmi(void); -void dmi_decodeaddr(unsigned long addr); +void dmi_decodeaddr(unsigned long long addr); int dmi_sanity_check(void); unsigned dmi_dimm_size(unsigned short size, char *unit); -struct dmi_memdev **dmi_find_addr(unsigned long addr); +struct dmi_memdev **dmi_find_addr(unsigned long long addr); void dmi_set_verbosity(int v); char *dmi_getstring(struct dmi_entry *e, unsigned number); Index: mcelog-1.0~pre3-72-gcbd4da4/mcelog.c =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/mcelog.c 2011-07-20 18:44:28.581446035 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/mcelog.c 2011-07-20 18:44:30.021433775 +0200 @@ -127,7 +127,7 @@ } } -static void resolveaddr(unsigned long addr) +static void resolveaddr(unsigned long long addr) { if (addr && do_dmi && dmi_forced) dmi_decodeaddr(addr); debian/patches/fix_dmi_segfault.patch0000664000000000000000000000163112276756176015175 0ustar Description: fix segfault when failing to mmap SMBIOS tables as a daemon mcelog segfaults when it is run as a daemon and cannot mmap the SMBIOS tables because the entries variables is not reset to NULL after the error. Author: Sebastian Andrzej Siewior Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=585853 Bug-Debian: http://bugs.debian.org/585853 Index: mcelog-1.0~pre3-72-gcbd4da4/dmi.c =================================================================== --- mcelog-1.0~pre3-72-gcbd4da4.orig/dmi.c 2011-07-20 18:44:29.989434047 +0200 +++ mcelog-1.0~pre3-72-gcbd4da4/dmi.c 2011-07-20 18:44:33.865401045 +0200 @@ -266,6 +266,7 @@ round_down(a->table, pagesize)); if (entries == (struct dmi_entry *)-1) { Eprintf("Cannot mmap SMBIOS tables at %x", a->table); + entries = NULL; goto out_mmap; } entries = (struct dmi_entry *)(((char *)entries) + corr); debian/copyright0000664000000000000000000000443012276756176011147 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mcelog Upstream-Contact: Andi Kleen Source: http://mcelog.org/download.html Files: * Copyright: 2002, 2003, 2004, 2005, 2006 Andi Kleen, SuSE Labs. 2005, 2008-2010 Intel Corporation 2003 Eric Morton, Newisys Inc 2005, 2006 Jacob Shin, AMD Inc. License: GPL-2 Files: rbtree.* Copyright: 1999 Andrea Arcangeli 2002 David Woodhouse License: GPL-2+ Files: debian/* Copyright: 2005-2011 Julien BLACHE 2012 Andrey Rahmatullin License: GPL-2+ License: GPL-2 This program 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; version 2. . This program 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. License: GPL-2+ This program 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 program 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/docs0000664000000000000000000000000712276756176010063 0ustar README debian/compat0000664000000000000000000000000212276756176010411 0ustar 9 debian/README.Debian0000664000000000000000000000220512276756176011253 0ustar mcelog for Debian ----------------- mcelog is only needed/useful on x86-64 platforms, ie AMD64 and EM64T hardware. You need to configure your kernel with CONFIG_X86_MCE=y (which is the default). mcelog can be run in one of two modes: - as a daemon, this is the default mode - as a trigger, run by the kernel every time an MCE event happens The recommended mode of operation is the daemon mode. However, trigger mode is still available and supported by this package. Edit /etc/default/mcelog to activate trigger mode if desired. Trigger mode works by using the trigger provided by the kernel under /sys/devices/system/machinecheck/machinecheck0/trigger The decoded MCE data is logged to syslog in both modes. A lot of options can be configured in /etc/mcelog/mcelog.conf; the sample configuration file is heavily commented. MCE, mcelog and Xen ------------------- Xen kernels do not have MCE support, so mcelog is useless on systems running a Xen kernel. On Xen systems, it is the Xen hypervisor that collects the MCE; error messages can be seen in the 'xm dmesg' output. -- Julien BLACHE , Fri, 18 Dec 2009 18:50:15 +0100 debian/rules0000775000000000000000000000012512276756176010271 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_test: .PHONY: override_dh_auto_test debian/mcelog.init0000664000000000000000000000715112276756176011352 0ustar #! /bin/sh # ### BEGIN INIT INFO # Provides: mcelog # Required-Start: $syslog $local_fs $remote_fs # Required-Stop: $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Machine Check Exceptions (MCE) collector & decoder # Description: Machine Check Exceptions are raised by the CPU whenever # it encounters an hardware error. mcelog collects and # decodes Machine Check Exceptions as they happen. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/mcelog NAME=mcelog DESC="Machine Check Exceptions decoder" TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger RUN_MODE=daemon test -x $DAEMON || exit 0 if [ ! -r /dev/mcelog ]; then echo "/dev/mcelog not active" exit 0 fi [ -r /etc/default/mcelog ] && . /etc/default/mcelog . /lib/lsb/init-functions set -e # Trigger functions start_trigger() { if start-stop-daemon --stop --test --quiet --exec $DAEMON; then echo "WARNING: mcelog daemon running, not setting up MCE trigger" exit 1 fi echo -n "Setting up Machine Check Exceptions trigger..." if [ -e $TRIGGER ]; then echo $DAEMON > $TRIGGER else echo " not supported on this machine." exit 0 fi echo " done." echo -n "Running $DESC..." $DAEMON echo " done." } stop_trigger() { echo -n "Clearing Machine Check Exceptions trigger..." if [ -e $TRIGGER ]; then echo "" > $TRIGGER else echo " not supported on this machine." exit 0 fi echo " done." } trigger_status() { if [ "$(cat $TRIGGER)" = $DAEMON ]; then echo "Machine Check Exceptions collected by mcelog." exit 0 else if [ ! -e $TRIGGER ]; then echo "Machine Check Exceptions not collected by mcelog; trigger mode not supported." else echo "Machine Check Exceptions not collected by mcelog." fi exit 1 fi } # Daemon functions start_daemon() { # Check & clear mcelog trigger if [ -e $TRIGGER ] && [ "$(cat $TRIGGER)" = $DAEMON ]; then echo "" > $TRIGGER fi echo -n "Starting $DESC: " start-stop-daemon --start --quiet --exec $DAEMON -- --daemon $DAEMON_OPTS echo "$NAME." } stop_daemon() { echo -n "Stopping $DESC: " start-stop-daemon --stop --oknodo --quiet --exec $DAEMON echo "$NAME." } restart_daemon() { echo -n "Restarting $DESC: " # Check & clear mcelog trigger if [ -e $TRIGGER ] && [ "$(cat $TRIGGER)" = $DAEMON ]; then echo "" > $TRIGGER fi start-stop-daemon --stop --oknodo --quiet --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --exec $DAEMON -- --daemon $DAEMON_OPTS echo "$NAME." } daemon_status() { echo -n "$NAME is " if start-stop-daemon --stop --test --quiet --exec $DAEMON; then echo "running." else echo "not running." exit 1 fi } case "$1" in start) if [ "$RUN_MODE" = "trigger" ]; then start_trigger else start_daemon fi ;; stop) if [ "$RUN_MODE" = "trigger" ]; then stop_trigger else stop_daemon fi ;; restart) if [ "$RUN_MODE" = "trigger" ]; then start_trigger else restart_daemon fi ;; force-reload) if [ "$RUN_MODE" = "trigger" ]; then [ -e $TRIGGER ] && [ "$(cat $TRIGGER)" = $DAEMON ] && $0 restart || exit 0 else start-stop-daemon --stop --test --quiet --exec $DAEMON \ && restart_daemon \ || exit 0 fi ;; status) if [ "$RUN_MODE" = "trigger" ]; then trigger_status else daemon_status fi ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 debian/mcelog.NEWS0000664000000000000000000000263112276756176011161 0ustar mcelog (1.0~pre1-1) unstable; urgency=low Starting with this revision, mcelog now defaults to running as a daemon. Trigger mode is still available if desired and can be activated by editing /etc/default/mcelog. The disk database for memory errors has been removed; this feature is buggy and deprecated. Information about memory errors is now kept in memory and can be queried with mcelog --client. -- Julien BLACHE Fri, 18 Dec 2009 18:44:23 +0100 mcelog (0.9~pre1-2) experimental; urgency=low Starting with this revision, mcelog is no longer run from a crontab every five minutes. Instead, mcelog will now be invoked directly by the kernel upon receiving an MCE event. This means there will no longer be any delay between an MCE event happening and that same MCE event being decoded and logged. With this change, MCE events will now be logged to syslog instead of /var/log/mcelog. You can safely remove /var/log/mcelog* now, and any mcelog conffile that you modified (unmodified conffiles will be taken care of by the preinst script). The /etc/mcelog-disabled file is no longer used and can be removed if present; be sure to remove /etc/cron.d/mcelog beforehand, too. Old mcelog conffiles: - /etc/cron.d/mcelog - /etc/logrotate.d/mcelog - /etc/mcelog-disabled (created by postinst) -- Julien BLACHE Thu, 02 Jul 2009 17:56:52 +0200 debian/source/0000775000000000000000000000000012276756176010513 5ustar debian/source/format0000664000000000000000000000001412276756176011721 0ustar 3.0 (quilt) debian/mcelog.default0000664000000000000000000000025612276756176012032 0ustar # Run mode # Available modes: trigger, daemon # WARNING: stop mcelog before changing the run mode RUN_MODE=daemon # Custom daemon options, daemon mode only #DAEMON_OPTS="" debian/control0000664000000000000000000000172112301777763010611 0ustar Source: mcelog Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Andrey Rahmatullin Build-Depends: debhelper (>= 9) Standards-Version: 3.9.5 Homepage: http://mcelog.org/ Vcs-Git: git://anonscm.debian.org/collab-maint/mcelog.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/mcelog.git;a=summary Package: mcelog Architecture: i386 amd64 Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, udev | makedev (>= 2.3.1-81) Description: x86 Machine Check Exceptions collector and decoder The Linux kernel for x86 CPUs no longer decodes and logs recoverable Machine Check Exception (MCE) events to the kernel log on its own. . Instead, the MCE data is kept in a buffer which can be read from userspace via the /dev/mcelog device node. . You need this tool to collect and decode those events; it will log the decoded MCE events to syslog.