In Source Mage, "casting spells" means installing programs. The Grimoire contains the list of spells you can cast.
Logically enough, you cast a spell by typing in "cast spellname" (no quotes).
Cast does rather more than simply install a program, though. The process can be broken down into three main steps:
1) Download.
Cast uses wget to download the source code of the program from its web site.
2) Compile.
Cast, following instructions contained in the spell, configures and compiles the program. Some spells require user input for configuration options, notably the kernel. Most spells configure automagically, without needing human input beyond the initial command.
3) Install.
The spell also contains instructions about where to put the compiled files once the compilation phase is over. Logs
documenting the filenames and locations of all these files are written to /var/log/sorcery/install so they can later be reversed, manually or by using dispel.
That said, the actual casting of individual spells sometimes becomes more complicated. There are several cases in which this may happen:
Dependencies: One spell may depend on another. Fortunately, cast takes care of dependencies automatically. You will be prompted to cast dependencies, which come in two flavors: required and optional. The dependencies you select will be cast before the main spell, so that everything will work right. You can say "no" to a required dependancy, but it's not recommended for the faint of heart. Say "yes" to required dependencies unless you know what you're doing!
Post-Install setup: Sometimes spells require post-install configuration and testing that can't be taken care of by cast. An example is Free Type2 -- after casting this spell, you will be reminded that you need to specify the font path of your X server manually, and run ttmkfdir in your True Type font directory. Because there is no agreed-upon standard location for True Type fonts in X-windows, cast cannot do these things for you. It doesn't know where you've decided to install your fonts.
Supported Spells: Sometimes you will need to recompile a spell that is a dependancy for other programs. After the spell is recast, you may be prompted to recast the spells that depend on it in order to make certain they function with the new version. This is important for programs that are statically linked against common libraries, and particularly necessary when taking care of security vulnerabilities. For example, following the discovery of a severe vulnerability in the commonly used library zlib, a sorcery update recompiled zlib, and then prompted to recompile affected programs, thereby ensuring that the vulnerability was eliminated on that box.
All in all, cast is quite simple to use, like the other Source Mage commands. There are some command-line options you can use with cast, discussed in the section CastOptions.
