rpms/sylpheed/FC-6 sylpheed-2.3.1-escaped-quotes.patch, NONE, 1.1 sylpheed-2.3.1-pgpmime-signed-compose.patch, NONE, 1.1 sylpheed.spec, 1.43, 1.44

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri May 18 15:17:37 UTC 2007


Author: mschwendt

Update of /cvs/extras/rpms/sylpheed/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5129

Modified Files:
	sylpheed.spec 
Added Files:
	sylpheed-2.3.1-escaped-quotes.patch 
	sylpheed-2.3.1-pgpmime-signed-compose.patch 
Log Message:
* Fri May 18 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-1.2
- Backport patch for libsylph to improve/fix handling of escapes
  and quotes in headers.


sylpheed-2.3.1-escaped-quotes.patch:

--- NEW FILE sylpheed-2.3.1-escaped-quotes.patch ---
diff -Nur sylpheed-2.3.1-orig/libsylph/procheader.c sylpheed-2.3.1/libsylph/procheader.c
--- sylpheed-2.3.1-orig/libsylph/procheader.c	2007-01-12 07:14:53.000000000 +0100
+++ sylpheed-2.3.1/libsylph/procheader.c	2007-05-18 15:44:01.000000000 +0200
@@ -723,7 +723,7 @@
 	Xstrdup_a(tmp, str, return NULL);
 
 	if (*tmp == '\"') {
-		extract_quote(tmp, '\"');
+		extract_quote_with_escape(tmp, '\"');
 		g_strstrip(tmp);
 	} else if (strchr(tmp, '<')) {
 		eliminate_parenthesis(tmp, '<', '>');
@@ -734,7 +734,7 @@
 			g_strstrip(tmp);
 		}
 	} else if (strchr(tmp, '(')) {
-		extract_parenthesis(tmp, '(', ')');
+		extract_parenthesis_with_escape(tmp, '(', ')');
 		g_strstrip(tmp);
 	}
 
diff -Nur sylpheed-2.3.1-orig/libsylph/utils.c sylpheed-2.3.1/libsylph/utils.c
--- sylpheed-2.3.1-orig/libsylph/utils.c	2007-01-15 06:08:42.000000000 +0100
+++ sylpheed-2.3.1/libsylph/utils.c	2007-05-18 15:44:13.000000000 +0200
@@ -652,6 +652,36 @@
 	*destp = '\0';
 }
 
+void extract_parenthesis_with_escape(gchar *str, gchar op, gchar cl)
+{
+	register gchar *srcp, *destp;
+	gint in_brace;
+
+	srcp = destp = str;
+
+	while ((srcp = strchr(srcp, op))) {
+		if (destp > str)
+			*destp++ = ' ';
+		++srcp;
+		in_brace = 1;
+		while (*srcp) {
+			if (*srcp == op)
+				in_brace++;
+			else if (*srcp == cl)
+				in_brace--;
+
+			if (in_brace == 0)
+				break;
+
+			if (*srcp == '\\' && *(srcp + 1) != '\0')
+				++srcp;
+
+			*destp++ = *srcp++;
+		}
+	}
+	*destp = '\0';
+}
+
 void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
 					 gchar op, gchar cl)
 {
@@ -713,6 +743,25 @@
 	}
 }
 
+void extract_quote_with_escape(gchar *str, gchar quote_chr)
+{
+	register gchar *sp, *dp;
+
+	if ((sp = strchr(str, quote_chr))) {
+		dp = sp;
+		++sp;
+		while (*sp) {
+			if (*sp == quote_chr)
+				break;
+			else if (*sp == '\\' && *(sp + 1) != '\0')
+				++sp;
+
+			*dp++ = *sp++;
+		}
+		*dp = '\0';
+	}
+}
+
 void eliminate_address_comment(gchar *str)
 {
 	register gchar *srcp, *destp;
diff -Nur sylpheed-2.3.1-orig/libsylph/utils.h sylpheed-2.3.1/libsylph/utils.h
--- sylpheed-2.3.1-orig/libsylph/utils.h	2007-01-12 07:14:53.000000000 +0100
+++ sylpheed-2.3.1/libsylph/utils.h	2007-05-18 15:44:13.000000000 +0200
@@ -257,6 +257,9 @@
 void extract_parenthesis		(gchar		*str,
 					 gchar		 op,
 					 gchar		 cl);
+void extract_parenthesis_with_escape	(gchar		*str,
+					 gchar		 op,
+					 gchar		 cl);
 
 void extract_parenthesis_with_skip_quote	(gchar		*str,
 						 gchar		 quote_chr,
@@ -267,6 +270,8 @@
 					 gchar		 quote_chr);
 void extract_quote			(gchar		*str,
 					 gchar		 quote_chr);
+void extract_quote_with_escape		(gchar		*str,
+					 gchar		 quote_chr);
 void eliminate_address_comment		(gchar		*str);
 gchar *strchr_with_skip_quote		(const gchar	*str,
 					 gint		 quote_chr,

sylpheed-2.3.1-pgpmime-signed-compose.patch:

--- NEW FILE sylpheed-2.3.1-pgpmime-signed-compose.patch ---
diff -Nur sylpheed-2.3.1-orig/src/compose.c sylpheed-2.3.1/src/compose.c
--- sylpheed-2.3.1-orig/src/compose.c	2007-01-12 07:14:57.000000000 +0100
+++ sylpheed-2.3.1/src/compose.c	2007-05-14 19:09:49.000000000 +0200
@@ -3037,19 +3037,20 @@
 	buf = canon_buf;
 
 #if USE_GPGME
-	/* chomp all trailing spaces */
 	if (rfc2015_is_available() && !is_draft &&
 	    compose->use_signing && !compose->account->clearsign) {
-		gchar *tmp;
-		tmp = strchomp_all(buf);
-		g_free(buf);
-		buf = tmp;
-#if 0
-		if (encoding == ENC_7BIT)
+        if ( out_charset == CS_ISO_2022_JP ) {
+            encoding = ENC_7BIT;
+            gchar *tmp;
+            /* This breaks '-- ' sig delimiters, though. */
+            tmp = strchomp_all(buf);
+            g_free(buf);
+            buf = tmp;
+        }
+        else if (encoding == ENC_7BIT)
 			encoding = ENC_QUOTED_PRINTABLE;
 		else if (encoding == ENC_8BIT)
 			encoding = ENC_BASE64;
-#endif
 	}
 
 	if (rfc2015_is_available() && !is_draft &&


Index: sylpheed.spec
===================================================================
RCS file: /cvs/extras/rpms/sylpheed/FC-6/sylpheed.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- sylpheed.spec	21 Apr 2007 08:33:10 -0000	1.43
+++ sylpheed.spec	18 May 2007 15:17:33 -0000	1.44
@@ -5,7 +5,7 @@
 Summary: GTK+ based, lightweight, and fast email client
 Name: sylpheed
 Version: 2.3.1
-Release: 1
+Release: 1.2
 License: GPL
 URL: http://sylpheed.sraoss.jp/
 Group: Applications/Internet
@@ -25,6 +25,8 @@
 Patch3: sylpheed-2.3.1-certsdir.patch
 Patch4: sylpheed-2.2.5-prefs_common.patch
 Patch5: sylpheed-2.3.1-apop-cve-2007-1558.patch
+Patch6: sylpheed-2.3.1-pgpmime-signed-compose.patch
+Patch7: sylpheed-2.3.1-escaped-quotes.patch
 
 %description
 This program is an X based fast email client which has features
@@ -48,6 +50,8 @@
 %patch3 -p1 -b .certsdir
 %patch4 -p1 -b .prefs_common
 %patch5 -p1 -b .apop
+%patch6 -p1 -b .pgpmime-signed-compose
+%patch7 -p1 -b .escaped-quotes
 
 %build
 %configure --enable-ssl %{!?_without_gpgme:--enable-gpgme} \
@@ -65,9 +69,8 @@
 install -m 644 sylpheed-64x64.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/sylpheed.png
 desktop-file-install --vendor %{desktopvendor} \
 	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
-	--add-category Application \
+	--remove-category Application \
 	--add-category Network \
-	--add-category X-Fedora \
 	sylpheed.desktop
 install -d $RPM_BUILD_ROOT%{_mandir}/man1/
 install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/
@@ -88,6 +91,17 @@
 %{_mandir}/man1/*
 
 %changelog
+* Fri May 18 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-1.2
+- Backport patch for libsylph to improve/fix handling of escapes
+  and quotes in headers.
+
+* Sun May 13 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-1.1
+- Patch PGP/MIME signed message compose, so it doesn't strip off
+  whitespace of the "-- " body signature delimiter. It's upstream
+  preference that it still does that for ISO 2022 JP to be compatible
+  with a few broken MUAs that have problems with QP encoding.
+- Remove .desktop categories "Application" and "X-Fedora".
+
 * Sat Apr 21 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.3.1-1
 - Update to 2.3.1 (stable branch).
 - Patch APOP vulnerability (CVE-2007-1558) as in 2.4.0.




More information about the fedora-extras-commits mailing list