Skip to content

feat(ltspice): add LTspice(com.analog.LTspice) - #849

Merged
jing2uo merged 1 commit into
flatpark:mainfrom
rhgKc2yp:add/com.analog.LTspice
Oct 26, 2026
Merged

jing2uo merged 1 commit into
flatpark:mainfrom
rhgKc2yp:add/com.analog.LTspice

Conversation

@rhgKc2yp

@rhgKc2yp rhgKc2yp commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Add LTspice (com.analog.LTspice), SPICE simulator and waveform viewer, using its official Windows x64 MSI under Wine.

Packaging

  • freedesktop Platform/SDK 26.08 and Cellar CLI 0.5.1, following the current foobar2000 packaging pattern. requires names Flathub's org.winehq.Wine//stable-26.08; Wine is shared, not bundled.
  • Analog Devices' unmodified LTspice64.msi is extra-data, SHA-256 f22163f15420e43a2d5c66440e038ef031a9f019a181f396b95edcef5eebc357, 144698880 bytes. Cellar is independently pinned extra-data.
  • Cellar runs msiexec /i ... /qn /norestart in the private persistent prefix on first launch and when the MSI changes. No application files are patched and no host commands run.
  • The resolver reads the vendor's LTspice.json. The official MSI URL is rolling; the package version includes its Last-Modified timestamp so installer/model refreshes also trigger a new pin, even if program version and size stay the same. Initial package version: 26.1.1-20261022172601 (MSI ProductVersion 26.1.1.2). Between an upstream replacement and the next pin refresh, the old checksum can temporarily prevent new installs.
  • The exported 256 px icon comes from the MSI's Icon.ADI.exe icon resource. The proprietary application is downloaded directly from Analog Devices, not redistributed by FlatPark.

Sandbox

Documents is writable for schematics, custom models and simulation results. X11/IPC and GPU access support Wine's display; network access supports model downloads and the vendor updater. Only the user/system installation folders of org.winehq.Wine are additionally exposed, read-only. --allow=multiarch is declared in policy.dangerous_permissions for new-WoW64 Wine's 32-bit system calls. Other circuit folders can be granted with the override documented in the metainfo; its reset command is included.

Validation

  • Descriptor/audit and AppStream validation passed. All 25 repository test scripts passed (the five requiring OSTree were rerun with the installed builder's OSTree tool). LTspice link checks passed; four vendor page links were classified as bot-gated HTTP 403 by the checker, and both payload links and the license link were reachable.
  • Both pinned extra-data payloads passed check-apply-extra.sh offline as root with no capabilities.
  • Built with Flathub's Builder, published into a signed local repository, and installed with publish.sh --verify.
  • Repeated first-run MSI installation from a fully fresh profile successfully. Ran on a private Xwayland display using the installed Wine 11.0 from org.winehq.Wine//stable-26.08. Checked rendering and measured WM_CLASS=ltspice.exe, matching the desktop entry.
  • Opened a resistor-divider schematic through the Windows file chooser, ran transient simulation and plotted V(out): 10 V into equal 1 kΩ resistors measured exactly 5 V at 5 ms.
  • Edited R2 to 2 kΩ in the GUI, saved and reran: measured 6.66666650772 V. Reopened the saved schematic through the packaged command after a full restart.
  • Changed the analytics preference through the GUI and verified CaptureAnalytics=false persisted after restart in the private prefix.
  • No additions to home, Desktop, applications or autostart; only the application's own Documents/LTspice folder and the explicit temporary circuit test folder were created. No denied D-Bus name ownership. Tray/media checks do not apply to this circuit simulator.
  • Checked the complete bundled library and examples against the official ZIP archives: CRCs passed and all 11,727 library files plus 4,450 example files matched byte for byte, with no missing files.
  • Generated netlists successfully for all 4,370 official example schematics, exercising schematic parsing, symbol lookup and automatic model-library selection.
  • Ran DC sweeps for every standard semiconductor model entry: 2,565 diode, BJT, JFET and MOSFET entries across 69 grouped decks. All groups passed with 31,192 finite saved values.
  • Electrically simulated 136 distinct educational/application circuits: 123 completed successfully. The other 13 exceeded a 120-second limit in isolated worker prefixes, producing partial waveform data with no missing-model diagnostics. They remain unverified: ADPM12160L, LTC7899, LTM4676, Electrometer, and nine FRA examples (fra_eg2 through fra_eg10). Model accuracy across every operating condition was not assessed.
  • Unfinished runs were resumed from checkpoints after an interrupted test session. Final retries used fresh output files and shut down each worker's wineserver between cases.
  • Not exercised: vendor auto-updater, hardware integration, native Wayland driver, or ARM execution. Analog Devices also publishes LTspice64_arm.msi for Windows 11 ARM64 (26.0.2), but this package advertises only x86_64: Flathub Wine's only-arches excludes aarch64, the required Wine ref is absent for that architecture, and Cellar 0.5.1 has no aarch64 CLI asset.

Flathub and demand

Requested by a user who already runs LTspice successfully with Wine. A Flathub name search returned other circuit tools and no LTspice listing; GitHub issue searches found no LTspice issue in flathub/flathub or flatpark/flatpark. Upstream approval is not claimed.

Prepared with OpenAI Codex.

Thanks.

Fixes #848

add LTspice, SPICE circuit simulator(com.analog.LTspice)

Run the official MSI unmodified with Cellar and the shared Wine installation. Pin installer refreshes from the official release metadata and Last-Modified header.

Assisted-by: OpenAI Codex
@rhgKc2yp rhgKc2yp changed the title feat(ltspice): add LTspice(com.analog.LTspice) feat(ltspice): add LTspice(com.analog.LTspice) Closes #848 Oct 25, 2026
@rhgKc2yp rhgKc2yp changed the title feat(ltspice): add LTspice(com.analog.LTspice) Closes #848 feat(ltspice): add LTspice(com.analog.LTspice) Closes # 848 Oct 25, 2026
@rhgKc2yp rhgKc2yp changed the title feat(ltspice): add LTspice(com.analog.LTspice) Closes # 848 feat(ltspice): add LTspice(com.analog.LTspice) Oct 25, 2026

@jing2uo jing2uo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough package and validation. The structure follows the foobar2000 Wine/Cellar package closely. Below is what I checked.

Review

Area Result Notes
Layout vs. foobar2000 template ✅ apply_extra.sh, manifest structure, cellar 0.5.1 pin and finish-args match the existing Wine package.
MSI extra-data pin ✅ Downloaded LTspice64.msi independently: sha256 f22163f1…c357, 144698880 bytes, matching the manifest.
Descriptor audit ✅ scripts/audit-descriptor.mjs passes locally.
Icon ✅ 256×256 RGBA PNG.
cellar.toml method = "run" with an .msi ✅ cellar runs .msi sources through msiexec /i <msi>, then appends /qn /norestart (launch.go#L74-L76 @ v0.5.1).
Permissions ✅ Only xdg-documents in home, Wine dirs read-only, --allow=multiarch declared and justified.
x86_64 only ✅ Reasoning (Flathub Wine only-arches, no aarch64 cellar CLI) holds.
Vendor updater vs. cellar reinstall ⚠️ needs attention See (1).
Versioning by Last-Modified ⚠️ acceptable See (2).
Screenshots in metainfo 💡 minor None; the site's app page will look empty (foobar2000 has one).
source_url in flatpark.yml 💡 minor Missing; e.g. https://www.analog.com/ltspice.
Per-user MSI install path 💡 note See (3).
.desktop %F without MimeType 💡 optional .asc files won't offer LTspice from the desktop; fine to leave as is.
CI ⏳ No checks have run on this branch yet.

(1) Vendor updater can make the app fail to launch

I dumped the MSI's tables. It is an Advanced Installer package authored as a standard major upgrade:

  • Upgrade: OLDPRODUCTS covers 0.0.1 to 26.1.1.2 (both inclusive) and is removed on install.
  • A newer installed version sets AI_NEWERPRODUCTFOUND, and AI_DOWNGRADE (custom action type 19) aborts the install with an error.

The package keeps network access on purpose so the vendor updater works, and the updater was not exercised. Here is the failure case:

  1. The user upgrades in-app to, say, 26.1.2 while FlatPark still pins 26.1.1.
  2. The next pin refresh changes the MSI (for example a new Last-Modified), so cellar re-runs the older MSI. msiexec then refuses to downgrade and exits non-zero.
  3. cellar treats a non-zero installer exit as an error (reconcile.go#L142), and apply before run fails (main.go#L567). The install fingerprint is never recorded, so every launch retries and fails until FlatPark's pin catches up.

sandboxes-and-updaters.md asks to turn an in-app updater off when the app offers a setting for it. Could you either:

  • find LTspice's setting for automatic program-update checks and seed it before first launch (declared as packaging: seeded-config), or
  • test the "update in-app, then let cellar run the older MSI" path and report the result?

Model library sync (writing only into the app's data) is fine either way.

(2) Timestamp in the version

26.1.1-20261022172601 is what users will see on the site and in the metainfo. It does catch silent replacements behind the rolling URL, and basics.md allows a revision suffix. Akamai NetStorage returned stable Last-Modified/ETag across repeated requests. Not using LTspice.json's "Installation" field was right, since it reads 2026-10-24 while the MSI's Last-Modified is 10-22. Fine to keep. Adding the suffix only when the same program version is re-cut would look nicer, but that is optional.

(3) Per-user MSI

The MSI sets ALLUSERS=2 and MSIINSTALLPERUSER=1. Your test shows Wine installs it under C:\Program Files\ADI\LTspice\. If a later Wine honours per-user installs, the target may move to %LOCALAPPDATA%\Programs\… and break exe in cellar.toml. No action needed now; it's just worth knowing if a future launch fails with a missing exe.

Conclusion

Close to mergeable. Packaging, pins and permissions are correct, and the validation is unusually thorough. Please address (1), either by disabling the vendor's program-update check or by testing that path, before we merge. (2) and the minor items are up to you.

@jing2uo

jing2uo commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Maintainer follow-up on the review above:

  • The version format is fine as is, no change needed.
  • On the vendor updater: if you test the in-app update path later or run into problems with it, please send a PR with a fix here, or open a feature request against cellar. We'll work out the right approach there.

Merging this now. Thanks!

@jing2uo

jing2uo commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

About the failing link check: the four www.analog.com / ez.analog.com links are fine. All of them open in a browser and answer 200 from our machines. www.analog.com sits behind Akamai Bot Manager, which holds connections from GitHub's runners open until they time out, so CI reports the links as broken. When you ran the checker locally, the same gate answered 403 instead, which the checker treats as reachable. The ltspice.analog.com payload and license links are not gated and pass.

This doesn't need a change in this PR. We'll add those two hosts to the link checker's allowlist for transport errors (SOFT_OK_HOSTS) in a separate change.

@jing2uo
jing2uo merged commit 80668aa into flatpark:main Oct 26, 2026
jing2uo added a commit that referenced this pull request Oct 26, 2026
…the PR touches (#860)

com.analog.LTspice (#849) merged from a branch that predated the exec-bit
guardrail in #857, so its resolve-update.sh landed 100644 and the
catalog-wide audit step failed every PR since (e.g. #852).

The audit still runs over every descriptor, but a hard failure on an app the
PR does not touch is now a warning; a PR that changes the auditor itself
stays strict catalog-wide.

Co-authored-by: Claude <[email protected]>
@rhgKc2yp
rhgKc2yp deleted the add/com.analog.LTspice branch October 26, 2026 09:06
@rhgKc2yp

rhgKc2yp commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for exhaustive checks, @jing2uo . I'll continue to keep an eye on the vendor updater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: LTspice using Wine and Cellar

2 participants