This is a tool that works in a similar way to rdopkg patch
. It uses
rdopkg's APIs to tar up all the changes in the Git -patches branch into a
"-changes.tar.gz" tarball and adds the tarball to the RPM packaging.
I use this to combine all our downstream changes into a single file suitable for dist-git.
Comparing rdopkg patch
with this tar-changes
script:
"rdopkg patch" | this "tar-changes" script |
---|---|
Transforms a downstream -patches branch into output suitable for dist-git | |
Operates in conjuction with an unchanging upstream tarball | |
Applies changes during the %prep stage of rpmbuild | |
Generates .patch files | Generates a tarball of changed files |
Limited by RHEL 7's static
buffer limit for %prep in
rpmbuild. |
rpmbuild's %prep script does
not grow with the number of
patches. |
Ability to delete files entirely from the tree downstream. | Unable to delete files (only add or edit existing files). |
Unable to edit binary files | Able to apply edits to binary files |
Does not require the %commit
macro in your spec file in order
to generate the %changelog . |
Requires the %commit macro
in your spec file in order to
generate the %changelog . |
Slightly more visibility into changes when browsing dist-git, since you can see the individual .patch files changing. | Slightly less visibility into changes when browsing dist-git, since you only see a tarball and Git sha1 changing. |
To reconstruct a -patches branch
commit-by-commit, without the ref
or sha1, use git am |
No simple way to reconstruct a
-patches branch if a ref is
dangling/lost. More important
to tag every -patches branch
change with
rdopkg tag-patches . |