Sandy
Sandy

Reputation: 197

How to auto increment RPM version only if files are changed

How does the linux distro's like Redhat, SLES build their RPMs. The main task I want to understand is how does their build system identify only a changed files in a particular RPM and then increment the RPM version?

I have tried few ways to achieve this task. 1) I tried using indexing mechanism where I tried tracking all the files part of the RPM along with their md5sum and timestamp and then increment the version of the RPM if any of the file md5sum value is changed. But this approach is not scalable. Is there any build software which can be leveraged for the same?

Upvotes: 1

Views: 842

Answers (2)

dlmeetei
dlmeetei

Reputation: 10391

Having looked at one of the spec file that Redhat maintains, tog-pegasus.spec It is observed that

1) version is not auto incremented when a fix is introduced. It is maintained manually.

2) Every change in the code base is documented through %changelog directive.

3) Every change is being applied through patch command

May be, you can follow the same thing :)

Upvotes: 1

Florian Weimer
Florian Weimer

Reputation: 33727

You can view the process in Fedora, where the Git repositories are public and contain all commits (not squashed between releases). Here's an example:

dist-git for Red Hat Enterprise Linux is not that different, but you only get occasionally public exports through https://git.centos.org, so the process is less clear from the outside.

And yes, I wish there was more automation …

Upvotes: 0

Related Questions