[PATCH] Remove the autoconf build system

Andrew Bartlett abartlet at samba.org
Sun May 26 03:38:55 MDT 2013


On Fri, 2013-05-24 at 19:01 +1000, Andrew Bartlett wrote:
> On Thu, 2013-05-23 at 13:36 +1000, Andrew Bartlett wrote:
> > I've uploaded my patches to remove the autoconf build system to the
> > remove-autoconf branch at git://git.samba.org/abartlet.samba.org
> > 
> > https://git.samba.org/abartlet/samba.git/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/remove-autoconf

It has been great to see the discussion of this topic, as I know it is
in a frustrating space being totally tedious (build systems always are),
large (because we carry a lot of weight around in this secondary build
system) and painfully controversial (given the history).

However, having done the work to cleanly remove this, I would really
appreciate knowing if there are any actual issues with the patch, beyond
the difficult question of how to reduce the disruption to Volker's
workflow. 

As you would have noticed, the patch series is long, to allow specific
changes to be included or dropped without major disruption to other
patches. 

So as to assist review, I thought I might explain each change in breif
(the same is in the commit messages):

> Just a quick guide to the diffstat:

> Files in b/ are files that are modified, not removed.  Everything else
> is a total removal.  (This comes from how git diff shows output). 
> 
> > Here is the diffstat of my remove-autoconf tree:
> > 
> >  auth/credentials/credentials_samba3.c        |   49 

This file is perhaps the best example of why I want to make this change.
It exists only because it wasn't practical to build the functions
required in the autoconf system, so these are stubs only for the
linker. 

> >  b/BUILD_SYSTEMS.txt                          |   25 

The documentation about the build systems is updated

> >  b/buildtools/wafsamba/samba_patterns.py      |    6 

The version.h is no longer always regenerated

> >  b/dynconfig/dynconfig.c                      |   11 

Without autoconf, special case #ifdef no longer required

> >  b/examples/smb.conf.default                  |   70 

A documentation patch that is in this series, and I've asked for review
separately on.  

> >  b/lib/param/loadparm.c                       |    2 
> >  b/lib/param/loadparm_server_role.c           |    4 
> >  b/lib/param/param_table.c                    |    2 
> >  b/lib/util/modules.c                         |    8 

Removal of #ifdef

> >  b/lib/util/wscript_configure                 |   22 

The statvfs patch

> >  b/nsswitch/wbinfo.c                          |    4 

Removal of #ifdef

> >  b/script/autobuild.py                        |   25 

Remove the autoconf build from autobuild

> >  b/selftest/target/Samba3.pm                  |   16 
> >  b/selftest/wscript                           |    1 

The testsuite is simpler with just waf

> >  b/source3/passdb/machine_account_secrets.c   |    8 
> >  b/source3/passdb/pdb_ipa.c                   |    2 
> >  b/source3/smbd/posix_acls.c                  |    5 

Remove #ifdef

> >  b/source3/wscript_build                      |    1 

Don't invoke symbol checker twice

> >  b/wscript                                    |    7 

Remove generated files needed for autoconf build from 'waf dist' and our
tarballs.  4MB saving. 

> >  buildtools/compare_config_h3-exceptions.grep |   10 
> >  buildtools/compare_config_h3.sh              |   27 

These are the scripts I've been using to compare the config.h output
using build farm hosts or 'make bin/smbtorture'. 

> >  dynconfig/config.m4                          |  299 -
> >  examples/VFS/Makefile.in                     |   72 
> >  examples/VFS/autogen.sh                      |   63 
> >  examples/VFS/config.guess                    | 1561 ------
> >  examples/VFS/config.sub                      | 1686 ------
> >  examples/VFS/configure.in                    |  357 -
> >  examples/VFS/install-sh                      |  238 
> >  lib/ccan/libccan.m4                          |  363 -
> >  lib/iniparser_build/config.m4                |   45 
> >  lib/nss_wrapper/config.m4                    |   19 
> >  lib/ntdb/libntdb.m4                          |   41 
> >  lib/popt/libpopt.m4                          |   43 
> >  lib/popt/samba.m4                            |    8 
> >  lib/replace/crypt.m4                         |    6 
> >  lib/replace/dlfcn.m4                         |   31 
> >  lib/replace/install-sh                       |  238 
> >  lib/replace/libreplace.m4                    |  490 -
> >  lib/replace/libreplace_cc.m4                 |  197 
> >  lib/replace/libreplace_ld.m4                 |  337 -
> >  lib/replace/libreplace_macros.m4             |  347 -
> >  lib/replace/libreplace_network.m4            |  503 --
> >  lib/replace/repdir.m4                        |   81 
> >  lib/replace/strptime.m4                      |   16 
> >  lib/replace/system/config.m4                 |  145 
> >  lib/replace/timegm.m4                        |    1 
> >  lib/replace/win32.m4                         |   20 
> >  lib/socket_wrapper/config.m4                 |   22 
> >  lib/talloc/compat/talloc_compat1.m4          |   14 
> >  lib/talloc/libtalloc.m4                      |   38 
> >  lib/tdb/libtdb.m4                            |   41 
> >  lib/tevent/libtevent.m4                      |   75 
> >  lib/uid_wrapper/config.m4                    |   19 
> >  lib/zlib/zlib.m4                             |   29 
> >  librpc/build_idl.sh                          |   67 
> >  m4/check_make.m4                             |   33 
> >  m4/check_perl.m4                             |   32 
> >  m4/check_python.m4                           |  111 
> >  m4/pkg.m4                                    |  156 
> >  release-scripts/create-tarball               |  235 

> >  source3/Makefile-smbtorture                  |   24 

The recursive makefile for the bin/smbtorture build

> >  source3/Makefile.in                          | 3405 -------------
> >  source3/autoconf/lib/param/README            |    3 
> >  source3/autoconf/librpc/gen_ndr/README       |    7 
> >  source3/autoconf/source3/param/README        |    3 
> >  source3/autogen.sh                           |  121 
> >  source3/config.guess                         | 1561 ------
> >  source3/config.sub                           | 1686 ------
> >  source3/configure.developer                  |    7 
> >  source3/configure.in                         | 6693 ---------------------------
> >  source3/include/autoconf/README              |    5 
> >  source3/include/autoconf/ldb_version.h       |    4 
> >  source3/install-sh                           |  238 
> >  source3/lib/netapi/examples/Makefile.in      |  364 -
> >  source3/lib/netapi/tests/Makefile.in         |   57 
> >  source3/m4/aclocal.m4                        |  899 ---
> >  source3/m4/autoconf-2.60.m4                  |  236 
> >  source3/m4/check_path.m4                     |   89 
> >  source3/m4/samba_version.m4                  |   29 
> >  source3/script/build_idl.sh                  |   60 
> >  source3/script/expand-includes.pl            |   30 
> >  source3/script/installbin.sh.in              |   34 
> >  source3/script/installdat.sh                 |   65 
> >  source3/script/installdirs.sh                |   18 
> >  source3/script/installman.sh                 |   87 
> >  source3/script/installmo.sh                  |   87 
> >  source3/script/installmodules.sh             |   42 
> >  source3/script/installscripts.sh             |   47 
> >  source3/script/linkmodules.sh                |   12 

> >  source3/script/mkbuildoptions.awk            |  275 -

This looks at first glance like a script that should be kept, but is
already replaced more elegantly in python. 

> >  source3/script/mkinstalldirs                 |   38 
> >  source3/script/mkversion.sh                  |  150 
> >  source3/script/revert.sh                     |   18 
> >  source3/script/uninstallbin.sh.in            |   41 
> >  source3/script/uninstalldat.sh               |    1 
> >  source3/script/uninstallman.sh               |   37 
> >  source3/script/uninstallmo.sh                |    2 
> >  source3/script/uninstallmodules.sh           |   39 
> >  source3/script/uninstallmsg.sh               |    1 
> >  source3/script/uninstallscripts.sh           |   36 
> >  source3/script/uninstallswat.sh              |    1 
> >  source3/selftest/s3-selftest.sh              |   54 
> >  source3/tests/preproc-dummy.c                |    1 
> >  103 files changed, 45 insertions(+), 24946 deletions(-)

The remaining files are files invoked only from the autoconf build, such
as the scripts that actually installed binaries (due to our habit of
moving binaries to .old) and the matching uninstall scripts. 

> > It also shrinks 4MB of our release tarball size, as pidl code is no
> > longer pre-generated.
> > 
> > As the patch is nearly 800k I won't attach it to the list.

I would very much appreciate a technical review of this work, while we
finish discussing this important move.  

I would also very much like to see a concrete proposal as to any changes
needed to address Volker's workflow, rather than hold this patch and
important decision up while waiting for someone to do something.  

My view is that the time for major feature requests for our use of waf
was back when Tridge was implementing it for Samba, and that it is
unreasonable to hold this back in the absence of a genuine proposal
backed by actual working patches. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list