Conversation
| $(INSTALL_DIR) $(1)/lib/upgrade/keep.d | ||
| $(INSTALL_DATA) ./files/rustdesk-server.upgrade $(1)/lib/upgrade/keep.d/rustdesk-server |
There was a problem hiding this comment.
This is not right. Why conffiles are not sufficient?
There was a problem hiding this comment.
conffiles covers /etc/config/rustdesk-server, which the package installs, and that is already listed.
The keep.d entry is for /etc/rustdesk/, where hbbs writes its key pair on first start. That pair is not in the package file list, so it has no conffiles entry and sysupgrade would drop it. Clients pin the server by that public key, so every client would need reconfiguring after an upgrade. keep.d is how tinc, fastd, ocserv and openvpn keep the same kind of runtime key material.
There was a problem hiding this comment.
It should not be marked as resolved as it isnt. Have you tested it with only conffiles? :)
There was a problem hiding this comment.
My mistake to mark as resolved. I tested it: the build turns every conffiles entry that is not shipped in the package into a generated /lib/upgrade/keep.d/<pkg> (include/package-pack.mk, KEEP_$(1) from the conffiles list), which is how dropbear keeps its host keys.
7d1db96 lists the two key files under conffiles and drops the hand-written keep.d file. In the VM the generated keep.d has the two paths and sysupgrade -l lists the config file and both keys.
You need to fix this in PR description. |
9fb5a10 to
b3ddf10
Compare
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
| PKG_SOURCE_URL:=https://codeload.github.com/rustdesk/rustdesk-server/tar.gz/$(PKG_VERSION)? | ||
| PKG_HASH:=846379e1555396ba8c8f26edbfbfb7f36618ef3e5d658b6022ed24617cf7edfa |
There was a problem hiding this comment.
nit: the PR body still describes the previous revision — it says "Source is the git tag, not the release tarball" and "No patches in this PR", while this revision uses the codeload tarball and adds patches/010-build-script-without-hbb_common.patch. It also gives the companion as openwrt/luci#8935, an issue, rather than the PR openwrt/luci#9058 named in the thread above.
Generated by Claude Code
b3ddf10 to
7d1db96
Compare
| empty because nothing reads it and a constant value keeps the build | ||
| reproducible. | ||
|
|
||
| Upstream-Status: Pending |
7d1db96 to
35d4d79
Compare
Adds the RustDesk self-hosted server built from the upstream 1.1.16 tag. The rustdesk-server package installs the ID server (hbbs) and the relay server (hbbr) with one procd init script and one UCI configuration file, and lists the key pair hbbs writes to /etc/rustdesk as conffiles, so the server identity survives an upgrade. The optional rustdesk-utils package installs the command line tool used to generate and validate key pairs. GitHub tarballs leave out the libs/hbb_common submodule, so it is fetched as a second tarball pinned to the commit the tag records. Architectures are limited to aarch64, arm, i386 and x86_64. The ring 0.16 crate in the dependency graph builds for no other target, which is also the set upstream builds itself. luci-app-rustdesk-server will depend on this package, so installing the LuCI application pulls the binaries in instead of leaving the user to copy them by hand. A patch replaces the build script so it no longer depends on hbb_common. Building that crate for the host also built libsodium-sys, which linked the target libsodium into a host binary and broke every cross build; the replacement writes src/version.rs from CARGO_PKG_VERSION with the standard library. Signed-off-by: Guilherme Cardoso <luminoso@gmail.com>
35d4d79 to
9dcdc8d
Compare
📦 Package Details
Maintainer: @luminoso (new package)
Description:
Adds the RustDesk self-hosted server, built from the upstream 1.1.16 tag.
Two packages come out of one Makefile:
rustdesk-server: the ID serverhbbsand the relay serverhbbr, one procd init script (/etc/init.d/rustdesk-server) and one UCI file (/etc/config/rustdesk-server). The key pair hbbs writes to/etc/rustdeskis listed under conffiles, so the server identity survives sysupgrade.rustdesk-utils: therustdesk-utilscommand line tool for generating and checking key pairs. Optional.Notes for review:
libs/hbb_commonsubmodule, pinned to the commit the tag records.src/version.rsfromCARGO_PKG_VERSIONwith std only. Upstream-Status: Pending.libsodiumonly. OpenSSL is a build-time dependency: hbb_common depends on tokio-native-tls, so openssl-sys has to compile, but neither daemon calls it and the linker drops libssl and libcrypto.readelf -don hbbs and hbbr lists libsodium, libgcc_s and libc.ring 0.16crate in the dependency graph builds for no other target, which is also the set upstream builds. Widening needs upstream to move tojsonwebtoken9 and thesqlxnative-tls runtime./usr/libexec/rustdesk-hbb, a four line wrapper that doescd /etc/rustdeskand execs the binary. Both daemons write their key pair to the working directory, and the wrapper name gives a stable syslog ident. The directory is created 0700.open_firewallis set, and signals fw4 fromservice_startedandservice_stopped. hbbs opens the ID, NAT test and web socket TCP ports plus the UDP ID port; hbbr opens the relay and web socket ports. Default is off./tmpon purpose: it is a cache of client registrations that clients redo on their next heartbeat, and hbbs writes it on every registration.Motivation: openwrt/luci#8946 and openwrt/luci#8935.
luci-app-rustdesk-serverin the luci feed ships an init script but no binaries, so users copiedhbbsandhbbrin by hand. Companion PR that makes the app depend on this package: openwrt/luci#9058. The current app owns the init script and config paths, so that PR has to follow this one.🧪 Run Testing Details
Checked in the VM: both daemons listen on all six ports, syslog ident is
rustdesk-hbb[pid], the six fw4 accept rules appear on start and disappear on stop with no manual firewall reload,hbbs --versionprints 1.1.16,sysupgrade -llists the config file and both key files, and a sysupgrade keeps them.test-version.shchecks both binaries. Only an x86_64 SDK is available here; the aarch64 and arm CI jobs are the cross-build check.✅ Formalities
If your PR contains a patch:
git ammake package/rustdesk-server/refresh V=s