Firmware Selector Custom Build Dependency, other Comments

Thanks for providing the custom build feature on the firmware selector. Have tried it recently and found it very useful. When I had tried it many months ago, it didn't seem to work for my device. Works good now.

When doing a custom build on the selector is it supposed to include all dependencies? I saw a previous question, but there wasn't a definitive answer.

I included luci-app-wireguard and the resulting image did not have luci which should be a dependent package imho.

Couple comments the workflow is a bit confusing. After it completes, the list of packages reverts to the default list. That left me wondering if it built what I asked or not. Of course checking size, hashses and downloading I was able to confirm that it did.

1 Like

You can install Luci app wireguard but you need to install Luci app too, Luci ssl....

Thanks. I agree that is how it works. The question is, "Is this working as designed or a bug?"

And is the luci-app-wireguard an outlier or are dependencies generally not supported.

I was looking for a more general answer on dependencies not just what happens with luci.
Based on some more testing, I would say it like this.
The custom image builder handles dependencies. Generally, luci-app-X packages do not include luci as a dependency, therefore luci must be explicitly added to the package list.

Example case. luci-app-travelmate.
Note: Looks likek you need to use the -A in the opkg command to get the dependencies to output.

It has these dependencies:

root@tplinktest:/tmp# opkg depends -A luci-app-travelmate
luci-app-travelmate depends on:

And travelmate has these:

root@tplinktest:/tmp# opkg depends -A travelmate
travelmate depends on:

Testing a custom image build with the defaults:
base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7603 kmod-mt76x0e kmod-nft-offload libc libgcc libustream-wolfssl logd mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail swconfig uci uclient-fetch urandom-seed urngd wpad-basic-wolfssl

And adding:

I get all the luci-app-travelmate dependencies and all the travelmate dependencies, but I don't get luci. This is because luci is not a dependency for these packages.

Results from the package.

root@tplinktest:~# opkg list-installed | grep travelmate
luci-app-travelmate - git-22.232.72147-7971fe0
travelmate - 2.1.0-1

root@tplinktest:~# opkg list-installed | grep luci
luci-app-travelmate - git-22.232.72147-7971fe0
luci-lib-jsonc - git-22.097.61921-7513345

root@tplinktest:~# opkg list-installed | grep curl
curl - 7.86.0-2
libcurl4 - 7.86.0-2

You make generalization based on one package?

I've checked first few luci apps when listed alphabetically and most (tho not all yet) luci apps dependencies include either luci-compat or luci-base or luci-mod-admin-full, my understanding is that either of these should bring luci with it.

@jow can you please clarify in which cases the new (js-based) luci apps should depends on luci-base or luci-mod-admin-full and if luci-compat depends on either of these? Between me, @dibdot and @hnyman I'm sure we can do a tree-wide edit to include the proper luci components int he Makefiles.

Selecting a single LuCI app will not include the ui. You do need to select one of the collections ("luci", "luci-ssl") or essential components ("luci-base", "luci-theme-xxx") along with it.

It is not possible to make luci applications depend on a full luci installation as this would require forcing a theme selection.


Yea, I think you're still refrencing LuCi though. The thread I linked also covers the same 2 LuCI options - hence neither are a dependency (so you can choose):

I see. So what example of another package do you have, then?

I only know of LuCI doing what you described.

Could you please elaborate on what including dependency on luci-mod-admin-full and luci-compat will do then?

Not sure if I understand the question. Including this dependency will cause some parts of LuCI to be installed but it would still lack a theme, webserver, rpcd, cgi-io etc.

Packages should only depend luci-compat if they‘re Lua based and using outdated facilities like server side cbi.

Packages should not depend on luci-mod-admin-full as this would force components onto the user which are not required to run the app.

So there's no elegant way for a luci app to have dependencies to ensure luci is installed? Is luci-base safe to depend on?

@stangri I did spot check a few. I should have said I was looking for experts to confirm. This topic goes deeper than I knew.

root@tplinkrouter:/tmp# opkg depends -A luci-app-firewall
luci-app-firewall depends on:

root@tplinkrouter:/tmp# opkg depends -A luci-app-nextdns
luci-app-nextdns depends on:

root@tplinkrouter:/tmp# opkg depends -A luci-app-sqm
luci-app-sqm depends on:

@lleachii With the questions around luci, it wasn't clear to me what the builder did regarding dependencies in general. I think I understand now. For my travelmate test, I included luci-app-travelmate and the dependency caused it to include travelmate and the nested dependency caused it to include curl. That is how I got to, 'The custom image builder handles dependencies.'

@jow so what's the recommended luci package to include in the dependencies of a js-based luci-application? Should I include dependency on luci-base or remove any luci dependency?

Depending on luci-base is the best choice.

1 Like