Files
firmware/versions.env
T
Oleksandr ShyshatskyiandClaude Opus 5 4460488ea9 Moonraker: pin the last lmdb build -- this python has no sqlite3
v0.9.3 does not start on the printer. It was built, flashed by hand and
tried, and it died on:

    ModuleNotFoundError: No module named '_sqlite3'

FlashForge built python 3.8.2 without that module -- there is no
_sqlite3*.so in lib-dynload and no libsqlite3 anywhere on the image,
only the pure-python sqlite3/ wrapper that cannot work without it.
Moonraker moved its database from lmdb to sqlite in v0.9.0, so every
release from there on gets as far as loading the database component and
exits. The last release still on lmdb is v0.8.0, which predates the
webcam "enabled" flag this whole change exists to get.

No release has both, so the pin is now the newest COMMIT that does:
9d0d09d, 2023-12-05, the one before "database: migrate from lmdb to
sqlite". It has the webcam field and reads the printer's existing lmdb
store in place, so nothing is converted and going back to stock is a
clean round trip. Verified on python 3.8 against the printer's exact
library versions with _sqlite3 removed from the interpreter to match.

Two things follow from having shipped a build that could not start.

run-append.sh now asks the printer's OWN python to import the tree
before it moves anything, and keeps the stock server if it cannot. A bad
pin refuses to install instead of leaving the machine with no web UI --
confirmed on the replica, where the v0.9.3 payload is now declined and
the stock Moonraker keeps running.

And the test that passed this build is fixed. It asked only whether a
moonraker.py process ever appeared, which a build that dies on an import
satisfies for a second or two on its way down. It now requires the
process to still be there after a settle, and the log to be free of
import errors. Re-pinned to v0.9.3 it fails, as it should have.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 18:49:12 +03:00

39 lines
2.1 KiB
Bash

# Pinned third-party payload pieces.
#
# These are NOT vendored in the repo: bin/fetch-assets.sh downloads them into
# vendor/ (gitignored) and refuses anything whose sha256 does not match. Bump
# a version here and the next build picks it up; the old file stays cached.
#
# To bump: edit the version, run `make vendor`, paste the sha256 it prints.
MAINSAIL_VERSION="v2.18.2"
MAINSAIL_SHA256="df2ba7c301f7bfc8ac9f122741a6ba08356d679ecfa1f62f898d0337802d5de5"
HELIX_VERSION="v0.99.115-creator5.1"
HELIX_FILE="helixscreen-creator5-v0.99.115.tar.gz"
HELIX_SHA256="7205738ca8ccb0aa9a95262506a87283712ab5544ce4abdbcbee571f51395a61"
# Moonraker. The stock one is a 2022 build (API 1.0.5) that predates the
# webcam "enabled" flag that modern Mainsail requires -- see bin/patch.sh.
#
# A COMMIT, NOT A RELEASE, and not a matter of taste. FlashForge built python
# 3.8.2 WITHOUT the _sqlite3 module and shipped no libsqlite3 anywhere on the
# printer, so every Moonraker from v0.9.0 onward dies at startup with
# "ModuleNotFoundError: No module named '_sqlite3'" -- v0.9.0 is where the
# database moved from lmdb to sqlite. The last release that still uses lmdb is
# v0.8.0, and that one predates the webcam flag. No release has both, so this
# pins the newest commit that has the webcam fix and still uses lmdb: 9d0d09d,
# 2023-12-05, the commit before 80c7620 "database: migrate from lmdb to
# sqlite". lmdb 1.3.0 is installed, so the existing database is read in place
# and nothing is converted.
#
# Before moving this pin: the blocker is native modules, not the python
# version (Moonraker still supports >=3.7). Check every dependency of a newer
# build against what is actually in Python-3.8.2/lib/python3.8/lib-dynload and
# site-packages on the factory image -- a missing C extension is fatal and a
# pure-python one is not. run-append.sh also import-tests the tree on the
# printer before swapping it in, so a mistake here refuses to install rather
# than leaving the machine without a web UI.
MOONRAKER_VERSION="9d0d09de8063922696359c1b88c86a86d6fdb296"
MOONRAKER_SHA256="6ddcba08a1a41f173fc6ee393a24e41f27b25f079e7c49921b87273ecff595a8"