Skip to content

RFE: Automated exportpatches tool, reverse of importpatches #17

@hroncok

Description

@hroncok

I'd like to be able to construct the content of a git branch from dist-git. If done nicely, we can automate creating tags in https://github.com/fedora-python/cpython whenever Koji build happens - that way we could stop caring about the tags and branch content manually and the entire workflow would be much simplicifed.

My idea for exportpatches is that it will:

  1. look for the Python version in the spec file and git reset --hard to the appropriate @python/cpython v%{version} git tag
  2. git am the patches from the spec file, one by one, ideally using --committer-date-is-author-date for a reproducible commit hash -- he commit messages are included in the patches, so we don't parse them from the specfile comments -- we only use the spec to get the list of patch files
  3. create the fedora-%{version}-%{release} tag (release might as well contain the dist tag, so we can apply this behavior to diverged patches, like 251) and push it to @fedora-python/cpython (if enabled)
  4. git reset --hard the fedora-%{version}to what we have just created and push force that one (if enabled)

I'd like to have this reproducible. When a new patch is added on top, we want a new commit on top, not an entirely fresh set of commits. I believe --committer-date-is-author-date should make that happen, but will see. Also when run from different machines, the commit hashes should remain identical.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions