From c9d9f8cab0f85710219ebb17c0f14e666a4579e9 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 4 Apr 2008 11:50:26 +0000 Subject: [PATCH] - 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 --- mutt-1.5.17-gnutls.patch | 42 ++++++++++++++++++++ mutt-1.5.17-smimekeys.patch | 20 ++++++++++ mutt.spec | 76 +++++++++++++++++++++++++++++++------ mutt_ldap_query | 9 ++--- 4 files changed, 129 insertions(+), 18 deletions(-) create mode 100644 mutt-1.5.17-gnutls.patch create mode 100644 mutt-1.5.17-smimekeys.patch diff --git a/mutt-1.5.17-gnutls.patch b/mutt-1.5.17-gnutls.patch new file mode 100644 index 0000000..144e45f --- /dev/null +++ b/mutt-1.5.17-gnutls.patch @@ -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) diff --git a/mutt-1.5.17-smimekeys.patch b/mutt-1.5.17-smimekeys.patch new file mode 100644 index 0000000..139c2b0 --- /dev/null +++ b/mutt-1.5.17-smimekeys.patch @@ -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< 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 - 5:1.5.17-3 - Autorebuild for GCC 4.3 diff --git a/mutt_ldap_query b/mutt_ldap_query index ec980b8..6679d27 100644 --- a/mutt_ldap_query +++ b/mutt_ldap_query @@ -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