Skip to main content

A package and CLI tool to generate RPM release fields and changelogs.

Project description

This project hosts the rpmautospec python package and script, which has these functions:

  • Attempt to automatically calculate release numbers and generate an RPM changelog from the dist-git repository of a package.

  • Tag commits in a dist-git repository with build NEVRs (quoting certain special characters).

Dependencies:

  • python3

  • python3-pygit2

General

The script run-rpmautospec.py allows testing the various algorithms for automatic release and changelog generation. It accepts normal CLI options, run python run-rpmautospec.py --help for more information.

Generating a Changelog

This is how you can use it:

  • Clone a dist-git repository

fedpkg clone -a guake
  • Generating the changelog, pointing it to the repository cloned above

python run-rpmautospec.py generate-changelog guake

Calculating the Next Value for the Release Field

Calculate the value for the RPM release field by running the script this way:

python run-rpmautospec.py calculate-release <pkgname>

E.g.:

python run-rpmautospec.py calculate-release bash

The rpmautospec Python module is not thread/multiprocess-safe

rpmautospec redefines some RPM macros when parsing spec files or expanding macros. Those 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 RPM config).

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: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpmautospec-0.4.1.tar.gz (95.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpmautospec-0.4.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file rpmautospec-0.4.1.tar.gz.

File metadata

  • Download URL: rpmautospec-0.4.1.tar.gz
  • Upload date:
  • Size: 95.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for rpmautospec-0.4.1.tar.gz
Algorithm Hash digest
SHA256 6d75759686e3bf15e094ec9421aaf5115fa5f5d7fb3bc35d4c7f4e883a82ed26
MD5 81f99859d0ff6dda42eb796a7928bfe0
BLAKE2b-256 fe005e9ae1e13d745317fb16162d713a26f87555a2581a56a8ed6b3d5b3d49d1

See more details on using hashes here.

File details

Details for the file rpmautospec-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: rpmautospec-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for rpmautospec-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c985694a2dc22db3222b6b53b3fed0f2f30344f50783c7f0fc0ddd3975034331
MD5 62d951a1ddce41a4fafa8bf9c641f236
BLAKE2b-256 9c8f32fce5acabe36e821304a64ef557224053d653fd5c0cfdc0f4b980cd6fd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page