- fix sending long commands when using gnutls (#438275)

- glob tilde in smime_keys (#424311)
- fix awk script in mutt_ldap_query
- force building with libdb
- make enabling/disabling features in spec easier
This commit is contained in:
Miroslav Lichvar 2008-04-04 11:50:26 +00:00
parent 2d7d6927ab
commit c9d9f8cab0
4 changed files with 129 additions and 18 deletions

42
mutt-1.5.17-gnutls.patch Normal file
View File

@ -0,0 +1,42 @@
diff -r e3bc99a4a6bd -r c10d4343a17f mutt_ssl_gnutls.c
--- a/mutt_ssl_gnutls.c Tue Mar 11 17:20:48 2008 -0700
+++ b/mutt_ssl_gnutls.c Thu Apr 03 17:08:13 2008 +0200
@@ -112,6 +112,7 @@ static int tls_socket_write (CONNECTION*
{
tlssockdata *data = conn->sockdata;
int ret;
+ size_t sent = 0;
if (!data)
{
@@ -120,14 +121,23 @@ static int tls_socket_write (CONNECTION*
return -1;
}
- ret = gnutls_record_send (data->state, buf, len);
- if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
+ do
{
- mutt_error ("tls_socket_write (%s)", gnutls_strerror (ret));
- mutt_sleep (4);
- return -1;
- }
- return ret;
+ ret = gnutls_record_send (data->state, buf + sent, len - sent);
+ if (ret < 0)
+ {
+ if (gnutls_error_is_fatal(ret) == 1)
+ {
+ mutt_error ("tls_socket_write (%s)", gnutls_strerror (ret));
+ mutt_sleep (4);
+ return -1;
+ }
+ return ret;
+ }
+ sent += ret;
+ } while (sent < len);
+
+ return sent;
}
static int tls_socket_open (CONNECTION* conn)

View File

@ -0,0 +1,20 @@
diff -up mutt-1.5.17/smime_keys.pl.smimekeys mutt-1.5.17/smime_keys.pl
--- mutt-1.5.17/smime_keys.pl.smimekeys 2007-03-02 19:44:44.000000000 +0100
+++ mutt-1.5.17/smime_keys.pl 2008-04-04 12:33:34.000000000 +0200
@@ -20,6 +20,7 @@
use strict;
use File::Copy;
+use File::Glob ':glob';
umask 077;
@@ -225,7 +226,7 @@ You must set this in your mutt config fi
EOF
#'
- $answer =~ /\"(.*?)\"/ and return $1;
+ $answer =~ /\"(.*?)\"/ and return bsd_glob($1, GLOB_TILDE | GLOB_NOCHECK);
$answer =~ /^Mutt (.*?) / and die<<EOF;
This script requires mutt 1.5.0 or later. You are using mutt $1.

View File

@ -1,7 +1,21 @@
%bcond_with debug
%bcond_without imap
%bcond_without pop
%bcond_without smtp
%bcond_without gnutls
%bcond_without gss
%bcond_without sasl
%bcond_without idn
%bcond_without hcache
%bcond_without bdb
%bcond_with qdbm
%bcond_with gdbm
%bcond_with gpgme
Summary: A text mode mail user agent
Name: mutt
Version: 1.5.17
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 5
# The entire source code is GPLv2+ except
# pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain
@ -16,15 +30,32 @@ Patch5: mutt-1.5.17-maildirnull.patch
Patch6: mutt-1.5.17-updating.patch
Patch7: mutt-1.5.17-mailto.patch
Patch8: mutt-1.5.17-batchsend.patch
Patch9: mutt-1.5.17-gnutls.patch
Patch10: mutt-1.5.17-smimekeys.patch
Url: http://www.mutt.org/
Requires: mailcap urlview
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: /usr/sbin/sendmail
BuildRequires: cyrus-sasl-devel db4-devel gnutls-devel krb5-devel ncurses-devel
BuildRequires: libidn-devel gettext
BuildRequires: ncurses-devel
BuildRequires: gettext
# required to build documentation
BuildRequires: docbook-style-xsl libxslt lynx
%if %{with hcache}
%{?with_bdb:BuildRequires: db4-devel}
%{?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
@ -42,20 +73,34 @@ for selecting groups of messages.
%patch6 -p1 -b .updating
%patch7 -p1 -b .mailto
%patch8 -p1 -b .batchsend
%patch9 -p1 -b .gnutls
%patch10 -p1 -b .smimekeys
install -p -m644 %{SOURCE1} mutt_ldap_query
%build
%configure \
--enable-pop --enable-imap \
--enable-smtp \
--with-gnutls \
--with-gss \
--with-sasl \
--with-idn \
--enable-inodesort \
--enable-hcache \
--with-docdir=%{_docdir}/%{name}-%{version}
--enable-inodesort \
%{?with_debug: --enable-debug}\
%{?with_pop: --enable-pop}\
%{?with_imap: --enable-imap} \
%{?with_smtp: --enable-smtp} \
%if %{with hcache}
--enable-hcache \
%{!?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=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags}
%install
@ -105,6 +150,13 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/muttrc.*
%changelog
* Fri Apr 04 2008 Miroslav Lichvar <mlichvar@redhat.com> 5:1.5.17-4
- fix sending long commands when using gnutls (#438275)
- glob tilde in smime_keys (#424311)
- fix awk script in mutt_ldap_query
- force building with libdb
- make enabling/disabling features in spec easier
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5:1.5.17-3
- Autorebuild for GCC 4.3

View File

@ -26,12 +26,9 @@ cat $TMPFILE | awk '
/^mail:/ {MAIL=substr($0,6)}
/^cn:/ {NAME=substr($0,4)}
/^roomNumber:/ {ROOM=substr($0,12)}
/^$/ { MAIL=gensub("^ ","",g,MAIL) }
/^$/ { MAIL=gensub(" $","",g,MAIL) }
/^$/ { NAME=gensub("^ ","",g,NAME) }
/^$/ { NAME=gensub(" $","",g,NAME) }
/^$/ { ROOM=gensub("^ ","",g,ROOM) }
/^$/ { ROOM=gensub(" $","",g,ROOM) }
/^$/ { MAIL=gensub("^ *| *$","","g",MAIL) }
/^$/ { NAME=gensub("^ *| *$","","g",NAME) }
/^$/ { ROOM=gensub("^ *| *$","","g",ROOM) }
/^$/ { if(length(NAME) > 0) print MAIL "\t" NAME "\t" ROOM}
/^$/ { NAME = "" }
' > $RESULTS