Hi,

The following patch series is a gentle (I hope) and superficial
introduction to making corosync gnulib-enabled.

It adds only a few modules and uses only one in actual C code,
and that in a trivial way.

The main benefit of this first step is that with it, you can run
"make syntax-check" to ensure that the version-controlled
code passes several basic sanity checks.

The first few patches address some of the failures exposed by running
"make syntax-check".  Other tests have simply been disabled via
the exclusion list (see local-checks-to-skip) in cfg.mk.
The next-to-last change-set adds gnulib-related infrastructure,
and the final one adds the sole, tiny use of a module, verify.h.

When adding gnulib support to a project, you, the owner, have to
decide: do you want to version-control all of the files (often
hundreds) that it imports?  At the extreme end, coreutils pulls in
over 2300 files.  libvirt pulls in a more reasonable 350 or so.  If
you version-control those files, it's a bit like version-controlling
the files pulled in via the programs run by autogen.sh -- except
that gnulib isn't ever "released" or "installed".  In general,
projects prefer *not* to version-control those files.  However, note
that the script to import gnulib-related files runs git clone ...
or uses an existing git-cloned directory.  This effectively adds git
as a prerequisite for building-from-source, but we already require
reasonable build tools in that case, so one more shouldn't hurt.

Personally, I keep an up-to-date copy of gnulib around
and run bootstrap like this:

    ./bootstrap --gnulib-srcdir=$HOME/w/co/gnulib

or just do this to clone it in a sibling directory:

    cd corosync
    (cd .. && git clone git://git.sv.gnu.org/gnulib.git)
    ./bootstrap --gnulib-srcdir=$PWD/..

Running bootstrap currently creates the following files
in two new directories: gnulib and build-aux:

  build-aux/useless-if-before-free
  build-aux/vc-list-files
  gnulib/lib
  gnulib/lib/dummy.c
  gnulib/lib/verify.h
  gnulib/lib/Makefile.am
  gnulib/m4
  gnulib/m4/manywarnings.m4
  gnulib/m4/00gnulib.m4
  gnulib/m4/warnings.m4
  gnulib/m4/gnulib-common.m4
  gnulib/m4/gnulib-comp.m4
  gnulib/m4/gnulib-tool.m4
  gnulib/m4/gnulib-cache.m4
  gnulib/tests
  gnulib/tests/test-vc-list-files-git.sh
  gnulib/tests/test-vc-list-files-cvs.sh
  gnulib/tests/Makefile.am

Then, when you run autogen.sh, it now adds the following
to build-aux rather than to the top-level directory:

  build-aux/config.sub
  build-aux/depcomp
  build-aux/install-sh
  build-aux/missing
  build-aux/config.guess

Actually, as I write this, I realize that I should simply
change autogen.sh either to invoke bootstrap, or to include
its code (adding theh --gnulib-srcdir option).  Then the
build-from-source procedure remains the same: "just run autogen.sh".

Anyhow, here come the patches.
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to