nginx-util: add package#10960
Conversation
ebec6bd to
a6986f0
Compare
| CATEGORY:=Network | ||
| SUBMENU:=Web Servers/Proxies | ||
| TITLE:=Builder of LAN listen directives for Nginx | ||
| DEPENDS:=+libstdcpp +libubus +libubox +libpthread |
There was a problem hiding this comment.
Out of curiosity, does this build with uClibc++?
There was a problem hiding this comment.
Right now it is not working, it complains about missing array, mutex, string_view and thread libraries. At least in my test, maybe I am doing it wrong: Do I have to include only uclibc++.mk and use $(CXX_DEPENDS) in the Makefile?
|
Where does the code for this come from? If it is homegrown, I strongly recommend running it against clang-tidy. |
|
Thank you for the comments, I will look into it :-) |
a6986f0 to
8220ca2
Compare
|
I did change the code according to
What do you think? Edit: Right now I cannot test it, I will do that on Monday. |
|
Ahem. cmake has direct support for clang-tidy. The checks it can grab from a .clang-tidy file in the same directory. I will try to review the changes. |
Tested with libcxx. |
| #endif | ||
|
|
||
| // once a year: | ||
| static constexpr auto CRON_INTERVAL = std::string_view{"3 3 12 12 *"}; |
There was a problem hiding this comment.
fuchsia-statically-constructed-objects warns about static here. Correct me if I'm wrong, but static on a constexpr function is useless, no?
There was a problem hiding this comment.
There can be a difference between static constexpr and constexpr in general as explained at stackoverflow. But, here it is maybe pointless. Would it be better to remove it? I will remove it at least for the literals _server_name and co. They exist only for using them in the template …
Figured it out: |
This can do the main work of nginx/nginx-ssl init script. For nginx-ssl it can create selfsigned certificates, too. It uses libpcre and libopenssl iff nginx(-ssl) uses them. Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
8220ca2 to
e054f34
Compare
|
I think I forgot to |
|
Hrm yeah it is. Never mind then. |
|
Thank you for pointing me to it :-) |
|
:) sure. BTW the fuschia warnings are specific to google's kernel. They can be ignored. |
|
Anyway, merging. The libcxx stuff is neither here nor there. It will be dealt with in separate commits. |
Maintainer: me
Compile tested: MIPS 74K, Asus RT-N16, master snapshot
Run tested: MIPS 74K, Asus RT-N16, master snapshot, run nginx-util [init_lan|get_env [name]|add_ssl _lan] using the file
/etc/nginx/conf.d/_lan.conf:Description: This utility builds dynamically LAN listen directives for nginx.
For nginx-ssl, this tool manages SSL directives for its server parts and can create corresponding (self-signed) certificates using libopenssl, too.
So, it can do the main work of nginx/nginx-ssl init script as proposed in #9859 which will be superseeded by a version using this tool.
There would be also a px5g implementation using libopenssl. Should I activate it/move it to another package?