Improve network test.

Koji allows ping(!) but doesn't allow general network.  Improve the
test by trying to 'wget' the libguestfs home page (it's static, on a
reliable-ish public network, and should be available almost all the
time).
This commit is contained in:
Richard W.M. Jones 2013-04-02 19:13:43 +01:00
parent 08d4cf603d
commit a0d01d82a6

View File

@ -12,7 +12,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs Name: libguestfs
Epoch: 1 Epoch: 1
Version: 1.21.26 Version: 1.21.26
Release: 1%{?dist} Release: 2%{?dist}
License: LGPLv2+ License: LGPLv2+
# Source and patches. # Source and patches.
@ -62,6 +62,7 @@ BuildRequires: libldm-devel
BuildRequires: yajl-devel BuildRequires: yajl-devel
BuildRequires: bash-completion BuildRequires: bash-completion
BuildRequires: /usr/bin/ping BuildRequires: /usr/bin/ping
BuildRequires: /usr/bin/wget
BuildRequires: perl(Sys::Virt) BuildRequires: perl(Sys::Virt)
BuildRequires: /usr/bin/qemu-img BuildRequires: /usr/bin/qemu-img
BuildRequires: perl-devel BuildRequires: perl-devel
@ -542,7 +543,7 @@ grep -Ev '\budev\b' < appliance/packagelist.in.orig > appliance/packagelist.in
%build %build
# Test if network is available. # Test if network is available.
if ping -c 3 -w 20 8.8.8.8; then if ping -c 3 -w 20 8.8.8.8 && wget http://libguestfs.org -O /dev/null; then
extra= extra=
else else
mkdir repo mkdir repo
@ -882,7 +883,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog %changelog
* Tue Apr 2 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.26-1 * Tue Apr 2 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.26-2
- New upstream version 1.21.26. - New upstream version 1.21.26.
- Use ./configure --with-default-backend=.. instead of attach-method. - Use ./configure --with-default-backend=.. instead of attach-method.
- Remove Sys::Guestfs::Lib (removed upstream). - Remove Sys::Guestfs::Lib (removed upstream).