Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] isync: add patch for openssl3 and gmail
@ 2023-08-29  9:19 dkwo
  2023-08-30 17:36 ` ahesford
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dkwo @ 2023-08-29  9:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages isy
https://github.com/void-linux/void-packages/pull/45812

isync: add patch for openssl3 and gmail
I'll build and test after the openssl 3 build is complete.
This seems to be needed for gmail and openssl3.
cc: @leahneukirchen @classabbyamp 

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/45812.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-isy-45812.patch --]
[-- Type: text/x-diff, Size: 3730 bytes --]

From 987fbc88296a832a505584a5fc3a85c34da41fb9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Aug 2023 11:05:18 +0200
Subject: [PATCH] isync: add patch for openssl3 and gmail

---
 ...around-unexpected-EOF-error-messages.patch | 73 +++++++++++++++++++
 srcpkgs/isync/template                        |  2 +-
 2 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch

diff --git a/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch b/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch
new file mode 100644
index 0000000000000..bdcc242486541
--- /dev/null
+++ b/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch
@@ -0,0 +1,73 @@
+From b6c36624f04cd388873785c0631df3f2f9ac4bf0 Mon Sep 17 00:00:00 2001
+From: Oswald Buddenhagen <ossi@users.sf.net>
+Date: Mon, 6 Jun 2022 11:55:37 +0200
+Subject: [PATCH] work around "unexpected EOF" error messages at end of SSL
+ connections
+
+gmail apparently doesn't send a close notification (SSL_shutdown())
+before closing the TCP socket.
+---
+ src/drv_imap.c | 7 +++++--
+ src/socket.c   | 9 +++++++++
+ src/socket.h   | 1 +
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/drv_imap.c b/src/drv_imap.c
+index fb8d165..6286045 100644
+--- a/src/drv_imap.c
++++ b/src/drv_imap.c
+@@ -1620,6 +1620,7 @@ imap_socket_read( void *aux )
+ 					error( "IMAP error: unexpected BYE response: %s\n", cmd );
+ 					/* We just wait for the server to close the connection now. */
+ 					ctx->expectEOF = 1;
++					socket_expect_eof( &ctx->conn );
+ 				} else {
+ 					/* We still need to wait for the LOGOUT's tagged OK. */
+ 				}
+@@ -1882,10 +1883,12 @@ static void
+ imap_cleanup_p2( imap_store_t *ctx,
+                  imap_cmd_t *cmd ATTR_UNUSED, int response )
+ {
+-	if (response == RESP_NO)
++	if (response == RESP_NO) {
+ 		imap_cancel_store( &ctx->gen );
+-	else if (response == RESP_OK)
++	} else if (response == RESP_OK) {
+ 		ctx->expectEOF = 1;
++		socket_expect_eof( &ctx->conn );
++	}
+ }
+ 
+ /******************* imap_open_store *******************/
+diff --git a/src/socket.c b/src/socket.c
+index ac3c847..892cece 100644
+--- a/src/socket.c
++++ b/src/socket.c
+@@ -810,6 +810,15 @@ socket_expect_activity( conn_t *conn, int expect )
+ 		conf_wakeup( &conn->fd_timeout, expect ? conn->conf->timeout : -1 );
+ }
+ 
++void
++socket_expect_eof( conn_t *sock )
++{
++#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF  // implies HAVE_LIBSSL
++	if (sock->ssl)
++		SSL_set_options( sock->ssl, SSL_OP_IGNORE_UNEXPECTED_EOF );
++#endif
++}
++
+ int
+ socket_read( conn_t *conn, char *buf, uint len )
+ {
+diff --git a/src/socket.h b/src/socket.h
+index 5b1edd0..af679aa 100644
+--- a/src/socket.h
++++ b/src/socket.h
+@@ -142,6 +142,7 @@ void socket_start_tls(conn_t *conn, void (*cb)( int ok, void *aux ) );
+ void socket_start_deflate( conn_t *conn );
+ void socket_close( conn_t *sock );
+ void socket_expect_activity( conn_t *sock, int expect );
++void socket_expect_eof( conn_t *sock );
+ int socket_read( conn_t *sock, char *buf, uint len ); /* never waits */
+ char *socket_read_line( conn_t *sock ); /* don't free return value; never waits */
+ typedef enum { KeepOwn = 0, GiveOwn } ownership_t;
diff --git a/srcpkgs/isync/template b/srcpkgs/isync/template
index d8153d0518755..1e1a4b805d603 100644
--- a/srcpkgs/isync/template
+++ b/srcpkgs/isync/template
@@ -1,7 +1,7 @@
 # Template file for 'isync'
 pkgname=isync
 version=1.4.4
-revision=2
+revision=3
 build_style=gnu-configure
 hostmakedepends="perl pkg-config"
 makedepends="openssl-devel libsasl-devel db-devel zlib-devel"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: isync: add patch for openssl3 and gmail
  2023-08-29  9:19 [PR PATCH] isync: add patch for openssl3 and gmail dkwo
@ 2023-08-30 17:36 ` ahesford
  2023-08-30 20:12 ` [PR PATCH] [Updated] " dkwo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2023-08-30 17:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/45812#issuecomment-1699587127

Comment:
This fixes an error I see with Outlook 365. Is this ready to merge?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] isync: add patch for openssl3 and gmail
  2023-08-29  9:19 [PR PATCH] isync: add patch for openssl3 and gmail dkwo
  2023-08-30 17:36 ` ahesford
@ 2023-08-30 20:12 ` dkwo
  2023-08-30 20:13 ` dkwo
  2023-08-30 20:23 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: dkwo @ 2023-08-30 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages isy
https://github.com/void-linux/void-packages/pull/45812

isync: add patch for openssl3 and gmail
Built and tested on x86_64.
Seems needed for gmail and openssl3.

A patch file from https://github.com/void-linux/void-packages/pull/45812.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-isy-45812.patch --]
[-- Type: text/x-diff, Size: 3730 bytes --]

From be0c17b7a18936d75008e2cb8891133861009a55 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 29 Aug 2023 11:05:18 +0200
Subject: [PATCH] isync: add patch for openssl3 and gmail

---
 ...around-unexpected-EOF-error-messages.patch | 73 +++++++++++++++++++
 srcpkgs/isync/template                        |  2 +-
 2 files changed, 74 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch

diff --git a/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch b/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch
new file mode 100644
index 0000000000000..bdcc242486541
--- /dev/null
+++ b/srcpkgs/isync/patches/0001-work-around-unexpected-EOF-error-messages.patch
@@ -0,0 +1,73 @@
+From b6c36624f04cd388873785c0631df3f2f9ac4bf0 Mon Sep 17 00:00:00 2001
+From: Oswald Buddenhagen <ossi@users.sf.net>
+Date: Mon, 6 Jun 2022 11:55:37 +0200
+Subject: [PATCH] work around "unexpected EOF" error messages at end of SSL
+ connections
+
+gmail apparently doesn't send a close notification (SSL_shutdown())
+before closing the TCP socket.
+---
+ src/drv_imap.c | 7 +++++--
+ src/socket.c   | 9 +++++++++
+ src/socket.h   | 1 +
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/src/drv_imap.c b/src/drv_imap.c
+index fb8d165..6286045 100644
+--- a/src/drv_imap.c
++++ b/src/drv_imap.c
+@@ -1620,6 +1620,7 @@ imap_socket_read( void *aux )
+ 					error( "IMAP error: unexpected BYE response: %s\n", cmd );
+ 					/* We just wait for the server to close the connection now. */
+ 					ctx->expectEOF = 1;
++					socket_expect_eof( &ctx->conn );
+ 				} else {
+ 					/* We still need to wait for the LOGOUT's tagged OK. */
+ 				}
+@@ -1882,10 +1883,12 @@ static void
+ imap_cleanup_p2( imap_store_t *ctx,
+                  imap_cmd_t *cmd ATTR_UNUSED, int response )
+ {
+-	if (response == RESP_NO)
++	if (response == RESP_NO) {
+ 		imap_cancel_store( &ctx->gen );
+-	else if (response == RESP_OK)
++	} else if (response == RESP_OK) {
+ 		ctx->expectEOF = 1;
++		socket_expect_eof( &ctx->conn );
++	}
+ }
+ 
+ /******************* imap_open_store *******************/
+diff --git a/src/socket.c b/src/socket.c
+index ac3c847..892cece 100644
+--- a/src/socket.c
++++ b/src/socket.c
+@@ -810,6 +810,15 @@ socket_expect_activity( conn_t *conn, int expect )
+ 		conf_wakeup( &conn->fd_timeout, expect ? conn->conf->timeout : -1 );
+ }
+ 
++void
++socket_expect_eof( conn_t *sock )
++{
++#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF  // implies HAVE_LIBSSL
++	if (sock->ssl)
++		SSL_set_options( sock->ssl, SSL_OP_IGNORE_UNEXPECTED_EOF );
++#endif
++}
++
+ int
+ socket_read( conn_t *conn, char *buf, uint len )
+ {
+diff --git a/src/socket.h b/src/socket.h
+index 5b1edd0..af679aa 100644
+--- a/src/socket.h
++++ b/src/socket.h
+@@ -142,6 +142,7 @@ void socket_start_tls(conn_t *conn, void (*cb)( int ok, void *aux ) );
+ void socket_start_deflate( conn_t *conn );
+ void socket_close( conn_t *sock );
+ void socket_expect_activity( conn_t *sock, int expect );
++void socket_expect_eof( conn_t *sock );
+ int socket_read( conn_t *sock, char *buf, uint len ); /* never waits */
+ char *socket_read_line( conn_t *sock ); /* don't free return value; never waits */
+ typedef enum { KeepOwn = 0, GiveOwn } ownership_t;
diff --git a/srcpkgs/isync/template b/srcpkgs/isync/template
index d8153d0518755..1e1a4b805d603 100644
--- a/srcpkgs/isync/template
+++ b/srcpkgs/isync/template
@@ -1,7 +1,7 @@
 # Template file for 'isync'
 pkgname=isync
 version=1.4.4
-revision=2
+revision=3
 build_style=gnu-configure
 hostmakedepends="perl pkg-config"
 makedepends="openssl-devel libsasl-devel db-devel zlib-devel"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: isync: add patch for openssl3 and gmail
  2023-08-29  9:19 [PR PATCH] isync: add patch for openssl3 and gmail dkwo
  2023-08-30 17:36 ` ahesford
  2023-08-30 20:12 ` [PR PATCH] [Updated] " dkwo
@ 2023-08-30 20:13 ` dkwo
  2023-08-30 20:23 ` [PR PATCH] [Merged]: " ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: dkwo @ 2023-08-30 20:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/45812#issuecomment-1699774642

Comment:
yes, please merge.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: isync: add patch for openssl3 and gmail
  2023-08-29  9:19 [PR PATCH] isync: add patch for openssl3 and gmail dkwo
                   ` (2 preceding siblings ...)
  2023-08-30 20:13 ` dkwo
@ 2023-08-30 20:23 ` ahesford
  3 siblings, 0 replies; 5+ messages in thread
From: ahesford @ 2023-08-30 20:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

There's a merged pull request on the void-packages repository

isync: add patch for openssl3 and gmail
https://github.com/void-linux/void-packages/pull/45812

Description:
Built and tested on x86_64.
Seems needed for gmail and openssl3.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-30 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29  9:19 [PR PATCH] isync: add patch for openssl3 and gmail dkwo
2023-08-30 17:36 ` ahesford
2023-08-30 20:12 ` [PR PATCH] [Updated] " dkwo
2023-08-30 20:13 ` dkwo
2023-08-30 20:23 ` [PR PATCH] [Merged]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).