[Rpm-maint] [rpm-software-management/rpm] Build version (build tag?) in RPM (Discussion #2031)
Ludwig Nussel
notifications at github.com
Mon Jun 13 12:23:46 UTC 2022
FWIW as automatic rebuilds are a natural part of openSUSE maybe there's some inspiration from how it's done there. Basically the build system maintains it's own release value by tracking the so called checkin counter and rebuild counters. OBS' build system edits the spec file it passes to rpmbuild to set the release string.
IIRC (@mlschroe correct me if it's wrong) whenever the version in the spec file of a package changes in the source repo, the checkin count is increased, starting at 1 and the rebuild counter reset to 1. The value for the rpm is a concatenation of both counters with a dot, ie `<CI_CNT>.<B_CNT>`. Each automated rebuild increases the rebuild counter.
So the first build of a package `foo` version `42` would have NVR `foo-42-1.1`. An auto rebuild without source change `foo-42-1.2`, then `foo-42-1.3` and so on. Version 43 would start with `foo-43-1.1` again. If you fix eg a typo in the spec file of version 43 then, it would get `foo-43-2.1`
That makes life for packagers really easy as one has to basically never care about the release value. A spec file can easily be copied around and reused in different projects. The binaries end up having independent release values.
In that system obviously one cannot make assumptions about the release value of other packages when specifying dependencies.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2031#discussioncomment-2938011
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/2031/comments/2938011 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220613/5edead7d/attachment.html>
More information about the Rpm-maint
mailing list