Codebase list metche / upstream/metche_1.2.2
Imported Upstream version 1.2.2 intrigeri 11 years ago
4 changed file(s) with 99 addition(s) and 217 deletion(s). Raw diff Collapse all Expand all
0 1.2.2 (2012 06 02)
1
2 * Ignore changes to $WATCHED_DIR itself.
3 This fixes the dreaded "sometimes sends empty reports" bug metche
4 has had since forever.
5 * Fix GnuPG groups support: check for encryption key existence using
6 gpg --encrypt instead of --list-public-keys.
7 * Spelling and grammar fixes in manpage.
8
09 1.2.1 (2011 06 05)
110
211 * Support more mailers than just mutt.
255255 done
256256 set +o noglob
257257
258 # How to use $FIND_OPTS:
259 # - $FIND_OPTS should appear unquoted between:
260 # . the (optional) target files and directories
261 # . the (compulsory) action, such as -print or -exec
262 # - 'set -o noglob' has to be run before any $FIND_OPTS use
263 # - 'set +o noglob' has to be run after any $FIND_OPTS use
264 FIND_OPTS=""
258 # How to use $_FIND_OPTS:
259 # - 'set -o noglob' has to be run before any $_FIND_OPTS use
260 # - 'set +o noglob' has to be run after any $_FIND_OPTS use
261 _FIND_OPTS=""
265262 set -o noglob
266 # DO NOT fix me: the final -or at the end of $FIND_OPTS is really needed
263 # DO NOT fix me: the final -or at the end of $_FIND_OPTS is really needed
267264 for pattern in $EXCLUDES; do
268 FIND_OPTS="$FIND_OPTS -path */$pattern -prune -or"
265 _FIND_OPTS="$_FIND_OPTS -path */$pattern -prune -or"
269266 done
270267 set +o noglob
271268
332329
333330 # E-mail encryption
334331 if [ $ENCRYPT_EMAIL = "yes" ]; then
335 gpg --batch --list-public-keys $EMAIL_ADDRESS >/dev/null 2>&1
332 echo | gpg --batch --encrypt --recipient $EMAIL_ADDRESS >/dev/null 2>&1
336333 res=$?
337334 if [ $res -ne 0 ]; then
338335 warning " GnuPG public key for $EMAIL_ADDRESS not found."
347344 # Check the existence of WATCHED_DIR
348345 test -d "$WATCHED_DIR" || \
349346 fatal "$WATCHED_DIR directory (built from WATCHED_DIR) does not exist."
347
348 # Initialize $FIND_OPTS -- how to use it:
349 # - 'set -o noglob' has to be run before any $FIND_OPTS use
350 # - 'set +o noglob' has to be run after any $FIND_OPTS use
351 # - $FIND_OPTS should appear unquoted between:
352 # . the (optional) target files and directories
353 # . the (compulsory) action, such as -print or -exec
354 set -o noglob
355 FIND_OPTS="-path $WATCHED_DIR -or $_FIND_OPTS"
356 set +o noglob
350357
351358 # Initialize WATCHED_PARENT
352359 WATCHED_PARENT=`dirname $WATCHED_DIR`
22 .PP
33 metche - reducing root bus factor
44 .SH SYNOPSIS
5 .PP
6 \f[CR]
7 metche\ [-h\ VSERVER]\ report\ (stable|testing|unstable)-YYYYMMDDHHMM
8 metche\ [-h\ VSERVER]\ list
9 metche\ [-h\ VSERVER]\ stabilize\ testing-YYYYMMDDHHMM
5 .IP
6 .nf
7 \f[C]
8 metche\ [-h\ VSERVER]\ report\ (stable|testing|unstable)-YYYYMMDDHHMM
9 metche\ [-h\ VSERVER]\ list
10 metche\ [-h\ VSERVER]\ stabilize\ testing-YYYYMMDDHHMM
1011 \f[]
12 .fi
1113 .SH DESCRIPTION
1214 .PP
1315 metche is a tool meant to ease collective system administration by
1416 monitoring changes in the system configuration.
1517 .PP
1618 metche basic usage is to monitor changes in a directory, usually
17 \f[B]/etc\f[]; optionally, metche can also monitor:
19 \f[C]/etc\f[]; optionally, metche can also monitor:
1820 .IP \[bu] 2
1921 one or more user maintained changelog files,
2022 .IP \[bu] 2
2224 .PP
2325 metche should be installed with a cronjob that regularly runs to
2426 automatically save the system state as needed.
25 These states are saved in a way similar to the Debian development
26 model:
27 These states are saved in a way similar to the Debian development model:
2728 .IP \[bu] 2
2829 \f[I]unstable\f[] states are saved as soon as a change is detected.
2930 They are kept until a new \f[I]testing\f[] state appears.
3031 .IP \[bu] 2
31 \f[I]testing\f[] states is created from the last \f[I]unstable\f[]
32 state that has not been changed after a short amount of time (by
33 default, one hour).
32 \f[I]testing\f[] states is created from the last \f[I]unstable\f[] state
33 that has not been changed after a short amount of time (by default, one
34 hour).
3435 Old \f[I]unstable\f[] states are deleted afterwards.
3536 .IP \[bu] 2
36 \f[I]stable\f[] states are created from the last \f[I]testing\f[]
37 state, either manually, or after a long amount of time (by default,
38 3 days).
37 \f[I]stable\f[] states are created from the last \f[I]testing\f[] state,
38 either manually, or after a long amount of time (by default, 3 days).
3939 Old \f[I]testing\f[] states are deleted afterwards.
4040 .PP
4141 When a new \f[I]testing\f[] state is saved, an email is sent to a
42 configurable address, giving an overwiew of the differences with
43 the previous \f[I]testing\f[].
44 A notification is also sent when a new \f[I]stable\f[] state is
45 saved.
42 configurable address, giving an overwiew of the differences with the
43 previous \f[I]testing\f[].
44 A notification is also sent when a new \f[I]stable\f[] state is saved.
4645 .PP
47 metche's configuration is read from \f[B]/etc/metche.conf\f[].
48 Various settings like changelog monitoring or time between system
49 state switches are described there.
46 metche\[aq]s configuration is read from \f[C]/etc/metche.conf\f[].
47 Various settings like changelog monitoring or time between system state
48 switches are described there.
5049 .SH OPTIONS
5150 .PP
52 If \f[B]-h\ VSERVER\f[] is specified, the VServer \f[I]VSERVER\f[]
53 is operated on instead of the host system.
54 This, along with the \f[B]VSNAMES\f[] option, allows to monitor
51 If \f[C]-h\ VSERVER\f[] is specified, the VServer \f[I]VSERVER\f[] is
52 operated on instead of the host system.
53 This, along with the \f[C]VSNAMES\f[] option, allows one to monitor
5554 several VServers running on the system.
5655 .PP
57 One of the following commands must be specified on the command
58 line:
56 One of the following commands must be specified on the command line:
5957 .TP
6058 .B report
6159 When run with the \f[I]report\f[] command, metche displays a report
62 against the specified saved state, or if unspecified, against the
63 latest testing state.
64 This is useful when you have broken your system and want to know
65 which changes have been made since a given, known working, system
66 state.
60 against the specified saved state, or if unspecified, against the latest
61 testing state.
62 This is useful when you have broken your system and want to know which
63 changes have been made since a given, known working, system state.
6764 .RS
6865 .RE
6966 .TP
7067 .B list
71 When run with the \f[I]list\f[] command, metche displays a list of
72 all the saved states.
68 When run with the \f[I]list\f[] command, metche displays a list of all
69 the saved states.
7370 .RS
7471 .RE
7572 .TP
7673 .B stabilize
77 When run with the \f[I]stabilize\f[] command, metche turns a
78 \[lq]testing state\[rq] into a \[lq]stable state\[rq].
79 By default, it will use the last \[lq]testing state\[rq], but this
80 can be overriden by giving a specific state as argument.
74 When run with the \f[I]stabilize\f[] command, metche turns a "testing
75 state" into a "stable state".
76 By default, it will use the last "testing state", but this can be
77 overridden by giving a specific state as argument.
8178 .RS
8279 .RE
8380 .TP
8481 .B cron
85 This command should not be called manually, but used from a
86 cronjob.
87 When called, it can perform various operations like: saving
88 \[lq]unstable\[rq], \[lq]testing\[rq] or \[lq]stable\[rq] states as
89 needed and sending reports and notification if configured to do so.
90 This command does not support the \f[B]-h\f[] option.
82 This command should not be called manually, but used from a cronjob.
83 When called, it can perform various operations like: saving "unstable",
84 "testing" or "stable" states as needed and sending reports and
85 notification if configured to do so.
86 This command does not support the \f[C]-h\f[] option.
9187 .RS
9288 .RE
9389 .SH FILES
9490 .PP
95 \f[B]/etc/metche.conf\f[] contains metche configuration.
91 \f[C]/etc/metche.conf\f[] contains metche configuration.
9692 .PP
97 When configured to monitor one changelog, \f[B]CHANGELOG_FILE\f[]
98 (default: \f[B]/root/Changelog\f[]).
93 When configured to monitor one changelog, \f[C]CHANGELOG_FILE\f[]
94 (default: \f[C]/root/Changelog\f[]).
9995 .PP
10096 When configured to monitor multiple changelogs,
101 \f[B]CHANGELOG_DIR/*/Changelog\f[] (default:
102 \f[B]/root/changelogs\f[]).
97 \f[C]CHANGELOG_DIR/*/Changelog\f[] (default: \f[C]/root/changelogs\f[]).
10398 .PP
104 System states are saved in \f[B]BACKUP_DIR\f[] (default:
105 \f[B]/var/lib/metche\f[]).
99 System states are saved in \f[C]BACKUP_DIR\f[] (default:
100 \f[C]/var/lib/metche\f[]).
106101 .SH SECURITY
107102 .PP
108 metche is able to use GnuPG to encrypt the email it sends, but does
109 not by default; just enable the \f[B]ENCRYPT_EMAIL\f[]
110 configuration option, and make sure \f[B]EMAIL_ADDRESS\f[]' public
111 key is in root's keyring, trusted enough to be used blindly by
112 metche.
113 If \f[B]EMAIL_ADDRESS\f[] is an email alias or mailing-list's
114 address, you probably want to use the \f[B]group\f[] option in
115 \f[B]/root/.gnupg/gpg.conf\f[] so that metche reports are encrypted
116 for every person subscribed to this alias or mailing-list; for more
117 information, see \f[B]gpg(1)\f[].
103 metche is able to use GnuPG to encrypt the email it sends, but does not
104 by default; just enable the \f[C]ENCRYPT_EMAIL\f[] configuration option,
105 and make sure \f[C]EMAIL_ADDRESS\f[]\[aq] public key is in root\[aq]s
106 keyring, trusted enough to be used blindly by metche.
107 If \f[C]EMAIL_ADDRESS\f[] is an email alias or mailing-list\[aq]s
108 address, you probably want to use the \f[C]group\f[] option in
109 \f[C]/root/.gnupg/gpg.conf\f[] so that metche reports are encrypted for
110 every person subscribed to this alias or mailing-list; for more
111 information, see \f[C]gpg(1)\f[].
118112 .PP
119 When \f[B]DO_DETAILS\f[] is enabled and \f[B]ENCRYPT_EMAIL\f[] is
120 disabled, metche sends in \f[I]clear text email\f[] the changes
121 made to the watched directory\&... either make sure that the
122 \f[B]EXCLUDES\f[] configuration variable prevents it to send
123 sensitive information, or triple check that secure connections will
124 be used end-to-end on the email path.
125 If unsure, set \f[B]EMAIL_ADDRESS\f[] configuration variable to a
126 local mailbox.
127 Please note that \f[B]EMAIL_ADDRESS\f[] is not used for VServers: a
128 VServer's report messages are sent to its root email address.
113 When \f[C]DO_DETAILS\f[] is enabled and \f[C]ENCRYPT_EMAIL\f[] is
114 disabled, metche sends in \f[I]clear text email\f[] the changes made to
115 the watched directory...
116 either make sure that the \f[C]EXCLUDES\f[] configuration variable
117 prevents it to send sensitive information, or triple check that secure
118 connections will be used end-to-end on the email path.
119 If unsure, set \f[C]EMAIL_ADDRESS\f[] configuration variable to a local
120 mailbox.
121 Please note that \f[C]EMAIL_ADDRESS\f[] is not used for VServers: a
122 VServer\[aq]s report messages are sent to its root email address.
129123 .PP
130 metche stores, in \f[B]BACKUP_DIR\f[] (default:
131 \f[B]/var/lib/metche\f[]), various backups of \f[B]WATCHED_DIR\f[].
132 Make sure that this backup place is at least as secured as the
133 source.
124 metche stores, in \f[C]BACKUP_DIR\f[] (default:
125 \f[C]/var/lib/metche\f[]), various backups of \f[C]WATCHED_DIR\f[].
126 Make sure that this backup place is at least as secured as the source.
134127 .SH BUGS
135128 .PP
136 See
137 metche's ticket system (https://labs.riseup.net/code/projects/metche/issues)
138 for known bugs, missing features, and the development road-map.
129 See metche\[aq]s ticket
130 system (https://labs.riseup.net/code/projects/metche/issues) for known
131 bugs, missing features, and the development road-map.
139132 .SH AUTHORS
140 metche and this manual page were written by the boum.org collective, and are now maintained by the metche developers collective <metche@lists.riseup.net>.
141
133 metche and this manual page were written by the boum.org collective, and
134 are now maintained by the metche developers collective
135 <metche@lists.riseup.net>.
+0
-128
metche.8.markdown less more
0 % METCHE(8) metche user manual
1 % metche and this manual page were written by the boum.org collective, and are now maintained by the metche developers collective <metche@lists.riseup.net>
2 % June 5, 2011
3
4 NAME
5 ====
6
7 metche - reducing root bus factor
8
9 SYNOPSIS
10 ========
11
12 metche [-h VSERVER] report (stable|testing|unstable)-YYYYMMDDHHMM
13 metche [-h VSERVER] list
14 metche [-h VSERVER] stabilize testing-YYYYMMDDHHMM
15
16 DESCRIPTION
17 ===========
18
19 metche is a tool meant to ease collective system administration by
20 monitoring changes in the system configuration.
21
22 metche basic usage is to monitor changes in a directory, usually
23 `/etc`; optionally, metche can also monitor:
24
25 * one or more user maintained changelog files,
26 * the state of Debian packages and versions.
27
28 metche should be installed with a cronjob that regularly runs to
29 automatically save the system state as needed. These states are saved
30 in a way similar to the Debian development model:
31
32 * _unstable_ states are saved as soon as a change is detected. They
33 are kept until a new _testing_ state appears.
34 * _testing_ states is created from the last _unstable_ state that has
35 not been changed after a short amount of time (by default, one
36 hour). Old _unstable_ states are deleted afterwards.
37 * _stable_ states are created from the last _testing_ state, either
38 manually, or after a long amount of time (by default, 3 days). Old
39 _testing_ states are deleted afterwards.
40
41 When a new _testing_ state is saved, an email is sent to a
42 configurable address, giving an overwiew of the differences with the
43 previous _testing_. A notification is also sent when a new _stable_
44 state is saved.
45
46 metche's configuration is read from `/etc/metche.conf`. Various
47 settings like changelog monitoring or time between system state
48 switches are described there.
49
50 OPTIONS
51 =======
52
53 If `-h VSERVER` is specified, the VServer _VSERVER_ is operated on
54 instead of the host system. This, along with the `VSNAMES` option,
55 allows to monitor several VServers running on the system.
56
57 One of the following commands must be specified on the command line:
58
59 report
60 : When run with the _report_ command, metche displays a report
61 against the specified saved state, or if unspecified, against the
62 latest testing state. This is useful when you have broken your
63 system and want to know which changes have been made since a
64 given, known working, system state.
65
66 list
67 : When run with the _list_ command, metche displays a list of all
68 the saved states.
69
70 stabilize
71 : When run with the _stabilize_ command, metche turns a "testing
72 state" into a "stable state". By default, it will use the last
73 "testing state", but this can be overriden by giving a specific
74 state as argument.
75
76 cron
77 : This command should not be called manually, but used from a
78 cronjob. When called, it can perform various operations like:
79 saving "unstable", "testing" or "stable" states as needed and
80 sending reports and notification if configured to do so. This
81 command does not support the `-h` option.
82
83 FILES
84 =====
85
86 `/etc/metche.conf` contains metche configuration.
87
88 When configured to monitor one changelog, `CHANGELOG_FILE` (default:
89 `/root/Changelog`).
90
91 When configured to monitor multiple changelogs,
92 `CHANGELOG_DIR/*/Changelog` (default: `/root/changelogs`).
93
94 System states are saved in `BACKUP_DIR` (default: `/var/lib/metche`).
95
96 SECURITY
97 ========
98
99 metche is able to use GnuPG to encrypt the email it sends, but does
100 not by default; just enable the `ENCRYPT_EMAIL` configuration option,
101 and make sure `EMAIL_ADDRESS`' public key is in root's keyring,
102 trusted enough to be used blindly by metche. If `EMAIL_ADDRESS` is an
103 email alias or mailing-list's address, you probably want to use the
104 `group` option in `/root/.gnupg/gpg.conf` so that metche reports are
105 encrypted for every person subscribed to this alias or mailing-list;
106 for more information, see `gpg(1)`.
107
108 When `DO_DETAILS` is enabled and `ENCRYPT_EMAIL` is disabled, metche
109 sends in _clear text email_ the changes made to the watched
110 directory... either make sure that the `EXCLUDES` configuration
111 variable prevents it to send sensitive information, or triple check
112 that secure connections will be used end-to-end on the email path. If
113 unsure, set `EMAIL_ADDRESS` configuration variable to a local mailbox.
114 Please note that `EMAIL_ADDRESS` is not used for VServers: a
115 VServer's report messages are sent to its root email address.
116
117 metche stores, in `BACKUP_DIR` (default: `/var/lib/metche`), various
118 backups of `WATCHED_DIR`. Make sure that this backup place is at least
119 as secured as the source.
120
121 BUGS
122 ====
123
124 See [metche's ticket system] for known bugs, missing features, and the
125 development road-map.
126
127 [metche's ticket system]: https://labs.riseup.net/code/projects/metche/issues