From 3edab310ad0815571da41a1eccf14badc8005a7f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 18:25:55 +0100 Subject: [PATCH] Disk change: install shareos-migrate; no endless loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shareos-core.mk lists its programs one by one, and shareos-migrate (#200) was never added: on the box Storage -> DISK CHANGE got 'sh: line 0: /usr/sbin/shareos-migrate: not found' and loadMigrate() only toasted it, so the page kept showing 'Loading …'. The host test ran the script from the source tree and could not notice. - shareos-core.mk installs shareos-migrate. - static-analysis.sh: every file in src/shareos-core/usr/{s,}bin must have an install line in shareos-core.mk (fails without this fix). - migrate.js: without a state the page shows the error and 'Read again'. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv --- CHANGELOG.md | 4 ++++ package/shareos-core/shareos-core.mk | 1 + src/shareos-core/parts/web/migrate.js | 8 +++++++- tests/static-analysis.sh | 9 +++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ebd64cb..ac2891a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Changes per release (newest first). The section of a version is added to its GitHub release automatically when the release is built. Test versions are pre-releases for test devices only. +## 0.3.0-beta.18 + +- **Disk change: the wizard did not start.** `shareos-migrate` was not installed into the firmware (0.3.0-beta.16 and beta.17), so *Storage → DISK CHANGE* only showed "shareos-migrate: not found" and kept loading. It is installed now; the page shows an error instead of loading forever, and the static analysis checks that every program of `shareos-core` is installed. + ## 0.3.0-beta.17 - **Style "Glass".** A third look next to Classic dark and light: *System → Appearance → Style*. The same pages, elements, sizes and corners – only the material changes: translucent, blurred panes over a soft aurora background, in a slate dark and a misty light theme (neither black nor white), with all eight accent colours (raised where needed so small accent text stays readable). It covers the classic and the desktop view and the login page; users with web access can pick their own style. Web apps follow it through the app SDK (`data-style="glass"` on ``, a glass variant of `/_shareos/theme.css`). UCI: `shareos.ui.style` (`classic` | `glass`). diff --git a/package/shareos-core/shareos-core.mk b/package/shareos-core/shareos-core.mk index e4cfd699..aba94f91 100644 --- a/package/shareos-core/shareos-core.mk +++ b/package/shareos-core/shareos-core.mk @@ -63,6 +63,7 @@ define SHAREOS_CORE_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/www-apps/_shareos/cgi/media $(TARGET_DIR)/www-apps/_shareos/cgi/media $(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-media $(TARGET_DIR)/usr/sbin/shareos-media $(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-snapshot $(TARGET_DIR)/usr/sbin/shareos-snapshot + $(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-migrate $(TARGET_DIR)/usr/sbin/shareos-migrate $(INSTALL) -D -m 0644 $(@D)/etc/config/snapshots $(TARGET_DIR)/etc/config/snapshots $(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-transmission $(TARGET_DIR)/usr/sbin/shareos-transmission $(INSTALL) -D -m 0755 $(@D)/usr/sbin/shareos-syncthing $(TARGET_DIR)/usr/sbin/shareos-syncthing diff --git a/src/shareos-core/parts/web/migrate.js b/src/shareos-core/parts/web/migrate.js index 300e8162..84dd0185 100644 --- a/src/shareos-core/parts/web/migrate.js +++ b/src/shareos-core/parts/web/migrate.js @@ -47,6 +47,8 @@ function migProgress(st) { function migrateView() { const m = S.mig || (S.mig = {}), st = m.st; + if (!st && m.err) return html` +
`; if (!st) return html`
Loading …
`; let body; if (migBusy(st)) body = migProgress(st); @@ -81,12 +83,15 @@ async function loadMigrate() { const m = S.mig || (S.mig = {}); try { m.st = await rpc('shareos.migrate', 'state'); + m.err = null; if (!m.vols) m.vols = (await rpc('shareos.storage', 'volumes')).volumes || []; if (!document.activeElement?.matches('select')) renderMain(); if (S.route.tab === 'storage' && S.route.sub === 'move' && (migBusy(m.st) || m.switching)) S.migTimer = setTimeout(loadMigrate, 3000); if (m.st.state !== 'copied') m.switching = false; } catch (e) { - if (e.code !== 'auth') toast('Move: ' + e.message, true); + if (e.code === 'auth') return; + // without a state the page would wait forever: show why instead + if (!m.st) { m.err = e.message; renderMain(); } else toast('Move: ' + e.message, true); } } @@ -99,6 +104,7 @@ function migrateAfter() { } Object.assign(ACTIONS, { + 'mig-reload'() { S.mig.err = null; S.mig.t = 0; renderMain(); }, async 'mig-plan'() { try { S.mig.plan = await rpc('shareos.migrate', 'plan', { from: S.mig.from, to: S.mig.to }); renderMain(); } catch (e) { toast(e.message, true); } diff --git a/tests/static-analysis.sh b/tests/static-analysis.sh index 1dadc6c0..2e8a1daa 100755 --- a/tests/static-analysis.sh +++ b/tests/static-analysis.sh @@ -52,6 +52,15 @@ WEB="src/shareos-core/www src/shareos-core/www-apps/_shareos/app.js" # shellcheck disable=SC2086 node_modules/.bin/eslint --max-warnings 0 $WEB || fail=1 +echo "== Installed programs" +# every program of shareos-core is listed in its package (the install lines are +# explicit – a forgotten one passes the host tests and is missing on the box) +for f in src/shareos-core/usr/sbin/* src/shareos-core/usr/bin/*; do + [ -f "$f" ] || continue + grep -q "(@D)/${f#src/shareos-core/} " package/shareos-core/shareos-core.mk || + { echo "$f is not installed by package/shareos-core/shareos-core.mk"; fail=1; } +done + echo "== Dead code" python3 tests/check-dead-code.py || fail=1