--- systraq-0.0.20070301.orig/debian/patches/001_debian_systraq_user.diff +++ systraq-0.0.20070301/debian/patches/001_debian_systraq_user.diff @@ -0,0 +1,33 @@ +# $Id: 001_debian_systraq_user.diff 296 2007-02-02 09:22:46Z joostvb $ +# $URL: svn+ssh://svn.debian.org/svn/systraq/trunk/debian/trunk/debian/patches/001_debian_systraq_user.diff $ + +Don't use upstream name "systraq" for systraq user, but use +Debian specific name "debian-systraq". + +Index: etc/systraq.in +=================================================================== +--- etc/systraq.in.orig 2007-01-18 15:13:35.604945787 +0100 ++++ etc/systraq.in 2007-01-18 15:14:02.100945510 +0100 +@@ -14,18 +14,18 @@ + # m h dom mon dow usercommand + # + # run filetraq every hour at :30. +-30 * * * * systraq [ -r @SYSCONF_PATH@/filetraq.conf ] && command -v filetraq >/dev/null && filetraq @SYSCONF_PATH@/filetraq.conf @LOCALSTATE_PATH@/filetraq ++30 * * * * debian-systraq [ -r @SYSCONF_PATH@/filetraq.conf ] && command -v filetraq >/dev/null && filetraq @SYSCONF_PATH@/filetraq.conf @LOCALSTATE_PATH@/filetraq + # + # clean up filetraq backup files older than two months + # @monthly +-0 0 1 * * systraq [ -d @LOCALSTATE_PATH@/filetraq ] && find @LOCALSTATE_PATH@/filetraq -type f -name "*.??.??__??.??" -ctime +60 -exec rm \{\} \; ++0 0 1 * * debian-systraq [ -d @LOCALSTATE_PATH@/filetraq ] && find @LOCALSTATE_PATH@/filetraq -type f -name "*.??.??__??.??" -ctime +60 -exec rm \{\} \; + # + # sent the daily systraq email + # @daily +-0 0 * * * systraq command -v systraq >/dev/null && systraq | mailx -s "[Systraq] `hostname` `date +\%Y\%m\%d`" systraq ++0 0 * * * debian-systraq command -v systraq >/dev/null && systraq | mailx -s "[Systraq] `hostname` `date +\%Y\%m\%d`" debian-systraq + # + # update the systraq status files + # @hourly +-0 * * * * systraq command -v st_snapshot.hourly >/dev/null && st_snapshot.hourly ++0 * * * * debian-systraq command -v st_snapshot.hourly >/dev/null && st_snapshot.hourly + 0 * * * * root command -v st_snapshot.hourly >/dev/null && ST_MODE=root st_snapshot.hourly + # --- systraq-0.0.20070301.orig/debian/patches/series +++ systraq-0.0.20070301/debian/patches/series @@ -0,0 +1 @@ +001_debian_systraq_user.diff -p0 --- systraq-0.0.20070301.orig/debian/control +++ systraq-0.0.20070301/debian/control @@ -0,0 +1,28 @@ +Source: systraq +Section: admin +Priority: optional +Maintainer: Laurent Fousse +Uploaders: Joost van Baal +Build-Depends: debhelper (>= 4.1.0), cdbs, quilt +Build-Depends-Indep: jade, sgml-data, w3m, jadetex, docbook-dsssl, docbook-xml, docbook-xsl, openjade, xsltproc +Standards-Version: 3.7.2 + +Package: systraq +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, exim4-daemon-light | mail-transport-agent, adduser, filetraq (>= 0.2-10), procps, net-tools, debsums +Description: monitor your system and warn when system files change + Systraq daily sends you an email listing the state of your system. + Furthermore, if critical files have changed, you'll get an email within a + shorter notice. Systraq consists of few very small shell scripts. + . + It can help you implementing a not too strict security policy. For more + demanding systems, you'd better use something like tripwire. Make sure you + really want to do the monitoring this script offers: it might not comply with + your site's privacy policy. Getting informed when users' config file change + might be too intrusive. + . + Other similar tools are available in Debian (`diffmon' for instance), but + systraq is less intrusive because it can warn for file changes without mailing + a complete diff (which is not desirable for e.g. /etc/shadow). + . + Homepage: http://mdcc.cx/systraq --- systraq-0.0.20070301.orig/debian/docs +++ systraq-0.0.20070301/debian/docs @@ -0,0 +1,4 @@ +NEWS +README +TODO +debian/README.Debian --- systraq-0.0.20070301.orig/debian/TODO +++ systraq-0.0.20070301/debian/TODO @@ -0,0 +1,4 @@ + +- postrm should remove systraq user (but see comments about possible issues + with that in the script itself.) + --- systraq-0.0.20070301.orig/debian/copyright +++ systraq-0.0.20070301/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Laurent Fousse on +Tue, 12 Oct 2004 17:51:59 +0200. + +It was downloaded from http://mdcc.cx/pub/systraq/ + +Upstream Author: Joost van Baal + +Copyright: + +This software is copyright (C) 2001-2004 by Joost van Baal. + + This package 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 package 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- systraq-0.0.20070301.orig/debian/postinst +++ systraq-0.0.20070301/debian/postinst @@ -0,0 +1,147 @@ +#! /bin/sh -e +# postinst script for systraq + +# http://women.debian.org/wiki/English/MaintainerScripts + +SYSTRAQUSER=debian-systraq +OLDSYSTRAQUSER=systraq +OLDVERSION=0.0.20050213-4 +USERMISSING=0 + +case "$1" in + configure) + if ! getent passwd $SYSTRAQUSER > /dev/null 2>&1 + then + adduser --system --disabled-password --home /var/lib/systraq \ + --quiet --group $SYSTRAQUSER + USERMISSING=1 + fi + + if getent passwd $OLDSYSTRAQUSER > /dev/null 2>&1 && [ $USERMISSING = 1 ] + then + if dpkg --compare-versions $2 le-nl $OLDVERSION + then + # we are upgraded from a package version where the systraq user + # is called `systraq'. + chown -R $SYSTRAQUSER:$SYSTRAQUSER /var/lib/systraq + cat <> $OLDVERSION. +EOT + fi + fi + + test -f /var/lib/systraq/.forward || echo root > /var/lib/systraq/.forward + chown -R $SYSTRAQUSER:$SYSTRAQUSER /var/lib/systraq/.forward + + if ! test -d /var/lib/systraq/filetraq + then + mkdir /var/lib/systraq/filetraq + chown $SYSTRAQUSER:$SYSTRAQUSER /var/lib/systraq/filetraq + fi + + if ! getent group $SYSTRAQUSER > /dev/null 2>&1 + then + cat < /etc/systraq/systraq_is_unconfigured +You are probably reading this file since you got it in your mailbox +by a cronjob. Welcome! + +There are 4 different ways to get rid of this somewhat annoying hourly +message from cron: + +1) RTFM and configure systraq. Systraq documentation is installed in + /usr/share/doc/systraq/ . Remove the file systraq_is_unconfigured + (probably in /etc/systraq/) when done. +2) Purge the systraq package from your system. +3) The files /usr/share/doc/systraq/examples/snapshot_{pub,root}.{home,}list + are configuration files which will do fine in most cases. Copy these to + /etc/systraq/ . Remove the file systraq_is_unconfigured (probably in + /etc/systraq/) when done. +4) Execute + # touch /etc/systraq/i_want_a_broken_systraq + (proper location could vary). + +EOT + + fi + ;; + + failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- systraq-0.0.20070301.orig/debian/changelog +++ systraq-0.0.20070301/debian/changelog @@ -0,0 +1,195 @@ +systraq (0.0.20070301-3) unstable; urgency=low + + * debian/postinst: make sure /var/lib/systraq/filetraq belongs to + debian-systraq when created (closes: #433731). + + -- Joost van Baal Wed, 15 Aug 2007 19:08:28 +0200 + +systraq (0.0.20070301-2) unstable; urgency=low + + * Use --remove-home instead of --remove-all-files + in postinst to speed things up (closes: #415410). + + -- Laurent Fousse Sat, 24 Mar 2007 17:55:58 +0100 + +systraq (0.0.20070301-1) unstable; urgency=low + + * New upstream release. Fixes bug: "systraq cannot handle filenames with + spaces" (closes: #409777). + * debian/README.Debian: add note on how to disable or add scripts to + systraq.d. + * debian/systraq.8: removed; now shipped with upstream. + + -- Joost van Baal Sun, 04 Mar 2007 12:24:20 +0100 + +systraq (0.0.20070118-2) unstable; urgency=low + + * debian/control: add homepage url. + * debian/{rules,conffiles,postinst}: no longer have symlinks in + /etc/systraq/systraq.d be part of the package (as + conffiles), but create/maintain these in postinst. We no longer rely + on dpkg for managing these. This caused systraq's daily reports to + be empty, and the symlinks in /etc/systraq/systraq.d/ to be broken. + (Closes: #408359). + * debian/postinst: run under "set -e". only do real stuff when called with + argument "configure". + * debian/postinst: tweaked message from cron in + /etc/systraq/systraq_is_unconfigured. + + -- Joost van Baal Fri, 02 Feb 2007 11:51:35 +0100 + +systraq (0.0.20070118-1) unstable; urgency=low + + * New upstream release. Fixes bug: "systraq cron job is noisy after systraq + is removed but not purged" (closes: #406149). + * debian/dirs: removed: upstream Makefile creates all needed dirs. + * debian/patches/{series,001_debian_systraq_user.diff}, + debian/{control,rules}: manage our patch on /etc/cron.d/systraq + using quilt, so that it can be maintained using svn. + * debian/rules: install arch-independent scripts in /usr/share/systraq, + not /usr/lib. + * debian/rules: no longer installs upstream changelog as two files. + * debian/control: Build-Depend on debhelper (>= 4.1.0): current cdbs needs + that. + * debian/doc-base.manual: added: register systraq manual using doc-base. + + -- Joost van Baal Thu, 18 Jan 2007 15:23:52 +0100 + +systraq (0.0.20050213-8) unstable; urgency=low + + * debian/postrm: do not assume the non-essential adduser package is + installed at package purge time (closes: #398538). + * debian/control: added myself to Uploaders, after ACK from Laurent + (see Bug#398538). + * debian/control: Standards updated, no changes needed. + * debian/control: cdbs and debhelper moved from Build-Depends-Indep to + Build-Depends (thanks lintian). + * debian/copyright: New FSF snailmail address. + + -- Joost van Baal Sun, 19 Nov 2006 13:06:51 +0100 + +systraq (0.0.20050213-7) unstable; urgency=low + + * Changed packaging to use cdbs. + * Set correct ownership of /var/lib/systraq/.forward on install + (closes: #329282). + * Added note about possible email delivery failures in README.Debian. + + -- Laurent Fousse Tue, 27 Sep 2005 17:28:57 +0200 + +systraq (0.0.20050213-6) unstable; urgency=low + + * Changed one remaining "systraq" to "debian-systraq" in the cron file, + could cause email delivery to fail. + * Modified postinst to not warn about the old username if the new username + is already in use. + * Updated Standards-Version to 3.6.2, no change needed. + + -- Laurent Fousse Thu, 11 Aug 2005 11:30:11 +0200 + +systraq (0.0.20050213-5) unstable; urgency=low + + * The new systraq username is now `debian-systraq'. Now we can do the right + thing on purge (closes: #315683). + + -- Laurent Fousse Fri, 29 Jul 2005 15:11:56 +0200 + +systraq (0.0.20050213-4) unstable; urgency=low + + * Tagged files in /etc/systaq/systraq.d as conffiles. Closes: #297531. + + -- Laurent Fousse Tue, 1 Mar 2005 12:36:16 +0100 + +systraq (0.0.20050213-3) unstable; urgency=low + + * systraq_is_unconfigured should only be created if systraq *is* + unconfigured. This is now fixed. + + -- Laurent Fousse Sun, 13 Feb 2005 21:18:36 +0100 + +systraq (0.0.20050213-2) unstable; urgency=low + + * Install /etc/systraq/systraq_is_unconfigured as it is no longer + installed by upstream's makefile. + + -- Laurent Fousse Sun, 13 Feb 2005 20:42:14 +0100 + +systraq (0.0.20050213-1) unstable; urgency=low + + * New upstream release. + + -- Laurent Fousse Sun, 13 Feb 2005 18:11:52 +0100 + +systraq (0.0.20050209-1) unstable; urgency=low + + * New upstream release. + + better fix for hourly cron mail annoyance (closes: #289791). + * Use local DTD for documentation validation (closes: #291619). + + -- Laurent Fousse Fri, 11 Feb 2005 16:16:00 +0100 + +systraq (0.0.20041118-2) unstable; urgency=low + + * Install a working yet minimal configuration so that cronjobs don't + yell at you (closes: #289791). + + -- Laurent Fousse Tue, 11 Jan 2005 12:15:23 +0100 + +systraq (0.0.20041118-1) unstable; urgency=low + + * First actual debian upload. + * Thanks Joost for the packaging help. + + -- Laurent Fousse Wed, 8 Dec 2004 21:24:07 +0100 + +systraq (0.0.20041118-0.3) unstable; urgency=low + + * Non-maintainer build. + * postinst: fix typo. + + -- Joost van Baal Thu, 18 Nov 2004 22:19:20 +0100 + +systraq (0.0.20041118-0.2) unstable; urgency=low + + * Non-maintainer build. + * postinst: Do something sane when systraq homedirectory or group is + missing from the system. This likely happens on systems where systraq + has been installed from the tarball. + * rules: clean up comments. + * This version is not to be uploaded to the Debian archive. + + -- Joost van Baal Thu, 18 Nov 2004 22:10:23 +0100 + +systraq (0.0.20041118-0.1) unstable; urgency=low + + * Non-maintainer build. + * New upstream release. + * etc/systraq.in: don't name the systraq user "debian-systraq" but just + "systraq". This patch to upstream is no longer needed. + * postinst: systraq user called systraq. Made the adduser call quiet. + No longer edit /etc/aliases, but create ~systraq/.forward: less + intrusive. Don't try to create a filetraq.conf. (No stuff is removed + from postinst, I've just commented it out.) + * TODO: added + * This version is not published. + + -- Joost van Baal Thu, 18 Nov 2004 21:42:57 +0100 + +systraq (0.0.20041015.cvs.9-1) unstable; urgency=low + + * New upstream release + + -- Laurent Fousse Mon, 1 Nov 2004 21:54:19 +0100 + +systraq (0.0.20041015.cvs.7-1) unstable; urgency=low + + * New upstream release. + + -- Laurent Fousse Fri, 15 Oct 2004 12:15:28 +0200 + +systraq (0.0.20040804-1) unstable; urgency=low + + * Initial Release (closes: #276627). + + -- Laurent Fousse Tue, 12 Oct 2004 17:51:59 +0200 + --- systraq-0.0.20070301.orig/debian/README.Debian +++ systraq-0.0.20070301/debian/README.Debian @@ -0,0 +1,40 @@ +systraq for Debian +------------------ + +This package will not do anything useful until it is configured, +except send you a friendly and regular warning about how to do so. The +files in the examples directory are here to help you. + +Configuring the daily [Systraq] messages +---------------------------------------- + +Daily, you'll get an email message with a subject likel "[Systraq] hostname +YYYYMMDD". It'll show output of various commands. If you'd like to add output +of another command, create a script /etc/systraq/systraq.d/AA-local. Use "hh" +for "AA" if you'd like to see the output between ff-netstat's output and +gg-ps's output. Use "-local" for the rest of the filename. + +If you'd like to disable one's scripts output (e.g. gg-ps), run: + + # rm /etc/systraq/systraq.d/gg-ps + # ln -s /bin/true /etc/systraq/systraq.d/gg-ps + +. + +Email delivery problems +----------------------- + +The current approach to deliver systraq-related emails to the "right +person" is to put `root' in the systraq user's .forward file. This +works fine with exim which is the default MTA for Debian, but you may +experience problems depending on your MTA and configuration, for +example the `-' in systraq's username might cause confusion. It is +left up to you to arrange for a correct email delivery in this case, +for example by editing /etc/aliases. + + -- Laurent Fousse , Wed, 21 Sep 2005 15:27:00 +0200, + Joost van Baal , Sun, 04 Mar 2007 12:19:40 +0100 + +# $Id: README.Debian 331 2007-07-29 23:31:24Z joostvb $ +# $URL: svn+ssh://svn.debian.org/svn/systraq/trunk/debian/trunk/debian/README.Debian $ + --- systraq-0.0.20070301.orig/debian/rules +++ systraq-0.0.20070301/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +# $Id: rules 299 2007-02-02 09:55:39Z joostvb $ +# $URL: svn+ssh://svn.debian.org/svn/systraq/trunk/debian/trunk/debian/rules $ + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_CONFIGURE_EXTRA_FLAGS := --libexecdir=/usr/share + +install/systraq:: + rm -f debian/systraq/etc/systraq/systraq.d/* + rm -f debian/systraq/usr/share/doc/systraq/COPYING + rm -f debian/systraq/usr/share/doc/systraq/LICENSE + rm -f debian/systraq/usr/share/doc/systraq/ChangeLog --- systraq-0.0.20070301.orig/debian/doc-base.manual +++ systraq-0.0.20070301/debian/doc-base.manual @@ -0,0 +1,21 @@ +Document: systraq-manual +Title: The systraq Manual +Author: Joost van Baal +Abstract: A manual explaining the purpose of the systraq system, instructions + for configuring the system, hints on daily maitenance as well as some + background information +Section: Apps/System + +Format: PostScript +Files: /usr/share/doc/systraq/manual.ps.gz + +Format: HTML +Index: /usr/share/doc/systraq/manual.html +Files: /usr/share/doc/systraq/manual.html + +Format: text +Files: /usr/share/doc/systraq/manual.txt.gz + +Format: PDF +Files: /usr/share/doc/systraq/manual.pdf.gz + --- systraq-0.0.20070301.orig/debian/compat +++ systraq-0.0.20070301/debian/compat @@ -0,0 +1 @@ +4 --- systraq-0.0.20070301.orig/debian/postrm +++ systraq-0.0.20070301/debian/postrm @@ -0,0 +1,56 @@ +#! /bin/sh +# postrm script for systraq +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + if getent passwd debian-systraq > /dev/null 2>&1; then + # see http://wiki.debian.org/AccountHandlingInMaintainerScripts + # for rationale + if [ -x "$(command -v deluser)" ]; then + deluser --remove-home --system --quiet debian-systraq > /dev/null || true + else + echo >&2 "not removing debian-systraq system account because deluser command was not found" + fi + fi + if getent group debian-systraq > /dev/null 2>&1; then + if [ -x "$(command -v delgroup)" ]; then + delgroup --system --only-if-empty debian-systraq + else + echo >&2 "not removing debian-systraq system group because delgroup command was not found" + fi + fi + rm -rf /etc/systraq + + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- systraq-0.0.20070301.orig/debian/README.devel +++ systraq-0.0.20070301/debian/README.devel @@ -0,0 +1,16 @@ +# $Id: README.devel 335 2007-08-15 17:03:16Z joostvb $ +# $URL: svn+ssh://svn.debian.org/svn/systraq/trunk/debian/trunk/debian/README.devel $ + +The Subversion layout of this package is suitable for use with +svn-buildpackage. + +Test-build by running: + + joostvb@nagy:~/sv...straq/trunk/debian/trunk% svn-buildpackage -uc -us -rfakeroot --svn-ignore --svn-dont-purge --svn-lintian --svn-linda + +. Preparing for a release: + + svn-buildpackage --svn-tag -rfakeroot -k0x969457F0 + +. +