Compare commits
11 Commits
dc34e002a2
...
d9d81f7f07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9d81f7f07 | ||
|
|
43e1181f00 | ||
|
|
a441b925e2 | ||
|
|
aac7b9a40c | ||
|
|
9debbf5502 | ||
|
|
cabaeb1b4b | ||
|
|
c7408d167a | ||
|
|
97ffbe6e29 | ||
|
|
b5b327c5ed | ||
|
|
c1a4fd7cf4 | ||
|
|
adf7c7a245 |
@ -1,13 +1,25 @@
|
|||||||
|
From 99280a207fb1af5f885662542638690e9f14fe37 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
Date: Mon, 29 Nov 2021 11:26:43 +0800
|
||||||
|
Subject: [PATCH 1/2] add secure compile option in Makefile
|
||||||
|
|
||||||
|
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index f3d3433..2b9ffec 100644
|
index 6e428af8..2eb897db 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -353,6 +353,7 @@ set(LWS_LIBRARY_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
|
@@ -451,6 +451,7 @@ if (NOT CMAKE_MODULE_PATH)
|
||||||
|
endif()
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
|
||||||
|
|
||||||
+set(CMAKE_C_FLAGS "-Wl,-z,now ${CMAKE_C_FLAGS}")
|
+set(CMAKE_C_FLAGS "-Wl,-z,now -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -Wall -rdynamic ${CMAKE_C_FLAGS}")
|
||||||
|
|
||||||
|
if (CMAKE_TOOLCHAIN_FILE)
|
||||||
message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")
|
message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
From 6fa880a9d4f61ecfc6ccacb408e8c96e0c11b813 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Li Feng <lifeng2221dd1@zoho.com.cn>
|
|
||||||
Date: Fri, 19 Feb 2021 11:24:16 +0800
|
|
||||||
Subject: [PATCH] cmake: remove unused headfile directory
|
|
||||||
|
|
||||||
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 2b9ffec..822a041 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -415,7 +415,7 @@ if (LWS_WITH_MBEDTLS)
|
|
||||||
include_directories(lib/tls/mbedtls/wrapper/include)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
-include_directories(include plugins lib/core lib/core-net lib/event-libs include/abstract lib/tls lib/roles lib/event-libs/libuv lib/event-libs/poll lib/event-libs/libevent lib/event-libs/glib lib/event-libs/libev lib/jose/jwe lib/jose/jws lib/jose lib/misc lib/roles/http lib/roles/http/compression lib/roles/h1 lib/roles/h2 lib/roles/ws lib/roles/cgi lib/roles/dbus lib/roles/raw-proxy lib/abstract lib/system/async-dns lib/roles/mqtt)
|
|
||||||
+include_directories(include plugins lib/core lib/core-net lib/event-libs lib/tls lib/roles lib/event-libs/libuv lib/event-libs/poll lib/event-libs/libevent lib/event-libs/glib lib/event-libs/libev lib/jose/jwe lib/jose/jws lib/jose lib/misc lib/roles/http lib/roles/http/compression lib/roles/h1 lib/roles/h2 lib/roles/ws lib/roles/cgi lib/roles/dbus lib/roles/raw-proxy lib/abstract lib/system/async-dns lib/roles/mqtt)
|
|
||||||
|
|
||||||
if (LWS_WITH_SECURE_STREAMS)
|
|
||||||
set(LWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM 1)
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
26
0002-solve-the-BEP-problem.patch
Normal file
26
0002-solve-the-BEP-problem.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 47b8fcd650e77e701614cbb5def910476f33bbd6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
Date: Mon, 29 Nov 2021 11:32:52 +0800
|
||||||
|
Subject: [PATCH 2/2] solve the BEP problem
|
||||||
|
|
||||||
|
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 2eb897db..5d6b254a 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -363,7 +363,7 @@ endmacro()
|
||||||
|
# Try to find the current Git hash
|
||||||
|
#
|
||||||
|
|
||||||
|
-find_package(Git)
|
||||||
|
+# find_package(Git)
|
||||||
|
if(GIT_EXECUTABLE)
|
||||||
|
execute_process(
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
From 8fe3775c701ddf68fdbc7e3cc8d403bc350a8b1b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Li Feng <lifeng2221dd1@zoho.com.cn>
|
|
||||||
Date: Tue, 16 Mar 2021 09:30:01 +0800
|
|
||||||
Subject: [PATCH] add fs secure compile options
|
|
||||||
|
|
||||||
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 822a041..afcc3cc 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -353,7 +353,7 @@ set(LWS_LIBRARY_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
|
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
|
|
||||||
|
|
||||||
-set(CMAKE_C_FLAGS "-Wl,-z,now ${CMAKE_C_FLAGS}")
|
|
||||||
+set(CMAKE_C_FLAGS "-Wl,-z,now -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -Wall -rdynamic ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'")
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
From 8bae551a6dad97f1f3b5688d917b90011cd272e1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wayneonway <121931005@qq.com>
|
||||||
|
Date: Mon, 21 Feb 2022 15:16:35 +0800
|
||||||
|
Subject: [PATCH] route: extend lws_route_uidx_t from 1 byte to 2 bytes
|
||||||
|
|
||||||
|
---
|
||||||
|
include/libwebsockets/lws-network-helper.h | 3 ++-
|
||||||
|
lib/core-net/route.c | 2 +-
|
||||||
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/libwebsockets/lws-network-helper.h b/include/libwebsockets/lws-network-helper.h
|
||||||
|
index 4ad16bef..72c9f932 100644
|
||||||
|
--- a/include/libwebsockets/lws-network-helper.h
|
||||||
|
+++ b/include/libwebsockets/lws-network-helper.h
|
||||||
|
@@ -33,7 +33,8 @@
|
||||||
|
#include <lwip/sockets.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-typedef uint8_t lws_route_uidx_t;
|
||||||
|
+/* cope with large amounts of route information */
|
||||||
|
+typedef uint16_t lws_route_uidx_t;
|
||||||
|
|
||||||
|
typedef struct lws_dns_score {
|
||||||
|
uint8_t precedence;
|
||||||
|
diff --git a/lib/core-net/route.c b/lib/core-net/route.c
|
||||||
|
index 91744372..0f3746fe 100644
|
||||||
|
--- a/lib/core-net/route.c
|
||||||
|
+++ b/lib/core-net/route.c
|
||||||
|
@@ -96,7 +96,7 @@ _lws_routing_table_dump(struct lws_context *cx)
|
||||||
|
lws_route_uidx_t
|
||||||
|
_lws_route_get_uidx(struct lws_context *cx)
|
||||||
|
{
|
||||||
|
- uint8_t ou;
|
||||||
|
+ lws_route_uidx_t ou;
|
||||||
|
|
||||||
|
if (!cx->route_uidx)
|
||||||
|
cx->route_uidx++;
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
28
0004-client-hs-fix-segmentation-fault.patch
Normal file
28
0004-client-hs-fix-segmentation-fault.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From fdde9119f72f315a453d30c3f7448cbccc69fa8a Mon Sep 17 00:00:00 2001
|
||||||
|
From: zzblydia <13098426+zzblydia@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Jun 2024 15:11:17 +0800
|
||||||
|
Subject: [PATCH] client hs: fix segmentation fault
|
||||||
|
|
||||||
|
reason:sync with upstream
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/warmcat/libwebsockets/pull/3171
|
||||||
|
---
|
||||||
|
lib/roles/http/client/client-http.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c
|
||||||
|
index 57dda701..05532f29 100644
|
||||||
|
--- a/lib/roles/http/client/client-http.c
|
||||||
|
+++ b/lib/roles/http/client/client-http.c
|
||||||
|
@@ -1641,6 +1641,8 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
|
||||||
|
// if (!wsi->client_pipeline)
|
||||||
|
// conn1 = "close, ";
|
||||||
|
p = lws_generate_client_ws_handshake(wsi, p, conn1);
|
||||||
|
+ if (!p)
|
||||||
|
+ return NULL;
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
BIN
libwebsockets-4.3.0.tar.gz
Normal file
BIN
libwebsockets-4.3.0.tar.gz
Normal file
Binary file not shown.
@ -1,16 +1,17 @@
|
|||||||
Name: libwebsockets
|
Name: libwebsockets
|
||||||
Version: 4.0.20
|
Version: 4.3.0
|
||||||
Release: 5
|
Release: 5
|
||||||
Summary: A lightweight C library for Websockets
|
Summary: A lightweight C library for Websockets
|
||||||
License: LGPLv2 and Public Domain and BSD and MIT and zlib
|
License: LGPLv2 and Public Domain and BSD and MIT and zlib
|
||||||
URL: https://libwebsockets.org
|
URL: https://libwebsockets.org
|
||||||
Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch9000: 0001-add-secure-compile-option-in-Makefile.patch
|
Patch9001: 0001-add-secure-compile-option-in-Makefile.patch
|
||||||
Patch9001: 0002-cmake-remove-unused-headfile-directory.patch
|
Patch9002: 0002-solve-the-BEP-problem.patch
|
||||||
Patch9002: 0003-add-fs-secure-compile-options.patch
|
Patch9003: 0003-route-extend-lws_route_uidx_t-from-1-byte-to-2-bytes.patch
|
||||||
|
Patch9004: 0004-client-hs-fix-segmentation-fault.patch
|
||||||
|
|
||||||
BuildRequires: cmake openssl-devel zlib-devel libev-devel git
|
BuildRequires: cmake openssl-devel zlib-devel libev-devel gcc gcc-c++
|
||||||
|
|
||||||
Provides: bundled(sha1-hollerbach) bundled(base64-decode) bundled(ssl-http2)
|
Provides: bundled(sha1-hollerbach) bundled(base64-decode) bundled(ssl-http2)
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ This package contains the header files needed for developing
|
|||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1 -S git
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%build
|
%build
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
@ -64,6 +65,7 @@ cd build
|
|||||||
-D LWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
|
-D LWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
|
||||||
-D LWS_WITHOUT_TEST_PING=ON \
|
-D LWS_WITHOUT_TEST_PING=ON \
|
||||||
-D LWS_WITHOUT_TEST_CLIENT=ON \
|
-D LWS_WITHOUT_TEST_CLIENT=ON \
|
||||||
|
-D LWS_WITHOUT_EXTENSIONS=OFF \
|
||||||
..
|
..
|
||||||
|
|
||||||
%make_build
|
%make_build
|
||||||
@ -98,25 +100,70 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';'
|
|||||||
%doc changelog README.md READMEs/
|
%doc changelog README.md READMEs/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue 16 Mar 2021 lifeng <lifeng68@huawei.com> - 4.0.20-5
|
* Tue Aug 27 2024 liuxu <liuxu156@huawei.com> - 4.3.0-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:client hs: fix segmentation fault
|
||||||
|
|
||||||
|
* Thu May 05 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:extend lws_route_uidx_t from 1 byte to 2 bytes
|
||||||
|
|
||||||
|
* Tue May 03 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-3
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix changelog error
|
||||||
|
|
||||||
|
* Tue Nov 30 2021 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:set LWS_WITHOUT_EXTENSIONS option OFF
|
||||||
|
|
||||||
|
* Mon Nov 29 2021 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-1
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add build require gcc and gcc-c++
|
||||||
|
|
||||||
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 4.0.20-8
|
||||||
|
- DESC:delete -S git from autosetup, and delete BuildRequires git
|
||||||
|
|
||||||
|
* Mon Jun 28 2021 lifeng <lifeng68@huawei.com> - 4.0.20-7
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add build require gcc and gcc-c++
|
||||||
|
|
||||||
|
* Mon May 10 2021 wujing <wujing50@huawei.com> - 4.0.20-6
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:solve the BEP problem
|
||||||
|
|
||||||
|
* Tue Mar 16 2021 lifeng <lifeng68@huawei.com> - 4.0.20-5
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC:add secure compile options
|
- DESC:add secure compile options
|
||||||
|
|
||||||
* Fri 19 Feb 2021 lifeng <lifeng68@huawei.com> - 4.0.20-4
|
* Fri Feb 19 2021 lifeng <lifeng68@huawei.com> - 4.0.20-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC:remove unused head file directory
|
- DESC:remove unused head file directory
|
||||||
|
|
||||||
* Fri 20 Nov 2020 jikui <jikui2@huawei.com> - 4.0.20-3
|
* Fri Nov 20 2020 jikui <jikui2@huawei.com> - 4.0.20-3
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
- DESC:modify spec file
|
- DESC:modify spec file
|
||||||
|
|
||||||
* Tue 4 Aug 2020 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.0.20-2
|
* Tue Aug 4 2020 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.0.20-2
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
|
|||||||
4
libwebsockets.yaml
Normal file
4
libwebsockets.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: git
|
||||||
|
src_repo: https://libwebsockets.org/repo/libwebsockets
|
||||||
|
tag_prefix: ^v
|
||||||
|
seperator: .
|
||||||
Loading…
x
Reference in New Issue
Block a user