[libvirt] [PATCH] build: nuke all .x-sc* files

Eric Blake eblake at redhat.com
Wed Mar 16 22:52:01 UTC 2011


Not every day you see a patch that nukes 27 files!

* .gnulib: Update to latest, for maint.mk improvements
* bootstrap: Resync to gnulib.
* bootstrap.conf (ACLOCAL): Swap the secondary aclocal include
directory, now that bootstrap picks up gnulib/m4 instead of m4.
* Makefile.am (syntax_check_exceptions, EXTRA_DIST): No longer
worry about nuked files.
* cfg.mk (sc_x_sc_dist_check): Delete dead rule.
(VC_LIST_ALWAYS_EXCLUDE_REGEX): Add HACKING.
(exclude_file_name_regexp--sc_*): Inline and simplify contents...
* .x-sc_*: ...from here, then delete the files.
---

* .gnulib c2090a8...0baae9c (28):
  > maint.mk: allow fine-grained syntax-check exclusion via Make variables
  > ignore-value tests: Avoid warnings.
  > passfd: Fix link error on Solaris.
  > passfd: Fix link error on AIX 5.2.
  > passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
  > passfd: Fix compilation error on OpenBSD.
  > passfd test: Fix warnings.
  > passfd test: Fix warnings.
  > passfd module, part 4, tweaks.
  > passfd module, part 4.
  > Makefile: rely on GNU make; derive syntax-check rule names
  > passfd module, part 3.
  > passfd module, part 2, tweaks.
  > passfd module, part 2.
  > wcswidth, mbswidth: Avoid integer overflow.
  > Oops, fix last commit.
  > futimens, utimensat: Avoid endless recursion on Solaris 10.
  > maint.mk: relax a regexp to accommodate other formatting styles
  > maint.mk: suppress a syntax check false positive
  > wchar: add explicit dependencies, for Tru64
  > passfd module, part 1, tweaks.
  > passfd module, part 1.
  > regex-quote: New API.
  > regex-quote: Fix creation of POSIX extended regular expressions.
  > doc: Improve doc regarding autopoint vs. gnulib.
  > Update AC_OPENMP macro for Lahey compiler on GNU/Linux.
  > parse-duration: remove xalloc.h dependency
  > bootstrap: honor m4_base when running aclocal

 .gnulib                                 |    2 +-
 .x-sc_avoid_ctype_macros                |    1 -
 .x-sc_avoid_if_before_free              |    1 -
 .x-sc_avoid_write                       |    9 ----
 .x-sc_bindtextdomain                    |    2 -
 .x-sc_m4_quote_check                    |    1 -
 .x-sc_po_check                          |    1 -
 .x-sc_prohibit_HAVE_MBRTOWC             |    1 -
 .x-sc_prohibit_VIR_ERR_NO_MEMORY        |    5 --
 .x-sc_prohibit_always_true_header_tests |    4 --
 .x-sc_prohibit_asprintf                 |    5 --
 .x-sc_prohibit_close                    |    9 ----
 .x-sc_prohibit_empty_lines_at_EOF       |    5 --
 .x-sc_prohibit_fork_wrappers            |    8 ----
 .x-sc_prohibit_gethostby                |    2 -
 .x-sc_prohibit_gethostname              |    2 -
 .x-sc_prohibit_gettext_noop             |    2 -
 .x-sc_prohibit_have_config_h            |    1 -
 .x-sc_prohibit_nonreentrant             |   10 -----
 .x-sc_prohibit_readlink                 |    2 -
 .x-sc_prohibit_sprintf                  |    4 --
 .x-sc_prohibit_strncpy                  |    2 -
 .x-sc_prohibit_test_minus_ao            |    1 -
 .x-sc_prohibit_xmlGetProp               |    1 -
 .x-sc_require_config_h                  |    4 --
 .x-sc_require_config_h_first            |    1 -
 .x-sc_trailing_blank                    |    7 ---
 .x-sc_unmarked_diagnostics              |    2 -
 Makefile.am                             |   30 -------------
 bootstrap                               |    6 +-
 bootstrap.conf                          |    2 +-
 cfg.mk                                  |   68 ++++++++++++++++++++++++------
 32 files changed, 59 insertions(+), 142 deletions(-)
 delete mode 100644 .x-sc_avoid_ctype_macros
 delete mode 100644 .x-sc_avoid_if_before_free
 delete mode 100644 .x-sc_avoid_write
 delete mode 100644 .x-sc_bindtextdomain
 delete mode 100644 .x-sc_m4_quote_check
 delete mode 100644 .x-sc_po_check
 delete mode 100644 .x-sc_prohibit_HAVE_MBRTOWC
 delete mode 100644 .x-sc_prohibit_VIR_ERR_NO_MEMORY
 delete mode 100644 .x-sc_prohibit_always_true_header_tests
 delete mode 100644 .x-sc_prohibit_asprintf
 delete mode 100644 .x-sc_prohibit_close
 delete mode 100644 .x-sc_prohibit_empty_lines_at_EOF
 delete mode 100644 .x-sc_prohibit_fork_wrappers
 delete mode 100644 .x-sc_prohibit_gethostby
 delete mode 100644 .x-sc_prohibit_gethostname
 delete mode 100644 .x-sc_prohibit_gettext_noop
 delete mode 100644 .x-sc_prohibit_have_config_h
 delete mode 100644 .x-sc_prohibit_nonreentrant
 delete mode 100644 .x-sc_prohibit_readlink
 delete mode 100644 .x-sc_prohibit_sprintf
 delete mode 100644 .x-sc_prohibit_strncpy
 delete mode 100644 .x-sc_prohibit_test_minus_ao
 delete mode 100644 .x-sc_prohibit_xmlGetProp
 delete mode 100644 .x-sc_require_config_h
 delete mode 100644 .x-sc_require_config_h_first
 delete mode 100644 .x-sc_trailing_blank
 delete mode 100644 .x-sc_unmarked_diagnostics

diff --git a/.gnulib b/.gnulib
index c2090a8..0baae9c 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit c2090a84dc3997acada3166772afac94f2d3a25c
+Subproject commit 0baae9cadd08c9704e3c704dd69fb75640293e9d
diff --git a/.x-sc_avoid_ctype_macros b/.x-sc_avoid_ctype_macros
deleted file mode 100644
index 06e95c1..0000000
--- a/.x-sc_avoid_ctype_macros
+++ /dev/null
@@ -1 +0,0 @@
-^gnulib/.*
diff --git a/.x-sc_avoid_if_before_free b/.x-sc_avoid_if_before_free
deleted file mode 100644
index 7e6ce62..0000000
--- a/.x-sc_avoid_if_before_free
+++ /dev/null
@@ -1 +0,0 @@
-^ChangeLog
diff --git a/.x-sc_avoid_write b/.x-sc_avoid_write
deleted file mode 100644
index f6fc1b2..0000000
--- a/.x-sc_avoid_write
+++ /dev/null
@@ -1,9 +0,0 @@
-^src/libvirt\.c$
-^src/fdstream\.c$
-^src/qemu/qemu_monitor\.c$
-^src/util/command\.c$
-^src/util/util\.c$
-^src/xen/xend_internal\.c$
-^daemon/libvirtd.c$
-^gnulib/
-^tools/console.c$
diff --git a/.x-sc_bindtextdomain b/.x-sc_bindtextdomain
deleted file mode 100644
index 08acb01..0000000
--- a/.x-sc_bindtextdomain
+++ /dev/null
@@ -1,2 +0,0 @@
-^tests/.*
-^examples/.*
diff --git a/.x-sc_m4_quote_check b/.x-sc_m4_quote_check
deleted file mode 100644
index 10dfa97..0000000
--- a/.x-sc_m4_quote_check
+++ /dev/null
@@ -1 +0,0 @@
-^gnulib/m4/intl\.m4$
diff --git a/.x-sc_po_check b/.x-sc_po_check
deleted file mode 100644
index d2fc2f2..0000000
--- a/.x-sc_po_check
+++ /dev/null
@@ -1 +0,0 @@
-^docs/
diff --git a/.x-sc_prohibit_HAVE_MBRTOWC b/.x-sc_prohibit_HAVE_MBRTOWC
deleted file mode 100644
index 36775da..0000000
--- a/.x-sc_prohibit_HAVE_MBRTOWC
+++ /dev/null
@@ -1 +0,0 @@
-gnulib/.*
diff --git a/.x-sc_prohibit_VIR_ERR_NO_MEMORY b/.x-sc_prohibit_VIR_ERR_NO_MEMORY
deleted file mode 100644
index 5c96e83..0000000
--- a/.x-sc_prohibit_VIR_ERR_NO_MEMORY
+++ /dev/null
@@ -1,5 +0,0 @@
-^ChangeLog$
-^ChangeLog-old$
-^include/libvirt/virterror\.h$
-^daemon/dispatch\.c$
-^src/util/virterror\.c$
diff --git a/.x-sc_prohibit_always_true_header_tests b/.x-sc_prohibit_always_true_header_tests
deleted file mode 100644
index ff753ce..0000000
--- a/.x-sc_prohibit_always_true_header_tests
+++ /dev/null
@@ -1,4 +0,0 @@
-ChangeLog*
-docs/news.html.in
-python/libvirt-override.c
-python/typewrappers.c
diff --git a/.x-sc_prohibit_asprintf b/.x-sc_prohibit_asprintf
deleted file mode 100644
index d03b947..0000000
--- a/.x-sc_prohibit_asprintf
+++ /dev/null
@@ -1,5 +0,0 @@
-ChangeLog
-^bootstrap.conf$
-^gnulib/
-^po/
-^src/util/util.c$
diff --git a/.x-sc_prohibit_close b/.x-sc_prohibit_close
deleted file mode 100644
index ab14617..0000000
--- a/.x-sc_prohibit_close
+++ /dev/null
@@ -1,9 +0,0 @@
-# Non-C files:
-^docs/.*
-^ChangeLog*
-^HACKING$
-*\.py$
-# Wrapper implementation:
-^src/util/files\.c$
-# Only uses close in documentation comments:
-^src/libvirt\.c$
diff --git a/.x-sc_prohibit_empty_lines_at_EOF b/.x-sc_prohibit_empty_lines_at_EOF
deleted file mode 100644
index 2e9aa63..0000000
--- a/.x-sc_prohibit_empty_lines_at_EOF
+++ /dev/null
@@ -1,5 +0,0 @@
-^docs/api_extension/.*
-^tests/qemuhelpdata/.*
-*.gif$
-*.ico$
-*.png$
diff --git a/.x-sc_prohibit_fork_wrappers b/.x-sc_prohibit_fork_wrappers
deleted file mode 100644
index 7f8fc6c..0000000
--- a/.x-sc_prohibit_fork_wrappers
+++ /dev/null
@@ -1,8 +0,0 @@
-^docs/.*
-^HACKING$
-^src/util/util\.c$
-^tests/testutils\.c$
-# Files that we may want to convert over to virCommand someday...
-^daemon/libvirtd\.c$
-^src/libvirt\.c$
-^src/lxc/lxc_controller\.c$
diff --git a/.x-sc_prohibit_gethostby b/.x-sc_prohibit_gethostby
deleted file mode 100644
index 7c052f4..0000000
--- a/.x-sc_prohibit_gethostby
+++ /dev/null
@@ -1,2 +0,0 @@
-^gnulib/lib/getaddrinfo\.c$
-^gnulib/m4/
diff --git a/.x-sc_prohibit_gethostname b/.x-sc_prohibit_gethostname
deleted file mode 100644
index e7acb03..0000000
--- a/.x-sc_prohibit_gethostname
+++ /dev/null
@@ -1,2 +0,0 @@
-^src/util/util\.c$
-^ChangeLog-old$
diff --git a/.x-sc_prohibit_gettext_noop b/.x-sc_prohibit_gettext_noop
deleted file mode 100644
index c40474e..0000000
--- a/.x-sc_prohibit_gettext_noop
+++ /dev/null
@@ -1,2 +0,0 @@
-ChangeLog*
-docs/news.html.in
diff --git a/.x-sc_prohibit_have_config_h b/.x-sc_prohibit_have_config_h
deleted file mode 100644
index f106267..0000000
--- a/.x-sc_prohibit_have_config_h
+++ /dev/null
@@ -1 +0,0 @@
-^gnulib/lib/strsep\.c$
diff --git a/.x-sc_prohibit_nonreentrant b/.x-sc_prohibit_nonreentrant
deleted file mode 100644
index 0ab2f5d..0000000
--- a/.x-sc_prohibit_nonreentrant
+++ /dev/null
@@ -1,10 +0,0 @@
-^gnulib/
-^po/
-^ChangeLog$
-^ChangeLog-old$
-^Makefile*
-^docs/
-^tests/
-^tools/virsh\.c$
-^tools/console\.c$
-^build-aux/
diff --git a/.x-sc_prohibit_readlink b/.x-sc_prohibit_readlink
deleted file mode 100644
index e7acb03..0000000
--- a/.x-sc_prohibit_readlink
+++ /dev/null
@@ -1,2 +0,0 @@
-^src/util/util\.c$
-^ChangeLog-old$
diff --git a/.x-sc_prohibit_sprintf b/.x-sc_prohibit_sprintf
deleted file mode 100644
index a67f51c..0000000
--- a/.x-sc_prohibit_sprintf
+++ /dev/null
@@ -1,4 +0,0 @@
-^docs/
-^po/
-^ChangeLog
-^HACKING
diff --git a/.x-sc_prohibit_strncpy b/.x-sc_prohibit_strncpy
deleted file mode 100644
index 173d233..0000000
--- a/.x-sc_prohibit_strncpy
+++ /dev/null
@@ -1,2 +0,0 @@
-^src/util/util\.c$
-^tools/virsh\.c$
diff --git a/.x-sc_prohibit_test_minus_ao b/.x-sc_prohibit_test_minus_ao
deleted file mode 100644
index 3939616..0000000
--- a/.x-sc_prohibit_test_minus_ao
+++ /dev/null
@@ -1 +0,0 @@
-docs/news.html.in
diff --git a/.x-sc_prohibit_xmlGetProp b/.x-sc_prohibit_xmlGetProp
deleted file mode 100644
index f6d7ee2..0000000
--- a/.x-sc_prohibit_xmlGetProp
+++ /dev/null
@@ -1 +0,0 @@
-^src/util/xml.c$
diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
deleted file mode 100644
index a530ae0..0000000
--- a/.x-sc_require_config_h
+++ /dev/null
@@ -1,4 +0,0 @@
-^examples/
-^gnulib/lib/dummy\.c$
-^gnulib/tests/dummy\.c$
-^ChangeLog$
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
deleted file mode 100644
index 0390cd4..0000000
--- a/.x-sc_require_config_h_first
+++ /dev/null
@@ -1 +0,0 @@
-^examples/
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank
deleted file mode 100644
index de3369e..0000000
--- a/.x-sc_trailing_blank
+++ /dev/null
@@ -1,7 +0,0 @@
-\.fig$
-\.gif$
-\.ico$
-\.png$
-^ChangeLog$
-^NEWS$
-^docs/.*
diff --git a/.x-sc_unmarked_diagnostics b/.x-sc_unmarked_diagnostics
deleted file mode 100644
index 4135cc7..0000000
--- a/.x-sc_unmarked_diagnostics
+++ /dev/null
@@ -1,2 +0,0 @@
-docs/apibuild.py
-tests/virt-aa-helper-test
diff --git a/Makefile.am b/Makefile.am
index 882e676..0b4ae9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,35 +14,6 @@ XML_EXAMPLES = \
   $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
 					test/*.xml storage/*.xml)))

-syntax_check_exceptions = \
-  .x-sc_avoid_ctype_macros \
-  .x-sc_avoid_if_before_free \
-  .x-sc_avoid_write \
-  .x-sc_bindtextdomain \
-  .x-sc_m4_quote_check \
-  .x-sc_po_check \
-  .x-sc_prohibit_always_true_header_tests \
-  .x-sc_prohibit_asprintf \
-  .x-sc_prohibit_close \
-  .x-sc_prohibit_empty_lines_at_EOF \
-  .x-sc_prohibit_fork_wrappers \
-  .x-sc_prohibit_gethostby \
-  .x-sc_prohibit_gethostname \
-  .x-sc_prohibit_gettext_noop \
-  .x-sc_prohibit_have_config_h \
-  .x-sc_prohibit_HAVE_MBRTOWC \
-  .x-sc_prohibit_nonreentrant \
-  .x-sc_prohibit_readlink \
-  .x-sc_prohibit_sprintf \
-  .x-sc_prohibit_strncpy \
-  .x-sc_prohibit_test_minus_ao \
-  .x-sc_prohibit_VIR_ERR_NO_MEMORY \
-  .x-sc_prohibit_xmlGetProp \
-  .x-sc_require_config_h \
-  .x-sc_require_config_h_first \
-  .x-sc_trailing_blank \
-  .x-sc_unmarked_diagnostics
-
 EXTRA_DIST = \
   ChangeLog-old \
   libvirt.spec libvirt.spec.in \
@@ -53,7 +24,6 @@ EXTRA_DIST = \
   autogen.sh \
   cfg.mk \
   examples/domain-events/events-python \
-  $(syntax_check_exceptions) \
   $(XML_EXAMPLES)

 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/bootstrap b/bootstrap
index e9ec11e..f004ad3 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2011-01-21.16; # UTC
+scriptversion=2011-03-03.12; # UTC

 # Bootstrap this package from checked-out sources.

@@ -874,7 +874,7 @@ grep -E '^[	 ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||

 for command in \
   libtool \
-  "${ACLOCAL-aclocal} --force -I m4 $ACLOCAL_FLAGS" \
+  "${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
   "${AUTOCONF-autoconf} --force" \
   "${AUTOHEADER-autoheader} --force" \
   "${AUTOMAKE-automake} --add-missing --copy --force-missing"
@@ -885,7 +885,7 @@ do
     command="${LIBTOOLIZE-libtoolize} -c -f"
   fi
   echo "$0: $command ..."
-  $command || exit
+  eval "$command" || exit
 done


diff --git a/bootstrap.conf b/bootstrap.conf
index a9d4ba4..6070204 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -145,7 +145,7 @@ gnulib_tool_option_extras="\

 # Convince bootstrap to use multiple m4 directories.
 : ${ACLOCAL=aclocal}
-ACLOCAL="$ACLOCAL -I gnulib/m4"
+ACLOCAL="$ACLOCAL -I m4"
 export ACLOCAL

 # Build prerequisites
diff --git a/cfg.mk b/cfg.mk
index c12f199..f5c7ed0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -66,7 +66,7 @@ local-checks-to-skip =			\
   sc_useless_cpp_parens

 # Files that should never cause syntax check failures.
-VC_LIST_ALWAYS_EXCLUDE_REGEX = ^docs/news.html.in$$
+VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(HACKING|docs/news\.html\.in)$$

 # Functions like free() that are no-ops on NULL arguments.
 useless_free_options =				\
@@ -481,19 +481,6 @@ sc_prohibit_gettext_markup:
 	halt='do not mark these strings for translation'		\
 	  $(_sc_search_regexp)

-# Ensure that the syntax_check_exceptions file list in Makefile.am
-# stays in sync with corresponding files in the repository.
-sce = syntax_check_exceptions
-sc_x_sc_dist_check:
-	@test "$$( ($(VC_LIST) | sed -n '/\.x-sc_/p'			\
-		     | sed 's|^$(_dot_escaped_srcdir)/||';		\
-		   sed -n '/^$(sce) =[	 ]*\\$$/,/[^\]$$/p'		\
-		     $(srcdir)/Makefile.am				\
-		       | sed 's/^  *//;/^$(sce) =/d'			\
-		       | tr -s '\012\\' '  ' | fmt -1			\
-		   ) | sort | uniq -u)"					\
-	  && { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
-
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null

@@ -550,3 +537,56 @@ _makefile_at_at_check_exceptions = ' && !/(SCHEMA|SYSCONF)DIR/'

 # regenerate HACKING as part of the syntax-check
 syntax-check: $(top_srcdir)/HACKING
+
+# List all syntax-check exemptions:
+_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal
+exclude_file_name_regexp--sc_avoid_write = \
+  ^(src/($(_src1))|daemon/libvirtd|tools/console)\.c$$
+
+exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
+
+exclude_file_name_regexp--sc_po_check = ^docs/
+
+exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
+  ^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virterror\.c)$$
+
+exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
+  (^docs|^python/(libvirt-override|typewrappers)\.c$$)
+
+exclude_file_name_regexp--sc_prohibit_asprintf = \
+  ^(bootstrap.conf$$|po/|src/util/util\.c$$)
+
+exclude_file_name_regexp--sc_prohibit_close = \
+  (\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c)$$)
+
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
+  (^docs/api_extension/|^tests/qemuhelpdata/|\.(gif|ico|png)$$)
+
+_src2=src/(util/util|libvirt|lxc/lxc_controller)
+exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
+  (^docs|^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
+
+exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/util\.c$$
+
+exclude_file_name_regexp--sc_prohibit_gettext_noop = ^docs/
+
+exclude_file_name_regexp--sc_prohibit_nonreentrant = \
+  ^((po|docs|tests)/|tools/(virsh|console)\.c$$)
+
+exclude_file_name_regexp--sc_prohibit_readlink = ^src/util/util\.c$$
+
+exclude_file_name_regexp--sc_prohibit_sprintf = ^(docs/|HACKING$$)
+
+exclude_file_name_regexp--sc_prohibit_strncpy = \
+  ^(src/util/util|tools/virsh)\.c$$
+
+exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
+
+exclude_file_name_regexp--sc_require_config_h = ^examples/
+
+exclude_file_name_regexp--sc_require_config_h_first = ^examples/
+
+exclude_file_name_regexp--sc_trailing_blank = (^docs/|\.(fig|gif|ico|png)$$)
+
+exclude_file_name_regexp--sc_unmarked_diagnostics = \
+  ^(docs/apibuild.py|tests/virt-aa-helper-test)$$
-- 
1.7.4




More information about the libvir-list mailing list