direvent -- history of user-visible changes. 2024-07-02
Copyright (C) 2012-2024 Sergey Poznyakoff
See the end of file for copying conditions.

Please send direvent bug reports to <bug-direvent@gnu.org.ua>

Version 5.4, 2024-07-02

* Simultaneous execution limits

It is possible to limit number of command instances that are allowed
to run simultaneosly for a particular watcher.  This is done using
the 'max-instances' statement in 'watcher' section.

* Restore the nowait default

Unless given the 'nowait' option explicitly, watchers waited for the
handler to terminate.  It is now fixed and 'nowait' is the default, as
described in the documentation.

* Fix bug in generic to system event translation

* Fix sentinel code

In some cases setting the sentinel effectively removed the original
watcher.  That happened if the full file name of the original watcher
and its directory part produced the same hash.

Version 5.3, 2021-12-30

* Introduce compound events

The "change" event is implemented on GNU/Linux and FreeBSD.  This
event is delivered when a file was modified and closed.

* New configuration statement for manipulating the environment.

The "environ" statement is now a compound statement. It can contain
five kinds of substatements: "clear" to clear the environment, "keep"
to retain certain variables while clearing the environment, "set" to
set a variable, "unset" to unset a variable or variables, and "eval"
to evaluate a variable reference for side effects.

Both "keep" and "unset" can take globbing pattern as their argument,
in which case they affect all variables matching that pattern.

The value part in the "set" statement is subject to variable
expansion.

The "environ" block can appear in global context as well.  In this
case it applies to all watchers.

The support for the old one-line "environ" syntax is retained for
backward compatibility.

* Variable expansion in arguments to some configuration statements.

Both macro and environment variables are expanded in arguments to all
substatements of the new "environ" block statement and in the argument
to the "command" statement.  In the latter case, expansion of the
environment variables is controlled by the "shell" option.  If the
option is set, the variable will be expanded by the shell.  Otherwise,
they are expanded by direvent prior to invoking the command.

* Rewrite the recursive watching support

In particular, this fixes the bug where recursive watchers silently
assumed that the "create" generic event was configured for the
watcher.

* Change interface for bulk closing of file descriptors

To speed up launching of the user commands, system-dependent
interfaces for closing the file descriptors above the given one are
used, if available.

Version 5.2, 2019-07-13

* The path statement can refer to a regular file.

Prior versions of direvent required the argument to the "path"
statement to refer to an existing directory.  This requirement is now
lifted.  The pathname can refer to any type of file (not only a
directory).  Moreover, the file is not required to exist.  If it does
not exist, direvent will set up an auxiliary watcher (called a
"sentinel"), that will wake up upon creation of the file with that
pathname and will set up the configured watcher once it is created.

The process is reversed when the file referred to by the "path"
statement is deleted.  In that case, the configured watcher is
deactivated and a sentinel is set up which will bring it back when the
destination file or directory is created.

This mode of operation ensures that the configured watcher will always
be operational.

* Fix watcher removal on BSD-like systems.

* Configuration changes

** multiple environ statements

Multiple environ statements can be used within a single watcher block.
Such statements accumulate.


Version 5.1, 2016-07-06

* Globbing patterns in #include statement

If argument to the #include statement contains wildcard characters (*, [,
], or ?), it is interpreted as shell globbing pattern and all files
matching that pattern are included, in lexicographical order.  If no
matching files are found, the directive is replaced with an empty
line.

* New watcher option 'shell'

The 'shell' option causes watcher command to be executed via
'/bin/sh' (by default it is invoked directly, using the 'execve'
function).  For example:

  watcher {
     path "/etc/httpd/vhosts";
     command "/usr/bin/scanhosts && service httpd restart";
     option (shell);
  }

* Include path

If the argument to the #include (#include_once) statement is not an
absolute file name or globbing pattern, it is looked up in the include
search path.  The order of look up is as follows.  First, directories
given with '-I' options (see below) are scanned, in the same order as
given on the command line.  If no matching file is found in any of
them, directories in the standard include search path are scanned.

By default, the standard include search path contains two directories:
'$(pkgdatadir)/$(VERSION)' and '$(pkgdatadir)/include', where
$(pkgdatadir) and $(VERSION) stand for the package data directory, and
package version, correspondingly.  It can be redefined at compile time using
the '--with-include-path' to configure, e.g.:

 ./configure --with-include-path='$(sysconfdir)/direvent.d:$(pkgdatadir)/$(VERSION):$(pkgdatadir)/include'

(see the file INSTALL, section "Building and Configuring", for a
detailed discussion of this option).

To inspect the actual path at runtime, run 'direvent --help',
and look for the string 'Include search path:' in its output.

* New command line option -I (--include)

The '-I DIR' command line option adds DIR to the include search path.
When looking for include files, directories given with '-I' options
are scanned first.  If the file is not found, the directories in the
standard include path are scanned.


Version 5.0, 2014-09-06

* An official GNU release

* The "file" statement allows for negating patterns

* I18N


Version 4.1, 2013-12-27

* New features

A watcher can be configured to react only on certain files.  To that
effect, a new statement "file" is introduced.  This statement defines
a list of regular expressions one of which the file name must match in
order for the watcher to wake up.

* Bugfixes

Upon creation of a directory, a genev_create event is generated for
all files and directories below the newly created one (if required
by the configuration).  At the same time, new watchers are installed.

The version 4.0 incorrectly assumed that a notification would arrive
for each subdirectory or subfile, once the watcher is installed for
the parent directory.  This created a race condition, which could
cause some create events to come unnoticed.

Version 4.0, 2013-06-04

This is a complete rewrite of the project.  It uses a new
configuration file format and works on Linux, BSD and Darwin.


Version 3.0 (Git)

Introduce a configuration file.


Version 2.0, 2013-01-11

* Change command line handling

Dircond accepts handler definitions interspersed with directory
name.  This allows for having different per-directory handlers.

Similarly, the autowatch options ("-a" and "-l") affect the
directories specified after them in the command line and their effect
is changed by the next occurrence of the corresponding option.

* Bugfixes

Fix a minor error in fd_set handling.


Version 1.0, 2012-12-30

Initial release


=========================================================================
Copyright information:

Copyright (C) 2012-2024 Sergey Poznyakoff

   Permission is granted to anyone to make or distribute verbatim copies
   of this document as received, in any medium, provided that the
   copyright notice and this permission notice are preserved,
   thus giving the recipient permission to redistribute in turn.

   Permission is granted to distribute modified versions
   of this document, or of portions of it,
   under the above conditions, provided also that they
   carry prominent notices stating who last changed them.

Local variables:
mode: outline
paragraph-separate: "[  ]*$"
eval: (add-hook 'write-file-hooks 'time-stamp)
time-stamp-start: "changes. "
time-stamp-format: "%:y-%02m-%02d"
time-stamp-end: "\n"
end:
