diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f4e68aa --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +metche (0.1) unstable; urgency=low + + * Initial Release. + * Modified Makefile to include "install" target. + + -- ricola Thu, 24 Nov 2005 19:18:47 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..20247c2 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: metche +Section: admin +Priority: optional +Maintainer: boum.org collective +Build-Depends: debhelper (>> 3.0.0), docbook2x +Standards-Version: 3.6.1 + +Package: metche +Architecture: all +Depends: mutt, bzip2 +Recommends: apt-show-versions, gnupg +Suggests: util-vserver +Description: reducing root bus factor + metche is a tool meant to facilitate collective sysadmin ; basically, it + periodically : + - saves the "system state" to $BACKUP_DIR, i.e. : + . $WATCHED_DIR (default: /etc) + . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog) + . Debian packages states and versions (using apt-show-versions) + - sends you, in a nicely formated email, the "system state" changes ; see + https://poivron.org/dev/metche/ for an example. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..860331a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,15 @@ +This package was debianized by boum.org collective on +Thu, 24 Nov 2005 19:18:47 +0100. + +It was downloaded from http://www.poivron.org/dev/metche + +Copyright: + +Upstream Authors: boum.org collective + +Copyright (C) 2004-2005 boum.org collective - property is theft ! + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in the file `/usr/share/common-licenses/GPL'. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..249ccda --- /dev/null +++ b/debian/dirs @@ -0,0 +1,3 @@ +usr/sbin +var/lib +etc/ diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..91f87d7 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +metche_0.1_all.deb admin optional diff --git a/debian/metche/DEBIAN/conffiles b/debian/metche/DEBIAN/conffiles new file mode 100644 index 0000000..98206a3 --- /dev/null +++ b/debian/metche/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/metche.conf diff --git a/debian/metche/DEBIAN/control b/debian/metche/DEBIAN/control new file mode 100644 index 0000000..bc74e3f --- /dev/null +++ b/debian/metche/DEBIAN/control @@ -0,0 +1,19 @@ +Package: metche +Version: 0.1 +Section: admin +Priority: optional +Architecture: all +Depends: mutt, bzip2 +Recommends: apt-show-versions, gnupg +Suggests: util-vserver +Installed-Size: 104 +Maintainer: boum.org collective +Description: reducing root bus factor + metche is a tool meant to facilitate collective sysadmin ; basically, it + periodically : + - saves the "system state" to $BACKUP_DIR, i.e. : + . $WATCHED_DIR (default: /etc) + . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog) + . Debian packages states and versions (using apt-show-versions) + - sends you, in a nicely formated email, the "system state" changes ; see + https://poivron.org/dev/metche/ for an example. diff --git a/debian/metche/DEBIAN/md5sums b/debian/metche/DEBIAN/md5sums new file mode 100644 index 0000000..30c8eb4 --- /dev/null +++ b/debian/metche/DEBIAN/md5sums @@ -0,0 +1,8 @@ +1b0473ec6d68731a62685dd93d156058 usr/sbin/metche +6d17ad76f7107757da416b23f5e627f6 usr/share/doc/metche/README.gz +f77ed409e804b3087822a46af8d35205 usr/share/doc/metche/copyright +cdbd0ef7ccbf5de8d935fe21f04d4f05 usr/share/doc/metche/examples/metche.conf.default +13ff368850030df6c92bad19c308be1e usr/share/doc/metche/examples/metche.cron.d +926666f735d713aa3cb81de9e5093e33 usr/share/doc/metche/changelog.gz +bdb366a4f2de49295f45a3a892fa8744 usr/share/man/man8/metche.8.gz +cdbd0ef7ccbf5de8d935fe21f04d4f05 etc/metche.conf diff --git a/debian/metche/etc/metche.conf b/debian/metche/etc/metche.conf new file mode 100644 index 0000000..37efe67 --- /dev/null +++ b/debian/metche/etc/metche.conf @@ -0,0 +1,56 @@ +####################################################################### +# +# metche configuration +# + +# Directory watched by metche +WATCHED_DIR="/etc" + +# Directory containing backups +BACKUP_DIR="/var/lib/metche" + +# Changelogs location (set to "" if you want to disable Changelog's monitoring) +CHANGELOG_DIR="/root/changelogs" + +# Debian packages monitoring : uncomment next line to disable (default: enabled) +# DO_PACKAGES="no" + +# Minutes until unstable goes to testing +TESTING_TIME="60" + +# Days until testing goes to stable +STABLE_TIME="3" + +# Address receiving testing changes report +EMAIL_ADDRESS="root@localhost" + +# Encrypt emails with GnuPG ? (uncomment next line to do so) +# ENCRYPT_EMAIL="yes" + +# Patterns to exclude ; will be used to feed tar and diff +TAR_OPTS="--exclude=*.swp --exclude=#* --exclude=*~ --exclude=*.key --exclude=ifstate --exclude=vdirbase --exclude=run.rev --exclude=vdir --exclude=run.rev" + +# locale (will be used to feed LC_ALL) +LOCALE="C" + +# Prefix that will be prepended to the commands that should be run +# inside a vserver +VSERVER_EXEC_PREFIX="" +#VSERVER_EXEC_PREFIX="/usr/sbin/vserver blabla exec" + + +####################################################################### +# +# Localizable strings +# + +# Add your custom headers below + +#_MAIL_SUBJECT="`$VSERVER_EXEC_PREFIX hostname -f` - changes report" +#_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state." +#_NO_CHANGE="No change." +#MAIN_HEADER="" +#CHANGELOGS_HEADER="" +#FILES_HEADER="" +#DEBIAN_PACKAGES_HEADER="" +#FILES_DETAILS_HEADER="" diff --git a/debian/metche/usr/sbin/metche b/debian/metche/usr/sbin/metche new file mode 100755 index 0000000..1063e9d --- /dev/null +++ b/debian/metche/usr/sbin/metche @@ -0,0 +1,471 @@ +#! /bin/bash +# +# metche: reducing root bus factor +# Copyright (C) 2004-2005 boum.org collective - property is theft ! +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +set -e +shopt -s nullglob + +### +### Auxiliary functions +### + +function display_usage { + ( echo "Usage: `basename $0` [-h HOST] list" + echo " `basename $0` [-h HOST] report [{stable|testing|unstable}-YYYYMMDDHHMM]" + echo " `basename $0` [-h HOST] cron" + echo " `basename $0` [-h HOST] stabilize [testing-YYYYMMDDHHMM]" + echo "If -h is specified, /etc/metche/HOST.conf is used instead of /etc/metche.conf." + echo "" + ) >&2 +} + +function fatal() { + echo -e "$@" >&2 + exit 2 +} + +function debug() { + [ $DEBUG -eq 0 ] || echo -e "debug: $@" >&2 +} + +function email() { + debug "email $@" + local SUBJECT="$_MAIL_SUBJECT : $1" + if [ $ENCRYPT_EMAIL == "yes" ]; then + cat | + (LC_ALL="$LOCALE" gpg --batch --armor --encrypt --recipient "$EMAIL_ADDRESS") | + (LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS") + else + cat | + (LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS") + fi +} + +### +### Configuration +### + +DEBUG=1 +WATCHED_DIR="/etc" +BACKUP_DIR="/var/lib/metche" +CHANGELOG_DIR="/root/changelogs" +DO_PACKAGES="yes" +TESTING_TIME="60" +STABLE_TIME="3" +EMAIL_ADDRESS="root@`hostname -f`" +ENCRYPT_EMAIL="no" +TAR_OPTS="--exclude *.swp --exclude #* --exclude *~ --exclude=*.key --exclude=ifstate" +LOCALE="C" +VSERVER_EXEC_PREFIX="" + +_MAIL_SUBJECT="`hostname -f` - changes report" +_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state." +_NO_CHANGE="No change." + +MAIN_HEADER=" + c h a n g e s r e p o r t + --------------------------- + +" + +CHANGELOGS_HEADER=" + +Changelogs +========== + +" + +FILES_HEADER=" + +Changed files +============= + +" + +DEBIAN_PACKAGES_HEADER=" + +Changes in Debian packages +========================== + +" + +FILES_DETAILS_HEADER=" + +Details for changed files +========================= + +" + +if [ "$1" == "-h" ]; then + if [ -f /etc/metche/$2.conf ]; then + . /etc/metche/$2.conf + CMD="$3" + MILESTONE="$4" + else + display_usage + fatal "Config file /etc/metche/$2.conf does not exist." + fi +elif [ -f /etc/metche.conf ]; then + . /etc/metche.conf + CMD="$1" + MILESTONE="$2" +else + display_usage + fatal "Config file not found." +fi + +PATH="/bin:/usr/bin" +unset LC_ALL +unset LC_CTYPE +unset LANGUAGE +unset LANG +umask 077 + +test -d "$WATCHED_DIR" || fatal "WATCHED_DIR ($WATCHED_DIR) does not exist." +test -d "$BACKUP_DIR" || fatal "BACKUP_DIR ($BACKUP_DIR) does not exist." + +if [ $ENCRYPT_EMAIL == "yes" ]; then + gpg --batch --list-public-keys $EMAIL_ADDRESS >/dev/null 2>&1 \ + || fatal "GnuPG public key for $EMAIL_ADDRESS not found." +fi + +DATE=`date "+%Y%m%d%H%M"` +WATCHED_PARENT=`dirname $WATCHED_DIR` +if [ "$WATCHED_PARENT" != '/' ]; then + WATCHED_PARENT="$WATCHED_PARENT/" +fi + + +### +### Modules enabling/disabling +### + +# Changelogs +DO_CHANGELOGS="yes" +test -d "$CHANGELOG_DIR" || DO_CHANGELOGS="no" + +# Debian packages +# Enabled/disabled by $DO_PACKAGES, initialized to "yes", can be +# overriden by the sourced conf file. + + +### +### A few functions to do the real work +### + +# Returns 0 if, and only if, specified milestone exists. +function milestone_exists() { + local MILESTONE="$1" + if [ -f "${BACKUP_DIR}/${MILESTONE}.tar.bz2" -o -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ]; then + return 0 + else + return 1 + fi +} + +# Echoes the given milestone's version (i.e. "stable", "testing", "unstable") +# if it has a valid version, else "none". +# The given milestone can be inexistant. +function milestone_version() { + local MILESTONE="$1" + local VERSION="`echo $MILESTONE | sed 's/-.*$//'`" + case $VERSION in + stable|testing|unstable) + echo $VERSION;; + *) + echo "none";; + esac +} + +# Echoes given milestone's date. +# Symlinks (e.g.: *-latest) are dereferenced if needed. +# The given milestone can be inexistant. +function milestone_date() { + local MILESTONE="$1" + [ ! -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ] || MILESTONE="`readlink ${BACKUP_DIR}/${MILESTONE}.tar.bz2`" + echo `basename $MILESTONE` | sed 's/.*-//' | sed 's/\..*$//' +} + +# Returns 0 if, and only if, the given milestone ($1) is the latest one of its type. +# The given milestone can be inexistant. +function is_latest() { + local FILE MILESTONE + local REF_MILESTONE="$1" + local REF_DATE="`milestone_date $REF_MILESTONE`" + local REF_VERSION="`milestone_version $REF_MILESTONE`" + for FILE in "${BACKUP_DIR}/${REF_VERSION}-"*.tar.bz2; do + MILESTONE=`basename $FILE | sed 's/\.tar\.bz2$//'` + if [ `milestone_date $MILESTONE` -gt $REF_DATE ]; then + return 1 + fi + done + return 0 +} + +# This will save an archive of the watched directory with the given prefix +function save_files() { + debug " - save_files $@" + tar jcf "$BACKUP_DIR/$1-$DATE".tar.bz2 \ + -C "$WATCHED_PARENT" $TAR_OPTS `basename "$WATCHED_DIR"` + ln -sf "$1-$DATE".tar.bz2 "$BACKUP_DIR/$1"-latest.tar.bz2 +} + +# This will save packages list with the given prefix +function save_packages() { + debug " - save_packages $@" + $VSERVER_EXEC_PREFIX apt-show-versions -i + $VSERVER_EXEC_PREFIX apt-show-versions | sort > "$BACKUP_DIR/$1-$DATE".packages + ln -sf "$1-$DATE".packages "$BACKUP_DIR/$1"-latest.packages +} + +# This will save Changelogs with the given prefix +function save_changelogs() { + debug " - save_changelogs $@" + local CHANGELOG DOMAIN file + + for file in "$CHANGELOG_DIR"/*/Changelog; do + CHANGELOG="${file##$CHANGELOG_DIR/}" + DOMAIN="${CHANGELOG%%/Changelog}" + cat "$file" > "$BACKUP_DIR/$1-$DATE.$DOMAIN.Changelog" + ln -sf "$1-$DATE.$DOMAIN.Changelog" \ + "$BACKUP_DIR/$1-latest.$DOMAIN.Changelog" + done +} + +# Save whatever reflect the current state with the given prefix +function save_state() { + debug "save_state $@" + save_files "$1" + [ $DO_PACKAGES == "no" ] || save_packages "$1" + [ $DO_CHANGELOGS == "no" ] || save_changelogs "$1" +} + +# Report changes against given version to standard output +function report_changes() { + debug "report_changes $@" + local RULER TMP TMPDIR CHANGELOG DOMAIN DIFF TAR_DIFF DIFF_DIFF FILES OLD NEW TMP_PACKAGES file + + # Just for fancy graphics + RULER=`echo "$WATCHED_DIR" | tr '[:print:]' '='` + + # File to store results + TMP=`mktemp -q` + # We need to diff against given version, so extract it + TMPDIR=`mktemp -d -q` + tar jxf "$BACKUP_DIR/$1".tar.bz2 -C "$TMPDIR" + + echo "$MAIN_HEADER" >> "$TMP" + + if [ $DO_CHANGELOGS == "yes" ]; then + echo "$CHANGELOGS_HEADER" >> "$TMP" + for file in "$CHANGELOG_DIR"/*/Changelog; do + CHANGELOG="${file##$CHANGELOG_DIR/}" + DOMAIN="${CHANGELOG%%/Changelog}" + DIFF=`LC_ALL=$LOCALE diff -wEbBN "$BACKUP_DIR/$1.$DOMAIN.Changelog" \ + "$file"` || (echo "$DOMAIN:" ; echo "$DIFF" | + grep -v '^[0-9-]\|^\\') >> "$TMP" + done + fi + + echo "$FILES_HEADER" >> "$TMP" + + # Find differences with tar + TAR_DIFF=$(tar jdf "$BACKUP_DIR/$1".tar.bz2 \ + -C "$WATCHED_PARENT" $TAR_OPTS 2>&1 | + # transform: + # etc/issue: Gid differs -> etc/issue + # tar: etc/irssi.conf: ... -> etc/irssi.conf + sed -e 's/\(tar: \)\?\([^:]*\):.*/\2/') + # Get new files + DIFF_DIFF=$(diff -qr $TAR_OPTS "$TMPDIR"/`basename "$WATCHED_DIR"` "$WATCHED_DIR" 2>/dev/null | + # Only in test/etc: issue -> test/etc/issue + sed -n -e "s,^Only in $WATCHED_PARENT\([^:]*\): \(.*\),\1/\2,p") + FILES="$TAR_DIFF$DIFF_DIFF" + if [ "$FILES" = "" ]; then + echo "$_NO_CHANGE" >> "$TMP" + else + for file in $FILES; do + OLD="$TMPDIR"/"$file" + NEW="$WATCHED_PARENT$file" + if [ -e "$OLD" -a -e "$NEW" ]; then + echo -n '< ' + ls -ld "$OLD" | sed -e "s;$TMPDIR/;;" + echo -n '> ' + ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;" + elif [ -e "$OLD" ]; then + echo -n '- ' + ls -ld "$OLD" | sed -e "s;$TMPDIR/;;" + elif [ -e "$NEW" ]; then + echo -n '+ ' + ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;" + fi + done >> "$TMP" + fi + + if [ $DO_PACKAGES == "yes" ]; then + echo "$DEBIAN_PACKAGES_HEADER" >> "$TMP" + + TMP_PACKAGES=`mktemp -q` + $VSERVER_EXEC_PREFIX apt-show-versions -i + $VSERVER_EXEC_PREFIX apt-show-versions | sort > "$TMP_PACKAGES" + if diff -wEbB "$BACKUP_DIR/$1".packages "$TMP_PACKAGES"; then + echo "$_NO_DEBIAN_PACKAGES_CHANGE" + fi | grep -v '^[0-9-]' >> "$TMP" + fi + + echo "$FILES_DETAILS_HEADER" >> "$TMP" + + # Just diff it! + if (LC_ALL=$LOCALE diff -urBN $TAR_OPTS \ + --minimal "$TMPDIR"/`basename "$WATCHED_DIR"` \ + "$WATCHED_DIR" 2>/dev/null); then + echo "$_NO_CHANGE" + fi | grep -v '^--- \|diff ' | + sed -e "s;^+++ $WATCHED_PARENT\([^ ]*\) .*;+++ \1;" \ + >> "$TMP" + + # Put report on standard output + cat "$TMP" + + # Clean temporaries + rm -rf "$TMP" "$TMPDIR" +} + +# Turns into stable the given testing. +# NB: argument validity is supposed to have been already checked. +function stabilize_state() { + debug "stabilize_state $@" + local TESTING STABLE FILE DST + TESTING="$1" + # follow symlink if needed + if [ -L "${BACKUP_DIR}/$TESTING".tar.bz2 ]; then + TESTING="`readlink ${BACKUP_DIR}/${TESTING}.tar.bz2`" + TESTING="`basename $TESTING | sed 's/\..*//'`" + fi + STABLE="`echo $TESTING | sed 's/^testing/stable/'`" + for FILE in "${BACKUP_DIR}/${TESTING}"*; do + DST="`echo $FILE | sed 's/\/testing-/\/stable-/'`" + cp "$FILE" "$DST" + # create/change stable-latest* links if, and only if, it's really the latest + is_latest $STABLE && \ + ln -sf "`basename $DST`" "${BACKUP_DIR}/`basename $DST | sed 's/-[0-9]*\./-latest\./'`" + done +} + +### +### Main +### + +# make sure we've got at least one testing and one stable +milestone_exists testing-latest || save_state "testing" +milestone_exists stable-latest || stabilize_state "testing-latest" + +case "$CMD" in + + report) + [ "$MILESTONE" == "" ] && { report_changes "testing-latest"; exit 0; } + milestone_exists "$MILESTONE" && { report_changes "$MILESTONE"; exit 0; } + display_usage + fatal "The specified state does not exist." + ;; + + list) + for file in "$BACKUP_DIR"/*.tar.bz2; do + echo `basename ${file%%.tar.bz2}` + done + exit 0 + ;; + + cron) + ### Algorithm + # + # if (no change happened for TESTING_TIME) then + # if (something has changed since the last testing) then + # send a report against last testing + # save a new testing state + # delete all saved unstable states + # elif (no change happened for STABLE_TIME) then + # if (something has changed since the last stable) then + # save a new stable state and notify EMAIL_ADDRESS + # delete all saved testing states older than STABLE_TIME + # fi + # fi + # elif (last unstable exists) then + # if (something has changed since the last unstable) then + # save a new unstable state + # fi + # else + # save a new unstable state + # fi + if [ "`find "$WATCHED_DIR" -cmin "-$TESTING_TIME" | head -1`" == "" ]; then + if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/testing-latest.tar.bz2 | head -1`" != "" ]; then + report_changes "testing-latest" | email "testing-$DATE" + save_state "testing" + debug "removing all saved unstable states." + find "$BACKUP_DIR" -name 'unstable-*' -exec rm "{}" \; + elif [ "`find "$WATCHED_DIR" -ctime "-$STABLE_TIME" | head -1`" = "" ]; then + if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/stable-latest.tar.bz2 | head -1`" != "" ]; then + save_state "stable" + echo "metche saved a new stable state : stable-${DATE}." | email "stable-$DATE" + debug "removing all saved testing states older that STABLE_TIME ($STABLE_TIME)." + find "$BACKUP_DIR" -name 'testing-*' -ctime +"$STABLE_TIME" -exec rm "{}" \; + fi + fi + exit 0 + fi + milestone_exists unstable-latest && \ + { + if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/unstable-latest.tar.bz2 | head -1`" != "" ]; then + save_state "unstable" + fi; + exit 0; + } + save_state "unstable" + ;; + + stabilize) + [ "$MILESTONE" == "" ] && { stabilize_state "testing-latest"; exit 0; } + "`milestone_version $MILESTONE`" == "testing" \ + && milestone_exists $MILESTONE \ + && stabilize_state "$MILESTONE" + display_usage + fatal "The specified state is not an existing testing state." + exit 0 + ;; + + test) + milestone_version "stable-200507040202" + milestone_version "testing-latest" + milestone_version "testing-200507030047" + milestone_version "testing-200507030047qsfd" + milestone_date "stable-200507040202" + milestone_date "testing-latest" + milestone_date "testing-200507030047" + milestone_date "testing-200507030047qsfd" + (is_latest testing-latest && echo oui) || echo non + (is_latest testing-200507031821 && echo oui) || echo non + (is_latest stable-200507031831 && echo oui) || echo non + (is_latest stable-200507040202 && echo oui) || echo non + ;; + + *) + display_usage + exit 1 + ;; +esac diff --git a/debian/metche/usr/share/doc/metche/README.gz b/debian/metche/usr/share/doc/metche/README.gz new file mode 100644 index 0000000..976aa6f Binary files /dev/null and b/debian/metche/usr/share/doc/metche/README.gz differ diff --git a/debian/metche/usr/share/doc/metche/changelog.gz b/debian/metche/usr/share/doc/metche/changelog.gz new file mode 100644 index 0000000..ea0357f Binary files /dev/null and b/debian/metche/usr/share/doc/metche/changelog.gz differ diff --git a/debian/metche/usr/share/doc/metche/copyright b/debian/metche/usr/share/doc/metche/copyright new file mode 100644 index 0000000..860331a --- /dev/null +++ b/debian/metche/usr/share/doc/metche/copyright @@ -0,0 +1,15 @@ +This package was debianized by boum.org collective on +Thu, 24 Nov 2005 19:18:47 +0100. + +It was downloaded from http://www.poivron.org/dev/metche + +Copyright: + +Upstream Authors: boum.org collective + +Copyright (C) 2004-2005 boum.org collective - property is theft ! + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General Public +License can be found in the file `/usr/share/common-licenses/GPL'. diff --git a/debian/metche/usr/share/doc/metche/examples/metche.conf.default b/debian/metche/usr/share/doc/metche/examples/metche.conf.default new file mode 100644 index 0000000..37efe67 --- /dev/null +++ b/debian/metche/usr/share/doc/metche/examples/metche.conf.default @@ -0,0 +1,56 @@ +####################################################################### +# +# metche configuration +# + +# Directory watched by metche +WATCHED_DIR="/etc" + +# Directory containing backups +BACKUP_DIR="/var/lib/metche" + +# Changelogs location (set to "" if you want to disable Changelog's monitoring) +CHANGELOG_DIR="/root/changelogs" + +# Debian packages monitoring : uncomment next line to disable (default: enabled) +# DO_PACKAGES="no" + +# Minutes until unstable goes to testing +TESTING_TIME="60" + +# Days until testing goes to stable +STABLE_TIME="3" + +# Address receiving testing changes report +EMAIL_ADDRESS="root@localhost" + +# Encrypt emails with GnuPG ? (uncomment next line to do so) +# ENCRYPT_EMAIL="yes" + +# Patterns to exclude ; will be used to feed tar and diff +TAR_OPTS="--exclude=*.swp --exclude=#* --exclude=*~ --exclude=*.key --exclude=ifstate --exclude=vdirbase --exclude=run.rev --exclude=vdir --exclude=run.rev" + +# locale (will be used to feed LC_ALL) +LOCALE="C" + +# Prefix that will be prepended to the commands that should be run +# inside a vserver +VSERVER_EXEC_PREFIX="" +#VSERVER_EXEC_PREFIX="/usr/sbin/vserver blabla exec" + + +####################################################################### +# +# Localizable strings +# + +# Add your custom headers below + +#_MAIL_SUBJECT="`$VSERVER_EXEC_PREFIX hostname -f` - changes report" +#_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state." +#_NO_CHANGE="No change." +#MAIN_HEADER="" +#CHANGELOGS_HEADER="" +#FILES_HEADER="" +#DEBIAN_PACKAGES_HEADER="" +#FILES_DETAILS_HEADER="" diff --git a/debian/metche/usr/share/doc/metche/examples/metche.cron.d b/debian/metche/usr/share/doc/metche/examples/metche.cron.d new file mode 100644 index 0000000..3e55e70 --- /dev/null +++ b/debian/metche/usr/share/doc/metche/examples/metche.cron.d @@ -0,0 +1 @@ +0-59/5 * * * * root test -x /usr/local/sbin/metche && /usr/local/sbin/metche cron diff --git a/debian/metche/usr/share/man/man8/metche.8.gz b/debian/metche/usr/share/man/man8/metche.8.gz new file mode 100644 index 0000000..a204f71 Binary files /dev/null and b/debian/metche/usr/share/man/man8/metche.8.gz differ diff --git a/debian/metche.examples b/debian/metche.examples new file mode 100644 index 0000000..7f8cda2 --- /dev/null +++ b/debian/metche.examples @@ -0,0 +1,2 @@ +metche.conf.default +metche.cron.d diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..544501b --- /dev/null +++ b/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + sgml2xml -xlower -xid metche-manpage.sgml > metche-manpage.xml + db2x_xsltproc -s /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl metche-manpage.xml + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/metche. + $(MAKE) install DESTDIR=$(CURDIR)/debian/metche + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron +# dh_installinfo + dh_installman metche.8 + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure