diff --git a/mutt-1.5.21-mailcap.diff b/mutt-1.5.21-mailcap.diff new file mode 100644 index 0000000..b25328c --- /dev/null +++ b/mutt-1.5.21-mailcap.diff @@ -0,0 +1,18 @@ +read /usr/share/mutt/mailcap as fallback by default. This allows to +set some useful defaults specifically for mutt. For example +text/html +Index: mutt-1.5.21/init.c +=================================================================== +--- mutt-1.5.21.orig/init.c ++++ mutt-1.5.21/init.c +@@ -3011,8 +3011,8 @@ void mutt_init (int skip_sys_rc, LIST *c + MailcapPath = safe_strdup (p); + else + { +- /* Default search path from RFC1524 */ +- MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap"); ++ /* Default search path from RFC1524 plus fallback for mutt specific defaults */ ++ MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap:" SYSCONFDIR "/mutt/mailcap"); + } + + Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp"); diff --git a/mutt.changes b/mutt.changes index f317685..1ba6b2f 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 18 08:15:09 UTC 2014 - lnussel@suse.de + +- handle text/html by default (bnc#899712) + that is add patch mutt-1.5.21-mailcap.diff + ------------------------------------------------------------------- Mon Mar 17 13:24:35 UTC 2014 - meissner@suse.com diff --git a/mutt.mailcap b/mutt.mailcap new file mode 100644 index 0000000..2cd65c7 --- /dev/null +++ b/mutt.mailcap @@ -0,0 +1,2 @@ +# render html mail with w3m +text/html; w3m -I %{charset} -T text/html -dump %s; copiousoutput diff --git a/mutt.spec b/mutt.spec index fdc9a0a..30304eb 100644 --- a/mutt.spec +++ b/mutt.spec @@ -57,6 +57,7 @@ Url: http://www.mutt.org Provides: muttssl Obsoletes: muttssl Recommends: smtp_daemon +Recommends: w3m %if 0%{?suse_version} > 1130 Requires(post): shared-mime-info Requires(postun): shared-mime-info @@ -79,6 +80,7 @@ Source5: skel.muttrc Source6: krb5-config Source7: mutt-1.5.21.de.po Source8: %name-%version-patches.tar.bz2 +Source9: mutt.mailcap Patch: %name-%version.dif # http://www.spinnaker.de/mutt/compressed/ Patch1: patch-%version.rr.compressed.1.bz2 @@ -103,6 +105,8 @@ Patch15: widechar.sidebar.dif Patch16: mutt-1.5.21-cariage-return.path # PATCH-FIX-SUSE: bnc#868115 - CVE-2014-0467: mutt: crash due to malicious email Patch17: mutt-CVE-2014-0467.patch +# PATCH-FIX-OPENSUSE bnc#899712 - fallback mailcap for e.g text/html +Patch18: mutt-1.5.21-mailcap.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir %{_sysconfdir} @@ -136,6 +140,7 @@ done %patch15 -p0 -b .widechar.sidebar %patch16 -p0 -b .crlf %patch17 -p1 -b .cve.2014.0467 +%patch18 -p1 -b .mailcap cp doc/Muttrc Muttrc.SuSE cp %{S:2} . @@ -240,6 +245,7 @@ install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/ mkdir -p %{buildroot}%{_datadir}/applications install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/ install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.muttrc +install -D -m 644 %{SOURCE9} %{buildroot}%{_datadir}/mutt/mailcap %suse_update_desktop_file mutt #%fdupes %{buildroot} @@ -272,6 +278,7 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.muttrc %{_mandir}/man5/muttrc.5.gz %{_mandir}/man5/mbox_mutt.5.gz %{_datadir}/mutt +%{_datadir}/mutt/mailcap %config(noreplace) %{_sysconfdir}/Muttrc %changelog