Codebase list metche / upstream/1.0
Imported Upstream version 1.0 intrigeri 12 years ago
14 changed file(s) with 122 addition(s) and 421 deletion(s). Raw diff Collapse all Expand all
+0
-17
Makefile less more
0 all: doc
1
2 metche-manpage.xml: metche-manpage.sgml
3 sgml2xml -xlower -xid $< > $@
4
5 metche.8: metche-manpage.xml
6 db2x_xsltproc -s /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl $<
7
8 doc: metche.8
9
10 clean:
11 rm -f metche-manpage.xml
12
13 distclean: clean
14 rm -f metche.8
15
16 .PHONY: all doc clean distclean
+0
-5
debian/changelog less more
0 metche (1.0-1) unstable; urgency=low
1
2 * Initial Release.
3
4 -- ricola <ricola@anargeek.net> Thu, 24 Nov 2005 19:18:47 +0100
+0
-1
debian/compat less more
0 4
+0
-34
debian/config less more
0 #!/bin/sh
1
2 CONFIGFILE=/etc/metche.conf
3 set -e
4 . /usr/share/debconf/confmodule
5
6 if [ -e $CONFIGFILE ]; then
7 . $CONFIGFILE || true
8 db_set metche/email $EMAIL_ADDRESS
9 db_set metche/changelog/type "No changelog monitoring"
10 if [ "$CHANGELOG_FILE" ]; then
11 db_set metche/changelog/type "Single changelog file"
12 db_set metche/changelog/file $CHANGELOG_FILE
13 fi
14 if [ "$CHANGELOG_DIR" ]; then
15 db_set metche/changelog/type "Multiple changelog files"
16 db_set metche/changelog/directory $CHANGELOG_DIR
17 fi
18 fi
19
20 db_input medium metche/email || true
21 db_input medium metche/changelog/type || true
22 db_go || true
23 db_get metche/changelog/type
24 case "$RET" in
25 "Single changelog file")
26 db_input medium metche/changelog/file || true
27 db_go || true
28 ;;
29 "Multiple changelog files")
30 db_input medium metche/changelog/directory || true
31 db_go || true
32 ;;
33 esac
+0
-21
debian/control less more
0 Source: metche
1 Section: admin
2 Priority: optional
3 Maintainer: boum.org collective <boum@anargeek.net>
4 Build-Depends-Indep: debhelper (>> 4.0.0), docbook2x, sp, docbook-xsl, docbook-to-man
5 Standards-Version: 3.6.1
6
7 Package: metche
8 Architecture: all
9 Depends: debconf, mutt, bzip2
10 Recommends: apt-show-versions, gnupg
11 Description: configuration monitor to ease collective administration
12 metche monitors changes made to a "system state" composed of:
13 - a "watched" directory (typically: /etc)
14 - changelogs written by you in one or several files
15 (e.g. /root/Changelog)
16 - States and versions of Debian packages (using apt-show-versions)
17 by periodically:
18 - saving backups of the corresponding files
19 - emailing the changes in the system state to your administrator's
20 mailing list
+0
-15
debian/copyright less more
0 This package was debianized by boum.org collective <boum@anargeek.net> on
1 Thu, 24 Nov 2005 19:18:47 +0100.
2
3 It was downloaded from http://www.poivron.org/dev/metche
4
5 Copyright:
6
7 Upstream Authors: boum.org collective <boum@anargeek.net>
8
9 Copyright (C) 2004-2006 boum.org collective - property is theft !
10
11 You are free to distribute this software under the terms of
12 the GNU General Public License.
13 On Debian systems, the complete text of the GNU General Public
14 License can be found in the file `/usr/share/common-licenses/GPL'.
+0
-1
debian/cron.d less more
0 0-59/5 * * * * root test -x /usr/sbin/metche && /usr/sbin/metche cron
+0
-5
debian/dirs less more
0 etc
1 etc/cron.d
2 usr/sbin
3 usr/share/man/man8
4 var/lib/metche
+0
-2
debian/docs less more
0 README
1 Changelog
+0
-37
debian/postinst less more
0 #!/bin/sh
1
2 CONFIGFILE=/etc/metche.conf
3 set -e
4 . /usr/share/debconf/confmodule
5
6 cp -a -f $CONFIGFILE $CONFIGFILE.tmp
7
8 db_get metche/email
9 EMAIL_ADDRESS="$RET"
10 sed -e "s/^ *EMAIL_ADDRESS=.*/EMAIL_ADDRESS=\"$EMAIL_ADDRESS\"/" -i $CONFIGFILE.tmp
11
12 db_get metche/changelog/type
13 case "$RET" in
14 "Single changelog file")
15 db_get metche/changelog/file
16 CHANGELOG_FILE="$RET"
17 sed -e "s@^[# ]*CHANGELOG_FILE=.*@CHANGELOG_FILE=\"$CHANGELOG_FILE\"@" \
18 -e "s@^[# ]*CHANGELOG_DIR@#CHANGELOG_DIR@" -i $CONFIGFILE.tmp
19 ;;
20 "Multiple changelog files")
21 db_get metche/changelog/directory
22 CHANGELOG_DIR="$RET"
23 sed -e "s@^[# ]*CHANGELOG_DIR=.*@CHANGELOG_DIR=\"$CHANGELOG_DIR\"@" \
24 -e "s@^[# ]*CHANGELOG_FILE@#CHANGELOG_FILE@" -i $CONFIGFILE.tmp
25 ;;
26 "No changelog monitoring")
27 sed -e "s@^[# ]*CHANGELOG_FILE@#CHANGELOG_FILE@" \
28 -e "s@^[# ]*CHANGELOG_DIR@#CHANGELOG_DIR@" -i $CONFIGFILE.tmp
29 ;;
30 esac
31
32 mv -f $CONFIGFILE.tmp $CONFIGFILE
33
34 metche cron
35
36 #DEBHELPER#
+0
-55
debian/rules less more
0 #!/usr/bin/make -f
1 # debian rules file for metche
2
3 PACKAGE = metche
4 DESTDIR = $(CURDIR)/debian/$(PACKAGE)
5
6 build: build-stamp
7 build-stamp:
8 dh_testdir
9 $(MAKE)
10 touch build-stamp
11
12 clean:
13 dh_testdir
14 dh_testroot
15 rm -f build-stamp
16 -$(MAKE) clean
17 dh_clean
18
19 install: build
20 dh_testdir
21 dh_testroot
22 dh_clean -k
23 dh_installdirs
24 cp $(CURDIR)/metche $(DESTDIR)/usr/sbin
25 cp $(CURDIR)/metche.conf.default $(DESTDIR)/etc/metche.conf
26 cp $(CURDIR)/metche.8 $(DESTDIR)/usr/share/man/man8
27 chown root:staff $(DESTDIR)/var/lib/metche
28 chmod 750 $(DESTDIR)/var/lib/metche
29
30 # Build architecture-independent files here.
31 binary-indep: build install
32
33 # Build architecture-dependent files here.
34 binary-arch: build install
35 dh_testdir
36 dh_testroot
37 dh_installchangelogs
38 dh_installdocs
39 dh_installexamples
40 dh_installdebconf
41 dh_installcron
42 dh_installman metche.8
43 dh_link
44 dh_strip
45 dh_compress
46 dh_fixperms
47 dh_installdeb
48 dh_shlibdeps
49 dh_gencontrol
50 dh_md5sums
51 dh_builddeb
52
53 binary: binary-indep binary-arch
54 .PHONY: build clean binary-indep binary-arch binary install
+0
-44
debian/templates less more
0 Template: metche/email
1 Type: string
2 Default: root
3 Description: E-mail address receiving metche reports
4 metche monitors "system state" changes. An hour after the last change has
5 been recorded an e-mail report is sent describing changes made to:
6 - files inside the watched directory (/etc by default),
7 - user maintainted changelog file(s) (if configured to do so),
8 - the list of installed Debian packages (if configured to do so).
9 .
10 Please enter the e-mail that should receive these reports. It typically
11 corresponds to the alias or mailing-list used by system administators for
12 this computer.
13 .
14 Note: by default, metche does not send detailed diffs describing file changes
15 as this can leak confidential information. If you want to use this feature,
16 we strongly encourage you to turn on GPG encryption at the same time.
17 See the metche(8) man page and the configuration file for more details.
18
19 Template: metche/changelog/type
20 Type: select
21 Choices: Single changelog file, Multiple changelog files, No changelog monitoring
22 Description: Changelog monitoring type.
23 metche can monitor one or more changelogs written by the system
24 administrators.
25 .
26 These changelogs should contain comments describing the changes made
27 to the system. The easiest way to organize these comments is to put them all
28 together in one file.
29 .
30 Another possibility is to have a subdirectory for each administrative task
31 with a file named "Changelog". This way, you can store source code or
32 configuration examples along with the documentation on how they have been used.
33
34 Template: metche/changelog/file
35 Type: string
36 Description: Changelog file to be monitored.
37 This option sets the path of the changelog file to be monitored.
38
39 Template: metche/changelog/directory
40 Type: string
41 Description: Changelog directory to be monitored.
42 This option sets the path to the root directory containing the Changelogs. Each
43 "Changelog" file should be in a sub-directory of this directory.
+0
-184
metche-manpage.sgml less more
0 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN"
1 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
2
3 <RefEntry id="metche">
4
5 <refmeta>
6 <refentrytitle>metche</refentrytitle>
7 <manvolnum>8</manvolnum>
8 </refmeta>
9
10 <refnamediv>
11 <refname>metche</refname>
12 <refpurpose>reducing root bus factor</refpurpose>
13 </refnamediv>
14
15 <refsynopsisdiv>
16 <cmdsynopsis>
17 <command>metche</command>
18 <group choice="req">
19 <arg>cron</arg>
20 <arg>report
21 <arg choice="opt">
22 <group choice="req">
23 <arg>stable</arg>
24 <arg>testing</arg>
25 <arg>unstable</arg>
26 </group>-<replaceable>YYYYMMDDHHMM</replaceable>
27 </arg>
28 </arg>
29 <arg>list</arg>
30 <arg>stabilize <arg choice="opt">testing-<replaceable>YYYYMMDDHHMM</replaceable></arg></arg>
31 </group>
32 </cmdsynopsis>
33 </refsynopsisdiv>
34
35 <refsect1 id="description">
36
37 <title>DESCRIPTION</title>
38
39 <Para>metche is a tool meant to facilitate collective sysadmin by
40 monitoring changes in the system configuration.</Para>
41
42 <Para>metche basic usage is to monitor changes in a directory, usually
43 <filename>/etc</filename> ; optionally, metche can also
44 monitor:</Para>
45 <ItemizedList>
46 <ListItem>
47 <Para>one or more user maintained changelog files,
48 </ListItem>
49 <ListItem>
50 <Para>the state of Debian packages and versions.</Para>
51 </ListItem>
52 </ItemizedList>
53
54 <Para>metche should be installed with a cronjob that regularly runs to
55 automatically save the system state as needed. These states are saved in a
56 way similar to the Debian development model:</Para>
57 <ItemizedList>
58 <ListItem>
59 <Para><emphasis>unstable</emphasis> states are saved as soon as
60 a change is detected. They are kept until a new
61 <emphasis>testing</emphasis> state appears.</Para>
62 </ListItem>
63 <ListItem>
64 <Para><emphasis>testing</emphasis> states is created from the last
65 <emphasis>unstable</emphasis> state that has not been changed
66 after a short amount of time (by default, one hour). Old
67 <emphasis>unstable</emphasis> states are deleted afterwards.</Para>
68 </ListItem>
69 <ListItem>
70 <Para><emphasis>stable</emphasis> states are created from the last
71 <emphasis>testing</emphasis> state, either manually, or after a
72 long amount of time (by default, 3 days). Old <emphasis
73 >testing</emphasis> states are deleted afterwards.</Para>
74 </ListItem>
75 </ItemizedList>
76
77 <Para>When a new <emphasis>testing</emphasis> state is saved, an email is
78 sent to a configurable address, giving an overwiew of
79 the differences with the previous <emphasis>testing</emphasis>.
80 A notification is also sent when a new <emphasis>stable</emphasis> state is
81 saved.</Para>
82
83 <Para>metche's configuration is read from
84 <filename>/etc/metche.conf</filename>. Various settings like changelog
85 monitoring or time between system state switches are described
86 there.</Para>
87
88 </refsect1>
89 <refsect1 id="options">
90
91 <title>OPTIONS</title>
92
93 <Para>One of the following commands must be specified on the
94 command line:</Para>
95
96 <VariableList>
97
98 <VarListEntry><Term><command>report</command></Term>
99 <ListItem>
100 <Para>When run with the <command>report</command> command, metche
101 displays a report against the specified saved state, or if unspecified,
102 against the latest testing state. This is useful when you
103 have broken your system and want to know which changes have been made
104 since a given, known working, system state.
105 </ListItem>
106
107 <VarListEntry><Term><command>list</command></Term>
108 <ListItem>
109 <Para>When run with the <command>list</command> command, metche
110 displays a list of all the saved states.</Para>
111 </ListItem>
112
113 <VarListEntry><Term><command>stabilize</command></Term>
114 <ListItem>
115 <Para>When run with the <command>stabilize</command> command, metche
116 turns a "testing state" into a "stable state". By default, it will
117 use the last "testing state", but this can be overriden by giving
118 a specific state as argument.</Para>
119 </ListItem>
120
121 <VarListEntry><Term><command>cron</command></Term>
122 <ListItem>
123 <Para>This command should not be called manually, but used from
124 a cronjob. When called, it can perform various operations like:
125 saving "unstable", "testing" or "stable" states as needed and
126 sending reports and notification if configured to do so.</Para>
127 </ListItem>
128
129 </VariableList>
130
131 </refsect1>
132
133 <refsect1 id="files"><title>FILES</title>
134 <Para><filename>/etc/metche.conf</filename> contains metche configuration.
135 </Para>
136
137 <Para>When configured to monitor one changelog,
138 <filename><envar>CHANGELOG_FILE</envar></filename> (default
139 <filename>/root/Changelog</filename>).
140 </Para>
141
142 <Para>When configured to monitor multiple changelogs,
143 <filename><envar>CHANGELOG_DIR</envar>/*/Changelog</filename>
144 (default : <filename>/root/changelogs</filename>).</Para>
145
146 <Para>System states are saved in
147 <filename><envar>BACKUP_DIR</envar></filename> (default
148 <filename>/var/lib/metche)</filename>.</Para>
149 </refsect1>
150
151 <refsect1 id="security"><title>SECURITY</title>
152 <Para>metche is able to use GnuPG to encrypt the email it sends, but does
153 not by default; just enable the <envar>ENCRYPT_EMAIL</envar> configuration
154 option, and make sure <envar>EMAIL_ADDRESS</envar>' public key is in root's
155 keyring, trusted enough to be used blindly by metche.</Para>
156
157 <Para>In its default setup (<envar>ENCRYPT_EMAIL</envar> configuration
158 option disabled) metche sends in <emphasis>clear text email</emphasis> the
159 changes made to the watched directory... either make sure that the
160 <envar>TAR_OPTS</envar> configuration variable prevents it to send sensitive
161 information, or triple check that secure connections will be used end-to-end
162 on the email path. If unsure, set <envar>EMAIL_ADDRESS</envar> configuration
163 variable to a local mailbox.</Para>
164
165 <Para>metche stores, in <envar>BACKUP_DIR</envar> (default :
166 <filename>/var/lib/metche</filename>), various backups of
167 <envar>WATCHED_DIR</envar>. Make sure that this backup place is at least as
168 secured as the source.
169 </refsect1>
170
171 <refsect1 id="bugs"><title>BUGS</title>
172 <Para>See <ulink url="https://poivron.org/dev/metche/">metche's ticket
173 system</ulink> for known bugs, missing features, and the development
174 road-map.</Para>
175 </refsect1>
176
177 <refsect1 id="author"><title>AUTHOR</title>
178 <Para>This manual page was written by the boum collective
179 <email>boum@anargeek.net</email>.</Para>
180 </refsect1>
181
182 </RefEntry>
183
0 .\"Generated by db2man.xsl. Don't modify this, modify the source.
1 .de Sh \" Subsection
2 .br
3 .if t .Sp
4 .ne 5
5 .PP
6 \fB\\$1\fR
7 .PP
8 ..
9 .de Sp \" Vertical space (when we can't use .PP)
10 .if t .sp .5v
11 .if n .sp
12 ..
13 .de Ip \" List item
14 .br
15 .ie \\n(.$>=3 .ne \\$3
16 .el .ne 3
17 .IP "\\$1" \\$2
18 ..
19 .TH "METCHE" 8 "" "" ""
20 .SH NAME
21 metche \- reducing root bus factor
22 .SH "SYNOPSIS"
23 .ad l
24 .hy 0
25 .HP 7
26 \fBmetche\fR {\fBcron\fR | \fBreport\ [{\fBstable\fR\ |\ \fBtesting\fR\ |\ \fBunstable\fR}\-\fIYYYYMMDDHHMM\fR]\fR | \fBlist\fR | \fBstabilize\ [testing\-\fIYYYYMMDDHHMM\fR]\fR}
27 .ad
28 .hy
29
30 .SH "DESCRIPTION"
31
32 .PP
33 metche is a tool meant to facilitate collective sysadmin by monitoring changes in the system configuration\&.
34
35 .PP
36 metche basic usage is to monitor changes in a directory, usually \fI/etc\fR ; optionally, metche can also monitor:
37
38 .TP 3
39 \(bu
40 one or more user maintained changelog files,
41 .TP
42 \(bu
43 the state of Debian packages and versions\&.
44 .LP
45
46 .PP
47 metche should be installed with a cronjob that regularly runs to automatically save the system state as needed\&. These states are saved in a way similar to the Debian development model:
48
49 .TP 3
50 \(bu
51 \fIunstable\fR states are saved as soon as a change is detected\&. They are kept until a new \fItesting\fR state appears\&.
52 .TP
53 \(bu
54 \fItesting\fR states is created from the last \fIunstable\fR state that has not been changed after a short amount of time (by default, one hour)\&. Old \fIunstable\fR states are deleted afterwards\&.
55 .TP
56 \(bu
57 \fIstable\fR states are created from the last \fItesting\fR state, either manually, or after a long amount of time (by default, 3 days)\&. Old \fItesting\fR states are deleted afterwards\&.
58 .LP
59
60 .PP
61 When a new \fItesting\fR state is saved, an email is sent to a configurable address, giving an overwiew of the differences with the previous \fItesting\fR\&. A notification is also sent when a new \fIstable\fR state is saved\&.
62
63 .PP
64 metche's configuration is read from \fI/etc/metche\&.conf\fR\&. Various settings like changelog monitoring or time between system state switches are described there\&.
65
66 .SH "OPTIONS"
67
68 .PP
69 One of the following commands must be specified on the command line:
70
71 .TP
72 \fBreport\fR
73 When run with the \fBreport\fR command, metche displays a report against the specified saved state, or if unspecified, against the latest testing state\&. This is useful when you have broken your system and want to know which changes have been made since a given, known working, system state\&.
74
75 .TP
76 \fBlist\fR
77 When run with the \fBlist\fR command, metche displays a list of all the saved states\&.
78
79 .TP
80 \fBstabilize\fR
81 When run with the \fBstabilize\fR command, metche turns a "testing state" into a "stable state"\&. By default, it will use the last "testing state", but this can be overriden by giving a specific state as argument\&.
82
83 .TP
84 \fBcron\fR
85 This command should not be called manually, but used from a cronjob\&. When called, it can perform various operations like: saving "unstable", "testing" or "stable" states as needed and sending reports and notification if configured to do so\&.
86
87 .SH "FILES"
88
89 .PP
90 \fI/etc/metche\&.conf\fR contains metche configuration\&.
91
92 .PP
93 When configured to monitor one changelog, \fI\fBCHANGELOG_FILE\fR\fR (default \fI/root/Changelog\fR)\&.
94
95 .PP
96 When configured to monitor multiple changelogs, \fI\fBCHANGELOG_DIR\fR/*/Changelog\fR (default : \fI/root/changelogs\fR)\&.
97
98 .PP
99 System states are saved in \fI\fBBACKUP_DIR\fR\fR (default \fI/var/lib/metche)\fR\&.
100
101 .SH "SECURITY"
102
103 .PP
104 metche is able to use GnuPG to encrypt the email it sends, but does not by default; just enable the \fBENCRYPT_EMAIL\fR configuration option, and make sure \fBEMAIL_ADDRESS\fR' public key is in root's keyring, trusted enough to be used blindly by metche\&.
105
106 .PP
107 In its default setup (\fBENCRYPT_EMAIL\fR configuration option disabled) metche sends in \fIclear text email\fR the changes made to the watched directory\&.\&.\&. either make sure that the \fBTAR_OPTS\fR configuration variable prevents it to send sensitive information, or triple check that secure connections will be used end\-to\-end on the email path\&. If unsure, set \fBEMAIL_ADDRESS\fR configuration variable to a local mailbox\&.
108
109 .PP
110 metche stores, in \fBBACKUP_DIR\fR (default : \fI/var/lib/metche\fR), various backups of \fBWATCHED_DIR\fR\&. Make sure that this backup place is at least as secured as the source\&.
111
112 .SH "BUGS"
113
114 .PP
115 See metche's ticket system: \fIhttps://poivron.org/dev/metche/\fR for known bugs, missing features, and the development road\-map\&.
116
117 .SH "AUTHOR"
118
119 .PP
120 This manual page was written by the boum collective <boum@anargeek\&.net>\&.
121