diff --git a/0001-add-secure-compile-option-in-Makefile.patch b/0001-add-secure-compile-option-in-Makefile.patch index 5c93313..aa1d9dc 100644 --- a/0001-add-secure-compile-option-in-Makefile.patch +++ b/0001-add-secure-compile-option-in-Makefile.patch @@ -1,13 +1,25 @@ +From 99280a207fb1af5f885662542638690e9f14fe37 Mon Sep 17 00:00:00 2001 +From: zhangxiaoyu +Date: Mon, 29 Nov 2021 11:26:43 +0800 +Subject: [PATCH 1/2] add secure compile option in Makefile + +Signed-off-by: zhangxiaoyu +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3d3433..2b9ffec 100644 +index 6e428af8..2eb897db 100644 --- a/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_C_FLAGS "-Wl,-z,now ${CMAKE_C_FLAGS}") - - message(STATUS "CMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE}'") ++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}'") +-- +2.25.1 diff --git a/0002-cmake-remove-unused-headfile-directory.patch b/0002-cmake-remove-unused-headfile-directory.patch deleted file mode 100644 index a9f8027..0000000 --- a/0002-cmake-remove-unused-headfile-directory.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 6fa880a9d4f61ecfc6ccacb408e8c96e0c11b813 Mon Sep 17 00:00:00 2001 -From: Li Feng -Date: Fri, 19 Feb 2021 11:24:16 +0800 -Subject: [PATCH] cmake: remove unused headfile directory - -Signed-off-by: Li Feng ---- - 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 - diff --git a/0002-solve-the-BEP-problem.patch b/0002-solve-the-BEP-problem.patch new file mode 100644 index 0000000..a9e62c5 --- /dev/null +++ b/0002-solve-the-BEP-problem.patch @@ -0,0 +1,26 @@ +From 47b8fcd650e77e701614cbb5def910476f33bbd6 Mon Sep 17 00:00:00 2001 +From: zhangxiaoyu +Date: Mon, 29 Nov 2021 11:32:52 +0800 +Subject: [PATCH 2/2] solve the BEP problem + +Signed-off-by: zhangxiaoyu +--- + 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 + diff --git a/0003-add-fs-secure-compile-options.patch b/0003-add-fs-secure-compile-options.patch deleted file mode 100644 index 35ae8e6..0000000 --- a/0003-add-fs-secure-compile-options.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8fe3775c701ddf68fdbc7e3cc8d403bc350a8b1b Mon Sep 17 00:00:00 2001 -From: Li Feng -Date: Tue, 16 Mar 2021 09:30:01 +0800 -Subject: [PATCH] add fs secure compile options - -Signed-off-by: Li Feng ---- - 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 - diff --git a/0004-solve-the-BEP-problem.patch b/0004-solve-the-BEP-problem.patch deleted file mode 100644 index d90c60c..0000000 --- a/0004-solve-the-BEP-problem.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ab91310fe04a6c88a0e20d21888df01d438fbc44 Mon Sep 17 00:00:00 2001 -From: wujing -Date: Mon, 10 May 2021 15:09:37 +0800 -Subject: [PATCH] solve the BEP problem - -Signed-off-by: wujing ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3d3433..7efde2e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -362,7 +362,7 @@ if(WIN32) - endif() - - # 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.31.1 - diff --git a/libwebsockets-4.0.20.tar.gz b/libwebsockets-4.3.0.tar.gz similarity index 61% rename from libwebsockets-4.0.20.tar.gz rename to libwebsockets-4.3.0.tar.gz index df256e2..9225256 100644 Binary files a/libwebsockets-4.0.20.tar.gz and b/libwebsockets-4.3.0.tar.gz differ diff --git a/libwebsockets.spec b/libwebsockets.spec index 612a799..c2b81b1 100644 --- a/libwebsockets.spec +++ b/libwebsockets.spec @@ -1,15 +1,13 @@ Name: libwebsockets -Version: 4.0.20 -Release: 8 +Version: 4.3.0 +Release: 2 Summary: A lightweight C library for Websockets License: LGPLv2 and Public Domain and BSD and MIT and zlib URL: https://libwebsockets.org 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: 0002-cmake-remove-unused-headfile-directory.patch -Patch9002: 0003-add-fs-secure-compile-options.patch -Patch9003: 0004-solve-the-BEP-problem.patch +Patch9001: 0001-add-secure-compile-option-in-Makefile.patch +Patch9002: 0002-solve-the-BEP-problem.patch BuildRequires: cmake openssl-devel zlib-devel libev-devel gcc gcc-c++ @@ -65,6 +63,7 @@ cd build -D LWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \ -D LWS_WITHOUT_TEST_PING=ON \ -D LWS_WITHOUT_TEST_CLIENT=ON \ + -D LWS_WITHOUT_EXTENSIONS=OFF \ .. %make_build @@ -99,6 +98,18 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';' %doc changelog README.md READMEs/ %changelog +* Tue 30 Nov 2021 zhangxiaoyu - 4.3.0-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:set LWS_WITHOUT_EXTENSIONS option OFF + +* Mon 29 Nov 2021 zhangxiaoyu - 4.3.0-1 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add build require gcc and gcc-c++ + * Fri Jul 30 2021 chenyanpanHW - 4.0.20-8 - DESC: delete -S git from %autosetup, and delete BuildRequires git