calamares/src/modules
2017-06-19 10:46:30 -04:00
..
bootloader Fixed two typos that leads to pep8 whining 2017-03-29 20:19:41 +02:00
displaymanager Fixed pep8 whining in module displaymanager 2017-06-06 20:35:07 +02:00
dracut Fixed pep8 whining in module dracut 2017-03-21 12:33:26 +01:00
dracutlukscfg Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
dummycpp Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
dummyprocess Add option to run process jobmodules in chroot. 2014-08-12 14:26:10 +02:00
dummypython Fixed pep8 whining in module dummypython 2017-03-21 21:38:33 +01:00
dummypythonqt [dummypythonqt] Automatic merge of Transifex translations 2017-06-19 02:48:58 +00:00
finished Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
fstab Fixed pep8 whining for module fstab 2017-06-02 20:55:26 +02:00
grubcfg Fixed pep8 whining in module grubcfg 2017-06-04 13:57:49 +02:00
hwclock Fixed pep8 whining in module hwclock 2017-06-02 20:14:10 +02:00
initcpio Use target_env calls in Python modules. 2015-09-15 16:48:41 +02:00
initcpiocfg Python-style: follow-up to PR 735, remove non-idiomatic use of 'is' 2017-06-04 11:37:12 +02:00
initramfs Fixed pep8 whining in modulde initramfs 2017-06-02 21:53:31 +02:00
initramfscfg Python-style: refactor calculating target path of hook-script 2017-06-06 16:18:26 +06:00
interactiveterminal Cleanup: require ECM 5.10 or later (released 2015) 2017-06-12 05:14:27 -04:00
keyboard Keyboard: code-docs, copyright 2017-06-19 10:46:30 -04:00
license Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
locale Locale: when entering page, guess language. 2017-06-07 03:52:44 +06:00
localecfg Fix localecfg to work with new locale module. 2016-08-10 12:11:48 +02:00
luksbootkeyfile Python-style: actually add the new copyright headers 2017-06-04 15:01:25 +02:00
luksopenswaphookcfg Fixed pep8 whininig in module luksopenswaphookcfg 2017-06-02 22:16:25 +02:00
machineid Fixed pep8 whining in module machineid 2017-03-21 22:45:12 +01:00
mount reworked intendation 2017-06-02 19:58:36 +02:00
netinstall Coverity: fix some uninitialized members 2017-06-17 15:14:02 -04:00
networkcfg Fixed pep8 whining in module networkcfg 2017-06-04 13:31:08 +02:00
packages refine warn_text coding 2017-04-18 18:13:36 +02:00
partition PartitionModule: skip nullptr devices, and report count 2017-06-14 12:24:32 -04:00
plymouthcfg Fixed pep8 whining in module plymouthcfg 2017-03-21 12:44:05 +01:00
removeuser Fixed removeuser 2017-03-29 20:42:32 +02:00
services Fixed pep8 whining in module services 2017-06-06 18:26:29 +02:00
summary Do not LINK_PUBLIC by default. 2016-12-07 16:37:29 +01:00
umount Configs: fix trivial spelling error 2017-06-02 15:43:07 +02:00
unpackfs Fixed pep8 whining in module unpackfs 2017-06-06 17:44:53 +02:00
users Increate the maximum allowed length of a hostname. 2017-06-19 05:16:54 -04:00
webview Alignment. 2016-12-22 13:52:33 +01:00
welcome Allow different welcome message. 2017-06-12 15:25:54 -04:00
CMakeLists.txt Do not build modules listed in SKIP_MODULES. 2015-08-28 17:38:36 +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 Introduced help_desc = "foo" 2017-04-10 13:32:12 +02: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.