Conversation
|
Future possible changes: lighttpd 1.4.56 and later add support for alternative TLS libraries. In addition to lighttpd mod_openssl, there is now lighttpd mod_gnutls, lighttpd mod_mbedtls, lighttpd mod_wolfssl, and lighttpd mod_nss. For resource-constrained embedded systems, lighttpd mod_mbedtls using mbedtls, or lighttpd mod_wolfssl using wolfssl, is recommended due to having a smaller footprint than openssl. The lighttpd.conf syntax to configure lighttpd TLS modules is almost identical across TLS modules, with the most important exception being TLS-library-specific spellings of ciphers. If using lighttpd TLS defaults, this is a non-issue since a custom cipher list does not need to be specified in lighttpd.conf. |
567caa4 to
215b4ba
Compare
|
lighttpd no longer ships I pushed a change to fix that in Note: It is interesting that many of the jobs in the CI matrix were successful (without attempting to lighttpd). |
|
The CI fails here: lighttpd mod_evasive and lighttpd mod_usertrack were removed in lighttpd 1.4.68, and can be replaced with lua scripts Where is the CI getting lighttpd.conf from which it generates the static plugin list? https://github.com/phoenix-rtos/phoenix-rtos-project/blob/master/_fs/root-skel/etc/lighttpd.conf Related, why is that in phoenix-rtos/phoenix-rtos-project instead of part of phoenix-rtos/phoenix-rtos-ports? I would suggest improvements to that lighttpd.conf, but some improvements require a base version of lighttpd.
WTH? Why does phoenix-rtos set |
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/time.h.html That's actually a funny fact that the standard does not define signedness of |
|
Yes, you're correct that the sign of
Yes. Given that some time functions return -1 on error induces the need to cast |
|
@agkaminski Where is the CI getting lighttpd.conf from which it generates the static plugin list? That is what is causing the CI failure. |
Not really my piece of cake, but I see it only in the generic rootfs skel in the OS main repository: Regarding the warning - IMHO let it stay to further motivate |
Well, there is one place in lighttpd which fails due to underflow and wraparound of unsigned (where signed time_t was incorrectly expected), but it is in a less-used feature for mod_dirlisting caching. |
Thank you for pointing out this issue and for the PR in general |
|
As you and I pointed out, https://github.com/phoenix-rtos/phoenix-rtos-project/blob/master/_fs/root-skel/etc/lighttpd.conf is the likely origin of mod_evasive and mod_usertrack in the CI. If @Darchiv would like to switch from lighttpd mod_openssl to lighttpd mod_mbedtls for lower resource use, then the CI will run into this issue again since the lighttpd.conf is in a separate repo and is not matched in lock-step with the lighttpd build configuration in this repo. |
|
@Darchiv |
signedness of time_t is not specified by the standards, though most sane systems use a signed type for time_t. phoenix-rtos currently defines time_t as unsigned long long int x-ref: phoenix-rtos/phoenix-rtos-ports#90 phoenix-rtos/phoenix-rtos-project#1261
The phoenix-rtos-project repository contains a reference project, which is the fastest way to start using Phoenix-RTOS. A custom project can use this repository (via forking or any other way) and override configuration stored in root-skel. Hence, if a project needs mod_mbedtls, it can use a custom
Maybe module listing can be improved, but it still has to be configurable per-project - for example by an env variable exported by the project. This can be more cumbersome and error-prone than just using an up-to-date lighttpd.conf, though. Have you checked that mod_wstunnel still builds? You have removed its patch, but I assume that autogen.sh will properly include it into the build.
Employing lua just for this small mod_compress fix-up may be too much of a burden on an embedded system. Maybe there should be an (optional) way to patch mod_deflate in the same manner as mod_compress. Just pointing out the not-so-obvious use cases we have to cover. Your PR is nevertheless valuable. |
There are many approaches to do this. lighttpd provides the mechanism Please review phoenix-rtos/phoenix-rtos-project#1262, which is a prerequisite to this PR.
lighttpd CI builds lighttpd on many platforms (phoenix-rtos is not part of lighttpd CI) and I have made many improvements to lighttpd since the 1.4.53 version hard-coded in the phoenix-rtos reference build. If mod_wstunnel does not build on phoenix-rtos, then I would like to fix the issue upstream, if possible. The phoenix-rtos project commit message for
Similar to above, the commit for If someone developing embedded systems is using lighttpd, then as a lighttpd developer, I recommend the documentation: If there is a need for Content Negotiation for pre-compressed files and if an embedded system has low resources, then I would recommend omitting mod_deflate and zlib and instead using lighttpd mod_magnet and lua. You'll likely find the disk, memory footprint, and CPU usage to be similar for Content-Negotiation for pre-compressed files. If Content Negotiation for pre-compressed files must be in C on resource-constrained embedded systems, then I still recommend omitting mod_deflate, and instead writing a custom module based on lighttpd the simple mod_staticfile.c to perform the specific Content Negotation for pre-compressed files. |
|
ping.
|
1 similar comment
|
ping.
|
215b4ba to
725511b
Compare
|
ping.
|
725511b to
f38ca33
Compare
With the merge of phoenix-rtos/phoenix-rtos-project#1262 (thank you) and a minor update to Similar to phoenix-rtos/phoenix-rtos-project#1262, this PR cleans up plenty of technical debt, removing all patches that were previously added to lighttpd by phoenix-rtos-project. |
These tickets are for internal projects and are not to be viewed by people not part of the phoenix-rtos team. You are right that customizations should not alter the core software or official modules, especially since this is a port and not a fork. We will probably create a separate custom module (entirely in C) for pre-compressed files, as you have suggested. When it comes to plugin_static.h and grepping modules, changing the approach is out-of-scope of this PR. I think we can get back to this issue once we update lighttpd. Before merging, please resolve the following issues:
|
* update to lighttpd 1.4.79 * do not error out if patches/*.patch do not exist * revert part of 6cb7bac build: adapt to gcc 14.2 (JIRA: RTOS-927) which modified lighttpd/build.sh to add -Wno-error=implicit-function-declaration * run ./autogen.sh to autoreconf -fi before ./configure lighttpd build
f38ca33 to
97fe53b
Compare
|
Apologies for my delayed response. I wanted to get a bug-fix included in the lighttpd 1.4.79 release.
Done.
Done. I removed that change. As you noted there, it would have been better as a standalone patch taken from upstream rather than modifying the compiler flags. (Also, I would have patched it sooner had the compilation portability issue been reported upstream.)
As I can not read minds, and can not read tickets to which I have no access, I do not have the context or requirements behind that feature. Still, I highly recommend taking a look at https://wiki.lighttpd.net/mod_magnet and |
|
(#85 Reference to the patch introducing For the future, if you are interested in reducing memory and disk usage, please see https://wiki.lighttpd.net/Docs_SSL and evaluate lighttpd mod_mbedtls or lighttpd mod_wolfssl which use TLS libraries aimed at embedded systems, rather than lighttpd mod_openssl which relies on the larger openssl libraries. |
Darchiv
left a comment
There was a problem hiding this comment.
Thanks for addressing my nitpicks. Everything compiles nicely, so I'm merging the upgrade now.
| for patchfile in "${PREFIX_PORT}"/patches/*.patch; do | ||
| if [ ! -f "$patchfile" ]; then | ||
| continue; | ||
| fi |
There was a problem hiding this comment.
FYI: in phoenix-rtos-ports/build.subr we have common helper functions, currently only download and patch functions, which are meant to be more sophisticated and cover most build use cases in ports. See phoenix-rtos-ports/lua/build.sh for an example usage. Not all ports were rewritten to use these functions (yet).
Rewriting this build.sh is probably out of scope of this PR, but feel free to do it later.
Description
lighttpd 1.4.79
Motivation and Context
modern lighttpd with bug fixes and HTTP/2 (optional)
Types of changes
[Edit] These mod_compress -> mod_deflate breaking changes are less likely to affect many maintainers since https://github.com/phoenix-rtos/phoenix-rtos-project/blob/master/_fs/root-skel/etc/lighttpd.conf does not list mod_compress (or mod_deflate), and so it would have had to be added manually by the maintainer.
How Has This Been Tested?
Tested by lighttpd CI on many platforms, but not on phoenix-rtos. Submitting this PR will test build on phoenix-rtos.
Checklist:
Special treatment