[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automake/autoconf in build-dependencies

On Mon, 14 Mar 2005, Kurt B. Kaiser wrote:
> Henrique de Moraes Holschuh <hmh@debian.org> writes:
> >> When I include the configure script in my source packages, I can feel
> >> pretty confident that they package I upload will stay buildable even
> >> if a week from now autoconf or automake gets updated to something not
> >> backwards compatible.
> >
> > Yes. That's how I see it as well.
> However, these files (as generated by the Debian maintainer's autotools
> run before the upload) should be included in the source package via the
> .diff.gz. so that the user doesn't need autotools.

OR, if you have a damn good reason to (e.g. you dpatch configure.ac), you
run autotools on the build tree...

> 1. How does one configure CVS to run the autogen.sh?

Module hooks in CVSROOT/* stuff.  I never did that, I prefer to have
debian/rules run autogen.sh if configure is missing.

> 2. If the autogen.sh invocation is done during the build by
>    debian/rules it can't be done prior to "building the source
>    package", which I interpret to mean creating the .diff.gz.  "Get
>    this script to be run" implies a dependency of some kind: a missing
>    configure script or a missing configure-stamp. And in that case,
>    the buildds will also invoke it.

No, they won't.  See all the build logs for all my packages that
build-depend on autotools-dev for empiric proof.  In particular, get
rng-tools which is a small one and fairly simple to understand, and play
with it.

> 3. When using cvs-buildpackage, a clean copy of the repository is
>    exported, but then dpkg-buildpackage kicks off without a chance for
>    maintainer intervention to do something before the build.  Perhaps
>    I could use the -H<hook_script> option to run autogen.sh?

There is no need to.  configure is missing, so make will run autogen.sh
which will create it.

This only works because dpkg-buildpackage calls the clean target before
doing anything, BTW.  And all things Debian follow its lead (i.e. pbuilder,
the buildds, sbuild, cvs-buildpackage, etc all either use dpkg-buildpackage
or do things as dpkg-buildpackage would do).

> If the Debian maintainer has run autotools before uploading, should
> the buildds re-run the autotools or not?

They need not to IMHO, but if you want them to, you can easily force that to
happen as well.   I would only do that if I needed to dpatch configure.ac,
or something like that.

> > Agreed.  That's the current best practice for Debian, as far as I am
> > concerned.

I should have added that doing it at build time if you have a good reason to
is also best-practice.

> README.Debian.gz is a little obscure in places, and answers to the
> above questions would be helpful to me.

Sure thing.  Did the above answers help any?

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: