Hello community, here is the log from the commit of package vmtouch for openSUSE:Factory checked in at 2020-08-17 12:10:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vmtouch (Old) and /work/SRC/openSUSE:Factory/.vmtouch.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vmtouch" Mon Aug 17 12:10:25 2020 rev:3 rq:827274 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/vmtouch/vmtouch.changes 2017-07-12 19:36:23.109134929 +0200 +++ /work/SRC/openSUSE:Factory/.vmtouch.new.3399/vmtouch.changes 2020-08-17 12:11:50.882909915 +0200 @@ -1,0 +2,11 @@ +Sun Aug 16 22:07:06 UTC 2020 - Dirk Mueller <[email protected]> + +- update to 1.3.1: + * New switch: "-P <pidfile>". When combined with -l or -L, the + PID of the daemon process will be written to this file. + * In Makefile, support staged installs using DESTDIR + * Create snapcraft.yaml to enable snap creation + * Fix compilation for pre-C99 compilers + * Documentation improvements + +------------------------------------------------------------------- Old: ---- vmtouch-1.3.0.tar.gz New: ---- vmtouch-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vmtouch.spec ++++++ --- /var/tmp/diff_new_pack.loJNRp/_old 2020-08-17 12:11:52.502910771 +0200 +++ /var/tmp/diff_new_pack.loJNRp/_new 2020-08-17 12:11:52.506910773 +0200 @@ -1,7 +1,7 @@ # # spec file for package vmtouch # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,20 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + Name: vmtouch -Version: 1.3.0 +Version: 1.3.1 Release: 0 -License: BSD-3-Clause Summary: Portable file system cache diagnostics and control -Url: http://hoytech.com/vmtouch/ +License: BSD-3-Clause Group: System/Utilities +URL: http://hoytech.com/vmtouch/ Source: https://github.com/hoytech/vmtouch/archive/v%{version}.tar.gz#/vmtouch-%{version}.tar.gz BuildRequires: gcc -BuildRequires: perl BuildRequires: make +BuildRequires: perl BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -47,3 +48,5 @@ %doc CHANGES README.md TODO %{_bindir}/vmtouch %{_mandir}/man8/vmtouch.8%{ext_man} + +%changelog ++++++ vmtouch-1.3.0.tar.gz -> vmtouch-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/.logp.conf new/vmtouch-1.3.1/.logp.conf --- old/vmtouch-1.3.0/.logp.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/vmtouch-1.3.1/.logp.conf 2018-11-16 15:40:02.000000000 +0100 @@ -0,0 +1,3 @@ +run: + env: + - TRAVIS_* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/.travis.yml new/vmtouch-1.3.1/.travis.yml --- old/vmtouch-1.3.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/vmtouch-1.3.1/.travis.yml 2018-11-16 15:40:02.000000000 +0100 @@ -0,0 +1,9 @@ +language: c +sudo: false +dist: trusty + +compiler: + - clang + - gcc + +script: make diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/CHANGES new/vmtouch-1.3.1/CHANGES --- old/vmtouch-1.3.0/CHANGES 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/CHANGES 2018-11-16 15:40:02.000000000 +0100 @@ -1,3 +1,15 @@ +1.3.1 2018-11-16 + * New switch: "-P <pidfile>". When combined with -l or -L, the + PID of the daemon process will be written to this file. + (Thanks Jon Lin) + * In Makefile, support staged installs using DESTDIR + (Thanks Earnestly) + * Create snapcraft.yaml to enable snap creation + (Thanks Alan Pope) + * Fix compilation for pre-C99 compilers + (Thanks Rushikesh Jadhav) + * Documentation improvements + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/LICENSE new/vmtouch-1.3.1/LICENSE --- old/vmtouch-1.3.0/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/vmtouch-1.3.1/LICENSE 2018-11-16 15:40:02.000000000 +0100 @@ -0,0 +1,23 @@ +Copyright (c) 2009-2017 Doug Hoyte and contributors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/Makefile new/vmtouch-1.3.1/Makefile --- old/vmtouch-1.3.0/Makefile 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/Makefile 2018-11-16 15:40:02.000000000 +0100 @@ -10,18 +10,17 @@ .PHONY: all install clean uninstall vmtouch: vmtouch.c - ${CC} ${CFLAGS} -o vmtouch vmtouch.c + ${CC} ${CFLAGS} ${LDFLAGS} -o vmtouch vmtouch.c vmtouch.8: vmtouch.pod pod2man --section 8 --center "System Manager's Manual" --release " " vmtouch.pod > vmtouch.8 install: vmtouch vmtouch.8 - mkdir -p $(BINDIR) $(MANDIR) - install -m 0755 vmtouch $(BINDIR)/vmtouch - install -m 0644 vmtouch.8 $(MANDIR)/vmtouch.8 + install -Dm 0755 vmtouch $(DESTDIR)$(BINDIR)/vmtouch + install -Dm 0644 vmtouch.8 $(DESTDIR)$(MANDIR)/vmtouch.8 clean: rm -f vmtouch vmtouch.8 uninstall: - rm $(BINDIR)/vmtouch $(MANDIR)/vmtouch.8 + rm $(DESTDIR)$(BINDIR)/vmtouch $(DESTDIR)$(MANDIR)/vmtouch.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/README.md new/vmtouch-1.3.1/README.md --- old/vmtouch-1.3.0/README.md 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/README.md 2018-11-16 15:40:02.000000000 +0100 @@ -1,5 +1,8 @@ # vmtouch - the Virtual Memory Toucher +[](https://travis-ci.org/hoytech/vmtouch) + + ## Portable file system cache diagnostics and control @@ -34,4 +37,4 @@ ### Authors -vmtouch is copyright (c) 2009-2016 Doug Hoyte and contributors. +vmtouch is copyright (c) 2009-2017 Doug Hoyte and contributors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/TUNING.md new/vmtouch-1.3.1/TUNING.md --- old/vmtouch-1.3.0/TUNING.md 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/TUNING.md 2018-11-16 15:40:02.000000000 +0100 @@ -32,3 +32,21 @@ system 16.0EB max deny - Also, there is the PRIV_PROC_LOCK_MEMORY privilege which controls whether given process can lock memory. + + + +## Network filesystems + +### NFS + +NFS appears to function as a normal filesystem from `vmtouch`'s perspective. The only issue is that crawls of large directories can take a long time. + +### S3FS + +On linux, S3FS is a FUSE-based filesystem driver that mounts your Amazon S3 buckets. When caching files it doesn't use the normal page cache for these files, but instead maintains a cache directory where the cached files and portions of files reside. `vmtouch` can be meaningfully used on these files in the cache directory, but not in the mount itself. + +By default the cache directory is `$HOME/.fuse-s3fs-cache/` but this can be changed with the `cachedir` mount option is used. Also see the `preserve_cache` option if you wish the cache to persist between mountings. + +### 9P + +The 9P filesystem driver 9P2000 on linux doesn't by default use the filesystem cache. However, there is a mount option `fscache` which enables this. See github issue [#56](https://github.com/hoytech/vmtouch/issues/56). After this is enabled, `vmtouch` should work as normal. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/debian/changelog new/vmtouch-1.3.1/debian/changelog --- old/vmtouch-1.3.0/debian/changelog 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/debian/changelog 2018-11-16 15:40:02.000000000 +0100 @@ -1,3 +1,21 @@ +vmtouch (1.3.0ubuntu3) xenial; urgency=medium + + * Oops put back dep + + -- Doug Hoyte <[email protected]> Sun, 16 Apr 2017 18:51:02 -0400 + +vmtouch (1.3.0ubuntu2) xenial; urgency=medium + + * Remove debhelper dep + + -- Doug Hoyte <[email protected]> Sun, 16 Apr 2017 18:40:23 -0400 + +vmtouch (1.3.0ubuntu1) xenial; urgency=medium + + * Trying ubuntu PPA release + + -- Doug Hoyte <[email protected]> Sun, 16 Apr 2017 18:31:15 -0400 + vmtouch (1.3.0) unstable; urgency=medium [ doug ] @@ -177,7 +195,7 @@ [ doug ] * releasing 1.3.0 - -- doug <doug@mercury.(none)> Thu, 16 Mar 2017 11:30:27 -0400 + -- Doug Hoyte <[email protected]> Thu, 16 Mar 2017 11:30:27 -0400 vmtouch (0.7.3) unstable; urgency=low diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/debian/control new/vmtouch-1.3.1/debian/control --- old/vmtouch-1.3.0/debian/control 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/debian/control 2018-11-16 15:40:02.000000000 +0100 @@ -1,9 +1,9 @@ Source: vmtouch Section: admin Priority: optional -Maintainer: Doug Hoyte <[email protected]> -Uploaders: Antoine Beaupré <[email protected]> -Build-Depends: debhelper (>= 10~) +Maintainer: Doug Hoyte <[email protected]> +Uploaders: Doug Hoyte <[email protected]> +Build-Depends: debhelper (>= 9) Standards-Version: 3.9.8 Homepage: https://hoytech.com/vmtouch/ Vcs-Git: git://github.com/hoytech/vmtouch.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/debian/copyright new/vmtouch-1.3.1/debian/copyright --- old/vmtouch-1.3.0/debian/copyright 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/debian/copyright 2018-11-16 15:40:02.000000000 +0100 @@ -5,7 +5,7 @@ Files: * Copyright: 2012 Doug Hoyte <[email protected]> License: BSD-3-clause - Copyright (c) 2009-2016 Doug Hoyte and contributors. All rights reserved. + Copyright (c) 2009-2017 Doug Hoyte and contributors. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/snap/snapcraft.yaml new/vmtouch-1.3.1/snap/snapcraft.yaml --- old/vmtouch-1.3.0/snap/snapcraft.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/vmtouch-1.3.1/snap/snapcraft.yaml 2018-11-16 15:40:02.000000000 +0100 @@ -0,0 +1,20 @@ +name: vmtouch +version: git +summary: Portable file system cache diagnostics and control +description: | + vmtouch is a tool for learning about and controlling the file system cache of + unix and unix-like systems. It is BSD licensed so you can basically do + whatever you want with it.. + +grade: stable +confinement: classic + +apps: + vmtouch: + command: usr/local/bin/vmtouch + +parts: + vmtouch: + plugin: make + source: https://github.com/hoytech/vmtouch.git + source-type: git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/vmtouch.c new/vmtouch-1.3.1/vmtouch.c --- old/vmtouch-1.3.0/vmtouch.c 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/vmtouch.c 2018-11-16 15:40:02.000000000 +0100 @@ -10,7 +10,7 @@ ************************************************************************ -Copyright (c) 2009-2016 Doug Hoyte and contributors. All rights reserved. +Copyright (c) 2009-2017 Doug Hoyte and contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -37,7 +37,7 @@ ***********************************************************************/ -#define VMTOUCH_VERSION "1.3.0" +#define VMTOUCH_VERSION "1.3.1" #define RESIDENCY_CHART_WIDTH 60 #define CHART_UPDATE_INTERVAL 0.1 #define MAX_CRAWL_DEPTH 1024 @@ -69,6 +69,7 @@ #include <stdarg.h> #include <stdint.h> #include <time.h> +#include <signal.h> #include <sys/select.h> #include <sys/types.h> #include <sys/stat.h> @@ -136,6 +137,7 @@ size_t o_max_file_size=SIZE_MAX; int o_wait=0; static char *o_batch = NULL; +static char *o_pidfile = NULL; int o_0_delim = 0; @@ -177,6 +179,7 @@ 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(" -P <pidfile> write a pidfile (only useful together with -l or -L)\n"); printf(" -v verbose\n"); printf(" -q quiet\n"); exit(1); @@ -660,7 +663,7 @@ int is_ignored(const char* path) { char *path_copy; - int match; + int match, i; if (!number_of_ignores) return 0; @@ -669,7 +672,7 @@ char *filename = basename(path_copy); - for (int i = 0; i < number_of_ignores; i++) { + for (i = 0; i < number_of_ignores; i++) { if (fnmatch(ignore_list[i], filename, 0) == 0) { match = 1; break; @@ -683,7 +686,7 @@ int is_filename_filtered(const char* path) { char *path_copy; - int match; + int match, i; if (!number_of_filename_filters) return 1; @@ -692,7 +695,7 @@ char *filename = basename(path_copy); - for (int i = 0; i < number_of_filename_filters; i++) { + for (i = 0; i < number_of_filename_filters; i++) { if (fnmatch(filename_filter_list[i], filename, 0) == 0) { match = 1; break; @@ -858,7 +861,48 @@ fclose(f); } +static void remove_pidfile() { + int res = 0; + res = unlink(o_pidfile); + if (res < 0 && errno != ENOENT) { + warning("unable to remove pidfile %s (%s)", o_pidfile, strerror(errno)); + } +} + +static void write_pidfile() { + FILE *f = NULL; + size_t wrote = 0; + + f = fopen(o_pidfile, "w"); + if (!f) { + warning("unable to open pidfile %s (%s), skipping", o_pidfile, strerror(errno)); + return; + } + + wrote = fprintf(f, "%d\n", getpid()); + + fclose(f); + + if (wrote < 0) { + warning("unable to write to pidfile %s (%s), deleting it", o_pidfile, strerror(errno)); + remove_pidfile(); + } +} + +static void signal_handler_clear_pidfile(int signal_num) { + remove_pidfile(); +} + +static void register_signals_for_pidfile() { + struct sigaction sa = {0}; + sa.sa_handler = signal_handler_clear_pidfile; + if (sigaction(SIGINT, &sa, NULL) < 0 || + sigaction(SIGTERM, &sa, NULL) < 0 || + sigaction(SIGQUIT, &sa, NULL) < 0) { + warning("unable to register signals for pidfile (%s), skipping", strerror(errno)); + } +} @@ -876,7 +920,7 @@ pagesize = sysconf(_SC_PAGESIZE); - while((ch = getopt(argc, argv,"tevqlLdfFh0i:I:p:b:m:w")) != -1) { + while((ch = getopt(argc, argv, "tevqlLdfFh0i:I:p:b:m:P:w")) != -1) { switch(ch) { case '?': usage(); break; case 't': o_touch = 1; break; @@ -903,6 +947,7 @@ case 'w': o_wait = 1; break; case 'b': o_batch = optarg; break; case '0': o_0_delim = 1; break; + case 'P': o_pidfile = optarg; break; } } @@ -931,6 +976,8 @@ if (o_quiet && o_verbose) fatal("invalid option combination: -q and -v"); + if (o_pidfile && (!o_lock && !o_lockall)) fatal("pidfile can only be created when -l or -L is specified"); + if (!argc && !o_batch) { printf("%s: no files or directories specified\n", prog); usage(); @@ -955,6 +1002,11 @@ fatal("unable to mlockall (%s)", strerror(errno)); } + if (o_pidfile) { + register_signals_for_pidfile(); + write_pidfile(); + } + if (!o_quiet) printf("LOCKED %" PRId64 " pages (%s)\n", total_pages, pretty_print_size(total_pages*pagesize)); if (o_wait) reopen_all(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmtouch-1.3.0/vmtouch.pod new/vmtouch-1.3.1/vmtouch.pod --- old/vmtouch-1.3.0/vmtouch.pod 2017-03-16 16:32:35.000000000 +0100 +++ new/vmtouch-1.3.1/vmtouch.pod 2018-11-16 15:40:02.000000000 +0100 @@ -60,6 +60,10 @@ Follow symbolic links. With this option, vmtouch will descend into symbolic links that point to directories and will touch regular files pointed to by symbolic links. Symbolic link loops are detected and issue warnings. +=item -F + +During the crawl, don't recurse into directories that have separate filesystems mounted on them. This is handy to avoid accidentally touching other filesystems that have been mounted underneath your target directory. + =item -i <pattern> Can be specified multiple times. Ignores files and directories that match any of the provided patterns. The pattern may include wildcards (remember to escape them from your shell). This option stops the crawl, so can be used to ignore directories and all their contents. Example: vmtouch -i .git -i '*.bak' . @@ -76,6 +80,10 @@ 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 -P <pidfile> + +Create a PID file. This option can only be provided in combination with -l or -L. The PID file will be automatically deleted when vmtouch gets a termination signal (SIGINT, SIGTERM, SIGQUIT). + =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.
