mirror of
https://github.com/morluto/rea.git
synced 2026-10-23 14:22:30 -05:00
Replace fixed Linux Hopper release pins with current vendor feed metadata, complete detached-PGP package verification under the stable publisher primary key, and authenticated package evidence for offline admission. Share parsed publisher facts across approved setup, doctor and the pre-execution guard. Preserve existing ownership, cancellation, private-display and cleanup rules. Fixes #3577 Normalize empty XDG settings, preserve backups during approved cache repair, and retain publisher cleanup through cancellation and shutdown. Exercise cold offline verification without reusing process-local proof state. Serialize approved cache publication across processes, restore old evidence on failure, and share the existing lease owner from process without changing its identities. Validation: 438 focused tests (six platform-related skips), full static/documentation checks, real Ubuntu 24.04 official Hopper 6.6.0 setup/CLI/MCP, offline ordinary-user admission, launcher mutation rejection, and cold/warm verification measurements. Official RPM metadata mismatch is tracked separately in #3578 and fails closed. BREAKING CHANGE: Older Linux Hopper builds admitted by the fixed allowlist now require retained publisher-signed package evidence or an approved update to the current public demo. Update explicit HOPPER_LAUNCHER_PATH values when migrating; the live feed exposes only its current release. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
/** Deterministic feed boundary for the package verifier's deliberately foreign launcher.
|
|
* This fixture never authorizes a Hopper build or simulates successful cryptography.
|
|
*/
|
|
import { HOPPER_RELEASES_URL } from "../../dist/application/HopperReleaseFeed.js";
|
|
|
|
const systemFetch = globalThis.fetch;
|
|
const row = (suffix) => ({
|
|
version: "fixture-current",
|
|
filename: `https://www.hopperapp.com:443/downloader/public/Hopper-fixture-current-Linux-demo.${suffix}`,
|
|
file_length: "1",
|
|
file_hash: "0".repeat(40),
|
|
main_exe_hash: "0".repeat(64),
|
|
signature: "AQ==",
|
|
public: "1",
|
|
beta: "0",
|
|
});
|
|
|
|
globalThis.fetch = (input, options) => {
|
|
const url =
|
|
typeof input === "string"
|
|
? input
|
|
: input instanceof URL
|
|
? input.href
|
|
: input.url;
|
|
if (url !== HOPPER_RELEASES_URL) return systemFetch(input, options);
|
|
options?.signal?.throwIfAborted();
|
|
return Promise.resolve(
|
|
new Response(
|
|
JSON.stringify({
|
|
"Ubuntu / Mint": row("deb"),
|
|
Fedora: row("rpm"),
|
|
Arch: row("pkg.tar.xz"),
|
|
}),
|
|
),
|
|
);
|
|
};
|