pkgtreediff: RPM package tree diff tool

[ gpl, library, program, utility ] [ Propose Tags ] [ Report a vulnerability ]

Tool for comparing RPM packages and version-releases in OS dist trees or instances.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.2, 0.2.1, 0.3, 0.4, 0.4.1, 0.5.0, 0.6.0
Change log CHANGELOG.md
Dependencies async, base (<5), bytestring, directory, extra, filepath, Glob, http-client (>=0.5.0), http-client-tls, http-common (<0.8.3.4), http-directory (>=0.1.10), http-types, koji, pkgtreediff, rpm-nvr (>=0.1.1), semigroups, simple-cmd (>=0.1.4), simple-cmd-args, text [details]
Tested with ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.4, ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5
License GPL-3.0-only
Copyright 2019-2022 Jens Petersen
Author Jens Petersen
Maintainer juhpetersen@gmail.com
Category Utility
Home page https://github.com/juhp/pkgtreediff
Bug tracker https://github.com/juhp/pkgtreediff/issues
Source repo head: git clone https://github.com/juhp/pkgtreediff.git
Uploaded by JensPetersen at 2022-10-27T12:37:38Z
Distributions Fedora:0.6.0, LTSHaskell:0.6.0, Stackage:0.6.0
Executables pkgtreediff
Downloads 2555 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-10-27 [all 1 reports]

Readme for pkgtreediff-0.6.0

[back to package description]

pkgtreediff

Hackage GPL-3 license Stackage Lts Stackage Nightly

pkgtreediff compares the NVRs (name-version-release) of RPM packages in OS package trees and/or installations:

  • An OS tree can be referenced by an url or directory containing a tree of rpm files.
  • A text file/url containing a list of rpm NVRs can also be compared.
  • Commands can also be used to get installed RPMs, eg:
    • "rpm -qa"
    • "ssh myhost rpm -qa"
    • "podman run --rm myimage rpm -qa"
    • "sudo dnf -q repoquery --qf '%{name}-%{version}-%{release}.%{arch}'"
  • A koji tag: koji://tag@KojiHubUrl (or koji://tag@fedora)

Usage examples

Help

$ pkgtreediff --version
0.6.0
$ pkgtreediff -h
Package tree comparison tool

Usage: pkgtreediff [--version] [-r|--recursive] [-d|--subdir SUBDIR]
                   [(-R|--ignore-release) | (-V|--ignore-version)]
                   [(-N|--new) | (-D|--deleted) | (-U|--updated) |
                     (-u|--downgraded)]
                   [(-s|--show-summary) | (-S|--no-summary)] [-R|--rst]
                   [-p|--pattern PKGPATTERN] [-t|--timeout SECONDS]
                   URL|DIR|FILE|KOJITAG|CMD1 URL|DIR|FILE|KOJITAG|CMD2
  pkgtreediff compares the packages in two OS trees or instances

Available options:
  -h,--help                Show this help text
  --version                Show version
  -r,--recursive           Recursive down into subdirectories
  -d,--subdir SUBDIR       Select specific subdir (eg x86_64 or source)
  -R,--ignore-release      Only show version changes (ignore release)
  -V,--ignore-version      Only show package changes (ignore version-release)
  -N,--new                 Show only added packages
  -D,--deleted             Show only removed packages
  -U,--updated             Show only upgraded packages
  -u,--downgraded          Show only downgraded packages
  -s,--show-summary        Show summary of changes (default when >20 changes)
  -S,--no-summary          Do not display summary
  -R,--rst                 Use ReSTructured Text format
  -p,--pattern PKGPATTERN  Limit packages to glob matches
  -t,--timeout SECONDS     Maximum seconds to wait for http response before
                           timing out (default 30)

Containers

Compare the content of two rpm based containers versions, filtering for new added packages:

$ pkgtreediff --new "podman run --rm fedora:36 rpm -qa" "podman run --rm fedora:37 rpm -qa"
libb2-0.98.1-7.fc37.x86_64

Package trees

Package source changes between Fedora 35 and 36 Server at GA (ignoring release bumps):

$ pkgtreediff --ignore-release https://download.fedoraproject.org/pub/fedora/linux/releases/{35,36}/Server/source/tree/Packages/
ModemManager.src: 1.18.2-1.fc35 -> 1.18.6-1.fc36
NetworkManager.src: 1.32.12-1.fc35 -> 1.36.4-1.fc36
PackageKit.src: 1.2.4-3.fc35 -> 1.2.5-1.fc36
abrt.src: 2.14.6-9.fc35 -> 2.15.1-1.fc36
:
:
- tree-1.8.0-7.fc35.src
+ tree-pkg-2.0.1-2.fc36.src
tzdata.src: 2021b-1.fc35 -> 2022a-1.fc36
:
xorg-x11-xauth.src: 1.1-9.fc35 -> 1.1.1-2.fc36
+ xrdb-1.2.1-3.fc36.src
xxhash.src: 0.8.0-4.fc35 -> 0.8.1-2.fc36
yelp.src: 41.1-1.fc35 -> 42.1-1.fc36
yelp-xsl.src: 41.0-1.fc35 -> 42.0-1.fc36
zchunk.src: 1.1.15-2.fc35 -> 1.2.1-1.fc36
zstd.src: 1.5.0-2.fc35 -> 1.5.2-1.fc36

Summary
Updated: 293
Downgraded: 0
Added: 36
Deleted: 21
Arch changed: 0
Total packages: 915 -> 930

For very large repos like Everything it should be faster to use a repoquery command.

Hosts

Compare the packages on local and another host:

pkgtreediff "rpm -qa" "ssh otherhost rpm -qa"

Any types of sources can be compared, together with the use of flags.

Koji

Compare koji tags using the koji://tag@kojihub syntax:

pkgtreediff koji://dist-c8-updates-build@centos koji://dist-c8_1-updates-build@centos

Please avoid using koji tags to compare full releases as it is more efficient to query URL or CMD trees.

Builds

pkgtreediff is packaged in Fedora.

Older builds are also available in copr for Fedora, EPEL, and OpenSuSE (more details).

RPM version ordering

RPM version ordering is somewhat complicated. For example "1.2.1~rc1" < "1.2.1" (greater for ^).

pkgtreediff use the rpm-nvr library implementation of the rpmvercmp() algorithm, though it has not been verified to behave identically.