Skip to content

jail: mount ucode related bits into netifd jail#34

Open
dhewg wants to merge 4 commits intoopenwrt:mainfrom
dhewg:uxc
Open

jail: mount ucode related bits into netifd jail#34
dhewg wants to merge 4 commits intoopenwrt:mainfrom
dhewg:uxc

Conversation

@dhewg
Copy link
Copy Markdown

@dhewg dhewg commented Apr 13, 2026

netifd gained ucode support on master, adapt the bind mounts so it works in a jail again.

While at it, the second patch disables the excessive uxc console logging.

/cc @dangowrt @aparcar

Related question:
With a self-built image from the main branch my veth setup doesn't come up automatically, I have to run ubus call network.interface.virt0 up first to make it work. Is that my setup or another difference between stable/main?

netifd gained ucode support, mount the required pieces to fix the
errors:

daemon.crit netifd: Error loading ucode script:
Syntax error: Unable to resolve path for module 'uci' In line 1, byte 27:
    `import * as uci from "uci";`
    Near here ----------------^
Syntax error: Unable to resolve path for module 'uloop' In line 2, byte 31:
    `import * as uloop from "uloop";`
    Near here --------------------^
Syntax error: Unable to resolve path for module 'ubus' In line 3, byte 32:
    `import * as libubus from "ubus";`
    Near here ---------------------^
Syntax error: Unable to resolve path for module 'fs' In line 4, byte 37:
    `import { access, dirname } from "fs";`
    Near here --------------------------^

Signed-off-by: Andre Heider <a.heider@gmail.com>
@dangowrt
Copy link
Copy Markdown
Member

1st commit is fine and can go in.
Disabling console logging is also fine in general, but not by commenting-out the ulog calls -- just turn them into DEBUG() calls instead.

This spams the logs with every in- and outcoming byte.

Signed-off-by: Andre Heider <a.heider@gmail.com>
@dhewg
Copy link
Copy Markdown
Author

dhewg commented Apr 13, 2026 via email

@dhewg
Copy link
Copy Markdown
Author

dhewg commented Apr 16, 2026 via email

@dangowrt
Copy link
Copy Markdown
Member

I appreciate the bug fix, but even if it seems trivial, please write a short commit message, not just the title.
Long-term we could try to get rid of basename "$foo" in dhcp.sh and just use ${foo##*/} instead...

dhewg added 2 commits April 23, 2026 11:24
./dhcp.sh: eval: line 33: md5sum: not found
./dhcp.sh: eval: line 33: cut: not found
./dhcp.sh: eval: line 107: /sbin/uci: not found
/bin/ipcalc.sh: line 5: basename: not found
/bin/ipcalc.sh: line 5: basename: not found

Signed-off-by: Andre Heider <a.heider@gmail.com>
Fix the typo to properly set the device group in the container namespace.

Signed-off-by: Andre Heider <a.heider@gmail.com>
@dhewg
Copy link
Copy Markdown
Author

dhewg commented Apr 23, 2026

Turns out basename is just used for a usage.
I removed the mount here, but this now depends on openwrt/openwrt#23060

dangowrt pushed a commit to dhewg/openwrt that referenced this pull request Apr 24, 2026
The netifd/dhcp flow uses this, and as uxc mounts netifd in a
container, this allows not mounting `basename` for just a usage.

References: openwrt/procd#34
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Andre Heider <a.heider@gmail.com>
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.

2 participants