Commit Graph

9 Commits

Author SHA1 Message Date
Daniel P. Berrangé
56bd0665c7 build: import gnulib's syntax-check make rules
We're going to be eliminating autotools and gnulib, but we still wish to
have the 'make syntax-check' functionality.

This imports the minimal set of gnulib files required to keep this
working.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-10-09 13:36:29 +01:00
Jim Meyering
7bb22f58b8 make .gnulib a submodule
This makes it so we record (via a git submodule)
a snapshot of whatever version of gnulib we're using,
and none of gnulib sources are in the libvirt repository.
The result is that we have as much reproducibility as when
we version-controlled imported copies of the gnulib sources,
but without the hassle of the manual process we used when
syncing with upstream.

Note that when you clone libvirt, you get only the libvirt
repository, but when you first run ./bootstrap, it clones
gnulib (at the SHA1 recorded via the submodule), creating
the .gnulib/ hierarchy.  Then, the bootstrap script runs
gnulib-tool to populate gnulib/ with the files that make
up the selected modules.

Put the following in your ~/.gitconfig file.
[alias]
  syncsub = submodule foreach git pull origin master

The update procedure is simple:
  git syncsub
  ...build & test...
  git commit -m 'gnulib: sync submodule to latest' .gnulib

* .gitmodules: New file.
* .gnulib: Initialize.
* bootstrap: Set up to use the new submodule.
Stop using --no-vc-files.
Don't remove .gitignore files.
Don't use or create .cvsignore.
Diagnose an invalid --gnulib-srcdir=DIR argument.
* build-aux/vc-list-files: Delete file, now pulled from gnulib.
* build-aux/useless-if-before-free: Likewise.
* po/POTFILES.in: Remove gnulib/lib/gai_strerror.c, since
it no longer contains translatable strings.
* gnulib/*: Remove gnulib/ hierarchy.
2009-07-08 16:17:51 +02:00
Jim Meyering
57f15f779f update from gnulib
* build-aux/mktempd (rand_bytes, mktempd):
* build-aux/useless-if-before-free (FILE):
* build-aux/vc-list-files:
* gnulib/lib/.cvsignore:
* gnulib/lib/Makefile.am:
* gnulib/lib/poll.c (poll):
* gnulib/lib/stdbool.in.h (_GL_STDBOOL_H, true):
* gnulib/lib/stdio-impl.h (fp_, fp_ub):
* gnulib/lib/stdio.in.h (vasprintf, obstack_printf)
(obstack_vprintf):
* gnulib/lib/vasnprintf.c (_GNU_SOURCE, sprintf, IF_LINT, exp)
(remainder, scale10_round_decimal_long_double)
(scale10_round_decimal_double, pad_ourselves):
* gnulib/m4/gnulib-cache.m4:
* gnulib/m4/gnulib-common.m4 (gl_MODULE_INDICATOR):
* gnulib/m4/gnulib-tool.m4 (gl_LOCAL_DIR, gl_M4_BASE, gl_PO_BASE)
(gl_DOC_BASE, gl_TESTS_BASE, gl_WITH_TESTS, gl_LIB, gl_LGPL)
(gl_MAKEFILE_NAME, gl_MACRO_PREFIX, gl_PO_DOMAIN, gl_VC_FILES):
* gnulib/m4/lock.m4 (gl_LOCK_EARLY_BODY, gl_PREREQ_LOCK)
(gl_DISABLE_THREADS):
* gnulib/m4/onceonly.m4:
* gnulib/m4/posix-shell.m4 (gl_POSIX_SHELL):
* gnulib/m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS):
* gnulib/tests/test-getaddrinfo.c (ENABLE_DEBUGGING, dbgprintf)
(simple):
* gnulib/tests/test-stdint.c (UINTMAX_MAX, or):
* gnulib/tests/test-vc-list-files-cvs.sh (compare):
* gnulib/tests/test-vc-list-files-git.sh (compare):
2008-08-07 09:42:29 +00:00
Jim Meyering
82892f131b Prepare to use gnulib's c-type module.
* bootstrap: Move module list into separate variable w/less syntax.
(modules): Add c-ctype.
Update the following from gnulib:
* build-aux/useless-if-before-free:
* build-aux/vc-list-files:
* gnulib/lib/Makefile.am:
* gnulib/lib/getaddrinfo.h:
* gnulib/m4/gnulib-cache.m4:
* gnulib/m4/gnulib-comp.m4:
* gnulib/m4/inet_ntop.m4:
* gnulib/tests/Makefile.am:
* gnulib/tests/test-getaddrinfo.c:
2008-05-09 13:46:09 +00:00
Jim Meyering
07efaf941f update from gnulib, again
* gnulib/m4/onceonly.m4: New file.
* gnulib/m4/printf.m4: New file.
* build-aux/useless-if-before-free: Update.
* build-aux/vc-list-files: Update.
* gnulib/lib/arpa_inet.in.h: Update.
* gnulib/lib/stdio-impl.h: Update.
* gnulib/m4/inet_ntop.m4: Update.
2008-04-30 16:11:08 +00:00
Jim Meyering
130426c659 update from gnulib
* gnulib/lib/inet_ntop.h: Remove file.
* gnulib/m4/onceonly_2_57.m4: Remove file.
* build-aux/useless-if-before-free: Update.
* build-aux/vc-list-files: Update.
* gnulib/lib/.cvsignore: Update.
* gnulib/lib/Makefile.am: Update.
* gnulib/lib/fseeko.c: Update.
* gnulib/lib/getaddrinfo.c: Update.
* gnulib/lib/getdelim.c: Update.
* gnulib/lib/inet_ntop.c: Update.
* gnulib/lib/inet_ntop.h: Update.
* gnulib/lib/poll.c: Update.
* gnulib/lib/snprintf.c: Update.
* gnulib/lib/stdlib.in.h: Update.
* gnulib/lib/string.in.h: Update.
* gnulib/lib/sys_socket.in.h: Update.
* gnulib/lib/sys_stat.in.h: Update.
* gnulib/lib/vasnprintf.c: Update.
* gnulib/lib/vasprintf.c: Update.
* gnulib/lib/wchar.in.h: Update.
* gnulib/m4/arpa_inet_h.m4: Update.
* gnulib/m4/extensions.m4: Update.
* gnulib/m4/gnulib-common.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.
* gnulib/m4/include_next.m4: Update.
* gnulib/m4/inet_ntop.m4: Update.
* gnulib/m4/netinet_in_h.m4: Update.
* gnulib/m4/onceonly_2_57.m4: Update.
* gnulib/m4/physmem.m4: Update.
* gnulib/m4/snprintf.m4: Update.
* gnulib/m4/stdint.m4: Update.
* gnulib/m4/stdio_h.m4: Update.
* gnulib/m4/stdlib_h.m4: Update.
* gnulib/m4/string_h.m4: Update.
* gnulib/m4/strndup.m4: Update.
* gnulib/m4/sys_select_h.m4: Update.
* gnulib/m4/sys_socket_h.m4: Update.
* gnulib/m4/sys_stat_h.m4: Update.
* gnulib/m4/vasnprintf.m4: Update.
* gnulib/tests/Makefile.am: Update.
* gnulib/tests/test-fseeko.c: Update.
* gnulib/tests/test-getaddrinfo.c: Update.
* gnulib/tests/test-getdelim.c: Update.
* gnulib/tests/test-getline.c: Update.
* gnulib/tests/test-lseek.c: Update.
* gnulib/tests/test-snprintf.c: Update.
* gnulib/tests/test-sys_stat.c: Update.
* gnulib/tests/test-vasnprintf.c: Update.
* gnulib/tests/test-vasprintf.c: Update.
2008-04-29 19:52:26 +00:00
Jim Meyering
f15efcdf27 Add new testing framework and the first test to use it.
* tests/Makefile.am (test_scripts): Add vcpupin.
(EXTRA_DIST): Add test-lib.sh.
* tests/test-lib.sh: Testing framework, from coreutils.
* tests/vcpupin: New file.
* build-aux/mktempd: New file, from gnulib.
* bootstrap: Add posix-shell and mktempd to the list of imported modules.
* gnulib/m4/posix-shell.m4: New file, from gnulib.
2008-03-24 10:19:36 +00:00
Jim Meyering
26709f561f Pull useless-if-before-free from gnulib, and update.
* bootstrap (gnulib_tool): Add useless-if-before-free to
the list of modules.
* build-aux/useless-if-before-free: Update from gnulib.
* gnulib/lib/vasnprintf.c: Work around a bug in HPUX 10.20.
* gnulib/m4/vasnprintf.m4: Likewise.
2008-02-13 21:52:19 +00:00
Jim Meyering
e8ff93b4e6 Remove more useless if tests before "free"-like functions.
* build-aux/useless-if-before-free: Rename from ...
* build-aux/find-unnecessary-if-before-free: ... this.  Remove file.
Also changed it so that new names are no longer hard-coded in the
script.  Instead, they're supplied via options:
* Makefile.cfg (useless_free_options): Define.
Add xmlXPathFreeObject to the list of free-like functions it detects.
* Makefile.maint (sc_avoid_if_before_free): Reflect script renaming.
* .x-sc_avoid_if_before_free: Likewise.
* src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free.
* src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise.
* src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface):
(cmdDetachDisk): Likewise.
* src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise.
(xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise.
(xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface):
(xenXMDomainDetachDevice): Likewise.
* src/xml.c (virXPathString): Likewise.
* tests/xmlrpctest.c (checkRequestValue): Likewise.
2008-02-07 16:49:29 +00:00