18 Commits

Author SHA1 Message Date
Ariadne Conill
eab5f5da93 cli: chase pkgconf_client_init changes
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-24 15:35:09 -08:00
Ariadne Conill
c7069a080b cli: {bomtool,spdxtool}: chase pkgconf_client_init change 2025-12-23 16:35:11 -08:00
Ariadne Conill
a32da62aa7 spdxtool: util: clean up strftime buffer usage
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 23:46:04 -08:00
Ariadne Conill
36ac187ad5 spdxtool: util: manually specify ISO8601 format string elements instead of %F and %Z
These do not work on the Microsoft C runtime library.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 23:40:53 -08:00
Ariadne Conill
0fc3ba9d95 spdxtool: drop spdxtool_util_spdx_id_add
Not needed or used by anything.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 16:03:21 -08:00
Ariadne Conill
9590e052bb spdxtool: use SIZE_FMT_SPECIFIER in numeric URI generator
This resolves a compiler warning when building on Windows.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 13:44:38 -08:00
Ariadne Conill
b689fedcd9 spdxtool: fix isspace usage
ISO C expects parameters to ctype.h macros to be unsigned.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 13:32:42 -08:00
Ariadne Conill
008f963693 spdxtool: util: use a static counter instead of looping over possible IDs
Looping over possible IDs makes generating URIs an O(k) operation,
verses an O(1) operation.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 01:34:02 -08:00
Ariadne Conill
018983a78f spdxtool: serialize: fix docstrings
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 01:20:39 -08:00
Ariadne Conill
4e2fde48f6 spdxtool: serialize: further refactoring
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 01:12:47 -08:00
Ariadne Conill
e2ae592b89 spdxtool: serialize: clean up spdxtool_serialize_add_ch_with_comma
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 00:47:50 -08:00
Ariadne Conill
ecd1a20915 spdxtool: serialize: light refactoring using new pkgconf_buffer_t functions
Also drop spdxtool_serialize_add_string_with_comma because it is no longer
needed.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 00:39:12 -08:00
Ariadne Conill
3a24e69a8f spdxtool: use pkgconf_buffer_t functions to generate URIs
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 00:37:35 -08:00
Ariadne Conill
741ee356b9 cli: declare logging FILE pointers as static
Found using sparse.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-20 00:00:41 -08:00
Ariadne Conill
0fb2ce907b spdxtool: remove errant uses of pkgconf_buffer_trim_byte
This was a workaround for a pkgconf_buffer bug which was fixed in
commit 75b57db56291a28eed881a9ad48742713a7c635b.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-12-02 00:50:33 -08:00
Ariadne Conill
c598ef7218 spdxtool: use software_sbomType instead of sbomType
sbomType is not in the SPDX 3.0.1 vocabulary.
2025-11-01 23:56:00 -07:00
Ariadne Conill
bbe8ab6593 spdxtool: do not serialize missing license-related document elements
If a .pc file without licensing information was processed, we would get nodes like
pkgconf:(null), which is undesirable.
2025-11-01 15:54:15 -07:00
Tuukka Pasanen
f0826ce2d2 Add SPDX Lite profile 3.0 generator
Add SPDX Lite profile 3.0 generator named
spdxtool to pkdconf. It outputs JSON-LD RDF
tree and does only depend pkgconf and pkgconf
.pc file to generate SBOM.

It superseeds bomtool which is SPDX 2.x generator
name bomtool. But as SPDX version 2.x is still widely
used new tool was created instead of upgrading old one.
2025-11-01 15:31:55 -07:00