Learn more about these different git repos.
Other Git URLs
Hello,
in the Fedora Devel thread called "Is dist-git a good place for work?", there was described the following approach for patch creation here https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UWW5ROIBHCZ7SLFAHDGV7QGIZ7ETYHV2/:
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.
I am thinking there could be a command in rpkg to do this interactively? E.g.
<rpkg-tool> make-patches
which would do what is described above for Source0 in a temporary directory and switching a user there to begin patching. There could be a switch to select a different source.
Source0
The patches so far present in the dist-git repo would be applied at this point.
At the end, user would call e.g.
<rpkg-tool> finish-patches
which would transform the newly added commits in the temporary repo into patch files. Original patch files would be kept, unless the commits were deleted. The current working directory would be switched back to the dist-git repository.
The new patch files could be potentially immediately added into spec file as Patch lines.
Patch
The way patches are meant to be created with <rpkg-tool> is like follows: unpack the sources with prep, then create a backup of the file you want to modify (cp whateverfile{,.$suffix}), edit the file and finally run <rpkg-tool> patch $suffix. Any suffix can be used really. The value only affects name of the created patch.
<rpkg-tool>
prep
cp whateverfile{,.$suffix})
<rpkg-tool> patch $suffix
For the record I find this workflow quite cumbersome. (And also there is currently a bug that produces a TypeError instead of a patch.)
TypeError
Ah, interesting. So finally I understand what the patch command should do :). I never really got it before :).
patch
Login to comment on this ticket.