[-]
[+]
|
Changed |
lsyncd.changes
|
|
[-]
[+]
|
Changed |
lsyncd.spec
^
|
|
[-]
[+]
|
Deleted |
lsyncd-2.0.6.tar.bz2/doc/lsyncd.1.xml
^
|
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<?asciidoc-toc?>
-<?asciidoc-numbered?>
-<refentry lang="en">
-<refentryinfo>
- <title>lsyncd(1)</title>
- <date>August 2011</date>
-<revhistory><revision><date>August 2011</date></revision></revhistory>
-</refentryinfo>
-<refmeta>
-<refentrytitle>lsyncd</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class="source">Lsyncd</refmiscinfo>
-<refmiscinfo class="manual">Lsyncd</refmiscinfo>
-<refmiscinfo class="version">2.0.6</refmiscinfo>
-</refmeta>
-<refnamediv>
- <refname>lsyncd</refname>
- <refpurpose>a daemon to continuously synchronize directory trees</refpurpose>
-</refnamediv>
-<refsynopsisdiv id="_synopsis">
-<variablelist>
-<varlistentry>
-<term>
-config file
-</term>
-<listitem>
-<simpara>
-  *lsyncd* [<emphasis>OPTIONS</emphasis>] <emphasis>CONFIG-FILE</emphasis>
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-default rsync behaviour
-</term>
-<listitem>
-<simpara>
-  *lsyncd* [<emphasis>OPTIONS</emphasis>] -rsync <emphasis>SOURCEDIR</emphasis> <emphasis>TARGET</emphasis> …
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-default rync+ssh bevahiour (moves and deletes through ssh)
-</term>
-<listitem>
-<simpara>
-  *lsyncd* [<emphasis>OPTIONS</emphasis>] -rsyncssh <emphasis>SOURCEDIR</emphasis> <emphasis>TARGETHOST</emphasis> <emphasis>TARGETDIR</emphasis> …
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-default direct bevahiour (local file operations/rsync)
-</term>
-<listitem>
-<simpara>
-  *lsyncd* [<emphasis>OPTIONS</emphasis>] -direct <emphasis>SOURCEDIR</emphasis> <emphasis>TARGETDIR</emphasis> …
-</simpara>
-</listitem>
-</varlistentry>
-</variablelist>
-</refsynopsisdiv>
-<refsect1 id="_description">
-<title>DESCRIPTION</title>
-<simpara>Lsyncd(1) watches local directory trees through an event monitor interface
-(inotify, fsevents). It aggregates and combines events for a few seconds and
-then spawns one or more processes to synchronize the changes. By default this
-is rsync(1). Lsyncd is thus a light-weight asynchronous live mirror solution
-that is comparatively easy to install not requiring new filesystems or
-blockdevices and does not hamper local filesystem performance.</simpara>
-<simpara>Rsync+ssh is an advanced action configuration that uses a SSH(1) to act file
-and directory moves directly on the target instead of retransmitting the move
-destination over the wire.</simpara>
-<simpara>Fine-grained customization can be achieved through the CONFIG-FILE. Custom
-action configs can even be written from scratch in cascading layers ranging
-from shell scripts to code written in the LUA(1) language. This way simplicity
-can be balanced with powerfulness. See the online manual for details on the
-CONFIG-FILE <ulink url="http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual">http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual</ulink></simpara>
-<simpara>Note that under normal configuration Lsyncd will delete pre-existing files in
-the target directories that are not present in the respective source directory.</simpara>
-</refsect1>
-<refsect1 id="_options">
-<title>OPTIONS</title>
-<variablelist>
-<varlistentry>
-<term>
-<emphasis role="strong">-delay</emphasis> <emphasis>SECS</emphasis>
-</term>
-<listitem>
-<simpara>
- Overrides the default delay times.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-help</emphasis>
-</term>
-<listitem>
-<simpara>
- Show a help message.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-insist</emphasis>
-</term>
-<listitem>
-<simpara>
- Continues startup even if a startup rsync cannot connect.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-log</emphasis> <emphasis>LEVEL</emphasis>
-</term>
-<listitem>
-<simpara>
- Controls which kind of events are logged. By default Lsyncd logs <emphasis>Normal</emphasis>
- and <emphasis>Error</emphasis> Messages. <emphasis role="strong">-log scarce</emphasis> will make Lsyncd log Error messages
- only. <emphasis role="strong">-log all</emphasis> will log all debug messages.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-log</emphasis> <emphasis>Category</emphasis>
-</term>
-<listitem>
-<simpara>
- Turns on a specific debug message. E.g. <emphasis role="strong">-log Exec</emphasis> will log
- all processes as they are spawned.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-nodaemon</emphasis>
-</term>
-<listitem>
-<simpara>
- Lsyncd will not detach from the invoker and log as well to stdout/err.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-pidfile</emphasis> <emphasis>FILE</emphasis>
-</term>
-<listitem>
-<simpara>
- Lsyncd will write its process ID in <emphasis>FILE</emphasis>.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-runner</emphasis> <emphasis>FILE</emphasis>
-</term>
-<listitem>
-<simpara>
- Makes the Lsyncd core load the part of Lsyncd written in Lua from <emphasis>FILE</emphasis>.
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-version</emphasis>
-</term>
-<listitem>
-<simpara>
- Writes version information and exits.
-</simpara>
-</listitem>
-</varlistentry>
-</variablelist>
-</refsect1>
-<refsect1 id="_exit_status">
-<title>EXIT STATUS</title>
-<variablelist>
-<varlistentry>
-<term>
-<emphasis role="strong">0</emphasis>
-</term>
-<listitem>
-<simpara>
- Terminated on a TERM signal(7)
-</simpara>
-</listitem>
-</varlistentry>
-<varlistentry>
-<term>
-<emphasis role="strong">-1</emphasis>
-</term>
-<listitem>
-<simpara>
- Failure (syntax, unrecoverable error condition, internal failure)
-</simpara>
-</listitem>
-</varlistentry>
-</variablelist>
-</refsect1>
-<refsect1 id="_see_also">
-<title>SEE ALSO</title>
-<simpara>Online Manual: <ulink url="http://code.google.com/p/lsyncd/wiki/Lsyncd2">http://code.google.com/p/lsyncd/wiki/Lsyncd2</ulink></simpara>
-</refsect1>
-<refsect1 id="_version">
-<title>VERSION</title>
-<simpara>This man page is for lsyncd(1) version 2.0.5</simpara>
-</refsect1>
-<refsect1 id="_author">
-<title>AUTHOR</title>
-<simpara>Axel Kittenberger, <<ulink url="mailto:axkibe@gmail.com">axkibe@gmail.com</ulink>> 2010-2011</simpara>
-</refsect1>
-<refsect1 id="_copying">
-<title>COPYING</title>
-<simpara>Copyright (C) 2010-2011 Axel Kittenberger. Free use of this software is granted
-under the terms of the GNU General Public License (GPL) version 2, or any later
-version. Free redistrubition of this Documentation (/doc directory) is granted
-under the terms of the Creative Commons 3.0 Attribution License (CC-3.0-BY).</simpara>
-</refsect1>
-</refentry>
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/ChangeLog
^
|
@@ -1,4 +1,14 @@
-156-02-2011: 2.0.6
+??-??-????:
+ fix: closed a memory leak due to not correct configured weak tables
+ fix: default.direct, do not use on OSX unrecognized option -t on modify
+ fix: default.direct, typo leading to compile error
+ fix: when using settings.inotifyMode = "Modify" events were longer ignored
+ fix: layer 3 function generator was messed up.
+ change: now uses a2x to generate the manpage (thus more compatible across distros)
+ change: removed --with-default-runner since it was broken, and will be replaced by something
+ more generic in future
+
+16-02-2011: 2.0.6
fix: no longer stops syslogging on HUP signals
fix: OSX event watcher no longer misses moves into and out of the watch tree
fix: not refinding a relative path to the config file in case of HUP.
@@ -24,7 +34,7 @@
change: Beautified the code, no extra spaces at line end, ' instead of ",
supposing 100 char width to view,
change: Lsyncd now remembers the absolute path of its config file during HUPs
- enhancement: Defaults not respect a 'delete=false' flag when set as parameter to sync{}
+ enhancement: Defaults now respect a 'delete=false' flag when set as parameter to sync{}
default.rsync: does not add --delete to rsync
default.rsyncssh: does not add --delete to rsync, and does not use rm via ssh tunnel
default.direct: does not add --delete to startup rsync and does not use rm
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/Makefile.am
^
|
@@ -31,27 +31,19 @@
tests/l4rsyncdata.lua
dist_man1_MANS = doc/lsyncd.1
-EXTRA_DIST = doc/lsyncd.1.txt doc/lsyncd.1.xml inotify.c fsevents.c bin2carray.lua \
+EXTRA_DIST = doc/lsyncd.1.txt inotify.c fsevents.c bin2carray.lua \
default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
-doc/lsyncd.1: doc/lsyncd.1.xml
- xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
-
-doc/lsyncd.1.xml: doc/lsyncd.1.txt
- asciidoc -o $@ -b docbook -d manpage $<
+doc/lsyncd.1: doc/lsyncd.1.txt
+ a2x --format=manpage $<
CLEANFILES = runner.out defaults.out runner.c defaults.c
-if RUNNER
-# installs the runner script
-runnerdir = $(RUNNER_DIR)
-runner_DATA = lsyncd.lua
-else
-# or compiles it into the binary
+# compiles the runner and the defaults into the binary
lsyncd_LDADD += runner.o defaults.o
runner.o: runner.c
-default.o: default.c
+defaults.o: defaults.c
runner.c: runner.out bin2carray.lua
lua ./bin2carray.lua $< runner $@
@@ -65,5 +57,3 @@
defaults.out: default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
luac -o $@ $^
-endif
-
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/Makefile.in
^
|
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.2 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -36,8 +36,6 @@
bin_PROGRAMS = lsyncd$(EXEEXT)
@INOTIFY_TRUE@am__append_1 = inotify.c
@FSEVENTS_TRUE@am__append_2 = fsevents.c
-# or compiles it into the binary
-@RUNNER_FALSE@am__append_3 = runner.o defaults.o
subdir = .
DIST_COMMON = $(am__configure_deps) $(dist_example_DATA) \
$(dist_man1_MANS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
@@ -54,7 +52,7 @@
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(runnerdir)"
+ "$(DESTDIR)$(exampledir)"
PROGRAMS = $(bin_PROGRAMS)
am__lsyncd_SOURCES_DIST = lsyncd.h lsyncd.c lsyncd.lua \
default-rsync.lua inotify.c fsevents.c
@@ -63,7 +61,7 @@
am_lsyncd_OBJECTS = lsyncd.$(OBJEXT) $(am__objects_1) $(am__objects_2)
lsyncd_OBJECTS = $(am_lsyncd_OBJECTS)
am__DEPENDENCIES_1 =
-lsyncd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__append_3)
+lsyncd_DEPENDENCIES = $(am__DEPENDENCIES_1) runner.o defaults.o
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -104,7 +102,7 @@
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(dist_man1_MANS)
-DATA = $(dist_example_DATA) $(runner_DATA)
+DATA = $(dist_example_DATA)
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
@@ -113,9 +111,11 @@
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
@@ -167,7 +167,6 @@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RUNNER_DIR = @RUNNER_DIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -217,7 +216,9 @@
AUTOMAKE_OPTIONS = foreign
lsyncd_SOURCES = lsyncd.h lsyncd.c lsyncd.lua default-rsync.lua \
$(am__append_1) $(am__append_2)
-lsyncd_LDADD = $(LUA_LIBS) $(am__append_3)
+
+# compiles the runner and the defaults into the binary
+lsyncd_LDADD = $(LUA_LIBS) runner.o defaults.o
exampledir = $(docdir)/
dist_example_DATA = \
examples/lbash.lua \
@@ -238,14 +239,10 @@
tests/l4rsyncdata.lua
dist_man1_MANS = doc/lsyncd.1
-EXTRA_DIST = doc/lsyncd.1.txt doc/lsyncd.1.xml inotify.c fsevents.c bin2carray.lua \
+EXTRA_DIST = doc/lsyncd.1.txt inotify.c fsevents.c bin2carray.lua \
default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
CLEANFILES = runner.out defaults.out runner.c defaults.c
-
-# installs the runner script
-@RUNNER_TRUE@runnerdir = $(RUNNER_DIR)
-@RUNNER_TRUE@runner_DATA = lsyncd.lua
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -337,7 +334,7 @@
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-lsyncd$(EXEEXT): $(lsyncd_OBJECTS) $(lsyncd_DEPENDENCIES)
+lsyncd$(EXEEXT): $(lsyncd_OBJECTS) $(lsyncd_DEPENDENCIES) $(EXTRA_lsyncd_DEPENDENCIES)
@rm -f lsyncd$(EXEEXT)
$(LINK) $(lsyncd_OBJECTS) $(lsyncd_LDADD) $(LIBS)
@@ -414,24 +411,6 @@
@list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
-install-runnerDATA: $(runner_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(runnerdir)" || $(MKDIR_P) "$(DESTDIR)$(runnerdir)"
- @list='$(runner_DATA)'; test -n "$(runnerdir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(runnerdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(runnerdir)" || exit $$?; \
- done
-
-uninstall-runnerDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(runner_DATA)'; test -n "$(runnerdir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(runnerdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -638,6 +617,10 @@
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__remove_distdir)
+
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
@@ -674,6 +657,8 @@
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -752,7 +737,7 @@
check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(runnerdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(exampledir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -809,8 +794,7 @@
info-am:
-install-data-am: install-dist_exampleDATA install-man \
- install-runnerDATA
+install-data-am: install-dist_exampleDATA install-man
install-dvi: install-dvi-am
@@ -858,7 +842,7 @@
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-dist_exampleDATA \
- uninstall-man uninstall-runnerDATA
+ uninstall-man
uninstall-man: uninstall-man1
@@ -866,8 +850,8 @@
.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
clean clean-binPROGRAMS clean-generic ctags dist dist-all \
- dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-compile \
+ dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-binPROGRAMS install-data \
@@ -875,34 +859,30 @@
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-runnerDATA install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-dist_exampleDATA \
- uninstall-man uninstall-man1 uninstall-runnerDATA
-
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-dist_exampleDATA uninstall-man uninstall-man1
-doc/lsyncd.1: doc/lsyncd.1.xml
- xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<
-doc/lsyncd.1.xml: doc/lsyncd.1.txt
- asciidoc -o $@ -b docbook -d manpage $<
+doc/lsyncd.1: doc/lsyncd.1.txt
+ a2x --format=manpage $<
-@RUNNER_FALSE@runner.o: runner.c
-@RUNNER_FALSE@default.o: default.c
+runner.o: runner.c
+defaults.o: defaults.c
-@RUNNER_FALSE@runner.c: runner.out bin2carray.lua
-@RUNNER_FALSE@ lua ./bin2carray.lua $< runner $@
+runner.c: runner.out bin2carray.lua
+ lua ./bin2carray.lua $< runner $@
-@RUNNER_FALSE@defaults.c: defaults.out bin2carray.lua
-@RUNNER_FALSE@ lua ./bin2carray.lua $< defaults $@
+defaults.c: defaults.out bin2carray.lua
+ lua ./bin2carray.lua $< defaults $@
-@RUNNER_FALSE@runner.out: lsyncd.lua
-@RUNNER_FALSE@ luac -o $@ $<
+runner.out: lsyncd.lua
+ luac -o $@ $<
-@RUNNER_FALSE@defaults.out: default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
-@RUNNER_FALSE@ luac -o $@ $^
+defaults.out: default.lua default-rsync.lua default-rsyncssh.lua default-direct.lua
+ luac -o $@ $^
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/aclocal.m4
^
|
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -198,7 +198,7 @@
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.2], [],
+m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -214,7 +214,7 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.2])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -1034,7 +1034,7 @@
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1056,10 +1056,11 @@
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/config.h.in
^
|
@@ -31,9 +31,6 @@
#undef HAVE_UNISTD_H
/* "descr" */
-#undef LSYNCD_DEFAULT_RUNNER_FILE
-
-/* "descr" */
#undef LSYNCD_WITH_FSEVENTS
/* "descr" */
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for lsyncd 2.0.6.
+# Generated by GNU Autoconf 2.68 for lsyncd 2.0.7.
#
# Report bugs to <axkibe@gmail.com>.
#
@@ -560,8 +560,8 @@
# Identity of this package.
PACKAGE_NAME='lsyncd'
PACKAGE_TARNAME='lsyncd'
-PACKAGE_VERSION='2.0.6'
-PACKAGE_STRING='lsyncd 2.0.6'
+PACKAGE_VERSION='2.0.7'
+PACKAGE_STRING='lsyncd 2.0.7'
PACKAGE_BUGREPORT='axkibe@gmail.com'
PACKAGE_URL=''
@@ -610,9 +610,6 @@
FSEVENTS_TRUE
INOTIFY_FALSE
INOTIFY_TRUE
-RUNNER_FALSE
-RUNNER_TRUE
-RUNNER_DIR
EGREP
GREP
CPP
@@ -703,7 +700,6 @@
ac_user_opts='
enable_option_checking
enable_dependency_tracking
-with_runner
with_inotify
with_fsevents
'
@@ -1263,7 +1259,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures lsyncd 2.0.6 to adapt to many kinds of systems.
+\`configure' configures lsyncd 2.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1329,7 +1325,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lsyncd 2.0.6:";;
+ short | recursive ) echo "Configuration of lsyncd 2.0.7:";;
esac
cat <<\_ACEOF
@@ -1343,8 +1339,6 @@
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-runner=<dir> Specify directory where lsyncds part written in Lua will be placed.
- If missing it will be compiled into the binary
--without-inotify Do not use Linux inotify event interface. On by default.
--with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL!
Off by default.
@@ -1432,7 +1426,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-lsyncd configure 2.0.6
+lsyncd configure 2.0.7
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1688,7 +1682,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lsyncd $as_me 2.0.6, which was
+It was created by lsyncd $as_me 2.0.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2506,7 +2500,7 @@
# Define the identity of the package.
PACKAGE=lsyncd
- VERSION=2.0.6
+ VERSION=2.0.7
cat >>confdefs.h <<_ACEOF
@@ -2536,11 +2530,11 @@
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -5337,36 +5331,6 @@
###
-# --with-runner option
-
-# Check whether --with-runner was given.
-if test "${with_runner+set}" = set; then :
- withval=$with_runner;
-fi
-
-if test "x${with_runner}" != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define LSYNCD_DEFAULT_RUNNER_FILE "${with_runner}/lsyncd.lua"
-_ACEOF
-
- RUNNER_DIR="${with_runner}"
-
-fi
- if test x${with_runner} != x; then
- RUNNER_TRUE=
- RUNNER_FALSE='#'
-else
- RUNNER_TRUE='#'
- RUNNER_FALSE=
-fi
-
-
-## NOTE:
-## With this release Lsyncd can yet only do with inotify.
-## enabling fsevents and disabling inotify is thus commented out.
-
-###
# --without-inotify option
# Check whether --with-inotify was given.
@@ -5546,10 +5510,6 @@
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${RUNNER_TRUE}" && test -z "${RUNNER_FALSE}"; then
- as_fn_error $? "conditional \"RUNNER\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${INOTIFY_TRUE}" && test -z "${INOTIFY_FALSE}"; then
as_fn_error $? "conditional \"INOTIFY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -5967,7 +5927,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by lsyncd $as_me 2.0.6, which was
+This file was extended by lsyncd $as_me 2.0.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6033,7 +5993,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-lsyncd config.status 2.0.6
+lsyncd config.status 2.0.7
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/configure.ac
^
|
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#AC_PREREQ(2.60)
-AC_INIT(lsyncd, 2.0.6, axkibe@gmail.com)
+AC_INIT(lsyncd, 2.0.7, axkibe@gmail.com)
AC_CONFIG_SRCDIR([lsyncd.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
@@ -25,21 +25,6 @@
AC_CHECK_HEADERS([sys/inotify.h])
###
-# --with-runner option
-AC_ARG_WITH([runner],
-[ --with-runner=<dir> Specify directory where lsyncds part written in Lua will be placed.
- If missing it will be compiled into the binary])
-if test "x${with_runner}" != x; then
- AC_DEFINE_UNQUOTED(LSYNCD_DEFAULT_RUNNER_FILE, "${with_runner}/lsyncd.lua", "descr")
- AC_SUBST(RUNNER_DIR, "${with_runner}")
-fi
-AM_CONDITIONAL([RUNNER], [test x${with_runner} != x])
-
-## NOTE:
-## With this release Lsyncd can yet only do with inotify.
-## enabling fsevents and disabling inotify is thus commented out.
-
-###
# --without-inotify option
AC_ARG_WITH([inotify],
[ --without-inotify Do not use Linux inotify event interface. On by default.],
@@ -53,7 +38,7 @@
AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno])
###
-# --with-fsevents
+# --with-fsevents
# disabled per default, experimental, works only with OS X 10.5/10.6
AC_ARG_WITH([fsevents],
[ --with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL!
@@ -62,7 +47,7 @@
echo "compiling with fsevents. WARNING experimental!"
AC_DEFINE(LSYNCD_WITH_FSEVENTS,,"descr")
fi
-AM_CONDITIONAL([FSEVENTS],
+AM_CONDITIONAL([FSEVENTS],
[test x${with_fsevents} != x -a xno${with_fsevents} != xno])
# Checks for typedefs, structures, and compiler characteristics.
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/default-direct.lua
^
|
@@ -38,11 +38,11 @@
event.targetPath
)
else
+ -- 'cp -t', not supported on OSX
spawn(
event,
'/bin/cp',
event.sourcePath,
- -- '-t', not supported on OSX
event.targetPathdir
)
end
@@ -52,9 +52,8 @@
end
spawn(event,
'/bin/cp',
- '-t',
- event.targetPathdir,
- event.sourcePath
+ event.sourcePath,
+ event.targetPathdir
)
elseif event.etype == 'Delete' then
if not config.delete then
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/inotify.c
^
|
@@ -225,8 +225,9 @@
} else if (IN_ATTRIB & event->mask) {
// just attrib change
event_type = ATTRIB;
- } else if (IN_CLOSE_WRITE & event->mask) {
- // closed after written something
+ } else if ((IN_CLOSE_WRITE | IN_MODIFY) & event->mask) {
+ // modify, or closed after written something
+ // the event type received depends settings.inotifyMode
event_type = MODIFY;
} else if (IN_CREATE & event->mask) {
// a new file
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/lsyncd.c
^
|
@@ -47,10 +47,8 @@
/**
* The Lua part of lsyncd if compiled into the binary.
*/
-#ifndef LSYNCD_DEFAULT_RUNNER_FILE
- extern const char runner_out[];
- extern size_t runner_size;
-#endif
+extern const char runner_out[];
+extern size_t runner_size;
extern const char defaults_out[];
extern size_t defaults_size;
@@ -1502,6 +1500,10 @@
clock_t now = times(dummy_tms);
clock_t alarm_time = 0;
+ // memory usage debugging
+ // lua_gc(L, LUA_GCCOLLECT, 0);
+ // printf("gccount: %d\n", lua_gc(L, LUA_GCCOUNT, 0) * 1024 + lua_gc(L, LUA_GCCOUNTB, 0));
+
// queries runner about soonest alarm
load_runner_func(L, "getAlarm");
if (lua_pcall(L, 0, 1, -2)) exit(-1); // ERRNO
@@ -1725,21 +1727,13 @@
if (argp < argc && !strcmp(argv[argp], "--runner")) {
if (argp + 1 >= argc) {
logstring("Error", "Lsyncd Lua-runner file missing after --runner.");
-#ifdef LSYNCD_DEFAULT_RUNNER_FILE
- printlogf(L, "Error",
- "Using '%s' as default location for runner.", LSYNCD_DEFAULT_RUNNER_FILE);
-#else
logstring("Error", "Using a statically included runner as default.");
-#endif
exit(-1); //ERRNO
}
lsyncd_runner_file = argv[argp + 1];
argp += 2;
- } else {
-#ifdef LSYNCD_DEFAULT_RUNNER_FILE
- lsyncd_runner_file = LSYNCD_DEFAULT_RUNNER_FILE;
-#endif
}
+
if (lsyncd_runner_file) {
// checks if the runner file exists
struct stat st;
@@ -1757,17 +1751,11 @@
exit(-1); // ERRNO
}
} else {
-#ifndef LSYNCD_DEFAULT_RUNNER_FILE
// loads the runner from binary
if (luaL_loadbuffer(L, runner_out, runner_size, "runner")) {
printlogf(L, "Error", "loading precompiled runner: %s", lua_tostring(L, -1));
exit(-1); // ERRNO
}
-#else
- // safeguard for what never ever should happen.
- logstring("Error", "Internal fail: lsyncd_runner is NULL with non-static runner");
- exit(-1); // ERRNO
-#endif
}
{
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/lsyncd.lua
^
|
@@ -22,7 +22,7 @@
lsyncd.log('Error', 'You cannot use the lsyncd runner as configuration file!')
lsyncd.terminate(-1) -- ERRNO
end
-lsyncd_version = '2.0.6'
+lsyncd_version = '2.0.7'
-----
-- Hides the core interface from user scripts
@@ -221,7 +221,7 @@
end
-----
- -- Stateless queue iterator.
+ -- Queue iterator (stateless)
--
local function iter(list, pos)
pos = pos + 1
@@ -235,7 +235,8 @@
end
-----
- -- Stateless reverse queue iterator.
+ -- Reverse queue iterator. (stateless)
+ --
local function iterReverse(list, pos)
pos = pos - 1
while list[pos] == nil and pos >= list.first do
@@ -304,13 +305,17 @@
--
-- @params see below
--
- local function new(etype, alarm, path, path2)
+ local function new(etype, sync, alarm, path, path2)
local o = {
-----
-- Type of event.
-- Can be 'Create', 'Modify', 'Attrib', 'Delete' and 'Move'
etype = etype,
+ ------
+ -- Sync this delay belongs to
+ sync = sync,
+
-----
-- Latest point in time this should be catered for.
-- This value is in kernel ticks, return of the C's
@@ -327,7 +332,6 @@
------
-- only not nil for 'Move's.
-- path and file/dirname of a move destination.
- --
path2 = path2,
------
@@ -339,7 +343,6 @@
-- visible as all references should be droped on
-- collection, nevertheless seperat status for
-- insurrance.
- --
status = 'wait',
-----
@@ -519,14 +522,25 @@
-- Creates inlets for syncs: the user interface for events.
--
local InletFactory = (function()
- -- table to receive the delay of an event.
- -- or the delay list of an event list.
+ -----
+ -- table to receive the delay of an event
+ -- or the delay list of an event list.
+ --
+ -- Keys are events and values are delays.
local e2d = {}
- -- table to receive the sync of an event or event list
- local e2s = {}
- -- dont stop the garbage collector to remove entries.
- setmetatable(e2d, { __mode = 'k' })
- setmetatable(e2s, { __mode = 'k' })
+
+ -----
+ -- table to ensure the uniqueness of every event
+ -- related to a delay.
+ --
+ -- Keys are delay and values are events.
+ local e2d2 = {}
+
+ -----
+ -- allows the garbage collector to remove not refrenced
+ -- events.
+ setmetatable(e2d, { __mode = 'k' })
+ setmetatable(e2d2, { __mode = 'v' })
-----
-- removes the trailing slash from a path
@@ -557,14 +571,14 @@
-- TODO give user a readonly version.
--
config = function(event)
- return e2s[event].config
+ return e2d[event].sync.config
end,
-----
-- Returns the inlet belonging to an event.
--
inlet = function(event)
- return e2s[event].inlet
+ return e2d[event].sync.inlet
end,
-----
@@ -643,7 +657,7 @@
-- All symlinks will have been resolved.
--
source = function(event)
- return e2s[event].source
+ return e2d[event].sync.source
end,
------
@@ -651,7 +665,7 @@
-- Includes a trailing slash for dirs.
--
sourcePath = function(event)
- return e2s[event].source .. getPath(event)
+ return e2d[event].sync.source .. getPath(event)
end,
------
@@ -659,7 +673,7 @@
-- Includes a trailing slash.
--
sourcePathdir = function(event)
- return e2s[event].source ..
+ return e2d[event].sync.source ..
(string.match(getPath(event), '^(.*/)[^/]+/?') or '')
end,
@@ -668,7 +682,7 @@
-- Excludes a trailing slash for dirs.
--
sourcePathname = function(event)
- return e2s[event].source .. cutSlash(getPath(event))
+ return e2d[event].sync.source .. cutSlash(getPath(event))
end,
------
@@ -679,7 +693,7 @@
-- existance of 'target', this is up to the scripts.)
--
target = function(event)
- return e2s[event].config.target
+ return e2d[event].sync.config.target
end,
------
@@ -687,7 +701,7 @@
-- Includes a trailing slash for dirs.
--
targetPath = function(event)
- return e2s[event].config.target .. getPath(event)
+ return e2d[event].sync.config.target .. getPath(event)
end,
------
@@ -695,7 +709,7 @@
-- Includes a trailing slash.
--
targetPathdir = function(event)
- return e2s[event].config.target ..
+ return e2d[event].sync.config.target ..
(string.match(getPath(event), '^(.*/)[^/]+/?') or '')
end,
@@ -704,7 +718,7 @@
-- Excludes a trailing slash for dirs.
--
targetPathname = function(event)
- return e2s[event].config.target ..
+ return e2d[event].sync.config.target ..
cutSlash(getPath(event))
end,
}
@@ -732,7 +746,7 @@
local eventListFuncs = {
-----
-- Returns a list of paths of all events in list.
- --
+ --
-- @param elist -- handle returned by getevents()
-- @param mutator -- if not nil called with (etype, path, path2)
-- returns one or two strings to add.
@@ -769,7 +783,7 @@
__index = function(elist, func)
if func == 'isList' then return true end
- if func == 'config' then return e2s[elist].config end
+ if func == 'config' then return e2d[elist].sync.config end
local f = eventListFuncs[func]
if not f then
@@ -782,62 +796,59 @@
end
}
- ----
+ -----
-- table of all inlets with their syncs
--
local inlets = {}
- -- dont stop the garbage collector to remove entries.
+ -----
+ -- allows the garbage collector to remove entries.
+ -- TODO check memory use
setmetatable(inlets, { __mode = 'v' })
-----
-- Encapsulates a delay into an event for the user script.
--
- local function d2e(sync, delay)
+ local function d2e(delay)
+ -- already created?
+ local eu = e2d2[delay]
+
if delay.etype ~= 'Move' then
- if not delay.event then
- local event = {}
- delay.event = event
- setmetatable(event, eventMeta)
- e2d[event] = delay
- e2s[event] = sync
- end
- return delay.event
+ if eu then return eu end
+
+ local event = {}
+ setmetatable(event, eventMeta)
+ e2d[event] = delay
+ e2d2[delay] = event
+ return event
else
-- moves have 2 events - origin and destination
- if not delay.event then
- local event = {}
- local event2 = {}
- delay.event = event
- delay.event2 = event2
-
- setmetatable(event, eventMeta)
- setmetatable(event2, eventMeta)
- e2d[delay.event] = delay
- e2d[delay.event2] = delay
- e2s[delay.event] = sync
- e2s[delay.event2] = sync
-
- -- move events have a field 'move'
- event.move = 'Fr'
- event2.move = 'To'
- end
- return delay.event, delay.event2
+ if eu then return eu[1], eu[2] end
+
+ local event = { move = 'Fr' }
+ local event2 = { move = 'To' }
+ setmetatable(event, eventMeta)
+ setmetatable(event2, eventMeta)
+ e2d[event] = delay
+ e2d[event2] = delay
+ e2d2[delay] = { event, event2 }
+ -- move events have a field 'move'
+ return event, event2
end
end
-----
-- Encapsulates a delay list into an event list for the user script.
--
- local function dl2el(sync, dlist)
- if not dlist.elist then
- local elist = {}
- dlist.elist = elist
- setmetatable(elist, eventListMeta)
- e2d[elist] = dlist
- e2s[elist] = sync
- end
- return dlist.elist
+ local function dl2el(dlist)
+ local eu = e2d2[dlist]
+ if eu then return eu end
+
+ local elist = {}
+ setmetatable(elist, eventListMeta)
+ e2d[elist] = dlist
+ e2d2[dlist] = elist
+ return elist
end
-----
@@ -877,7 +888,7 @@
-- and is blocked by everything.
--
createBlanketEvent = function(sync)
- return d2e(sync, sync:addBlanketDelay())
+ return d2e(sync:addBlanketDelay())
end,
-----
@@ -898,7 +909,7 @@
-- Gets the next not blocked event from queue.
--
getEvent = function(sync)
- return d2e(sync, sync:getNextDelay(now()))
+ return d2e(sync:getNextDelay(now()))
end,
-----
@@ -908,7 +919,7 @@
--
getEvents = function(sync, test)
local dlist = sync:getDelays(test)
- return dl2el(sync, dlist)
+ return dl2el(dlist)
end,
-----
@@ -953,8 +964,8 @@
-----
-- Returns the sync from an event or list
--
- local function getSync(agent)
- return e2s[agent]
+ local function getSync(event)
+ return e2d[event].sync
end
-----
@@ -1170,7 +1181,7 @@
error('collecting a non-active process')
end
local rc = self.config.collect(
- InletFactory.d2e(self, delay),
+ InletFactory.d2e(delay),
exitcode)
if rc == 'die' then
log('Error', 'Critical exitcode.');
@@ -1193,7 +1204,7 @@
else
log('Delay', 'collected a list')
local rc = self.config.collect(
- InletFactory.dl2el(self, delay),
+ InletFactory.dl2el(delay),
exitcode)
if rc == 'die' then
log('Error', 'Critical exitcode.');
@@ -1247,7 +1258,7 @@
log('Function', 'delay(',self.config.name,', ',etype,', ',path,', ',path2,')')
-- TODO
- local function recurse()
+ local function recurse()
if etype == 'Create' and path:byte(-1) == 47 then
local entries = lsyncd.readdir(self.source .. path)
if entries then
@@ -1307,7 +1318,7 @@
alarm = now()
end
-- new delay
- local nd = Delay.new(etype, alarm, path, path2)
+ local nd = Delay.new(etype, self, alarm, path, path2)
if nd.etype == 'Init' or nd.etype == 'Blanket' then
-- always stack blanket events on the last event
log('Delay', 'Stacking ',nd.etype,' event.')
@@ -1384,7 +1395,7 @@
-- @param test function to test each delay
--
local function getDelays(self, test)
- local dlist = {}
+ local dlist = { sync = self}
local dlistn = 1
local blocks = {}
@@ -1402,7 +1413,7 @@
for i, d in Queue.qpairs(self.delays) do
if d.status == 'active' or
- (test and not test(InletFactory.d2e(self, d)))
+ (test and not test(InletFactory.d2e(d)))
then
getBlocks(d)
elseif not blocks[d] then
@@ -1442,7 +1453,7 @@
if d.etype ~= 'Init' then
self.config.action(self.inlet)
else
- self.config.init(InletFactory.d2e(self, d))
+ self.config.init(InletFactory.d2e(d))
end
if self.processes:size() >= self.config.maxProcesses then
-- no further processes
@@ -1477,7 +1488,7 @@
-- Used as custom marker.
--
local function addBlanketDelay(self)
- local newd = Delay.new('Blanket', true, '')
+ local newd = Delay.new('Blanket', self, true, '')
newd.dpos = Queue.push(self.delays, newd)
return newd
end
@@ -1487,7 +1498,7 @@
-- Used as startup marker to call init asap.
--
local function addInitDelay(self)
- local newd = Delay.new('Init', true, '')
+ local newd = Delay.new('Init', self, true, '')
newd.dpos = Queue.push(self.delays, newd)
return newd
end
@@ -1813,12 +1824,8 @@
--
local function removeWatch(path, core)
local wd = pathwds[path]
- if not wd then
- return
- end
- if core then
- lsyncd.inotify.rmwatch(wd)
- end
+ if not wd then return end
+ if core then lsyncd.inotify.rmwatch(wd) end
wdpaths[wd] = nil
pathwds[path] = nil
end
@@ -1837,18 +1844,17 @@
return
end
- -- lets the core registers watch with the kernel
- local wd = lsyncd.inotify.addwatch(path,
- (settings and settings.inotifyMode) or '');
+ -- registers the watch
+ local inotifyMode = (settings and settings.inotifyMode) or '';
+ local wd = lsyncd.inotify.addwatch(path, inotifyMode);
if wd < 0 then
log('Inotify','Unable to add watch "',path,'"')
return
end
do
- -- If this wd is registered already the kernel
- -- reused it for a new dir for a reason - old
- -- dir is gone.
+ -- If this watch descriptor is registered already
+ -- the kernel reuses it since old dir is gone.
local op = wdpaths[wd]
if op and op ~= path then
pathwds[op] = nil
@@ -1858,16 +1864,10 @@
wdpaths[wd] = path
-- registers and adds watches for all subdirectories
- -- and/or raises create events for all entries
-
local entries = lsyncd.readdir(path)
if not entries then return end
-
for dirname, isdir in pairs(entries) do
- local pd = path .. dirname
- if isdir then pd = pd..'/' end
- -- adds syncs for subdirs
- if isdir then addWatch(pd) end
+ if isdir then addWatch(path .. dirname .. '/') end
end
end
@@ -1878,9 +1878,7 @@
-- rootdir: root dir to watch
--
local function addSync(sync, rootdir)
- if syncRoots[sync] then
- error('duplicate sync in Inotify.addSync()')
- end
+ if syncRoots[sync] then error('duplicate sync in Inotify.addSync()') end
syncRoots[sync] = rootdir
addWatch(rootdir)
end
@@ -1982,7 +1980,7 @@
return {
addSync = addSync,
event = event,
- statusReport = statusReport
+ statusReport = statusReport,
}
end)()
@@ -2284,8 +2282,8 @@
-- TODO do array joining instead
ft = ft..
" log('Normal', 'Event ',event.etype,\n"..
- " ' spawns shell \""..lc.."\"')\n"..
- " spawnShell(event, '"..cmd.."'"
+ " [[ spawns shell \""..lc.."\"]])\n"..
+ " spawnShell(event, [["..cmd.."]]"
for _, v in ipairs(args) do
ft = ft..',\n '..v
end
|
[-]
[+]
|
Changed |
lsyncd-2.0.7.tar.bz2/missing
^
|
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@
# Not GNU programs, they don't have --version.
;;
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
@@ -226,7 +216,7 @@
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
- eval LASTARG="\${$#}"
+ eval LASTARG=\${$#}
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
- eval LASTARG="\${$#}"
+ eval LASTARG=\${$#}
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@
touch $file
;;
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
|