From: Gerfried Fuchs Date: Mon, 8 Jul 2002 10:21:14 +0000 (+0200) Subject: Imported Debian patch 0.54.1-1.woody1 X-Git-Tag: debian/0.54.1-1.woody1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=8eaf40d5eba86531dd413aeba1005420fc1ecaab;p=pkg%2Ft-prot.git Imported Debian patch 0.54.1-1.woody1 --- diff --git a/debian/Muttrc.t-prot b/debian/Muttrc.t-prot new file mode 100644 index 0000000..9d9ba24 --- /dev/null +++ b/debian/Muttrc.t-prot @@ -0,0 +1,14 @@ +set display_filter='t-prot -cemtS -Mmutt -L/usr/share/doc/t-prot/examples/footers' +# set it to '' to turn it off by default + +# toggle TOFU protection with ESC-0 (off) and ESC-1 (on) +macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off" +macro generic \e1 ":set display_filter='t-prot -cemtS -Mmutt -L/usr/share/doc/t-prot/examples/footers'\n" "Turn TOFU protection on" + +# same in pager mode - ugly but what the hell... +macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off" +macro pager \e1 ":set display_filter='t-prot -cemtS -Mmutt -L/usr/share/doc/t-prot/examples/footers'; exec exit\n:exec display-message\n" "Turn TOFU protection on" + +# highlight TOFU protection: +color body brightmagenta black "^\\[---.*" +color body green black "^#v[-+]" diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..856b5f0 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,17 @@ +t-prot for Debian +----------------- + + This nice script was done by a dear friend of mine and is quite useful to not +loose temper when receiving mails that are TOFU (see the manual page for an +explenation of that abbreviation). I personally think it's really helpful. + + Currently the package only offers an option for enabling it with mutt. If you +have an idea how to make it usable from other mailers (like gnus should be +able, too) I'd be glad to hear about it... + + -- Gerfried Fuchs , Fri, 22 Feb 2002 09:36:18 +0100 + + If you encounter any problems please read the BUGS file -- the debug patch +is gnuzipped in the doc directory. + + -- Gerfried Fuchs , Tue, 5 Mar 2002 08:47:54 +0100 diff --git a/debian/README.footers b/debian/README.footers new file mode 100644 index 0000000..170c5b1 --- /dev/null +++ b/debian/README.footers @@ -0,0 +1,8 @@ + In the footers directory you find some files that are examples of how the +footers are handled by t-prot. Those are the footers for most of the debian +mailing lists. Notice that the debian- footer is a stripped one which matches +most of the lists. t-prot checks for start of line matches. + + You can directly use them if you add the options +-l -L /usr/share/doc/t-prot/examples/footers +to your call to t-prot. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ceaec89 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,112 @@ +t-prot (0.54.1-1.woody1) woody-proposed-updates; urgency=medium + + * Installed the postrm script into the binary package (closes: #144946). + No other changes where made, just installing the postrm script into the + binary package. + + -- Gerfried Fuchs Mon, 8 Jul 2002 12:21:14 +0200 + +t-prot (0.54.1-1) unstable; urgency=low + + * New upstream release + * Two more files for the doc directory. + + -- Gerfried Fuchs Fri, 29 Mar 2002 09:13:22 +0100 + +t-prot (0.54-1) unstable; urgency=low + + * New upstream release + * New README file added to the docs, cleaned up rules file a little bit + while I was already in it. + + -- Gerfried Fuchs Fri, 22 Mar 2002 08:19:55 +0100 + +t-prot (0.53-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Thu, 21 Mar 2002 08:33:29 +0100 + +t-prot (0.52-1) unstable; urgency=medium + + * New upstream release -- fixes a security hole (/tmp symlink attack) in the + debug patch. + + -- Gerfried Fuchs Wed, 20 Mar 2002 09:37:27 +0100 + +t-prot (0.51-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Tue, 19 Mar 2002 15:29:55 +0100 + +t-prot (0.50-1) unstable; urgency=low + + * New upstream release + * Cleaned up debian/rules a bit to not have to tweak it with each upload for + the debug patch. Debug patch has to be gzipped, btw. + + -- Gerfried Fuchs Tue, 19 Mar 2002 08:13:22 +0100 + +t-prot (0.49-1) unstable; urgency=low + + * New upstream release + * Updated watchfile to uscan version=2. + + -- Gerfried Fuchs Mon, 18 Mar 2002 17:56:24 +0100 + +t-prot (0.48-2) unstable; urgency=low + + * Moved the *correct* debug patch directly into the doc directory, not + examples (thanks, Jochen, for noticing...) + * Applied a small initialisation patch from Jochen. + + -- Gerfried Fuchs Fri, 15 Mar 2002 17:28:15 +0100 + +t-prot (0.48-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Fri, 15 Mar 2002 10:19:58 +0100 + +t-prot (0.47-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Thu, 14 Mar 2002 09:27:07 +0100 + +t-prot (0.46-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Tue, 12 Mar 2002 09:04:24 +0100 + +t-prot (0.45-1) unstable; urgency=low + + * New upstream release + * Had to change the debian/Muttrc.t-prot file to represent changes in + program. + + -- Gerfried Fuchs Mon, 11 Mar 2002 09:58:14 +0100 + +t-prot (0.43-1) unstable; urgency=low + + * New upstream release + * Added hilight color to the Muttrc.t-prot script. + + -- Gerfried Fuchs Tue, 05 Mar 2002 13:04:09 +0100 + +t-prot (0.42-1) unstable; urgency=low + + * New upstream release + + -- Gerfried Fuchs Tue, 26 Feb 2002 08:30:11 +0100 + +t-prot (0.40-1) unstable; urgency=low + + * New upstream release + * Initial upload to debian (closes: #134598) + * Moved mutt from Recommends: to Suggests: to make it into main (raise it + later when crypto is in main). + + -- Gerfried Fuchs Mon, 25 Feb 2002 09:55:29 +0100 diff --git a/debian/conffiles b/debian/conffiles new file mode 100644 index 0000000..490e691 --- /dev/null +++ b/debian/conffiles @@ -0,0 +1 @@ +/etc/Muttrc.t-prot diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..d118aca --- /dev/null +++ b/debian/config @@ -0,0 +1,22 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# Only do this if a Muttrc is present +if [ -e /etc/Muttrc ]; then + + # Add the source line to /etc/Muttrc? + db_input medium t-prot/muttrc_option || true + db_go + + # Check the answer. + db_get t-prot/muttrc_option + if [ "$RET" = "true" ]; then + # Show note that it's enabled by default. + db_input high t-prot/muttrc_note || true + db_go + fi +fi + +exit 0 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..56a61d3 --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: t-prot +Section: mail +Priority: extra +Maintainer: Gerfried Fuchs +Build-Depends-Indep: debconf-utils +Standards-Version: 3.5.6 + +Package: t-prot +Architecture: all +Depends: perl (>= 5.005), libgetopt-mixed-perl, debconf (>= 0.5) +Suggests: mutt (>= 1.3.12), mail-transport-agent +Description: display filter for RFC822 messages + This program is a filter which shall improve the readability for messages + (email and posts) by *hiding* some annoying parts, e.g. mailing list footers, + signatures and TOFU as well as squeezing sequences of blank lines or + punctuation. + . + TOFU is an acronym that stands for "Text oben, Fullquote unten" (german + language) which means the style of sadly so many people that just leave all + the quotes in a reply and add some own lines above. This acronym is what gave + the script it's name - TOFU Protection. + . + It currently offers hints how to include it within mutt. It should be + possible to do similars with other mailers that allow to have a message run + through a program before it's displayed. If you have such an mailer I'd be + interested if you could let me know of your setup. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..4c76507 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,15 @@ +This package was debianized by Gerfried Fuchs on +Tue, 29 Jan 2002 15:55:21 +0100. + +It was downloaded + from http://www.escape.de/users/tolot/mutt/t-prot/downloads/ + +Upstream Author: + Jochen Striepe + +Copyright: + This is free software; you may use the source to whatever + you like. Just keep in mind to mention the original + source of the script and the manpage when you give it + away. There is NO warranty; not even for MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/debian/footers/debian- b/debian/footers/debian- new file mode 100644 index 0000000..3150656 --- /dev/null +++ b/debian/footers/debian- @@ -0,0 +1,3 @@ +-- +To UNSUBSCRIBE, email to debian- +with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org diff --git a/debian/footers/debian-at b/debian/footers/debian-at new file mode 100644 index 0000000..5aa4e22 --- /dev/null +++ b/debian/footers/debian-at @@ -0,0 +1,4 @@ +_______________________________________________ +Debian-at mailing list +Debian-at@mail.vianova.at +http://mail.vianova.at/mailman/listinfo/debian-at diff --git a/debian/footers/debian-private b/debian/footers/debian-private new file mode 100644 index 0000000..7e1f62a --- /dev/null +++ b/debian/footers/debian-private @@ -0,0 +1,6 @@ +-- +Please respect the privacy of this mailing list. + +Archive: file://master.debian.org/~debian/archive/debian-private/ + +To UNSUBSCRIBE, use the web form at . diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..d3b5ca8 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +if [ "$1" != configure ]; then + exit 0 +fi + +# Source debconf library. +if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -d /usr/doc -a ! -e /usr/doc/t-prot -a -d /usr/share/doc/t-prot ]; then + ln -sf ../share/doc/t-prot /usr/doc/t-prot +fi + +# check for the /etc/Muttrc return value +if [ -e /usr/share/debconf/confmodule ]; then + db_get t-prot/muttrc_option + muttrc="$RET" +fi + +if [ "$muttrc" = "true" ] ; then + # check if it's already added + if ! grep /etc/Muttrc.t-prot /etc/Muttrc > /dev/null; then + echo 'source "/etc/Muttrc.t-prot" # for the t-prot script' \ + >> /etc/Muttrc + fi +elif [ "$muttrc" = "false" ] ; then + # delete the line. + if grep /etc/Muttrc.t-prot /etc/Muttrc > /dev/null; then + TMPFILE=`mktemp /tmp/Muttrc.XXXXXX` + sed -e '\,/etc/Muttrc.t-prot,d' < /etc/Muttrc > $TMPFILE + chmod --reference=/etc/Muttrc $TMPFILE + mv -f $TMPFILE /etc/Muttrc + fi +fi diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..d5c0b3e --- /dev/null +++ b/debian/postrm @@ -0,0 +1,17 @@ +#!/bin/sh +set -e +if [ "$1" != purge ]; then + exit 0 +fi + +if grep /etc/Muttrc.t-prot /etc/Muttrc > /dev/null; then + TMPFILE=`mktemp /tmp/Muttrc.XXXXXX` + sed -e '\,/etc/Muttrc.t-prot,d' < /etc/Muttrc > $TMPFILE + chmod --reference=/etc/Muttrc $TMPFILE + mv -f $TMPFILE /etc/Muttrc +fi + +if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..d10b846 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/t-prot ]; then + rm -f /usr/doc/t-prot +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ea36e9a --- /dev/null +++ b/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f +# debian/rules for t-prot package + +clean: + $(checkdir) + $(checkroot) + -rm -rf debian/t-prot debian/files + + +build: +# uhm, build for a binary-indep package? Don't try to be funny ;) + + +install: build + $(checkdir) + $(checkroot) + -rm -rf debian/t-prot + mkdir -m755 debian/t-prot + cd debian/t-prot && mkdir -m755 -p etc usr/bin usr/share/man/man1 \ + usr/share/doc/t-prot/examples + install -m644 -p debian/Muttrc.t-prot \ + debian/t-prot/etc + install -m755 -p t-prot \ + debian/t-prot/usr/bin + install -m644 -p t-prot.1 \ + debian/t-prot/usr/share/man/man1 + install -m644 -p BUGS TODO contrib/README.patches \ + contrib/t-prot-r*-debug.diff contrib/t-prot-r*-ftr.diff \ + README debian/t-prot/usr/share/doc/t-prot + cp -pR muttrc.t-prot debian/footers debian/README.footers \ + debian/t-prot/usr/share/doc/t-prot/examples + install -m644 -p ChangeLog \ + debian/t-prot/usr/share/doc/t-prot/changelog + gzip -9 debian/t-prot/usr/share/doc/t-prot/changelog \ + debian/t-prot/usr/share/man/man1/t-prot.1 \ + debian/t-prot/usr/share/doc/t-prot/t-prot-r*-debug.diff + find debian/t-prot -print0 2>/dev/null | xargs -0r \ + chown --no-dereference 0.0 + find debian/t-prot ! -type l -print0 2>/dev/null | xargs -0r \ + chmod go=rX,u+rw,a-s + + +binary-indep: build install + $(checkdir) + $(checkroot) + mkdir -m755 -p debian/t-prot/DEBIAN + install -m644 -p debian/copyright debian/README.Debian \ + debian/t-prot/usr/share/doc/t-prot + install -m644 -p debian/changelog \ + debian/t-prot/usr/share/doc/t-prot/changelog.Debian + gzip -9 debian/t-prot/usr/share/doc/t-prot/changelog.Debian + install -m755 -p debian/postinst debian/prerm debian/postrm \ + debian/config debian/t-prot/DEBIAN + install -m644 -p debian/conffiles \ + debian/t-prot/DEBIAN + debconf-mergetemplate debian/templates debian/templates.* \ + > debian/t-prot/DEBIAN/templates + dpkg-gencontrol -ldebian/changelog -isp -pt-prot -Pdebian/t-prot + cd debian/t-prot && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ + xargs -r0 md5sum > DEBIAN/md5sums + dpkg --build debian/t-prot .. + + +binary-arch: build install +# We have nothing to do here. + + +define checkdir + test -f debian/rules +endef + +define checkroot + test root = "`whoami`" +endef + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..f70b850 --- /dev/null +++ b/debian/templates @@ -0,0 +1,15 @@ +Template: t-prot/muttrc_option +Type: boolean +Default: yes +Description: Do you want to source the t-prot setup from /etc/Muttrc? + The t-prot package provides a config file /etc/Muttrc.t-prot -- to use + the script from mutt you have to source it. You can either do this + from /etc/Muttrc for system wide usage (rather, I can do that for you) + or let the users decide to add the line to their ~/.muttrc. + +Template: t-prot/muttrc_note +Type: note +Description: Please notice that the default settings enable t-prot. + On default the t-prot script is active when you start mutt. If you + want to change this behavior simply set the display_filter string in + /etc/Muttrc.t-prot to an empty one. diff --git a/debian/templates.de b/debian/templates.de new file mode 100644 index 0000000..684f639 --- /dev/null +++ b/debian/templates.de @@ -0,0 +1,25 @@ +Template: t-prot/muttrc_option +Type: boolean +Default: yes +Description: Do you want to source the t-prot setup from /etc/Muttrc? + The t-prot package provides a config file /etc/Muttrc.t-prot -- to use + the script from mutt you have to source it. You can either do this + from /etc/Muttrc for system wide usage (rather, I can do that for you) + or let the users decide to add the line to their ~/.muttrc. +Description-de: Wollen Sie die t-prot Einstellungen aus /etc/Muttrc einbinden? + Das t-prot Paket bietet eine Configurations-Datei /etc/Muttrc.t-prot an + -- um es in mutt zu verwenden, müssen Sie es einbinden. Sie können das + entweder in /etc/Muttrc Systemweit tun (oder vielmehr kann ich das für + Sie übernehmen), oder es den Benutzern überlassen, die Zeile in ihre + ~/.muttrc mit aufzunehmen. + +Template: t-prot/muttrc_note +Type: note +Description: Please notice that the default settings enable t-prot. + On default the t-prot script is active when you start mutt. If you + want to change this behavior simply set the display_filter string in + /etc/Muttrc.t-prot to an empty one. +Description-de: Bitte beachten Sie, dass t-prot per Default aktiviert ist. + In der Standardeinstellung ist das t-prot Skript aktiv, wenn Sie mutt + starten. Wenn Sie dieses Verhalten ändern wollen, ändern Sie den + display_filter Parameter in /etc/Muttrc.t-prot auf einen leeren String. diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..7e3b26a --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=2 +# Site/Directory Pattern Version Script +http://www.escape.de/users/tolot/mutt/t-prot/downloads/ t-prot-([\d\.]+)\.tar\.gz debian uupdate