From: Gerfried Fuchs Date: Thu, 6 Jul 2006 08:03:23 +0000 (-0500) Subject: Imported Debian patch 2.1-2 X-Git-Tag: debian/2.1-2^0 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=a2f12f10589a04b48cafa947b645c6ec69ec2829;p=pkg%2Ft-prot.git Imported Debian patch 2.1-2 --- diff --git a/debian/Muttrc b/debian/Muttrc new file mode 100644 index 0000000..d13ed6c --- /dev/null +++ b/debian/Muttrc @@ -0,0 +1,14 @@ +set display_filter='t-prot -cmekatlS --bigq --pgp-move-vrf -Mmutt -L/etc/t-prot/footers -A/etc/t-prot/ads' +# 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 -cmekatlS --bigq --pgp-move-vrf -Mmutt -L/etc/t-prot/footers -A/etc/t-prot/ads'\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 -cmekatlS --bigq --pgp-move-vrf -Mmutt -L/etc/t-prot/footers -A/etc/t-prot/ads'; 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/Muttrc.t-prot b/debian/Muttrc.t-prot deleted file mode 100644 index ecaa003..0000000 --- a/debian/Muttrc.t-prot +++ /dev/null @@ -1,14 +0,0 @@ -set display_filter='t-prot -cemktS --bigq --pgp-move-vrf -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 -cemktS --bigq --pgp-move-vrf -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 -cemktS --bigq --pgp-move-vrf -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 default "^\\[---.*" -color body green default "^#v[-+]" diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian index 145df3f..3f0f4ac 100644 --- a/debian/NEWS.Debian +++ b/debian/NEWS.Debian @@ -1,8 +1,12 @@ -t-prot (1.47-2) unstable; urgency=medium +t-prot (2.1-2) unstable; urgency=low - * The automatic addition to /etc/Muttrc was removed due to a policy - violation. To not make things worse I don't try to remove the line if it - is in there. I'll try to convince the mutt maintainers of the benefit of - a conf.d directory again. + * t-prot moved its muttrc snippet to /etc/t-prot/Muttrc. You might need to + check /etc/Muttrc.t-prot* for changes and incorporate them appropriately. - -- Gerfried Fuchs Thu, 09 Dec 2004 12:25:17 +0100 + * Furthermore t-prot now offers you two directories: /etc/t-prot/footers for + mailinglist footers and /etc/t-prot/ads for ad footers. Please notice + that many files in these directories have a serious impact on the speed + of t-prot and thus it is suggested to create by mail folder directories + and use mutt's folder-hook feature to use them. + + -- Gerfried Fuchs Mon, 26 Jun 2006 03:30:47 -0500 diff --git a/debian/README.Debian b/debian/README.Debian index c8181b3..4e50a5e 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,15 +1,12 @@ t-prot for Debian ------------------ +================= This nice script was done by a dear friend of mine and is quite useful to not lose temper when receiving mails that are TOFU (see the manual page for an explanation of that abbreviation). I personally think it's really helpful. - Unfortunately mutt doesn't offer a way to "plug in" config snippets so you -have to do it yourself by hand. To do it systemwide for all users add the -following line to your /etc/Muttrc file: - -source /etc/Muttrc.t-prot + debconf asks for systemwide inclusion, you can always revert that change with +"dpkg-reconfigure t-prot" or simly remove the symlink /etc/Muttrc.d/t-prot.rc A user who doesn't like it can turn it off in his own ~/.muttrc file with this line: @@ -23,4 +20,10 @@ line into their .muttrc. :) the other slang macros in /usr/share/slrn/macros/t-prot.sl and can be sourced from there. - -- Gerfried Fuchs Thu, 09 Dec 2004 12:42:34 +0100 + You can dump your list footers and ad footers into /etc/t-prot/footers and +/etc/t-prot/ads respectively, just be aware that many files in these +directories have a serious impact on the speed of t-prot. It is advices to use +folder-hook and enable the list footer and ad footers for the appropriate list +only instead. + + -- Gerfried Fuchs Mon, 26 Jun 2006 03:19:06 -0500 diff --git a/debian/README.footers b/debian/README.footers deleted file mode 100644 index 170c5b1..0000000 --- a/debian/README.footers +++ /dev/null @@ -1,8 +0,0 @@ - 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 index 402313a..5b0d498 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +t-prot (2.1-2) unstable; urgency=low + + * The "t-prot for the masses" release. + * After looking into /etc/Muttrc I reverted the background change (#339898) + from default to black to match with default mutt colouring. + * Move listfooter examples to /etc/t-prot/footers and add empty adfooter + directory /etc/t-prot/ads (closes: #374671) + * Enable hiding both list and ad footers in the Muttrc file. + * Move the mutt configuration snippet to /etc/t-prot/Muttrc and update the + symlink if already available. + * Add NEWS.Debian item about these new configuration setup. + * Updated README.Debian, too. + * Simplified the footers, having a generalized mailman footer. + * Added French debconf translation by Christian Perrier (closes: #375944) + + -- Gerfried Fuchs Thu, 06 Jul 2006 03:03:23 -0500 + t-prot (2.1-1) unstable; urgency=low * New upstream release, which fixes: diff --git a/debian/conffiles b/debian/conffiles index 490e691..4655b57 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -1 +1,4 @@ -/etc/Muttrc.t-prot +/etc/t-prot/Muttrc +/etc/t-prot/footers/debian- +/etc/t-prot/footers/debian-private +/etc/t-prot/footers/mailman diff --git a/debian/config b/debian/config index 5363681..6c2ac71 100644 --- a/debian/config +++ b/debian/config @@ -7,4 +7,6 @@ db_input medium t-prot/muttrc.d || true db_go +# XXX - reconfigure check? + exit 0 diff --git a/debian/footers/debian-at b/debian/footers/debian-at deleted file mode 100644 index 207667c..0000000 --- a/debian/footers/debian-at +++ /dev/null @@ -1,4 +0,0 @@ -_______________________________________________ -Debian-at mailing list -Debian-at@mail.gibraltar.at -http://www.gibraltar.at/mailman/listinfo/debian-at diff --git a/debian/footers/mailman b/debian/footers/mailman new file mode 100644 index 0000000..2c08d68 --- /dev/null +++ b/debian/footers/mailman @@ -0,0 +1,4 @@ +_______________________________________________ + + +http diff --git a/debian/footers/spi-private b/debian/footers/spi-private deleted file mode 100644 index db2146b..0000000 --- a/debian/footers/spi-private +++ /dev/null @@ -1,4 +0,0 @@ -_______________________________________________ -Spi-private mailing list -Spi-private@lists.spi-inc.org -http://lists.spi-inc.org/cgi-bin/listinfo/spi-private diff --git a/debian/footers/spi-www b/debian/footers/spi-www deleted file mode 100644 index 27253e2..0000000 --- a/debian/footers/spi-www +++ /dev/null @@ -1,4 +0,0 @@ -_______________________________________________ -Spi-www mailing list -Spi-www@lists.spi-inc.org -http://lists.spi-inc.org/cgi-bin/listinfo/spi-www diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 0000000..ecd9afc --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,40 @@ +# This file is distributed under the same license as the t-prot package. +# +# Christian Perrier , 2006. +msgid "" +msgstr "" +"Project-Id-Version: t-prot\n" +"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n" +"POT-Creation-Date: 2006-03-27 12:44+0200\n" +"PO-Revision-Date: 2006-06-28 01:10+0200\n" +"Last-Translator: Christian Perrier \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.2\n" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "Do you want to enable t-prot system wide for mutt?" +msgstr "Faut-il activer t-prot pour l'ensemble des utilisateurs de mutt ?" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "" +"The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the " +"script from mutt you have to enable it. You can do this either by creating " +"a symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done " +"automatically for you), or let the users decide to add a \"source\" line for " +"it in their ~/.muttrc or ~/.mutt/muttrc. If you acknowledge this question " +"the systemwide usage will be enabled." +msgstr "" +"Le paquet t-prot fournit un fichier de configuration /etc/Muttrc.t-prot. " +"L'utilisation de t-prot avec mutt nécessite une activation spéficique qui " +"peut se faire en choisissant cette option. Elle créera un lien symbolique " +"dans /etc/Muttrc.d afin d'offrir cette possibilité à tous les utilisateurs " +"du système. Alternativement, si vous ne choisissez pas cette option, chaque " +"utilisateur pourra ajouter une instruction « source » vers ce fichier " +"dans son fichier ~/.muttrc ou ~/.mutt/muttrc." diff --git a/debian/postinst b/debian/postinst index 51642f2..03a0a90 100644 --- a/debian/postinst +++ b/debian/postinst @@ -6,17 +6,33 @@ if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi -if [ "$1" != 'configure' ]; then +if [ "$1" != 'configure' ] && [ "$1" != 'reconfigure' ]; then exit 0 fi -symlink=true -if [ -e /usr/share/debconf/confmodule ]; then - db_get t-prot/muttrc.d - symlink="$RET" +# change existing symlink from ../Muttrc.t-prot to ../t-prot/Mutrc +if [ "$2" = "2.1-1" ] && [ -L /etc/Muttrc.d/t-prot.rc ]; then + cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true fi -if [ "$symlink" = "true" ]; then - mkdir /etc/Muttrc.d || true - cd /etc/Muttrc.d && ln -s ../Muttrc.t-prot t-prot.rc || true +# only on new install or reconfigure +if [ "x$2" = "x" ] || [ "$1" = "reconfigure" ] || [ "${DEBCONF_RECONFIGURE}" = "1" ]; then + symlink=true + if [ -e /usr/share/debconf/confmodule ]; then + db_get t-prot/muttrc.d + symlink="$RET" + fi + + case "$symlink" in + true) + mkdir /etc/Muttrc.d 2> /dev/null || true + cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true + ;; + false) + if [ -L /etc/Muttrc.d/t-prot.rc ]; then + rm /etc/Muttrc.d/t-prot.rc + rmdir /etc/Muttrc.d 2> /dev/null || true + fi + ;; + esac fi diff --git a/debian/postrm b/debian/postrm index e0a453e..25f393a 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,6 +1,15 @@ #!/bin/sh -e # postrm for t-prot +# remove /etc/Muttrc.d/t-prot.rc symlink on both remove and purge +if [ "$1" = purge ] || [ "$1" = remove ]; then + if [ -L /etc/Muttrc.d/t-prot.rc ]; then + rm /etc/Muttrc.d/t-prot.rc + fi + rmdir /etc/Muttrc.d 2> /dev/null || true +fi + +# on purge purge debconf data, too if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge diff --git a/debian/rules b/debian/rules index d829176..e43c585 100755 --- a/debian/rules +++ b/debian/rules @@ -26,15 +26,17 @@ install: build $(checkroot) -rm -rf $(TMP) $(INSTALL_DIR) $(TMP) - cd $(TMP) && $(INSTALL_DIR) etc usr/bin usr/share/man/man1 \ - usr/share/slrn/macros usr/share/doc/$(PKG)/examples + cd $(TMP) && $(INSTALL_DIR) etc/t-prot/footers etc/t-prot/ads \ + usr/bin usr/share/man/man1 usr/share/slrn/macros \ + usr/share/doc/$(PKG)/examples # usr/share/doc/$(PKG)/contrib $(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin patch $(TMP)/usr/bin/t-prot \ contrib/t-prot-r*-mutt157.diff -rm -f $(TMP)/usr/bin/t-prot.orig $(INSTALL_FILE) t-prot.1 $(TMP)/usr/share/man/man1 - $(INSTALL_FILE) debian/Muttrc.t-prot $(TMP)/etc + $(INSTALL_FILE) debian/Muttrc $(TMP)/etc/t-prot + $(INSTALL_FILE) debian/footers/* $(TMP)/etc/t-prot/footers $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros patch $(TMP)/usr/share/slrn/macros/t-prot.sl \ contrib/t-prot.sl-slang2.diff @@ -44,17 +46,12 @@ install: build #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \ # contrib/t-prot-r*-indentms.diff \ # $(TMP)/usr/share/doc/$(PKG)/contrib - cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl \ - contrib/README.examples debian/footers debian/README.footers \ + $(INSTALL_FILE) contrib/filter_innd.pl contrib/README.examples \ $(TMP)/usr/share/doc/$(PKG)/examples $(INSTALL_FILE) ChangeLog \ $(TMP)/usr/share/doc/$(PKG)/changelog cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \ man/man1/t-prot.1 - find $(TMP) -print0 2>/dev/null | xargs -0r \ - chown --no-dereference 0.0 - find $(TMP) ! -type l -print0 2>/dev/null | xargs -0r \ - chmod go=rX,u+rw,a-s binary-indep: build install