All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libuhttpd: add upstream patch to fix openssl3 build
@ 2023-07-21 15:16 Bernd Kuhls
  2023-07-21 20:59 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2023-07-21 15:16 UTC (permalink / raw)
  To: buildroot; +Cc: Jianhui Zhao

Removed unneeded patches and replace them with an upstream commit.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Sorry, saw the upstream fix too late.

 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 -------------------
 .../0002-compatibility-for-openssl-3.0.patch  | 31 +++++++++++++++
 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 -------------------
 3 files changed, 31 insertions(+), 76 deletions(-)
 delete mode 100644 package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
 create mode 100644 package/libuhttpd/0002-compatibility-for-openssl-3.0.patch
 delete mode 100644 package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch

diff --git a/package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch b/package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
deleted file mode 100644
index 01f66f42d9..0000000000
--- a/package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a7d47180777366b9ee374ee1fe0f1a155a02160b Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd@kuhls.net>
-Date: Thu, 20 Jul 2023 22:14:16 +0200
-Subject: [PATCH] CMakeLists.txt: remove -Werror from CFLAGS
-
-Build is broken with OpenSSL 3.0, see buildroot autobuilder logs:
-http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/build-end.log
-
-/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:
- In function 'ssl_last_error_string':
-/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:143:9:
- error: 'ERR_peek_error_line_data' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
-
-cc1: all warnings being treated as errors
-
-Upstream: https://github.com/zhaojh329/libuhttpd/pull/22
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6fb9651..64f506c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,7 +7,7 @@ include(CheckLibraryExists)
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")
- 
- add_definitions(-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64)
--add_compile_options(-O -Wall -Werror --std=gnu99)
-+add_compile_options(-O -Wall --std=gnu99)
- 
- option(BUILD_STATIC "Build static library" OFF)
- 
--- 
-2.39.2
-
diff --git a/package/libuhttpd/0002-compatibility-for-openssl-3.0.patch b/package/libuhttpd/0002-compatibility-for-openssl-3.0.patch
new file mode 100644
index 0000000000..484d472bad
--- /dev/null
+++ b/package/libuhttpd/0002-compatibility-for-openssl-3.0.patch
@@ -0,0 +1,31 @@
+From d93e6426ec1d8c019bd302e4599f3b91ba95fb3b Mon Sep 17 00:00:00 2001
+From: Jianhui Zhao <zhaojh329@gmail.com>
+Date: Fri, 29 Apr 2022 23:47:31 +0800
+Subject: [PATCH] compatibility for openssl >= 3.0
+
+Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
+
+Upstream: https://github.com/zhaojh329/ssl/commit/d93e6426ec1d8c019bd302e4599f3b91ba95fb3b
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ openssl.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/openssl.c b/openssl.c
+index 278bab5..2169db1 100644
+--- a/src/ssl/openssl.c
++++ b/src/ssl/openssl.c
+@@ -139,8 +139,11 @@ const char *ssl_last_error_string(char *buf, int len)
+ 
+     if (ssl_err_code == SSL_ERROR_SSL) {
+         int used;
+-
++#if OPENSSL_VERSION_MAJOR < 3
+         ssl_err_code = ERR_peek_error_line_data(&file, &line, &data, &flags);
++#else
++        ssl_err_code = ERR_peek_error_all(&file, &line, NULL, &data, &flags);
++#endif
+         ERR_error_string_n(ssl_err_code, buf, len);
+ 
+         used = strlen(buf);
diff --git a/package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch b/package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
deleted file mode 100644
index 8e370e0a80..0000000000
--- a/package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From b22667f1054ea85c4dc3bdca5b7c84aeb0a801bc Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd@kuhls.net>
-Date: Thu, 20 Jul 2023 22:22:05 +0200
-Subject: [PATCH] CMakeLists.txt: remove -Werror from CFLAGS
-
-Build is broken with OpenSSL 3.0, see buildroot autobuilder logs:
-http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/build-end.log
-
-/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:
- In function 'ssl_last_error_string':
-/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:143:9:
- error: 'ERR_peek_error_line_data' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
-
-cc1: all warnings being treated as errors
-
-Upstream: https://github.com/zhaojh329/ssl/pull/6
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 36488c7..98585b5 100644
---- a/src/ssl/CMakeLists.txt
-+++ b/src/ssl/CMakeLists.txt
-@@ -78,7 +78,7 @@ if(SSL_SUPPORT)
- 
-     add_library(xssl STATIC ${SSL_SRC})
-     target_compile_definitions(xssl PRIVATE ${SSL_DEFINE})
--    target_compile_options(xssl PRIVATE -O -Wall -Werror --std=gnu99 -fPIC)
-+    target_compile_options(xssl PRIVATE -O -Wall --std=gnu99 -fPIC)
-     target_include_directories(xssl PRIVATE ${SSL_INC})
-     target_link_libraries(xssl PRIVATE ${SSL_LIBS})
- 
--- 
-2.39.2
-
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libuhttpd: add upstream patch to fix openssl3 build
  2023-07-21 15:16 [Buildroot] [PATCH 1/1] package/libuhttpd: add upstream patch to fix openssl3 build Bernd Kuhls
@ 2023-07-21 20:59 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-21 20:59 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: Jianhui Zhao, buildroot

On Fri, 21 Jul 2023 17:16:57 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> Removed unneeded patches and replace them with an upstream commit.
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
> Sorry, saw the upstream fix too late.

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-07-21 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 15:16 [Buildroot] [PATCH 1/1] package/libuhttpd: add upstream patch to fix openssl3 build Bernd Kuhls
2023-07-21 20:59 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.