rpmbuild-order: Order RPM packages by dependencies

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

The rpmbuild-order tool sorts source RPM packages by build dependencies, so that they can be built in a correct order. It does this by reading RPM package spec files and then topologically sorts them according to their build dependencies. The code evolved from cabal-sort by Henning Thielemann. It can also order the dependencies or reverse depends of one or more packages among the packages checked out in neighboring directories (which can be useful to see what packages are affected when a low-level package changes). It also has support for setting RPM options for bcond etc, which can affect dependencies. It can also output dependency graphs. Since version 0.4, a library API is also provided.


[Skip to Readme]

Properties

Versions 0.1, 0.2, 0.2.1, 0.3, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.2.1, 0.4.3, 0.4.3.1, 0.4.3.2, 0.4.4, 0.4.4, 0.4.4.1, 0.4.5, 0.4.6, 0.4.6.1, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.4.11
Change log ChangeLog.md
Dependencies base (<5), case-insensitive, containers, directory, extra (>=1.6.4), fgl (>=5.5.4), filepath, graphviz, optparse-applicative, process, rpmbuild-order, simple-cmd-args [details]
License BSD-3-Clause
Copyright 2010-2018 Henning Thielemann, 2018-2021 Jens Petersen <petersen@redhat.com>
Author Jens Petersen <petersen@redhat.com>, Henning Thielemann <haskell@henning-thielemann.de>
Maintainer Jens Petersen <petersen@redhat.com>
Category Distribution
Home page https://github.com/juhp/rpmbuild-order
Bug tracker https://github.com/juhp/rpmbuild-order/issues
Source repo head: git clone https://github.com/juhp/rpmbuild-order
Uploaded by JensPetersen at 2021-05-16T10:16:26Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for rpmbuild-order-0.4.4

[back to package description]

GitHub CI Hackage license

rpmbuild-order

This is a tool to sort RPM source packages in build dependency order. This code is originally derived from cabal-sort by Henning Thielemann.

Usage

$ rpmbuild-order --help
:
$ rpmbuild-order sort mycore mylib myapp
mylib mycore myapp

The arguments passed can either be directories containing the package or spec files.

If the dependency graph has cycles then an error will be output with a list of cycles and any shortest path subcycles.

Using the rpmbuild-order deps and rdeps commands the ordered dependencies and reverse dependencies of a package can be obtained within the current set of checked out package sources.

The render command displays a graph of package dependencies using graphviz and X11 or optionally instead prints the dot format to stdout.

Library

As of version 0.4, a library is also provided.

There are two modules:

Please see the documentation for more details.

Notes and known problems

  1. Given packages A, B, C, where C depends on B, and B depends on A, and you call

    rpmbuild-order sort C.spec A.spec

then the output may be wrong if C does not have a direct dependency on A. Even if the order is correct, B is missing in the output and thus in this case the list of packages cannot be reliably used for a sequence of builds.

However the deps and rdeps commands take other neighbouring package directories into account.

  1. repoquery is not used to resolve meta-dependencies or files to packages. So if a package BuildRequires a file, it will not be resolved to a package. This may get addressed some day, but file dependencies seem less common for BuildRequires than Requires.

  2. rpmspec is used to parse spec files (for macro expansion etc): so missing macros packages can lead to erroneous results in some cases.