Commit Graph

3255 Commits

Author SHA1 Message Date
Aiden McClelland
9373f40e82 chore: bump version to 0.4.0-beta.2 2026-04-03 09:06:05 -06:00
Aiden McClelland
f181b9a9f1 fix: handle None case in list_service_interfaces without early return 2026-04-03 09:00:20 -06:00
Matt Hill
2ea2879317 fix: buffer incomplete chunks in RPC socket listener
The data event handler assumed each chunk contained complete
newline-delimited JSON messages. Unix sockets are stream-based, so
large messages (>64KB) arrive split across multiple data events.
This caused JSON parse failures for callback payloads containing
full serviceInterfaces maps with hostname/gateway metadata.

Buffer incoming data per connection and only parse after a complete
newline-terminated message is received.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 08:30:52 -06:00
Aiden McClelland
2427255eb5 Merge pull request #3156 from Start9Labs/fix/beta-bugs v0.4.0-beta.1 2026-04-02 18:39:18 -06:00
Aiden McClelland
5d36347d9d chore: i18n log messages in disk/main.rs
Replace hardcoded English log strings with i18n keys for e2fsck,
btrfs conversion, filesystem optimization, and VG probe warnings.
2026-04-02 18:38:13 -06:00
Aiden McClelland
2a3c3b3f68 chore: move ops scripts to scripts/ directory
Move manage-release.sh and publish-deb.sh out of build/ into scripts/
since they are operational tools, not build steps. Add
copy-categories.sh for cross-registry category sync. Update the
publish-deb reference in manage-release.sh.
2026-04-02 18:38:13 -06:00
Aiden McClelland
63bea3deda chore: bump version to 0.4.0-beta.1 2026-04-02 18:38:12 -06:00
Aiden McClelland
3fb5a69986 chore: update patch-db submodule and sync mock data
Update patch-db to f7a4e02. Remove stale arch/platform fields from
mock-patch data. Update container-runtime lock file.
2026-04-02 18:38:12 -06:00
Aiden McClelland
2026b9c38b fix: improve 0.3.5 migration with data version persistence and failure notifications
Write package data version to disk before reinstalling so the install
process detects existing data and uses update mode. Collect migration
failures and notify the user which services failed, reassuring that
data is safe and can be reinstalled from the marketplace. Add i18n
keys for migration failure and service operation notifications.
2026-04-02 18:38:12 -06:00
Aiden McClelland
04fb3a69dc fix: localize service operation failure notification titles
Replace hardcoded English "{Operation} Failed" strings with i18n
lookup for installing, updating, restoring, and uninstall failures.
2026-04-02 18:38:12 -06:00
Aiden McClelland
a433db3180 fix: recheck tasks on action export and handle unavailable actions gracefully
Call recheck_tasks() after export_action so task active state is
updated when actions change. Handle unavailable actions/services by
logging instead of returning an error, keeping tasks active until
they can be properly evaluated.
2026-04-02 18:38:11 -06:00
Aiden McClelland
f53b1a03e8 fix: improve btrfs-convert to show progress output
Remove --no-progress flag and enable output capture so conversion
progress is visible during ext4 to btrfs migration.
2026-04-02 18:38:11 -06:00
Matt Hill
e63bf07ae6 update ST cert language, category names, and patchDB 2026-04-02 18:38:11 -06:00
Aiden McClelland
22b2ee01d7 feat: make version optional in registry package remove, add --force flag
When version is omitted, removes the entire package entry. Requires
--force if the package has any existing versions.
2026-04-01 17:06:51 -06:00
Aiden McClelland
de7fbeff2c chore: add remove-signer command, fix bugs, and update release notes
- Add registry admin remove-signer command to remove a signer and all their authorizations
- Fix remove_package_signer condition (is_some -> is_none) for correct not-found error
- Use log_err() instead of silently swallowing asset fetch errors
- Trim leading '#' from version in s9pk publish path
- Add --delete-removed to s3 sync in publish-deb.sh
- Expand v0.4.0 release notes with additional features
- Regenerate man pages and add i18n entries
2026-04-01 16:09:32 -06:00
Aiden McClelland
0eedcf58f5 feat: support data URLs, http(s) URLs, and file:// URLs in registry set-icon CLI v0.4.0-beta.0 2026-04-01 08:50:59 -06:00
Aiden McClelland
208e9a5e3a feat: add registry os promote command for cross-registry OS version promotion
Batch promotes an entire OS version (metadata + all iso/squashfs/img assets
across all platforms) from one registry to another, mirroring the existing
package promote command.
2026-03-31 22:12:35 -06:00
Aiden McClelland
7c304eef02 chore: regenerate SDK TypeScript bindings for metrics types 2026-03-31 20:52:41 -06:00
Aiden McClelland
3de91687f1 chore: fix formatting in v0_3_6_alpha_0 migration logging 2026-03-31 20:52:00 -06:00
Aiden McClelland
0d80a1c0b1 fix: handle null value in list_service_interfaces
Return an empty map instead of failing when the watched value is null.
2026-03-31 20:51:33 -06:00
Aiden McClelland
48f50e3c6c feat: add package promote command for cross-registry promotion
Allows promoting a package version from one registry to another by
fetching package info from the source and re-signing/publishing each
s9pk variant to the destination.
2026-03-31 20:51:22 -06:00
Aiden McClelland
3e0bbe47ad fix: skip btrfs readonly check on preen to avoid false failures
The btrfs check --readonly command can produce false positives. Skip it
for the preen strategy and only run the repair path when aggressive
repair is requested.
2026-03-31 20:51:02 -06:00
Aiden McClelland
a3575cf9a3 chore: remove arch and platform fields from ServerInfo
These are static platform constants and don't need to be stored in the
database or exposed in the public model. Use crate::ARCH directly where
needed.
2026-03-31 20:50:48 -06:00
Aiden McClelland
5443f8dab1 chore: bump startos to 0.4.0-beta.0 and start-sdk to 1.0.0 2026-03-31 20:03:03 -06:00
Aiden McClelland
c6fd58f714 feat: rename ghost and synapse packages to legacy variants
Add ghost→ghost-legacy and synapse→synapse-legacy ID renames in v1
manifest compat, container runtime, and v0.3.6 migration (volume
renames).
2026-03-31 19:57:16 -06:00
Aiden McClelland
40ac974a0c feat: replace PostgreSQL metrics with SQLite and add metrics query API
Migrate registry metrics from PostgreSQL/sqlx to embedded SQLite via
rusqlite. Add new metrics CLI subcommands (summary, users, downloads)
with i18n support. Record os_version in user activity and package
download requests. Remove old PostgreSQL schema and setup script.
2026-03-31 19:56:49 -06:00
Aiden McClelland
cbcff17ebc chore: refactor release scripts to download OS images from registry
Replace GitHub Actions artifact downloads with registry-based OS image
retrieval via start-cli. Add publish-tunnel subcommand, registry_url
helper, and remove old S3/RUN_ID workflows. Also clean up old deb
versions in publish-deb.sh before copying new ones.
2026-03-31 19:56:33 -06:00
Matt Hill
8e8f457393 fix locale bug with postgres for 0351 migration 2026-03-31 16:12:32 -06:00
Matt Hill
886aa5d7db remove unnecessary warnings 2026-03-31 13:47:20 -06:00
Aiden McClelland
653a0a1428 Merge pull request #2867 from Start9Labs/next/major
StartOS 0.4.0
2026-03-30 19:29:39 -06:00
Matt Hill
0b004a19ae wrap text in release notes v0.4.0-alpha.23 2026-03-30 14:59:20 -06:00
Aiden McClelland
ce1da028ce fix: extract hairpin check into platform-conditional function
The hairpin NAT check uses Linux-specific APIs (bind_device, raw fd
conversion). Extract it into a separate function with #[cfg(target_os)]
so the entire block is excluded on non-Linux platforms, rather than
guarding only the unsafe block.
2026-03-30 14:38:13 -06:00
Aiden McClelland
0d4dcf6c61 fix: correct platform extraction in ISO deploy and re-enable raspberrypi
The sed-based platform extraction was greedy, turning "x86_64" into "64".
Replace with explicit platform list iteration. Exclude raspberrypi from
deploy. Re-enable raspberrypi as a platform choice for builds.
2026-03-30 12:11:22 -06:00
crissuper20
8359712cd9 Fix/startos UI empty interface (#3143)
fix: give StartOS UI interface a non-empty id

The iface object in StartOsUiComponent had id: '' (empty string).
Any plugin whose action calls sdk.serviceInterface.get() with
that id triggers an RPC to the host with an empty
serviceInterfaceId, which Rust's ServiceInterfaceId type rejects
via its ID regex (^[a-z0-9]+(-[a-z0-9]+)*$).

The container runtime appends the method name to every error
message as "${msg}@${method}", so the empty-string failure
surfaces in the UI as:

  Action Failed: Deserialization Error: Invalid ID: @get-service-interface

Setting id: 'startos-ui' makes it a valid, stable identifier
that passes the regex and accurately names the interface.
2026-03-30 12:00:14 -06:00
Aiden McClelland
f46cdc6ee5 fix: correct hairpin NAT rules and bind hairpin check to gateway interface
The POSTROUTING MASQUERADE rules in forward-port failed to handle two
hairpin scenarios:

1. Host-to-target hairpin (OUTPUT DNAT): when sip is a WAN IP (tunnel
   case), the old rule matched `-s sip` but the actual source of
   locally-originated packets is a local interface IP, not the WAN IP.
   Fix: use `-m addrtype --src-type LOCAL -m conntrack --ctorigdst sip`
   to match any local source while tying the rule to the specific sip.

2. Same-subnet self-hairpin (PREROUTING DNAT): when a WireGuard peer
   connects to itself via the tunnel's public IP, traffic is DNAT'd back
   to the peer. Without MASQUERADE the response takes a loopback shortcut,
   bypassing the tunnel server's conntrack and breaking NAT reversal.
   Fix: add `-s dip/dprefix -d dip` to masquerade same-subnet traffic,
   which also subsumes the old bridge_subnet rule.

Also bind the hairpin detection socket to the gateway interface and local
IP for consistency with the echoip client.
2026-03-30 11:52:53 -06:00
Aiden McClelland
c96b38f915 fix: bind echoip client to gateway's specific IPv4 to avoid EADDRINUSE
Using Ipv4Addr::UNSPECIFIED (0.0.0.0) as the local address with
SO_BINDTODEVICE caused bind(0.0.0.0:0) to fail with "Address in use"
on interfaces where port 443 was already in use. Binding to the
gateway's actual IPv4 address instead still forces IPv4 DNS filtering
while avoiding the kernel-level conflict.
2026-03-30 08:12:21 -06:00
Matt Hill
c1c8dc8f9c fixes #3150 2026-03-29 20:48:30 -06:00
Matt Hill
e3b7277ccd fix: correct false breakage detection for flavored packages and confi… (#3149)
fix: correct false breakage detection for flavored packages and config changes

Two bugs caused the UI to incorrectly warn about dependency breakages:

1. dryUpdate (version path): Flavored package versions (e.g. #knots:27.0.0:0)
   failed exver.satisfies() against flavorless ranges (e.g. >=26.0.0) due to
   flavor mismatch. Now checks the manifest's `satisfies` declarations,
   matching the pattern already used in DepErrorService. Added `satisfies`
   field to PackageVersionInfo so it's available from registry data.

2. checkConflicts (config path): fast-json-patch's compare() treated missing
   keys as conflicts (add ops) and used positional array comparison, diverging
   from the backend's conflicts() semantics. Replaced with a conflicts()
   function that mirrors core/src/service/action.rs — missing keys are not
   conflicts, and arrays use set-based comparison.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:07:52 -06:00
Matt Hill
b0b4b41c42 feat: unified restart notification with reason-specific messaging (#3147)
* feat: unified restart notification with reason-specific messaging

Replace statusInfo.updated (bool) with serverInfo.restart (nullable enum)
to unify all restart-needed scenarios under a single PatchDB field.

Backend sets the restart reason in RPC handlers for hostname change (mdns),
language change, kiosk toggle, and OS update download. Init clears it on
boot. The update flow checks this field to prevent updates when a restart
is already pending.

Frontend shows a persistent action bar with reason-specific i18n messages
instead of per-feature restart dialogs. For .local hostname changes, the
existing "open new address" dialog is preserved — the restart toast
appears after the user logs in on the new address.

Also includes migration in v0_4_0_alpha_23 to remove statusInfo.updated
and initialize serverInfo.restart.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix broken styling and improve settings layout

* refactor: move restart field from ServerInfo to ServerStatus

The restart reason belongs with other server state (shutting_down,
restarting, update_progress) rather than on the top-level ServerInfo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix PR comment

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
2026-03-29 02:23:59 -06:00
Aiden McClelland
bbbc8f7440 fix: correct BIOS boot partition type GUID for backup target filtering
The BIOS_BOOT_TYPE_GUID constant had the wrong value, so
find_bios_boot_partition never matched the actual BIOS boot partition
created by the gpt crate. This caused it to appear as an available
backup target.
2026-03-28 20:00:59 -06:00
Aiden McClelland
c7a4dd617e fix: resolve tunnel add delay and connectivity loss in gateway watcher
Split poll_ip_info into two phases: write IP info (addresses, subnets,
gateway, DNS, NTP) to the watch immediately, then fetch WAN IP in a
second pass. Previously the echoip HTTP fetch (5s timeout per URL)
blocked the write and was repeatedly cancelled by D-Bus signals during
interface activation, preventing the gateway from ever appearing.

Replace PolicyRoutingCleanup Drop with gc_policy_routing. The old Drop
spawned async route flushes that raced with new apply_policy_routing
calls when the watcher restarted on device_added, wiping freshly-created
routing tables for existing interfaces like eth0. Now policy routing is
managed idempotently by apply_policy_routing, and stale rules are
garbage-collected at the start of each watcher iteration.
2026-03-28 20:00:36 -06:00
Aiden McClelland
d6b81f3c9b fix: assorted fixes across container-runtime, core, and sdk
- Fix parseInt callback in container-runtime to avoid extra map arguments
- Use proper error propagation in list_service_interfaces instead of unwrap_or_default
- Handle non-plain objects by reference in deepEqual
2026-03-27 15:58:52 -06:00
Aiden McClelland
879f953a9f feat: delete ext2_saved subvolume after btrfs-convert
Removes the ext2_saved subvolume (created by btrfs-convert to preserve
original ext4 metadata) before running defrag to reclaim space.
2026-03-26 23:38:54 -06:00
Matt Hill
782f2e83bf ensure correct locale on 035 update (#3145) 2026-03-26 21:35:25 -06:00
Matt Hill
6cefc27c5f build: use org-hosted large runners for fast CI builds
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:24:19 -06:00
Matt Hill
2b676808a9 feat: generate certificates signed by the root CA (#3144)
Co-authored-by: Aiden McClelland <me@drbonez.dev>
2026-03-26 18:57:11 -06:00
Aiden McClelland
7c1c15073d fix: default tor proxy for registry 2026-03-26 16:56:02 -06:00
Aiden McClelland
025d569dfa build: replace buildjet runners with github actions large runners 2026-03-26 16:12:25 -06:00
Matt Hill
976bdf3e53 disable finish unless valid form 2026-03-26 15:57:56 -06:00
Aiden McClelland
dce0f075ce feat: cascade address enable/disable to related bindings on same gateway 2026-03-26 15:16:08 -06:00