From: Gerfried Fuchs Date: Sun, 18 Jun 2006 21:49:11 +0000 (-0500) Subject: Imported Debian patch 2.1-1 X-Git-Tag: debian/2.1-1^0 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=ebce048d2bb94d717b46f34b02ed1720aaa8aaee;p=pkg%2Ft-prot.git Imported Debian patch 2.1-1 --- diff --git a/contrib/foo/t-prot.sl b/contrib/foo/t-prot.sl new file mode 100644 index 0000000..6d0b3a6 --- /dev/null +++ b/contrib/foo/t-prot.sl @@ -0,0 +1,116 @@ +% $Id: t-prot.sl,v 1.17 2006/05/16 11:33:32 jochen Exp $ +% Copyright (c) 2003-2005 Jochen Striepe +% +% This file is provided as an example implemention for articles to be +% filtered through t-prot before displayed. They are still filtered if +% you reply to such a message so you will have to deactivate this if +% you want to include quotes of the original article. +% +% Activate this macro by adding +% interpret t-prot.sl +% to your ~/.slrnrc. +% +% If you are not happy with the suggested t-prot default parameters, +% put something like +% variable t_prot_params = "-cemtS"; +% variable t_prot_tmpdir = "$HOME/.tmpdir"; +% variable t_prot_qp = ""; +% into ~/.slrn/t-prot-cfg and add +% interpret .slrn/t-prot-cfg +% to your ~/.slrnrc (after 'interpret t-prot.sl'). If "mimedecode" is +% installed on your system you might want to use +% variable t_prot_qp = "mimedecode"; +% You can get mimedecode at +% http://packages.debian.org/stable/mail/mimedecode.html +% +% However, please keep in mind that the path of the temp directory should +% NOT be readable to other users -- otherwise it might reveal information on +% what you read, and probably even be a security hole. Please see t-prot's +% man page for details on command line parameters. +% +% If you want to toggle t-prot filtering on/off without leaving slrn, +% you may want to add something like +% setkey article register_t_prot "\e6" +% setkey article unregister_t_prot "\e7" +% to your ~/.slrnrc -- press ESC-6 to activate t-prot filtering, and +% ESC-7 to disable it (this will take effect on the next article you +% read, see the package's TODO file). +% +% Requirements/Bugs: tr(1) and rm(1) are POSIX and should be available +% on any Unix-like system, mktemp(1) should be available on any recent +% OpenBSD or Debian Linux system -- you can get the sources there +% if your system happens to lack this program. This macro has been +% tested with slrn-0.9.7.4 to slrn-0.9.8.0 and S-Lang v1.4.5, it might +% fail with other versions (and will definitely fail with S-Lang v2.x). +% As always, bug reports, patches (preferrably in unified diff format), +% comments and suggestions are welcome. +% +% License: This file is part of the t-prot package and therefore +% available under the same conditions. See t-prot's man page for +% details. + + +% these should be reasonable defaults (they work fine for me, SCNR): +variable t_prot_params = "-aceklmtS --diff --bigq -L$HOME/.slrn/mlfooters -A$HOME/.slrn/adfooters"; +variable t_prot_tmpdir = "$HOME/tmp/slrn"; % you better make sure it exists +variable t_prot_qp = "perl -i -p -e '$p=1 if /^Content-Transfer-Encoding: quoted-printable/i; if ($p==1) { s/=([0-9a-f][0-9a-f])/chr(hex($1))/egi; s/=\n//eg; };'"; + +define t_prot () { + variable art, f, fname, line, qp; + art = ""; + + % Keep in mind that the path should NOT be readable to other users -- + % otherwise it might reveal information on what you read, and probably + % even be a security hole: + f = popen ("mktemp -q "+t_prot_tmpdir+"/t-prot.sl.XXXXXX | tr -d '\n'", "r"); + if (f == NULL) return; + if (-1 == fgets (&fname, f)) return; + pclose (f); + + + if (t_prot_qp != "") { qp = t_prot_qp+"|"; } else { qp = ""; } + + f = popen (qp+"t-prot "+t_prot_params+" >"+fname, "w"); + if (f == NULL) { + message ("Unable to filter article to "+fname); + return; + } + () = fputs (article_as_string(), f); + () = pclose (f); + + + f = fopen (fname, "r"); + if (f == NULL) { + message (fname+" could not be opened."); + return; + } + while (-1 != fgets (&line, f)) { + art = art + line; + } + fclose (f); + + if (0 != remove(fname)) message ("Unable to remove "+fname); + + replace_article (art); +} + +define register_t_prot () { + if (1 == register_hook("read_article_hook", "t_prot")) { + message ("t-prot filtering activated"); + } + else { + message ("t-prot filtering NOT activated"); + } +} + +define unregister_t_prot () { + if (1 == unregister_hook("read_article_hook", "t_prot")) { + message ("t-prot filtering deactivated"); + } + else { + message ("t-prot filtering NOT deactivated"); + } +} + +% filtering is enabled by default: +register_hook("read_article_hook", "t_prot"); diff --git a/debian/Muttrc.t-prot b/debian/Muttrc.t-prot index 74c1131..ecaa003 100644 --- a/debian/Muttrc.t-prot +++ b/debian/Muttrc.t-prot @@ -10,5 +10,5 @@ macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Tur 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 black "^\\[---.*" -color body green black "^#v[-+]" +color body brightmagenta default "^\\[---.*" +color body green default "^#v[-+]" diff --git a/debian/changelog b/debian/changelog index 6bcf824..402313a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +t-prot (2.1-1) unstable; urgency=low + + * New upstream release, which fixes: + - wrong logic when checking for mutt_ssloutstart in MS TOFU + (closes: #368162) + * Change background for highlighting to default (closes: #339898) + * Applied slang2 contrib patch (closes: #344479) + * Added debconf handling for enabling t-prot in mutt through /etc/Muttrc.d/. + * Bumped standards version to 3.7.2, no changes needed. + + -- Gerfried Fuchs Sun, 18 Jun 2006 16:49:11 -0500 + t-prot (2.0.2-1) unstable; urgency=low * New upstream release: No changes to debian version 2.0.1-2, only the diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..5363681 --- /dev/null +++ b/debian/config @@ -0,0 +1,10 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +# make the /etc/Muttrc.d/ symlink? +db_input medium t-prot/muttrc.d || true +db_go + +exit 0 diff --git a/debian/control b/debian/control index 5ac0457..265815b 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,12 @@ Source: t-prot Section: mail Priority: optional Maintainer: Gerfried Fuchs -Build-Depends-Indep: patch -Standards-Version: 3.6.2 +Build-Depends-Indep: po-debconf, patch +Standards-Version: 3.7.2 Package: t-prot Architecture: all -Depends: perl (>= 5.6.0-16), libgetopt-mixed-perl, liblocale-gettext-perl +Depends: debconf (>= 0.5) | debconf-2.0, perl (>= 5.6.0-16), libgetopt-mixed-perl, liblocale-gettext-perl Recommends: mutt (>= 1.5.5.1) Enhances: mutt, slrn, inn2 Suggests: mail-transport-agent diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 0000000..7cf7cc5 --- /dev/null +++ b/debian/po/de.po @@ -0,0 +1,41 @@ +# debconf template file for the t-prot package. +# Copyright (C) 2006 Gerfried Fuchs +# This file is distributed under the same license as the t-prot package. +# Gerfried Fuchs , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: t-prot 2.0.2\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-03-27 12:45+0200\n" +"Last-Translator: Gerfried Fuchs \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "Do you want to enable t-prot system wide for mutt?" +msgstr "Wollen Sie t-prot Systemweit in mutt aktivieren?" + +#. 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 "" +"Das t-prot-Paket bietet eine Konfigurationdatei /etc/Muttrc.t-prot an -- um " +"das Skript in mutt zu verwenden, muss es aktiviert werden. Dies kann " +"entweder durch das Erstellen eines symbolischen Links in /etc/Muttrc.d/ " +"passieren (bzw. kann dies automatisch für Sie durchgeführt werden), oder man " +"lässt die Benutzer entscheiden, sich eine »source«-Zeile in ihre ~/.muttrc " +"bzw. ~/.mutt/muttrc hinzuzufügen. Wenn Sie dieser Frage zustimmen, wird die " +"systemweite Verwendung aktiviert." diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..7e4dbae --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n" +"POT-Creation-Date: 2006-03-27 12:44+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../templates:4 +msgid "Do you want to enable t-prot system wide for mutt?" +msgstr "" + +#. 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 "" diff --git a/debian/postinst b/debian/postinst index afa0fef..51642f2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,10 +1,22 @@ #!/bin/sh -e # postinst for t-prot -if [ "$1" = 'configure' ] && [ -e /usr/share/debconf/confmodule ]; then - if dpkg --compare-versions "$2" lt "1.47-2" ; then - . /usr/share/debconf/confmodule - db_purge - db_stop - fi +# Source debconf library. +if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ "$1" != 'configure' ]; then + exit 0 +fi + +symlink=true +if [ -e /usr/share/debconf/confmodule ]; then + db_get t-prot/muttrc.d + symlink="$RET" +fi + +if [ "$symlink" = "true" ]; then + mkdir /etc/Muttrc.d || true + cd /etc/Muttrc.d && ln -s ../Muttrc.t-prot t-prot.rc || true fi diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..e0a453e --- /dev/null +++ b/debian/postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e +# postrm for t-prot + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi diff --git a/debian/rules b/debian/rules index 0141fe7..d829176 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,8 @@ #!/usr/bin/make -f # debian/rules for t-prot package -PACKAGE = t-prot -TMP = $(CURDIR)/debian/$(PACKAGE) +PKG = t-prot +TMP = $(CURDIR)/debian/$(PKG) INSTALL = install INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 @@ -27,26 +27,29 @@ install: build -rm -rf $(TMP) $(INSTALL_DIR) $(TMP) cd $(TMP) && $(INSTALL_DIR) etc usr/bin usr/share/man/man1 \ - usr/share/slrn/macros usr/share/doc/$(PACKAGE)/examples - # usr/share/doc/$(PACKAGE)/contrib + usr/share/slrn/macros usr/share/doc/$(PKG)/examples + # usr/share/doc/$(PKG)/contrib $(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin - cd $(TMP)/usr/bin/ && patch t-prot \ - $(TMP)/../../contrib/t-prot-r*-mutt157.diff + 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) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros + patch $(TMP)/usr/share/slrn/macros/t-prot.sl \ + contrib/t-prot.sl-slang2.diff + -rm -f $(TMP)/usr/share/slrn/macros/t-prot.sl.orig - $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PACKAGE) + $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG) #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \ # contrib/t-prot-r*-indentms.diff \ - # $(TMP)/usr/share/doc/$(PACKAGE)/contrib + # $(TMP)/usr/share/doc/$(PKG)/contrib cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl \ contrib/README.examples debian/footers debian/README.footers \ - $(TMP)/usr/share/doc/$(PACKAGE)/examples + $(TMP)/usr/share/doc/$(PKG)/examples $(INSTALL_FILE) ChangeLog \ - $(TMP)/usr/share/doc/$(PACKAGE)/changelog - cd $(TMP)/usr/share && gzip -9 doc/$(PACKAGE)/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 @@ -59,16 +62,17 @@ binary-indep: build install $(checkroot) $(INSTALL_DIR) $(TMP)/DEBIAN $(INSTALL_FILE) debian/copyright debian/README.Debian \ - debian/NEWS.Debian $(TMP)/usr/share/doc/$(PACKAGE) + debian/NEWS.Debian $(TMP)/usr/share/doc/$(PKG) $(INSTALL_FILE) debian/changelog \ - $(TMP)/usr/share/doc/$(PACKAGE)/changelog.Debian - cd $(TMP)/usr/share/doc/$(PACKAGE) && gzip -9 \ + $(TMP)/usr/share/doc/$(PKG)/changelog.Debian + cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \ changelog.Debian NEWS.Debian - $(INSTALL_SCRIPT) debian/postinst \ + $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \ $(TMP)/DEBIAN + po2debconf debian/templates > $(TMP)/DEBIAN/templates $(INSTALL_FILE) debian/conffiles \ $(TMP)/DEBIAN - dpkg-gencontrol -ldebian/changelog -isp -p$(PACKAGE) -P$(TMP) + dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP) cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ xargs -r0 md5sum > DEBIAN/md5sums dpkg --build $(TMP) .. diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..be714b9 --- /dev/null +++ b/debian/templates @@ -0,0 +1,10 @@ +Template: t-prot/muttrc.d +Type: boolean +Default: true +_Description: Do you want to enable t-prot system wide for mutt? + 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.