From 94043eb60f2184763dd1a3237edb47aee919bedb Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 29 Nov 2010 11:36:32 +0000 Subject: [PATCH 1/6] Updating link to change in openSUSE:Factory/mutt revision 30.0 OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=ec788c97e7281244533bcee067c332e4 --- mutt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt.spec b/mutt.spec index 4642c00..8894aa7 100644 --- a/mutt.spec +++ b/mutt.spec @@ -32,7 +32,7 @@ Requires: smtp_daemon #Requires: desktop-data-SuSE AutoReqProv: on Version: 1.5.21 -Release: 1 +Release: 2 Summary: Mail Program # ftp://ftp.mutt.org/mutt/devel/ Source0: %name-%version.tar.bz2 From 11c5edec3c7d4606522c01e45d3309a3127fdb15 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 26 Jan 2011 13:26:53 +0000 Subject: [PATCH 2/6] Accepting request 59152 from home:gberh:branches:server:mail OBS-URL: https://build.opensuse.org/request/show/59152 OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=54 --- mutt.changes | 6 ++++++ mutt.desktop | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mutt.changes b/mutt.changes index 22ce977..608e514 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 26 12:46:10 UTC 2011 - gber@opensuse.org + +- modified desktop file so mutt can be used as the default mailto + handler + ------------------------------------------------------------------- Fri Nov 26 19:44:20 CET 2010 - pth@suse.de diff --git a/mutt.desktop b/mutt.desktop index 63aedf1..de2296a 100644 --- a/mutt.desktop +++ b/mutt.desktop @@ -1,9 +1,10 @@ [Desktop Entry] Categories=ConsoleOnly;Network;Email Encoding=UTF-8 -Exec=mutt +Exec=mutt %u Icon=mutt Type=Application Name=Mutt GenericName=Mail Client Terminal=true +MimeType=x-scheme-handler/mailto; From 63f7a40b3d49cf1e4520ec0b231d1b61bb5f6228 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 31 Jan 2011 13:36:16 +0000 Subject: [PATCH 3/6] . OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=55 --- mutt-1.5.21.sidebar-fix.dif | 186 +++++++++++++++++++++++++++++++++++- mutt.changes | 6 ++ 2 files changed, 189 insertions(+), 3 deletions(-) diff --git a/mutt-1.5.21.sidebar-fix.dif b/mutt-1.5.21.sidebar-fix.dif index e1ac821..f70b0b3 100644 --- a/mutt-1.5.21.sidebar-fix.dif +++ b/mutt-1.5.21.sidebar-fix.dif @@ -1,5 +1,5 @@ --- Makefile.am -+++ Makefile.am 2010-11-04 13:51:48.432426391 +0000 ++++ Makefile.am 2010-11-04 13:51:48.000000000 +0000 @@ -71,6 +71,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP O rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ @@ -9,7 +9,7 @@ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ ChangeLog mkchangelog.sh mutt_idna.h \ --- Makefile.in -+++ Makefile.in 2010-11-04 13:54:41.299925329 +0000 ++++ Makefile.in 2010-11-04 13:54:41.000000000 +0000 @@ -84,7 +84,7 @@ am_mutt_OBJECTS = addrbook.$(OBJEXT) ali score.$(OBJEXT) send.$(OBJEXT) sendlib.$(OBJEXT) \ signal.$(OBJEXT) sort.$(OBJEXT) status.$(OBJEXT) \ @@ -36,7 +36,7 @@ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ ChangeLog mkchangelog.sh mutt_idna.h \ --- buffy.c -+++ buffy.c 2010-11-04 13:57:02.163926692 +0000 ++++ buffy.c 2010-11-04 13:57:02.000000000 +0000 @@ -520,19 +520,22 @@ int mutt_buffy_check (int force) { case M_MBOX: @@ -63,3 +63,183 @@ if ((tmp->new = mh_buffy (tmp->path)) > 0) BuffyCount++; break; +--- sidebar.c ++++ sidebar.c 2011-01-31 12:06:41.571925769 +0000 +@@ -28,6 +28,7 @@ + #include "sidebar.h" + #include "buffy.h" + #include ++#include + #include "keymap.h" + #include + +@@ -80,36 +81,45 @@ void calc_boundaries (int menu) + } + } + ++static char sidebar_buffer[LINE_MAX]; + char *make_sidebar_entry(char *box, int size, int new, int flagged) + { +- static char *entry = 0; +- char *c; +- int i = 0; +- int delim_len = strlen(SidebarDelim); ++ char *entry; ++ size_t i = 0; ++ size_t delim_len = strlen(NONULL(SidebarDelim)); ++ size_t width = sizeof(sidebar_buffer) - 1; ++ ++ entry = &sidebar_buffer[0]; ++ if (SidebarWidth - delim_len + 1 > width || strlen(box) + 1 > width) ++ return NONULL(SidebarDelim); + +- c = realloc(entry, SidebarWidth - delim_len + 2); +- if ( c ) entry = c; + entry[SidebarWidth - delim_len + 1] = 0; + for (; i < SidebarWidth - delim_len + 1; entry[i++] = ' ' ); + i = strlen(box); + strncpy( entry, box, i < (SidebarWidth - delim_len + 1) ? i : (SidebarWidth - delim_len + 1) ); + + if (size == -1) +- sprintf(entry + SidebarWidth - delim_len - 3, "?"); ++ snprintf(entry + SidebarWidth - delim_len - 3, width, "?"); + else if ( new ) { + if (flagged > 0) { +- sprintf( ++ snprintf( + entry + SidebarWidth - delim_len - 5 - quick_log10(size) - quick_log10(new) - quick_log10(flagged), ++ width, + "% d(%d)[%d]", size, new, flagged); + } else { +- sprintf( ++ snprintf( + entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(new), ++ width, + "% d(%d)", size, new); + } + } else if (flagged > 0) { +- sprintf( entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), "% d[%d]", size, flagged); ++ snprintf(entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), ++ width, ++ "% d[%d]", size, flagged); + } else { +- sprintf( entry + SidebarWidth - delim_len - 1 - quick_log10(size), "% d", size); ++ snprintf(entry + SidebarWidth - delim_len - 1 - quick_log10(size), ++ width, ++ "% d", size); + } + return entry; + } +@@ -136,15 +146,17 @@ void set_curbuffy(char buf[LONG_STRING]) + + int draw_sidebar(int menu) { + ++ char folder_buffer[LINE_MAX]; + int lines = option(OPTHELP) ? 1 : 0; + BUFFY *tmp; + #ifndef USE_SLANG_CURSES + attr_t attrs; + #endif +- short delim_len = strlen(SidebarDelim); ++ short delim_len = strlen(NONULL(SidebarDelim)); + short color_pair; ++ char *maildir = NONULL(Maildir); + +- static bool initialized = false; ++ static bool initialized /* = false*/; + static int prev_show_value; + static short saveSidebarWidth; + +@@ -168,7 +180,7 @@ int draw_sidebar(int menu) { + } + + +-// if ( SidebarWidth == 0 ) return 0; ++/* if ( SidebarWidth == 0 ) return 0; */ + if (SidebarWidth > 0 && option (OPTSIDEBAR) + && delim_len >= SidebarWidth) { + unset_option (OPTSIDEBAR); +@@ -226,6 +238,32 @@ int draw_sidebar(int menu) { + SETCOLOR(MT_COLOR_NORMAL); + + for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); tmp = tmp->next ) { ++ short maildir_is_prefix = 0; ++ int sidebar_folder_depth; ++ char *sidebar_folder_name; ++ char *safe_path; ++ char *base_name; ++ ++ if ( !tmp->path || *tmp->path == '\0' ) { ++ move( lines, 0 ); ++ lines++; ++ continue; ++ } ++ ++ safe_path = strdupa(tmp->path); ++ if ( !safe_path ) { ++ move( lines, 0 ); ++ lines++; ++ continue; ++ } ++ ++ base_name = basename(safe_path); ++ if ( !base_name ) { ++ move( lines, 0 ); ++ lines++; ++ continue; ++ } ++ + if ( tmp == CurBuffy ) + SETCOLOR(MT_COLOR_INDICATOR); + else if ( tmp->msg_unread > 0 ) +@@ -241,35 +279,36 @@ int draw_sidebar(int menu) { + tmp->msgcount = Context->msgcount; + tmp->msg_flagged = Context->flagged; + } +- // check whether Maildir is a prefix of the current folder's path +- short maildir_is_prefix = 0; +- if ( (strlen(tmp->path) > strlen(Maildir)) && +- (strncmp(Maildir, tmp->path, strlen(Maildir)) == 0) ) ++ /* check whether Maildir is a prefix of the current folder's path */ ++ if ( (strlen(tmp->path) > strlen(maildir)) && ++ (strncmp(maildir, tmp->path, strlen(maildir)) == 0) ) + maildir_is_prefix = 1; +- // calculate depth of current folder and generate its display name with indented spaces +- int sidebar_folder_depth = 0; +- char *sidebar_folder_name; +- sidebar_folder_name = basename(tmp->path); ++ /* calculate depth of current folder and generate its display name with indented spaces */ ++ sidebar_folder_name = base_name; ++ sidebar_folder_depth = 0; + if ( maildir_is_prefix ) { + char *tmp_folder_name; + int i; +- tmp_folder_name = tmp->path + strlen(Maildir); +- for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { ++ tmp_folder_name = tmp->path + strlen(maildir); ++ for (i = 0; i < strlen(tmp->path) - strlen(maildir); i++) { + if (tmp_folder_name[i] == '/') sidebar_folder_depth++; + } + if (sidebar_folder_depth > 0) { +- sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); ++ if (sidebar_folder_depth + strlen(base_name) + 1 > sizeof(folder_buffer)) { ++ move( lines, 0 ); ++ lines++; ++ continue; ++ } ++ sidebar_folder_name = &folder_buffer[0]; + for (i=0; i < sidebar_folder_depth; i++) + sidebar_folder_name[i]=' '; + sidebar_folder_name[i]=0; +- strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); ++ strncat(sidebar_folder_name, base_name, strlen(base_name) + sidebar_folder_depth); + } + } + printw( "%.*s", SidebarWidth - delim_len + 1, + make_sidebar_entry(sidebar_folder_name, tmp->msgcount, + tmp->msg_unread, tmp->msg_flagged)); +- if (sidebar_folder_depth > 0) +- free(sidebar_folder_name); + lines++; + } + SETCOLOR(MT_COLOR_NORMAL); diff --git a/mutt.changes b/mutt.changes index 608e514..b8132e6 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 31 14:30:26 CET 2011 - werner@suse.de + +- Fix the orther sidebar patch as it is broken with MALLOC_CHECK=1 + now static buffers are used instead (re)alloced arrays. + ------------------------------------------------------------------- Wed Jan 26 12:46:10 UTC 2011 - gber@opensuse.org From b7bf7667191f6730f0b388aefebc19ab0f6fa3a7 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 2 Feb 2011 08:49:41 +0000 Subject: [PATCH 4/6] . OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=56 --- mutt.changes | 7 +++++++ mutt.spec | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mutt.changes b/mutt.changes index b8132e6..7bf78e2 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 2 09:47:43 CET 2011 - werner@suse.de + +- Switch from ibuildrequires gpgme-devel to libgpgme-devel for 11.4 +- Work around missing buildrequires of libgpgme-devel by adding + libassuan-devel for 11.4 + ------------------------------------------------------------------- Mon Jan 31 14:30:26 CET 2011 - werner@suse.de diff --git a/mutt.spec b/mutt.spec index 8894aa7..67c9a54 100644 --- a/mutt.spec +++ b/mutt.spec @@ -20,7 +20,13 @@ Name: mutt #!BuildIgnore: sendmail -BuildRequires: cyrus-sasl-devel cyrus-sasl-gssapi docbook-xsl-stylesheets docbook_4 gdbm-devel glibc-i18ndata gpgme-devel ispell krb5-devel libcom_err libgcrypt libgpg-error-devel libidn-devel libxml2 libxslt lynx ncurses-devel openssl-devel postfix sgml-skel update-desktop-files xli +BuildRequires: cyrus-sasl-devel cyrus-sasl-gssapi docbook-xsl-stylesheets docbook_4 glibc-i18ndata gpgme-devel ispell krb5-devel libcom_err libgcrypt libgpg-error-devel libidn-devel libxml2 libxslt lynx ncurses-devel openssl-devel postfix sgml-skel update-desktop-files xli +#if +%if 0%{?suse_version} > 1130 +BuildRequires: libgpgme-devel libassuan-devel +%else +BuildRequires: gdbm-devel +%endif License: GPLv2+ Group: Productivity/Networking/Email/Clients Url: http://www.mutt.org From 4ef015c0479fdf49e6d5735264f5c4a2e09e88b5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 3 Feb 2011 07:22:21 +0000 Subject: [PATCH 5/6] Accepting request 59848 from home:oertel:branches:openSUSE:Factory OBS-URL: https://build.opensuse.org/request/show/59848 OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=57 --- mutt.changes | 5 +++++ mutt.spec | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mutt.changes b/mutt.changes index 7bf78e2..0e113d7 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 3 02:00:55 CET 2011 - ro@suse.de + +- buildrequire gdbm-devel also on 11.4 to fix build + ------------------------------------------------------------------- Wed Feb 2 09:47:43 CET 2011 - werner@suse.de diff --git a/mutt.spec b/mutt.spec index 67c9a54..5b1f88c 100644 --- a/mutt.spec +++ b/mutt.spec @@ -21,11 +21,10 @@ Name: mutt #!BuildIgnore: sendmail BuildRequires: cyrus-sasl-devel cyrus-sasl-gssapi docbook-xsl-stylesheets docbook_4 glibc-i18ndata gpgme-devel ispell krb5-devel libcom_err libgcrypt libgpg-error-devel libidn-devel libxml2 libxslt lynx ncurses-devel openssl-devel postfix sgml-skel update-desktop-files xli +BuildRequires: gdbm-devel #if %if 0%{?suse_version} > 1130 BuildRequires: libgpgme-devel libassuan-devel -%else -BuildRequires: gdbm-devel %endif License: GPLv2+ Group: Productivity/Networking/Email/Clients From 43b65cd1d627bc5344b8696d9726c86a3e45b69f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 3 Feb 2011 10:37:48 +0000 Subject: [PATCH 6/6] . OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=58 --- mutt.changes | 13 ++++++++++++- mutt.spec | 20 +++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/mutt.changes b/mutt.changes index 0e113d7..a9724f5 100644 --- a/mutt.changes +++ b/mutt.changes @@ -6,16 +6,27 @@ Thu Feb 3 02:00:55 CET 2011 - ro@suse.de ------------------------------------------------------------------- Wed Feb 2 09:47:43 CET 2011 - werner@suse.de -- Switch from ibuildrequires gpgme-devel to libgpgme-devel for 11.4 +- Switch from buildrequires gpgme-devel to libgpgme-devel for 11.4 - Work around missing buildrequires of libgpgme-devel by adding libassuan-devel for 11.4 +------------------------------------------------------------------- +Mon Jan 31 13:55:54 UTC 2011 - gber@opensuse.org + +- recommend smtp_daemon since mutt has builtin SMTP support + ------------------------------------------------------------------- Mon Jan 31 14:30:26 CET 2011 - werner@suse.de - Fix the orther sidebar patch as it is broken with MALLOC_CHECK=1 now static buffers are used instead (re)alloced arrays. +------------------------------------------------------------------- +Wed Jan 26 13:47:31 UTC 2011 - gber@opensuse.org + +- fix build by removing Makefiles from contrib +- added missing %mime_database_post/%mime_database_postun + ------------------------------------------------------------------- Wed Jan 26 12:46:10 UTC 2011 - gber@opensuse.org diff --git a/mutt.spec b/mutt.spec index 5b1f88c..6f628e4 100644 --- a/mutt.spec +++ b/mutt.spec @@ -20,18 +20,23 @@ Name: mutt #!BuildIgnore: sendmail -BuildRequires: cyrus-sasl-devel cyrus-sasl-gssapi docbook-xsl-stylesheets docbook_4 glibc-i18ndata gpgme-devel ispell krb5-devel libcom_err libgcrypt libgpg-error-devel libidn-devel libxml2 libxslt lynx ncurses-devel openssl-devel postfix sgml-skel update-desktop-files xli -BuildRequires: gdbm-devel +BuildRequires: cyrus-sasl-devel cyrus-sasl-gssapi docbook-xsl-stylesheets docbook_4 gdbm-devel glibc-i18ndata ispell krb5-devel libcom_err libgcrypt libgpg-error-devel libidn-devel libxml2 libxslt lynx ncurses-devel openssl-devel postfix sgml-skel update-desktop-files xli #if %if 0%{?suse_version} > 1130 BuildRequires: libgpgme-devel libassuan-devel +%else +BuildRequires: gpgme-devel %endif License: GPLv2+ Group: Productivity/Networking/Email/Clients Url: http://www.mutt.org Provides: muttssl Obsoletes: muttssl -Requires: smtp_daemon +Recommends: smtp_daemon +%if 0%{?suse_version} > 1130 +Requires(post): shared-mime-info +Requires(postun): shared-mime-info +%endif # NOTE: We don't want this dependency and desktop-data-SuSE is in all # desktop selections. #Requires: desktop-data-SuSE @@ -125,6 +130,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mv Muttrc.SuSE $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc install -m 755 %{S:1} $RPM_BUILD_ROOT%{_bindir} gzip -9 doc/manu*.txt +rm -f contrib/Makefile* # datadir not automatically created: mkdir -p $RPM_BUILD_ROOT%{_datadir}/mutt # mbox/mmdf manual page conflicts with the one from tin, so rename it @@ -147,6 +153,14 @@ install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/applications/ install -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.muttrc %suse_update_desktop_file mutt +%if 0%{?suse_version} > 1130 +%post +%mime_database_post + +%postun +%mime_database_postun +%endif + %clean rm -rf $RPM_BUILD_ROOT