From 4a3b62a92ab21bb6ae373dbbbfc1c5eb16ebc3f5 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 24 Nov 2022 02:18:09 -0500 Subject: [PATCH 1/5] lighttpd: modify build cmd for type: feature opts modify build command for meson type: feature options remove -Dwith_libev=disabled (option no longer has any effect) Signed-off-by: Glenn Strauss --- net/lighttpd/Makefile | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index 1cbb0adeb..f0021d0db 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -150,33 +150,32 @@ config LIGHTTPD_LOGROTATE endef MESON_ARGS += \ - -Dwith_brotli=false \ - -Dwith_bzip=false \ - -Dwith_dbi=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_dbi)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_dbi),true,false) \ - -Dwith_fam=false \ + -Dwith_brotli=disabled \ + -Dwith_bzip=disabled \ + -Dwith_dbi=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_dbi)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_dbi),enabled,disabled) \ + -Dwith_fam=disabled \ -Dwith_gnutls=$(if $(CONFIG_PACKAGE_lighttpd-mod-gnutls),true,false) \ - -Dwith_krb5=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_gssapi),true,false) \ - -Dwith_ldap=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_ldap)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_ldap),true,false) \ - -Dwith_libev=false \ - -Dwith_libunwind=false \ + -Dwith_krb5=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_gssapi),enabled,disabled) \ + -Dwith_ldap=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_ldap)$(CONFIG_PACKAGE_lighttpd-mod-vhostdb_ldap),enabled,disabled) \ + -Dwith_libunwind=disabled \ -Dwith_lua=$(if $(CONFIG_PACKAGE_lighttpd-mod-magnet),true,false) \ -Dlua_version=lua \ - -Dwith_maxminddb=$(if $(CONFIG_PACKAGE_lighttpd-mod-maxminddb),true,false) \ + -Dwith_maxminddb=$(if $(CONFIG_PACKAGE_lighttpd-mod-maxminddb),enabled,disabled) \ -Dwith_mbedtls=$(if $(CONFIG_PACKAGE_lighttpd-mod-mbedtls),true,false) \ - -Dwith_mysql=$(if $(CONFIG_PACKAGE_lighttpd-mod-vhostdb_mysql),true,false) \ + -Dwith_mysql=$(if $(CONFIG_PACKAGE_lighttpd-mod-vhostdb_mysql),enabled,disabled) \ -Dwith_nettle=$(if $(filter libnettle,$(cryptolib)),true,false) \ -Dwith_nss=$(if $(CONFIG_PACKAGE_lighttpd-mod-nss),true,false) \ -Dwith_openssl=$(if $(CONFIG_PACKAGE_lighttpd-mod-openssl),true,false) \ - -Dwith_pam=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_pam),true,false) \ + -Dwith_pam=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_pam),enabled,disabled) \ -Dwith_pcre2=$(if $(CONFIG_LIGHTTPD_PCRE2),true,false) \ - -Dwith_pgsql=$(if $(CONFIG_PACKAGE_lighttpd-mod-vhostdb_pgsql),true,false) \ - -Dwith_sasl=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_sasl),true,false) \ - -Dwith_webdav_locks=$(if $(CONFIG_PACKAGE_lighttpd-mod-webdav),true,false) \ - -Dwith_webdav_props=$(if $(CONFIG_PACKAGE_lighttpd-mod-webdav),true,false) \ + -Dwith_pgsql=$(if $(CONFIG_PACKAGE_lighttpd-mod-vhostdb_pgsql),enabled,disabled) \ + -Dwith_sasl=$(if $(CONFIG_PACKAGE_lighttpd-mod-authn_sasl),enabled,disabled) \ + -Dwith_webdav_locks=$(if $(CONFIG_PACKAGE_lighttpd-mod-webdav),enabled,disabled) \ + -Dwith_webdav_props=$(if $(CONFIG_PACKAGE_lighttpd-mod-webdav),enabled,disabled) \ -Dwith_wolfssl=$(if $(CONFIG_PACKAGE_lighttpd-mod-wolfssl),true,false) \ -Dwith_xattr=false \ - -Dwith_zlib=$(if $(CONFIG_PACKAGE_lighttpd-mod-deflate),true,false) \ - -Dwith_zstd=false + -Dwith_zlib=$(if $(CONFIG_PACKAGE_lighttpd-mod-deflate),enabled,disabled) \ + -Dwith_zstd=disabled BASE_MODULES:=dirlisting indexfile staticfile From 6383ae9407280df7f2ac29065bfe22d7bca73ed7 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 3 Jan 2023 12:52:02 -0500 Subject: [PATCH 2/5] lighttpd: update to lighttpd 1.4.68 release hash Signed-off-by: Glenn Strauss --- net/lighttpd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index f0021d0db..4e07bc685 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lighttpd -PKG_VERSION:=1.4.67 -PKG_RELEASE:=4 +PKG_VERSION:=1.4.68 +PKG_RELEASE:=1 # release candidate ~rcX testing; remove for release #PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x -PKG_HASH:=7e04d767f51a8d824b32e2483ef2950982920d427d1272ef4667f49d6f89f358 +PKG_HASH:=e56f37ae52b63e1ada4d76ce78005affb6e56eea2f6bdb0ce17d6d36e9583384 PKG_MAINTAINER:=W. Michael Petullo PKG_LICENSE:=BSD-3-Clause From 66001d5a91087dec6ff9e620b995beaff60506d7 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 3 Jan 2023 13:09:52 -0500 Subject: [PATCH 3/5] lighttpd: remove patch included upstream Signed-off-by: Glenn Strauss --- ...y-Sec-WebSocket-Key-in-proxy_and_cgi.patch | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 net/lighttpd/patches/010-fix-dummy-Sec-WebSocket-Key-in-proxy_and_cgi.patch diff --git a/net/lighttpd/patches/010-fix-dummy-Sec-WebSocket-Key-in-proxy_and_cgi.patch b/net/lighttpd/patches/010-fix-dummy-Sec-WebSocket-Key-in-proxy_and_cgi.patch deleted file mode 100644 index eda27854c..000000000 --- a/net/lighttpd/patches/010-fix-dummy-Sec-WebSocket-Key-in-proxy_and_cgi.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cda9b71653bb6a633957f653fa08e819b32e601e Mon Sep 17 00:00:00 2001 -From: Shulyaka -Date: Sun, 23 Oct 2022 13:29:22 +0300 -Subject: [PATCH] [mod_proxy,mod_cgi] fix dummy Sec-WebSocket-Key - -fix dummy Sec-WebSocket-Key value to remove excess '\n' - -x-ref: - "Fix websocket HTTP/2 to HTTP/1.1 proxy" - https://github.com/lighttpd/lighttpd1.4/pull/123 - -github: closes #123 ---- - src/mod_cgi.c | 2 +- - src/mod_proxy.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/src/mod_cgi.c -+++ b/src/mod_cgi.c -@@ -874,7 +874,7 @@ static int cgi_create_env(request_st * c - if (!http_header_request_get(r, HTTP_HEADER_OTHER, - CONST_STR_LEN("Sec-WebSocket-Key"))) - cgi_env_add(env, CONST_STR_LEN("HTTP_SEC_WEBSOCKET_KEY"), -- CONST_STR_LEN("MDAwMDAwMDAwMDAwMDAwMAo=")); -+ CONST_STR_LEN("MDAwMDAwMDAwMDAwMDAwMA==")); - /*(Upgrade and Connection should not exist for HTTP/2 request)*/ - cgi_env_add(env, CONST_STR_LEN("HTTP_UPGRADE"), CONST_STR_LEN("websocket")); - cgi_env_add(env, CONST_STR_LEN("HTTP_CONNECTION"), CONST_STR_LEN("upgrade")); ---- a/src/mod_proxy.c -+++ b/src/mod_proxy.c -@@ -1013,7 +1013,7 @@ static handler_t proxy_create_env(gw_han - if (!http_header_request_get(r, HTTP_HEADER_OTHER, - CONST_STR_LEN("Sec-WebSocket-Key"))) - buffer_append_string_len(b, CONST_STR_LEN( -- "\r\nSec-WebSocket-Key: MDAwMDAwMDAwMDAwMDAwMAo=")); -+ "\r\nSec-WebSocket-Key: MDAwMDAwMDAwMDAwMDAwMA==")); - buffer_append_string_len(b, CONST_STR_LEN( - "\r\nUpgrade: websocket" - "\r\nConnection: close, upgrade\r\n\r\n")); From 74d26813f744ebdc195fb3fbe9b2cd5e8169b2a3 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 3 Jan 2023 17:54:07 -0500 Subject: [PATCH 4/5] lighttpd: fix meson build Signed-off-by: Glenn Strauss --- net/lighttpd/patches/020-meson-tests.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 net/lighttpd/patches/020-meson-tests.patch diff --git a/net/lighttpd/patches/020-meson-tests.patch b/net/lighttpd/patches/020-meson-tests.patch new file mode 100644 index 000000000..c7db6efa1 --- /dev/null +++ b/net/lighttpd/patches/020-meson-tests.patch @@ -0,0 +1,19 @@ +From d809433d6d900e899f796606b11bdc6a73413ac5 Mon Sep 17 00:00:00 2001 +From: Glenn Strauss +Date: Tue, 3 Jan 2023 17:50:16 -0500 +Subject: [PATCH] [meson] remove t/test_mod_evasive.c + +--- + src/meson.build | 1 - + 1 file changed, 1 deletion(-) + +--- a/src/meson.build ++++ b/src/meson.build +@@ -721,7 +721,6 @@ test('test_mod', executable('test_mod', + 't/test_mod.c', + 't/test_mod_access.c', + 't/test_mod_alias.c', +- 't/test_mod_evasive.c', + 't/test_mod_evhost.c', + 't/test_mod_indexfile.c', + 't/test_mod_simple_vhost.c', From 85279b49ceeb411f98623e6febef48b83f04813b Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 3 Jan 2023 21:19:46 -0500 Subject: [PATCH 5/5] lighttpd: collect mods now built into lighttpd exe Signed-off-by: Glenn Strauss --- net/lighttpd/Makefile | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/net/lighttpd/Makefile b/net/lighttpd/Makefile index 4e07bc685..86915d1ce 100644 --- a/net/lighttpd/Makefile +++ b/net/lighttpd/Makefile @@ -247,16 +247,11 @@ $(eval $(call BuildPlugin,authn_ldap,LDAP-based authentication,lighttpd-mod-auth $(eval $(call BuildPlugin,authn_pam,PAM-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_pam:libpam,20)) $(eval $(call BuildPlugin,authn_sasl,SASL-based authentication,lighttpd-mod-auth +PACKAGE_lighttpd-mod-authn_sasl:libsasl2,20)) -$(eval $(call BuildPlugin,access,Access restrictions,,30)) $(eval $(call BuildPlugin,accesslog,Access logging,,30)) $(eval $(call BuildPlugin,ajp13,AJP13 Tomcat connector,,30)) -$(eval $(call BuildPlugin,alias,Directory alias,,30)) $(eval $(call BuildPlugin,cgi,CGI,,30)) $(eval $(call BuildPlugin,deflate,Compress dynamic output,+PACKAGE_lighttpd-mod-deflate:zlib,30)) -$(eval $(call BuildPlugin,evhost,Enhanced Virtual-Hosting,,30)) -$(eval $(call BuildPlugin,expire,Expire,,30)) $(eval $(call BuildPlugin,extforward,Extract client,,30)) -$(eval $(call BuildPlugin,fastcgi,FastCGI,,30)) $(eval $(call BuildPlugin,gnutls,TLS using gnutls,@LIGHTTPD_SSL +PACKAGE_lighttpd-mod-gnutls:libgnutls,30)) $(eval $(call BuildPlugin,magnet,Magnet,+PACKAGE_lighttpd-mod-magnet:liblua,30)) $(eval $(call BuildPlugin,maxminddb,MaxMind DB,+PACKAGE_lighttpd-mod-maxminddb:libmaxminddb,30)) @@ -264,15 +259,9 @@ $(eval $(call BuildPlugin,mbedtls,TLS using mbedtls,@LIGHTTPD_SSL +PACKAGE_light $(eval $(call BuildPlugin,nss,TLS using nss,@LIGHTTPD_SSL +PACKAGE_lighttpd-mod-nss:libnss,30)) $(eval $(call BuildPlugin,openssl,TLS using openssl,@LIGHTTPD_SSL +PACKAGE_lighttpd-mod-openssl:libopenssl,30)) $(eval $(call BuildPlugin,proxy,Proxy,,30)) -$(eval $(call BuildPlugin,redirect,URL redirection,$(if $(CONFIG_LIGHTTPD_PCRE2),+PACKAGE_lighttpd-mod-redirect:libpcre2,),10)) -$(eval $(call BuildPlugin,rewrite,URL rewriting,$(if $(CONFIG_LIGHTTPD_PCRE2),+PACKAGE_lighttpd-mod-rewrite:libpcre2,),30)) $(eval $(call BuildPlugin,rrdtool,RRDtool,rrdtool1,30)) -$(eval $(call BuildPlugin,scgi,SCGI,,30)) -$(eval $(call BuildPlugin,setenv,Environment variable setting,,30)) -$(eval $(call BuildPlugin,simple_vhost,Simple virtual hosting,,30)) $(eval $(call BuildPlugin,sockproxy,sockproxy,,30)) $(eval $(call BuildPlugin,ssi,SSI,,30)) -$(eval $(call BuildPlugin,staticfile,staticfile,,30)) $(eval $(call BuildPlugin,status,Server status display,,30)) $(eval $(call BuildPlugin,userdir,User directory,,30)) $(eval $(call BuildPlugin,vhostdb,Virtual Host Database,,30)) @@ -283,3 +272,21 @@ $(eval $(call BuildPlugin,vhostdb_pgsql,Virtual Host Database (PostgreSQL),light $(eval $(call BuildPlugin,webdav,WebDAV,+PACKAGE_lighttpd-mod-webdav:libsqlite3 +PACKAGE_lighttpd-mod-webdav:libuuid +PACKAGE_lighttpd-mod-webdav:libxml2,30)) $(eval $(call BuildPlugin,wolfssl,TLS using wolfssl,@LIGHTTPD_SSL +PACKAGE_lighttpd-mod-wolfssl:libwolfssl,30)) $(eval $(call BuildPlugin,wstunnel,Websocket tunneling,$(if $(cryptolib),+PACKAGE_lighttpd-mod-wstunnel:$(cryptolib),),30)) + +# included in BASE_MODULES:=dirlisting indexfile staticfile +#$(eval $(call BuildPlugin,dirlisting,dirlisting,,30)) + +# included in base lighttpd executable; +# no longer loaded as separate dynamic modules +#$(eval $(call BuildPlugin,indexfile,indexfile,,30)) +#$(eval $(call BuildPlugin,staticfile,staticfile,,30)) +$(eval $(call BuildPlugin,access,Access restrictions,,30)) +$(eval $(call BuildPlugin,alias,Directory alias,,30)) +$(eval $(call BuildPlugin,evhost,Enhanced Virtual-Hosting,,30)) +$(eval $(call BuildPlugin,expire,Expire,,30)) +$(eval $(call BuildPlugin,fastcgi,FastCGI,,30)) +$(eval $(call BuildPlugin,redirect,URL redirection,$(if $(CONFIG_LIGHTTPD_PCRE2),+PACKAGE_lighttpd-mod-redirect:libpcre2,),10)) +$(eval $(call BuildPlugin,rewrite,URL rewriting,$(if $(CONFIG_LIGHTTPD_PCRE2),+PACKAGE_lighttpd-mod-rewrite:libpcre2,),30)) +$(eval $(call BuildPlugin,scgi,SCGI,,30)) +$(eval $(call BuildPlugin,setenv,Environment variable setting,,30)) +$(eval $(call BuildPlugin,simple_vhost,Simple virtual hosting,,30))