From 47a46b80631467d42e733372908dc1e706330f17 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 1 Jan 2021 19:55:22 +0100 Subject: [PATCH] - merged 1.4.58 from PLD, packaged mod_authn_dbi --- env-documentroot.patch | 68 --------------------- lighttpd-branding.patch | 8 +-- lighttpd.spec | 129 ++++++++++++++++++++++++++++------------ mod_authn_dbi.conf | 10 ++++ mod_compress.conf | 25 -------- mod_compress.tmpwatch | 2 - mod_deflate.conf | 18 +++++- test-port-setup.patch | 10 ++-- 8 files changed, 128 insertions(+), 142 deletions(-) delete mode 100644 env-documentroot.patch create mode 100644 mod_authn_dbi.conf delete mode 100644 mod_compress.conf delete mode 100644 mod_compress.tmpwatch diff --git a/env-documentroot.patch b/env-documentroot.patch deleted file mode 100644 index aeada33..0000000 --- a/env-documentroot.patch +++ /dev/null @@ -1,68 +0,0 @@ -revert: - -- * [*cgi] Use physical base dir (alias, userdir) as DOCUMENT_ROOT in cgi environments (fixes #2216) - -probably fixed in -https://github.com/lighttpd/lighttpd1.4/commit/7fa5bfc9381764d6c35ac29674bd830e8e5fee33 - ---- lighttpd-1.4.36/src/mod_fastcgi.c~ 2015-07-26 18:30:29.000000000 +0300 -+++ lighttpd-1.4.36/src/mod_fastcgi.c 2015-07-26 18:31:50.285226477 +0300 -@@ -1918,7 +1918,7 @@ - if (!buffer_string_is_empty(host->docroot)) { - buffer_copy_buffer(p->path, host->docroot); - } else { -- buffer_copy_buffer(p->path, con->physical.basedir); -+ buffer_copy_buffer(p->path, con->physical.doc_root); - } - buffer_append_string_buffer(p->path, con->request.pathinfo); - FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("PATH_TRANSLATED"), CONST_BUF_LEN(p->path)),con) -@@ -2008,7 +2008,7 @@ - } - - FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(p->path)),con) -- FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.basedir)),con) -+ FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.doc_root)),con) - } - - if (host->strip_request_uri->used > 1) { -@@ -3108,7 +3108,6 @@ - */ - - buffer_copy_buffer(con->physical.doc_root, host->docroot); -- buffer_copy_buffer(con->physical.basedir, host->docroot); - - buffer_copy_buffer(con->physical.path, host->docroot); - buffer_append_string_buffer(con->physical.path, con->uri.path); ---- lighttpd-1.4.36/src/mod_scgi.c~ 2015-07-26 18:30:29.000000000 +0300 -+++ lighttpd-1.4.36/src/mod_scgi.c 2015-07-26 18:33:12.406160926 +0300 -@@ -1547,7 +1547,7 @@ - if (!buffer_string_is_empty(host->docroot)) { - buffer_copy_buffer(p->path, host->docroot); - } else { -- buffer_copy_buffer(p->path, con->physical.basedir); -+ buffer_copy_buffer(p->path, con->physical.doc_root); - } - buffer_append_string_buffer(p->path, con->request.pathinfo); - scgi_env_add(p->scgi_env, CONST_STR_LEN("PATH_TRANSLATED"), CONST_BUF_LEN(p->path)); -@@ -1589,7 +1589,7 @@ - buffer_copy_string_buffer(p->path, con->physical.path); - - scgi_env_add(p->scgi_env, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(p->path)); -- scgi_env_add(p->scgi_env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.basedir)); -+ scgi_env_add(p->scgi_env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.doc_root)); - } - scgi_env_add(p->scgi_env, CONST_STR_LEN("REQUEST_URI"), CONST_BUF_LEN(con->request.orig_uri)); - if (!buffer_is_equal(con->request.uri, con->request.orig_uri)) { -Index: src/mod_cgi.c -=================================================================== ---- ./src/mod_cgi.c (revision 2794) -+++ ./src/mod_cgi.c (revision 2793) -@@ -928,7 +928,7 @@ - cgi_env_add(&env, CONST_STR_LEN("CONTENT_LENGTH"), buf, strlen(buf)); - cgi_env_add(&env, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(con->physical.path)); - cgi_env_add(&env, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path)); -- cgi_env_add(&env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.basedir)); -+ cgi_env_add(&env, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.doc_root)); - - /* for valgrind */ - if (NULL != (s = getenv("LD_PRELOAD"))) { diff --git a/lighttpd-branding.patch b/lighttpd-branding.patch index 55cc9cf..ac58026 100644 --- a/lighttpd-branding.patch +++ b/lighttpd-branding.patch @@ -1,11 +1,11 @@ ---- lighttpd-1.4.46/src/server.c~ 2017-10-21 22:36:29.000000000 +0300 -+++ lighttpd-1.4.46/src/server.c 2017-10-22 14:38:39.530007753 +0300 +--- lighttpd-1.4.56/src/server.c~ 2020-11-30 00:32:01.000000000 +0200 ++++ lighttpd-1.4.56/src/server.c 2020-11-30 08:29:32.022380561 +0200 @@ -25,7 +25,7 @@ # define REPO_VERSION "" #endif -#define PACKAGE_DESC PACKAGE_NAME "/" PACKAGE_VERSION REPO_VERSION -+#define PACKAGE_DESC PACKAGE_NAME "/" PACKAGE_VERSION REPO_VERSION " (PLD Linux)" ++#define PACKAGE_DESC PACKAGE_NAME "/" PACKAGE_VERSION REPO_VERSION " (TLD Linux)" + static const buffer default_server_tag = { CONST_STR_LEN(PACKAGE_DESC)+1, 0 }; #include - #include diff --git a/lighttpd.spec b/lighttpd.spec index af66cfb..1b2fe81 100644 --- a/lighttpd.spec +++ b/lighttpd.spec @@ -1,4 +1,5 @@ # TODO: +# - don't use lighttpd-angel in systemd. systemd does the respawn/recovery logic itself # - provide or autogenerated self signed cert in post, so after installing # lighttpd-ssl server will still work # - patch with mod_websocket: https://github.com/Juniper/lighttpd-for-juise @@ -6,6 +7,12 @@ # - add db specific mod_vhostdb_* sub-packages # - package mod_sockproxy # https://github.com/lighttpd/lighttpd1.4/commit/c4d743bb4d0cc045d41322169a4e36a151e247f1 +# - TLS library options +# - mod_openssl (existing) +# - mod_mbedtls (experimental) +# - mod_wolfssl (experimental) +# - mod_gnutls (experimental) +# - mod_nss (experimental) # # Conditional build: %bcond_with tests # build with tests @@ -16,6 +23,8 @@ %bcond_without ssl # ssl support %bcond_without mysql # mysql support in mod_mysql_vhost, mod_vhostdb_mysql %bcond_without pgsql # PgSQL, enables mod_vhostdb_pgsql +%bcond_without bzip2 # Enable bzip2 support for mod_deflate +%bcond_without brotli # Enable brotli support for mod_deflate %bcond_without geoip # GeoIP support %bcond_without maxminddb # MaxMind GeoIP2 module %bcond_with krb5 # krb5 support (does not work with heimdal) @@ -42,12 +51,12 @@ Summary: Fast and light HTTP server Summary(pl.UTF-8): Szybki i lekki serwer HTTP Name: lighttpd -Version: 1.4.55 +Version: 1.4.58 Release: 1 License: BSD Group: Networking/Daemons/HTTP Source0: https://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.xz -# Source0-md5: be4bda2c28bcbdac6eb941528f6edf03 +# Source0-md5: 8d12a31bd3fdd7eab85cf9a6d2cfa92e Source1: %{name}.init Source2: %{name}.conf Source3: %{name}.user @@ -69,7 +78,6 @@ Source102: mod_alias.conf Source103: mod_auth.conf Source104: mod_cgi.conf Source105: mod_cml.conf -Source106: mod_compress.conf Source107: mod_deflate.conf Source108: mod_dirlisting.conf Source109: mod_evasive.conf @@ -101,7 +109,7 @@ Source134: mod_magnet.conf Source135: mod_extforward.conf Source136: mod_h264_streaming.conf Source137: mod_cgi_php.conf -Source138: mod_compress.tmpwatch +Source138: mod_authn_dbi.conf Source139: mod_uploadprogress.conf Source140: mod_geoip.conf Source141: mod_authn_ldap.conf @@ -120,15 +128,16 @@ Patch3: %{name}-branding.patch Patch5: test-port-setup.patch URL: https://www.lighttpd.net/ %{?with_geoip:BuildRequires: GeoIP-devel} -%{?with_maxminddb:BuildRequires: libmaxminddb-devel} %{?with_xattr:BuildRequires: attr-devel} BuildRequires: autoconf >= 2.57 +%{?with_maxminddb:BuildRequires: libmaxminddb-devel} BuildRequires: automake >= 1:1.11.2 -BuildRequires: bzip2-devel +%{?with_bzip2:BuildRequires: bzip2-devel} BuildRequires: fcgi-devel %{?with_gamin:BuildRequires: gamin-devel} %{?with_storage_gdbm:BuildRequires: gdbm-devel} %{?with_krb5:BuildRequires: krb5-devel} +%{?with_brotli:BuildRequires: libbrotli-devel} %{?with_dbi:BuildRequires: libdbi-devel} %{?with_storage_memcached:BuildRequires: libmemcached-devel} BuildRequires: libtool @@ -137,11 +146,11 @@ BuildRequires: libuuid-devel %{?with_lua:BuildRequires: lua51-devel} BuildRequires: mailcap >= 2.1.14-4.4 %{?with_mysql:BuildRequires: mysql-devel} -%{?with_pgsql:BuildRequires: postgresql-devel} %{?with_ldap:BuildRequires: openldap-devel} %{?with_ssl:BuildRequires: openssl-devel} BuildRequires: pcre-devel BuildRequires: pkgconfig +%{?with_pgsql:BuildRequires: postgresql-devel} BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpmbuild(macros) >= 1.647 %{?with_webdav_props:BuildRequires: sqlite3-devel} @@ -267,6 +276,14 @@ basic and digest. lighttpd obsługuje obie metody uwierzytelniania opisane w RFC 2617: basic i digest. +%package mod_authn_dbi +Summary: lighttpd authn_dbi module +Group: Networking/Daemons/HTTP +Requires: %{name} = %{version}-%{release} + +%description mod_authn_dbi +lighttpd authn_dbi module. + %package mod_authn_file Summary: lighttpd authn_file module Group: Networking/Daemons/HTTP @@ -299,6 +316,10 @@ Requires: %{name} = %{version}-%{release} %description mod_authn_mysql lighttpd authn_mysql module. +mod_authn_mysql is DEPRECATED; use mod_authn_dbi. + +Note: mod_authn_mysql will be removed from a future lighttpd release. + %package mod_cgi Summary: lighttpd module for CGI handling Summary(pl.UTF-8): Moduł lighttpd do obsługi CGI @@ -353,6 +374,10 @@ CML is a Meta language to describe the dependencies of a page at one side and building a page from its fragments on the other side using LUA. +mod_cml is DEPRECATED; use mod_magnet. + +Note: mod_cml will be removed from a future lighttpd release. + %description mod_cml -l pl.UTF-8 CML to metajęzyk służący z jednej strony do opisu zależności strony i z drugiej strony do budowania strony z fragmentów przy użyciu LUA. @@ -373,6 +398,11 @@ Only static content is supported up to now. The server negotiates automatically which compression method is used. Supported are gzip, deflate, bzip. +mod_compress is DEPRECATED; use mod_deflate. mod_compress has been +subsumed by mod_deflate. + +Note: mod_compress config options may be removed in a future release. + %description mod_compress -l pl.UTF-8 Kompresja wyjścia zmniejsza obciążenie sieci i może poprawić całkowitą przepustowość serwera WWW. @@ -386,12 +416,32 @@ Obsługiwane są gzip, deflate i bzip. Summary: lighttpd module for output compression using deflate method Summary(pl.UTF-8): Moduł lighttpd do kompresji wyjścia metodą deflate Group: Networking/Daemons/HTTP -URL: http://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_Deflate +URL: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModDeflate Requires: %{name} = %{version}-%{release} +Obsoletes: lighttpd-mod_compress < 1.4.56 + +%define _deflate_encodings deflate gzip %{?with_bzip2:bzip2} %{?with_brotli:brotli} +%define deflate_encodings %(echo %_deflate_encodings | sed -e 's/ /, /g') %description mod_deflate -mod_deflate can compress any output from lighttpd static or dynamic. -It doesn't support caching compressed output like mod_compress. +mod_deflate enables output compression of responses +(Content-Encoding). + +Output compression reduces the network load and can improve the +overall throughput of the webserver. All major http-clients support +compression by announcing it in the Accept-Encoding header. This is +used to negotiate the most suitable compression method. + +This module supports %{deflate_encodings} encodings. + +deflate (RFC1950, RFC1951) and gzip (RFC1952) depend on zlib while +bzip2 depends on libbzip2. bzip2 is only supported by lynx and some +other console text-browsers. brotli (RFC7932) is supported in most +popular browsers. + +Since lighttpd 1.4.56, mod_deflate subsumes and replaces mod_compress. +mod_deflate can compress static and dynamic responses, while +mod_compress could compress only static files. %description mod_deflate -l pl.UTF-8 mod_deflate potrafi kompresować statyczne i dynamiczne wyjście z @@ -518,6 +568,10 @@ If the ip was found in the database the module sets the appropriate environment variables to the request, thus making other modules/fcgi be informed. +mod_geoip is DEPRECATED; use mod_maxminddb. + +Note: mod_geoip will be removed from a future lighttpd release. + %package mod_h264_streaming Summary: lighttpd module for h264 streaming Summary(pl.UTF-8): Moduł lighttpd do emisji strumieni h264 @@ -578,6 +632,11 @@ Conflicts: %{name}-mod_simple_vhost %description mod_mysql_vhost This module provides virtual hosts (vhosts) based on a MySQL table. +mod_mysql_vhost is DEPRECATED; use mod_vhostdb_dbi or +mod_vhostdb_mysql. + +Note: mod_mysql_vhost will be removed from a future lighttpd release. + %description mod_mysql_vhost -l pl.UTF-8 Ten moduł udostępnia wirtualne hosty (vhosty) oparte na tabeli MySQL. @@ -984,25 +1043,27 @@ fi %{__automake} %configure \ - --libdir=%{pkglibdir} \ %{!?with_ipv6:--disable-ipv6} \ %{!?with_largefile:--disable-lfs} \ - %{?with_valgrind:--with-valgrind} \ - %{?with_xattr:--with-attr} \ + %{?with_brotli:--with-brotli} \ + %{?with_bzip2:--with-bzip2} \ %{?with_dbi:--with-dbi} \ - %{?with_krb5:--with-krb5} \ + %{?with_gamin:--with-gamin} \ %{?with_geoip:--with-geoip} \ + %{?with_krb5:--with-krb5} \ + %{?with_ldap:--with-ldap} \ + %{?with_lua:--with-lua=lua51} \ %{?with_maxminddb:--with-maxminddb} \ %{?with_mysql:--with-mysql} \ - %{?with_ldap:--with-ldap} \ - %{?with_ssl:--with-openssl} \ %{?with_pgsql:--with-pgsql} \ - %{?with_lua:--with-lua=lua51} \ + %{?with_ssl:--with-openssl} \ + %{?with_storage_gdbm:--with-gdbm} \ %{?with_storage_memcached:--with-memcached} \ - %{?with_webdav_props:--with-webdav-props} \ + %{?with_valgrind:--with-valgrind} \ %{?with_webdav_locks:--with-webdav-locks} \ - %{?with_gamin:--with-gamin} \ - %{?with_storage_gdbm:--with-gdbm} + %{?with_webdav_props:--with-webdav-props} \ + %{?with_xattr:--with-attr} \ + --libdir=%{pkglibdir} # -j1 as src/mod_ssi_exprparser.h regeneration deps are broken %{__make} -j1 @@ -1018,8 +1079,7 @@ install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d $RPM_BUILD_ROOT%{_sysconfdir}/{{conf,vhosts,webapps}.d,ssl} \ $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \ $RPM_BUILD_ROOT%{_datadir}/lighttpd/errordocs \ - $RPM_BUILD_ROOT/var/lib/lighttpd \ - $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress + $RPM_BUILD_ROOT/var/lib/lighttpd %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -1067,7 +1127,7 @@ cp -p %{SOURCE147} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_maxminddb.conf %if %{with ldap} cp -p %{SOURCE141} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_authn_ldap.conf %endif -%if %{with ldap} +%if %{with mysql} cp -p %{SOURCE145} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_authn_mysql.conf %endif %if %{with h264_streaming} @@ -1087,6 +1147,7 @@ cp -p %{SOURCE125} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_status.conf %if %{with mod_trigger_b4_dl} cp -p %{SOURCE126} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_trigger_b4_dl.conf %endif +cp -p %{SOURCE138} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_authn_dbi.conf cp -p %{SOURCE139} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_uploadprogress.conf cp -p %{SOURCE127} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_userdir.conf cp -p %{SOURCE128} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_usertrack.conf @@ -1101,8 +1162,6 @@ cp -p %{SOURCE146} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_sockproxy.conf cp -p %{SOURCE134} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_magnet.conf cp -p %{SOURCE111} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_expire.conf -cp -p %{SOURCE106} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/60_mod_compress.conf - cp -p %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_accesslog.conf cp -p %{SOURCE135} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/91_mod_extforward.conf @@ -1113,7 +1172,6 @@ cp -p %{SOURCE132} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/ssl.conf touch $RPM_BUILD_ROOT/var/lib/lighttpd/lighttpd.rrd install -d $RPM_BUILD_ROOT/etc/tmpwatch -cp -p %{SOURCE138} $RPM_BUILD_ROOT/etc/tmpwatch/lighttpd-mod_compress.conf touch $RPM_BUILD_ROOT/var/log/%{name}/{access,error,breakage}.log @@ -1185,13 +1243,13 @@ fi %module_scripts mod_accesslog %module_scripts mod_alias %module_scripts mod_auth +%module_scripts mod_authn_dbi %module_scripts mod_authn_file %module_scripts mod_authn_gssapi %module_scripts mod_authn_ldap %module_scripts mod_authn_mysql %module_scripts mod_cgi %module_scripts mod_cml -%module_scripts mod_compress %module_scripts mod_deflate %module_scripts mod_dirlisting %module_scripts mod_evasive @@ -1286,9 +1344,6 @@ fi # rrdtool database is stored there %dir %attr(771,root,lighttpd) /var/lib/lighttpd -# mod_compress can put cached files there -%dir /var/cache/lighttpd - %files mod_access %defattr(644,root,root,755) %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_access.conf @@ -1319,6 +1374,13 @@ fi %attr(755,root,root) %{pkglibdir}/mod_authn_gssapi.so %endif +%if %{with dbi} +%files mod_authn_dbi +%defattr(644,root,root,755) +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_authn_dbi.conf +%attr(755,root,root) %{pkglibdir}/mod_authn_dbi.so +%endif + %if %{with ldap} %files mod_authn_ldap %defattr(644,root,root,755) @@ -1347,13 +1409,6 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cml.conf %attr(755,root,root) %{pkglibdir}/mod_cml.so -%files mod_compress -%defattr(644,root,root,755) -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/lighttpd-mod_compress.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_compress.conf -%attr(755,root,root) %{pkglibdir}/mod_compress.so -%dir %attr(775,root,lighttpd) /var/cache/lighttpd/mod_compress - %files mod_deflate %defattr(644,root,root,755) %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_deflate.conf diff --git a/mod_authn_dbi.conf b/mod_authn_dbi.conf new file mode 100644 index 0000000..1f13ed2 --- /dev/null +++ b/mod_authn_dbi.conf @@ -0,0 +1,10 @@ +# dbi (mod_authn_dbi) +# +# The DBI backend authenticates the user against MySQL/MariaDB, Postgres, SQLite3, +# and possible other databases with libdbi-drivers +# +# Documentation: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAuth#dbi-mod_authn_dbi-since-lighttpd-1456 + +server.modules += ( + "mod_authn_dbi" +) diff --git a/mod_compress.conf b/mod_compress.conf deleted file mode 100644 index 7bbd6f1..0000000 --- a/mod_compress.conf +++ /dev/null @@ -1,25 +0,0 @@ -# Compress module. -# -# Documentation: http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModCompress - -server.modules += ( - "mod_compress" -) - -# Default: "bzip2", "gzip", "deflate" -# Safe list is 'gzip, deflate'. bzip2 is problematic for some browsers (MSIE) -#compress.allowed-encodings = ( "gzip", "deflate" ) - -# Default: not set, compress the file for every request -# Filenames saved to this dir have ETag appended, so theoretically you can use -# common dir across domains for this. -compress.cache-dir = "/var/cache/lighttpd/mod_compress" - -# Keep in mind that compressed JavaScript and CSS files are broken in some browsers. -# Not setting any filetypes will result in no files being compressed. -#compress.filetype = ( -# "application/x-javascript", -# "text/css", -# "text/html", -# "text/xml", -#) diff --git a/mod_compress.tmpwatch b/mod_compress.tmpwatch deleted file mode 100644 index 73c4172..0000000 --- a/mod_compress.tmpwatch +++ /dev/null @@ -1,2 +0,0 @@ -# Cleanup lighttpd-mod_compress cache files: -/var/cache/lighttpd/mod_compress -u 10d diff --git a/mod_deflate.conf b/mod_deflate.conf index ff5a0c0..f952331 100644 --- a/mod_deflate.conf +++ b/mod_deflate.conf @@ -1,7 +1,23 @@ # Deflate module. # -# Documentation: http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModDeflate +# Documentation: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModDeflate server.modules += ( "mod_deflate" ) + +# prefix matches all text/* Content-Type responses +#deflate.mimetypes = ("text/") +#deflate.mimetypes = ("text/html", "text/plain", "text/css", "text/javascript", "text/xml") +#deflate.allowed-encodings = ( "brotli", "gzip", "deflate", "bzip2" ) + +### optional +#deflate.cache-dir = "/path/to/compress/cache" +# measured in kilobytes, so 131072 indicates 128 MB +#deflate.max-compress-size = 131072 +# measured in bytes +#deflate.min-compress-size = 256 +#deflate.compression-level = 9 +#deflate.output-buffer-size = 8192 +#deflate.work-block-size = 2048 +#deflate.max-loadavg = "3.50" diff --git a/test-port-setup.patch b/test-port-setup.patch index cb02c9d..3578e17 100644 --- a/test-port-setup.patch +++ b/test-port-setup.patch @@ -2,12 +2,12 @@ TODO: upstream it: https://github.com/lighttpd/lighttpd1.4/pull/69 ---- lighttpd-1.4.30/tests/LightyTest.pm~ 2010-02-02 01:28:20.000000000 +0200 -+++ lighttpd-1.4.30/tests/LightyTest.pm 2011-12-19 14:37:44.255526606 +0200 -@@ -43,7 +43,7 @@ - $self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; +--- lighttpd-1.4.56/tests/LightyTest.pm~ 2020-11-30 00:32:01.000000000 +0200 ++++ lighttpd-1.4.56/tests/LightyTest.pm 2020-11-30 08:31:44.175860280 +0200 +@@ -81,7 +81,7 @@ + if (exists $ENV{LIGHTTPD_EXE_PATH}) { + $self->{LIGHTTPD_PATH} = $ENV{LIGHTTPD_EXE_PATH}; } - $self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; - $self->{PORT} = 2048; + $self->{PORT} = $ENV{LIGHTTPD_TEST_PORT} ? int($ENV{LIGHTTPD_TEST_PORT}) : 2048; -- 2.46.0