Skip to main content

This project hosts the rpmautospec python package and command line tool, which automatically calculates release numbers and generates the changelog for RPM packages from their dist-git repository.

Dependencies:

  • Python >= 3.9

  • rpmautospec-core >= 0.1.4

Installation dependencies:

  • hatch

Optional dependencies:

  • uv (if using uv to install)

  • pygit2 >= 1.4

General

The command line tool rpmautospec can calculate the release and generate the changelog from the spec file of an RPM package and its git history, as well as process that spec file into a form which can be consumed by rpmbuild, and convert traditional spec files to using these automatic features.

Running the Examples

To run the examples with the rpmautospec command line tool from this repository (as opposed to a version that may be installed system-wide), you can install it into a Python virtualenv, managed either manually or by the uv tool. For the latter, substitute running rpmautospec by running uv run rpmautospec below.

To install the package, run this (optionally, within an activated virtualenv):

uv sync

The examples work with the guake package. Clone its dist-git repository this way, in a location of your choice, and then change into the repository worktree:

fedpkg clone guake
cd guake

Generate the Changelog

This will generate the changelog from the contents of the repository and the history:

rpmautospec generate-changelog

Calculate the Release Field Value

This will generate the numerical value for the release field from the number of commits since the Version field was last updated:

rpmautospec calculate-release

The rpmautospec Python module is not thread/multiprocess-safe

rpmautospec redefines some RPM macros when parsing spec files or expanding macros. These definitions are only relevant to the current instance of the rpm module imported in Python, they are not persistent. rpmautospec cleans those definitions when it is done by reloading the RPM configuration.

However, if another thread or process running from the same Python interpreter instance attempts to change or expand RPM macros in the meantime, the definitions might clash and the cleanup might override other changes.

In case this breaks your use case, please open an issue to discuss it. We can cooperate on some locking mechanism.

Contributing

You need to be legally allowed to submit any contribution to this project. What this means in detail is laid out in the file DCO.txt next to this file. The mechanism by which you certify this is adding a Signed-off-by trailer to git commit log messages, you can do this by using the --signoff/-s option to git commit.

License

The majority of rpmautospec is licensed under the MIT license, with one notable exception: Small parts of the rpmautospec._wrappers.minigit2 package are derived from pygit2, licensed under version 2 of the GNU General Public License, with a linking exception. Code in the rpmautospec._wrappers.minigit2 package which isn’t derived from pygit2 is dual-licensed under the MIT license or the GNU GPL version 2 or later (with the linking exception).

Find the texts of both licenses in the licenses/ subdirectory.

Metadata

Release files for rpmautospec 0.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpmautospec 0.8.5
File Size Uploaded
rpmautospec-0.8.5.tar.gz 161.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rpmautospec 0.8.5
File Interpreter ABI Platform
rpmautospec-0.8.5-py3-none-any.whl Python 3 none any Details

Total release size: 230.0 kB

Release files / rpmautospec-0.8.5.tar.gz

Download URL rpmautospec-0.8.5.tar.gz
Size 161.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e1f33e9f8810b3b2977f4495f1236509ad5d456711d351ac844915389c64b25e
BLAKE2b-256 checksum
How to use checksums
c9408114fbe1cd1d697fa4e6566a1a8915b27f1612a9a579efbd2530ced524c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / rpmautospec-0.8.5-py3-none-any.whl

Download URL rpmautospec-0.8.5-py3-none-any.whl
Size 68.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a256767990e84ed0fd3e47234b276d82e3df5d74f7e57fe895d7fdd45d65930f
BLAKE2b-256 checksum
How to use checksums
1ed618d20966553f608b3499ee4043758cdf51f7553629ff290fc5054d69eaa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.8.5 This release

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page