A command to update Fedora Python dist-git spec & patches from a Git repository
Meant to be used with a local clone of fedora-python/cpython
which includes tags like vX.Y.Z
(upstream releases) and branches
like fedora-X.Y
(vX.Y.Z
+ commits for individual patches).
The summary lines of patch commits must start with NNNNN:
, where NNNNN is
the patch number (registered in the patch registry).
The rest of the commit message should be usable in the spec.
(It also mostly works with the fedora-2.7
branch, which uses different
conventions.)
Add the script to your $PATH
, for example:
ln -s $PWD/importpatches.py ~/.local/bin/importpatches
The script needs to know where your local clone of fedora-python/cpython
is,
and uses Git configuration as a default.
In your clone of dist-git, run git config importpatches.upstream .../cpython
.
(Replace .../cpython
with your clone of fedora-python/cpython
, of course.)
Alternatively, run git config
with --global
to avoid the need to set this in all dist-git clones of Pythons.
Run importpatches.py
without arguments in your clone of dist-git.
If the defaults don't work for you, run with --help
to see the options.
The script adds Git hash IDs to the spec file. These are hashes of the patch content, ignoring tings like context lines and comments. When one of these changes, pay special atttention to the patch diff.
The script is available under the MIT license. May it serve you well.