From 45a9b3506b66dc70a9e6a5f56f695f29ca8d0681bf1de4bb8d90ec760d121b5c Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 11 Oct 2011 15:34:22 +0000 Subject: [PATCH] Fix bnc#558841 and bnc#597744 OBS-URL: https://build.opensuse.org/package/show/server:mail/alpine?expand=0&rev=19 --- alpine-month_name-utf8.patch | 43 +++++++++++++++++++++++++ alpine.changes | 9 ++++++ alpine.spec | 31 +++++++----------- operation-may-be-undefined-warning.diff | 25 +++++++++++--- 4 files changed, 83 insertions(+), 25 deletions(-) create mode 100644 alpine-month_name-utf8.patch diff --git a/alpine-month_name-utf8.patch b/alpine-month_name-utf8.patch new file mode 100644 index 0000000..cba912f --- /dev/null +++ b/alpine-month_name-utf8.patch @@ -0,0 +1,43 @@ +--- pith/string.c ++++ pith/string.c +@@ -769,6 +769,7 @@ + return("xxx"); + else{ + static char buf[20]; ++ char *utf8buf; + struct tm tm; + + memset(&tm, 0, sizeof(tm)); +@@ -810,6 +811,12 @@ + + buf[0] = ' '; + } ++ utf8buf = convert_to_utf8(buf, NULL, 0); ++ if (utf8buf != NULL) { ++ strncpy(buf, utf8buf, sizeof(buf)); ++ buf[sizeof(buf)-1] = '\0'; ++ fs_give((void **)&utf8buf); ++ } + + return(buf); + } +@@ -841,12 +848,19 @@ + return(""); + else{ + static char buf[20]; ++ char *utf8buf; + struct tm tm; + + memset(&tm, 0, sizeof(tm)); + tm.tm_year = 107; + tm.tm_mon = month_num-1; + our_strftime(buf, sizeof(buf), "%B", &tm); ++ utf8buf = convert_to_utf8(buf, NULL, 0); ++ if (utf8buf != NULL) { ++ strncpy(buf, utf8buf, sizeof(buf)); ++ buf[sizeof(buf)-1] = '\0'; ++ fs_give((void **)&utf8buf); ++ } + return(buf); + } + } diff --git a/alpine.changes b/alpine.changes index 1ca554f..fd53652 100644 --- a/alpine.changes +++ b/alpine.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Oct 11 13:10:14 UTC 2011 - max@suse.com + +- Fix and extend operation-may-be-undefined-warning.diff + (bnc#558841) +- Overhaul RPM summary and description. +- Month names containing non-ASCII characters were rendered + incorrectly in non-UTF8 locales (bnc#597744). + ------------------------------------------------------------------- Mon Oct 10 13:40:24 UTC 2011 - max@suse.com diff --git a/alpine.spec b/alpine.spec index b8dfdd5..acec08a 100644 --- a/alpine.spec +++ b/alpine.spec @@ -33,7 +33,7 @@ Name: alpine %define use_mudflap 0 %define build_vanilla 0 # -Summary: Alpine mail user agent (formerly pine) +Summary: Mail User Agent BuildRequires: imap-devel krb5-devel libgssapi ncurses-devel BuildRequires: openldap2-devel openssl-devel pam-devel update-desktop-files BuildRequires: libtool @@ -65,6 +65,7 @@ Patch3: operation-may-be-undefined-warning.diff Patch4: fix-implicit.patch Patch5: alpine-gcc44.diff Patch6: alpine-2.00-as_needed.patch +Patch7: alpine-month_name-utf8.patch Patch10: pico-fix-spurious-undef-warnings.diff Patch20: pine-expression-warnings.diff Patch40: pico-stripwhitespace.diff @@ -89,24 +90,13 @@ Patch612: chappa-unverified.patch.gz Patch613: alpine-no-add-needed.patch %description -Though originally designed for inexperienced email users, Alpine -supports many advanced features, and an ever-growing number of -configuration and personal-preference options. - -Alpine (formerly Pine) features improved support for UTF-8 and the code -is licensed under the Apache License. - -Despite many improvements "under the hood" (the bugs which were -introduced by them were ironed out during more than a full year of -public beta testing), the user interface stays the same, so pine users -can switch painlessly to alpine and notice no change at all. - -It uses the same configuration files as pine, so it's a clean update. - -The biggest user-visible change are the new animations which are shown -when operations take a long time. - - +Alpine is a display-oriented email client that is suitable for both +the inexperienced email user as well as for the most demanding of +power users. Alpine is based on the PineĀ® Message System, which was +also developed at the University of Washington. Alpine can be learned +by exploration and the use of context-sensitive help. The user +experience is highly customizable through the use of the Alpine Setup +command. %package -n pico License: Apache Software License .. @@ -169,10 +159,11 @@ fi # %patch1 %patch2 -p1 -%patch3 -p1 +%patch3 %patch4 -p0 %patch5 -p0 %patch6 -p0 +%patch7 %patch10 -p1 %patch20 -p1 %patch40 -p1 diff --git a/operation-may-be-undefined-warning.diff b/operation-may-be-undefined-warning.diff index eb5358f..b6eef31 100644 --- a/operation-may-be-undefined-warning.diff +++ b/operation-may-be-undefined-warning.diff @@ -1,6 +1,17 @@ ---- alpine-0.999/imap/src/c-client/mail.c -+++ alpine-0.999/imap/src/c-client/mail.c -@@ -2795,8 +2795,10 @@ +--- alpine/folder.c ++++ alpine/folder.c +@@ -6013,7 +6013,7 @@ + continue; + + case 14 : /* toggle comparison */ +- *cmp = ++(*cmp) % 3; ++ *cmp = ((*cmp) + 1) % 3; + continue; + + case -1 : /* cancel */ +--- imap/src/c-client/mail.c ++++ imap/src/c-client/mail.c +@@ -2931,8 +2931,14 @@ /* parse time */ d = strtoul (s+1,(char **) &s,10); if (*s != ':') return NIL; @@ -8,8 +19,12 @@ - y = (*s == ':') ? strtoul (++s,(char **) &s,10) : 0; + s++; + m = strtoul (s,(char **) &s,10); -+ s++; -+ y = (*s == ':') ? strtoul (s,(char **) &s,10) : 0; ++ if (*s == ':') { ++ s++; ++ y = strtoul(s, (char **)&s, 10); ++ } else { ++ y = 0; ++ } /* validity check time */ if ((d > 23) || (m > 59) || (y > 60)) return NIL; /* set values in elt */