]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: more fallout from test -a
authorEric Blake <eblake@redhat.com>
Wed, 31 Mar 2010 20:58:40 +0000 (14:58 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 31 Mar 2010 21:18:13 +0000 (15:18 -0600)
* cfg.mk (sc_prohibit_test_minus_ao): Also check for [.
* docs/Makefile.am (%.html, html/index.html): Avoid non-portable
test usage.
* libvirt.spec.in (%post): Likewise.
* tools/virt-pki-validate.in (servercert.pem): Likewise.
* configure.ac (LOGNAME): Use test, not [, in files processed by
autoconf.
Detected by Matthias Bolte.

cfg.mk
configure.ac
docs/Makefile.am
libvirt.spec.in
tools/virt-pki-validate.in

diff --git a/cfg.mk b/cfg.mk
index 45da56a513b2e9850f34c4ad5883b2a2133bca80..2e7b68ac500b478861600535c8bb45186b4f07c5 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -276,7 +276,7 @@ _m1 = use "test C1 && test C2", not "test C1 -''a C2"
 _m2 = use "test C1 || test C2", not "test C1 -''o C2"
 # Using test's -a and -o operators is not portable.
 sc_prohibit_test_minus_ao:
-       @re='\<test .+ -[ao] '                                          \
+       @re='(\<test| \[+) .+ -[ao] '                                   \
        msg='$(_m1); $(_m2)'                                            \
          $(_prohibit_regexp)
 
index 3c3d7b30fd48ae23a8c32acae9e6af015e695a87..e13961efa78cd8574ff58e1c905475a7c060c024 100644 (file)
@@ -240,7 +240,7 @@ AC_ARG_WITH([libvirtd],
 dnl
 dnl specific tests to setup DV devel environments with debug etc ...
 dnl
-if [[ "${LOGNAME}" = "veillard" && test "`pwd`" = "/u/veillard/libvirt" ]] ; then
+if test "${LOGNAME}" = "veillard" && test "`pwd`" = "/u/veillard/libvirt" ; then
     STATIC_BINARIES="-static"
 else
     STATIC_BINARIES=
index edf6fc8bf5a247c5386f79d8f7dc5e1298bc9e29..a18821bff51cf12798a3105c2a1e350fbee228b8 100644 (file)
@@ -106,7 +106,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
          $(XSLTPROC) --stringparam pagename $$name --nonet --html $(top_srcdir)/docs/site.xsl $< > $@ || (rm $@ && exit 1) ; fi )
 
 %.html: %.html.tmp
-       @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
+       @(if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
          if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
          echo "Validating $@" ; \
          $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \
@@ -117,8 +117,9 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
        -@(if [ -x $(XSLTPROC) ] ; then \
          echo "Rebuilding the HTML pages from the XML API" ; \
          $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
-       -@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
-         if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
+       -@(if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
+         if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" \
+           > /dev/null ; then \
          echo "Validating the resulting XHTML pages" ; \
          $(XMLLINT) --nonet --valid --noout html/*.html ; \
          else echo "missing XHTML1 DTD" ; fi ; fi );
index 6cadf8422ca8cd74575b69951c1b941a8882489f..21e311c0ed7e8e4dbb48c3a42afa8c6fc8c00f51 100644 (file)
@@ -629,7 +629,7 @@ getent passwd qemu >/dev/null || \
 # or on the first upgrade from a non-network aware libvirt only.
 # We check this by looking to see if the daemon is already installed
 /sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
-if [ $? != 0 -a ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ]
+if test $? != 0 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
 then
     UUID=`/usr/bin/uuidgen`
     sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
index b3fc986dcf429bb4c8bdad74b50d9d95df351a27..72ed9e5539e650313e1ddeb1a395a72c31a63913 100755 (executable)
@@ -203,7 +203,7 @@ then
            echo Server organization: $S_ORG
        fi
        S_HOST=`$CERTOOL -i --infile $LIBVIRT/servercert.pem | grep Subject: | sed 's+.*CN=\([a-zA-Z\. _-]*\)+\1+'`
-       if [ "$S_HOST" != "`hostname -s`" -a "$S_HOST" != "`hostname`" ]
+       if test "$S_HOST" != "`hostname -s`" && test "$S_HOST" != "`hostname`"
        then
            echo The server certificate does not seem to match the host name
            echo hostname: '"'`hostname`'"'