xref: /freebsd/contrib/pkgconf/man/spdxtool.1 (revision 592efe252472a3385acf36b1f49ecf710a7f3d9c)
1*592efe25SPierre Pronchery.\" Copyright (c) 2026 pkgconf authors (see AUTHORS).
2*592efe25SPierre Pronchery.\"
3*592efe25SPierre Pronchery.\" Permission to use, copy, modify, and/or distribute this software for any
4*592efe25SPierre Pronchery.\" purpose with or without fee is hereby granted, provided that the above
5*592efe25SPierre Pronchery.\" copyright notice and this permission notice appear in all copies.
6*592efe25SPierre Pronchery.\"
7*592efe25SPierre Pronchery.\" This software is provided 'as is' and without any warranty, express or
8*592efe25SPierre Pronchery.\" implied.  In no event shall the authors be liable for any damages arising
9*592efe25SPierre Pronchery.\" from the use of this software.
10*592efe25SPierre Pronchery.Dd January 22, 2026
11*592efe25SPierre Pronchery.Dt SPDXTOOL 1
12*592efe25SPierre Pronchery.Os
13*592efe25SPierre Pronchery.Sh NAME
14*592efe25SPierre Pronchery.Nm spdxtool
15*592efe25SPierre Pronchery.Nd a tool for generating SPDX Lite 3.0.1 profile software bills of material document
16*592efe25SPierre Pronchery.Sh SYNOPSIS
17*592efe25SPierre Pronchery.Nm
18*592efe25SPierre Pronchery.Op Ar options
19*592efe25SPierre Pronchery.Ar module ...
20*592efe25SPierre Pronchery.Sh DESCRIPTION
21*592efe25SPierre Pronchery.Nm
22*592efe25SPierre Proncheryis a program which generates a JSON-LD formated SPDX Lite 3.0.1 software bill of
23*592efe25SPierre Proncherymaterials (SBOM) for a given set of pkg-config modules.
24*592efe25SPierre ProncheryThe output of this tool can then be translated into other SBOM
25*592efe25SPierre Proncheryformats as necessary.
26*592efe25SPierre Pronchery
27*592efe25SPierre ProncheryMore documention about SDPX 3.0.1 can be found from:
28*592efe25SPierre Pronchery.Lk https://spdx.github.io/spdx-spec/v3.0.1/
29*592efe25SPierre Pronchery.Pp
30*592efe25SPierre ProncheryThe
31*592efe25SPierre Pronchery.Ar options
32*592efe25SPierre Proncheryare as follows:
33*592efe25SPierre Pronchery.Bl -tag -width indent
34*592efe25SPierre Pronchery.It Fl -about
35*592efe25SPierre ProncheryPrint the version number, the Copyright notice, and the license of the
36*592efe25SPierre Pronchery.Nm
37*592efe25SPierre Proncheryprogram to standard output and exit.
38*592efe25SPierre ProncheryMost other options and all command line arguments are ignored.
39*592efe25SPierre Pronchery.It Fl -version
40*592efe25SPierre ProncheryPrint the version number of the
41*592efe25SPierre Pronchery.Nm
42*592efe25SPierre Proncheryprogram to standard output and exit.
43*592efe25SPierre ProncheryMost other options and all command line arguments are ignored.
44*592efe25SPierre Pronchery.It Fl -agent-name
45*592efe25SPierre ProncherySet agent name-property
46*592efe25SPierre Proncheryin /Core/Agent-class. Default is 'Default'
47*592efe25SPierre Pronchery.It Fl -creation-time
48*592efe25SPierre ProncherySet create-property time in /Core/CreationInfo-class.
49*592efe25SPierre ProncherySPDX documentation recomends using ISO 8601-formated time which is: YYYY-MM-DDThh:mm:ssZ.
50*592efe25SPierre ProncheryDefault is document creation time.
51*592efe25SPierre ProncheryThis takes precedence over the
52*592efe25SPierre Pronchery.Ev SOURCE_DATE_EPOCH
53*592efe25SPierre Proncheryenvironment variable.
54*592efe25SPierre Pronchery.It Fl -creation-id
55*592efe25SPierre ProncherySet creation ID in /Core/CreationInfoc-class.
56*592efe25SPierre ProncheryAs ID in creation info mainly have special format and it's
57*592efe25SPierre Proncherydefault is '_:creationinfo_1'.
58*592efe25SPierre Pronchery.It Fl -define-variable Ns = Ns Ar varname Ns = Ns Ar value
59*592efe25SPierre ProncheryDefine
60*592efe25SPierre Pronchery.Ar varname
61*592efe25SPierre Proncheryas
62*592efe25SPierre Pronchery.Ar value .
63*592efe25SPierre ProncheryVariables are used in query output, and some modules' results may change based
64*592efe25SPierre Proncheryon the presence of a variable definition.
65*592efe25SPierre Pronchery.El
66*592efe25SPierre Pronchery.Sh ENVIRONMENT
67*592efe25SPierre Pronchery.Bl -tag -width indent
68*592efe25SPierre Pronchery.It Ev PKG_CONFIG_DEBUG_SPEW
69*592efe25SPierre ProncheryIf set, print debugging messages to stderr.
70*592efe25SPierre Pronchery.It Ev PKG_CONFIG_IGNORE_CONFLICTS
71*592efe25SPierre ProncheryIf set, ignore
72*592efe25SPierre Pronchery.Ic Conflicts
73*592efe25SPierre Proncheryrules in modules.
74*592efe25SPierre ProncheryHas the same effect as the
75*592efe25SPierre Pronchery.Fl -ignore-conflicts
76*592efe25SPierre Proncheryoption in
77*592efe25SPierre Pronchery.Xr pkgconf 1
78*592efe25SPierre Pronchery.
79*592efe25SPierre Pronchery.It Ev PKG_CONFIG_LIBDIR
80*592efe25SPierre ProncheryA colon-separated list of low-priority directories where
81*592efe25SPierre Pronchery.Xr pc 5
82*592efe25SPierre Proncheryfiles are looked up.
83*592efe25SPierre ProncheryThe module search path is constructed by appending this list to
84*592efe25SPierre Pronchery.Ev PKG_CONFIG_PATH ,
85*592efe25SPierre Proncherywhich enjoys higher priority.
86*592efe25SPierre ProncheryIf
87*592efe25SPierre Pronchery.Ev PKG_CONFIG_LIBDIR
88*592efe25SPierre Proncheryis not defined, the default list compiled into the
89*592efe25SPierre Pronchery.Nm
90*592efe25SPierre Proncheryprogram from the
91*592efe25SPierre Pronchery.Dv PKG_DEFAULT_PATH
92*592efe25SPierre Proncherypreprocessor macro is appended instead.
93*592efe25SPierre ProncheryIf
94*592efe25SPierre Pronchery.Ev PKG_CONFIG_LIBDIR
95*592efe25SPierre Proncheryis defined but empty, nothing is appended.
96*592efe25SPierre Pronchery.It Ev PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH
97*592efe25SPierre ProncheryImpose a limit on the allowed depth in the dependency graph.
98*592efe25SPierre Pronchery.It Ev PKG_CONFIG_PATH
99*592efe25SPierre ProncheryA colon-separated list of high-priority directories where
100*592efe25SPierre Pronchery.Xr pc 5
101*592efe25SPierre Proncheryfiles are looked up.
102*592efe25SPierre Pronchery.It Ev PKG_CONFIG_PRELOADED_FILES
103*592efe25SPierre ProncheryColon-separated list of
104*592efe25SPierre Pronchery.Xr pc 5
105*592efe25SPierre Proncheryfiles which are loaded before any other pkg-config files.
106*592efe25SPierre ProncheryThese packages are given highest priority over any other
107*592efe25SPierre Pronchery.Xr pc 5
108*592efe25SPierre Proncheryfiles that would otherwise provide a given package.
109*592efe25SPierre Pronchery.It Ev SOURCE_DATE_EPOCH
110*592efe25SPierre ProncheryIf set, and the
111*592efe25SPierre Pronchery.Fl -creation-time
112*592efe25SPierre Proncheryoption is not given, the creation time in /Core/CreationInfo-class is derived
113*592efe25SPierre Proncheryfrom this UNIX timestamp instead of the current time, allowing for reproducible
114*592efe25SPierre ProncherySBOM generation.
115*592efe25SPierre Pronchery.El
116*592efe25SPierre Pronchery.Sh EXIT STATUS
117*592efe25SPierre Pronchery.Ex -std
118*592efe25SPierre Pronchery.Sh EXAMPLES
119*592efe25SPierre ProncheryGenerating an SBOM for the package named foo:
120*592efe25SPierre Pronchery.Dl $ spdxtool foo
121*592efe25SPierre Pronchery.Dl {
122*592efe25SPierre Pronchery.Dl    "@context": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld",
123*592efe25SPierre Pronchery.Dl    "@graph": [
124*592efe25SPierre Pronchery.Dl        {
125*592efe25SPierre Pronchery.Dl            "type": "Agent",
126*592efe25SPierre Pronchery.Dl            "creationInfo": "_:creationinfo_1",
127*592efe25SPierre Pronchery.Dl            "spdxId": "https://github.com/pkgconf/pkgconf/Agent/default",
128*592efe25SPierre Pronchery.Dl            "name": "Default"
129*592efe25SPierre Pronchery.Dl        },
130*592efe25SPierre Pronchery.Dl        {
131*592efe25SPierre Pronchery.Dl            "type": "CreationInfo",
132*592efe25SPierre Pronchery.Dl            "@id": "_:creationinfo_1",
133*592efe25SPierre Pronchery.Dl [...]
134*592efe25SPierre Pronchery.Sh SEE ALSO
135*592efe25SPierre Pronchery.Xr pc 5 ,
136*592efe25SPierre Pronchery.Xr pkgconf 1
137