51ddns-agent: add package - #30345
Conversation
Add the open-source client for the vendor-hosted 51DDNS remote-access service. Build v0.6.3 from Apache-2.0 licensed source and use the feed-provided frpc package at runtime. Run as the dedicated unprivileged ddns51 user with no_new_privs, and enter an ujail where the target provides it. Keep small-flash targets supported when ujail is unavailable. Keep the LuCI application in its separate openwrt/luci submission and exclude it from the agent source archive. (cherry picked from commit 306cde7) Signed-off-by: Shake Cloud Inc <[email protected]>
e098293 to
38a120c
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
38a120c"51ddns-agent: add package" — the(cherry picked from commit 306cde7775be65cb9060719b0782915377c0c2c5)trailer names a commit that is not inopenwrt/packages.306cde7is the current head of #30158, which is still open and labelledNAK; it has never been merged tomaster. The trailer makes this look like a backport of an accepted change when there is no upstream commit behind it. Also, the trailer sits aboveSigned-off-by:rather than below it, which is not wheregit cherry-pick -xputs it.
The main concern is the target branch — see the inline comment on the Makefile. Of the technical findings, the frpc config-format one is the only defect introduced by moving this diff to openwrt-24.10; the rest carry over from #30158 and are better settled there.
Generated by Claude Code
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=51ddns-agent |
There was a problem hiding this comment.
This adds a brand-new package directly to the openwrt-24.10 release branch. CONTRIBUTING.md:143-144 is explicit about this:
- Please ONLY cherry-pick or commit security and bug-fixes to these branches.
- Do NOT add new packages and do NOT do major upgrades of packages here.
net/51ddns-agent does not exist on master either — #30158 is still open and carries a NAK label — so there is nothing to cherry-pick yet. The normal order is: land on master first, then backport if a maintainer agrees it qualifies. I'd hold this PR until #30158 is resolved.
Everything below is on the assumption that the package does eventually get here; the frpc point in particular is specific to this branch and would need fixing even after #30158 lands.
Generated by Claude Code
| --oem-voucher-file "$oem_voucher_file" \ | ||
| --control-api-url "$control_url" \ | ||
| --frpc-path /usr/bin/frpc \ | ||
| --config-path "$RUNTIME_DIR/frpc.toml" |
There was a problem hiding this comment.
This is the one place where cherry-picking verbatim from the master branch breaks on openwrt-24.10.
The agent is told to hand frpc a TOML config, but openwrt-24.10 ships net/frp at PKG_VERSION:=0.51.3, which is INI-only — that same Makefile still installs frpc_full.ini. TOML/YAML/JSON config support landed in frp v0.52.0. On master the dependency resolves to frp 0.70.1, which is why this works there and not here.
So with DEPENDS:=... +frpc satisfied by 0.51.3, the generated /var/lib/51ddns/frpc.toml will be rejected by frpc at startup and no tunnel will come up. The PR description reports source-build verification for four architectures, but a build does not exercise this — it would only show up at runtime.
Either emit an INI config for this branch, or make the dependency an explicit version floor that 24.10 cannot satisfy so the mismatch is caught at install time rather than at runtime.
Generated by Claude Code
| procd_add_jail_mount /bin/sleep | ||
| procd_add_jail_mount /usr/bin/51ddns-agent | ||
| procd_add_jail_mount /usr/bin/frpc | ||
| procd_add_jail_mount /usr/bin/logger |
There was a problem hiding this comment.
/bin/sleep and /usr/bin/logger are mounted because the wrapper uses them, but neither /usr/libexec/51ddns-agent-start (the actual command, line 62) nor its interpreter /bin/sh is mounted. ujail resolves the executable it is asked to run plus its ELF dependencies; a #!/bin/sh script has no ELF dependencies to walk, so the interpreter would have to be mounted explicitly.
Note that other in-tree jails do not mount their own binaries at all — postgresql.init:58-61 and boinc-client.init:52-57 mount only data paths — which suggests the explicit /usr/bin/51ddns-agent mount here is redundant while the one that actually matters for a shell wrapper is missing.
Was the jail path re-tested after the 51ddns-agent-start wrapper was introduced? If /bin/sh is genuinely needed, add it here; if ujail handles the shebang, the /bin/sleep and /usr/bin/logger mounts are the ones that look inconsistent.
Generated by Claude Code
| PKG_HASH:=102188815ddacc31777c47d2565921a002123632aa03004b4fb599c532ae9e0c | ||
| PKG_BUILD_DIR:=$(BUILD_DIR)/51ddns-openwrt-$(PKG_VERSION) | ||
|
|
||
| PKG_MAINTAINER:=Jinshuan Wang <[email protected]> |
There was a problem hiding this comment.
nit: PKG_MAINTAINER is Jinshuan Wang <[email protected]>, but this PR's single commit is authored and signed off as Shake Cloud Inc <[email protected]> — same address, different identity. On #30158 the maintainer field was deliberately changed to the personal name after the formality bot rejected the earlier author name, so the commit here looks like it drifted back. Worth making the sign-off match the PKG_MAINTAINER name.
Generated by Claude Code
Purpose
Add
51ddns-agentto the OpenWrt 24.10 package feed so opkg/IPK systems can install the same open-source agent proposed for the main branch in #30158.Package properties
frpcpackage at runtime.ddns51user withno_new_privs.ujailwhen available and keeps small-flash targets supported when it is not.openwrt/lucisubmission.Verification
The package was built from the official OpenWrt 24.10.8 SDK for all four target architectures:
Build run: https://github.com/21hkcloud/51ddns-openwrt/actions/runs/32445985271
The four jobs completed successfully and produced
51ddns-agent_0.6.3-r1_*.ipkartifacts.This release-branch submission also supports the iStore integration request in linkease/istore-repo#749, where both APK and IPK availability were requested.