- Python 78.2%
- HTML 21.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| debian | ||
| examples | ||
| src/derivative_dist_compare | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| CHANGELOG.md | ||
| LICENSE.md | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.md | ||
| sonar-project.properties | ||
| tox.ini | ||
Detrivative Dist Compare
Installation
TODO
Usage
Minimal usage:
derivative-dist-compare -f ./config-file.yml
Manual Page:
usage: derivative-dist-compare [-h] [-d] [-l LOG_FILE] -f CONFIG_FILE [-j JSON_OUTPUT] [-o HTML_OUTPUT]
Debian package tracker for derivative distributions
options:
-h, --help show this help message and exit
-d, --debug Enable debug mode
-l LOG_FILE, --log-file LOG_FILE
Log file location
-f CONFIG_FILE, --config-file CONFIG_FILE
Config file
-j JSON_OUTPUT, --json-output JSON_OUTPUT
Json output file
-o HTML_OUTPUT, --html-output HTML_OUTPUT
HTML output file
Configuration File Documentation
This configuration file defines settings for a package tracking system that compares packages across different Debian distributions and architectures.
cache-dir
Type: String
Default: /var/cache/derivative-dist-compare
Description: Defines a temporary location to fetch each distribution's apt repositories.
Example:
cache-dir: /tmp/test
archs
Type: List of strings
Default: Current system architecture
Description: Defines a list of Debian architectures to include in the comparison.
Example:
archs:
- amd64
- arm64
distros
Type: Object
Description: Defines the list of distributions, either parent distributions or derivatives.
Each distribution entry can have the following properties:
sources.listorsources: Repository configuration- Use
sources.listfor traditional apt format - Use
sourcesfor DEB822 format
- Use
preferences(optional): APT preferences for package pinningparent(optional): For derivative distributions, specifies the parent distribution to compare againstvendor-suffix(optional): Adjusts version comparison for derivative distributions
Parent Distributions
distros:
sid:
sources.list: |
deb http://deb.debian.org/debian sid main contrib non-free non-free-firmware
deb http://deb.debian.org/debian experimental main contrib non-free non-free-firmware
Derivative Distributions
distros:
trixie-fastforward-backports:
parent: sid
vendor-suffix: ffwd
sources: |
Types: deb
URIs: https://deb.fastforward.debian.net/debian-fastforward
Suites: trixie-fastforward-backports
Components: main contrib non-free non-free-firmware
Using APT Preferences
APT preferences can be used to control package selection and pinning:
distros:
debian-experimental:
sources.list: |
deb http://deb.debian.org/debian experimental main contrib non-free non-free-firmware
preferences: |
Package: git:* git*:*
Pin: version /next/
Pin-Priority: -1
Common preference examples:
- Pin by version pattern:
Pin: version 54.0.* - Pin by origin:
Pin: origin "example.com" - Pin by suite:
Pin: release a=stable - Pin priority values:
1000+: Always install this version990: Used for versions from the target release500: Used for versions from normal archives100: Used for installed packages-1: Never install this version
package-sets
Type: Object
Description: Defines logical groupings of source packages for organizational purposes. When sorted, the HTML table will display packages organized by these sets.
- Key: Set name (used as identifier)
- Value: List of source packages to include in this set
Configuration Example
cache-dir: /tmp
archs:
- amd64
- arm64
distros:
# Parent distributions
sid:
bugs-url: https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=
tracker-url: https://tracker.debian.org/pkg/
sources.list: |
deb http://deb.debian.org/debian sid main contrib non-free non-free-firmware
deb http://deb.debian.org/debian experimental main contrib non-free non-free-firmware
# Optional apt pinning
preferences: |
Package: src:git:any
Pin: version /next/
Pin-Priority: -1
Package: src:libreoffice:any
Pin: version /rc1/
Pin-Priority: -1
Package: src:openvpn:any
Pin: version /rc1/
Pin-Priority: -1
# Derivative distributions
trixie-fastforward-backports:
parent: sid
vendor-suffix: ffwd
sources: |
Types: deb
URIs: https://deb.fastforward.debian.net/debian-fastforward
Suites: trixie-fastforward-backports
Components: main contrib non-free non-free-firmware
package-sets:
web:
- bootstrap-html
- bootstrap-icons
- haproxy
python:
- jinjax
This configuration enables tracking and comparison of packages across different Debian distributions and architectures, with organized package sets for better management and display.
Development Setup
To get started with the development of Detrivative Dist Compare, you need to create a Python virtual environment. This ensures that your development environment is isolated and you can easily manage dependencies.
-
Create the virtual environment:
Run the following command to create a virtual environment:
python3 -m venv .venvThis command creates a virtual environment in the
.venvdirectory while giving access to globally installed packages. This is required to utilize system-wide packages python3-apt. -
Activate the virtual environment:
source .venv/bin/activate -
Make
aptandapt_pkgavailable in the virtual environment:Since the
aptandapt_pkgmodules are part of the system-wide packages, you need to link them manually into your virtual environment:ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-311-x86_64-linux-gnu.so .venv/lib/python3.11/site-packages/ ln -s /usr/lib/python3/dist-packages/apt .venv/lib/python3.11/site-packages/These commands create symbolic links to make
aptandapt_pkgaccessible in your virtual environment. -
Install project dependencies:
Once the virtual environment is active, install the necessary dependencies using
pip:pip install -e .This will install all the required libraries and packages for the project.