Skip to content

51ddns-agent: add package - #30345

Draft
21hkcloud wants to merge 1 commit into
openwrt:openwrt-24.10from
21hkcloud:codex/51ddns-agent-0.6.3-openwrt-24.10
Draft

51ddns-agent: add package#30345
21hkcloud wants to merge 1 commit into
openwrt:openwrt-24.10from
21hkcloud:codex/51ddns-agent-0.6.3-openwrt-24.10

Conversation

@21hkcloud

Copy link
Copy Markdown

Purpose

Add 51ddns-agent to 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

  • Builds v0.6.3 from Apache-2.0 licensed source.
  • Uses the feed-provided frpc package at runtime.
  • Runs as the dedicated unprivileged ddns51 user with no_new_privs.
  • Uses ujail when available and keeps small-flash targets supported when it is not.
  • Does not bundle LuCI; the interface remains a separate openwrt/luci submission.

Verification

The package was built from the official OpenWrt 24.10.8 SDK for all four target architectures:

  • x86_64
  • aarch64_cortex-a53
  • mips_24kc
  • mipsel_24kc

Build run: https://github.com/21hkcloud/51ddns-openwrt/actions/runs/32445985271

The four jobs completed successfully and produced 51ddns-agent_0.6.3-r1_*.ipk artifacts.

This release-branch submission also supports the iStore integration request in linkease/istore-repo#749, where both APK and IPK availability were requested.

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]>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 38a120c "51ddns-agent: add package" — the (cherry picked from commit 306cde7775be65cb9060719b0782915377c0c2c5) trailer names a commit that is not in openwrt/packages. 306cde7 is the current head of #30158, which is still open and labelled NAK; it has never been merged to master. The trailer makes this look like a backport of an accepted change when there is no upstream commit behind it. Also, the trailer sits above Signed-off-by: rather than below it, which is not where git cherry-pick -x puts 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

Comment thread net/51ddns-agent/Makefile

include $(TOPDIR)/rules.mk

PKG_NAME:=51ddns-agent

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Putting this into draft.

--oem-voucher-file "$oem_voucher_file" \
--control-api-url "$control_url" \
--frpc-path /usr/bin/frpc \
--config-path "$RUNTIME_DIR/frpc.toml"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +91 to +94
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/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

Comment thread net/51ddns-agent/Makefile
PKG_HASH:=102188815ddacc31777c47d2565921a002123632aa03004b4fb599c532ae9e0c
PKG_BUILD_DIR:=$(BUILD_DIR)/51ddns-openwrt-$(PKG_VERSION)

PKG_MAINTAINER:=Jinshuan Wang <[email protected]>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@BKPepe
BKPepe marked this pull request as draft August 21, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants