From patchwork Fri Oct 20 13:30:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glenn Strauss X-Patchwork-Id: 32652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C791C0032E for ; Fri, 20 Oct 2023 13:30:58 +0000 (UTC) Received: from smtp1.atof.net (smtp1.atof.net [52.86.233.228]) by mx.groups.io with SMTP id smtpd.web10.54234.1697808642990488032 for ; Fri, 20 Oct 2023 06:30:49 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: gluelogic.com, ip: 52.86.233.228, mailfrom: gs-yoctoproject.org@gluelogic.com) From: Glenn Strauss To: openembedded-core@lists.openembedded.org Cc: Glenn Strauss Subject: [PATCH 1/3] lighttpd: upgrade 1.4.71 -> 1.4.72 Date: Fri, 20 Oct 2023 09:30:24 -0400 Message-ID: <20231020133026.103646-2-gs-yoctoproject.org@gluelogic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> References: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 0.78 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 20 Oct 2023 13:30:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/189529 From: Glenn Strauss Signed-off-by: Glenn Strauss --- .../lighttpd/{lighttpd_1.4.71.bb => lighttpd_1.4.72.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-extended/lighttpd/{lighttpd_1.4.71.bb => lighttpd_1.4.72.bb} (97%) diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.71.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.72.bb similarity index 97% rename from meta/recipes-extended/lighttpd/lighttpd_1.4.71.bb rename to meta/recipes-extended/lighttpd/lighttpd_1.4.72.bb index 3959f88b98..87058719f9 100644 --- a/meta/recipes-extended/lighttpd/lighttpd_1.4.71.bb +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.72.bb @@ -16,7 +16,7 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t file://lighttpd \ " -SRC_URI[sha256sum] = "b8b6915da20396fdc354df3324d5e440169b2e5ea7859e3a775213841325afac" +SRC_URI[sha256sum] = "f7cade4d69b754a0748c01463c33cd8b456ca9cc03bb09e85a71bcbcd54e55ec" DEPENDS = "virtual/crypt" From patchwork Fri Oct 20 13:30:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glenn Strauss X-Patchwork-Id: 32653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88341C001DF for ; Fri, 20 Oct 2023 13:30:58 +0000 (UTC) Received: from smtp1.atof.net (smtp1.atof.net [52.86.233.228]) by mx.groups.io with SMTP id smtpd.web10.54234.1697808642990488032 for ; Fri, 20 Oct 2023 06:30:50 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: gluelogic.com, ip: 52.86.233.228, mailfrom: gs-yoctoproject.org@gluelogic.com) From: Glenn Strauss To: openembedded-core@lists.openembedded.org Cc: Glenn Strauss Subject: [PATCH 2/3] lighttpd: update init script Date: Fri, 20 Oct 2023 09:30:25 -0400 Message-ID: <20231020133026.103646-3-gs-yoctoproject.org@gluelogic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> References: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 0.78 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 20 Oct 2023 13:30:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/189530 From: Glenn Strauss - add configtest option - add configtest before starting, restart, reload, force-reload - change reload,force-reload to use lighttpd graceful restart via kill signal USR1 Signed-off-by: Glenn Strauss --- .../lighttpd/lighttpd/lighttpd | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd index 82fbaa523b..f369dce42c 100644 --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd @@ -6,9 +6,14 @@ NAME=lighttpd DESC="Lighttpd Web Server" OPTS="-f /etc/lighttpd/lighttpd.conf" +configtest() { + "$DAEMON" $OPTS -tt || exit 1 +} + case "$1" in start) echo -n "Starting $DESC: " + configtest start-stop-daemon --start -x "$DAEMON" -- $OPTS echo "$NAME." ;; @@ -17,16 +22,26 @@ case "$1" in start-stop-daemon --stop -x "$DAEMON" echo "$NAME." ;; - restart|force-reload) + restart) echo -n "Restarting $DESC: " + configtest start-stop-daemon --stop -x "$DAEMON" sleep 1 start-stop-daemon --start -x "$DAEMON" -- $OPTS echo "$NAME." ;; + reload|force-reload) + echo -n "Reloading $DESC: " + configtest + killall -USR1 "${DAEMON##*/}" + echo "$NAME." + ;; + configtest) + configtest + ;; *) N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|reload|force-reload|configtest}" >&2 exit 1 ;; esac From patchwork Fri Oct 20 13:30:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glenn Strauss X-Patchwork-Id: 32654 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99864CDB474 for ; Fri, 20 Oct 2023 13:30:58 +0000 (UTC) Received: from smtp1.atof.net (smtp1.atof.net [52.86.233.228]) by mx.groups.io with SMTP id smtpd.web10.54234.1697808642990488032 for ; Fri, 20 Oct 2023 06:30:51 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: gluelogic.com, ip: 52.86.233.228, mailfrom: gs-yoctoproject.org@gluelogic.com) From: Glenn Strauss To: openembedded-core@lists.openembedded.org Cc: Glenn Strauss Subject: [PATCH 3/3] lighttpd: modernize lighttpd.conf Date: Fri, 20 Oct 2023 09:30:26 -0400 Message-ID: <20231020133026.103646-4-gs-yoctoproject.org@gluelogic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> References: <20231020133026.103646-1-gs-yoctoproject.org@gluelogic.com> Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 0.78 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 20 Oct 2023 13:30:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/189531 From: Glenn Strauss - remove obsolete modules - replace mod_compress directives with mod_deflate - do not enable debug.log-request-handling by default (should not be enabled *by default* on any production system, especially not an embedded system) - update TLS syntax for modern recommended use (separate files for certificate+chain, and private key) - remove incorrect comment about server.event-handler lighttpd defaults correctly to use kqueue on *BSD systems - remove ancient config which disables range requests for PDF (cargo-culted config from ~15 years ago to address problem in then-popular PDF client) - use recommend config file include syntax (more efficient and more deterministic include file ordering) Signed-off-by: Glenn Strauss --- .../lighttpd/lighttpd/lighttpd.conf | 38 ++++--------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf index 6e8402d242..47a6c93349 100644 --- a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf @@ -16,8 +16,6 @@ server.modules = ( # "mod_redirect", # "mod_alias", "mod_access", -# "mod_cml", -# "mod_trigger_b4_dl", # "mod_auth", # "mod_status", # "mod_setenv", @@ -27,11 +25,9 @@ server.modules = ( # "mod_evhost", # "mod_userdir", # "mod_cgi", -# "mod_compress", # "mod_ssi", -# "mod_usertrack", # "mod_expire", -# "mod_secdownload", +# "mod_deflate", # "mod_rrdtool", # "mod_webdav", "mod_accesslog" ) @@ -47,9 +43,6 @@ server.errorlog = "/www/logs/lighttpd.error.log" index-file.names = ( "index.php", "index.html", "index.htm", "default.htm" ) -## set the event-handler (read the performance section in the manual) -# server.event-handler = "freebsd-kqueue" # needed on OS X - # mimetype mapping mimetype.assign = ( ".pdf" => "application/pdf", @@ -115,7 +108,6 @@ mimetype.assign = ( #### accesslog module accesslog.filename = "/www/logs/access.log" -debug.log-request-handling = "enable" @@ -127,10 +119,6 @@ debug.log-request-handling = "enable" # of the document-root url.access-deny = ( "~", ".inc" ) -$HTTP["url"] =~ "\.pdf$" { - server.range-requests = "disable" -} - ## # which extensions should not be handle via static-file transfer # @@ -177,6 +165,7 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) #dir-listing.activate = "enable" ## enable debugging +#debug.log-request-header-on-error = "enable" #debug.log-request-header = "enable" #debug.log-response-header = "enable" #debug.log-request-handling = "enable" @@ -194,8 +183,9 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) #server.groupname = "wwwrun" #### compress module -#compress.cache-dir = "/tmp/lighttpd/cache/compress/" -#compress.filetype = ("text/plain", "text/html") +#deflate.cache-dir = "/tmp/lighttpd/cache/compress/" +#deflate.mimetypes = ("text/plain", "text/html") +#deflate.allowed-encodings = ("gzip") #### proxy module ## read proxy.txt for more info @@ -227,7 +217,8 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) #### SSL engine #ssl.engine = "enable" -#ssl.pemfile = "server.pem" +#ssl.pemfile = "/path/to/fullchain.pem" +#ssl.privkey = "/path/to/privkey.pem" #### status module #status.status-url = "/server-status" @@ -291,19 +282,6 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) #setenv.add-response-header = ( "X-Secret-Message" => "42" ) -## for mod_trigger_b4_dl -# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" -# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" ) -# trigger-before-download.trigger-url = "^/trigger/" -# trigger-before-download.download-url = "^/download/" -# trigger-before-download.deny-url = "http://127.0.0.1/index.html" -# trigger-before-download.trigger-timeout = 10 - -## for mod_cml -## don't forget to add index.cml to server.indexfiles -# cml.extension = ".cml" -# cml.memcache-hosts = ( "127.0.0.1:11211" ) - #### variable usage: ## variable name without "." is auto prefixed by "var." and becomes "var.bar" #bar = 1 @@ -328,4 +306,4 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) #var.a=1 # include other config file fragments from lighttpd.d subdir -include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" +include "/etc/lighttpd.d/*.conf"