release 2.0.0

This commit is contained in:
Axel Kittenberger 2010-12-02 11:57:04 +00:00
parent ea9e8498e0
commit 1ada503074
6 changed files with 94 additions and 90 deletions

View File

@ -2,16 +2,16 @@ AUTOMAKE_OPTIONS = foreign
CFLAGS += -Wall $(LUA_CFLAGS) CFLAGS += -Wall $(LUA_CFLAGS)
bin_PROGRAMS = lsyncd bin_PROGRAMS = lsyncd
lsyncd_SOURCES = lsyncd.h lsyncd.c lsyncd.lua lsyncd_SOURCES = lsyncd.h lsyncd.c lsyncd.lua
if INOTIFY #if INOTIFY
lsyncd_SOURCES += inotify.c lsyncd_SOURCES += inotify.c
endif #endif
#if FANOTIFY #if FANOTIFY
#lsyncd_SOURCES += fanotify.c #lsyncd_SOURCES += fanotify.c
#endif #endif
if FSEVENTS #if FSEVENTS
lsyncd_SOURCES += fsevents.c #lsyncd_SOURCES += fsevents.c
endif #endif
lsyncd_LDADD = $(LUA_LIBS) lsyncd_LDADD = $(LUA_LIBS)
exampledir = $(datarootdir)/doc/@PACKAGE@ exampledir = $(datarootdir)/doc/@PACKAGE@
@ -24,7 +24,8 @@ dist_example_DATA = \
examples/lrsyncssh.lua examples/lrsyncssh.lua
TESTS = tests/l4-rsync-data.sh TESTS = tests/l4-rsync-data.sh
man1_MANS = doc/lsyncd.1 dist_man1_MANS = doc/lsyncd.1
EXTRA_DIST = doc/lsyncd.1.txt doc/lsyncd.1.xml
doc/lsyncd.1: doc/lsyncd.1.xml doc/lsyncd.1: doc/lsyncd.1.xml
xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $< xsltproc -o $@ -nonet /etc/asciidoc/docbook-xsl/manpage.xsl $<

View File

@ -2,7 +2,7 @@
echo XXXXXXXXX echo XXXXXXXXX
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
#AC_PREREQ(2.60) #AC_PREREQ(2.60)
AC_INIT(lsyncd, 2.0beta3, axkibe@gmail.com) AC_INIT(lsyncd, 2.0.0, axkibe@gmail.com)
AC_CONFIG_SRCDIR([lsyncd.c]) AC_CONFIG_SRCDIR([lsyncd.c])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
@ -37,20 +37,24 @@ if test "x${with_runner}" != x; then
fi fi
AM_CONDITIONAL([RUNNER], [test x${with_runner} != x]) AM_CONDITIONAL([RUNNER], [test x${with_runner} != x])
### ## NOTE:
# --without-inotify option ## With this release Lsyncd can yet only do with inotify.
AC_ARG_WITH([inotify], ## enabling fsevents and disabling inotify is thus commented out.
[ --without-inotify Do not use Linux inotify event interface. On by default.])
if test "x${with_inotify}" == xno; then ####
echo "compiling without inotify" ## --without-inotify option
else #AC_ARG_WITH([inotify],
#[ --without-inotify Do not use Linux inotify event interface. On by default.])
#if test "x${with_inotify}" == xno; then
# echo "compiling without inotify"
#else
echo "compiling with inotify" echo "compiling with inotify"
AC_DEFINE(LSYNCD_WITH_INOTIFY,,"descr") AC_DEFINE(LSYNCD_WITH_INOTIFY,,"descr")
fi #fi
AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno]) AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno])
### ####
# --with-fanotify option ## --with-fanotify option
## ##
#AC_ARG_WITH([fanotify], #AC_ARG_WITH([fanotify],
#[ --with-fanotify Uses Linux new fanotify event interface. EXPERIMENTAL! #[ --with-fanotify Uses Linux new fanotify event interface. EXPERIMENTAL!
@ -61,20 +65,20 @@ AM_CONDITIONAL([INOTIFY], [test x${with_inotify} != xno])
# echo "compiling with fanotify - WARNING experimental!" # echo "compiling with fanotify - WARNING experimental!"
# AC_DEFINE(LSYNCD_WITH_FANOTIFY,,"descr") # AC_DEFINE(LSYNCD_WITH_FANOTIFY,,"descr")
##fi ##fi
#AM_CONDITIONAL([FANOTIFY], AM_CONDITIONAL([FANOTIFY],
# [test x${with_fanotify} != x -a x${with_fanotify} != xno]) [test x${with_fanotify} != x -a x${with_fanotify} != xno])
### ####
# --with-fsevents ## --with-fsevents
AC_ARG_WITH([fsevents], #AC_ARG_WITH([fsevents],
[ --with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL! #[ --with-fsevents Uses MacOS (10.5) /dev/fsevents. EXPERIMENTAL!
Off by default.]) # Off by default.])
if test "x${with_fsevents}" != x; then #if test "x${with_fsevents}" != x; then
echo "compiling with fsevents. WARNING experimental!" # echo "compiling with fsevents. WARNING experimental!"
AC_DEFINE(LSYNCD_WITH_FSEVENTS,,"descr") # AC_DEFINE(LSYNCD_WITH_FSEVENTS,,"descr")
else #else
echo "compiling without fsevents" # echo "compiling without fsevents"
fi #fi
AM_CONDITIONAL([FSEVENTS], AM_CONDITIONAL([FSEVENTS],
[test x${with_fsevents} != x -a xno${with_fsevents} != xno]) [test x${with_fsevents} != x -a xno${with_fsevents} != xno])

View File

@ -3,7 +3,7 @@ lsyncd(1)
:doctype: manpage :doctype: manpage
:man source: Lsyncd :man source: Lsyncd
:man manual: Lsyncd :man manual: Lsyncd
:man version: 2.0 :man version: 2.0.0
:date: December 2010 :date: December 2010
NAME NAME
@ -84,7 +84,7 @@ Online Manual: http://code.google.com/p/lsyncd/wiki/Lsyncd2
VERSION VERSION
------ ------
This man page is in development (TODOX) for lsyncd(1) version 2.0 This man page is for lsyncd(1) version 2.0.0
AUTHOR AUTHOR
------ ------

View File

@ -26,6 +26,8 @@
* volume to determine "what changed". * volume to determine "what changed".
*/ */
#error "This code is not yet finished."
#include "lsyncd.h" #include "lsyncd.h"
#include <sys/types.h> #include <sys/types.h>

View File

@ -541,7 +541,6 @@ observe_fd(int fd,
observances[pos].extra = extra; observances[pos].extra = extra;
return; return;
} }
printf("new observance %d:%d\n", fd, pos);
if (observance_action) { if (observance_action) {
// TODO // TODO

View File

@ -20,7 +20,7 @@ if lsyncd_version then
"You cannot use the lsyncd runner as configuration file!") "You cannot use the lsyncd runner as configuration file!")
lsyncd.terminate(-1) -- ERRNO lsyncd.terminate(-1) -- ERRNO
end end
lsyncd_version = "2.0beta3" lsyncd_version = "2.0.0"
----- -----
-- Hides the core interface from user scripts -- Hides the core interface from user scripts
@ -281,7 +281,7 @@ local Combiner = (function()
end end
----- -----
-- TODO -- Table how to combine events that dont involve a move.
-- --
local combineNoMove = { local combineNoMove = {
Attrib = {Attrib=abso, Modify=repl, Create=repl, Delete=repl }, Attrib = {Attrib=abso, Modify=repl, Create=repl, Delete=repl },
@ -733,7 +733,7 @@ local InletFactory = (function()
end end
----- -----
-- TODO -- The functions the inlet provides.
-- --
local inletFuncs = { local inletFuncs = {
----- -----
@ -1358,7 +1358,6 @@ local Sync = (function()
local st = vd.status local st = vd.status
f:write(st, string.sub(spaces, 1, 7 - #st)) f:write(st, string.sub(spaces, 1, 7 - #st))
f:write(vd.etype," ") f:write(vd.etype," ")
-- TODO spaces
f:write(vd.path) f:write(vd.path)
if (vd.path2) then if (vd.path2) then
f:write(" -> ",vd.path2) f:write(" -> ",vd.path2)
@ -1821,61 +1820,60 @@ local Inotify = (function()
} }
end)() end)()
----- ------
-- Interface to OSX /dev/fsevents, watches the whole filesystems ---- Interface to OSX /dev/fsevents, watches the whole filesystems
----
---- All fsevents specific implementation should be enclosed here.
----
--local Fsevents = (function()
-- -----
-- -- A list indexed by sync's containing the root path this
-- -- sync is interested in.
-- --
-- local syncPaths = {}
-- --
-- All fsevents specific implementation should be enclosed here. -- -----
-- -- adds a Sync to receive events
-- --
-- -- @param sync Object to receive events
-- -- @param dir dir to watch
-- --
-- local function addSync(sync, dir)
-- if syncRoots[sync] then
-- error("duplicate sync in Fanotify.addSync()")
-- end
-- -- TODO for non subdirs adddir only
-- syncRoots[sync] = dir
-- end
-- --
local Fsevents = (function() -- -----
----- -- -- Called when any event has occured.
-- A list indexed by sync's containing the root path this -- --
-- sync is interested in. -- -- @param etype "Attrib", "Mofify", "Create", "Delete", "Move")
-- -- @param wd watch descriptor (matches lsyncd.inotifyadd())
-- -- @param isdir true if filename is a directory
-- -- @param time time of event
-- -- @param filename string filename without path
-- -- @param filename2
-- --
-- local function event(etype, isdir, time, filename, filename2)
-- log("Fsevents", etype, isdir, time, filename, filename2)
-- end
-- --
local syncPaths = {} -- -----
-- -- Writes a status report about inotifies to a filedescriptor
----- -- --
-- adds a Sync to receive events -- local function statusReport(f)
-- -- TODO
-- end
-- --
-- @param sync Object to receive events -- -- public interface
-- @param dir dir to watch -- return {
-- -- addSync = addSync,
local function addSync(sync, dir) -- event = event,
if syncRoots[sync] then -- statusReport = statusReport
error("duplicate sync in Fanotify.addSync()") -- }
end --end)()
-- TODO for non subdirs adddir only
lsyncd.fanotify.watchfs(dir)
syncRoots[sync] = dir
end
-----
-- Called when any event has occured.
--
-- @param etype "Attrib", "Mofify", "Create", "Delete", "Move")
-- @param wd watch descriptor (matches lsyncd.inotifyadd())
-- @param isdir true if filename is a directory
-- @param time time of event
-- @param filename string filename without path
-- @param filename2
--
local function event(etype, isdir, time, filename, filename2)
print("FSEVENTS", etype, isdir, time, filename, filename2)
end
-----
-- Writes a status report about inotifies to a filedescriptor
--
local function statusReport(f)
-- TODO
end
-- public interface
return {
addSync = addSync,
event = event,
statusReport = statusReport
}
end)()
----- -----
-- Holds information about the event monitor capabilities -- Holds information about the event monitor capabilities