Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2010 21:20:03 GMT
From:      "Schweigert, Udo CERT" <Udo.Schweigert@siemens.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/150942: mail/mutt-devel -- patches not found or do not apply correctly
Message-ID:  <201009252120.o8PLK3wV033696@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/150942; it has been noted by GNATS.

From: "Schweigert, Udo CERT" <Udo.Schweigert@siemens.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: ports/150942: mail/mutt-devel -- patches not found or do not
 apply correctly
Date: Sat, 25 Sep 2010 23:17:25 +0200

 --M9NhX3UHpAaciwkO
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 The patch for PR 150703 hadn't been committed correctly. It seems the cvs
 commands had not been done. The attached patch fixes that. Before the cvs
 commit please do:
 
 cvs add files/extra-patch-greeting files/patch-pgp;
 cvs rm -f files/patch-buffy.c files/patch-mutt-ssl.c
 
 Regards.
 
 Udo
 
 On Sat, Sep 25, 2010 at 18:50:06 +0000, Edwin Groothuis wrote:
 > Maintainer of mail/mutt-devel,
 > 
 > Please note that PR ports/150942 has just been submitted.
 > 
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 > 
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/150942
 > 
 > -- 
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 > 
 
 --M9NhX3UHpAaciwkO
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="mutt-devel.diff"
 
 diff -ru  /usr/ports/mail/mutt-devel/files/extra-patch-greeting ./files/extra-patch-greeting
 --- /usr/ports/mail/mutt-devel/files/extra-patch-greeting	1970-01-01 01:00:00.000000000 +0100
 +++ ./files/extra-patch-greeting	2010-09-17 16:55:39.000000000 +0200
 @@ -0,0 +1,160 @@
 +diff -urN mutt-1.5.19/globals.h mutt-1.5.19-vc/globals.h
 +--- mutt-1.5.19/globals.h	2009-01-04 01:27:10.000000000 +0200
 ++++ mutt-1.5.19-vc/globals.h	2009-02-09 19:30:31.000000000 +0200
 +@@ -52,6 +52,7 @@
 + WHERE char *FolderFormat;
 + WHERE char *ForwFmt;
 + WHERE char *Fqdn;
 ++WHERE char *Greeting;
 + WHERE char *HdrFmt;
 + WHERE char *HistFile;
 + WHERE char *Homedir;
 +diff -urN mutt-1.5.19/hdrline.c mutt-1.5.19-vc/hdrline.c
 +--- mutt-1.5.19/hdrline.c	2009-01-05 21:20:53.000000000 +0200
 ++++ mutt-1.5.19-vc/hdrline.c	2009-02-09 19:30:31.000000000 +0200
 +@@ -741,3 +741,62 @@
 + {
 +   mutt_FormatString (dst, dstlen, 0, s, hdr_format_str, (unsigned long) hfi, flags);
 + }
 ++
 ++/* %n = recipient name
 ++ * %u = user (login) name of recipient
 ++ * %v = first name of recipient	*/
 ++const char *
 ++greeting_string (char *dest,
 ++		size_t destlen,
 ++		size_t col,
 ++		char op,
 ++		const char *src,
 ++		const char *prefix,
 ++		const char *ifstring,
 ++		const char *elsestring,
 ++		unsigned long data,
 ++		format_flag flags)
 ++{
 ++  HEADER *hdr = (HEADER *)data;
 ++  char *p, buf2[SHORT_STRING];
 ++
 ++  dest[0] = '\0';
 ++  switch (op)
 ++  {
 ++    case 'n':
 ++      mutt_format_s (dest, destlen, prefix, mutt_get_name (hdr->env->to));
 ++      break;
 ++
 ++    case 'u':
 ++      if (hdr->env->to)
 ++      {
 ++	strfcpy (buf2, mutt_addr_for_display (hdr->env->to), sizeof (buf2));
 ++	if ((p = strpbrk (buf2, "%@")))
 ++	  *p = '\0';
 ++      }
 ++      else
 ++	buf2[0] = '\0';
 ++      mutt_format_s (dest, destlen, prefix, buf2);
 ++      break;
 ++
 ++    case 'v':
 ++      if (hdr->env->to)
 ++	mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->to));
 ++      else if (hdr->env->cc)
 ++	mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->cc));
 ++      else
 ++	*buf2 = '\0';
 ++      if ((p = strpbrk (buf2, " %@")))
 ++	*p = '\0';
 ++      mutt_format_s (dest, destlen, prefix, buf2);
 ++      break;
 ++
 ++    default:
 ++      snprintf (dest, destlen, "%%%s%c", prefix, op);
 ++      break;
 ++  }
 ++  if (flags & M_FORMAT_OPTIONAL)
 ++    mutt_FormatString (dest, destlen, col, elsestring, greeting_string, data, flags);
 ++
 ++  return(src);
 ++}
 +diff -urN mutt-1.5.19/init.h mutt-1.5.19-vc/init.h
 +--- mutt-1.5.19/init.h	2009-01-05 21:20:53.000000000 +0200
 ++++ mutt-1.5.19-vc/init.h	2009-02-09 19:30:31.000000000 +0200
 +@@ -745,6 +745,22 @@
 +   ** .pp
 +   ** This setting defaults to the contents of the environment variable \fC$$$EMAIL\fP.
 +   */
 ++  { "greeting",		DT_STR,	 R_NONE, UL &Greeting, UL "" },
 ++  /*
 ++  ** .pp
 ++  ** When set, this is the string that will precede every message as a
 ++  ** greeting phrase to the recipients.
 ++  ** .pp
 ++  ** ``Format strings'' are similar to the strings used in the ``C''
 ++  ** function printf to format output (see the man page for more detail).
 ++  ** The following sequences are defined in Mutt:
 ++  ** .pp
 ++  ** .dl
 ++  ** .dt %n .dd recipient name
 ++  ** .dt %u .dd user (login) name of recipient
 ++  ** .dt %v .dd first name of recipient
 ++  ** .de
 ++  */
 +   { "gecos_mask",	DT_RX,	 R_NONE, UL &GecosMask, UL "^[^,]*" },
 +   /*
 +   ** .pp
 +diff -urN mutt-1.5.19/PATCHES mutt-1.5.19-vc/PATCHES
 +--- mutt-1.5.19/PATCHES	2008-03-19 22:07:06.000000000 +0200
 ++++ mutt-1.5.19-vc/PATCHES	2009-02-09 19:30:31.000000000 +0200
 +@@ -0,0 +1 @@
 ++vc.greeting
 +diff -urN mutt-1.5.19/protos.h mutt-1.5.19-vc/protos.h
 +--- mutt-1.5.19/protos.h	2009-01-05 21:20:53.000000000 +0200
 ++++ mutt-1.5.19-vc/protos.h	2009-02-09 19:32:15.000000000 +0200
 +@@ -526,6 +526,9 @@
 + void ci_bounce_message (HEADER *, int *);
 + int ci_send_message (int, HEADER *, char *, CONTEXT *, HEADER *);
 + 
 ++const char *greeting_string (char *, size_t, size_t, char, const char *, const char *,
 ++		const char *, const char *, unsigned long, format_flag);
 ++
 + /* prototypes for compatibility functions */
 + 
 + #ifndef HAVE_SETENV
 +diff -urN mutt-1.5.19/send.c mutt-1.5.19-vc/send.c
 +--- mutt-1.5.19/send.c.orig	2010-09-17 16:49:09.000000000 +0200
 ++++ mutt-1.5.19-vc/send.c	2010-09-17 16:53:15.000000000 +0200
 +@@ -469,6 +469,18 @@
 +   }
 + }
 + 
 ++void mutt_make_greeting (HEADER *hdr, FILE *out, int flags)
 ++{
 ++  char buffer[STRING];
 ++  if (Greeting)
 ++  {
 ++    mutt_FormatString(buffer, sizeof(buffer), 0, Greeting, greeting_string,
 ++		      (unsigned long) hdr, flags);
 ++    fputs(buffer, out);
 ++    fputc ('\n', out);
 ++  }
 ++}
 ++
 + void mutt_make_post_indent (CONTEXT *ctx, HEADER *cur, FILE *out)
 + {
 +   char buffer[STRING];
 +@@ -1003,7 +1015,6 @@
 +   }
 + }
 + 
 +-
 + /* look through the recipients of the message we are replying to, and if
 +    we find an address that matches $alternates, we use that as the default
 +    from field */
 +@@ -1439,6 +1450,8 @@
 +     if (option (OPTHDRS))
 +       process_user_header (msg->env);
 + 
 ++    mutt_make_greeting(msg, tempfp, flags);
 ++
 +     if (flags & SENDBATCH)
 +        mutt_copy_stream (stdin, tempfp);
 + 
 diff -ru  /usr/ports/mail/mutt-devel/files/patch-pgp ./files/patch-pgp
 --- /usr/ports/mail/mutt-devel/files/patch-pgp	1970-01-01 01:00:00.000000000 +0100
 +++ ./files/patch-pgp	2010-09-17 16:59:16.000000000 +0200
 @@ -0,0 +1,134 @@
 +--- crypt-gpgme.c~	2010-09-10 07:41:33.584316201 +1000
 ++++ crypt-gpgme.c	2010-09-10 08:22:32.948976728 +1000
 +@@ -2003,12 +2003,14 @@
 +   {
 +     if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
 +     {
 +-      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
 ++      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
 ++	  !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
 +       {
 + 	enc = 1;
 + 	break;
 +       }
 +-      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
 ++      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
 ++	       !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
 +       {
 + 	sgn = 1;
 + 	break;
 +@@ -2128,7 +2130,8 @@
 +       continue;
 +     }
 + 
 +-    if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n"))
 ++    if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") ||
 ++	!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n"))
 +       break;
 +     
 +     if (armor_header)
 +@@ -2196,14 +2199,17 @@
 +           clearsign = 0;
 +           start_pos = last_pos;
 +           
 +-          if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
 ++          if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
 ++	      !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
 +             needpass = 1;
 +-          else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
 ++          else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
 ++		   !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
 +             {
 +               clearsign = 1;
 +               needpass = 0;
 +             }
 +-          else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
 ++          else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
 ++		   !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
 +           {
 +             needpass = 0;
 +             pgp_keyblock = 1;
 +--- pgp.c~	2009-05-31 03:20:08.000000000 +1000
 ++++ pgp.c	2010-09-10 08:27:40.317064142 +1000
 +@@ -219,7 +219,8 @@
 +       continue;
 +     }
 + 
 +-    if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
 ++    if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 ||
 ++	mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0)
 +       break;
 +     
 +     if (armor_header)
 +@@ -287,14 +288,17 @@
 +       clearsign = 0;
 +       start_pos = last_pos;
 + 
 +-      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
 ++      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
 ++	  mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
 +         needpass = 1;
 +-      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
 ++      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
 ++	       mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
 +       {
 + 	clearsign = 1;
 +         needpass = 0;
 +       }
 +-      else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
 ++      else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
 ++	       !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
 +       {
 +         needpass = 0;
 +         pgp_keyblock = 1;
 +@@ -327,10 +331,14 @@
 + 	
 + 	fputs (buf, tmpfp);
 + 
 +-	if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) ||
 +-	    (!needpass 
 +-             && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0
 +-                 || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0)))
 ++	if ((needpass &&
 ++	     (mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 ||
 ++	      mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) ||
 ++	    (!needpass &&
 ++	     (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 ||
 ++	      mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 ||
 ++	      mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 ||
 ++	      mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0)))
 + 	  break;
 + 	/* remember optional Charset: armor header as defined by RfC4880 */
 + 	if (mutt_strncmp ("Charset: ", buf, 9) == 0)
 +@@ -554,11 +562,14 @@
 +   {
 +     if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0)
 +     {
 +-      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
 ++      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
 ++	  mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
 + 	enc = 1;
 +-      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
 ++      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
 ++	       mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
 + 	sgn = 1;
 +-      else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
 ++      else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 ||
 ++	       mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0)
 + 	key = 1;
 +     }
 +   }
 +@@ -1067,9 +1078,11 @@
 +    */
 +   while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL)
 +   {
 +-    if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
 ++    if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 ||
 ++	mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0)
 +       fputs ("-----BEGIN PGP SIGNATURE-----\n", fp);
 +-    else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
 ++    else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 ||
 ++	     mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0)
 +       fputs ("-----END PGP SIGNATURE-----\n", fp);
 +     else
 +       fputs (buffer, fp);
 
 --M9NhX3UHpAaciwkO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009252120.o8PLK3wV033696>