- Python 57.9%
- Shell 38.3%
- M4 3.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Add the new database and messaging components to the main section of the server edition, in the system-infra/databases group. Co-authored-by: Crush <noreply@github.com> |
||
| .forgejo/workflows | ||
| .gear | ||
| categories | ||
| components | ||
| docs | ||
| editions | ||
| scripts | ||
| vendors | ||
| alt-components-base.spec | ||
| README.md | ||
alt-components-base
Designed for building hierarchical structure of system components.
- Overview
- Guidelines for creating new components
- Guidelines for creating new categories
- Client Interaction
- Development Workflow
Overview
The project uses 3 alterator-entry entities:
| Entity | Format | Description |
|---|---|---|
| Component | .component |
A set of logically grouped RPM packages |
| Category | .category |
Entity for grouping components by thematic criteria |
| Edition | .edition |
Top-level entity designed for creating target distribution configurations |
Entities are described in TOML format and must strictly comply with the specification documented in the alterator-entry project. The project also provides examples of component definitions.
Links to entity specifications::
Guidelines for creating new components
Component naming
- The
namefield in the component file (<name>.component) must match the directory name:
components/<name>/<name>.component
- Name format: kebab-case, latin letters, numbers, and hyphens.
Example:network-manager,xfce-base,postgresql17 - Define roles/variants using suffixes:
-server/-client/-agent: network roles and agents. Examples:zabbix-server,urbackup-client,qemu-guest-agent.-gtk3/-gtk4/-qt: UI variant.-base/-extra/-tools: base group, extension, utility set.-driver/-plugin: drivers/plugins.
- Place versions at the end of the name without extra symbols:
postgresql17,wine32. - Keep technology stack prefixes:
gnome-*,xfce-*,kde5-*,nvidia-*,openssl-* - Avoid synonyms: if
network-managerexists, do not createnm-manager.
Component Structure
- Minimum
.componenttemplate:
type = "Component"
name = "<kebab-case>"
category = "<категория-из-директории-categories>"
display_name.en = "<Human readable English>"
display_name.ru = "<Читаемое русское имя>"
[packages]
pkg-one = {}
pkg-two = {}
- Documentation:
description.mdanddescription.ru.mdmust be located in the same directory as.component:
$ tree samba-dc
samba-dc
├── description.md
├── description.ru.md
└── samba-dc.component
Rules for composing .component files
- Add specific dependencies to [packages], do not duplicate system base packages.
display_namedisplay_name.enanddisplay_name.ruare short, and human-readable.- Avoid repeating the category in the name (do not use "Network tool ..." if
category = "network"). - Start with a capital letter, avoid unnecessary parentheses.
- Recommended format:
<Project/Product Name> - <brief description>. A dash is used as the separator.
Example:
display_name.en = "Alterator - graphical system explorer" display_name.ru = "Альтератор - графический обозреватель системы"
Rules for composing description files (description.<lang>.md)
- Use Markdown language for description files.
- The line length must not exceed 80 characters.
- The file must end with links to the documentation and the homepage. The names must be highlighted in bold.
For example, the content of a description file for the samba component:
Provides the server-side components and tools for organizing shared access to files and printers using the SMB/CIFS protocol.
Supports user authentication, shared folder management, integration with Active Directory,
access control configuration, and resource discovery within the local network.
**ALT Linux Wiki:** <https://www.altlinux.org/Samba/Fileserver/AD-auth>
**Home page:** <https://www.samba.org/>
Categories and classification
Note
TODO: Describe existing categories
Category selection rules
- The category should reflect the component's main function, not its technical implementation or internal details.
- Review the current list of categories and select the most appropriate one. If a component fits into several categories, choose the one that best describes its primary purpose.
- Assign components representing a specific vendor's product to the corresponding vendor category.
- Add a new category only when at least three components of the same type have emerged in the project, for which no appropriate category exists in the current taxonomy. The rules for creating a category are provided below.
- If you cannot definitively determine the category, propose an option in the PR discussion.
Rules for Specifying Packages
There are packages whose dependency hierarchy includes virtual packages with multiple equally suitable providers,
which leads to the inability to automatically choose a provider.
For each such package, the provider should also be explicitly listed in the package list. The purpose of this approach is to relieve the end user of the responsibility of selecting a provider.
For example, a component package has a dependency on the virtual package python3(utils):
# apt-get install "python3(utils)"
Reading package lists... Done
Building dependency tree... Done
The virtual package python3(utils) is provided by:
glib2-devel sisyphus+397946.100.1.1@1761104909
gis-weather sisyphus+379499.100.1.1@1743169899
lightdm-webkit2-greeter sisyphus+389466.122100.82.1@1759860932
gobject-introspection-devel sisyphus+395347.300.7.4@1760375875
cvise sisyphus+363817.100.2.1@1733388120
You must specify exactly which package should be installed.
E: The virtual package python3(utils) is provided by multiple packages.
Therefore, the component package list should also explicitly indicate the desired provider. For example, let it be
glib2-devel.
[packages]
glib2-devel = {}
Guidelines for creating new categories
Categories are designed to group components by topic and build a hierarchical navigation structure. Categories can be nested within each other.
Category naming
- The
namefield in the category file (<name>.category) must match the directory name:categories/<name>/<name>.category - Name format: kebab-case, Latin letters, numbers, and hyphens.
Example:
kde6,alterator,graphics-apps - For vendor categories, use the vendor name.
Example:
yandex.category - Avoid excessive detail in the name: if a category is called
servers, it may contain subcategories such asweb-servers,db-servers, etc.
Category structure
- Minimal recommended
.categorytemplate:
type = "Category"
name = "alterator"
category = "apps"
display_name.en = "Alterator"
display_name.ru = "Альтератор"
comment.en = "Alterator applications"
comment.ru = "Приложения Альтератора"
Rules for creating .category files
display_namedisplay_name.enanddisplay_name.rushould be concise and human-readable.- Capitalize the first letter, do not end with a period.
category- The recommended maximum nesting depth is 4 levels from root to component. Deep hierarchies complicate navigation in clients.
Client Interaction
Communication between components (categories and sections) and clients (such as the graphical application alt-components or the components module of the alteratorctl utility) is organized through D-Bus - an inter-process communication system.
However, the alt-components-base project does not directly provide the interaction interface; this is handled by the alterator-backend-component package:
-
The
alterator-backend-componentсpackage contains a filetrigger that, when new components are added to the system (located in/usr/share/alterator/components) executes the script/usr/lib/alterator/backends/component.d/generate-components-backends, which generates backend files required by alterator-manager. -
alterator-managerreads the new backend files and generates objects/org/altlinux/alterator/<component_name>on D-Bus, implementing theorg.altlinux.alterator.component1interface.
Thus, component developers don't need to worry about creating objects and implementing interfaces - it's sufficient to add the necessary files (.component, description.md и т.д.) to alt-components-base.
For optimized interaction with components and categories over D-Bus, the object
/org/altlinux/alterator/global, is provided, offering interfaces for working with them (org.altlinux.alterator.batch_component_categories1,org.altlinux.alterator.batch_components1,org.altlinux.alterator.component_categories1,org.altlinux.alterator.current_edition1)
The listed interfaces are provided by the
alterator-backend-componentpackage
Development Workflow
- Fork the repository.
- Add entity files (.component, .category, .edition) to the project.
- Validate your changes (run
./scripts/validate_categories.py). - Validate edition HTML templates (run
./scripts/validate_html.py). - Submit your contribution.
Before submitting a PR, it's recommended to test your changes in a test environment (using the
alt-componentsandalteratorctl componentsclients)