Hello community, here is the log from the commit of package vmtouch for openSUSE:Factory checked in at 2017-07-12 19:36:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vmtouch (Old) and /work/SRC/openSUSE:Factory/.vmtouch.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vmtouch" Wed Jul 12 19:36:20 2017 rev:2 rq:509605 version:1.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/vmtouch/vmtouch.changes 2017-02-03 20:04:42.833685454 +0100 +++ /work/SRC/openSUSE:Factory/.vmtouch.new/vmtouch.changes 2017-07-12 19:36:23.109134929 +0200 @@ -1,0 +2,15 @@ +Wed Jul 12 03:20:21 UTC 2017 - plinn...@opensuse.org +- Update to version 1.3.0 +- * New switch: "-b <file>". This enables "batch mode" where the + list of files to crawl is read from the specified file + (Thanks Tw) + * New switch: "-0". When this is enabled, the files in + "batch mode" are separated by NUL bytes instead of newlines + * New switch: "-F". Prevents vmtouch from traversing separate + filesystems (requested by mailinglists35) + * Lots of updates to the debian packaging (Thanks anarcat) + * Use standard path for manpages (Thanks anarcat) + * On linux, if an open fails due to EPERM then try again + without O_NOATIME + +------------------------------------------------------------------- Old: ---- vmtouch-1.2.0.tar.gz New: ---- vmtouch-1.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vmtouch.spec ++++++ --- /var/tmp/diff_new_pack.Y48Sa9/_old 2017-07-12 19:36:24.744903865 +0200 +++ /var/tmp/diff_new_pack.Y48Sa9/_new 2017-07-12 19:36:24.748903300 +0200 @@ -1,7 +1,7 @@ # # spec file for package vmtouch # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # Name: vmtouch -Version: 1.2.0 +Version: 1.3.0 Release: 0 License: BSD-3-Clause Summary: Portable file system cache diagnostics and control @@ -29,13 +29,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -A tool for learning about and controlling the file system cache of unix and unix-like systems. +A tool for learning about and controlling the file system +cache of unix and unix-like systems. %prep %setup -q %build -make CFLAGS="%{optflags}" +make CFLAGS="%{optflags} -std=gnu99" %install b=%{buildroot} ++++++ vmtouch-1.2.0.tar.gz -> vmtouch-1.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/CHANGES new/vmtouch-1.3.0/CHANGES --- old/vmtouch-1.2.0/CHANGES 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/CHANGES 2017-03-16 16:32:35.000000000 +0100 @@ -1,3 +1,16 @@ +1.3.0 2017-03-16 + * New switch: "-b <file>". This enables "batch mode" where the + list of files to crawl is read from the specified file + (Thanks Tw) + * New switch: "-0". When this is enabled, the files in + "batch mode" are separated by NUL bytes instead of newlines + * New switch: "-F". Prevents vmtouch from traversing separate + filesystems (requested by mailinglists35) + * Lots of updates to the debian packaging (Thanks anarcat) + * Use standard path for manpages (Thanks anarcat) + * On linux, if an open fails due to EPERM then try again + without O_NOATIME + 1.2.0 2016-12-01 * -i feature which lets you ignore entire files and directories (Thanks Etienne Bruines) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/Makefile new/vmtouch-1.3.0/Makefile --- old/vmtouch-1.2.0/Makefile 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/Makefile 2017-03-16 16:32:35.000000000 +0100 @@ -1,6 +1,6 @@ PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin -MANDIR?= $(PREFIX)/man/man8 +MANDIR?= $(PREFIX)/share/man/man8 CC?= cc CFLAGS+= -Wall -O2 -g -std=c99 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/TODO new/vmtouch-1.3.0/TODO --- old/vmtouch-1.2.0/TODO 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/TODO 2017-03-16 16:32:35.000000000 +0100 @@ -18,3 +18,7 @@ * Try opening large mappings with MAP_HUGETLB on linux 2.6.32+ * From Dennis (Apr 2012): "Additionally you might want to use MAP_NORESERVE for the mmap, this seems to speed things a bit up for multiple huge files." + +* Windows support some day? + * https://msdn.microsoft.com/en-us/library/hh780543(v=vs.85).aspx + * https://blogs.msdn.microsoft.com/oldnewthing/20170113-00/?p=95185 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/changelog new/vmtouch-1.3.0/debian/changelog --- old/vmtouch-1.2.0/debian/changelog 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/changelog 2017-03-16 16:32:35.000000000 +0100 @@ -1,3 +1,184 @@ +vmtouch (1.3.0) unstable; urgency=medium + + [ doug ] + * README + * move some comments from .c into TODO and CHANGES + * Patch from Marc Brooker: avoid overflowing stack when allocating array for mincore() output + * Patch from Federico Lucifredi: Avoid ugly NaNs in output, Mac OS X report + * gitignore, copyright update + * Full OS X support: msync(2) evicts pages on this system + * update + * watcher script + + [ Alexey Ivanov ] + * [debian] Added debian/ dir and Makefile + + [ soarpenguin ] + * Update vmtouch.c + * fix the error of *tp != '\0' + + [ Nick Barkas ] + * change Debian arch from all to any + * add Debian init script with default config + + [ doug ] + * TODO update + * HP-UX support from Shane Seymour (thanks!) + * Note HP-UX support + * HP-UX system notes from Shane Seymour + * port man page to POD format + * doc update + * bump version + * Deprecation notice for -p switch + * tested CPUs note + * S5 presentation: Intro to Virtual Memory + * Presentation update + * CHANGES notes, comment clean-up + * tagging 0.8.0 + + [ Kristofer Karlsson ] + * Add option to wait for daemon to mlock the files. + + [ doug ] + * removing presentation since it now has its own repo + + [ Carsten Otto ] + * ignore hardlink duplicates by default + + [ doug ] + * Document Carsten Otto's -h switch in the man page + * regenerate man page + + [ Emmanuel Kasper ] + * Enhance Makefile: * generate manpage from build * add manpage to install target * add uninstall target * remove vmtouch.8 as it is now generated in build step + + [ doug ] + * gitignore generated man-page + + [ Mikolaj Golub ] + * Respect CC, CFLAGS, PREFIX, BINDIR, MANDIR variable + * Fix "data argument not used by format string" warning. + + [ Jim Garrison ] + * Fix to work with glibc 2.20 + + [ doug ] + * make default CFLAGS a bit more user-friendly + * bugfix for when trying to crawl entire filesystem + + [ Luka Blaskovic ] + * Update debian packaging. + + [ Justas Lavišius ] + * implement parse_range for -p + * provide comments for parse_range + * implement page mode (-p) for touch, evict and lock + * provide better output for touch + * document page mode (-p) + * round up offset to nearest multiple of pagesize + * remove unused variable pages_in_core in vmtouch_file + * skip files smaller than offset provided in -p + * Revert "provide better output for touch" + + [ doug ] + * done by Justas -- thanks! + * add some links to README + * trailing whitespace + * change default max file size to SIZE_MAX + * releasing 1.0.1 + * update copyright year + * don't install watch-vmtouch script + * fix dependencies in makefile, declare phony targets properly + * bsd support in make install + * proper headers in generated man-page + * convert readme to mark-down + * releasing 1.0.2 + + [ Patrik Modesto ] + * fix debian packaging after README convert + + [ doug ] + * bump copyright year + * use https for vmtouch website links + + [ Matthew Fernandez ] + * Fix: catch parsing double values that are too large. + + [ doug ] + * Detect multiplication overflow in parse_size function + * support block devices + + [ Justas Lavišius ] + * Round range lower limit down, not up (Fixes #27) + * Round down properly & allow 0 value in size/range + + [ Ancients ] + * Added NO_ATIME open to prevent incrementing atime values when touching files. + + [ doug ] + * Documentation on tuning system limits + * note that professional support is available via hoytech software + * Vladimir Kotal provided some details on the Solaris memory-locking limits + * Forgot to add the note about PRIV_PROC_LOCK_MEMORY + * make the O_NOATIME not interfere with compiling on systems that don't have this functionality + * avoid uninitialized variable warnings on older compilers + * releasing 1.1.0 + + [ Etienne Bruines ] + * Added -i option to ignore files and directories. (#42) + + [ Doug Hoyte ] + * some minor fixups for the -i feature + * support wildcard matching in ignore list with fnmatch + * -I feature which lets you process only files matching certain patterns + * triage TODO a bit + + [ ecebuzz ] + * Turn on C99 option in Makefile (#44) + + [ Doug Hoyte ] + * releasing 1.2.0 + * On linux, if an open fails due to EPERM then try again without O_NOATIME + + [ Doug ] + * notes for possible windows support + + [ Antoine Beaupré ] + * add myself to uploaders to sponsor this in debian + * update standards to latest, no change + * bump debhelper compat to 10 for multi-arch and auto dbg, no change + * no reason why this is in extra, it should be optional like everything else + * remove -dbg package, now build automatically + * simplify install target + * distribute TUNING.md as part of the documentation + * WIP: prepare 1.2.1 changelog + * setup gbp config for native package + * remove unused substitution variables in control file + * depend on lsb-base since we still use an init.d file + * use standard BSD-3-clause short name to please lintian + * remove boilerplate comment in copyright file + * follow FHS for manpages location + * remove unnused sbin dir + * switch maintainership away from the original packager to upstream + + [ Tw ] + * support adding files by file list + + [ Doug ] + * typo/formatting + * support "-b -" to read file list from stdin + * support -0 in -b "batch mode" + * document -b and -0 flags in manual + + [ Doug Hoyte ] + * Use standard path for manpages (thanks anarcat) + * -F option to avoid recursing into separate filesystems (requested by mailinglists35) + + [ doug ] + * releasing 1.3.0 + + -- doug <doug@mercury.(none)> Thu, 16 Mar 2017 11:30:27 -0400 + vmtouch (0.7.3) unstable; urgency=low * Initial release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/compat new/vmtouch-1.3.0/debian/compat --- old/vmtouch-1.2.0/debian/compat 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/compat 2017-03-16 16:32:35.000000000 +0100 @@ -1 +1 @@ -7 +10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/control new/vmtouch-1.3.0/debian/control --- old/vmtouch-1.2.0/debian/control 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/control 2017-03-16 16:32:35.000000000 +0100 @@ -1,23 +1,18 @@ Source: vmtouch Section: admin -Priority: extra -Maintainer: Alexey Ivanov <r...@yandex-team.ru> -Build-Depends: debhelper (>= 7.0.50~) -Standards-Version: 3.9.2 +Priority: optional +Maintainer: Doug Hoyte <d...@hcsw.org> +Uploaders: Antoine Beaupré <anar...@debian.org> +Build-Depends: debhelper (>= 10~) +Standards-Version: 3.9.8 Homepage: https://hoytech.com/vmtouch/ Vcs-Git: git://github.com/hoytech/vmtouch.git Vcs-Browser: https://github.com/hoytech/vmtouch Package: vmtouch Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, ${perl:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} + , lsb-base (>= 3.0-6) Description: Portable file system cache diagnostics and control vmtouch is a tool for learning about and controlling the file system cache of unix and unix-like systems. - -Package: vmtouch-dbg -Section: debug -Priority: extra -Architecture: any -Depends: vmtouch (= ${binary:Version}), ${misc:Depends} -Description: Debug symbols for vmtouch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/copyright new/vmtouch-1.3.0/debian/copyright --- old/vmtouch-1.2.0/debian/copyright 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/copyright 2017-03-16 16:32:35.000000000 +0100 @@ -4,7 +4,7 @@ Files: * Copyright: 2012 Doug Hoyte <d...@hcsw.org> -License: BSD +License: BSD-3-clause Copyright (c) 2009-2016 Doug Hoyte and contributors. All rights reserved. . Redistribution and use in source and binary forms, with or without @@ -29,8 +29,6 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# If you want to use GPL v2 or later for the /debian/* files use -# the following clauses, or change it to suit. Delete these two lines Files: debian/* Copyright: 2012 Alexey Ivanov <r...@yandex-team.ru> License: GPL-2+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/gbp.conf new/vmtouch-1.3.0/debian/gbp.conf --- old/vmtouch-1.2.0/debian/gbp.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/vmtouch-1.3.0/debian/gbp.conf 2017-03-16 16:32:35.000000000 +0100 @@ -0,0 +1,2 @@ +[DEFAULT] +debian-tag = v%(version)s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/rules new/vmtouch-1.3.0/debian/rules --- old/vmtouch-1.2.0/debian/rules 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/rules 2017-03-16 16:32:35.000000000 +0100 @@ -7,8 +7,5 @@ %: dh $@ -override_dh_strip: - dh_strip --dbg-package=vmtouch-dbg - override_dh_auto_install: - $(MAKE) PREFIX=$$(pwd)/debian/vmtouch/usr install + $(MAKE) PREFIX=$(CURDIR)/debian/vmtouch/usr install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/vmtouch.dirs new/vmtouch-1.3.0/debian/vmtouch.dirs --- old/vmtouch-1.2.0/debian/vmtouch.dirs 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/vmtouch.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -usr/sbin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/debian/vmtouch.docs new/vmtouch-1.3.0/debian/vmtouch.docs --- old/vmtouch-1.2.0/debian/vmtouch.docs 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/debian/vmtouch.docs 2017-03-16 16:32:35.000000000 +0100 @@ -1,2 +1,3 @@ README.md TODO +TUNING.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/vmtouch.c new/vmtouch-1.3.0/vmtouch.c --- old/vmtouch-1.2.0/vmtouch.c 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/vmtouch.c 2017-03-16 16:32:35.000000000 +0100 @@ -37,7 +37,7 @@ ***********************************************************************/ -#define VMTOUCH_VERSION "1.2.0" +#define VMTOUCH_VERSION "1.3.0" #define RESIDENCY_CHART_WIDTH 60 #define CHART_UPDATE_INTERVAL 0.1 #define MAX_CRAWL_DEPTH 1024 @@ -119,6 +119,8 @@ // remember all inodes (for files with inode count > 1) to find duplicates void *seen_inodes = NULL; +dev_t orig_device = 0; +int orig_device_inited = 0; int o_touch=0; @@ -129,9 +131,12 @@ int o_lockall=0; int o_daemon=0; int o_followsymlinks=0; +int o_singlefilesystem=0; int o_ignorehardlinkeduplictes=0; size_t o_max_file_size=SIZE_MAX; int o_wait=0; +static char *o_batch = NULL; +int o_0_delim = 0; char *ignore_list[MAX_NUMBER_OF_IGNORES]; @@ -165,9 +170,12 @@ printf(" -m <size> max file size to touch\n"); printf(" -p <range> use the specified portion instead of the entire file\n"); printf(" -f follow symbolic links\n"); + printf(" -F don't crawl different filesystems\n"); printf(" -h also count hardlinked copies\n"); printf(" -i <pattern> ignores files and directories that match this pattern\n"); printf(" -I <pattern> only process files that match this pattern\n"); + printf(" -b <list file> get files or directories from the list file\n"); + printf(" -0 in batch mode (-b) separate paths with NUL byte instead of newline\n"); printf(" -w wait until all pages are locked (only useful together with -d)\n"); printf(" -v verbose\n"); printf(" -q quiet\n"); @@ -482,6 +490,13 @@ fd = open(path, open_flags, 0); +#if defined(O_NOATIME) + if (fd == -1 && errno == EPERM) { + open_flags &= ~O_NOATIME; + fd = open(path, open_flags, 0); + } +#endif + if (fd == -1) { if (errno == ENFILE || errno == EMFILE) { increment_nofile_rlimit(); @@ -727,6 +742,18 @@ return; } + if (o_singlefilesystem) { + if (!orig_device_inited) { + orig_device = sb.st_dev; + orig_device_inited = 1; + } else { + if (sb.st_dev != orig_device) { + warning("not recursing into separate filesystem %s", path); + return; + } + } + } + if (!o_ignorehardlinkeduplictes && sb.st_nlink > 1) { /* * For files with more than one link to it, ignore it if we already know @@ -804,6 +831,32 @@ } } +static void vmtouch_batch_crawl(const char *path) { + FILE *f; + char *line = NULL; + size_t len = 0; + ssize_t read; + int delim = o_0_delim ? '\0' : '\n'; + + if (!strcmp(path, "-")) { + f = stdin; + } else { + f = fopen(path, "r"); + if (!f) { + warning("unable to open %s (%s), skipping", path, strerror(errno)); + return; + } + } + + while ((read = getdelim(&line, &len, delim, f)) != -1) { + // strip the newline character + line[read-1] = '\0'; + vmtouch_crawl(line); + } + + free(line); + fclose(f); +} @@ -823,7 +876,7 @@ pagesize = sysconf(_SC_PAGESIZE); - while((ch = getopt(argc, argv,"tevqlLdfhi:I:p:b:m:w")) != -1) { + while((ch = getopt(argc, argv,"tevqlLdfFh0i:I:p:b:m:w")) != -1) { switch(ch) { case '?': usage(); break; case 't': o_touch = 1; break; @@ -836,6 +889,7 @@ o_touch = 1; break; case 'd': o_daemon = 1; break; case 'f': o_followsymlinks = 1; break; + case 'F': o_singlefilesystem = 1; break; case 'h': o_ignorehardlinkeduplictes = 1; break; case 'p': parse_range(optarg); break; case 'i': parse_ignore_item(optarg); break; @@ -847,6 +901,8 @@ break; } case 'w': o_wait = 1; break; + case 'b': o_batch = optarg; break; + case '0': o_0_delim = 1; break; } } @@ -875,7 +931,7 @@ if (o_quiet && o_verbose) fatal("invalid option combination: -q and -v"); - if (!argc) { + if (!argc && !o_batch) { printf("%s: no files or directories specified\n", prog); usage(); } @@ -885,6 +941,10 @@ gettimeofday(&start_time, NULL); + if (o_batch) { + vmtouch_batch_crawl(o_batch); + } + for (i=0; i<argc; i++) vmtouch_crawl(argv[i]); gettimeofday(&end_time, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.2.0/vmtouch.pod new/vmtouch-1.3.0/vmtouch.pod --- old/vmtouch-1.2.0/vmtouch.pod 2016-12-01 14:53:01.000000000 +0100 +++ new/vmtouch-1.3.0/vmtouch.pod 2017-03-16 16:32:35.000000000 +0100 @@ -68,6 +68,14 @@ Can be specified multiple times. Only processes filenames matching one or more of the provided patterns. The pattern may include wildcards (remember to escape them from your shell). Example: vmtouch -I '*.c' -I '*.h' . +=item -b <list file> + +The list of files/directories to crawl is read from the specified list file, which by default should be a newline-separated list, for example the output from the find command. If the list file is "-" then this list is read from standard input. Example: find /usr/lib -type f | vmtouch -b - + +=item -0 + +If -b ("batch mode") is in effect, assume the list file is delimited with NUL bytes instead of newlines, for example the output from find -print0. This is useful in case your filenames contain newline characters themselves. + =item -v Verbose mode. While crawling, print out every file being processed along with its total number of pages and the number of its pages that are currently resident in memory to standard output.