Skip to content

Commit ca3b07c

Browse files
committed
Added deptool README from buildscripts
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
1 parent 655a89f commit ca3b07c

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

src/cfengine_cli/deptool-README.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# deptool
2+
3+
`deptool.py` is a script which can be used to enumerate dependencies of CFEngine.
4+
It supports printing to stdout in the Markdown table format, and printing to file in the JSON format (see `--to-json`).
5+
It can also generate basic SBOMs in the CycloneDX JSON format (see [below](https://github.com/cfengine/buildscripts/tree/master/scripts#generating-cyclonedx-json-sboms) for usage instructions).
6+
It can be used as a replacement for the [cf-bottom](https://github.com/cfengine/cf-bottom/) `depstable` command.
7+
8+
`deptool.py` works on a local buildscripts repository. By default, the repository is assumed to be current working directory (i.e. `.`).
9+
A custom path for the local repository can be specified using the `--root` argument.
10+
Running the script will modify the git state of the repository by checking out branches (and with `--patch`, also overwriting and git-adding `README.md`), so it might be preferable to [use a copy of the buildscripts repository](https://github.com/cfengine/buildscripts/tree/master/scripts#using-a-copy-of-the-repository).
11+
12+
A custom list of versions to process can be specified ([given as space-separated command-line arguments](https://github.com/cfengine/buildscripts/tree/master/scripts#specifying-custom-versions-list)).
13+
14+
See `python deptool.py -h` for more information on all available command-line arguments.
15+
16+
## Examples
17+
18+
### Suppressing logs
19+
20+
```
21+
$ python scripts/deptool.py --no-info
22+
WARNING:root:didn't find dep in line [| libgcc | | | | AIX and Solaris only |]
23+
### Agent Dependencies
24+
25+
| CFEngine version | 3.21.x | 3.24.x | master | Notes |
26+
| :-------------------------------------------------------------------------------- | :----- | :----- | :----- | :----------------------- |
27+
| [diffutils](https://ftpmirror.gnu.org/diffutils/) | 3.10 | 3.10 | 3.10 | |
28+
| [libacl](https://download.savannah.gnu.org/releases/acl/) | 2.3.2 | 2.3.2 | 2.3.2 | |
29+
| [libattr](https://download.savannah.gnu.org/releases/attr/) | 2.5.2 | 2.5.2 | 2.5.2 | |
30+
| [libcurl](https://curl.se/download.html) | 8.10.1 | 8.10.1 | 8.11.1 | |
31+
| [libgnurx](https://www.gnu.org/software/rx/rx.html) | 2.5.1 | 2.5.1 | 2.5.1 | Windows Enterprise agent |
32+
| [libiconv](https://ftp.gnu.org/gnu/libiconv/) | 1.17 | 1.17 | 1.17 | Needed by libxml2 |
33+
| [libxml2](https://gitlab.gnome.org/GNOME/libxml2) | 2.13.4 | 2.13.4 | 2.13.5 | |
34+
| [libyaml](https://pyyaml.org/wiki/LibYAML) | 0.2.5 | 0.2.5 | 0.2.5 | |
35+
| [LMDB](https://github.com/LMDB/lmdb/) | 0.9.33 | 0.9.33 | 0.9.33 | |
36+
| [OpenLDAP](https://www.openldap.org/software/download/OpenLDAP/openldap-release/) | 2.6.8 | 2.6.8 | 2.6.9 | Enterprise agent only |
37+
| [OpenSSL](https://openssl.org/) | 3.0.15 | 3.4.0 | 3.4.0 | |
38+
| [PCRE](https://www.pcre.org/) | 8.45 | - | - | |
39+
| [PCRE2](https://github.com/PCRE2Project/pcre2/releases/) | - | 10.44 | 10.44 | |
40+
| [pthreads-w32](https://sourceware.org/pub/pthreads-win32/) | 2-9-1 | 2-9-1 | 2-9-1 | Windows Enterprise agent |
41+
| [SASL2](https://www.cyrusimap.org/sasl/) | 2.1.28 | 2.1.28 | 2.1.28 | Solaris Enterprise agent |
42+
| [zlib](https://www.zlib.net/) | 1.3.1 | 1.3.1 | 1.3.1 | |
43+
| [librsync](https://github.com/librsync/librsync/releases) | - | - | 2.3.4 | |
44+
| [leech](https://github.com/larsewi/leech/releases) | - | - | 0.1.24 | |
45+
46+
### Enterprise Hub dependencies
47+
48+
| CFEngine version | 3.21.x | 3.24.x | master |
49+
| :-------------------------------------------------- | :----- | :----- | :----- |
50+
| [Apache](https://httpd.apache.org/) | 2.4.62 | 2.4.62 | 2.4.62 |
51+
| [APR](https://apr.apache.org/) | 1.7.5 | 1.7.5 | 1.7.5 |
52+
| [apr-util](https://apr.apache.org/) | 1.6.3 | 1.6.3 | 1.6.3 |
53+
| [Git](https://www.kernel.org/pub/software/scm/git/) | 2.47.0 | 2.47.0 | 2.47.1 |
54+
| [libexpat](https://libexpat.github.io/) | - | 2.6.3 | 2.6.3 |
55+
| [PHP](https://php.net/) | 8.3.13 | 8.3.13 | 8.3.15 |
56+
| [PostgreSQL](https://www.postgresql.org/) | 15.8 | 16.4 | 17.2 |
57+
| [nghttp2](https://nghttp2.opg/) | - | - | 1.64.0 |
58+
| [rsync](https://download.samba.org/pub/rsync/) | 3.3.0 | 3.3.0 | 3.3.0 |
59+
60+
```
61+
62+
### Specifying custom versions list
63+
64+
```
65+
python scripts/deptool.py 3.21.6 3.24.x master
66+
```
67+
68+
### Comparing versions
69+
70+
```
71+
$ python scripts/deptool.py 3.24.x master --compare --no-info
72+
| CFEngine version | 3.24.x | **master** |
73+
| :-------------------------------------------------------------------------------- | :----- | :--------- |
74+
| [Apache](https://httpd.apache.org/) | 2.4.62 | 2.4.62 |
75+
| [APR](https://apr.apache.org/) | 1.7.5 | 1.7.5 |
76+
| [apr-util](https://apr.apache.org/) | 1.6.3 | 1.6.3 |
77+
| [diffutils](https://ftpmirror.gnu.org/diffutils/) | 3.10 | 3.10 |
78+
| [Git](https://www.kernel.org/pub/software/scm/git/) | 2.47.0 | **2.47.1** |
79+
| [libacl](https://download.savannah.gnu.org/releases/acl/) | 2.3.2 | 2.3.2 |
80+
| [libattr](https://download.savannah.gnu.org/releases/attr) | 2.5.2 | 2.5.2 |
81+
| [libcurl](https://curl.se/download.html) | 8.10.1 | **8.11.1** |
82+
| [libcurl-hub](https://curl.se/download.html) | 8.10.1 | **8.11.1** |
83+
| [libexpat](https://libexpat.github.io/) | 2.6.3 | 2.6.3 |
84+
| [libgnurx](https://www.gnu.org/software/rx/rx.html) | 2.5.1 | 2.5.1 |
85+
| [libiconv](https://ftp.gnu.org/gnu/libiconv/) | 1.17 | 1.17 |
86+
| [libxml2](https://gitlab.gnome.org/GNOME/libxml2) | 2.13.4 | **2.13.5** |
87+
| [LibYAML](https://pyyaml.org/wiki/LibYAML) | 0.2.5 | 0.2.5 |
88+
| [LMDB](https://github.com/LMDB/lmdb/) | 0.9.33 | 0.9.33 |
89+
| [OpenLDAP](https://www.openldap.org/software/download/OpenLDAP/openldap-release/) | 2.6.8 | **2.6.9** |
90+
| [OpenSSL](https://openssl.org/) | 3.4.0 | 3.4.0 |
91+
| [PCRE2](https://github.com/PCRE2Project/pcre2/releases/) | 10.44 | 10.44 |
92+
| [PHP](https://php.net/) | 8.3.13 | **8.3.15** |
93+
| [PostgreSQL](https://www.postgresql.org/) | 16.4 | **17.2** |
94+
| [pthreads-w32](https://sourceware.org/pub/pthreads-win32/) | 2-9-1 | 2-9-1 |
95+
| [rsync](https://download.samba.org/pub/rsync/) | 3.3.0 | 3.3.0 |
96+
| [SASL2](https://www.cyrusimap.org/sasl/) | 2.1.28 | 2.1.28 |
97+
| [zlib](https://www.zlib.net/) | 1.3.1 | 1.3.1 |
98+
| [leech](https://github.com/larsewi/leech/releases) | - | **0.1.24** |
99+
| [librsync](https://github.com/librsync/librsync/releases) | - | **2.3.4** |
100+
| [nghttp2](https://nghttp2.org/) | - | **1.64.0** |
101+
102+
```
103+
104+
Rows which contain no dependency version changes can be omitted:
105+
106+
```
107+
$ python scripts/deptool.py --compare 3.21.5 3.21.6 3.24.0 3.24.1 --no-info --skip-unchanged
108+
| CFEngine version | 3.21.5 | **3.21.6** | 3.24.0 | **3.24.1** |
109+
| :-------------------------------------------------------------------------------- | :----- | :--------- | :----- | :--------- |
110+
| [Apache](https://httpd.apache.org/) | 2.4.59 | **2.4.62** | 2.4.59 | **2.4.62** |
111+
| [APR](https://apr.apache.org/) | 1.7.4 | **1.7.5** | 1.7.4 | **1.7.5** |
112+
| [Git](https://www.kernel.org/pub/software/scm/git/) | 2.45.1 | **2.47.0** | 2.45.2 | **2.47.0** |
113+
| [LCOV](https://github.com/linux-test-project/lcov/) | 1.16 | **-** | - | - |
114+
| [libcurl](https://curl.se/download.html) | 8.7.1 | **8.10.1** | 8.8.0 | **8.10.1** |
115+
| [libcurl-hub](https://curl.se/download.html) | 8.7.1 | **8.10.1** | 8.8.0 | **8.10.1** |
116+
| [libxml2](https://gitlab.gnome.org/GNOME/libxml2) | 2.12.6 | **2.13.4** | 2.13.1 | **2.13.4** |
117+
| [LMDB](https://github.com/LMDB/lmdb/) | 0.9.32 | **0.9.33** | 0.9.33 | 0.9.33 |
118+
| [OpenLDAP](https://www.openldap.org/software/download/OpenLDAP/openldap-release/) | 2.6.7 | **2.6.8** | 2.6.8 | 2.6.8 |
119+
| [OpenSSL](https://openssl.org/) | 3.0.13 | **3.0.15** | 3.3.1 | **3.4.0** |
120+
| [PHP](https://php.net/) | 8.2.19 | **8.3.13** | 8.3.8 | **8.3.13** |
121+
| [PostgreSQL](https://www.postgresql.org/) | 15.6 | **15.8** | 16.3 | **16.4** |
122+
| [libexpat](https://libexpat.github.io/) | - | - | 2.5.0 | **2.6.3** |
123+
124+
```
125+
126+
### Using a copy of the repository
127+
128+
```
129+
python scripts/deptool.py --root ../buildscripts-copy
130+
```
131+
132+
### Generating CycloneDX JSON SBOMs
133+
134+
```
135+
python deptool.py --to-cdx-sbom
136+
```
137+
138+
A separate CycloneDX JSON SBOM is generated for each version. Optionally, a path template can be specified using `{}` as a substitute for the version:
139+
140+
```
141+
python deptool.py --to-cdx-sbom my-sbom-{}.cdx.json
142+
```

0 commit comments

Comments
 (0)