lighttpd: include mod_h2 in base package
The next version of lighttpd will move HTTP/2 support from the lighttpd base executable into a separate module: mod_h2 Include patch to do so now, and update packaging to handle it. HTTP/2 support is enabled by default since lighttpd 1.4.59, but if HTTP/2 support is explicitly disabled in the configuration, then mod_h2 will not be loaded, thereby reducing lighttpd memory use. Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
a171b6a28c
commit
f4152fccad
2 changed files with 90 additions and 2 deletions
|
@ -177,7 +177,7 @@ MESON_ARGS += \
|
||||||
-Dwith_zlib=$(if $(CONFIG_PACKAGE_lighttpd-mod-deflate),enabled,disabled) \
|
-Dwith_zlib=$(if $(CONFIG_PACKAGE_lighttpd-mod-deflate),enabled,disabled) \
|
||||||
-Dwith_zstd=disabled
|
-Dwith_zstd=disabled
|
||||||
|
|
||||||
BASE_MODULES:=dirlisting
|
BASE_MODULES:=dirlisting h2
|
||||||
|
|
||||||
define Package/lighttpd/conffiles
|
define Package/lighttpd/conffiles
|
||||||
/etc/lighttpd/lighttpd.conf
|
/etc/lighttpd/lighttpd.conf
|
||||||
|
@ -307,8 +307,9 @@ server.modules += ( \"mod_$(1)\" )" $$(1)/etc/lighttpd/conf.d/$(4)-$(1).conf ; \
|
||||||
$$(eval $$(call BuildPackage,lighttpd-mod-$(1)))
|
$$(eval $$(call BuildPackage,lighttpd-mod-$(1)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# included in BASE_MODULES:=dirlisting
|
# included in BASE_MODULES:=dirlisting h2
|
||||||
#$(eval $(call BuildPlugin,dirlisting,dirlisting,,30))
|
#$(eval $(call BuildPlugin,dirlisting,dirlisting,,30))
|
||||||
|
#$(eval $(call BuildPlugin,h2,HTTP/2,,30))
|
||||||
|
|
||||||
# included in base lighttpd executable;
|
# included in base lighttpd executable;
|
||||||
# no longer loaded as separate dynamic modules
|
# no longer loaded as separate dynamic modules
|
||||||
|
|
87
net/lighttpd/patches/030-mod_h2-HTTP-2-separate-mod.patch
Normal file
87
net/lighttpd/patches/030-mod_h2-HTTP-2-separate-mod.patch
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
From 2892a7bf3f8ce92f41134fab25fbc2057f4a36bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Glenn Strauss <gstrauss@gluelogic.com>
|
||||||
|
Date: Wed, 10 May 2023 19:06:42 -0400
|
||||||
|
Subject: [PATCH] [mod_h2] HTTP/2 separate module; no longer builtin
|
||||||
|
|
||||||
|
---
|
||||||
|
src/CMakeLists.txt | 3 ---
|
||||||
|
src/Makefile.am | 9 +++------
|
||||||
|
src/SConscript | 4 +---
|
||||||
|
src/meson.build | 3 ---
|
||||||
|
4 files changed, 4 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -922,10 +922,7 @@ set(SERVER_SRC
|
||||||
|
response.c
|
||||||
|
connections.c
|
||||||
|
h1.c
|
||||||
|
- h2.c
|
||||||
|
sock_addr_cache.c
|
||||||
|
- ls-hpack/lshpack.c
|
||||||
|
- algo_xxhash.c
|
||||||
|
fdevent_impl.c
|
||||||
|
http_range.c
|
||||||
|
network.c
|
||||||
|
--- a/src/Makefile.am
|
||||||
|
+++ b/src/Makefile.am
|
||||||
|
@@ -70,12 +70,10 @@ common_src=base64.c buffer.c burl.c log.
|
||||||
|
|
||||||
|
common_src += fdevent_win32.c fs_win32.c
|
||||||
|
|
||||||
|
-src = server.c response.c connections.c h1.c h2.c \
|
||||||
|
+src = server.c response.c connections.c h1.c \
|
||||||
|
sock_addr_cache.c \
|
||||||
|
network.c \
|
||||||
|
network_write.c \
|
||||||
|
- ls-hpack/lshpack.c \
|
||||||
|
- algo_xxhash.c \
|
||||||
|
fdevent_impl.c \
|
||||||
|
http_range.c \
|
||||||
|
data_config.c \
|
||||||
|
@@ -428,6 +426,8 @@ lighttpd_LDADD = \
|
||||||
|
$(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)
|
||||||
|
lighttpd_LDFLAGS = -export-dynamic
|
||||||
|
|
||||||
|
+lighttpd_SOURCES += h2.c ls-hpack/lshpack.c algo_xxhash.c
|
||||||
|
+lighttpd_LDADD += $(XXHASH_LIBS)
|
||||||
|
if BUILD_WITH_MAXMINDDB
|
||||||
|
lighttpd_SOURCES += mod_maxminddb.c
|
||||||
|
lighttpd_LDADD += $(MAXMINDDB_LIB)
|
||||||
|
@@ -489,9 +489,6 @@ lighttpd_SOURCES += mod_wolfssl.c
|
||||||
|
lighttpd_CPPFLAGS += $(WOLFSSL_CFLAGS)
|
||||||
|
lighttpd_LDADD += $(WOLFSSL_LIBS)
|
||||||
|
endif
|
||||||
|
-#(until switch to mod_h2)
|
||||||
|
-#lighttpd_SOURCES += h2.c ls-hpack/lshpack.c algo_xxhash.c
|
||||||
|
-#lighttpd_LDADD += $(XXHASH_LIBS)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
--- a/src/SConscript
|
||||||
|
+++ b/src/SConscript
|
||||||
|
@@ -75,10 +75,8 @@ common_src = Split("base64.c buffer.c bu
|
||||||
|
ck.c \
|
||||||
|
")
|
||||||
|
|
||||||
|
-src = Split("server.c response.c connections.c h1.c h2.c \
|
||||||
|
+src = Split("server.c response.c connections.c h1.c \
|
||||||
|
sock_addr_cache.c \
|
||||||
|
- ls-hpack/lshpack.c \
|
||||||
|
- algo_xxhash.c \
|
||||||
|
fdevent_impl.c \
|
||||||
|
http_range.c \
|
||||||
|
network.c \
|
||||||
|
--- a/src/meson.build
|
||||||
|
+++ b/src/meson.build
|
||||||
|
@@ -560,10 +560,7 @@ main_src = files(
|
||||||
|
'connections.c',
|
||||||
|
'data_config.c',
|
||||||
|
'h1.c',
|
||||||
|
- 'h2.c',
|
||||||
|
'sock_addr_cache.c',
|
||||||
|
- 'ls-hpack/lshpack.c',
|
||||||
|
- 'algo_xxhash.c',
|
||||||
|
'fdevent_impl.c',
|
||||||
|
'http_range.c',
|
||||||
|
'network_write.c',
|
Loading…
Reference in a new issue