PackagingDrafts/AutoConf

--Dmalcolm 00:27, 12 March 2010 (UTC): I believe this draft, as written, is controversial. For what it's worth, I strongly disagree with the proposed policy, see also http://lists.fedoraproject.org/pipermail/devel/2009-February/023647.html

= Using autoconf/automake in spec files =

This document seeks to document the usage of,  , and   during a package build in Fedora; i.e. the usage of older packages like   and.

Problem

 * Autoconf, Automake, and Libtool (collectively, the &ldquo;autotools&rdquo;) can by used for many Fedora packages to create  scripts and  s. The resulting   scripts and  s might be different on systems with a different set of installed packages and thus might lead to unpredictable results. In particular, when any of Fedora's autotools packages is upgraded, the new version may not be compatible with the autotools input files in Fedora's numerous autotools-derived upstream source packages.


 * Some packages use old autotools versions in order to build their  scripts and  s. Some of these older helper tools aren't multilib capable and patches need to be applied to be able to build the package on multilib systems. Upstream doesn't maintain these tools anymore and so the tools won't get any bugfixes.

Solution

 * Autotools-generated source packages are intended to be buildable without requiring the autotools on the host system.,  ,   and the accompanying   shouldn't be used in the   or   sections of a package's spec file. Applying a patch to update the   scripts and  s is preferred as the results are predictable and packages are more reproducible.


 * When manual modification of  or   for the purpose of generating a patch is impractical, packagers can create a patch by regenerating   and/or   to use as input to  . In general,   should not be used for this purpose because it will regenerate files that probably don't need to be regenerated.
 * If only  has been touched, run   to regenerate.
 * If  (or in older packages,  ) has been modified, but no additional Autoconf macros were invoked, run   to regenerate.
 * If new macro invocations have been added to, first run   (to regenerate  ), then run  . Many projects distribute their own Autoconf macros in an &ldquo; &rdquo; or &ldquo; &rdquo; subdirectory; you will need to provide   with a   flag with the path to these macros. Note that you do not need to include modifications to   in your patch.


 * Package maintainers should work with upstream to port the scripts to recent autotools. Sometimes this won't work due to time constraints or due to compatibility concerns for multi-platform packages such as p.e. Firefox; but at least an attempt should be made.