On Thu, 7 May 2020 at 22:53, clime clime@fedoraproject.org wrote:
<snip>
In the rare occasion that I need to make downstream-only changes with patches, I usually just explode the upstream tarball, run "git init", then "git add .", "git commit -m import", apply my changes, and then do "git diff --patch > ../00-my-changes.patch" (if it's just one commit), or "git format-patch -o ../" if there are multiple commits, and then delete the exploded sources again.
In any case, I think this functionality could be included in rpkg/fedpkg...?
If there are no objections, I will open a ticket for this.
Maybe also something from https://pagure.io/glibc-maintainer-scripts/blob/master/f/glibc-sync-upstream... could be included too?
I have opened https://pagure.io/rpkg/issue/502.
But I think the source-git (or exploded sources) repos would be great to pursue as well.
Out of the mentioned models to avoid history overwriting by force pushes (i.e. tags mentioned by Miro Hroncok and Hunor Csomortáni, branches mentioned by Simo Sorce, git merge -s ours mentioned by Florian Weimer), I like the branches approach the most with a slight tweak that branches are named according to upstream versions. I.e. for each "rebase", we create a new branch containing the new updated upstream sources and place our possibly updated patches on top. Effectively, a branch is just a single file in .git/refs/heads so it should be cheap and there will be no force pushes. Just the dist-git interface for working with branches should be ready for the fact that there may be a lot of them :). I think it is a small price for enabling this potentially very exciting, new approach.
Best regards clime