Cast --->

Sorcery

A. Sorcery

Sorcery is the package management component of Source Mage GNU/Linux. It is a suite of scripts written in BASH, making it easy to modify to fit the user's needs. Package information are stored in plain text files, stored in the package's directory. Sorcery makes use of other information and customizations, such as system architecture, compiler options, build flags, and others, that are also stored in plain text files in order to build you a system just the way you like it.

Notes:
Each spell's instructions are stored in the spell's folder.
The default Sorcery configuration files are located in /etc/sorcery/, which can be overridden by the configuration files in /etc/sorcery/local/. See the man page for sorcery_config for details.

Unlike some of today's most popular distributions, Source Mage doesn't just download and install pre-built packages that have been compiled with very generic options to make it compatible on any system. Instead, Sorcery downloads the source code, straight from the original source (or a mirror) and compiles it specifically for your system, applying your chosen customizations and optimizations. It may not be as fast as installing binary packages, but Sorcery provides full control over your system as well as the speed benefits of building software optimized for your unique setup.

Notes: What are the advantages of a source-based distribution?

Besides full control and configurability, Sorcery also offers a lot of other features that make it very powerful. Sorcery checks the integrity of each source package it downloads, using GPG or other hashes, making sure that what you downloaded is the exact same package from the author and hasn't been modified or hacked into. All installations are monitored by installwatch, so it's easy to keep track which files were installed by the spell and where they were installed. Another very useful feature of Sorcery is that it saves everything that a spell installs into a bzipped tarball. This is specially useful when resurrecting (reinstalling) spells that you have removed or in healing a broken system. Sorcery will simply uncompress the tarball and reinstall the files in their proper locations. No recompiling is necessary, as long as the tarball exists.

These and other Sorcery features can be configured in plain text files or using the menu-based system. We'll get to Sorcery features and the sorcery command later.

Notes: installwatch homepage

There are six main commands under the Sorcery suite of scripts. These are

There is also the Sorcery command, which is used to manage sorcery itself as well as launch the menu-driven package management program, from which all the other six commands can be reached. There are also other scripts that are part of the Sorcery suite, such as scribbler, alter, and cleanse.

Before proceeding to learning about Sorcery, one must first gain knowledge about the basics of Spells.

B. Grimoires and Spells

The Grimoire is the package collection component of Source Mage. Sorcery is the package manager, the Grimoire is the package collection.

The most basic package unit in Source Mage is a Spell. A spell consists of intructions that tell Sorcery how to obtain, compile and install programs. Spell do not contain the source code nor the compiled programs themselves, just instructions on what to do to be able to install it. Think of it like a list of ingredients and procedures on how to make a potion, which in this case is the program. All instructions are written in BASH and found in plain text files.

A grimoire is a book of spells, like a book of shadows. Similarly in Source Mage, a grimoire is a collection of Source Mage Spells, BASH scripts that instruct Sorcery how to install packages. Each grimoire is divided in to different sections, like chapters in a book. Each section contains a number of related spells. For example, all core KDE spells are grouped together in a kde-core section, while IRC client spells are in a chat-irc section.

The codex is a collection of grimoires. If grimoires are spell books, think of the codex as a shelf of books or a whole library. More specifically, each user has his own codex, which consists of the grimoires installed on his system. You can add, remove, and manage the grimoires in your codex through the scribe command. More about grimoires later.

Notes:
The codex is located at /var/lib/sorcery/codex/
Spells, sections, and grimoires are located as follows: /var/lib/sorcery/codex//

//

Now, on to the Sorcery scripts!


Cast --->
std::cout
This is a standard output box. It will occassionally contain announcement, news, quotes, ramblings, or anything under the sun.

Hyperlinks