This project provides a comprehensive, cross-language set of constants and definitions related to ALT Linux repositories and distributions, offering developers native representations for multiple programming languages.
  • Python 52.5%
  • Jinja 44.9%
  • Makefile 2.6%
Find a file
2026-01-19 14:28:11 +03:00
.gear 0.2.2-alt1 2026-01-14 15:17:56 +03:00
data add upgrade_chains structure for branch upgrade dependencies 2026-01-17 10:42:41 +00:00
pkg_config change library license for wider compatibility: GPLv3 -> LGPLv2.1 2026-01-14 15:14:26 +03:00
templates change library license for wider compatibility: GPLv3 -> LGPLv2.1 2026-01-14 15:14:26 +03:00
tests tests: add YAML comment extract tests 2025-08-05 16:18:35 +03:00
.gitignore update Git exclusions 2025-06-20 17:47:21 +03:00
CHANGELOG.md bump version 0.2.2 -> 0.2.3 2026-01-19 14:28:11 +03:00
generate.py Handle empty list/map definitions in schema parsing 2026-01-16 16:12:56 +03:00
jinja2_ext.py change library license for wider compatibility: GPLv3 -> LGPLv2.1 2026-01-14 15:14:26 +03:00
LICENSE change library license for wider compatibility: GPLv3 -> LGPLv2.1 2026-01-14 15:14:26 +03:00
Makefile add bash library generation support 2025-12-26 14:41:13 +03:00
README.md update project dependencies 2026-01-19 08:30:56 +03:00
VERSION bump version 0.2.2 -> 0.2.3 2026-01-19 14:28:11 +03:00

ALT Releases Matrix

This project provides a comprehensive, cross-language set of constants and definitions related to ALT Linux repositories and distributions, offering developers native representations for multiple programming languages.

Purpose

The project serves as a standardized reference for:

  • ALT Linux distribution versions and branches
  • Repository configurations and architectures
  • Distribution-specific paths and settings
  • ALTRepo project related definitions

Core Components

  • Distribution Constants

    • Branch identifiers (Sisyphus, p10, p9, etc.)
    • Branch inheritance
    • Architecture support (x86_64, i586, aarch64, etc.)
  • Repository Definitions

    • Official repository URLs and mirrors
    • Related resources URLs and definitions (Beehive, Bugzilla, Git, Wiki etc.)
  • A set of constants, lists and structures that used by ALTRepo project components

Data Structures

The data is organized into three categories: scalar constants, list constants, and structure constants.

Scalar Constants

Base URLs for ALT Linux infrastructure services:

Constant Description
alt_wiki_base_url ALT Linux Wiki base URL
bugzilla_base_url ALT Linux Bugzilla bug tracker URL
errata_base_url ALT Linux Errata service URL
gitalt_base_url ALT Linux Git repository base URL
gitalt_tasks_base_url ALT Linux Git tasks URL
packages_base_url ALT Linux packages browser URL
public_ftp_base_url Public FTP mirror for distributions

List Constants

List Description
arch_sorting_order Package architectures in display order (src, noarch, x86_64, i586, aarch64, etc.)
branch_sorting_order All branches in priority order (sisyphus first, then stable branches, then older releases)
known_archs All supported package architectures
know_branches All known ALT Linux branches (current and historical)

Structure Constants

beehive

Definitions for the Beehive build log service.

Field Description
base_url Beehive service URL
branches Branches with Beehive support
archs Architectures available in Beehive

active_branch_names

Map of currently active ALT Linux branches. Keys and values are branch identifiers.

Includes all branches that are being worked with in any capacity: building tasks, building distribution images, browsing on packages.altlinux.org, etc.

branch_inheritance

Defines parent-child relationships between branches for package inheritance tracking.

Field Description
root Root branch (sisyphus)
<branch> List of parent branches for inheritance chain

Example: c10f2 inherits from ["c10f1", "p10", "sisyphus"]

images

Definitions for ALT Linux distribution images processing.

Field Description
archs Supported image architectures
components Image components (iso, rpms, altinst, live, rescue)
editions Distribution editions (alt-server, alt-workstation, slinux, etc.)
platforms Hardware platforms (tegra, rpi4, baikalm, qemu, oci, k8s, etc.)
releases Release stages (alpha, beta, rc, release)
types Image file types (iso, tar, img, qcow, oci)
variants Image variants (install, live, rescue)

repology

Definitions for Repology integration.

Field Description
base_url Repology service URL
branches ALT Linux branch names as known by Repology
export_branches Branches exported to Repology
branch_map Mapping from ALT branch names to Repology names

oval_xml

Definitions for OVAL (Open Vulnerability and Assessment Language) XML generation used in security advisories.

Field Description
generator_product_name OVAL generator identifier
oval_id_prefix Prefix for OVAL identifiers
xml_version OVAL XML schema version
export_branches Branches with OVAL export support
branches_map Branch to OVAL ID mapping
<branch>_products Product names for each branch
<branch>_cpes CPE (Common Platform Enumeration) identifiers
cpe_regex Regular expressions for CPE validation
cpe_regex_match Expected match values for CPE validation

vulnerability

Definitions for vulnerability identifier parsing and processing.

Field Description
bug_id_type/prefix/regex ALT Bugzilla bug ID format
bdu_id_type/prefix/regex Russian BDU vulnerability ID format
cve_id_type/prefix/regex CVE identifier format
ghsa_id_type/prefix/regex GitHub Security Advisory format
mfsa_id_type/prefix/regex Mozilla Foundation Security Advisory format
ove_id_type/prefix/regex Open Vulnerability Entry format
common_vuln_regex Combined regex matching any supported vulnerability ID

errata

Definitions for ALT Linux Errata system.

Field Description
errata_id_regex Errata identifier format
branch_update_prefix Branch update bulletin prefix (ALT-BU)
package_update_prefix Package update prefix (ALT-PU)
errata_change_prefix Errata change prefix (ALT-EC)
security_advisory_prefix Security advisory prefix (ALT-SA)
reference_type_* Reference type identifiers (bug, branch, errata, package, task, vuln, web)
*_errata_type Errata record types
*_errata_source(s) Errata data sources
errata_change_actions Change actions (create, update, discard)
errata_change_origins Change origins (parent, child)
errata_change_sources Change sources (auto, manual)

Supported Languages

  • Python
  • C
  • Go
  • Rust
  • JavaScript
  • TypeScript
  • OCaml
  • Bash

License

LGPLv2.1

Library usage

Due to the specifics of library distribution schemes and package managers for various programming languages, as well as agreements regarding library packaging in ALT Linux, the following methods for using libraries in your projects are presented below.

YAML

Data definition YAML file that used to build libraries is available through alt-releases-matrix RPM-package at

/usr/share/alt_release_matrix/data/data.yml

C

Header-only library is available through alt-releases-matrix-devel RPM-package.

Go

Go module is avalable through alt-releases-matrix RPM-package. Use below configuration to use it in your project

in go.mod file add the module from fylesystem path

module go_test

go 1.21

require (
    alt_release_matrix v0.0.0
)

replace alt_release_matrix => /usr/share/alt_release_matrix/lib/go

and use it like in example below

package main

import (
    "fmt"

    lut "alt_release_matrix"
)

func main() {
    fmt.Println("Hello, World!")
    fmt.Printf("Version is %s\n", lut.Version)

    fmt.Printf("Version is %s\n", lut.OvalXml.CpeRegexValues[0])

    for _, s := range lut.ArchSortingOrder {
        fmt.Printf("Branch %s\n", s)
    }
}

Rust

Rust crate is avalable through alt-releases-matrix RPM-package. Use below configuration to use it in your project

add a dependency using cargo with filesystem path

$ cargo add --path /usr/share/alt_release_matrix/lib/rust

and use it like in example below

use alt_release_matrix::{lists, scalars, structs};

fn main() {
    println!("Hello, world!");

    println!("Version: {}", alt_release_matrix::VERSION);

    println!("Git: {}", scalars::GITALT_BASE_URL);

    for b in lists::BRANCH_SORTING_ORDER {
        println!("Branch: {b}");
    }

    for c in structs::OVAL_XML.cpe_regex_values {
        println!("CPE regex: {c}");
    }
}

Python

Python library is avalable through python3-module-alt_releases_matrix RPM-package.

JavaScript

JavaScript library is avalable through node-alt-releases-matrix-js RPM-package. There is no convenient way to manage a library via npm except by publishing it on the NPM registry.

just import library like in example below

import { SCALARS, LISTS, STRUCTS } from "/usr/lib/node_modules/alt-releases-matrix-js";

TypeScript

TypeScript library is avalable through node-alt-releases-matrix-js RPM-package. There is no convenient way to manage a library via npm except by publishing it on the NPM registry.

just import library like in example below

import { SCALARS, LISTS, STRUCTS } from "/usr/lib/node_modules/alt-releases-matrix-ts";

OCaml

OCaml library is available through ocaml-alt-releases-matrix and ocaml-alt-releases-matrix-devel RPM-packages.

add dependency in your dune file

(library
 (name my_project)
 (libraries alt_releases_matrix))

and use it like in example below

open Alt_releases_matrix

let () =
  Printf.printf "Version: %s\n" version;
  Printf.printf "Git URL: %s\n" gitalt_base_url;

  List.iter (Printf.printf "Arch: %s\n") arch_sorting_order;

  Printf.printf "Beehive URL: %s\n" Beehive.base_url;
  List.iter (Printf.printf "Beehive branch: %s\n") Beehive.branches

Bash

Bash library is available through alt-releases-matrix RPM-package at

/usr/share/alt-releases-matrix/lib/bash/alt_releases_matrix.sh

script usage example

#!/bin/bash
source /usr/share/alt-releases-matrix/lib/bash/alt_releases_matrix.sh

echo "Version: $ARM_VERSION"
echo "Git URL: $GITALT_BASE_URL"

# iterate over known architectures
for arch in "${KNOWN_ARCHS[@]}"; do
    echo "Arch: $arch"
done

# access associative array
echo "Beehive URL: ${BEEHIVE[base_url]}"

# iterate over beehive branches
for branch in "${BEEHIVE_BRANCHES[@]}"; do
    echo "Beehive branch: $branch"
done

# iterate over active branch names
for branch in "${!ACTIVE_BRANCH_NAMES[@]}"; do
    echo "Active branch: $branch"
done

bash completion example

_my_tool_completion() {
    local cur="${COMP_WORDS[COMP_CWORD]}"

    source /usr/share/alt-releases-matrix/lib/bash/alt_releases_matrix.sh

    case "${COMP_WORDS[1]}" in
        branch)
            COMPREPLY=($(compgen -W "${!ACTIVE_BRANCH_NAMES[*]}" -- "$cur"))
            ;;
        arch)
            COMPREPLY=($(compgen -W "${KNOWN_ARCHS[*]}" -- "$cur"))
            ;;
        image)
            COMPREPLY=($(compgen -W "${IMAGES_EDITIONS[*]}" -- "$cur"))
            ;;
    esac
}

complete -F _my_tool_completion my_tool

Dependencies

The primary code generation is handled by a Python script utilizing Jinja2 templates. The resulting native libraries are then formatted using industry-standard tools:

  • Black (for Python)
  • rustfmt (for Rust)
  • gofmt (for Go)
  • clang-format (for C/JS/TS)
  • dune, ocaml-format (for OCaml)
  • shfmt (for Bash)

Therefore, project depends on:

  1. Python (runtime)
  2. The Jinja2 Python library
  3. The PyYAML Python library
  4. The code formatting tools listed above