You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shainer e5f5bb99d7 Change the default value of critical to false.
This means all package groups are non-critical by default.
Update documentation accordingly.
9 years ago
..
bootloader [bootloader] Fix UEFI firmware workaround for 32-bit UEFI. 9 years ago
displaymanager Make sure we also set a preferred Xsession 9 years ago
dracut Use target_env calls in Python modules. 10 years ago
dracutlukscfg [dracutlukscfg] New module: pre-configuration for dracut+LUKS. 9 years ago
dummycpp New dummycpp C++ job module (ported from dummypython). 9 years ago
dummyprocess
dummypython Fix typo. 9 years ago
finished Force reboot with systemctl -i. 9 years ago
fstab Write Btrfs subvolume lines to fstab. 9 years ago
grubcfg [grubcfg] Compare integers to integers, not strings. 9 years ago
hwclock A little more PEP 10 years ago
initcpio Use target_env calls in Python modules. 10 years ago
initcpiocfg Add openswap hook handling to initcpiocfg. 9 years ago
initramfs Use target_env calls in Python modules. 10 years ago
initramfscfg [initramfscfg] New module: pre-configuration for update-initramfs. 9 years ago
interactiveterminal PluginFactory in InteractiveTerminal module. 10 years ago
keyboard Make writeEtcDefaultKeyboard an option in keyboard.conf. 9 years ago
license Port away from most cases of Q_FOREACH to C++11 ranged for loop. 9 years ago
locale Config file comment. 9 years ago
localecfg Fix localecfg to work with new locale module. 9 years ago
luksbootkeyfile Only add LUKS keyfile if relevant, and with a 15s timeout. 9 years ago
luksopenswaphookcfg Strip leading / from openswap config path. 9 years ago
machineid [machineid] simplify code 9 years ago
mount Special case for Btrfs root: create subvolumes and mount them. 9 years ago
netinstall Change the default value of critical to false. 9 years ago
networkcfg Remove target resolv.conf before proceeding. 9 years ago
packages Allow try_install and try_remove entries in packages module. 9 years ago
partition [partition] Bump kpmcore requirements 9 years ago
plymouthcfg [plymouthcfg] add module to configure Plymouth (#256) 9 years ago
removeuser Use target_env calls in Python modules. 10 years ago
services [services] Document that systemctl enable/disable are chroot-safe 9 years ago
summary Port away from most cases of Q_FOREACH to C++11 ranged for loop. 9 years ago
umount Try to fix umount. 9 years ago
unpackfs [unpackfs] Do not fail if rsync returns exit code 23. 9 years ago
users Add user to groups separately from useradd. 9 years ago
webview WEBVIEW_FORCE_WEBKIT option for webview module. 9 years ago
welcome [welcome] Use QNetworkAccessManager in checkHasInternet. 9 years ago
CMakeLists.txt Do not build modules listed in SKIP_MODULES. 10 years ago
README.md
globalStorage.yaml
testmodule.py Python Better Docstrings 10 years ago

README.md

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.