feat(ikuai): add native app market package with LuCI-equivalent config#512
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
cd1aed8 to
5f394d4
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
Expand option.json to cover LuCI settings, fix double-bind when UI port changes, harden env parsing in start.sh, and rewrite the user readme. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
Drop nohup from start.sh and write manifest version without the v prefix. Also ignore macOS .DS_Store files. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4b3f9378f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR adds first-class iKuai “native app market” packaging for rtp2httpd, allowing it to run directly on iKuai routers (type 0) with lifecycle hooks, a UI-driven option.json configuration surface, and a build script that produces a distributable .ipkg.
Changes:
- Added
ikuai-support/rtp2httpd/native package layout (manifest, scripts, UI metadata, default env/config, and end-user readme/changelog). - Implemented start/stop + install/uninstall lifecycle scripts that assemble CLI flags from UI-managed environment variables and write logs/pidfiles under the package directory.
- Added
scripts/build-ikuai-ipkg.shto stage the package, inject icon + release binary, and produceikuai-support/dist/rtp2httpd-<version>-<arch>.ipkg(and updated.gitignoreaccordingly).
Reviewed changes
Copilot reviewed 15 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/build-ikuai-ipkg.sh | Stages and builds the iKuai .ipkg, syncing manifest version/image and injecting binary + icon. |
| ikuai-support/rtp2httpd/ui/ico/.gitkeep | Keeps icon directory present in git. |
| ikuai-support/rtp2httpd/scripts/start.sh | Starts rtp2httpd, loading .env/environment, assembling CLI flags, writing pid/log. |
| ikuai-support/rtp2httpd/scripts/stop.sh | Stops rtp2httpd via pidfile with TERM/KILL fallback and run logging. |
| ikuai-support/rtp2httpd/scripts/PRE_INST.sh | Pre-install hook to create dirs and set binary executable bit. |
| ikuai-support/rtp2httpd/scripts/POST_INST.sh | Post-install hook to ensure binary mode and log install status. |
| ikuai-support/rtp2httpd/scripts/PRE_UNINST.sh | Pre-uninstall hook to stop the service and log uninstall status. |
| ikuai-support/rtp2httpd/scripts/POST_UNINST.sh | Post-uninstall hook to remove pidfile and log uninstall status. |
| ikuai-support/rtp2httpd/readme | End-user usage guide for iKuai users (Chinese). |
| ikuai-support/rtp2httpd/changelog | iKuai package changelog. |
| ikuai-support/rtp2httpd/manifest.json | iKuai app manifest (name/version/image/type/requirements). |
| ikuai-support/rtp2httpd/app/option.json | iKuai UI configuration schema mapping to env vars consumed by start.sh. |
| ikuai-support/rtp2httpd/app/.env | Default UI-configurable environment variables for the package. |
| ikuai-support/rtp2httpd/app/environment | Optional runtime env overlay loaded after .env. |
| ikuai-support/rtp2httpd/app/config/rtp2httpd.conf | Advanced config fallback file for settings not represented in UI. |
| ikuai-support/rtp2httpd/app/bin/.gitkeep | Keeps the bin directory present in git. |
| ikuai-support/rtp2httpd/log/run.log | Placeholder runtime log file in package tree. |
| ikuai-support/rtp2httpd/log/install.log | Placeholder install/uninstall log file in package tree. |
| .gitignore | Ignores iKuai staging/dist outputs and macOS .DS_Store. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Redact r2h-token in startup logs, verify pidfile ownership via /proc before stopping, and ensure log directory exists in install hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-512.eastasia.1.azurestaticapps.net |
Summary
Adds a native iKuai app market package for rtp2httpd (
type: 0), running directly on the router viascripts/start.sh/scripts/stop.shinstead of Docker Compose. The package bundles a static Linux binary, lifecycle hooks, user-facing readme, andoption.jsonmetadata so most settings can be configured from the iKuai app UI.What's included
ikuai-support/rtp2httpd/following iKuai's native app structure (manifest.json,app/,scripts/,ui/,readme,changelog)log/run.logoption.jsonfields covering the same settings as the OpenWrt LuCI app (listen address/port, upstream interfaces, performance tuning, external M3U, auth, CORS, FFmpeg snapshot, etc.)app/config/rtp2httpd.confreserved for UI-unavailable settings (e.g. inline[services]channel list); UI-managed values are passed via CLI and take precedencescripts/build-ikuai-ipkg.shstages the package, injects the release binary and app icon, syncsmanifest.jsonversion/arch, and producesikuai-support/dist/rtp2httpd-<version>-<arch>.ipkgNotable implementation details
start.shpasses UI settings as command-line flags and loads--configlast, avoiding a double-bind bug when the bundled config contained a[bind]section.envis parsed line-by-line (not sourced) so values with spaces or shell metacharacters are handled safely0/1integers inoption.jsonbecause iKuai's schema has no documented switch/list types for native appseth1) since iKuai has no device selector widgetTest plan
sh -non all package and build scriptsmanifest.jsonandoption.jsonrtp2httpd-3.12.2-x86_64.ipkgviascripts/build-ikuai-ipkg.sh.gitkeepin archivestart.sh/stop.shargument assembly with a stub binaryNotes for iKuai review
Please verify on real iKuai firmware:
0is accepted by the app marketoption.jsonfields render correctly (especially optional text fields and thepassword-typed token)APP_PORT_WEB(service root/returns 404; users should open/statusor/player)