[CentOS] yum/dnf diff

Fri Jun 5 19:27:17 UTC 2020
Johnny Hughes <johnny at centos.org>

On 6/5/20 2:21 PM, Johnny Hughes wrote:
> On 6/5/20 11:55 AM, Kenneth Porter wrote:
>> --On Friday, June 05, 2020 9:10 AM -0500 Johnny Hughes
>> <johnny at centos.org> wrote:
>>
>>> These are two totally separate programs and projects.
>>
>> I'm not talking about diff'ing the yum and dnf programs. I'm talking
>> about diffing the RPM packages that "rpm -V" reveals as changed. Such a
>> utility would download the package if it wasn't in the cache, unpack it
>> with cpio into a temp directory, and diff the component files against
>> the copies on disk.
>>
>> yum and dnf would only be involved because they maintain a package cache
>> so they might be the logical place to implement a plugin to do this.
> 
> Oh .. I misunderstood what you are after.
> 
> If you are dealing with CentOS RPMs .. you can just look at git.centos.org:
> 
> For example .. here is one CentOS Linux 7 rpm.  I'll pick 389-ds-base.
> 
> 
> https://git.centos.org/
> 
> Click into search and type 389-ds-base .. pick rpms/389-ds-base
> 
> Click on Branches on the left tabs .. In this example, I'll pick c7
> 
> Now if you click on the left commits tab. you will see each c7 rpm import.
> 
> if you click on the six digit number, for example, e52775 for the
> current latest "import 389-ds-base-1.3.10.1-9.el7_8".  The result is
> every diff of every change for the rpm.
> 
>

You can also do a git clone of any rpm and work with the branch on your
machine:

so:

git clone https://git.centos.org/rpms/389-ds-base.git

cd 389-ds-base

git checkout c7

git log

(shows)
commit e52775ada05eb168f4b1df79fc0350b5f38d494c
Author: CentOS Sources <bugs at centos.org>
Date:   Tue May 12 08:34:50 2020 -0400

    import 389-ds-base-1.3.10.1-9.el7_8

commit 4c04d8bc35c01089a6ec0a234558b3637603d9e1
Author: CentOS Sources <bugs at centos.org>
Date:   Tue Mar 31 05:37:27 2020 -0400

    import 389-ds-base-1.3.10.1-5.el7

(and a bunch more)

If you then did:

git diff 4c04d8bc35c01089a6ec0a234558b3637603d9e1
e52775ada05eb168f4b1df79fc0350b5f38d494c > diff

then the file diff would look just like the web info you got in the link
you did in my last post.


-------------- 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/20200605/a32a1d92/attachment-0004.sig>