From c16ce754c0e359b745fc792bee1b8a7220391558 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 1 Apr 2009 15:00:16 +0000 Subject: [PATCH] - use PATH_MAX for buffers passed to realpath (#492861) - unconditionally inode-sort Maildir and MH folders - restore connection polling callback when closing SASL connection --- mutt-1.5.19-inodesort.patch | 36 ++++++++++++++++++++++++++++++++++++ mutt-1.5.19-realpath.patch | 32 ++++++++++++++++++++++++++++++++ mutt-1.5.19-saslcb.patch | 19 +++++++++++++++++++ mutt.spec | 13 ++++++++++++- 4 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 mutt-1.5.19-inodesort.patch create mode 100644 mutt-1.5.19-realpath.patch create mode 100644 mutt-1.5.19-saslcb.patch diff --git a/mutt-1.5.19-inodesort.patch b/mutt-1.5.19-inodesort.patch new file mode 100644 index 0000000..8345caf --- /dev/null +++ b/mutt-1.5.19-inodesort.patch @@ -0,0 +1,36 @@ +# HG changeset patch +# User Rocco Rutte +# Date 1233066304 -3600 +# Branch HEAD +# Node ID eb918af802ec62136f5a522dcb1ac18cb470d4ac +# Parent da94a92c3ba0ec7718c78a1c60d62931d13b062f +Unconditionally inode-sort Maildir and MH folders. Closes #3166. + +diff -r da94a92c3ba0 -r eb918af802ec mh.c +--- a/mh.c Mon Jan 26 12:32:30 2009 -0800 ++++ b/mh.c Tue Jan 27 15:25:04 2009 +0100 +@@ -1027,13 +1027,14 @@ + if (!ctx->quiet && progress) + mutt_progress_update (progress, count, -1); + ++ DO_SORT(); ++ + snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path); + + #if USE_HCACHE + if (option(OPTHCACHEVERIFY)) + { +- DO_SORT(); +- ret = stat(fn, &lastchanged); ++ ret = stat(fn, &lastchanged); + } + else + { +@@ -1057,7 +1058,6 @@ + { + #endif /* USE_HCACHE */ + +- DO_SORT(); + if (maildir_parse_message (ctx->magic, fn, p->h->old, p->h)) + { + p->header_parsed = 1; diff --git a/mutt-1.5.19-realpath.patch b/mutt-1.5.19-realpath.patch new file mode 100644 index 0000000..4f506be --- /dev/null +++ b/mutt-1.5.19-realpath.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User Miroslav Lichvar +# Date 1238589215 -7200 +# Branch HEAD +# Node ID 8205a12329d395b87eeb890cb86d28e761e83992 +# Parent 47c64fd9ac708fee9f4969e571c42e105287596e +Use PATH_MAX for buffers passed to realpath(3) as we're supposed to + +diff -r 47c64fd9ac70 -r 8205a12329d3 hcache.c +--- a/hcache.c Wed Apr 01 13:16:35 2009 +0200 ++++ b/hcache.c Wed Apr 01 14:33:35 2009 +0200 +@@ -836,7 +836,7 @@ + * to ensure equivalent paths share the hcache */ + if (stat (folder, &st) == 0) + { +- p = safe_malloc (_POSIX_PATH_MAX+1); ++ p = safe_malloc (PATH_MAX+1); + if (!realpath (folder, p)) + mutt_str_replace (&p, folder); + } else +diff -r 47c64fd9ac70 -r 8205a12329d3 muttlib.c +--- a/muttlib.c Wed Apr 01 13:16:35 2009 +0200 ++++ b/muttlib.c Wed Apr 01 14:33:35 2009 +0200 +@@ -759,7 +759,7 @@ + char *p = s, *q = s; + size_t len; + url_scheme_t scheme; +- char tmp[_POSIX_PATH_MAX]; ++ char tmp[PATH_MAX]; + + scheme = url_check_scheme (s); + diff --git a/mutt-1.5.19-saslcb.patch b/mutt-1.5.19-saslcb.patch new file mode 100644 index 0000000..6094f79 --- /dev/null +++ b/mutt-1.5.19-saslcb.patch @@ -0,0 +1,19 @@ +# HG changeset patch +# User Roman Kraevskiy +# Date 1237455364 -3600 +# Branch HEAD +# Node ID 6fac57b97bf1e829d1bfdf643583f5921e153fea +# Parent 17d770ae41e4bc94527181dc62072564b9fbd252 +Restore connection polling callback when closing SASL connection. Closes #3206. + +diff -r 17d770ae41e4 -r 6fac57b97bf1 mutt_sasl.c +--- a/mutt_sasl.c Wed Mar 18 14:48:07 2009 +0100 ++++ b/mutt_sasl.c Thu Mar 19 10:36:04 2009 +0100 +@@ -481,6 +481,7 @@ + conn->conn_close = sasldata->msasl_close; + conn->conn_read = sasldata->msasl_read; + conn->conn_write = sasldata->msasl_write; ++ conn->conn_poll = sasldata->msasl_poll; + + /* release sasl resources */ + sasl_dispose (&sasldata->saslconn); diff --git a/mutt.spec b/mutt.spec index e545812..375fd97 100644 --- a/mutt.spec +++ b/mutt.spec @@ -16,7 +16,7 @@ Summary: A text mode mail user agent Name: mutt Version: 1.5.19 -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 @@ -28,6 +28,9 @@ Patch2: mutt-1.5.13-nodotlock.patch Patch3: mutt-1.5.18-muttrc.patch Patch4: mutt-1.5.18-manual.patch Patch7: mutt-1.5.19-db47.patch +Patch8: mutt-1.5.19-realpath.patch +Patch9: mutt-1.5.19-inodesort.patch +Patch10: mutt-1.5.19-saslcb.patch Url: http://www.mutt.org/ Requires: mailcap urlview BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -67,6 +70,9 @@ for selecting groups of messages. %patch3 -p1 -b .muttrc %patch4 -p1 -b .manual %patch7 -p1 -b .db47 +%patch8 -p1 -b .realpath +%patch9 -p1 -b .inodesort +%patch10 -p1 -b .saslcb install -p -m644 %{SOURCE1} mutt_ldap_query @@ -142,6 +148,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/muttrc.* %changelog +* Wed Apr 01 2009 Miroslav Lichvar 5:1.5.19-4 +- use PATH_MAX for buffers passed to realpath (#492861) +- unconditionally inode-sort Maildir and MH folders +- restore connection polling callback when closing SASL connection + * Wed Feb 25 2009 Fedora Release Engineering - 5:1.5.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild