ftpwatch-1.23+nmu1/0000775000000000000000000000000012750030230011013 5ustar ftpwatch-1.23+nmu1/Makefile0000664000000000000000000000015711606362065012473 0ustar all: echo All don! install: install -d $(DESTDIR)/usr/bin -cp ftpwatch.pl -d $(DESTDIR)/usr/bin/ftpwatch ftpwatch-1.23+nmu1/debian/0000775000000000000000000000000013167063151012250 5ustar ftpwatch-1.23+nmu1/debian/README.debian0000664000000000000000000000074006651170472014357 0ustar ftpwatch for DEBIAN ---------------------- Due to security problems FTPWatch no longer installs itselfe in the root crontab file. But every user who wants to use it has to place it in there own crontabs. To get a weekly update as before the following line could be used: 47 5 * * 7 /usr/sbin/ftpwatch This also means that all files in ~/.ftpwatch/ has to be chown'ed to be owned by the user instead of root. Hakan Ardo , Tue, 19 Jan 1999 21:47:44 +0100 ftpwatch-1.23+nmu1/debian/changelog0000664000000000000000000001232513167063151014125 0ustar ftpwatch (1.23+nmu1) unstable; urgency=medium * Non-maintainer upload. * Fix source package section. -- Matthias Klose Tue, 10 Oct 2017 08:19:21 +0200 ftpwatch (1.23) unstable; urgency=medium * Fix binary-indep to make dpkg-buildpackage -A work (closes: #831948) -- Hakan Ardo Tue, 02 Aug 2016 07:32:46 +0200 ftpwatch (1.22) unstable; urgency=medium * Ported to debhelper 9 (closes: #817464) -- Hakan Ardo Thu, 14 Jul 2016 09:11:44 +0200 ftpwatch (1.21+nmu1) unstable; urgency=medium * Non-maintainer upload. * Use "find -perm /x" instead of "find -perm +x". Closes: #808938 -- Andreas Metzler Fri, 25 Dec 2015 15:14:18 +0100 ftpwatch (1.21) unstable; urgency=low * Binary moved to /usr/bin (closes: #608940) -- Hakan Ardo Sun, 10 Jul 2011 19:42:29 +0200 ftpwatch (1.20) unstable; urgency=low * Applied patch from Pawel Tecza adding a -d option which passes as options to diff * Moved from debmake to debhelper (closes: #373002) * Added -p option to run ftp in passive mode -- Hakan Ardo Wed, 25 Oct 2006 08:35:22 +0200 ftpwatch (1.19) unstable; urgency=low * Removed debconf dependency (close: #331827) -- Hakan Ardo Tue, 27 Dec 2005 17:09:41 +0100 ftpwatch (1.18) unstable; urgency=low * Incoporated MNU (closes: #189715) * Removed reference to non excistent README.debian (closes: #292839) * Removed ancient (pre-stable) backwards compatibility warning -- Hakan Ardo Thu, 24 Feb 2005 11:42:21 +0100 ftpwatch (1.17.1) unstable; urgency=low * NMU. * Add Build-Depends-Indep on debhelper, debmake. Closes: #189715. * Remove /usr/doc/ftpwatch symlink. * Remove several cruft files from the source package. -- Daniel Schepler Thu, 31 Jul 2003 21:12:40 -0700 ftpwatch (1.17) unstable; urgency=low * Added russian debconf template (closes: #137650) -- Hakan Ardo Mon, 11 Mar 2002 15:37:46 +0100 ftpwatch (1.16) unstable; urgency=low * Added Brazilian portuguese (pt_BR) debconf template translation (Bug #120836) -- Hakan Ardo Sat, 12 Jan 2002 15:07:31 +0100 ftpwatch (1.15) unstable; urgency=low * Added spanish, german template file (Bug #103208, #101887) -- Hakan Ardo Sat, 7 Jul 2001 22:14:32 +0200 ftpwatch (1.14) unstable; urgency=low * Upgraded to policy v 3.2.1.0 * Fixed paragraph separateing in info template (Bug #85752) -- Hakan Ardo Sat, 7 Jul 2001 22:13:32 +0200 ftpwatch (1.13) unstable; urgency=low * Added some error checking * Added the posibility to watch single files -- Hakan Ardo Thu, 16 Nov 2000 10:39:08 +0100 ftpwatch (1.12) unstable; urgency=low * Now uses Net::FTP instead of ncftp * Updated docs to say that every user has to install a crontab entry -- Hakan Ardo Sun, 29 Oct 2000 13:48:09 +0100 ftpwatch (1.11) unstable; urgency=low * Now uses getpwent to get userinfo as sugested by Pierre -- Hakan Ardo Sat, 4 Mar 2000 12:20:50 +0100 ftpwatch (1.10) unstable; urgency=low * Now uses debconf * Docs and man pages moved to /usr/share * /usr/doc/... links created and removed -- Hakan Ardo Mon, 17 Jan 2000 10:52:59 +0100 ftpwatch (1.9) unstable; urgency=low * Fixed postinst bug -- Hakan Ardo Mon, 17 Jan 2000 10:32:38 +0100 ftpwatch (1.8) unstable; urgency=low * Fixed two spelling errors (Bug #42083) -- Hakan Ardo Mon, 10 Jan 2000 00:21:54 +0100 ftpwatch (1.7) unstable; urgency=low * Now uses dh_perl to get the right dependencies -- Hakan Ardo Thu, 1 Jul 1999 23:15:42 +0200 ftpwatch (1.6) unstable; urgency=low * Now depends on ncftp|ncftp2 instead of just ncftp (Bug #35159) -- Hakan Ardo Thu, 10 Jun 1999 11:16:09 +0200 ftpwatch (1.5) frozen unstable; urgency=high * Every user now has to place it in there crontabs (Fixes Bug#31627) * Only makes the checks for the user running it * Moved tmp files to user dir -- Hakan Ardo Tue, 19 Jan 1999 21:29:43 +0100 ftpwatch (1.4) unstable; urgency=low * Changelog now gziped * Moved back to main (Bug #25564) * No longer tries to create /usr/sbin (Bug #25787) * Paul J. Thompson has added support to watch sundirectoriees recoursly -- Hakan Ardo Tue, 2 Sep 1997 15:31:36 +0200 ftpwatch (1.3) unstable; urgency=low * Moved tmp file from /tmp to /var/run to fill a security hole (Bug #12291) -- Hakan Ardo Tue, 26 Aug 1997 14:34:25 +0200 ftpwatch (1.2) unstable; urgency=low * moved to contrib (Fixes Bug #9261) -- Hakan Ardo Thu, 1 May 1997 17:07:18 +0200 ftpwatch (1.1) unstable; urgency=low * Added man file -- Hakan Ardo Tue, 7 Jan 1997 21:44:35 +0100 ftpwatch (1.0) unstable; urgency=low * Initial Release. -- Hakan Ardo Tue, 7 Jan 1997 16:23:34 +0100 Local variables: mode: debian-changelog End: ftpwatch-1.23+nmu1/debian/compat0000664000000000000000000000000212741635306013452 0ustar 9 ftpwatch-1.23+nmu1/debian/config0000775000000000000000000000016407036207457013453 0ustar #!/bin/sh -e # Source debconf library. . /usr/share/debconf/confmodule db_input high ftpwatch/info || true db_go ftpwatch-1.23+nmu1/debian/control0000664000000000000000000000106313167063135013655 0ustar Source: ftpwatch Section: net Priority: extra Maintainer: Hakan Ardo Build-Depends: debhelper Standards-Version: 3.2.1.0 Package: ftpwatch Architecture: all Depends: ${perl:Depends}, libnet-perl Description: Notifies you of changes on remote ftp servers This package should be installed as a cron job (for interested users) which every week makes a ftp connection to a list of sites and studies a set of files or directories and report any changes it finds by email. . Every user can have his own set of sites and directories to watch. ftpwatch-1.23+nmu1/debian/copyright0000664000000000000000000000015710207327133014201 0ustar This package was written by Hakan Ardo hakan@debian.org Copyright: GPL (See /usr/share/common-licenses/GPL) ftpwatch-1.23+nmu1/debian/dirs0000664000000000000000000000002106264465170013134 0ustar usr/bin usr/sbin ftpwatch-1.23+nmu1/debian/ftpwatch.debhelper.log0000664000000000000000000000175312750030036016523 0ustar dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb dh_perl dh_installchangelogs dh_installdocs dh_installman dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb dh_builddeb ftpwatch-1.23+nmu1/debian/ftpwatch.substvars0000664000000000000000000000004012750030035016030 0ustar misc:Depends= perl:Depends=perl ftpwatch-1.23+nmu1/debian/postinst.not0000775000000000000000000000020707712364213014661 0ustar #!/bin/sh -e PACKAGE="ftpwatch" # Source debconf library. . /usr/share/debconf/confmodule db_input high ftpwatch/info || true db_go ftpwatch-1.23+nmu1/debian/rules0000775000000000000000000000366612750027571013346 0ustar #!/usr/bin/make -f # Sample debian.rules file - for GNU Hello (1.3). # Copyright 1994,1995 by Ian Jackson. # I hereby give you perpetual unlimited permission to copy, # modify and relicense this file, provided that you do not remove # my name from the file itself. (I assert my moral right of # paternity under the Copyright, Designs and Patents Act 1988.) # This file may have to be extensively modified # # Modified to be a prototype for debmake by Christoph Lameter package=ftpwatch build: $(checkdir) if [ -x configure ]; then ./configure --prefix=/usr; fi make CFLAGS="-O2 -g -Wall" touch build clean: $(checkdir) -rm -f build -make clean -rm `find . -name "*~"` -rm -rf debian/tmp debian/files* core debian/substvars -rm -rf debian/$(package) binary-indep: checkroot build $(checkdir) -rm -rf debian/tmp install -d debian/tmp cd debian/tmp;install -d `cat ../dirs` if [ -x configure ]; then make install prefix=`pwd`/debian/ftpwatch/usr ;\ else \ make install DESTDIR=`pwd`/debian/ftpwatch; \ fi # Must have debmake installed for this to work. Otherwise please copy # /usr/bin/debstd into the debian directory and change debstd to debian/debstd dh_perl # debstd # cp debian/config debian/templates debian/tmp/DEBIAN # mkdir debian/tmp/usr/share # mv debian/tmp/usr/doc debian/tmp/usr/share/doc # mv debian/tmp/usr/man debian/tmp/usr/share/man dh_installchangelogs dh_installdocs dh_installman ftpwatch.8 dh_compress dh_fixperms dh_installdeb dh_md5sums dh_gencontrol dh_builddeb # chown -R root.root debian/tmp # chmod -R go=rX debian/tmp # dpkg --build debian/tmp .. binary-arch: binary-indep define checkdir test -f debian/rules endef # Below here is fairly generic really binary: binary-indep binary-arch source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false checkroot: $(checkdir) test root = "`whoami`" .PHONY: binary binary-arch binary-indep clean checkroot ftpwatch-1.23+nmu1/debian/templates.not0000664000000000000000000000501707443140704014773 0ustar Template: ftpwatch/info Type: note Description: The ftpwatch crontab installation is no longer automatic Due to security problems FTPWatch no longer installs itself in the root crontab file. But every user who wants to use it has to place it in their own crontabs. To get a weekly update as before the following line could be used: . "47 5 * * 7 /usr/sbin/ftpwatch" . This also means that all files in ~/.ftpwatch/ has to be chown'ed to be owned by the user instead of root Description-de: crontab-Installation von FTPWatch ist nicht mehr automatisch Aufgrund von Sicherheitsproblemen wird FTPWatch nicht mehr in der Haupt-crontab-Datei eingetragen. Jeder Benutzer, der FTPWatch benutzen möchte, kann es in seine eigene crontab-Datei aufnehmen. Um wöchtentliche Updates durchzuführen, kann die folgende crontab-Zeile genutzt werden: . "47 5 * * 7 /usr/sbin/ftpwatch" . Dies heisst auch, dass alle Dateien im Verzeichniss ~/.ftpwatch dem Benutzer anstatt root zugeordnet werden müssen. Description-es: La instalación del crontab de ftpwatch ya no es automática Debido a problemas de seguridad FTPWatch ya no se instala en el fichero crontab de root. Todos los usuarios que deseen usarlo tendrán que incluirlo en su propio crontab. Para obtener una actualización semanal como antes, se podría utilizar la siguiente línea: . "47 5 * * 7 /usr/sbin/ftpwatch" . Esto quiere decir también que todos los ficheros del directorio ~/.ftpwatch/ tienen que ser propiedad del usuario en lugar de root. Description-pt_BR: A instalação do crontab do ftpwatch não é mais automática Devido a problemas de segurança, o FTPWatch não mais se auto-instala no arquivo crontab do root. Sendo assim, cada usuário que deseja utilizá-lo deve colocá-lo em seu próprio crontab. Para obter uma atualização semanal como antes a seguinte linha poderia ser usada : . "47 5 * * 7 /usr/sbin/ftpwatch" . Isto significa também que todos os arquivos em ~/.ftpwatch tem de ser modificados para serem de propriedade do usuário ao invés do root. Description-ru: õÓÔÁÎÏ×ËÁ ftpwatch × crontab ÂÏÌØÛÅ ÎÅ Á×ÔÏÍÁÔÉÚÉÒÏ×ÁÎÁ éÚ-ÚÁ ÐÒÏÂÌÅÍ Ó ÂÅÚÏÐÁÓÎÏÓÔØÀ, FTPWatch ÂÏÌØÛÅ ÎÅ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔ ÓÅÂÑ × crontab-ÆÁÊÌ root`Á. îÏ ÌÀÂÏÊ ÐÏÌØÚÏ×ÁÔÅÌØ, ËÏÔÏÒÙÊ ÈÏÞÅÔ ÅÇÏ ÉÓÐÏÌØÚÏ×ÁÔØ, ÍÏÖÅÔ ÐÏÍÅÓÔÉÔØ ÎÅÏÂÈÏÄÉÍÕÀ ÓÔÒÏËÕ × ÓÏÂÓÔ×ÅÎÎÙÊ crontab. äÌÑ ÅÖÅÎÅÄÅÌØÎÙÈ ÏÂÎÏ×ÌÅÎÉÊ ÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÓÌÅÄÕÀÝÕÀ ÚÁÐÉÓØ: . "47 5 * * 7 /usr/sbin/ftpwatch" . üÔÏ ÔÁËÖÅ ÏÚÎÁÞÁÅÔ, ÞÔÏ ×ÓÅ ÆÁÊÌÙ × ËÁÔÁÌÏÇÅ ~/.ftpwatch/ ÄÏÌÖÎÙ ÉÍÅÔØ ×ÌÁÄÅÌØÃÅÍ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÇÏ ÐÏÌØÚÏ×ÁÔÅÌÑ ×ÍÅÓÔÏ root. ftpwatch-1.23+nmu1/ftpwatch.80000664000000000000000000000275311606362605012750 0ustar .\" Copyright (C) 1997 Hakan Ardo .\" May be distributed under the GNU General Public License .TH FTPWATCH 8 "7 Januari 1997" .SH NAME ftpwatch \- Notifies you of changes on remote ftp servers .SH SYNOPSIS ftpwatch .SH DESCRIPTION .I ftpwatch is a program intended to be run as a cron job. Every user who wants to use it should install it into his crontab file. That is add something like: .PP 47 5 * * 7 /usr/bin/ftpwatch .PP The user should then create a .ftpwatchrc file. If one is found the specifed files and directories in that file will be dired, and the result is stored as separate files in a .ftpwatch directory i the home directory. .IR diff (1) is invoked to find any changes since last run. If any are found, the output of diff is mailed to the user. .SH OPTIONS -d passes the options in to diff when invoked to generate the change-repport sent to the user. .PP -p run ftp in passive mode .SH CONFIGURATION FILES Each user can place a .ftpwatchrc file in there home directories, listing the files or directories they are intrested in. The format is simpel. Each line of the file is of the following type: .PP : .PP Where is the hostname of the ftp server and is the file or directory to watch. If you instead want to watch an entire directory structure recoursly you can add an R to the config line of the dir whoes subdirs you are intresed in, like this: .PP :R: .PP .SH AUTHOR .nf Hakan Ardo ftpwatch-1.23+nmu1/ftpwatch.pl0000775000000000000000000000603710517602550013212 0ustar #!/usr/bin/perl # ftpwatch - Simple script to notify you of changes on ftp servers # Copyright (C) 1997 Hakan Ardo # # 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 # 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., 675 Mass Ave, Cambridge, MA 02139, USA. $Tmp="/tmp/ftpwatch.$$"; $passive=0; $DiffOpt=''; foreach (@ARGV) { if (/^-d/) { s/^-d/-/; $DiffOpt.="$_ "; } if (/^-p/) { $passive=1; } } use Net::FTP; #open (PAS, ") { if (/^([^:]+):?(.{0,1}):(.+)$/) { $sv=$1; $rc=$2; $dir=$3; $file=undef; my $ftp = Net::FTP->new($sv, Debug => 0, Passive=>$passive); if (!$ftp) {print stderr "Connect failed: '$@'\n"; next} if (!$ftp->login) {print stderr "Login failed: '$@'\n"; next} if (!$ftp->cwd($dir)) { if ($dir =~ /^(.*)\/([^\/]+)$/) { $dir=$1; $file=$2; if (!$ftp->cwd($dir)) { print stderr "No such dir: '$dir'\n"; next } } else { print stderr "No such dir: '$dir'\n"; next } } open (T, ">$Tmp.2"); my @dr; if ($rc eq "R") {@dr=$ftp->dir("-R")} else { if (defined $file) {@dr=$ftp->dir($file)} else {@dr=$ftp->dir;} } foreach (@dr) { if (/^[\-dl]/ | (/^\// && /:\s*$/) && !/\s+\.\.?\s*$/ && !/^\-+\-$/) { s/^G//g; print T $_,"\n"; } } close (F); close(T); $ftp->quit; $cf="$sv$dir$rc"; if (defined $file) {$cf.="/$file";} $cf=~s/\//_/g; $cf="$ConfDir/$cf"; system ("diff $DiffOpt $cf $Tmp.2 > $Tmp.3"); system ("cp $Tmp.2 $cf"); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime, $mtime,$ctime,$blksize,$blocks) = stat("$Tmp.3"); if ($size > 0) { system ("mail -s \"Ftp Update: $sv$dir\" $EMail< $Tmp.3"); } } system("rm $Tmp*"); } } ftpwatch-1.23+nmu1/t.pl0000775000000000000000000000072407204726656011647 0ustar #!/usr/bin/perl use Net::FTP; my $ftp = Net::FTP->new("ftp.bz2.us.kernel.org", Debug => 0); if (!$ftp) {print stderr "Connect failed: '$@'\n"; next} if (!$ftp->login) {print stderr "Login failed: '$@'\n"; next} if (!$ftp->cwd("/pub/linux/kernel/v2.4")) { if ($dir =~ /^(.*)\/([^\/]+)$/) { $dir=$1; $file=$2; if (!$ftp->cwd($dir)) { print stderr "No such dir: '$dir'\n"; next } } else { print stderr "No such dir: '$dir'\n"; next } } print $ftp->dir; ftpwatch-1.23+nmu1/t20000664000000000000000000000004206727700566011306 0ustar open hobbe dir -R /pub/debian bye ftpwatch-1.23+nmu1/tst0000664000000000000000000000647712741635231011602 0ustar #!/usr/bin/perl -w # # Find dependencies on perl stuff # Remove .packlist files BEGIN { push @INC, "debian", "/usr/lib/debhelper" } use Dh_Lib; init(); my $perl = $ENV{PERL} || '/usr/bin/perl'; # Figure out the version of perl. If $ENV{PERL} is set, query the perl binary # it points to, otherwise query perl directly. my $version=sprintf("%.3f", $]); if (defined $ENV{PERL}) { $version=`$ENV{PERL} -e 'printf "%.3f", \$]'`; } foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $TMP=tmpdir($PACKAGE); $EXT=pkgext($PACKAGE); my ($file, $v, $arch); my $dep_arch = ''; my $dep = ''; my $found = 0; # Look for perl modules and check where they are installed if (-d "$TMP/usr/lib/perl5") { foreach $file (split(/\n/,`find $TMP/usr/lib/perl5 -type f \\( -name "*.pm" -or -name "*.so" \\)`)) { $found++; if ($file =~ m<^$TMP/usr/lib/perl5/(\d\.\d{3})/([^/]+)/>) { $v = $1; $arch = $2; check_module_version ($v, $version); $v .= '-thread' if ($arch =~ /-thread/); $dep_arch = add_deps ($dep_arch, "perl-$v"); } elsif ($file =~ m<^$TMP/usr/lib/perl5/(\d.\d{3})/>) { $v = $1; check_module_version ($v, $version); $dep_arch = add_deps ($dep_arch, "perl-$v"); } } } if ($found and not $dep_arch) { $dep = "perl5"; } elsif ($dep_arch) { $dep = $dep_arch; } # Look for perl scripts my ($ff, $newdep); foreach $file (split(/\n/,`find $TMP -type f \\( -name "*.pl" -or -perm /111 \\)`)) { $ff=`file -b $file`; if ($ff =~ /perl/) { $newdep = dep_from_script ($file); $dep = add_deps ($dep, $newdep) if $newdep; } } # Remove .packlist files and eventually some empty directories if (not $dh{'K_FLAG'}) { foreach $file (split(/\n/,`find $TMP -type f -name .packlist`)) { unlink($file); # Get the directory name while ($file =~ s#/[^/]+$##){ last if (not -d $file); last if (not rmdir $file); } } } next unless $dep; if (-e "debian/$EXT\subtsvars") { open (IN, "; close IN; open (OUT, ">debian/$EXT\subtsvars"); print OUT @lines; } else { open (OUT, ">debian/$EXT\subtsvars"); } print OUT "perl:Depends=$dep\n"; close OUT; } sub add_deps { my ($dep, $new) = @_; # If $new = perl5 or perl5-thread check if perl-X.XXX(-thread)? # is not already in the dependencies if ($new eq "perl5") { return $dep if ($dep =~ m/(^|\s)perl-5\.\d{3}(\s|,|$)/); } elsif ($new eq "perl5-thread") { return $dep if ($dep =~ m/(^|\s)perl-5\.\d{3}-thread(\s|,|$)/); } if (not $dep) { $dep = $new; } else { $dep .= ", $new" unless ($dep =~ m/(^|\s)$new(\s|,|$)/); } return $dep; } sub check_module_version { my ($v1, $v2) = @_; unless ($v1 eq $v2) { warning("A module has been found in perl-$v1 arch directory. But perl-$v2 is the perl currently used ...\n"); } } sub dep_from_script { my $file = shift; my ($line, $perl, $dep); open (SCRIPT, "<$file") || die "Can't open $file: $!\n"; $line =