Codebase list metche / be27d6d
Added debian/ directory containing debian package files. ricola 18 years ago
20 changed file(s) with 766 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 metche (0.1) unstable; urgency=low
1
2 * Initial Release.
3 * Modified Makefile to include "install" target.
4
5 -- ricola <ricola@anargeek.net> Thu, 24 Nov 2005 19:18:47 +0100
0 Source: metche
1 Section: admin
2 Priority: optional
3 Maintainer: boum.org collective <boum@anargeek.net>
4 Build-Depends: debhelper (>> 3.0.0), docbook2x
5 Standards-Version: 3.6.1
6
7 Package: metche
8 Architecture: all
9 Depends: mutt, bzip2
10 Recommends: apt-show-versions, gnupg
11 Suggests: util-vserver
12 Description: reducing root bus factor
13 metche is a tool meant to facilitate collective sysadmin ; basically, it
14 periodically :
15 - saves the "system state" to $BACKUP_DIR, i.e. :
16 . $WATCHED_DIR (default: /etc)
17 . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
18 . Debian packages states and versions (using apt-show-versions)
19 - sends you, in a nicely formated email, the "system state" changes ; see
20 https://poivron.org/dev/metche/ for an example.
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-2005 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 usr/sbin
1 var/lib
2 etc/
0 README
0 metche_0.1_all.deb admin optional
0 Package: metche
1 Version: 0.1
2 Section: admin
3 Priority: optional
4 Architecture: all
5 Depends: mutt, bzip2
6 Recommends: apt-show-versions, gnupg
7 Suggests: util-vserver
8 Installed-Size: 104
9 Maintainer: boum.org collective <boum@anargeek.net>
10 Description: reducing root bus factor
11 metche is a tool meant to facilitate collective sysadmin ; basically, it
12 periodically :
13 - saves the "system state" to $BACKUP_DIR, i.e. :
14 . $WATCHED_DIR (default: /etc)
15 . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
16 . Debian packages states and versions (using apt-show-versions)
17 - sends you, in a nicely formated email, the "system state" changes ; see
18 https://poivron.org/dev/metche/ for an example.
0 1b0473ec6d68731a62685dd93d156058 usr/sbin/metche
1 6d17ad76f7107757da416b23f5e627f6 usr/share/doc/metche/README.gz
2 f77ed409e804b3087822a46af8d35205 usr/share/doc/metche/copyright
3 cdbd0ef7ccbf5de8d935fe21f04d4f05 usr/share/doc/metche/examples/metche.conf.default
4 13ff368850030df6c92bad19c308be1e usr/share/doc/metche/examples/metche.cron.d
5 926666f735d713aa3cb81de9e5093e33 usr/share/doc/metche/changelog.gz
6 bdb366a4f2de49295f45a3a892fa8744 usr/share/man/man8/metche.8.gz
7 cdbd0ef7ccbf5de8d935fe21f04d4f05 etc/metche.conf
0 #######################################################################
1 #
2 # metche configuration
3 #
4
5 # Directory watched by metche
6 WATCHED_DIR="/etc"
7
8 # Directory containing backups
9 BACKUP_DIR="/var/lib/metche"
10
11 # Changelogs location (set to "" if you want to disable Changelog's monitoring)
12 CHANGELOG_DIR="/root/changelogs"
13
14 # Debian packages monitoring : uncomment next line to disable (default: enabled)
15 # DO_PACKAGES="no"
16
17 # Minutes until unstable goes to testing
18 TESTING_TIME="60"
19
20 # Days until testing goes to stable
21 STABLE_TIME="3"
22
23 # Address receiving testing changes report
24 EMAIL_ADDRESS="root@localhost"
25
26 # Encrypt emails with GnuPG ? (uncomment next line to do so)
27 # ENCRYPT_EMAIL="yes"
28
29 # Patterns to exclude ; will be used to feed tar and diff
30 TAR_OPTS="--exclude=*.swp --exclude=#* --exclude=*~ --exclude=*.key --exclude=ifstate --exclude=vdirbase --exclude=run.rev --exclude=vdir --exclude=run.rev"
31
32 # locale (will be used to feed LC_ALL)
33 LOCALE="C"
34
35 # Prefix that will be prepended to the commands that should be run
36 # inside a vserver
37 VSERVER_EXEC_PREFIX=""
38 #VSERVER_EXEC_PREFIX="/usr/sbin/vserver blabla exec"
39
40
41 #######################################################################
42 #
43 # Localizable strings
44 #
45
46 # Add your custom headers below
47
48 #_MAIL_SUBJECT="`$VSERVER_EXEC_PREFIX hostname -f` - changes report"
49 #_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state."
50 #_NO_CHANGE="No change."
51 #MAIN_HEADER=""
52 #CHANGELOGS_HEADER=""
53 #FILES_HEADER=""
54 #DEBIAN_PACKAGES_HEADER=""
55 #FILES_DETAILS_HEADER=""
0 #! /bin/bash
1 #
2 # metche: reducing root bus factor
3 # Copyright (C) 2004-2005 boum.org collective - property is theft !
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #
19
20 set -e
21 shopt -s nullglob
22
23 ###
24 ### Auxiliary functions
25 ###
26
27 function display_usage {
28 ( echo "Usage: `basename $0` [-h HOST] list"
29 echo " `basename $0` [-h HOST] report [{stable|testing|unstable}-YYYYMMDDHHMM]"
30 echo " `basename $0` [-h HOST] cron"
31 echo " `basename $0` [-h HOST] stabilize [testing-YYYYMMDDHHMM]"
32 echo "If -h is specified, /etc/metche/HOST.conf is used instead of /etc/metche.conf."
33 echo ""
34 ) >&2
35 }
36
37 function fatal() {
38 echo -e "$@" >&2
39 exit 2
40 }
41
42 function debug() {
43 [ $DEBUG -eq 0 ] || echo -e "debug: $@" >&2
44 }
45
46 function email() {
47 debug "email $@"
48 local SUBJECT="$_MAIL_SUBJECT : $1"
49 if [ $ENCRYPT_EMAIL == "yes" ]; then
50 cat |
51 (LC_ALL="$LOCALE" gpg --batch --armor --encrypt --recipient "$EMAIL_ADDRESS") |
52 (LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS")
53 else
54 cat |
55 (LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS")
56 fi
57 }
58
59 ###
60 ### Configuration
61 ###
62
63 DEBUG=1
64 WATCHED_DIR="/etc"
65 BACKUP_DIR="/var/lib/metche"
66 CHANGELOG_DIR="/root/changelogs"
67 DO_PACKAGES="yes"
68 TESTING_TIME="60"
69 STABLE_TIME="3"
70 EMAIL_ADDRESS="root@`hostname -f`"
71 ENCRYPT_EMAIL="no"
72 TAR_OPTS="--exclude *.swp --exclude #* --exclude *~ --exclude=*.key --exclude=ifstate"
73 LOCALE="C"
74 VSERVER_EXEC_PREFIX=""
75
76 _MAIL_SUBJECT="`hostname -f` - changes report"
77 _NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state."
78 _NO_CHANGE="No change."
79
80 MAIN_HEADER="
81 c h a n g e s r e p o r t
82 ---------------------------
83
84 "
85
86 CHANGELOGS_HEADER="
87
88 Changelogs
89 ==========
90
91 "
92
93 FILES_HEADER="
94
95 Changed files
96 =============
97
98 "
99
100 DEBIAN_PACKAGES_HEADER="
101
102 Changes in Debian packages
103 ==========================
104
105 "
106
107 FILES_DETAILS_HEADER="
108
109 Details for changed files
110 =========================
111
112 "
113
114 if [ "$1" == "-h" ]; then
115 if [ -f /etc/metche/$2.conf ]; then
116 . /etc/metche/$2.conf
117 CMD="$3"
118 MILESTONE="$4"
119 else
120 display_usage
121 fatal "Config file /etc/metche/$2.conf does not exist."
122 fi
123 elif [ -f /etc/metche.conf ]; then
124 . /etc/metche.conf
125 CMD="$1"
126 MILESTONE="$2"
127 else
128 display_usage
129 fatal "Config file not found."
130 fi
131
132 PATH="/bin:/usr/bin"
133 unset LC_ALL
134 unset LC_CTYPE
135 unset LANGUAGE
136 unset LANG
137 umask 077
138
139 test -d "$WATCHED_DIR" || fatal "WATCHED_DIR ($WATCHED_DIR) does not exist."
140 test -d "$BACKUP_DIR" || fatal "BACKUP_DIR ($BACKUP_DIR) does not exist."
141
142 if [ $ENCRYPT_EMAIL == "yes" ]; then
143 gpg --batch --list-public-keys $EMAIL_ADDRESS >/dev/null 2>&1 \
144 || fatal "GnuPG public key for $EMAIL_ADDRESS not found."
145 fi
146
147 DATE=`date "+%Y%m%d%H%M"`
148 WATCHED_PARENT=`dirname $WATCHED_DIR`
149 if [ "$WATCHED_PARENT" != '/' ]; then
150 WATCHED_PARENT="$WATCHED_PARENT/"
151 fi
152
153
154 ###
155 ### Modules enabling/disabling
156 ###
157
158 # Changelogs
159 DO_CHANGELOGS="yes"
160 test -d "$CHANGELOG_DIR" || DO_CHANGELOGS="no"
161
162 # Debian packages
163 # Enabled/disabled by $DO_PACKAGES, initialized to "yes", can be
164 # overriden by the sourced conf file.
165
166
167 ###
168 ### A few functions to do the real work
169 ###
170
171 # Returns 0 if, and only if, specified milestone exists.
172 function milestone_exists() {
173 local MILESTONE="$1"
174 if [ -f "${BACKUP_DIR}/${MILESTONE}.tar.bz2" -o -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ]; then
175 return 0
176 else
177 return 1
178 fi
179 }
180
181 # Echoes the given milestone's version (i.e. "stable", "testing", "unstable")
182 # if it has a valid version, else "none".
183 # The given milestone can be inexistant.
184 function milestone_version() {
185 local MILESTONE="$1"
186 local VERSION="`echo $MILESTONE | sed 's/-.*$//'`"
187 case $VERSION in
188 stable|testing|unstable)
189 echo $VERSION;;
190 *)
191 echo "none";;
192 esac
193 }
194
195 # Echoes given milestone's date.
196 # Symlinks (e.g.: *-latest) are dereferenced if needed.
197 # The given milestone can be inexistant.
198 function milestone_date() {
199 local MILESTONE="$1"
200 [ ! -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ] || MILESTONE="`readlink ${BACKUP_DIR}/${MILESTONE}.tar.bz2`"
201 echo `basename $MILESTONE` | sed 's/.*-//' | sed 's/\..*$//'
202 }
203
204 # Returns 0 if, and only if, the given milestone ($1) is the latest one of its type.
205 # The given milestone can be inexistant.
206 function is_latest() {
207 local FILE MILESTONE
208 local REF_MILESTONE="$1"
209 local REF_DATE="`milestone_date $REF_MILESTONE`"
210 local REF_VERSION="`milestone_version $REF_MILESTONE`"
211 for FILE in "${BACKUP_DIR}/${REF_VERSION}-"*.tar.bz2; do
212 MILESTONE=`basename $FILE | sed 's/\.tar\.bz2$//'`
213 if [ `milestone_date $MILESTONE` -gt $REF_DATE ]; then
214 return 1
215 fi
216 done
217 return 0
218 }
219
220 # This will save an archive of the watched directory with the given prefix
221 function save_files() {
222 debug " - save_files $@"
223 tar jcf "$BACKUP_DIR/$1-$DATE".tar.bz2 \
224 -C "$WATCHED_PARENT" $TAR_OPTS `basename "$WATCHED_DIR"`
225 ln -sf "$1-$DATE".tar.bz2 "$BACKUP_DIR/$1"-latest.tar.bz2
226 }
227
228 # This will save packages list with the given prefix
229 function save_packages() {
230 debug " - save_packages $@"
231 $VSERVER_EXEC_PREFIX apt-show-versions -i
232 $VSERVER_EXEC_PREFIX apt-show-versions | sort > "$BACKUP_DIR/$1-$DATE".packages
233 ln -sf "$1-$DATE".packages "$BACKUP_DIR/$1"-latest.packages
234 }
235
236 # This will save Changelogs with the given prefix
237 function save_changelogs() {
238 debug " - save_changelogs $@"
239 local CHANGELOG DOMAIN file
240
241 for file in "$CHANGELOG_DIR"/*/Changelog; do
242 CHANGELOG="${file##$CHANGELOG_DIR/}"
243 DOMAIN="${CHANGELOG%%/Changelog}"
244 cat "$file" > "$BACKUP_DIR/$1-$DATE.$DOMAIN.Changelog"
245 ln -sf "$1-$DATE.$DOMAIN.Changelog" \
246 "$BACKUP_DIR/$1-latest.$DOMAIN.Changelog"
247 done
248 }
249
250 # Save whatever reflect the current state with the given prefix
251 function save_state() {
252 debug "save_state $@"
253 save_files "$1"
254 [ $DO_PACKAGES == "no" ] || save_packages "$1"
255 [ $DO_CHANGELOGS == "no" ] || save_changelogs "$1"
256 }
257
258 # Report changes against given version to standard output
259 function report_changes() {
260 debug "report_changes $@"
261 local RULER TMP TMPDIR CHANGELOG DOMAIN DIFF TAR_DIFF DIFF_DIFF FILES OLD NEW TMP_PACKAGES file
262
263 # Just for fancy graphics
264 RULER=`echo "$WATCHED_DIR" | tr '[:print:]' '='`
265
266 # File to store results
267 TMP=`mktemp -q`
268 # We need to diff against given version, so extract it
269 TMPDIR=`mktemp -d -q`
270 tar jxf "$BACKUP_DIR/$1".tar.bz2 -C "$TMPDIR"
271
272 echo "$MAIN_HEADER" >> "$TMP"
273
274 if [ $DO_CHANGELOGS == "yes" ]; then
275 echo "$CHANGELOGS_HEADER" >> "$TMP"
276 for file in "$CHANGELOG_DIR"/*/Changelog; do
277 CHANGELOG="${file##$CHANGELOG_DIR/}"
278 DOMAIN="${CHANGELOG%%/Changelog}"
279 DIFF=`LC_ALL=$LOCALE diff -wEbBN "$BACKUP_DIR/$1.$DOMAIN.Changelog" \
280 "$file"` || (echo "$DOMAIN:" ; echo "$DIFF" |
281 grep -v '^[0-9-]\|^\\') >> "$TMP"
282 done
283 fi
284
285 echo "$FILES_HEADER" >> "$TMP"
286
287 # Find differences with tar
288 TAR_DIFF=$(tar jdf "$BACKUP_DIR/$1".tar.bz2 \
289 -C "$WATCHED_PARENT" $TAR_OPTS 2>&1 |
290 # transform:
291 # etc/issue: Gid differs -> etc/issue
292 # tar: etc/irssi.conf: ... -> etc/irssi.conf
293 sed -e 's/\(tar: \)\?\([^:]*\):.*/\2/')
294 # Get new files
295 DIFF_DIFF=$(diff -qr $TAR_OPTS "$TMPDIR"/`basename "$WATCHED_DIR"` "$WATCHED_DIR" 2>/dev/null |
296 # Only in test/etc: issue -> test/etc/issue
297 sed -n -e "s,^Only in $WATCHED_PARENT\([^:]*\): \(.*\),\1/\2,p")
298 FILES="$TAR_DIFF$DIFF_DIFF"
299 if [ "$FILES" = "" ]; then
300 echo "$_NO_CHANGE" >> "$TMP"
301 else
302 for file in $FILES; do
303 OLD="$TMPDIR"/"$file"
304 NEW="$WATCHED_PARENT$file"
305 if [ -e "$OLD" -a -e "$NEW" ]; then
306 echo -n '< '
307 ls -ld "$OLD" | sed -e "s;$TMPDIR/;;"
308 echo -n '> '
309 ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;"
310 elif [ -e "$OLD" ]; then
311 echo -n '- '
312 ls -ld "$OLD" | sed -e "s;$TMPDIR/;;"
313 elif [ -e "$NEW" ]; then
314 echo -n '+ '
315 ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;"
316 fi
317 done >> "$TMP"
318 fi
319
320 if [ $DO_PACKAGES == "yes" ]; then
321 echo "$DEBIAN_PACKAGES_HEADER" >> "$TMP"
322
323 TMP_PACKAGES=`mktemp -q`
324 $VSERVER_EXEC_PREFIX apt-show-versions -i
325 $VSERVER_EXEC_PREFIX apt-show-versions | sort > "$TMP_PACKAGES"
326 if diff -wEbB "$BACKUP_DIR/$1".packages "$TMP_PACKAGES"; then
327 echo "$_NO_DEBIAN_PACKAGES_CHANGE"
328 fi | grep -v '^[0-9-]' >> "$TMP"
329 fi
330
331 echo "$FILES_DETAILS_HEADER" >> "$TMP"
332
333 # Just diff it!
334 if (LC_ALL=$LOCALE diff -urBN $TAR_OPTS \
335 --minimal "$TMPDIR"/`basename "$WATCHED_DIR"` \
336 "$WATCHED_DIR" 2>/dev/null); then
337 echo "$_NO_CHANGE"
338 fi | grep -v '^--- \|diff ' |
339 sed -e "s;^+++ $WATCHED_PARENT\([^ ]*\) .*;+++ \1;" \
340 >> "$TMP"
341
342 # Put report on standard output
343 cat "$TMP"
344
345 # Clean temporaries
346 rm -rf "$TMP" "$TMPDIR"
347 }
348
349 # Turns into stable the given testing.
350 # NB: argument validity is supposed to have been already checked.
351 function stabilize_state() {
352 debug "stabilize_state $@"
353 local TESTING STABLE FILE DST
354 TESTING="$1"
355 # follow symlink if needed
356 if [ -L "${BACKUP_DIR}/$TESTING".tar.bz2 ]; then
357 TESTING="`readlink ${BACKUP_DIR}/${TESTING}.tar.bz2`"
358 TESTING="`basename $TESTING | sed 's/\..*//'`"
359 fi
360 STABLE="`echo $TESTING | sed 's/^testing/stable/'`"
361 for FILE in "${BACKUP_DIR}/${TESTING}"*; do
362 DST="`echo $FILE | sed 's/\/testing-/\/stable-/'`"
363 cp "$FILE" "$DST"
364 # create/change stable-latest* links if, and only if, it's really the latest
365 is_latest $STABLE && \
366 ln -sf "`basename $DST`" "${BACKUP_DIR}/`basename $DST | sed 's/-[0-9]*\./-latest\./'`"
367 done
368 }
369
370 ###
371 ### Main
372 ###
373
374 # make sure we've got at least one testing and one stable
375 milestone_exists testing-latest || save_state "testing"
376 milestone_exists stable-latest || stabilize_state "testing-latest"
377
378 case "$CMD" in
379
380 report)
381 [ "$MILESTONE" == "" ] && { report_changes "testing-latest"; exit 0; }
382 milestone_exists "$MILESTONE" && { report_changes "$MILESTONE"; exit 0; }
383 display_usage
384 fatal "The specified state does not exist."
385 ;;
386
387 list)
388 for file in "$BACKUP_DIR"/*.tar.bz2; do
389 echo `basename ${file%%.tar.bz2}`
390 done
391 exit 0
392 ;;
393
394 cron)
395 ### Algorithm
396 #
397 # if (no change happened for TESTING_TIME) then
398 # if (something has changed since the last testing) then
399 # send a report against last testing
400 # save a new testing state
401 # delete all saved unstable states
402 # elif (no change happened for STABLE_TIME) then
403 # if (something has changed since the last stable) then
404 # save a new stable state and notify EMAIL_ADDRESS
405 # delete all saved testing states older than STABLE_TIME
406 # fi
407 # fi
408 # elif (last unstable exists) then
409 # if (something has changed since the last unstable) then
410 # save a new unstable state
411 # fi
412 # else
413 # save a new unstable state
414 # fi
415 if [ "`find "$WATCHED_DIR" -cmin "-$TESTING_TIME" | head -1`" == "" ]; then
416 if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/testing-latest.tar.bz2 | head -1`" != "" ]; then
417 report_changes "testing-latest" | email "testing-$DATE"
418 save_state "testing"
419 debug "removing all saved unstable states."
420 find "$BACKUP_DIR" -name 'unstable-*' -exec rm "{}" \;
421 elif [ "`find "$WATCHED_DIR" -ctime "-$STABLE_TIME" | head -1`" = "" ]; then
422 if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/stable-latest.tar.bz2 | head -1`" != "" ]; then
423 save_state "stable"
424 echo "metche saved a new stable state : stable-${DATE}." | email "stable-$DATE"
425 debug "removing all saved testing states older that STABLE_TIME ($STABLE_TIME)."
426 find "$BACKUP_DIR" -name 'testing-*' -ctime +"$STABLE_TIME" -exec rm "{}" \;
427 fi
428 fi
429 exit 0
430 fi
431 milestone_exists unstable-latest && \
432 {
433 if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/unstable-latest.tar.bz2 | head -1`" != "" ]; then
434 save_state "unstable"
435 fi;
436 exit 0;
437 }
438 save_state "unstable"
439 ;;
440
441 stabilize)
442 [ "$MILESTONE" == "" ] && { stabilize_state "testing-latest"; exit 0; }
443 "`milestone_version $MILESTONE`" == "testing" \
444 && milestone_exists $MILESTONE \
445 && stabilize_state "$MILESTONE"
446 display_usage
447 fatal "The specified state is not an existing testing state."
448 exit 0
449 ;;
450
451 test)
452 milestone_version "stable-200507040202"
453 milestone_version "testing-latest"
454 milestone_version "testing-200507030047"
455 milestone_version "testing-200507030047qsfd"
456 milestone_date "stable-200507040202"
457 milestone_date "testing-latest"
458 milestone_date "testing-200507030047"
459 milestone_date "testing-200507030047qsfd"
460 (is_latest testing-latest && echo oui) || echo non
461 (is_latest testing-200507031821 && echo oui) || echo non
462 (is_latest stable-200507031831 && echo oui) || echo non
463 (is_latest stable-200507040202 && echo oui) || echo non
464 ;;
465
466 *)
467 display_usage
468 exit 1
469 ;;
470 esac
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-2005 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 #
2 # metche configuration
3 #
4
5 # Directory watched by metche
6 WATCHED_DIR="/etc"
7
8 # Directory containing backups
9 BACKUP_DIR="/var/lib/metche"
10
11 # Changelogs location (set to "" if you want to disable Changelog's monitoring)
12 CHANGELOG_DIR="/root/changelogs"
13
14 # Debian packages monitoring : uncomment next line to disable (default: enabled)
15 # DO_PACKAGES="no"
16
17 # Minutes until unstable goes to testing
18 TESTING_TIME="60"
19
20 # Days until testing goes to stable
21 STABLE_TIME="3"
22
23 # Address receiving testing changes report
24 EMAIL_ADDRESS="root@localhost"
25
26 # Encrypt emails with GnuPG ? (uncomment next line to do so)
27 # ENCRYPT_EMAIL="yes"
28
29 # Patterns to exclude ; will be used to feed tar and diff
30 TAR_OPTS="--exclude=*.swp --exclude=#* --exclude=*~ --exclude=*.key --exclude=ifstate --exclude=vdirbase --exclude=run.rev --exclude=vdir --exclude=run.rev"
31
32 # locale (will be used to feed LC_ALL)
33 LOCALE="C"
34
35 # Prefix that will be prepended to the commands that should be run
36 # inside a vserver
37 VSERVER_EXEC_PREFIX=""
38 #VSERVER_EXEC_PREFIX="/usr/sbin/vserver blabla exec"
39
40
41 #######################################################################
42 #
43 # Localizable strings
44 #
45
46 # Add your custom headers below
47
48 #_MAIL_SUBJECT="`$VSERVER_EXEC_PREFIX hostname -f` - changes report"
49 #_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state."
50 #_NO_CHANGE="No change."
51 #MAIN_HEADER=""
52 #CHANGELOGS_HEADER=""
53 #FILES_HEADER=""
54 #DEBIAN_PACKAGES_HEADER=""
55 #FILES_DETAILS_HEADER=""
0 0-59/5 * * * * root test -x /usr/local/sbin/metche && /usr/local/sbin/metche cron
0 metche.conf.default
1 metche.cron.d
0 #!/usr/bin/make -f
1 # -*- makefile -*-
2 # Sample debian/rules that uses debhelper.
3 # This file was originally written by Joey Hess and Craig Small.
4 # As a special exception, when this file is copied by dh-make into a
5 # dh-make output file, you may use that output file without restriction.
6 # This special exception was added by Craig Small in version 0.37 of dh-make.
7
8 # Uncomment this to turn on verbose mode.
9 #export DH_VERBOSE=1
10
11
12 configure: configure-stamp
13 configure-stamp:
14 dh_testdir
15 # Add here commands to configure the package.
16
17 touch configure-stamp
18
19
20 build: build-stamp
21
22 build-stamp: configure-stamp
23 dh_testdir
24
25 # Add here commands to compile the package.
26 $(MAKE)
27 sgml2xml -xlower -xid metche-manpage.sgml > metche-manpage.xml
28 db2x_xsltproc -s /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl metche-manpage.xml
29
30 touch build-stamp
31
32 clean:
33 dh_testdir
34 dh_testroot
35 rm -f build-stamp configure-stamp
36
37 # Add here commands to clean up after the build process.
38 -$(MAKE) clean
39
40 dh_clean
41
42 install: build
43 dh_testdir
44 dh_testroot
45 dh_clean -k
46 dh_installdirs
47
48 # Add here commands to install the package into debian/metche.
49 $(MAKE) install DESTDIR=$(CURDIR)/debian/metche
50
51
52 # Build architecture-independent files here.
53 binary-indep: build install
54 # We have nothing to do by default.
55
56 # Build architecture-dependent files here.
57 binary-arch: build install
58 dh_testdir
59 dh_testroot
60 dh_installchangelogs
61 dh_installdocs
62 dh_installexamples
63 # dh_install
64 # dh_installmenu
65 # dh_installdebconf
66 # dh_installlogrotate
67 # dh_installemacsen
68 # dh_installpam
69 # dh_installmime
70 # dh_installinit
71 dh_installcron
72 # dh_installinfo
73 dh_installman metche.8
74 dh_link
75 dh_strip
76 dh_compress
77 dh_fixperms
78 # dh_perl
79 # dh_python
80 # dh_makeshlibs
81 dh_installdeb
82 dh_shlibdeps
83 dh_gencontrol
84 dh_md5sums
85 dh_builddeb
86
87 binary: binary-indep binary-arch
88 .PHONY: build clean binary-indep binary-arch binary install configure