| 1 |
Getting Started |
| 2 |
=============== |
| 3 |
|
| 4 |
Below are two possible approaches to use the ``debsbom`` tool. |
| 5 |
|
| 6 |
Virtual Environment |
| 7 |
------------------- |
| 8 |
|
| 9 |
1. Create a new virtual environment: |
| 10 |
|
| 11 |
``python3 -m venv --system-site-packages <env_name>`` |
| 12 |
|
| 13 |
2. Activate the virtual environment: |
| 14 |
|
| 15 |
``source <env_name>/bin/activate`` |
| 16 |
|
| 17 |
3. Install debsbom and its dependencies in the virtual environment with one of the following commands: |
| 18 |
|
| 19 |
- Installs the debsbom pip package with its core dependencies: |
| 20 |
|
| 21 |
``pip3 install debsbom[cdx,spdx,download]`` |
| 22 |
|
| 23 |
If you do not need CycloneDX, SPDX, or download support, you can omit the respective extras. |
| 24 |
|
| 25 |
- Installs the debsbom package in editable mode with all dependencies, including development dependencies for testing and documentation building: |
| 26 |
|
| 27 |
``pip3 install -e .[dev]`` |
| 28 |
|
| 29 |
Replace the dot (.) with the path to the debsbom source code if not executing from within the source directory. |
| 30 |
|
| 31 |
4. Test the installation with: |
| 32 |
|
| 33 |
``debsbom -h`` |
| 34 |
|
| 35 |
**Optional**: To significantly speed up the parsing of deb822 data, it is recommended to install the system package python3-apt (e.g., ``apt install python3-apt`` on Debian-based systems) |
| 36 |
|
| 37 |
Container Image |
| 38 |
--------------- |
| 39 |
|
| 40 |
The ``debsbom`` tool is available as a container image at ``ghcr.io/siemens/debsbom:<latest|tag>``. |
| 41 |
It runs as root inside the container, allowing mounted directories (e.g., the download directory) to be owned by the invoking user in rootless environments, simplifying CI usage. |
| 42 |
|
| 43 |
The container image is built in a bit‑for‑bit reproducible manner. |
| 44 |
This can be verified by forking the repository, executing the CI pipeline, and comparing the hashes of the resulting container manifest. |