--- filetraq-0.2.orig/debian/NEWS.Debian +++ filetraq-0.2/debian/NEWS.Debian @@ -0,0 +1,13 @@ +filetraq (0.2-12) unstable; urgency=low + + * The script has been modified to avoid name collisions, now it stores each + file with the name 'orig' inside a directory that has the same PATH as the + original file, taking the backup dir as root. + + Users that were previously using filetraq will see that all their files + are copied as new, but the old files will not be lost, the new system will + create directories for the new files and will leave the old ones alone, + allowing the admin to choose between removing them or moving them to their + new locations. + + -- Sergio Talens-Oliag Fri, 3 Feb 2006 01:32:41 +0100 --- filetraq-0.2.orig/debian/README.Debian +++ filetraq-0.2/debian/README.Debian @@ -0,0 +1,19 @@ +filetraq for Debian +------------------- + +To use the cronjob create an /etc/filetraq.conf file, there's an example on +'/usr/share/doc/filetraq/filetraq.conf'. + +The script has been modified to accept a couple of configuration options; +'diffopts' and 'difforder'. The first option lets the user choose the diff +options she likes (see man diff) and the second one lets the user choose the +order of the file comparisons, 'newold' or 'oldnew' (default is 'newold'). + +To set the options you have to create the file '/etc/default/filetraq' and +write the options with shell syntax, i.e.: + + diffopts="-u -b" + difforder="oldnew" + +-- +Sergio Talens-Oliag , Mon, 28 Jan 2002 09:11:41 +0100 --- filetraq-0.2.orig/debian/changelog +++ filetraq-0.2/debian/changelog @@ -0,0 +1,129 @@ +filetraq (0.2-15) unstable; urgency=low + + * debian/control: set Vcs-* fields: Now maintained using git @ + alioth.debian.org. + * debian/control: set myself as maintainer, as agreed by previous maintainer + Sergio Talens-Oliag in Message-ID: + <20160703102729.GA16256@tron.mixinet.net>, see bugs.debian.org/817453. + Sergio: Thanks for your work! + * debian/control: add Homepage field. + * debian/control: update standards from 3.6.2.1 to 3.9.1, no changes needed. + * debian/control: add: Suggests systraq. + * debian/control: description: s/just a shell script/a shell script/. + * debian/README.Debian: fix spelling error, thanks lintian. + * get rid of trailing whitespace. + + -- Joost van Baal-Ilić Sun, 06 Nov 2016 01:48:26 +0100 + +filetraq (0.2-14.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/compat: bump from debhelper 4 to 9; thanks Niels Thykier (Closes: + Bug#817453). + * debian/control: update debhelper from >= 4.2 to >= 9. + * debian/control: change Build-Depends-Indep to Build-Depends (cdbs, + debhelper): these are required to run the clean target. Thanks lintian. + * debian/control: add Depends: ${misc:Depends} to satisfy debhelper. Thanks + lintian. + * debian/copyright: completed. Thanks lintian. + + -- Joost van Baal-Ilić Mon, 20 Jun 2016 22:16:10 +0200 + +filetraq (0.2-14) unstable; urgency=low + + * Install script on /usr/sbin instead of /usr/bin (Closes: Bug#355669). + + -- Sergio Talens-Oliag Tue, 7 Mar 2006 09:56:33 +0100 + +filetraq (0.2-13) unstable; urgency=low + + * Fix sed expression, now really ingnores commented lines (Closes: Bug#355512). + + -- Sergio Talens-Oliag Mon, 6 Mar 2006 22:54:59 +0100 + +filetraq (0.2-12) unstable; urgency=low + + * Build package with cdbs and simple-patchsys. + * Script patched to handle files with spaces (Closes: Bug#184360). + * Script patched to avoid name collisions (see NEWS.Debian). + + -- Sergio Talens-Oliag Fri, 3 Feb 2006 01:32:41 +0100 + +filetraq (0.2-11) unstable; urgency=low + + * Applied patch from Joost van Baal to document the difforder option in the + filetraq manpage. (Closes: Bug#263427) + + -- Sergio Talens-Oliag Wed, 1 Sep 2004 21:35:11 +0200 + +filetraq (0.2-10) unstable; urgency=low + + * Applied patch to handle binary files gracefully. (Closes: Bug#251010) + * Manpage moved to section 8, the program is installed in /usr/sbin. + + -- Sergio Talens-Oliag Thu, 27 May 2004 00:08:59 +0200 + +filetraq (0.2-9) unstable; urgency=low + + * Removed 'source' bashism. (Closes: Bug#215533) + * Fixed standard diff options to make the program work with + _POSIX2_VERSION=2000112. (Closes: Bug#215534) + * Upgraded Standards to 3.6.1. + + -- Sergio Talens-Oliag Mon, 13 Oct 2003 12:34:22 +0200 + +filetraq (0.2-8) unstable; urgency=low + + * Changed 'cp' parameters to avoid symlinks backup. (Closes: Bug#156049) + + -- Sergio Talens-Oliag Mon, 12 Aug 2002 11:02:21 +0200 + +filetraq (0.2-7) unstable; urgency=low + + * Modified the script to be able to switch the order of the comparision + between the backup file and the original one. (Closes: Bug#131187) + * Added an example of the filetraq default on the Readme file. + + -- Sergio Talens-Oliag Mon, 28 Jan 2002 09:02:48 +0100 + +filetraq (0.2-6) unstable; urgency=low + + * Upgraded to standards: 3.5.2. + * Added /etc/defaults/filetraq support to be able to change the diff style + output (Closes: Bug#122991). + + -- Sergio Talens-Oliag Mon, 7 Jan 2002 19:26:30 +0100 + +filetraq (0.2-5) unstable; urgency=low + + * Rebuilt with dpkg-dev 1.9.15. + + -- Sergio Talens-Oliag Mon, 2 Jul 2001 12:12:09 +0200 + +filetraq (0.2-4) unstable; urgency=low + + * Changed script to exit quietly if there's no config file (Closes: Bug#102733). + * Changed the removal of the backup dir on purge changed from 'rm -r' to + 'rm -rf' to avoid an error on 'dpkg --purge'. + + -- Sergio Talens-Oliag Fri, 29 Jun 2001 10:01:35 +0200 + +filetraq (0.2-3) unstable; urgency=low + + * First upload to debian. (Closes: Bug#95202) + * /etc/filetraq.conf is no longer a conffile. + + -- Sergio Talens-Oliag Fri, 22 Jun 2001 16:15:39 +0200 + +filetraq (0.2-2) unstable; urgency=low + + * Lintian fixes (manpage and conffiles). + + -- Sergio Talens-Oliag Mon, 18 Dec 2000 11:31:32 +0100 + +filetraq (0.2-1) unstable; urgency=low + + * Initial Release. + + -- Sergio Talens-Oliag Mon, 20 Nov 2000 12:57:24 +0100 + --- filetraq-0.2.orig/debian/compat +++ filetraq-0.2/debian/compat @@ -0,0 +1 @@ +9 --- filetraq-0.2.orig/debian/control +++ filetraq-0.2/debian/control @@ -0,0 +1,19 @@ +Source: filetraq +Section: admin +Priority: optional +Maintainer: Joost van Baal-Ilić +Build-Depends: cdbs, debhelper (>= 9) +Standards-Version: 3.9.1 +Vcs-Git: https://anonscm.debian.org/git/collab-maint/filetraq.git +Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/filetraq.git +Homepage: http://filetraq.xidus.net/ + +Package: filetraq +Architecture: all +Depends: ${misc:Depends} +Suggests: systraq +Description: Small utility to keep track of changes in config files + FileTraq is a shell script that reads a list of files to watch, runs + diff against each file and its backup, and reports any discrepancies, along + with keeping a dated backup of the original. + It's designed to be run as a cron job. --- filetraq-0.2.orig/debian/copyright +++ filetraq-0.2/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Sergio Talens-Oliag on +Mon, 20 Nov 2000 12:57:24 +0100. + +It was downloaded from http://filetraq.xidus.net + +Upstream Author: Jeremy Weatherford + +Copyright (c) 2000 Jeremy Weatherford + + 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., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + +On Debian systems look in '/usr/share/common-licenses/GPL-2'. --- filetraq-0.2.orig/debian/cron.d +++ filetraq-0.2/debian/cron.d @@ -0,0 +1,3 @@ +# Execute filetraq each 5 minutes. +# m h dom mon dow user command +*/5 * * * * root [ -x /usr/sbin/filetraq ] && /usr/sbin/filetraq --- filetraq-0.2.orig/debian/dirs +++ filetraq-0.2/debian/dirs @@ -0,0 +1,3 @@ +etc +usr/sbin +var/lib/filetraq --- filetraq-0.2.orig/debian/docs +++ filetraq-0.2/debian/docs @@ -0,0 +1,4 @@ +README +VERSION +filetraq.conf +debian/NEWS.Debian --- filetraq-0.2.orig/debian/filetraq.8 +++ filetraq-0.2/debian/filetraq.8 @@ -0,0 +1,78 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH FILETRAQ 8 "June 2001" +.SH NAME +filetraq \- keep track of changes in config files. +.SH SYNOPSIS +.B filetraq +\-\-help +.br +.B filetraq +[filelist] [backupdir] +.SH DESCRIPTION +This manual page documents briefly the +.B filetraq +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.B FileTraq +is a shell script that reads a list of files to watch, runs diff against each +file and its backup, and reports any discrepancies, along with keeping a dated +backup of the original. +.PP +It's designed to be run as a cron job. +.PP +.SH OPTIONS +This command has two possible invocations, one with one option: +.TP +.B \-\-help +Show summary of options and the default values of the config file and the +backup directory. +.PP +and other with no options, a config file or a config file and the backupdir. +.PP +The debian version has been modified to read the +.I /etc/default/filetraq +configuration file, that lets the administrator change the default values of +the config file ( +.B file +), the backup directory ( +.B backupdir +), the diff options used to print the filetraq output ( +.B diffopts +, e.g. +.I -p -C 1 +or +.I -u +) and the diff order ( +.B difforder +, either +.I newold +(FileTraq default) or +.I oldnew +(traditional Unix default)). +.SH SECURITY +FileTraq is not well tested or hardened. It runs as root, but all of its +config files should only be accessible by root. No security holes are known +at this time, but please be careful. +.SH BUGS +Right now, it doesn't take care of its backups very well. The dated backups +will accumulate in the backups directory, bounded only by diskspace. +.PP +It only handles text files, it isn't a Tripwire replacement for use with system +binaries. +.SH FILES +.I /etc/filetraq.conf +.br +.I /etc/default/filetraq +.br +.I /var/lib/filetraq +.SH SEE ALSO +diff(1), cron(8). +.SH AUTHOR +Jeremy Weatherford +.br +Homepage: http://filetraq.xidus.net/ +.PP +This manual page was written by Sergio Talens-Oliag , +for the Debian GNU/Linux system (but may be used by others). --- filetraq-0.2.orig/debian/install +++ filetraq-0.2/debian/install @@ -0,0 +1 @@ +filetraq /usr/sbin --- filetraq-0.2.orig/debian/manpages +++ filetraq-0.2/debian/manpages @@ -0,0 +1 @@ +debian/filetraq.8 --- filetraq-0.2.orig/debian/patches/01_filetraq.patch +++ filetraq-0.2/debian/patches/01_filetraq.patch @@ -0,0 +1,95 @@ +Index: filetraq +=================================================================== +--- filetraq (revisión: 616) ++++ filetraq (copia de trabajo) +@@ -9,18 +9,31 @@ + + # designed to be run periodically from any root's crontab, with output going in mail to root + +-# scans /usr/local/filetraq/filetraq.conf unless given a different list ++# Defaults file + +-file=/usr/local/filetraq/filetraq.conf ++defaults=/etc/default/filetraq + +-# uses /usr/local/filetraq for backups unless given a different dir ++# scans /etc/filetraq.conf unless given a different list + +-backupdir=/usr/local/filetraq/backups ++file=/etc/filetraq.conf + ++# uses /var/lib/filetraq for backups unless given a different dir ++ ++backupdir=/var/lib/filetraq ++ ++# diff options ++diffopts="-p -C 1" ++# diff order ++difforder="newold" ++ ++# Source defaults file if available ++test -f $defaults && . $defaults ++ + if [ "$1" != "" ]; then + if [ "$1" = "--help" ]; then + echo "FileTraq version 0.2" + echo "Syntax: $0 [filelist] [backupdir]"; ++ echo "Defaults can be set in '/etc/default/filetraq'." + echo "If no filelist is specified, default is $file." + echo "If no backupdir is specified, default is $backupdir." + exit +@@ -40,28 +53,40 @@ + backupdir=$2 + fi + +-for entry in `cat $file | cut -d "#" -f 1`; do +- for name in `find $entry -xtype f 2>&1`; do +- if [ "$name" = "find:" ]; then ++# Exit quietly if there's no config file ++test -r "$file" || exit 0 ++ ++eval ls -1 `sed -n -e '/^[^#]/ { s/ /\\ /g; p; }' "$file"` 2> /dev/null | while read entry; do ++ find "$entry" -xtype f 2> /dev/null | while read name; do ++ if [ ! -e "$name" ]; then + echo "File not found, or pattern didn't match any files: $entry" + break + else +- backup=$backupdir/`echo $name \ +- | sed -e 's/^\/\(.*\)$/\1/' -e 's|/|\.|g'` +- if [ ! -e $backup ]; then ++ bdir="$backupdir/`echo "$name"`" ++ test -d "$bdir" || mkdir -p "$bdir" ++ backup="$bdir/orig" ++ if [ ! -e "$backup" ]; then + echo "Creating first backup of $name." +- cp -af $name $backup ++ cp -pRLf "$name" "$backup" + else +- diff -p1 $name $backup +- if [ $? = 1 ]; then ++ if [ "$difforder" = "oldnew" ]; then ++ diff $diffopts "$backup" "$name" ++ else ++ diff $diffopts "$name" "$backup" ++ fi ++ ++ ret=$? ++ if [ $ret = 1 ]; then + # changes to save +- cp -af $backup $backup.`date +%m.%d.%y__%H.%M` +- cp -af $name $backup ++ cp -pRLf "$backup" "$backup.`date +%m.%d.%y__%H.%M`" ++ cp -pRLf "$name" "$backup" + fi ++ if [ $ret = 2 ]; then ++ echo "Recording changes in binary file $name in backupdir" ++ cp -pRLf "$backup" "$backup.`date +%m.%d.%y__%H.%M`" ++ cp -pRLf "$name" "$backup" ++ fi + fi + fi + done +- if [ "$ret" = "1" ]; then +- echo "File not found: $entry" +- fi + done --- filetraq-0.2.orig/debian/patches/02_filetraq.conf.patch +++ filetraq-0.2/debian/patches/02_filetraq.conf.patch @@ -0,0 +1,14 @@ +--- filetraq.conf.orig 2000-01-03 07:02:18.000000000 +0100 ++++ filetraq.conf 2005-03-25 22:05:42.802439801 +0100 +@@ -1,6 +1,7 @@ +-/etc/services ++/etc/filetraq.conf + /etc/passwd ++/etc/shadow ++/etc/group ++/etc/gshadow + /etc/inetd.conf +-/etc/rc.d/rc.local +-/etc/rc.d/rc.sysinit +-/usr/local/filetraq/filetraq.conf ++/etc/services --- filetraq-0.2.orig/debian/postrm +++ filetraq-0.2/debian/postrm @@ -0,0 +1,20 @@ +#! /bin/sh +# postrm script for filetraq + +set -e + +case "$1" in + purge) + rm -rf /var/lib/filetraq + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- filetraq-0.2.orig/debian/rules +++ filetraq-0.2/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2006 Sergio Talens-Oliag +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/debhelper.mk