--- fsniper-1.3.1.orig/debian/manpages +++ fsniper-1.3.1/debian/manpages @@ -0,0 +1,2 @@ +debian/fsniper.1 +debian/fsniper.5 --- fsniper-1.3.1.orig/debian/control +++ fsniper-1.3.1/debian/control @@ -0,0 +1,22 @@ +Source: fsniper +Section: utils +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Tanguy Herrmann +Build-Depends: debhelper (>= 7), autotools-dev, libmagic-dev, libpcre3-dev, quilt +Standards-Version: 3.8.3 + +Package: fsniper +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Monitors for new files and runs a rule based task + fsniper is a tool that monitors a given set of directories for new + files and, based on the new file's type or name, invokes a custom + command on it. + . + Common uses include making a single drop directory for all things from a + web browser or having semi-intelligent scripts which figure out what + to do with those files. + . + This package comes with no generic rules, so you must write + them yourself. --- fsniper-1.3.1.orig/debian/compat +++ fsniper-1.3.1/debian/compat @@ -0,0 +1 @@ +5 --- fsniper-1.3.1.orig/debian/rules +++ fsniper-1.3.1/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +include /usr/share/quilt/quilt.make + +config.status: configure + dh_testdir + # Add here commands to configure the package. +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + + +build: build-stamp + +build-stamp: $(QUILT_STAMPFN) config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + #-$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + + dh_clean build-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/fsniper. + $(MAKE) DESTDIR=$(CURDIR)/debian/fsniper install + + +# 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 ChangeLog + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- fsniper-1.3.1.orig/debian/examples +++ fsniper-1.3.1/debian/examples @@ -0,0 +1 @@ +example.conf --- fsniper-1.3.1.orig/debian/fsniper.1 +++ fsniper-1.3.1/debian/fsniper.1 @@ -0,0 +1,63 @@ +.TH FSNIPER "1" "January 2009" "User Commands" "User Commands" + +.SH NAME +fsniper \- watch directories and apply rules to newly created files + +.SH SYNOPSIS +.B fsniper +[\fIOPTION\fR]... + +.SH DESCRIPTION +.\" Add any additional description here +.PP +Watch directories for newly created or modified files and apply rule to them +when either their MIME-Type or their name (with standard wildcards or regex) +match a certain filter. +.PP +Those rules are described in file \fB~/.config/fsniper/config\fR (for +more information about it, see section \fB5\fR). +.SH OPTIONS +.TP +\fB\-\-daemon\fR +Launch fsniper as a daemon. +.TP +\fB\-\-verbose\fR +Print debug information. +.TP +\fB\-\-sync\fR +Sync mode (for debugging). +.TP +\fB\-\-log\-to\-stdout\fR +Log to stdout alongside the usual log file. +.TP +\fB\-\-help\fR +Print the help and exit. +.TP +\fB\-\-version\fR +Output version information and exit. +.SH "FILES" +.PP +\fI$HOME/.config/fsniper/config\fR +.RS 4 +User configuration file which determines which directories should be watched +and contains the rules to apply. + +.SH AUTHOR +Written by Andrew Yates and David A. Foster. + +This manual page was written by Tanguy Herrmann , +for the Ubuntu GNU/Linux oeprating system (but may be used by others). + +.SH "REPORTING BUGS" +Report bugs at or +on IRC: #l3ib on irc.freenode.net. + +.SH COPYRIGHT +Copyright \(co 2008 Andrew Yates and David A. Foster +Licensed under the GNU version 3 or later, see . +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +.SH "SEE ALSO" +\fBfsniper\fR(5) --- fsniper-1.3.1.orig/debian/copyright +++ fsniper-1.3.1/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Dave Walker on +Thu, 21 Aug 2008 10:10:22 +0100. + +It was downloaded from http://projects.l3ib.org/trac/fsniper + +Upstream Authors: + + Andrew Yates + David A. Foster + +Copyright: + + Copyright © 2008 Andrew Yates + Copyright © 2008 David A. Foster + +License: + + This program is free software: you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published bythe Free Software Foundation, either version 3 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. + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + +The Debian packaging is © 2008, Dave Walker and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- fsniper-1.3.1.orig/debian/fsniper.5 +++ fsniper-1.3.1/debian/fsniper.5 @@ -0,0 +1,55 @@ +.TH "FSNIPER" "5" "January 2009" "Configuration file format" "Configuration file format" +.SH NAME +\fI$HOME/.config/fsniper/config\fR \- user configuration file for fsniper +.SH DESCRIPTION +.PP +This file is read by fsniper(\fB1\fR) when launched. It is a C-style +configuration file. +.PP +It begins with a \fBwatch\fR section. +.PP +Then, each subsection is a \fBdirectory\fR to watch. +.PP +Under that, each subsection is a filter for file to apply a rule. +There are 2 types of filters: +.HP +\fBMIME-Type filters\fR +.RS 4 +\fIimage/*\fR will apply the rule only on images +\fIimage/png\fR will apply the rule only on png images +.RE +.HP +\fBName filters\fR +.RS 4 +.HP +\fBWildcards\fR +.RS 4 +\fI*\fRname\fI*\fR +Match on name with regular wildcard. Or on extension (*.jpg for example) +.RE +.HP +\fBRegular Expressions\fR +.RS 4 +\fI/\fRregex\fI/\fR +Match on name with the regex given. +.RE +.RE +.PP +The last section is the start of the rule, and its format is: +.RS 4 +handler = \fBcommand to apply\fR +.HP +The command can be any shell command. +To get the file name, use %% +.HP +\fBExample:\fR +.RS 4 +handler = echo %% +.RE +.SH "SEE ALSO" +.PP +\fB/usr/share/doc/fsniper/examples/example.conf\fR, +\fB\fR, +\fBfsniper\fR(1) +.SH "AUTHOR" +This manual page was written by Tanguy Herrmann , for the Ubuntu GNU/Linux system (but may be used by others). --- fsniper-1.3.1.orig/debian/README.source +++ fsniper-1.3.1/debian/README.source @@ -0,0 +1,5 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +See /usr/share/doc/quilt/README.source for a detailed explanation. --- fsniper-1.3.1.orig/debian/watch +++ fsniper-1.3.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://projects.l3ib.org/fsniper/files/fsniper-(\d.*)\.tar\.gz --- fsniper-1.3.1.orig/debian/changelog +++ fsniper-1.3.1/debian/changelog @@ -0,0 +1,31 @@ +fsniper (1.3.1-0ubuntu3) lucid; urgency=low + + * debian/control:Fixed Typo in Description (LP: #486612) + * Update Standard-Version to 3.8.3 + + -- Lennart Brinkmann Mon, 25 Jan 2010 18:09:27 +0100 + +fsniper (1.3.1-0ubuntu2) karmic; urgency=low + + * SECURITY UPDATE: Permissions of PID file are set on current + umask rather than 600. (LP: #403116) + - debian/patches/pid_file_permissons_to_600.patch: adjust + src/main.c to set permissions of PID to 600. Based on + upstream patch. + * SECURITY UPDATE: Quotation marks not safely checked in + filenames. (LP: #403113) + - debian/patches/singlequote_doublequote_issue.patch: + adjust src/handle_event.c to include checking for both + single and double quotation marks. Based on upstream + patch. + * Added quilt support to manage patches. + * Bumped Debian package Standards-Version to 3.8.2 + + -- Dave Walker (Daviey) Fri, 24 Jul 2009 21:59:07 +0100 + +fsniper (1.3.1-0ubuntu1) jaunty; urgency=low + + * Initial release (LP: #260031) + * Authored manpages fsniper.1 and fsniper.5 + + -- Tanguy Herrmann (dolanor) Thu, 29 Jan 2009 01:03:00 +0100 --- fsniper-1.3.1.orig/debian/patches/series +++ fsniper-1.3.1/debian/patches/series @@ -0,0 +1,2 @@ +pid_file_permissons_to_600.patch +singlequote_doublequote_issue.patch --- fsniper-1.3.1.orig/debian/patches/singlequote_doublequote_issue.patch +++ fsniper-1.3.1/debian/patches/singlequote_doublequote_issue.patch @@ -0,0 +1,28 @@ +# +# Ubuntu: https://bugs.launchpad.net/bugs/ +# Upstream: http://code.l3ib.org/?p=fsniper.git;a=commit;h=2bbeb5d6e6b55bb9692c043fcdbeab15d9723c9e +# Patch: http://code.l3ib.org/?p=fsniper.git;a=blobdiff_plain;f=src/handle_event.c;fp=src/handle_event.c;h=2a5a8394a73528409be556ea00ccccfcc344a26b;hp=58ff0fc99aa35f833cf88e0a685299bf78a6ebcb;hb=2bbeb5d6e6b55bb9692c043fcdbeab15d9723c9e;hpb=23c436671ee4765b92164f8f74f8ad217ff5a81c +# Description: Security fix for singlequote/doublequote issue. +# + +From: Klaus Alexander Seistrup +Date: Mon, 20 Oct 2008 16:01:45 +0000 (-0400) +Subject: Security fix for singlequote/doublequote issue. +X-Git-Url: http://code.l3ib.org/?p=fsniper.git;a=commitdiff_plain;h=2bbeb5d6e6b55bb9692c043fcdbeab15d9723c9e + +Security fix for singlequote/doublequote issue. + +Author: Klaus Alexander Seistrup +--- + +--- a/src/handle_event.c ++++ b/src/handle_event.c +@@ -428,7 +428,7 @@ + + /* build filename with quotes */ + sanefilename = malloc(strlen(path) + strlen(name) + 4); +- sprintf(sanefilename, "\"%s/%s\"", path, name); ++ sprintf(sanefilename, "'%s/%s'", path, name); + + handlerline = strdup(handler); + --- fsniper-1.3.1.orig/debian/patches/pid_file_permissons_to_600.patch +++ fsniper-1.3.1/debian/patches/pid_file_permissons_to_600.patch @@ -0,0 +1,30 @@ +# +# Ubuntu: https://bugs.launchpad.net/bugs/403116 +# Upstream: http://code.l3ib.org/?p=fsniper.git;a=commit;h=82cb0b46c48485fd4f6231ce3169c7be87d1ea07 +# Patch: http://code.l3ib.org/?p=fsniper.git;a=blobdiff_plain;f=src/main.c;fp=src/main.c;h=cd49dffebe4b4c728b62c28c1381c4fb6f5ad87d;hp=03a8d701d6f9802ba346b591429e58741ca53479;hb=82cb0b46c48485fd4f6231ce3169c7be87d1ea07;hpb=2bbeb5d6e6b55bb9692c043fcdbeab15d9723c9e +# Description: pid file permissions set to 600 instead of current umask +# + +From: Andrew Yates +Date: Thu, 23 Oct 2008 16:02:11 +0000 (-0500) +Subject: pid file permissions set to 600 instead of current umask +X-Git-Url: http://code.l3ib.org/?p=fsniper.git;a=commitdiff_plain;h=82cb0b46c48485fd4f6231ce3169c7be87d1ea07 + +pid file permissions set to 600 instead of current umask + +Author: Jakub Hrozek +--- + +--- a/src/main.c ++++ b/src/main.c +@@ -153,7 +153,10 @@ + void write_pid_file(char *pidfilename) + { + FILE *pidfile; ++ mode_t umask_old; ++ umask_old = umask(0177); + pidfile = fopen(pidfilename, "w"); ++ umask(umask_old); + fprintf(pidfile, "%d", getpid()); + fclose(pidfile); + }