[Buildd-tools-devel] Bug#475777: Bug#475777: sbuild: Add support for appending a tag to version numbers

Roger Leigh rleigh at whinlatter.ukfsn.org
Sun Apr 20 12:24:53 UTC 2008


Timothy G Abbott <tabbott at MIT.EDU> writes:

> I think sbuild should support appending a string to the version number
> of the package at build time, similar in function to --binNMU, but
> with support for appending arbitrary strings to the version numbers.
[...]

> One thing that I do not handle in my patch is how one should append
> failed builds using --append-to-version to the job log, since I'm not
> familiar with the parsers for the job log that are in use.  My patch
> contains a comment noting this in the relevant section of the code;
> this should be replaced with whatever the right solution is.

Many thanks for the patch.  I reviewed the patch, and it looks good.
A slightly modified version of this is attached; I altered the
binNMU_version function for compatibility with other programs using
binNMU_version in Sbuild.pm who won't provide the third argument
(wanna-build).  I also added some further details to your comment
about the failed builds.

The patch looks good and works, but I did find a bug with combining
--append-to-version and --make-binNMU:


% sbuild --append-to-version=rleigh --make-binNMU=Test. --binNMU=2 -d unstable -s -A dadadodo_1.04-3
[...]
dpkg-shlibdeps -Tdebian/dadadodo.substvars -dDepends \
                        /build/rleigh/dadadodo_1.04-3/debian/dadadodo/usr/bin/dadadodo
install -d /build/rleigh/dadadodo_1.04-3/debian/dadadodo/DEBIAN
cd /build/rleigh/dadadodo_1.04-3/debian/dadadodo >/dev/null ;\
         find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
dpkg-gencontrol -isp -pdadadodo -Tdebian/dadadodo.substvars \
                        -P/build/rleigh/dadadodo_1.04-3/debian/dadadodo
dpkg --build /build/rleigh/dadadodo_1.04-3/debian/dadadodo ..
dpkg-deb: building package `dadadodo' in `../dadadodo_1.04-3rleigh+b2_powerpc.deb'.
 dpkg-genchanges  >../dadadodo_1.04-3rleigh+b2_powerpc.changes
dpkg-genchanges: failure: cannot open .dsc file ../dadadodo_1.04-3rleigh.dsc: No such file or directory
dpkg-buildpackage: failure: dpkg-genchanges gave error exit status 2
******************************************************************************
Build finished at 20080420-1259
FAILED [dpkg-buildpackage died]
------------------------------------------------------------------------------
******************************************************************************
Finished at 20080420-1259
Build needed 00:00:13, 404k disk space


I'm not sure why dpkg-genchanges fails here: I can run it with the
same version outside the chroot and it works fine.  It may be a bug in
dpkg-buildpackage, but I'm not really sure about that.

Due to this problem, I haven't applied the patch as yet.  Once this
bug can be fixed, I'll be happy to apply the patch.  If you have any
idea what might be causing this, that would expedite merging this
change.

By the way, the patch is diffed against the latest version in our GIT
repository.  You can get a copy with

  % git clone git://git.debian.org/git/buildd-tools/sbuild.git sbuild

While diffs against earlier versions were fine in this case, it does
make things easier if patches are based against the master head.


There is also a problem here in that sbuild does not clean up the
build directory and generated files in the chroot when
dpkg-buildpackage fails at this point.  I'm thinking of adding a
temporary directory inside /build/$user for each build so that the
entire directory can be purged on failure.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbuild-append-version-tabbot-rev2.patch
Type: text/x-diff
Size: 7687 bytes
Desc: Amended append version patch
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20080420/081b7eac/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20080420/081b7eac/attachment.pgp 


More information about the Buildd-tools-devel mailing list