calamares/src/modules
2015-06-11 00:32:50 +02:00
..
bootloader Replace Gummiboot with systemd-boot. 2015-06-11 00:32:50 +02:00
displaymanager [displaymanager] Add i3, move openbox to the end of the list. 2015-05-15 12:50:29 +02:00
dracut [dummypython] add python doc strings 2015-02-25 14:49:23 +01:00
dummyprocess Add option to run process jobmodules in chroot. 2014-08-12 14:26:10 +02:00
dummypython Make dummypython sleep for 30sec. 2015-05-07 16:10:42 +02:00
finished [finished] fix config file 2015-02-04 19:54:18 +01:00
fstab Fix ssd detection for MMC devices. 2015-05-08 10:37:54 +02:00
grubcfg Fix up regex in grubcfg to work with single quotes. 2015-04-02 20:25:41 +02:00
hwclock [PEP 8] General Style Part 2 2015-02-18 09:47:24 -05:00
initcpio [initcpiocfg] add python doc strings 2015-02-25 14:49:23 +01:00
initcpiocfg [initcpiocfg] add python doc strings 2015-02-25 14:49:23 +01:00
initramfs [initramfs] add python doc strings 2015-02-25 14:49:23 +01:00
keyboard Add debug output to SetKeyboardLayoutJob. 2015-04-03 15:04:24 +02:00
locale Use <strong> instead of <b> in all instances. 2015-04-13 14:58:34 +02:00
localecfg Fix typo. Please test your Python code, as CI won't catch it. 2015-02-18 18:46:13 +01:00
machineid [machineid] add python doc strings 2015-02-25 14:49:23 +01:00
mount mount: mount efivarfs on /sys/firmware/efi/efivars 2015-05-01 10:42:06 +02:00
networkcfg [PEP 263] Corrected Encoding Headers 2015-02-18 09:06:10 -05:00
packages [modules/packages] Added support for Portage and Entropy 2015-06-08 19:29:51 +02:00
partition Clarify. 2015-06-10 00:17:59 +02:00
removeuser removeuser job module, this time in Python. 2015-02-25 17:37:25 +01:00
services [services] revert f1908eb 2015-03-13 17:49:24 +01:00
summary Make the Summary page contents scrollable. 2015-04-13 14:58:34 +02:00
umount [umount] add python doc strings 2015-02-25 14:49:23 +01:00
unpackfs [unpackfs] proper sentence 2015-02-25 14:49:24 +01:00
users Align Pointers 2015-02-25 19:57:19 -05:00
welcome Use the new physical memory checker. 2015-06-10 00:06:45 +02:00
CMakeLists.txt Add CalamaresAddModuleSubdirectory, a CMake function for modules that 2014-07-14 16:26:10 +02:00
globalStorage.yaml Consistency: calamares_main ==> run; global_storage => globalStorage 2014-07-25 16:46:12 +02:00
README.md Update Calamares modules documentation. 2014-08-06 15:50:39 +02:00
testmodule.py Python Better Docstrings 2015-02-25 14:49:23 +01:00

Calamares modules

Calamares modules are plugins that provide features like installer pages, batch jobs, etc. Each Calamares module lives in its own directory.

All modules are installed in $DESTDIR/lib/calamares/modules.

Module directory and descriptor

A Calamares module must have a module descriptor file, named module.desc, this file must be placed in the module's directory. The module descriptor file is a YAML 1.2 document which defines the module's name, type, interface and possibly other properties. The name of the module as defined in module.desc must be the same as the name of the module's directory.

There are two types of Calamares module:

  • viewmodule,
  • jobmodule.

There are three interfaces for Calamares modules:

  • qtplugin,
  • python,
  • process.

Module-specific configuration

A Calamares module may read a module configuration file, named <modulename>.conf. If such a file is present in the module's directory, it is shipped as a default configuration file. The module configuration file, if it exists, is a YAML 1.2 document which contains a YAML map of anything. All default module configuration files are installed in $DESTDIR/share/calamares/modules but can be overridden by files with the same name placed manually (or by the packager) in /etc/calamares/modules.

Qt plugin viewmodules

Currently the only way to write a module which exposes one or more installer pages (viewmodule) is through a Qt plugin. Viewmodules should implement Calamares::ViewStep. They can also implement Calamares::Job to provide jobs.

To add a Qt plugin module, put it in a subdirectory and make sure it has a module.desc and a CMakeLists.txt with a calamares_add_plugin call. It will be picked up automatically by our CMake magic.

Python and process jobmodules

Batch jobs for Calamares can be written as Python scripts or as generic commands (shell scripts, external programs, etc.). To add a Python or process jobmodule, put it in a subdirectory and make sure it has a module.desc. It will be picked up automatically by our CMake magic.

CMakeLists.txt is not used for Python and process jobmodules.

A Python jobmodule is a Python program which imports libcalamares and has a function run() as entry point. run() must return None if everything went well, or a tuple (str,str) with an error message and description if something went wrong.

Calamares offers a Python API for module developers, the core Calamares functionality is exposed as libcalamares.job for job data, libcalamares.globalstorage for shared data and libcalamares.utils for generic utility functions. Documentation is inline.

All code in Python job modules must obey PEP8, the only exception are libcalamares.globalstorage keys, which should always be camelCaseWithLowerCaseInitial.

For testing and debugging we provide the testmodule.py script which fakes a limited Calamares Python environment for running a single jobmodule.