Sorcery¶
Sorcery (https://sourcemage.org) is Source Mage GNU/Linux’s source-based package manager, a suite of bash tools: sorcery itself plus gaze (queries), cast (install), dispel (remove), scribe (grimoire sync) and cleanse (cleanup).
Parsing notes, verified against the sorcery source (usr/sbin/sorcery, usr/sbin/gaze, var/lib/sorcery/modules/libstate, and the gaze/cast/dispel/scribe/cleanse man pages):
gaze is the only read-only, non-root binary; its global -q flag (before the subcommand) forces PAGER=cat and drops the human “query -> “ prefix, so the regexes see clean unpaged text.
gaze installeddumps the spell status file: one “spell:YYYYMMDD:status:version” line per record, with status one of installed/held (exiled lines are filtered out by gaze itself). The file is append-only, so a spell upgraded in place may briefly show duplicate lines.Every mutating operation needs root: when not root, sorcery re-execs itself through
su, which would block mpm’s non-interactive subprocess. Marking the operations sudo = true routes them through mpm’s own escalation instead.No
outdated:sorcery queuerequires root, rewrites the queue state file and ends on an interactive “edit the queue?” prompt, so there is no cleanly non-mutating upgradable listing.castcompiles from source and may prompt on a spell’s first cast (optional dependencies, configuration); sorcery has no universal--yesflag.Home page: https://sourcemage.org
Platforms¶
🐧 Linux (Source Mage GNU/Linux only)
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
||
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
Ecosystem¶
Accepted purl types:
pkg:sorcery
Usage¶
$ mpm --sorcery installed
$ mpm --sorcery search "query"
$ mpm --sorcery upgrade --all
$ mpm install pkg:sorcery/hello
$ mpm --dry-run --sorcery upgrade --all
Every example above accepts --dry-run, which simulates the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Deselect the manager for a single run with --no-sorcery, disable it from your configuration, or tune its invocation attributes with per-manager overrides.
Command line¶
CLI names, in lookup order:
sorcery
The version is probed by running:
$ sorcery --version
20240108
and extracted with:
r"^(?P<version>[\d.]+)$"
Privilege escalation¶
System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-sudo or the per-manager sudo override.
Root is required for its cleanup, install, remove, sync, upgrade, upgrade_all operations.
See privilege escalation for the full policy.
Cooldown¶
State of Sorcery’s release-age gating, from the cooldown support table:
Status: ❌ None (Source Mage, source-based)
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Reference traces¶
Raw native outputs captured in the bundled definition: the reference mpm’s parsers were written against. If you know Sorcery well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ gaze -q installed
cowsay:20240108:installed:3.03
vim:20230101:held:9.0
$ gaze -q search -name {query}
cowsay 3.03 @test
tree 2.1.1 @stable