libremesh / lime-packages

LibreMesh packages configuring OpenWrt for wireless mesh networking
https://libremesh.org/
GNU Affero General Public License v3.0
281 stars 96 forks source link

Move uhttpd.main.redirect_https setting from lime-system to shared-state and ubus-lime-metrics #953

Open ilario opened 1 year ago

ilario commented 1 year ago

As spotted by @hiurequeiroz, when using lime-system without uhttpd, an error appears when running lime-config:

Applying generic configs:
 uhttpd_https
 Error on generic config uci_set: uhttpd.main.redirect_https=0

This has been implemented in #799 and the error should not have any impact, but for avoiding the error message we can remove these lines from lime-system: https://github.com/libremesh/lime-packages/blob/78162b4d773c9e8d01f63801ce3464ea84ac89b6/packages/lime-system/files/etc/config/lime-defaults#L77-L78

and add them to an uci-defaults script inside the packages which benefit from this option (the ones which frequently fetch stuff via http/https) which are shared-state and ubus-lime-metrics.

If we want to avoid using uci-defaults scripts (as suggested by @G10h4ck here: https://github.com/libremesh/lime-packages/issues/927#issuecomment-1329384326) we would need something new like a /etc/config/lime-defaults.d/ directory (is this worth it???).

G10h4ck commented 1 year ago

If we want to avoid using uci-defaults scripts (as suggested by @G10h4ck here: #927 (comment)) we would need something new like a /etc/config/lime-defaults.d/ directory (is this worth it???).

It is not useful to substitute /etc/uci-defaults with etc/config/lime-defaults.d/ what I wanted to push is that we should do as much as possible at compile time, and not at runtime first-boot like /etc/uci-defaults but if something need to be done at runtime at first-boot /etc/uci-defaults is still the best place.

ilario commented 1 year ago

That was not my proposal, but it is not important.

The questions are: how much of a problem is this error showing up? and is it worth to solve it with a uci-defaults script? and is there an alternative solution that does not require a uci-defaults script?

ilario commented 2 weeks ago

Two years without alternative proposals, so uci-defaults should be ok. Anyway this issue has a low priority.