Add a no-SSH install path: a self-hosted Homebrew Channel repository
ares-install needs a working ssh into the TV, and this TV only has root
access (no Developer Mode, no ssh currently reachable). The Homebrew
Channel's own "Add repository" dialog accepts any URL that returns
{"packages": [...]}, which is the same schema its own gen-manifest.js
uses per app — confirmed by reading the app's source directly rather
than guessing at the format.
make-manifest.py now also writes out/repo.json, the existing manifest
wrapped in that shape, so publishing is: build the ipk, run the script
with --base-url pointing at wherever the release assets will live,
attach ipk + icon + repo.json there, then paste the repo.json URL into
the TV once. No ares, no ssh, no review queue.
Root elevation afterwards is unaffected either way: "Grant root access"
in the app calls elevate-service over the Luna bus from inside the
running app, which was already ssh-independent.
Corrected two inaccuracies in the process: webosbrew/repo doesn't exist
(the real project is webosbrew/apps-repo), and the Homebrew Channel has
no "install from file" UI — Browse-and-install or the /install Luna
service are the only ways in, both of which need a URL, not a local
path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3e4d0e17bc
commit
4f008c558b
+23
-8
@@ -1,15 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Writes the Homebrew Channel manifest for a built ipk.
|
||||
"""Writes the Homebrew Channel manifest for a built ipk, and a custom-repo
|
||||
index that wraps it.
|
||||
|
||||
The Homebrew Channel installs apps from a manifest that points at the ipk and
|
||||
carries its hash. Publishing means putting this file somewhere stable (a GitHub
|
||||
release asset, or the repository itself) and submitting the URL to
|
||||
webosbrew/repo.
|
||||
The manifest (out/manifest.json) is one app entry: id, ipkUrl, ipkHash, and so
|
||||
on. It is what you submit to webosbrew/apps-repo to get into the official
|
||||
store.
|
||||
|
||||
The repo index (out/repo.json) is that same entry wrapped as
|
||||
`{"packages": [...]}`, which is the format the Homebrew Channel's own
|
||||
"Add repository" dialog expects (Settings -> Repositories -> Add repository).
|
||||
Host it anywhere static, paste its URL in, and the app shows up in Browse —
|
||||
no submission, no review, no shell access to the TV at all.
|
||||
|
||||
python3 tools/make-manifest.py \\
|
||||
--base-url https://github.com/you/lgtv-audio-cap/releases/download/v1.0.0
|
||||
--base-url https://git.example/you/lgtv-audio-cap/releases/download/v1.0.0
|
||||
|
||||
Defaults to the newest ipk in out/ and writes out/manifest.json.
|
||||
Defaults to the newest ipk in out/ and writes out/manifest.json + out/repo.json.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
@@ -47,6 +53,8 @@ def main():
|
||||
parser.add_argument("--source-url", default=SOURCE_URL,
|
||||
help="project page shown in the Homebrew Channel")
|
||||
parser.add_argument("--out", default=os.path.join(ROOT, "out", "manifest.json"))
|
||||
parser.add_argument("--repo-out", default=os.path.join(ROOT, "out", "repo.json"),
|
||||
help="path for the custom-repo index (set to '' to skip)")
|
||||
args = parser.parse_args()
|
||||
|
||||
appinfo = json.load(open(os.path.join(ROOT, "frontend", "appinfo.json")))
|
||||
@@ -79,9 +87,16 @@ def main():
|
||||
with open(args.out, "w") as fh:
|
||||
json.dump(manifest, fh, indent=2)
|
||||
fh.write("\n")
|
||||
|
||||
print(json.dumps(manifest, indent=2))
|
||||
print("\nwrote %s" % os.path.relpath(args.out, ROOT), file=sys.stderr)
|
||||
|
||||
if args.repo_out:
|
||||
os.makedirs(os.path.dirname(args.repo_out) or ".", exist_ok=True)
|
||||
with open(args.repo_out, "w") as fh:
|
||||
json.dump({"packages": [manifest]}, fh, indent=2)
|
||||
fh.write("\n")
|
||||
print("wrote %s" % os.path.relpath(args.repo_out, ROOT), file=sys.stderr)
|
||||
|
||||
if not base:
|
||||
print("note: no --base-url given, so ipkUrl and iconUri are relative",
|
||||
file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user