Hello community, here is the log from the commit of package fatrace for openSUSE:Factory checked in at 2015-01-30 15:08:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fatrace (Old) and /work/SRC/openSUSE:Factory/.fatrace.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fatrace" Changes: -------- --- /work/SRC/openSUSE:Factory/fatrace/fatrace.changes 2013-04-23 15:08:44.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.fatrace.new/fatrace.changes 2015-01-30 15:08:26.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Jan 12 12:58:52 UTC 2015 - [email protected] + +- Update to version 0.9 + + power-usage-report: Adjust parsing to also work for powertop 2.6. +- Clean-up spec file +- Fix project Url +- Use download Url as source +- Remove make and gcc explicit requirements; it's implicit + +------------------------------------------------------------------- Old: ---- fatrace-0.5.tar.bz2 New: ---- fatrace-0.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fatrace.spec ++++++ --- /var/tmp/diff_new_pack.VT2QDL/_old 2015-01-30 15:08:27.000000000 +0100 +++ /var/tmp/diff_new_pack.VT2QDL/_new 2015-01-30 15:08:27.000000000 +0100 @@ -1,6 +1,7 @@ # # spec file for package fatrace # +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2013 Philipp Thomas <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -14,18 +15,16 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: fatrace -Version: 0.5 +Version: 0.9 Release: 1 Summary: Report system wide file access events Group: System/Monitoring License: GPL-3.0+ -URL: http://www.piware.de/2012/02/fatrace-report-system-wide-file-access-events/ -Source0: %{name}-%{version}.tar.bz2 - -BuildRequires: gcc make glibc-devel +URL: https://launchpad.net/fatrace +Source0: https://launchpad.net/fatrace/trunk/0.9/+download/%{name}-%{version}.tar.bz2 +BuildRequires: glibc-devel %description Part of the efforts to reduce power consumption is to identify processes ++++++ fatrace-0.5.tar.bz2 -> fatrace-0.9.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatrace-0.5/NEWS new/fatrace-0.9/NEWS --- old/fatrace-0.5/NEWS 2013-04-11 09:16:27.000000000 +0200 +++ new/fatrace-0.9/NEWS 2014-11-07 09:17:24.000000000 +0100 @@ -1,3 +1,28 @@ +0.9 (2014-11-07) +---------------- + - power-usage-report: Adjust parsing to also work for powertop 2.6. + +0.8 (2014-09-23) +---------------- + - The previous O_LARGEFILE change to fix "Value too large for defined data + type" error was ineffective, as in userspace this value is 0 on the affected + platforms. Use the real numeric value to work around the problem for systems + which run an older kernel that does not yet have the real fix. + (LP: #1372873) + +0.7 (2014-08-07) +---------------- + - Use O_LARGEFILE to fix "Value too large for defined data type" error with + large files on some platforms. (LP: #1161989) + - Increase buffer size to 256 KiB. (LP: #1312095) + +0.6 (2014-01-07) +---------------- +Bug fixes: + - More careful check of uninteresting mount points, only consider those with a + '/' in it. Thanks Heinrich Schuchardt! + - power-usage-report: Fix output parsing for PowerTOP 2.5. (LP: #1265142) + 0.5 (2013-04-11) ---------------- Improvements: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatrace-0.5/fatrace.c new/fatrace-0.9/fatrace.c --- old/fatrace-0.5/fatrace.c 2013-04-11 09:16:27.000000000 +0200 +++ new/fatrace-0.9/fatrace.c 2014-11-07 09:17:24.000000000 +0100 @@ -17,6 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define _LARGEFILE64_SOURCE + #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -33,6 +35,14 @@ #include <sys/fanotify.h> #include <sys/time.h> +#define BUFSIZE 256*1024 + +/* work around kernels which do not have this fix yet: + * http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1e2ee49f7 + * O_LARGEFILE is usually 0, so hardcode it here + */ +#define KERNEL_O_LARGEFILE 00100000 + /* command line options */ static char* option_output = NULL; static long option_timeout = -1; @@ -143,9 +153,9 @@ int res; FILE* mounts; struct mntent* mount; - + if (option_current_mount) { - res = fanotify_mark (fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT, + res = fanotify_mark (fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_ACCESS| FAN_MODIFY | FAN_OPEN | FAN_CLOSE | FAN_ONDIR | FAN_EVENT_ON_CHILD, AT_FDCWD, "."); if (res < 0) { @@ -167,13 +177,14 @@ /* Only consider mounts which have an actual device or bind mount * point. The others are stuff like proc, sysfs, binfmt_misc etc. which * are virtual and do not actually cause disk access. */ - if (access (mount->mnt_fsname, F_OK) != 0) { + if (mount->mnt_fsname == NULL || access (mount->mnt_fsname, F_OK) != 0 || + strchr(mount->mnt_fsname, '/') == NULL) { //printf("IGNORE: fsname: %s dir: %s type: %s\n", mount->mnt_fsname, mount->mnt_dir, mount->mnt_type); continue; } //printf("Adding watch for %s mount %s\n", mount->mnt_type, mount->mnt_dir); - res = fanotify_mark (fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT, + res = fanotify_mark (fan_fd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_ACCESS| FAN_MODIFY | FAN_OPEN | FAN_CLOSE | FAN_ONDIR | FAN_EVENT_ON_CHILD, AT_FDCWD, mount->mnt_dir); if (res < 0) { @@ -333,7 +344,7 @@ parse_args (argc, argv); - fan_fd = fanotify_init (0, 0); + fan_fd = fanotify_init (0, KERNEL_O_LARGEFILE); if (fan_fd < 0) { err = errno; fprintf (stderr, "Cannot initialize fanotify: %s\n", strerror (err)); @@ -346,7 +357,7 @@ /* allocate memory for fanotify */ buffer = NULL; - err = posix_memalign (&buffer, 4096, 4096); + err = posix_memalign (&buffer, 4096, BUFSIZE); if (err != 0 || buffer == NULL) { fprintf(stderr, "Failed to allocate buffer: %s\n", strerror (err)); exit(1); @@ -365,7 +376,7 @@ } /* setup signal handler to cleanly stop the program */ - sa.sa_handler = signal_handler; + sa.sa_handler = signal_handler; sigemptyset (&sa.sa_mask); sa.sa_flags = 0; if (sigaction (SIGINT, &sa, NULL) < 0) { @@ -375,7 +386,7 @@ /* set up --time alarm */ if (option_timeout > 0) { - sa.sa_handler = signal_handler; + sa.sa_handler = signal_handler; sigemptyset (&sa.sa_mask); sa.sa_flags = 0; if (sigaction (SIGALRM, &sa, NULL) < 0) { @@ -392,7 +403,7 @@ /* read all events in a loop */ while (running) { - res = read (fan_fd, buffer, 4096); + res = read (fan_fd, buffer, BUFSIZE); if (res == 0) { fprintf (stderr, "No more fanotify event (EOF)\n"); break; @@ -422,5 +433,5 @@ } return 0; -} +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatrace-0.5/power-usage-report new/fatrace-0.9/power-usage-report --- old/fatrace-0.5/power-usage-report 2013-04-11 09:16:27.000000000 +0200 +++ new/fatrace-0.9/power-usage-report 2014-11-07 09:17:24.000000000 +0100 @@ -155,9 +155,9 @@ # map powertop's headers to our headers for interesting parts blocks = [ - ('Overview of Software Power Consumers', 'Wakeups'), - ('Device Power Report', 'Devices'), - ('Process Device Activity', 'Process Device Activity'), + ('overview of software power consumers', 'Wakeups'), + ('device power report', 'Devices'), + ('process device activity', 'Process Device Activity'), ] # filter out multiple empty lines @@ -166,7 +166,7 @@ for (search_header, print_header) in blocks: # skip until search_header - while i < len(lines) and not lines[i].startswith('**' + search_header): + while i < len(lines) and not search_header in lines[i].lower(): i += 1 i += 1 # skip header # skip empty lines @@ -174,7 +174,7 @@ i += 1 print('====== %s ======' % print_header) - while i < len(lines) and lines[i]: + while i < len(lines) and lines[i] and not lines[i].startswith('_____'): print(lines[i]) i += 1 print('') -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
