minimization / rpm-showme

Created 18 days ago
Maintained by asamalik
Dependency visualisation of an RPM-based installation (a system, an image, etc.)  |  https://docs.fedoraproject.org/en-US/minimization/
Members 1
Troy Dawson committed 3 days ago

rpm-showme

Dependency visualisation of an RPM-based installation (a system, an image, etc.)

Usage

Just tell the script what you what to show, how you want to see it, and where you want to save it. Like this:

$ ./rpm-showme WHAT HOW WHERE

Looking at container images

To look at the Fedora 30 container base image, run:

$ ./rpm-showme fedora:30 graph output.svg --sizes

... which produces a graph of all packages in the fedora:30 container image including sizes of all individual packages and some basic clustering. Clicking on a package highlights its relations to other packages.

Fedora 30 container image graph

See the original Fedora 30 container image graph and try interacting with it!

Looking at file paths

To look at your own Fedora system, run:

$ ./rpm-showme / graph output.svg

You can also look at an arbitrary DNF installation:

$ mkdir /tmp/cowsay
$ sudo dnf --installroot /tmp/cowsay --releasever 30 install cowsay
$ ./rpm-showme ./ graph output.svg

Grouping packages

Graphs can be simplified by merging multiple nodes (packages) into a single node (group). This is useful, for example, when visualizing an httpd installation on top of the Fedora base container image.

Example:

$ ./rpm-showme asamalik/fedora-httpd:f30 graph test.svg --sizes --group-container "Fedora 30 Base Image" fedora:30

httpd on top of the Fedora base image graph

See the original httpd on top of the Fedora base image graph.

Directed graph

The above example might be better shown as a directed graph:

$ ./rpm-showme asamalik/fedora-httpd:f30 directed-graph test.svg --sizes --group-container "Fedora 30 Base Image" fedora:30

directed graph of httpd

See the original directed graph of httpd. Again, it's interactive!

List

A simple list of packages in the standard output:

$ ./rpm-showme fedora:30 list
acl
alternatives
audit-libs
basesystem
bash
...

Size

Just print out the total size of all packages:

$ ./rpm-showme fedora:30 size
274.2 MB

Report

An HTML table comparing multiple installations:

$ ./rpm-showme fedora:30 report report.html --name "Fedora 30 base image" --add "httpd" httpd:f30 

See the report.html and report-sizes.html generated with the --sizes option.

Installation

The script has been tested on Fedora 30.

Dependencies:

$ sudo dnf install graphviz podman python3-jinja2