About News Download Docs Bugs Contact





File filters

Filtering files based on the way Sorcery should treat them:

fact/filter volatiles configs excluded protected
file is installed yes yes yes yes
file is uninstalled yes only if unmodified (also depends on your settings) no no
file's MD5 matters no yes no yes

Currently there are system level filter files in /var/lib/sorcery. Each line is a single pattern, each pattern is matched against a filename's full path with $INSTALL_ROOT stripped off. A pattern such as ^/etc matches any file in /etc. Filter functions to filter in or out files are utilized in sorcery depending on what is required.

Here are the following filter files, again these are lists of regular expressions, one per line, a file is said to "match" if it is described by any regular expression in the filter file:

Some remarks about the relationship between these files:

  1. "volatiles" and "configs" files should probably be nearly an identical set. They're separated because it's just as easy codewise to do it this way, and it will provide greater flexibility in the future. However one has to be aware that marking a file as a config file is not sufficient for getting cleanse to ignore it and funny things might happen if you don't.
  2. Adding things to the protected/volatiles/configs list is useless if the file is in excluded (it won't be tracked).
  3. On dispel protected files are kept from being removed.
  4. There currently is no way to negate a pattern in the system level filter files.

Note: if you put file under the configs, sorcery won't (and can't) stop the spell itself to overwrite its configs upon recast.