git: dff10069f4bf - main - www/serf: update port to 1.3.10

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Thu, 05 Oct 2023 22:12:00 UTC
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dff10069f4bfc0fe6ad772ff075acd0cbda004d7

commit dff10069f4bfc0fe6ad772ff075acd0cbda004d7
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2023-09-15 14:05:10 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2023-10-05 22:11:41 +0000

    www/serf: update port to 1.3.10
    
    Also, remove patch hunks which are already upstream.
    
    Changelog:      https://svn.apache.org/repos/asf/serf/tags/1.3.10/CHANGES
    Approved by:    maintainer timeout
---
 www/serf/Makefile                           |   6 +-
 www/serf/distinfo                           |   6 +-
 www/serf/files/patch-SConstruct             |  19 +---
 www/serf/files/patch-buckets_ssl__buckets.c | 138 +---------------------------
 4 files changed, 11 insertions(+), 158 deletions(-)

diff --git a/www/serf/Makefile b/www/serf/Makefile
index fc67e4039df9..d7fba597ccf1 100644
--- a/www/serf/Makefile
+++ b/www/serf/Makefile
@@ -1,12 +1,8 @@
 PORTNAME=	serf
-PORTVERSION=	1.3.9
-PORTREVISION=	7
+PORTVERSION=	1.3.10
 CATEGORIES=	www
 MASTER_SITES=	APACHE/serf
 
-PATCH_SITES=	https://salsa.debian.org/jamessan/serf/-/raw/f6a5256b2de696c2527524d9b1a695ec5aaa17b0/debian/patches/
-PATCHFILES=	py3-compat:-p1
-
 MAINTAINER=	lev@FreeBSD.org
 COMMENT=	Serf HTTP client library
 WWW=		https://serf.apache.org/
diff --git a/www/serf/distinfo b/www/serf/distinfo
index f3db83ed9be6..5744de5bc493 100644
--- a/www/serf/distinfo
+++ b/www/serf/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1590959783
-SHA256 (serf-1.3.9.tar.bz2) = 549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc
-SIZE (serf-1.3.9.tar.bz2) = 145132
+TIMESTAMP = 1694770008
+SHA256 (serf-1.3.10.tar.bz2) = be81ef08baa2516ecda76a77adf7def7bc3227eeb578b9a33b45f7b41dc064e6
+SIZE (serf-1.3.10.tar.bz2) = 147744
 SHA256 (py3-compat) = aa31670d4acf132400c78524caa9efbfdf76bde6f4a973bf72ae69b25fd4c4d0
 SIZE (py3-compat) = 2879
diff --git a/www/serf/files/patch-SConstruct b/www/serf/files/patch-SConstruct
index 4e355e282f7f..fb96ec3fc4a9 100644
--- a/www/serf/files/patch-SConstruct
+++ b/www/serf/files/patch-SConstruct
@@ -1,6 +1,6 @@
---- SConstruct.orig	2023-08-18 19:57:03 UTC
+--- SConstruct.orig	2023-05-18 09:33:55 UTC
 +++ SConstruct
-@@ -76,6 +76,9 @@ else:
+@@ -74,6 +74,9 @@ else:
  
  opts = Variables(files=[SAVED_CONFIG])
  opts.AddVariables(
@@ -10,7 +10,7 @@
    PathVariable('PREFIX',
                 'Directory to install under',
                 default_prefix,
-@@ -210,6 +213,7 @@ opts.Save(SAVED_CONFIG, env)
+@@ -217,6 +220,7 @@ opts.Save(SAVED_CONFIG, env)
  thisdir = os.getcwd()
  libdir = '$LIBDIR'
  incdir = '$PREFIX/include/serf-$MAJOR'
@@ -18,7 +18,7 @@
  
  # This version string is used in the dynamic library name, and for Mac OS X also
  # for the current_version and compatibility_version options in the .dylib
-@@ -366,8 +370,8 @@ else:
+@@ -386,8 +390,8 @@ else:
    ### there is probably a better way to run/capture output.
    ### env.ParseConfig() may be handy for getting this stuff into the build
    if CALLOUT_OKAY:
@@ -29,16 +29,7 @@
    else:
      apr_libs = ''
      apu_libs = ''
-@@ -408,6 +412,8 @@ pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
- 
- env.Default(lib_static, lib_shared, pkgconfig)
- 
-+#print env.Dump()
-+
- if CALLOUT_OKAY:
-   conf = Configure(env)
- 
-@@ -439,7 +445,7 @@ if sys.platform == 'darwin':
+@@ -459,7 +463,7 @@ if sys.platform == 'darwin':
  env.Alias('install-lib', [install_static, install_shared,
                            ])
  env.Alias('install-inc', env.Install(incdir, HEADER_FILES))
diff --git a/www/serf/files/patch-buckets_ssl__buckets.c b/www/serf/files/patch-buckets_ssl__buckets.c
index a8b76fb3e0ee..bc8f18e6b5cd 100644
--- a/www/serf/files/patch-buckets_ssl__buckets.c
+++ b/www/serf/files/patch-buckets_ssl__buckets.c
@@ -1,103 +1,6 @@
---- buckets/ssl_buckets.c.orig	2016-06-30 15:45:07 UTC
+--- buckets/ssl_buckets.c.orig	2023-05-18 09:33:55 UTC
 +++ buckets/ssl_buckets.c
-@@ -407,7 +407,7 @@ static int bio_bucket_destroy(BIO *bio)
- 
- static long bio_bucket_ctrl(BIO *bio, int cmd, long num, void *ptr)
- {
--    long ret = 1;
-+    long ret = 0;
- 
-     switch (cmd) {
-     default:
-@@ -415,6 +415,7 @@ static long bio_bucket_ctrl(BIO *bio, int cmd, long nu
-         break;
-     case BIO_CTRL_FLUSH:
-         /* At this point we can't force a flush. */
-+        ret = 1;
-         break;
-     case BIO_CTRL_PUSH:
-     case BIO_CTRL_POP:
-@@ -555,7 +556,7 @@ get_subject_alt_names(apr_array_header_t **san_arr, X5
-         }
-         sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free);
-     }
--    
-+
-     return APR_SUCCESS;
- }
- 
-@@ -606,7 +607,7 @@ validate_server_certificate(int cert_valid, X509_STORE
-         err = X509_STORE_CTX_get_error(store_ctx);
- 
-         switch(err) {
--            case X509_V_ERR_CERT_NOT_YET_VALID: 
-+            case X509_V_ERR_CERT_NOT_YET_VALID:
-                     failures |= SERF_SSL_CERT_NOTYETVALID;
-                     break;
-             case X509_V_ERR_CERT_HAS_EXPIRED:
-@@ -741,7 +742,7 @@ validate_server_certificate(int cert_valid, X509_STORE
-     {
-         ctx->pending_err = SERF_ERROR_SSL_CERT_FAILED;
-     }
--        
-+
-     return cert_valid;
- }
- 
-@@ -832,7 +833,7 @@ static apr_status_t ssl_decrypt(void *baton, apr_size_
-                 necessary mean the connection is closed, let's close
-                 it here anyway.
-                 We can optimize this later. */
--                serf__log(SSL_VERBOSE, __FILE__, 
-+                serf__log(SSL_VERBOSE, __FILE__,
-                           "ssl_decrypt: SSL read error: server"
-                           " shut down connection!\n");
-                 status = APR_EOF;
-@@ -842,14 +843,14 @@ static apr_status_t ssl_decrypt(void *baton, apr_size_
-             }
-         } else {
-             *len = ssl_len;
--            serf__log(SSL_MSG_VERBOSE, __FILE__, 
-+            serf__log(SSL_MSG_VERBOSE, __FILE__,
-                       "---\n%.*s\n-(%d)-\n", *len, buf, *len);
-         }
-     }
-     else {
-         *len = 0;
-     }
--    serf__log(SSL_VERBOSE, __FILE__, 
-+    serf__log(SSL_VERBOSE, __FILE__,
-               "ssl_decrypt: %d %d %d\n", status, *len,
-               BIO_get_retry_flags(ctx->bio));
- 
-@@ -956,7 +957,7 @@ static apr_status_t ssl_encrypt(void *baton, apr_size_
- 
-                 ssl_len = SSL_write(ctx->ssl, vecs_data, interim_len);
- 
--                serf__log(SSL_VERBOSE, __FILE__, 
-+                serf__log(SSL_VERBOSE, __FILE__,
-                           "ssl_encrypt: SSL write: %d\n", ssl_len);
- 
-                 /* If we failed to write... */
-@@ -975,7 +976,7 @@ static apr_status_t ssl_encrypt(void *baton, apr_size_
- 
-                     ssl_err = SSL_get_error(ctx->ssl, ssl_len);
- 
--                    serf__log(SSL_VERBOSE, __FILE__, 
-+                    serf__log(SSL_VERBOSE, __FILE__,
-                               "ssl_encrypt: SSL write error: %d\n", ssl_err);
- 
-                     if (ssl_err == SSL_ERROR_SYSCALL) {
-@@ -997,7 +998,7 @@ static apr_status_t ssl_encrypt(void *baton, apr_size_
-                         }
-                     }
- 
--                    serf__log(SSL_VERBOSE, __FILE__, 
-+                    serf__log(SSL_VERBOSE, __FILE__,
-                               "ssl_encrypt: SSL write error: %d %d\n",
-                               status, *len);
-                 } else {
-@@ -1156,7 +1157,7 @@ static void init_ssl_libraries(void)
+@@ -1186,7 +1186,7 @@ static void init_ssl_libraries(void)
          }
  #endif
  
@@ -106,40 +9,3 @@
          OPENSSL_malloc_init();
  #else
          CRYPTO_malloc_init();
-@@ -1196,10 +1197,10 @@ static void init_ssl_libraries(void)
-            thread has completed */
-         while (val != INIT_DONE) {
-             apr_sleep(APR_USEC_PER_SEC / 1000);
--      
-+
-             val = apr_atomic_cas32(&have_init_ssl,
-                                    INIT_UNINITIALIZED,
--                                   INIT_UNINITIALIZED);            
-+                                   INIT_UNINITIALIZED);
-         }
-     }
- }
-@@ -1325,9 +1326,14 @@ static int ssl_need_client_cert(SSL *ssl, X509 **cert,
-                 return 0;
-             }
-             else {
-+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x30000000L
-                 printf("OpenSSL cert error: %d %d %d\n", ERR_GET_LIB(err),
-                        ERR_GET_FUNC(err),
-                        ERR_GET_REASON(err));
-+#else
-+                printf("OpenSSL cert error: %d %d\n", ERR_GET_LIB(err),
-+                       ERR_GET_REASON(err));
-+#endif
-                 PKCS12_free(p12);
-                 bio_meth_free(biom);
-             }
-@@ -1850,7 +1856,7 @@ const char *serf_ssl_cert_export(
- 
-     encoded_cert = apr_palloc(pool, apr_base64_encode_len(len));
-     apr_base64_encode(encoded_cert, binary_cert, len);
--    
-+
-     return encoded_cert;
- }
-