Skip to content

Commit 9631f24

Browse files
committed
rename sbom-diff to spdx-diff
Signed-off-by: Benjamin Robin (Schneider Electric) <benjamin.robin@bootlin.com>
1 parent 2b303a1 commit 9631f24

13 files changed

Lines changed: 62 additions & 69 deletions

File tree

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- "3.14"
1616
steps:
1717
- uses: actions/checkout@v5
18-
- name: Checkout meta-sbom-diff-test for tests
18+
- name: Checkout meta-spdx-diff-test for tests
1919
uses: actions/checkout@v5
2020
with:
21-
repository: bootlin/meta-sbom-diff-test
22-
path: meta-sbom-diff-test
21+
repository: bootlin/meta-spdx-diff-test
22+
path: meta-spdx-diff-test
2323
- name: Setup Python ${{ matrix.python-version }}
2424
uses: actions/setup-python@v5
2525
with:
@@ -39,7 +39,7 @@ jobs:
3939
pip install --group test
4040
- name: Run tests
4141
env:
42-
SBOM_DIFF_SBOM_DATA: ${{ github.workspace }}/meta-sbom-diff-test/sbom-data
42+
SPDX_DIFF_SBOM_DATA: ${{ github.workspace }}/meta-spdx-diff-test/sbom-data
4343
working-directory: tests
4444
run: |
4545
pytest -v

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,3 @@ env/
5454
*.swp
5555
*.swo
5656
*~
57-
58-
# sbom-diff specific
59-
spdx_diff_*.json
60-
61-
# Old script (if exists)
62-
sbom-diff

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.
1515
## [1.0.0] - 2026-02-12
1616

1717
### Added
18-
- Initial stable release of sbom-diff
18+
- Initial stable release of spdx-diff
1919
---
2020

2121
## Release Information
@@ -25,10 +25,10 @@ All notable changes to this project will be documented in this file.
2525
- **Status:** Stable
2626
- **Breaking Changes:** None (initial release)
2727

28-
This is the first stable release of sbom-diff.
28+
This is the first stable release of spdx-diff.
2929

3030
---
3131

3232
<!-- Links -->
33-
[unreleased]: https://github.com/bootlin/sbom-diff/compare/v1.0.0...HEAD
34-
[1.0.0]: https://github.com/bootlin/sbom-diff/releases/tag/v1.0.0
33+
[unreleased]: https://github.com/bootlin/spdx-diff/compare/v1.0.0...HEAD
34+
[1.0.0]: https://github.com/bootlin/spdx-diff/releases/tag/v1.0.0

INSTALL.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Method 1: Quick Install (System-wide)
44

55
```bash
6-
cd sbom-diff
6+
cd spdx-diff
77
pip install . --break-system-packages
88
```
99

@@ -14,7 +14,7 @@ pip install . --break-system-packages
1414
## Method 2: Virtual Environment (Recommended)
1515

1616
```bash
17-
cd sbom-diff
17+
cd spdx-diff
1818

1919
# Create virtual environment
2020
python3 -m venv .venv
@@ -26,7 +26,7 @@ source .venv/bin/activate
2626
pip install -e .
2727

2828
# Use the tool
29-
sbom-diff --help
29+
spdx-diff --help
3030

3131
# When done
3232
deactivate
@@ -44,16 +44,16 @@ After installation:
4444

4545
```bash
4646
# Show help
47-
sbom-diff --help
47+
spdx-diff --help
4848

4949
# Compare two SPDX files
50-
sbom-diff reference.json new.json
50+
spdx-diff reference.json new.json
5151

5252
# Show summary only
53-
sbom-diff reference.json new.json --summary
53+
spdx-diff reference.json new.json --summary
5454

5555
# JSON output for automation
56-
sbom-diff reference.json new.json --format json --output results.json
56+
spdx-diff reference.json new.json --format json --output results.json
5757
```
5858

5959
See `README.md` for full documentation.
@@ -64,13 +64,13 @@ See `README.md` for full documentation.
6464

6565
**System-wide:**
6666
```bash
67-
pip uninstall sbom-diff
67+
pip uninstall spdx-diff
6868
```
6969

7070
**Virtual environment:**
7171
```bash
7272
source .venv/bin/activate
73-
pip uninstall sbom-diff
73+
pip uninstall spdx-diff
7474
deactivate
7575
```
7676

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It produces both human-readable output (console) and a structured JSON diff file
1313
Usage
1414
-----
1515
```bash
16-
./sbom-diff reference.json new.json [OPTIONS]
16+
./spdx-diff reference.json new.json [OPTIONS]
1717
```
1818

1919
Required arguments:
@@ -72,7 +72,7 @@ Summary Mode
7272
When using --summary, the tool displays aggregate statistics:
7373

7474
```
75-
SPDX-SBOM-Diff Summary:
75+
SPDX-Diff Summary:
7676
7777
Packages:
7878
Added: 5
@@ -158,34 +158,34 @@ Examples
158158
--------
159159

160160
### Basic comparison with both console and JSON output:
161-
./sbom-diff reference.json new.json
161+
./spdx-diff reference.json new.json
162162

163163
### Full details with proprietary packages excluded:
164-
./sbom-diff reference.json new.json --ignore-proprietary --full
164+
./spdx-diff reference.json new.json --ignore-proprietary --full
165165

166166
### Quick summary check:
167-
./sbom-diff reference.json new.json --summary
167+
./spdx-diff reference.json new.json --summary
168168

169169
### Silent mode for CI/CD (JSON output only):
170-
./sbom-diff reference.json new.json --format json --output results.json
170+
./spdx-diff reference.json new.json --format json --output results.json
171171

172172
### Console output only (no JSON file):
173-
./sbom-diff reference.json new.json --format text --full
173+
./spdx-diff reference.json new.json --format text --full
174174

175175
### Show only changed packages:
176-
./sbom-diff reference.json new.json --show-packages --show-changed
176+
./spdx-diff reference.json new.json --show-packages --show-changed
177177

178178
### Show only added packages:
179-
./sbom-diff reference.json new.json --show-packages --show-added
179+
./spdx-diff reference.json new.json --show-packages --show-added
180180

181181
### Show only kernel config changes:
182-
./sbom-diff reference.json new.json --show-config --show-changed
182+
./spdx-diff reference.json new.json --show-config --show-changed
183183

184184
### Show added and changed items across all categories:
185-
./sbom-diff reference.json new.json --show-added --show-changed
185+
./spdx-diff reference.json new.json --show-added --show-changed
186186

187187
### Show only PACKAGECONFIG differences:
188-
./sbom-diff reference.json new.json --show-packageconfig
188+
./spdx-diff reference.json new.json --show-packageconfig
189189

190190
Console output example:
191191
```

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "sbom-diff"
2+
name = "spdx-diff"
33
dynamic = ["version"]
44
description = "SPDX3 SBOM comparison tool for packages, kernel config, and PACKAGECONFIG"
55
readme = "README.md"
@@ -22,13 +22,13 @@ classifiers = [
2222
]
2323

2424
[project.scripts]
25-
sbom-diff = "sbom_diff.cli:main"
25+
spdx-diff = "spdx_diff.cli:main"
2626

2727
[project.urls]
28-
Repository = "https://github.com/bootlin/sbom-diff"
29-
Documentation = "https://github.com/bootlin/sbom-diff/blob/main/README.md"
30-
"Bug Tracker" = "https://github.com/bootlin/sbom-diff/issues"
31-
Changelog = "https://github.com/bootlin/sbom-diff/blob/main/CHANGELOG.md"
28+
Repository = "https://github.com/bootlin/spdx-diff"
29+
Documentation = "https://github.com/bootlin/spdx-diff/blob/main/README.md"
30+
"Bug Tracker" = "https://github.com/bootlin/spdx-diff/issues"
31+
Changelog = "https://github.com/bootlin/spdx-diff/blob/main/CHANGELOG.md"
3232

3333
[dependency-groups]
3434
test = [
@@ -45,11 +45,11 @@ requires = ["hatchling"]
4545
build-backend = "hatchling.build"
4646

4747
[tool.hatch.version]
48-
path = "src/sbom_diff/__init__.py"
48+
path = "src/spdx_diff/__init__.py"
4949

5050
[tool.hatch.build.targets.wheel]
5151
only-packages = true
52-
packages = ["src/sbom_diff"]
52+
packages = ["src/spdx_diff"]
5353

5454
[tool.ruff]
5555
line-length = 88
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def print_summary(
379379
pcfg_diff: PACKAGECONFIG differences
380380
381381
"""
382-
print("\nSPDX-SBOM-Diff Summary:\n")
382+
print("\nSPDX-Diff Summary:\n")
383383

384384
print("Packages:")
385385
print(f" Added: {len(pkg_diff[0])}")
@@ -468,7 +468,7 @@ def main() -> None:
468468
"""
469469
parser = ArgumentParser(description="Compare SPDX3 JSON files")
470470
parser.add_argument(
471-
"--version", action="version", version=f"sbom-diff {__version__}"
471+
"--version", action="version", version=f"spdx-diff {__version__}"
472472
)
473473
parser.add_argument(
474474
"-v",

tests/conftest.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import os
44
import pathlib
5-
import subprocess
65
import tempfile
76
from collections.abc import Generator
87
from typing import Any
@@ -12,15 +11,15 @@
1211

1312
@pytest.fixture(scope="session")
1413
def sbom_data() -> Generator[pathlib.Path, None, None]:
15-
if path := os.environ.get("SBOM_DIFF_SBOM_DATA"):
14+
if path := os.environ.get("SPDX_DIFF_SBOM_DATA"):
1615
sbom_data_path = pathlib.Path(path).resolve()
1716
if sbom_data_path.is_dir():
1817
yield sbom_data_path
1918
return
2019

2120
sbom_data_path = (
2221
pathlib.Path(__file__)
23-
.parent.parent.parent.joinpath("meta-sbom-diff-test", "sbom-data")
22+
.parent.parent.parent.joinpath("meta-spdx-diff-test", "sbom-data")
2423
.resolve()
2524
)
2625
if sbom_data_path.is_dir():
@@ -30,20 +29,20 @@ def sbom_data() -> Generator[pathlib.Path, None, None]:
3029
pytest.exit(
3130
"The `sbom-data` directory was not found. To resolve this issue, "
3231
"please do one of the following: \n"
33-
" - Clone https://github.com/bootlin/meta-sbom-diff-test.git repository at the"
34-
" same directory level as the `sbom-diff` repository.\n"
35-
" - Set the `SBOM_DIFF_SBOM_DATA` environment variable to the path of"
36-
" `sbom-data` directory, contained in the `meta-sbom-diff-test` repository.",
32+
" - Clone https://github.com/bootlin/meta-spdx-diff-test.git repository at the"
33+
" same directory level as the `spdx-diff` repository.\n"
34+
" - Set the `SPDX_DIFF_SBOM_DATA` environment variable to the path of"
35+
" `sbom-data` directory, contained in the `meta-spdx-diff-test` repository.",
3736
returncode=1,
3837
)
3938

4039

4140
@pytest.fixture(scope="function")
4241
def tmp_dir() -> Generator[pathlib.Path, None, None]:
4342
extra_opts: dict[str, Any] = {}
44-
if os.environ.get("SBOM_DIFF_TEST_KEEP_TMP") == "1":
43+
if os.environ.get("SPDX_DIFF_TEST_KEEP_TMP") == "1":
4544
# The delete parameter was added in Python 3.12
4645
extra_opts["delete"] = False
4746

48-
with tempfile.TemporaryDirectory(prefix="sbom-diff-", **extra_opts) as d:
47+
with tempfile.TemporaryDirectory(prefix="spdx-diff-", **extra_opts) as d:
4948
yield pathlib.Path(d)

tests/helper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
def exec_tool(tmp_dir: pathlib.Path, args: list[str]) -> None:
11-
cmd = ["sbom-diff"]
11+
cmd = ["spdx-diff"]
1212
cmd.extend(args)
1313

1414
subprocess.run(
@@ -87,7 +87,7 @@ def check(self, json_data: dict[str, Any]) -> None:
8787
)
8888

8989

90-
def _run_sbom_diff_check(
90+
def _run_spdx_diff_check(
9191
tmp_dir: pathlib.Path,
9292
out_name: str,
9393
sbom_data_path: pathlib.Path,
@@ -116,7 +116,7 @@ def _run_sbom_diff_check(
116116
exp_diff.check(ret_diff)
117117

118118

119-
def run_sbom_diff_check(
119+
def run_spdx_diff_check(
120120
tmp_dir: pathlib.Path,
121121
sbom_data_path: pathlib.Path,
122122
sbom_ref: str,
@@ -127,7 +127,7 @@ def run_sbom_diff_check(
127127
if extra_args is None:
128128
extra_args = []
129129

130-
_run_sbom_diff_check(
130+
_run_spdx_diff_check(
131131
tmp_dir,
132132
"diff.json",
133133
sbom_data_path,
@@ -138,7 +138,7 @@ def run_sbom_diff_check(
138138
)
139139

140140
if exp_diff.same_expect_ignore_proprietary:
141-
_run_sbom_diff_check(
141+
_run_spdx_diff_check(
142142
tmp_dir,
143143
"diff2.json",
144144
sbom_data_path,

0 commit comments

Comments
 (0)