$ git show --format=fuller --patch-with-stat --summary fd8438f6d08a14d1fce7eaef4ab35b424be949a1
commit fd8438f6d08a14d1fce7eaef4ab35b424be949a1
Author: Bernhard Rosenkränzer <bero@lindev.ch>
AuthorDate: Wed Sep 28 00:35:20 2022 +0200
Commit: Bernhard Rosenkränzer <bero@lindev.ch>
CommitDate: Wed Sep 28 00:35:20 2022 +0200
7.85.0, adjust soname on libcurl-gnutls and libcurl-mbedtls
---
.abf.yml | 2 +-
curl.spec | 15 ++++---
libcurl-ocloexec.patch | 114 ++++++++++++++++++++++---------------------------
3 files changed, 61 insertions(+), 70 deletions(-)
diff --git a/.abf.yml b/.abf.yml
index f9525f1..9e099d0 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- curl-7.84.0.tar.xz: bd237ee484c40c295e63af3305bc70f932083b3c
+ curl-7.85.0.tar.xz: 5c1940ff51f6b2137b91ffe672b70d4491a23ea6
diff --git a/curl.spec b/curl.spec
index 98e3d76..ff8878b 100644
--- a/curl.spec
+++ b/curl.spec
@@ -9,9 +9,9 @@
%endif
%define major 4
-%define libname %mklibname %{name} %{major}
-%define gnutlsname %mklibname %{name}-gnutls %{major}
-%define mbedtlsname %mklibname %{name}-mbedtls %{major}
+%define libname %mklibname %{name}
+%define gnutlsname %mklibname %{name}-gnutls
+%define mbedtlsname %mklibname %{name}-mbedtls
%define devname %mklibname %{name} -d
%define gnutlsdev %mklibname %{name}-gnutls -d
%define mbedtlsdev %mklibname %{name}-mbedtls -d
@@ -23,8 +23,8 @@
Summary: Gets a file from a FTP, GOPHER or HTTP server
Name: curl
-Version: 7.84.0
-Release: 3
+Version: 7.85.0
+Release: 1
License: BSD-like
Group: Networking/Other
Url: http://curl.haxx.se
@@ -40,6 +40,7 @@ Patch4: %{name}-7.26.0-multilib.patch
Patch5: curl-7.66.0-CURL_GNUTLS_3.patch
BuildRequires: groff-base
BuildRequires: stunnel
+BuildRequires: patchelf
BuildRequires: pkgconfig(krb5-gssapi)
# (tpg) we prefer OpenSSL over GnuTLS or nettle
BuildRequires: pkgconfig(openssl)
@@ -79,6 +80,7 @@ This version is compiled with SSL (https) support.
Summary: A library of functions for file transfer
Group: Networking/Other
Requires: rootcerts >= 1:20070713.00
+%rename %{mklibname %{name} %{major}}
%description -n %{libname}
libcurl is a library of functions for sending and receiving files through
@@ -91,6 +93,7 @@ use libcurl.
Summary: A library of functions for file transfer
Group: Networking/Other
Requires: rootcerts >= 1:20070713.00
+%rename %{mklibname %{name}-gnutls %{major}}
%description -n %{gnutlsname}
libcurl is a library of functions for sending and receiving files through
@@ -103,6 +106,7 @@ primarily for binary compatibility with some third party applications.
Summary: A library of functions for file transfer
Group: Networking/Other
Requires: rootcerts >= 1:20070713.00
+%rename %{mklibname %{name}-mbedtls %{major}}
%description -n %{mbedtlsname}
libcurl is a library of functions for sending and receiving files through
@@ -325,6 +329,7 @@ for ssl in mbedtls gnutls openssl; do
%make_install -C build-$ssl
if [ "$ssl" != "openssl" ]; then
pushd %{buildroot}%{_libdir}
+ patchelf --set-soname libcurl-$ssl.so.%{major} libcurl.so.%{major}
for i in libcurl.so* libcurl.a; do
mv $i ${i/libcurl/libcurl-$ssl}
done
diff --git a/libcurl-ocloexec.patch b/libcurl-ocloexec.patch
index c3b9350..fac2812 100644
--- a/libcurl-ocloexec.patch
+++ b/libcurl-ocloexec.patch
@@ -1,26 +1,42 @@
-Open library file descriptors with O_CLOEXEC
-This patch is non-portable, it needs linux 2.6.23 and glibc 2.7
-or later, different combinations (old linux, new glibc and vice-versa)
-will result in a crash.
-
-To make it portable you have to test O_CLOEXEC support at *runtime*
-compile time is not enough.
-
-
-Index: curl-7.79.0/lib/file.c
-===================================================================
---- curl-7.79.0.orig/lib/file.c
-+++ curl-7.79.0/lib/file.c
-@@ -194,7 +194,7 @@ static CURLcode file_connect(struct Curl
- return CURLE_URL_MALFORMAT;
+diff -up curl-7.85.0/configure.ac.1~ curl-7.85.0/configure.ac
+--- curl-7.85.0/configure.ac.1~ 2022-08-30 18:19:21.000000000 +0200
++++ curl-7.85.0/configure.ac 2022-09-28 00:16:02.171182410 +0200
+@@ -335,6 +335,8 @@ AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-m
+ # Silence warning: ar: 'u' modifier ignored since 'D' is the default
+ AC_SUBST(AR_FLAGS, [cr])
+
++AC_USE_SYSTEM_EXTENSIONS
++
+ dnl This defines _ALL_SOURCE for AIX
+ CURL_CHECK_AIX_ALL_SOURCE
+
+diff -up curl-7.85.0/lib/connect.c.1~ curl-7.85.0/lib/connect.c
+--- curl-7.85.0/lib/connect.c.1~ 2022-08-30 18:19:21.000000000 +0200
++++ curl-7.85.0/lib/connect.c 2022-09-28 00:16:02.170182405 +0200
+@@ -1651,7 +1651,9 @@ CURLcode Curl_socket(struct Curl_easy *d
}
+ else
+ /* opensocket callback not set, so simply create the socket now */
+- *sockfd = socket(addr->family, addr->socktype, addr->protocol);
++ *sockfd = socket(addr->family,
++ addr->socktype|SOCK_CLOEXEC,
++ addr->protocol);
+ if(*sockfd == CURL_SOCKET_BAD)
+ /* no socket, no connection */
+diff -up curl-7.85.0/lib/file.c.1~ curl-7.85.0/lib/file.c
+--- curl-7.85.0/lib/file.c.1~ 2022-08-30 18:19:21.000000000 +0200
++++ curl-7.85.0/lib/file.c 2022-09-28 00:18:05.118792686 +0200
+@@ -222,7 +222,7 @@ static CURLcode file_connect(struct Curl
+ }
+ }
+ #else
- fd = open_readonly(real_path, O_RDONLY);
+ fd = open_readonly(real_path, O_RDONLY|O_CLOEXEC);
file->path = real_path;
+ #endif
#endif
- file->freepath = real_path; /* free this when done */
-@@ -278,7 +278,7 @@ static CURLcode file_upload(struct Curl_
+@@ -307,7 +307,7 @@ static CURLcode file_upload(struct Curl_
else
mode = MODE_DEFAULT|O_TRUNC;
@@ -29,52 +45,10 @@ Index: curl-7.79.0/lib/file.c
if(fd < 0) {
failf(data, "Can't open %s for writing", file->path);
return CURLE_WRITE_ERROR;
-Index: curl-7.79.0/lib/if2ip.c
-===================================================================
---- curl-7.79.0.orig/lib/if2ip.c
-+++ curl-7.79.0/lib/if2ip.c
-@@ -202,7 +202,7 @@ if2ip_result_t Curl_if2ip(int af, unsign
- if(len >= sizeof(req.ifr_name))
- return IF2IP_NOT_FOUND;
-
-- dummy = socket(AF_INET, SOCK_STREAM, 0);
-+ dummy = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0);
- if(CURL_SOCKET_BAD == dummy)
- return IF2IP_NOT_FOUND;
-
-Index: curl-7.79.0/lib/connect.c
-===================================================================
---- curl-7.79.0.orig/lib/connect.c
-+++ curl-7.79.0/lib/connect.c
-@@ -1598,7 +1598,9 @@ CURLcode Curl_socket(struct Curl_easy *d
- }
- else
- /* opensocket callback not set, so simply create the socket now */
-- *sockfd = socket(addr->family, addr->socktype, addr->protocol);
-+ *sockfd = socket(addr->family,
-+ addr->socktype|SOCK_CLOEXEC,
-+ addr->protocol);
-
- if(*sockfd == CURL_SOCKET_BAD)
- /* no socket, no connection */
-Index: curl-7.79.0/configure.ac
-===================================================================
---- curl-7.79.0.orig/configure.ac
-+++ curl-7.79.0/configure.ac
-@@ -297,6 +297,8 @@ AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-m
- # Silence warning: ar: 'u' modifier ignored since 'D' is the default
- AC_SUBST(AR_FLAGS, [cr])
-
-+AC_USE_SYSTEM_EXTENSIONS
-+
- dnl This defines _ALL_SOURCE for AIX
- CURL_CHECK_AIX_ALL_SOURCE
-
-Index: curl-7.79.0/lib/hostip.c
-===================================================================
---- curl-7.79.0.orig/lib/hostip.c
-+++ curl-7.79.0/lib/hostip.c
-@@ -49,7 +49,7 @@
+diff -up curl-7.85.0/lib/hostip.c.1~ curl-7.85.0/lib/hostip.c
+--- curl-7.85.0/lib/hostip.c.1~ 2022-08-30 18:19:21.000000000 +0200
++++ curl-7.85.0/lib/hostip.c 2022-09-28 00:16:02.171182410 +0200
+@@ -51,7 +51,7 @@
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
@@ -83,7 +57,7 @@ Index: curl-7.79.0/lib/hostip.c
#include "urldata.h"
#include "sendf.h"
#include "hostip.h"
-@@ -549,7 +549,7 @@ bool Curl_ipv6works(struct Curl_easy *da
+@@ -551,7 +551,7 @@ bool Curl_ipv6works(struct Curl_easy *da
else {
int ipv6_works = -1;
/* probe to see if we have a working IPv6 stack */
@@ -92,3 +66,15 @@ Index: curl-7.79.0/lib/hostip.c
if(s == CURL_SOCKET_BAD)
/* an IPv6 address was requested but we can't get/use one */
ipv6_works = 0;
+diff -up curl-7.85.0/lib/if2ip.c.1~ curl-7.85.0/lib/if2ip.c
+--- curl-7.85.0/lib/if2ip.c.1~ 2022-08-13 18:50:57.000000000 +0200
++++ curl-7.85.0/lib/if2ip.c 2022-09-28 00:16:02.170182405 +0200
+@@ -206,7 +206,7 @@ if2ip_result_t Curl_if2ip(int af,
+ if(len >= sizeof(req.ifr_name))
+ return IF2IP_NOT_FOUND;
+
+- dummy = socket(AF_INET, SOCK_STREAM, 0);
++ dummy = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0);
+ if(CURL_SOCKET_BAD == dummy)
+ return IF2IP_NOT_FOUND;
+