Fixes from the listmonk rehearsal; porting checklist in its own file

A rehearsal porting listmonk (postgres, sso, email) deployed it, signed
in, and read its opt-in mail with coreapp inbox. The name refusal said the
Core "already has" listmonk when it's Federated's uninstalled app; it now
says so, and coreapp core lists the names apps can't use. The porting
checklist moves to references/porting.md, adding settings kept in the
app's database, upstream entrypoints that assume root, and min_version
from the app's documented minimum. sign-in.md: the admin rule in an
upstream image, and when --form isn't needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 21:05:11 -07:00
co-authored by Claude Opus 5.5
parent f0468c43f2
commit 5d90c246a1
7 changed files with 177 additions and 91 deletions
+22 -6
View File
@@ -618,18 +618,32 @@ def marker_value(name, key):
return ""
def federated_names():
"""Names of the Core's own apps and services, installed or not: their
folders in /federated/services and their scripts in /federated/lib."""
names = set()
if os.path.isdir(SERVICES):
names |= {n for n in os.listdir(SERVICES)
if os.path.isdir(os.path.join(SERVICES, n)) and not is_ours(n)
and re.fullmatch(FIELDS["name"], n)}
lib = os.path.join(FEDERATED, "lib")
if os.path.isdir(lib):
names |= {n[:-3] for n in os.listdir(lib)
if n.endswith(".sh") and re.fullmatch(FIELDS["name"], n[:-3])}
return names
def plan(m, origin=None, downgrade=False, drop_database=False):
"""What installing m would do here, or Refused."""
name = m["name"]
domain, tier = federated_settings()
if not domain:
raise Refused("This Core isn't provisioned yet (no DOMAIN in /etc/federated).")
if os.path.exists(os.path.join(SERVICES, name)) and not is_ours(name):
raise Refused(f"This Core already has an app called '{name}' "
f"({service_value(os.path.join(SERVICES, name, 'service'), 'CONTAINER') or 'Federated'}). "
"Pick another name.")
if os.path.exists(os.path.join(FEDERATED, "lib", name + ".sh")):
raise Refused(f"'{name}' is the name of one of Federated's apps. Pick another name.")
if name in federated_names():
state = ("installed" if os.path.isdir(os.path.join(APPS, name))
else "not installed, but the Core can install it")
raise Refused(f"'{name}' is the name of one of Federated's apps on this Core ({state}). "
"Pick another name (coreapp core lists the names that are taken).")
installed = os.path.isdir(os.path.join(APPS, name))
if installed and not is_ours(name):
raise Refused(f"/federated/apps/{name} exists but wasn't installed by coreapps.")
@@ -1543,6 +1557,8 @@ def core_info():
f"{os.cpu_count()} CPUs, {mem:.1f} GB memory"))
rows.append(("Apps' disk", f"{disk.free / 1e9:.0f} GB free of {disk.total / 1e9:.0f} GB, "
f"{fstype or '?'} (/data)"))
rows.append(("Names apps can't use", ", ".join(sorted(federated_names() | RESERVED))
+ " (Federated's apps, installed or not, and the Core's host names)"))
rows.append(("Not offered", "Redis or other services, a second container, extra host names, "
"public ports other than HTTPS, the Core's AI model"))
for label, value in rows: