Skip to content

package: declare the runtime binaries these scripts have been inheriting - #2305

Merged
openipc-ai merged 1 commit into
masterfrom
declare-runtime-deps
Aug 24, 2026
Merged

package: declare the runtime binaries these scripts have been inheriting#2305
openipc-ai merged 1 commit into
masterfrom
declare-runtime-deps

Conversation

@openipc-ai

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2304. Dropping BR2_PACKAGE_JSONFILTER from every defconfig exposed that wifibroadcast-ng ran jsonfilter without ever selecting it — it had worked purely because every defconfig happened to set the symbol for the WebUI's benefit. 630e3bb fixed that one during review. This is the rest of the same class.

Found by mapping binary → owning package from each .mk's install paths, grepping every shipped #! script for those names, and subtracting whatever the calling package already selects.

package undeclared runtime dependency
wifibroadcast-ng yaml-cli (:243), yaml-cli-multi (:71), curl (:129)
quirc-openipc curl, in files/qrscan.sh — installed to /usr/sbin and started at boot by S97qrscan whenever wlandev is set
sigmastar-osdrv-infinity6e yaml-cli, nine times in files/script/zoom.sh, which ships because the .mk installs files/script/* wholesale into /usr/bin
adaptive-link yaml-cli-multi, which its .mk lists in _DEPENDENCIES — build ordering, not Kconfig enablement

curl needs both symbols

BR2_PACKAGE_LIBCURL_OPENIPC_CURL lives inside if BR2_PACKAGE_LIBCURL_OPENIPC, so selecting only the sub-option leaves it inert. Both are selected.

Incidental find while checking this: 28 ultimate defconfigs set the curl sub-option without the parent. They are fine — uacme-openipc selects the parent — but that is the same implicit chain this PR is trying to stop relying on.

How reachable is any of this

Only one case is live. yaml-cli is in 122 of 125 defconfigs and the curl binary in the same 122, so those held by luck exactly the way jsonfilter did — every board that needs them has them today. The three without are s2l22m_lite, s2l33m_lite and hi3519dv500_toolchain, none of which enables the affected packages.

yaml-cli-multi is the real one: it was never guaranteed anywhere, and is absent from a stock lite image — checked on the ssc30kq lab board, which yaml-cli-multi → nothing. Enabling wifibroadcast-ng or adaptive-link there today ships a script that fails at runtime, on a drone.

Two the sweep flagged that are NOT fixed

Neither dependency is real, so a select would have been wrong:

  • baresip-openipc — the only curl line in files/dtmf_0.sh is commented out (# timeout 2 curl -s …).
  • comgtfiles/mywifi_tg.sh is never installed; comgt.mk ships only the comgt binary.

Verification

kconfiglib over all four packages plus their select targets — parses clean, every selected symbol resolves, no unmet dependencies:

all Config.in parsed OK

with all four enabled, the depended-on symbols resolve to:
    BR2_PACKAGE_LIBCURL_OPENIPC            = y   <-- OK
    BR2_PACKAGE_LIBCURL_OPENIPC_CURL       = y   <-- OK
    BR2_PACKAGE_YAML_CLI                   = y   <-- OK
    BR2_PACKAGE_YAML_CLI_MULTI             = y   <-- OK
    BR2_PACKAGE_JSONFILTER                 = y   <-- OK

unmet-dependency warnings: none

Repo gates:

ci-matrix: self-test ok (99 boards, 132 packages, 52 cases)
checked 129 shell script(s) — all parsed clean under busybox ash
checked 48 run block(s) — all run blocks parse clean

No image changes on any board in the matrix: every symbol these now select is already enabled wherever the selecting package is enabled. NOT_BUILT is unchanged — yaml-cli-multi, wifibroadcast-ng and adaptive-link all stay unbuilt here, and --self-test will say so if that ever changes.

Test plan

  • kconfiglib confirms all four parse and every select resolves with no unmet dependencies
  • ci-matrix.py --self-test passes, NOT_BUILT unchanged
  • test_shell_parse.sh and lint-workflow-shell.py pass
  • Each call site confirmed to be a real, shipped, executed invocation — and the two that are not were left alone
  • yaml-cli-multi absence confirmed on real hardware (ssc30kq)
  • Full board matrix — runs here

Follow-up to #2304. Dropping BR2_PACKAGE_JSONFILTER from every defconfig showed
that wifibroadcast-ng ran jsonfilter without selecting it; 630e3bb fixed that
one. This is the rest of the same class, found by mapping binary -> owning
package from each .mk's install paths, grepping every shipped script for those
names, and subtracting what the caller already selects.

  wifibroadcast-ng   yaml-cli (:243), yaml-cli-multi (:71), curl (:129)
  quirc-openipc      curl, in files/qrscan.sh -- installed to /usr/sbin and
                     started at boot by S97qrscan whenever wlandev is set
  sigmastar-osdrv-infinity6e
                     yaml-cli, nine times in files/script/zoom.sh, which ships
                     because the .mk installs files/script/* wholesale
  adaptive-link      yaml-cli-multi, which its .mk lists in _DEPENDENCIES --
                     build ordering, not Kconfig enablement

curl needs both symbols: the binary is a sub-option inside
`if BR2_PACKAGE_LIBCURL_OPENIPC`, so selecting only BR2_PACKAGE_LIBCURL_OPENIPC_CURL
leaves it inert. Verified with kconfiglib that all four packages parse, that
every selected symbol resolves to y with them enabled, and that there are no
unmet-dependency warnings.

Only one of these is reachable today. yaml-cli is in 122 of 125 defconfigs and
the curl binary in the same 122, so those two held by luck the way jsonfilter
did. yaml-cli-multi was never guaranteed anywhere and is absent from a stock
lite image -- checked on the ssc30kq lab board -- so enabling wifibroadcast-ng
or adaptive-link there ships a script that fails at runtime on a drone.

Two packages the sweep flagged are NOT fixed, because neither dependency is
real: baresip-openipc's files/dtmf_0.sh has its only curl line commented out,
and comgt's files/mywifi_tg.sh is never installed -- comgt.mk ships just the
comgt binary.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Declare runtime tool dependencies for shipped scripts (yaml-cli, yaml-cli-multi, curl)

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add Kconfig selects for runtime binaries invoked by installed shell scripts.
• Ensure the curl binary is enabled by selecting both libcurl-openipc and its curl option.
• Stop relying on defconfigs to “inherit” tools, preventing lite-image runtime failures.
Diagram

graph TD
  WFB["wifibroadcast-ng"] --> YAML["yaml-cli"] --> YAMLM["yaml-cli-multi"] --> CURL["curl (libcurl-openipc)"]
  WFB --> JSONF["jsonfilter"]
  QUIRC["quirc-openipc"] --> CURL
  SIGMA["sigmastar osdrv i6e"] --> YAML
  AL["adaptive-link"] --> YAMLM
Loading
High-Level Assessment

Selecting runtime tool packages via Kconfig is the right fix: it guarantees required binaries are present whenever the owning package is enabled. Relying on defconfigs or .mk build-order dependencies is fragile and can produce images that boot but fail at runtime; adding script-side checks would only fail later and still wouldn’t ensure the tools ship.

Files changed (4) +25 / -0

Bug fix (2) +16 / -0
Config.inSelect libcurl-openipc and curl option for qrscan.sh +6/-0

Select libcurl-openipc and curl option for qrscan.sh

• Adds 'select BR2_PACKAGE_LIBCURL_OPENIPC' and 'select BR2_PACKAGE_LIBCURL_OPENIPC_CURL' to ensure the curl binary is built and installed. Comment clarifies curl is a sub-option and 'qrscan.sh' is started at boot when 'wlandev' is set.

general/package/quirc-openipc/Config.in

Config.inDeclare yaml-cli/yaml-cli-multi/curl runtime dependencies +10/-0

Declare yaml-cli/yaml-cli-multi/curl runtime dependencies

• Adds selects for 'BR2_PACKAGE_YAML_CLI', 'BR2_PACKAGE_YAML_CLI_MULTI', and both 'BR2_PACKAGE_LIBCURL_OPENIPC' + 'BR2_PACKAGE_LIBCURL_OPENIPC_CURL' to match the 'wifibroadcast' script’s actual runtime calls. Comment explains these were historically satisfied implicitly and that yaml-cli-multi is particularly likely to be missing on lite images.

general/package/wifibroadcast-ng/Config.in

Other (2) +9 / -0
Config.inSelect yaml-cli-multi for adaptive-link runtime usage +4/-0

Select yaml-cli-multi for adaptive-link runtime usage

• Adds 'select BR2_PACKAGE_YAML_CLI_MULTI' so enabling adaptive-link also includes the yaml-cli-multi binary in the image. Documents why '_DEPENDENCIES' in the .mk is insufficient for runtime availability.

general/package/adaptive-link/Config.in

Config.inSelect yaml-cli for installed zoom.sh script +5/-0

Select yaml-cli for installed zoom.sh script

• Adds 'select BR2_PACKAGE_YAML_CLI' because scripts under 'files/script/*' are installed into '/usr/bin' and 'zoom.sh' invokes yaml-cli repeatedly to read '.video0.size'. Comment notes this previously worked only due to widespread defconfig enablement.

general/package/sigmastar-osdrv-infinity6e/Config.in

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit 1c3d208 into master Aug 24, 2026
111 of 112 checks passed
@openipc-ai
openipc-ai deleted the declare-runtime-deps branch August 24, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant