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