aboutsummaryrefslogtreecommitdiff
path: root/NEWS
blob: 6433d9764eb691a9d9aa95296c2040d08126ddbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
direvent -- history of user-visible changes. 2021-12-30
Copyright (C) 2012-2022 Sergey Poznyakoff
See the end of file for copying conditions.

Please send direvent bug reports to <bug-direvent@gnu.org.ua>

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-2019 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:


Return to:

Send suggestions and report system problems to the System administrator.