Browse Source

libwebsockets: Update to 3.0.0

Removed upstreamed patch.

Also added a patch to fix Travis.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Tested-by: Karl Palsson <karlp@etactica.com>
lilik-openwrt-22.03
Rosen Penev 7 years ago
committed by Karl Palsson
parent
commit
4b9ec8dbae
3 changed files with 19 additions and 82 deletions
  1. +3
    -4
      libs/libwebsockets/Makefile
  2. +0
    -78
      libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch
  3. +16
    -0
      libs/libwebsockets/patches/020-fix-travis.patch

+ 3
- 4
libs/libwebsockets/Makefile View File

@ -8,14 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
PKG_VERSION:=2.4.1
PKG_RELEASE:=2
PKG_VERSION:=3.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/warmcat/libwebsockets/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=29414be4f79f6abc0e6aadccd09a4da0f0c431e3b5691f496acd081ae6a8240c
PKG_HASH:=a6b611c212c52f161f70556339fdaa199b7e9b6a167c4638e086d19db75d6290
PKG_SOURCE_VERSION:=v$(PKG_VERSION)


+ 0
- 78
libs/libwebsockets/patches/001-CMakeLists-build-reproducible-by-default.patch View File

@ -1,78 +0,0 @@
From d7b6c04aaf416344332e73f49fe457013e3ccf36 Mon Sep 17 00:00:00 2001
From: Alexander Couzens <lynxis@fe80.eu>
Date: Sun, 10 Dec 2017 00:54:06 +0100
Subject: [PATCH] CMakeLists: build reproducible by default
Merged-upstream: yes
Using the build user and build hostname as part of the git hash breaks
reproducible builds. Make this part optional, but build reproducible by
default.
---
CMakeLists.txt | 47 +++++++++++++++++++++++++++--------------------
1 file changed, 27 insertions(+), 20 deletions(-)
Index: libwebsockets-2.4.0/CMakeLists.txt
===================================================================
--- libwebsockets-2.4.0.orig/CMakeLists.txt
+++ libwebsockets-2.4.0/CMakeLists.txt
@@ -39,26 +39,32 @@ message(STATUS "CMAKE_TOOLCHAIN_FILE='${
find_package(Git)
if(GIT_EXECUTABLE)
execute_process(
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMAND "${GIT_EXECUTABLE}" describe
- OUTPUT_VARIABLE GIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- execute_process(
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMAND "whoami"
- OUTPUT_VARIABLE GIT_USER
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- execute_process(
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMAND "hostname"
- OUTPUT_VARIABLE GIT_HOST
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER})
- set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})
- message("Git commit hash: ${LWS_BUILD_HASH}")
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMAND "${GIT_EXECUTABLE}" describe
+ OUTPUT_VARIABLE GIT_HASH
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ set(LWS_BUILD_HASH ${GIT_HASH})
+
+ # appen the build user and hostname
+ if(NOT LWS_REPRODUCIBLE)
+ execute_process(
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMAND "whoami"
+ OUTPUT_VARIABLE GIT_USER
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ execute_process(
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMAND "hostname"
+ OUTPUT_VARIABLE GIT_HOST
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER})
+ set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})
+ endif()
+
+ message("Git commit hash: ${LWS_BUILD_HASH}")
endif()
set(LWS_WITH_BUNDLED_ZLIB_DEFAULT OFF)
@@ -121,6 +127,7 @@ option(LWS_AVOID_SIGPIPE_IGN "Android 7+
option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF)
option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF)
option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF)
+option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON)
macro(confirm_command CMD NOCMD)
find_program (HAVE_CMD_${CMD} ${CMD} )

+ 16
- 0
libs/libwebsockets/patches/020-fix-travis.patch View File

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b260969..ece281d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1050,9 +1050,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID
endif()
if (UNIX AND NOT LWS_WITH_ESP32)
- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
+ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized ${VISIBILITY_FLAG} -Wundef ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
else()
- set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized -Werror ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
+ set(CMAKE_C_FLAGS "-Wall -Wsign-compare -Wignored-qualifiers -Wtype-limits -Wuninitialized ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
endif()
endif ()

Loading…
Cancel
Save