On Friday 26,June,2009 02:48 AM, Michał Jaszczyk wrote: > 2009/6/25 Chow Loong Jin <hyperair@gmail.com>: >> On Friday 26,June,2009 02:31 AM, Michał Jaszczyk wrote: >>> I'd like to create a package that uses CDBS. I thought I could use the >>> autotools.mk class but it assumes that configure script already >>> exists. But: I put the sources into our svn and I didn't put configure >>> in there because it can be generated from other files. When our >>> automated build system checks out from svn and performs fakeroot >>> debian/rules binary, it fails because there's no configure script in >>> there. >>> >>> What is the recommended way of handling this situation? I could just >>> put configure into svn, but I'd like to avoid that. I could write my >>> own rules that call autoconf and friends instead of using CDBS. But I >>> don't like any of these two solutions. >>> >>> Regards, >>> >> CDBS can call autoconf and automake to generate the configure script if >> you've told it to do so. See the CDBS documentation regarding the >> autotools class[1] for more details. >> >> [1] http://build-common.alioth.debian.org/cdbs-doc.html#id2540579 >> -- >> Regards, >> Chow Loong Jin >> >> > > Do you mean DEB_AUTO_UPDATE_AUTOCONF and > DEB_AUTO_UPDATE_AUTOMAKE? CDBS documentation says that these two > variables are used to specify versions of those tools. And usage of > them is discouraged, why? Because the clean rule in debian/rules is supposed to revert the source tree to the exact state it was before, or at the very least, it must be able to build twice in a row like this: $ fakeroot debian/rules binary $ fakeroot debian/rules clean $ fakeroot debian/rules binary The debs produced by the two `debian/rules binary' calls should be equivalent. Another thing is that you should be able to create a clean source package out of the source directory which has been built from before. By "clean", I mean that the resulting diff.gz will not have any changes to files which are not in debian/. If autoconf and automake are called, it usually changes the configure script, the Makefile.in files, as well as the config.* files, irreversibly unless you back them up and restore them using the clean rule. This can, of course, be worked around by deleting all Makefile.in files in the clean rule. It won't be back to the original state, but at the very least, the build should be reproducible. Also, dpkg-source does not take into account deleted files, so building a source package from a source directory that has already been built from will not pollute the resultant .diff.gz with files that aren't in debian/. -- Regards, Chow Loong Jin
Attachment:
signature.asc
Description: OpenPGP digital signature