From 46d167bef167a8c07f0cf667c10c3f00fc938859 Mon Sep 17 00:00:00 2001
From: Jan Pacner
Date: Thu, 1 May 2014 09:32:47 +0200
Subject: [PATCH] Resolves: #1034263 (new version due to CVE)
patch cleanup (upstream fixes)
add html documentation (in addition to the current txt one)
---
.gitignore | 3 +-
mutt-1.5.18-manual.patch | 12 ---
mutt-1.5.21-cabundle.patch | 2 +-
mutt-1.5.21-gpgme-1.2.0.patch | 26 ------
mutt-1.5.21-manhelp.patch | 36 --------
mutt-1.5.23-add_debug_option.patch | 11 +++
mutt.spec | 144 +++++++++++++++++------------
sources | 2 +-
8 files changed, 100 insertions(+), 136 deletions(-)
delete mode 100644 mutt-1.5.18-manual.patch
delete mode 100644 mutt-1.5.21-gpgme-1.2.0.patch
delete mode 100644 mutt-1.5.21-manhelp.patch
create mode 100644 mutt-1.5.23-add_debug_option.patch
diff --git a/.gitignore b/.gitignore
index 93608b3..7cd8a74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
mutt-1.5.20-20100718hg1a35f0.tar.bz2
mutt-1.5.21.tar.gz
-/mutt-1.5.22.tar.gz
+mutt-1.5.22.tar.gz
+mutt-1.5.23.tar.gz
diff --git a/mutt-1.5.18-manual.patch b/mutt-1.5.18-manual.patch
deleted file mode 100644
index 0230c18..0000000
--- a/mutt-1.5.18-manual.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up mutt-1.5.18/doc/Makefile.in.manual mutt-1.5.18/doc/Makefile.in
-diff -up mutt-1.5.18/init.h.manual mutt-1.5.18/init.h
---- mutt-1.5.18/init.h.manual 2008-01-30 05:26:50.000000000 +0100
-+++ mutt-1.5.18/init.h 2008-05-19 11:05:02.000000000 +0200
-@@ -19,7 +19,6 @@
-
- #ifdef _MAKEDOC
- # include "config.h"
--# include "doc/makedoc-defs.h"
- #else
- # include "sort.h"
- #endif
diff --git a/mutt-1.5.21-cabundle.patch b/mutt-1.5.21-cabundle.patch
index df8c225..0369523 100644
--- a/mutt-1.5.21-cabundle.patch
+++ b/mutt-1.5.21-cabundle.patch
@@ -21,7 +21,7 @@ diff -up mutt-1.5.21/doc/smime-notes.txt.cabundle mutt-1.5.21/doc/smime-notes.tx
- contrib/ca-bundle.crt. This makes you trust anything that was ultimately
+- There is no more ca-bundle.crt file with the trusted roots to import shipped
+ in mutt. The upstream file is out-dated and user is encouraged to use
-+ ca-bundle.crt from ca-certificate pacakge.
++ ca-bundle.crt from ca-certificate package.
+ This makes you trust anything that was ultimately
signed by one of them. You can use "smime_keys add_root" to do so, or
just copy ca-bundle.crt into the place you point mutt's smime_ca_location
diff --git a/mutt-1.5.21-gpgme-1.2.0.patch b/mutt-1.5.21-gpgme-1.2.0.patch
deleted file mode 100644
index 90af39d..0000000
--- a/mutt-1.5.21-gpgme-1.2.0.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -up mutt-1.5.21/init.c.gpgme-1.2.0 mutt-1.5.21/init.c
---- mutt-1.5.21/init.c.gpgme-1.2.0 2010-08-25 18:31:40.000000000 +0200
-+++ mutt-1.5.21/init.c 2011-10-26 10:29:12.166967476 +0200
-@@ -52,6 +52,10 @@
- #include
- #include
-
-+#if defined(CRYPT_BACKEND_GPGME)
-+#include
-+#endif
-+
- #define CHECK_PAGER \
- if ((CurrentMenu == MENU_PAGER) && (idx >= 0) && \
- (MuttVars[idx].flags & R_RESORT)) \
-@@ -3143,6 +3147,11 @@ void mutt_init (int skip_sys_rc, LIST *c
-
- mutt_read_histfile ();
-
-+#ifdef CRYPT_BACKEND_GPGME
-+ /* needed since version 1.2.0, ticket #3300 */
-+ gpgme_check_version (NULL);
-+#endif
-+
- #if 0
- set_option (OPTWEED); /* turn weeding on by default */
- #endif
diff --git a/mutt-1.5.21-manhelp.patch b/mutt-1.5.21-manhelp.patch
deleted file mode 100644
index 9321364..0000000
--- a/mutt-1.5.21-manhelp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -up mutt-1.5.21/doc/manual.html.manhelp mutt-1.5.21/doc/manual.html
---- mutt-1.5.21/doc/manual.html.manhelp 2013-05-20 17:01:07.570442214 +0200
-+++ mutt-1.5.21/doc/manual.html 2013-05-20 17:01:13.082442117 +0200
-@@ -4171,7 +4171,7 @@ case-insensitivity).
- Running mutt
with no arguments will make Mutt attempt
- to read your spool mailbox. However, it is possible to read other
- mailboxes and to send messages from the command line as well.
--
Table 9.1. Command line options
Option | Description |
---|
-A | expand an alias |
-a | attach a file to a message |
-b | specify a blind carbon-copy (BCC) address |
-c | specify a carbon-copy (Cc) address |
-D | print the value of all Mutt variables to stdout |
-e | specify a config command to be run after initialization files are read |
-f | specify a mailbox to load |
-F | specify an alternate file to read initialization commands |
-h | print help on command line options |
-H | specify a draft file from which to read a header and body |
-i | specify a file to include in a message composition |
-m | specify a default mailbox type |
-n | do not read the system Muttrc |
-p | recall a postponed message |
-Q | query a configuration variable |
-R | open mailbox in read-only mode |
-s | specify a subject (enclose in quotes if it contains spaces) |
-v | show version number and compile-time definitions |
-x | simulate the mailx(1) compose mode |
-y | show a menu containing the files specified by the mailboxes command |
-z | exit immediately if there are no messages in the mailbox |
-Z | open the first folder with new message, exit immediately if none |
-+
Table 9.1. Command line options
Option | Description |
---|
-A | expand an alias |
-a | attach a file to a message |
-b | specify a blind carbon-copy (BCC) address |
-c | specify a carbon-copy (Cc) address |
-D | print the value of all Mutt variables to stdout |
-d | log debugging output to ~/.muttdebug0 if complied with +DEBUG (level can be 1-5) |
-e | specify a config command to be run after initialization files are read |
-f | specify a mailbox to load |
-F | specify an alternate file to read initialization commands |
-h | print help on command line options |
-H | specify a draft file from which to read a header and body |
-i | specify a file to include in a message composition |
-m | specify a default mailbox type |
-n | do not read the system Muttrc |
-p | recall a postponed message |
-Q | query a configuration variable |
-R | open mailbox in read-only mode |
-s | specify a subject (enclose in quotes if it contains spaces) |
-v | show version number and compile-time definitions |
-x | simulate the mailx(1) compose mode |
-y | show a menu containing the files specified by the mailboxes command |
-z | exit immediately if there are no messages in the mailbox |
-Z | open the first folder with new message, exit immediately if none |
- To read messages in a mailbox
-
mutt
[-nz
] [-F
- muttrc
-diff -up mutt-1.5.21/doc/manual.txt.manhelp mutt-1.5.21/doc/manual.txt
---- mutt-1.5.21/doc/manual.txt.manhelp 2013-05-20 17:01:07.935442207 +0200
-+++ mutt-1.5.21/doc/manual.txt 2013-05-20 17:01:13.622442108 +0200
-@@ -6021,6 +6021,8 @@ Table 9.1. Command line options
- |------+----------------------------------------------------------------------|
- |-D |print the value of all Mutt variables to stdout |
- |------+----------------------------------------------------------------------|
-+|-d |log debugging output to ~/.muttdebug0 if complied with +DEBUG (1-5) |
-+|------+----------------------------------------------------------------------|
- |-e |specify a config command to be run after initialization files are read|
- |------+----------------------------------------------------------------------|
- |-f |specify a mailbox to load |
-diff -up mutt-1.5.21/doc/reference.html.manhelp mutt-1.5.21/doc/reference.html
---- mutt-1.5.21/doc/reference.html.manhelp 2013-05-20 17:01:10.220442167 +0200
-+++ mutt-1.5.21/doc/reference.html 2013-05-20 17:01:15.013442084 +0200
-@@ -31,7 +31,7 @@ tr { vertical-align: top; }
- Running mutt
with no arguments will make Mutt attempt
- to read your spool mailbox. However, it is possible to read other
- mailboxes and to send messages from the command line as well.
--
Table 9.1. Command line options
Option | Description |
---|
-A | expand an alias |
-a | attach a file to a message |
-b | specify a blind carbon-copy (BCC) address |
-c | specify a carbon-copy (Cc) address |
-D | print the value of all Mutt variables to stdout |
-e | specify a config command to be run after initialization files are read |
-f | specify a mailbox to load |
-F | specify an alternate file to read initialization commands |
-h | print help on command line options |
-H | specify a draft file from which to read a header and body |
-i | specify a file to include in a message composition |
-m | specify a default mailbox type |
-n | do not read the system Muttrc |
-p | recall a postponed message |
-Q | query a configuration variable |
-R | open mailbox in read-only mode |
-s | specify a subject (enclose in quotes if it contains spaces) |
-v | show version number and compile-time definitions |
-x | simulate the mailx(1) compose mode |
-y | show a menu containing the files specified by the mailboxes command |
-z | exit immediately if there are no messages in the mailbox |
-Z | open the first folder with new message, exit immediately if none |
-+
Table 9.1. Command line options
Option | Description |
---|
-A | expand an alias |
-a | attach a file to a message |
-b | specify a blind carbon-copy (BCC) address |
-c | specify a carbon-copy (Cc) address |
-D | print the value of all Mutt variables to stdout |
-d | log debugging output to ~/.muttdebug0 if complied with +DEBUG (level can be 1-5) |
-e | specify a config command to be run after initialization files are read |
-f | specify a mailbox to load |
-F | specify an alternate file to read initialization commands |
-h | print help on command line options |
-H | specify a draft file from which to read a header and body |
-i | specify a file to include in a message composition |
-m | specify a default mailbox type |
-n | do not read the system Muttrc |
-p | recall a postponed message |
-Q | query a configuration variable |
-R | open mailbox in read-only mode |
-s | specify a subject (enclose in quotes if it contains spaces) |
-v | show version number and compile-time definitions |
-x | simulate the mailx(1) compose mode |
-y | show a menu containing the files specified by the mailboxes command |
-z | exit immediately if there are no messages in the mailbox |
-Z | open the first folder with new message, exit immediately if none |
- To read messages in a mailbox
-
mutt
[-nz
] [-F
- muttrc
diff --git a/mutt-1.5.23-add_debug_option.patch b/mutt-1.5.23-add_debug_option.patch
new file mode 100644
index 0000000..bc8495f
--- /dev/null
+++ b/mutt-1.5.23-add_debug_option.patch
@@ -0,0 +1,11 @@
+diff -up ./doc/manual.xml.head.add_debug_option ./doc/manual.xml.head
+--- ./doc/manual.xml.head.add_debug_option 2014-04-30 17:31:42.062694536 +0200
++++ ./doc/manual.xml.head 2014-04-30 17:53:10.230668282 +0200
+@@ -8182,6 +8182,7 @@ mailboxes and to send messages from the
+ -aattach a file to a message
+ -bspecify a blind carbon-copy (BCC) address
+ -cspecify a carbon-copy (Cc) address
++-dlog debugging output to ~/.muttdebug0 if mutt was complied with +DEBUG; it can range from 1-5 and affects verbosity (a value of 2 is recommended)
+ -Dprint the value of all Mutt variables to stdout
+ -especify a config command to be run after initialization files are read
+ -fspecify a mailbox to load
diff --git a/mutt.spec b/mutt.spec
index 8010000..c88c472 100644
--- a/mutt.spec
+++ b/mutt.spec
@@ -17,29 +17,28 @@
Summary: A text mode mail user agent
Name: mutt
-Version: 1.5.22
+Version: 1.5.23
Release: 1%{?dist}
Epoch: 5
# The entire source code is GPLv2+ except
# pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain
License: GPLv2+ and Public Domain
Group: Applications/Internet
-Source: ftp://ftp.mutt.org/pub/mutt/devel/mutt-%{version}.tar.gz
+Source: ftp://ftp.mutt.org/mutt/devel/mutt-%{version}.tar.gz
Source1: mutt_ldap_query
-Patch3: mutt-1.5.18-muttrc.patch
-Patch4: mutt-1.5.18-manual.patch
-Patch8: mutt-1.5.21-cabundle.patch
-Patch9: mutt-1.5.21-gpgme-1.2.0.patch
-Patch13: mutt-1.5.21-syncdebug.patch
-# FIXME find in upstream +DEBUG0
-#Patch17: mutt-1.5.21-manhelp.patch
+Patch1: mutt-1.5.18-muttrc.patch
+Patch2: mutt-1.5.21-cabundle.patch
+# FIXME find on dev.mutt.org
+Patch3: mutt-1.5.21-syncdebug.patch
+# FIXME make it to upstream
+Patch4: mutt-1.5.23-add_debug_option.patch
Url: http://www.mutt.org/
-Requires: mailcap urlview
-BuildRequires: ncurses-devel
-BuildRequires: gettext
-BuildRequires: automake
-# required to build documentation
-BuildRequires: docbook-style-xsl libxslt lynx
+Requires: mailcap, urlview
+BuildRequires: ncurses-devel, gettext, automake
+# manual generation
+BuildRequires: /usr/bin/xsltproc, docbook-style-xsl, perl
+# html manual -> txt manual conversion (lynx messes up the encoding)
+BuildRequires: w3m
%if %{with hcache}
%{?with_tokyocabinet:BuildRequires: tokyocabinet-devel}
@@ -47,16 +46,20 @@ BuildRequires: docbook-style-xsl libxslt lynx
%{?with_qdbm:BuildRequires: qdbm-devel}
%{?with_gdbm:BuildRequires: gdbm-devel}
%endif
+
%if %{with imap} || %{with pop} || %{with smtp}
%{?with_gnutls:BuildRequires: gnutls-devel}
%{?with_sasl:BuildRequires: cyrus-sasl-devel}
%endif
+
%if %{with imap}
%{?with_gss:BuildRequires: krb5-devel}
%endif
+
%{?with_idn:BuildRequires: libidn-devel}
%{?with_gpgme:BuildRequires: gpgme-devel}
+
%description
Mutt is a small but very powerful text-based MIME mail client. Mutt
is highly configurable, and is well suited to the mail power user with
@@ -64,80 +67,96 @@ advanced features like key bindings, keyboard macros, mail threading,
regular expression searches and a powerful pattern matching language
for selecting groups of messages.
+
%prep
+# unpack; cd
%setup -q
-#FIXME ./prepare -V
-%patch3 -p1 -b .muttrc
-%patch4 -p1 -b .manual
-%patch8 -p1 -b .cabundle
-%patch9 -p1 -b .gpgme-1.2.0
-%patch13 -p1 -b .syncdebug
-#FIXME
-#%patch17 -p1 -b .manhelp
+# mutt`s autoreconf --install && ./configure
+#./prepare -V
+%patch1 -p1 -b .muttrc
+%patch2 -p1 -b .cabundle
+%patch3 -p1 -b .syncdebug
+%patch4 -p1 -b .add_debug_option
sed -i -r 's/`$GPGME_CONFIG --libs`/"\0 -lgpg-error"/' configure
-# disable dotlock program
-sed -i -r 's/(USE_DOTLOCK, *)[0-9]+/\10/g' configure.ac
+# disable mutt_dotlock program - remove support from mutt binary
+sed -i -r 's|^(.*USE_DOTLOCK.*)$|//\1|' configure
+# disable mutt_dotlock program - disable post-install mutt_dotlock checking
+sed -i -r 's|install-exec-hook|my-useless-label|' Makefile.am
install -p -m644 %{SOURCE1} mutt_ldap_query
%global hgreldate \\.(201[0-9])([0-1][0-9])([0-3][0-9])hg
if echo %{release} | grep -E -q '%{hgreldate}'; then
- echo -n 'const char *ReleaseDate = ' > reldate.h
- echo %{release} | sed -r 's/.*%{hgreldate}.*/"\1-\2-\3";/' >> reldate.h
+ echo -n 'const char *ReleaseDate = ' > reldate.h
+ echo %{release} | sed -r 's/.*%{hgreldate}.*/"\1-\2-\3";/' >> reldate.h
fi
+
%build
%configure \
- SENDMAIL=%{_sbindir}/sendmail \
- ISPELL=%{_bindir}/hunspell \
-%{?with_debug: --enable-debug}\
-%{?with_pop: --enable-pop}\
-%{?with_imap: --enable-imap} \
-%{?with_smtp: --enable-smtp} \
-%if %{with hcache}
- --enable-hcache \
-%{!?with_tokyocabinet: --without-tokyocabinet} \
-%{!?with_gdbm: --without-gdbm} \
-%{!?with_qdbm: --without-qdbm} \
-%endif
-%if %{with imap} || %{with pop} || %{with smtp}
-%{?with_gnutls: --with-gnutls} \
-%{?with_sasl: --with-sasl} \
-%endif
-%if %{with imap}
-%{?with_gss: --with-gss} \
-%endif
-%{!?with_idn: --without-idn} \
-%{?with_gpgme: --enable-gpgme} \
- --with-docdir=%{_pkgdocdir}
+ SENDMAIL=%{_sbindir}/sendmail \
+ ISPELL=%{_bindir}/hunspell \
+ %{?with_debug: --enable-debug}\
+ %{?with_pop: --enable-pop}\
+ %{?with_imap: --enable-imap} \
+ %{?with_smtp: --enable-smtp} \
+\
+ %if %{with hcache}
+ --enable-hcache \
+ %{!?with_tokyocabinet: --without-tokyocabinet} \
+ %{!?with_gdbm: --without-gdbm} \
+ %{!?with_qdbm: --without-qdbm} \
+ %endif
+\
+ %if %{with imap} || %{with pop} || %{with smtp}
+ %{?with_gnutls: --with-gnutls} \
+ %{?with_sasl: --with-sasl} \
+ %endif
+\
+ %if %{with imap}
+ %{?with_gss: --with-gss} \
+ %endif
+\
+ %{!?with_idn: --without-idn} \
+ %{?with_gpgme: --enable-gpgme} \
+ --with-docdir=%{_pkgdocdir}
make %{?_smp_mflags}
# remove unique id in manual.html because multilib conflicts
-sed -i -e 's///g' doc/manual.html
+sed -i -r 's///g' doc/manual.html
+
%install
make install DESTDIR=$RPM_BUILD_ROOT
# we like GPG here
cat contrib/gpg.rc >> \
- $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc
+ $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc
grep -5 "^color" contrib/sample.muttrc >> \
- $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc
+ $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc
-cat >> $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc <> $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc <<\EOF
source %{_sysconfdir}/Muttrc.local
EOF
-echo "# Local configuration for Mutt." > $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.local
+echo "# Local configuration for Mutt." > \
+ $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.local
# remove unpackaged files from the buildroot
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/{*.dist,mime.types}
-rm -f $RPM_BUILD_ROOT%{_bindir}/{flea,muttbug}
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{flea,muttbug,mutt_dotlock}.1*
-rm -f $RPM_BUILD_ROOT%{_mandir}/man5/{mbox,mmdf}.5*
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.dist
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
+# disable mutt_dotlock program - remove the compiled binary
+rm -f $RPM_BUILD_ROOT%{_bindir}/mutt_dotlock
+rm -f $RPM_BUILD_ROOT%{_bindir}/muttbug
+rm -f $RPM_BUILD_ROOT%{_bindir}/flea
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/mutt_dotlock.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/muttbug.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/flea.1*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man5/mbox.5*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man5/mmdf.5*
rm -rf $RPM_BUILD_ROOT%{_pkgdocdir}
# provide muttrc.local(5): the same as muttrc(5)
@@ -145,12 +164,13 @@ ln -sf ./muttrc.5 $RPM_BUILD_ROOT%{_mandir}/man5/muttrc.local.5
%find_lang %{name}
+
%files -f %{name}.lang
%config(noreplace) %{_sysconfdir}/Muttrc
%config(noreplace) %{_sysconfdir}/Muttrc.local
%doc COPYRIGHT ChangeLog GPL NEWS README* UPDATING mutt_ldap_query
%doc contrib/*.rc contrib/sample.* contrib/colors.*
-%doc doc/manual.txt doc/smime-notes.txt
+%doc doc/manual.html doc/manual.txt doc/smime-notes.txt
%{_bindir}/mutt
%{_bindir}/pgpring
%{_bindir}/pgpewrap
@@ -161,7 +181,13 @@ ln -sf ./muttrc.5 $RPM_BUILD_ROOT%{_mandir}/man5/muttrc.local.5
%{_mandir}/man1/pgpewrap.*
%{_mandir}/man5/muttrc.*
+
%changelog
+* Tue Apr 29 2014 Jan Pacner - 5:1.5.23-1
+- Resolves: #1034263 (new version due to CVE)
+- patch cleanup (upstream fixes)
+- add html documentation (in addition to the current txt one)
+
* Mon Dec 02 2013 Jan Pacner - 5:1.5.22-1
- new release (Resolves: #1034263)
- use inline sed instead of nodotlock patch
diff --git a/sources b/sources
index 3b14a72..3b69a44 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-48267aba1bc53db636777f4a1ec87cb6 mutt-1.5.22.tar.gz
+11f5b6a3eeba1afa1257fe93c9f26bff mutt-1.5.23.tar.gz