Specification of signatures.json
Goal
This file should contain the data which is used by a program to recognize with a general algorithm which operating system an ISO image passes to the program. This specification should not be limited itself to one operating system. If that this is not possible, we shall focus on Linux and its distributions.
File structure
The file should be a single JSON object which has a single key with the name breeds. This key should contain a single sub-object with key-value pairs for each operating system group.
Currently the following operating system groups are existing:
redhat
debian
ubuntu
suse
vmware
freebsd
xen
unix
windows
powerkvm
generic
This list should be modified when new groups are added, removed or changed when changed in the JSON.
Each of these operating system groups have a key for each version of it. The key should be in lowercase and should have a version suffix. The name of the key should be unique across the distribution section and contains an object.
For a list of keys and types please look at our schema: https://github.com/cobbler/libcobblersignatures/tree/main/docs/schema.json
Note
The schema is used to validate the signatures and can be used as a template for writing and comparing your own signatures. For more information read the JSON Schema documentation at https://json-schema.org/
Note
The current json type null is only valid for version_file_regex and kernel_arch_regex.
For all other keys please use empty strings, lists or dicts for default values.
Version keys
Each operating system version object supports the following keys. This table is generated from
the docstrings of libcobblersignatures.models.osversion.Osversion by
scripts/sync_json_spec_docs.py — update the docstrings, then re-run the script, rather than
editing the table below directly.
Key |
Type |
Description |
|---|---|---|
|
array |
One or more paths, relative to the root of the ISO, whose existence identifies this OS version. |
|
string / null |
The regular expression which points to the file with the os-version info. |
|
string / null |
The regular expression matched against the contents of the file located via |
|
string |
The regular expression which tells Cobbler where to look for the architecture of the operating system. In some cases this may also be a path to the file where Cobbler should look for the architecture. |
|
string / null |
The regex applied within the file located via |
|
array |
The architectures Cobbler considers valid when detecting the architecture of an imported distro. |
|
array |
The repository breeds Cobbler may auto-create when it finds a matching repo in the install tree. |
|
string |
The regular expression to match to find the kernel. |
|
string |
The regular expression to match to find the initrd. |
|
boolean |
Whether directories named |
|
string |
The filename for the default autoinstall template in Cobbler. |
|
string |
Default kernel options to apply to the imported ISO. |
|
string |
Default kernel post options to apply to the imported ISO. |
|
string |
Extra files merged into the imported distro’s template_files, used to render templated boot files (e.g. ESXi’s boot.cfg). |
|
array |
Extra files, beyond the kernel and initrd, that must be copied out of the source tree and templated for the distro. |
|
object |
The boot loaders Cobbler considers valid for this OS version, keyed by architecture. |
Example files
Please have a look at https://github.com/cobbler/libcobblersignatures/tree/main/libcobblersignatures/config/distro_signatures.json
The most simple valid (but useless) signatures.json file will be:
{
"breeds": {}
}