[virt-tools-list] [PATCH] add AM_MAINTAINER_MODE macro

Guido Günther agx at sigxcpu.org
Fri Oct 15 12:44:38 UTC 2010


On Fri, Oct 15, 2010 at 01:18:16PM +0100, Daniel P. Berrange wrote:
> On Fri, Oct 15, 2010 at 06:06:35AM -0600, Eric Blake wrote:
> > On 10/15/2010 05:29 AM, Guido Günther wrote:
> > >Hi,
> > >On Wed, Sep 29, 2010 at 04:46:23PM +0200, Guido Günther wrote:
> > 
> > Odd - I cannot find the original mail, even when looking in the archives:
> > https://www.redhat.com/archives/libvir-list/2010-September/date.html
> > 
> > >>Hi,
> > >>Please add the AM_MAINTAINER_MODE macro to configure.ac for
> > >>virt-manager. This allows downstream distributions to disable this
> > >>feature so no autotools are required to build the package. The patch
> > >>doesn't change behaviour for upstream:
> > >>
> > >>     http://www.gnu.org/software/hello/manual/automake/maintainer_002dmode.html
> > 
> > The automake manual recommends against maintainer mode:
> > http://www.gnu.org/software/automake/manual/automake.html#maintainer_002dmode
> > 
> > >Several years ago François Pinard pointed out several arguments against 
> > >this AM_MAINTAINER_MODE macro. Most of them relate to insecurity. By 
> > >removing dependencies you get non-dependable builds: changes to sources 
> > >files can have no effect on generated files and this can be very confusing 
> > >when unnoticed. He adds that security shouldn't be reserved to maintainers 
> > >(what --enable-maintainer-mode suggests), on the contrary. If one user has 
> > >to modify a Makefile.am, then either Makefile.in should be updated or a 
> > >warning should be output (this is what Automake uses missing for) but the 
> > >last thing you want is that nothing happens and the user doesn't notice it 
> > >(this is what happens when rebuild rules are disabled by 
> > >AM_MAINTAINER_MODE).
> > >
> > >Jim Meyering, the inventor of the AM_MAINTAINER_MODE macro was swayed by 
> > >François's arguments, and got rid of AM_MAINTAINER_MODE in all of his 
> > >packages.
> > 
> > Furthermore, downstream distributions should not require autotools to 
> > build a package if they do not make any changes to any of the 
> > configure.ac/Makefile.am source files in the first place; and 
> > conversely, if you ARE patching those files, then you WANT to rerun the 
> > autotools and not silently disable them.
> 
> IIUC, this patch preserves that behaviour
Yes. The patch preserves current behaviour...

> If you added  'AM_MAINTAINER_MODE()', then the auto-rebuild rules
> would be disabled.  This patch adds 'AM_MAINTAINER_MODE([enable])'
> which IIUC,  keeps the auto-rebuild rules enabled by default as
> is normal behaviour when this macro isn't present at all. So the
> end result is simply that we gain the --[dis|en]able-maintainer-mode
> command line options, with no behavioural change elsewhere.

...and gives us --disable-maintainer-mode. This way downstreams can
disable maintainer mode and make sure they're not dependent on autotools
when building the package.

I agree with Eric that this should be added to all virt-* packages.
virt-manager was merely meant as a start to get into the discussion.
Cheers,
 -- Guido




More information about the virt-tools-list mailing list