[CentOS] yum/dnf diff

Mon Jun 8 14:09:54 UTC 2020
Johnny Hughes <johnny at centos.org>

On 6/5/20 4:31 PM, Kenneth Porter wrote:
> --On Friday, June 05, 2020 1:39 PM -0700 John Pierce
> <jhn.pierce at gmail.com> wrote:
> 
>> don't most packages create a .rpmnew file if you've modified the previous
>> package file ?
> 
> That file is created AFTER you've made edits, and reflects only the
> state of the file in the latest package. So it's not clear what changed
> from the original package that needs to be migrated into one's current
> settings.
> 
> As a rule I try to copy the original files to xxx.original so I can
> compare that to both the .rpmnew file and my working file. But I or
> another admin might forget to save the original. So I end up going the
> cpio route to extract the original files to a temp tree to do the 3-way
> comparison between the original, my modifications, and the latest
> package's modifications.

Do your mods in a local git repo .. if you mod the exploded tarball, do
it via a spec patch.

If you mod config files .. create a separate branch from the rpm and put
the mods in (if you can't do it via a spec patch).

Then when new files come in .. just reapply (or refactor if necessary)
the original diff.  That is exactly what we do for packages we modify ..
look at Firefox as an example:

https://git.centos.org/rpms/firefox/commits/c7

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20200608/6672f050/attachment-0004.sig>