[opensuse-buildservice] version-release numbering for DEB packages
I understand the release tag numbering in spec files (for ‘rpm’ packages): Release: <CI_CNT>.<B_CNT> However, I am unable to determine how to perform the same “release” numbering in ‘deb’ packages. A simple test in home:srae:tools (build.opensuse.org) shows: - the ‘rpm’ <CI_CNT> incrementing, but - the ‘deb’ stays the same -- actually, it seems to use the <version>-<release> as specified on the first line of the ‘debian/changelog’ file (in debian.tar.gz) Thanks in advance! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
(replying to the list, not sure why Reply-To: was set) On 6 November 2011 03:15, Steve Rae <srae@raedomain.com> wrote:
I understand the release tag numbering in spec files (for ‘rpm’ packages): Release: <CI_CNT>.<B_CNT>
What does CI_CNT and B_CNT stand for? I could guess Continous Integration Count and Build Count. Without understanding how they work *exactly*, I agree it is useful to get a new release number every time you build the software. The resulting package and the code it contains might differ, that's why a rebuild happens after all.
However, I am unable to determine how to perform the same “release” numbering in ‘deb’ packages. ... -- actually, it seems to use the <version>-<release> as specified on the first line of the ‘debian/changelog’ file (in debian.tar.gz)
I think this works as designed. Debian policy does not know the concept of numbering builds. The least significant part of the version is the Debian revison, in other words a version number for the Debian specific packaging. I believe the top entry of the changelog must match the version of the package (although I couldn't right now find the place in the policy where this is required. Would need to try lintian, to see what it says it's not the case) So to my understanding build numbering would first needed to be added to the Debian policy before you can make it work in a consistent way. I'm not actively following Debian policy discussions, not sure whether it has ever been discussed. One downside is of course that such build numbers make only sense within one consistent build system. If you compare build numbers assgined by two different systems you can't really tell anything. Even equal would not mean equal. I could imagine that not everybody would welcome such "unreliable" info in your packacking system. There is actually a discussion about amending Debian version numbering ongoing just these days. http://lists.debian.org/debian-policy/2011/10/msg00036.html (followup also in November) However, it looks like a bit different topic to me. Regards, Uwe -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
(replying to the list, not sure why Reply-To: was set)
On 6 November 2011 03:15, Steve Rae<srae@raedomain.com> wrote:
I understand the release tag numbering in spec files (for ‘rpm’ packages): Release:<CI_CNT>.<B_CNT>
What does CI_CNT and B_CNT stand for? I could guess Continous Integration Count and Build Count. CI_CNT is the "Check In Count" -- for example, it increments whenever a "osc commit" is performed on the package. B_CNT is the "Build Count" -- for example, it increments whenever a
On 11/8/2011 12:17 AM, Uwe Geuder wrote: package needs to rebuild because of a dependency on another package which has rebuilt.
Without understanding how they work *exactly*, I agree it is useful to get a new release number every time you build the software. The resulting package and the code it contains might differ, that's why a rebuild happens after all.
However, I am unable to determine how to perform the same “release” numbering in ‘deb’ packages. ... -- actually, it seems to use the<version>-<release> as specified on the first line of the ‘debian/changelog’ file (in debian.tar.gz) I think this works as designed. Debian policy does not know the concept of numbering builds. The least significant part of the version is the Debian revison, in other words a version number for the Debian specific packaging.
I believe the top entry of the changelog must match the version of the package (although I couldn't right now find the place in the policy where this is required. Would need to try lintian, to see what it says it's not the case) Yes, it does look like the top entry of the changelog is used to determine the <version>-<release> in the package's filename.
So to my understanding build numbering would first needed to be added to the Debian policy before you can make it work in a consistent way. I'm not actively following Debian policy discussions, not sure whether it has ever been discussed. One downside is of course that such build numbers make only sense within one consistent build system. If you compare build numbers assgined by two different systems you can't really tell anything. Even equal would not mean equal. I could imagine that not everybody would welcome such "unreliable" info in your packacking system.
There is actually a discussion about amending Debian version numbering ongoing just these days. http://lists.debian.org/debian-policy/2011/10/msg00036.html (followup also in November) However, it looks like a bit different topic to me.
Regards,
Uwe
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
For anyone interested, the following code resolves this issue... ( in “/usr/lib/obs/server/build/build” ) --- build_orig 2011-12-15 00:31:44.512012497 +0000 +++ build 2011-12-15 00:18:33.519078066 +0000 @@ -1948,6 +1948,19 @@ fi if test"$BUILDTYPE" = dsc ; then +if test -f $BUILD_ROOT$TOPDIR/BUILD/debian/changelog; then + line_first=`head -1 $BUILD_ROOT$TOPDIR/BUILD/debian/changelog` + line_after=`echo $line_first | sed"s/^\([^(]*([^-)]*\)[^)]*\().*\)$/\1-$RELEASE\2/"` + echo ----------------------------------------------------------------- + echo I have the following modificationsfor $TOPDIR/BUILD/debian/changelog: + echo 1c1 + echo $line_first + echo --- + echo $line_after + echo ----------------------------------------------------------------- + sed -i"1 s/$line_first/$line_after/" $BUILD_ROOT$TOPDIR/BUILD/debian/changelog + fi + # Checks to seeif a build script should be used #this allows the build environment to be manipulated # and alternate build commands can be used On 11/5/2011 6:15 PM, Steve Rae wrote:
I understand the release tag numbering in spec files (for ‘rpm’ packages): Release: <CI_CNT>.<B_CNT>
However, I am unable to determine how to perform the same “release” numbering in ‘deb’ packages.
A simple test in home:srae:tools (build.opensuse.org) shows: - the ‘rpm’ <CI_CNT> incrementing, but - the ‘deb’ stays the same -- actually, it seems to use the <version>-<release> as specified on the first line of the ‘debian/changelog’ file (in debian.tar.gz)
Thanks in advance! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Steve Rae
-
Uwe Geuder