From e198455d64d468f1ff5012a9a592ff8dd4ce5426 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 2 Apr 2013 14:30:45 +0100 Subject: [PATCH] Detect if network is available. - libguestfs_buildnet macro no longer needed. --- libguestfs.spec | 65 ++++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 5472029..b4e5e94 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,15 +1,3 @@ -# If you have trouble building locally ('make local') try adding -# %libguestfs_buildnet 1 -# to your ~/.rpmmacros file. - -# Enable to build using a network repo -# Default is disabled -%if %{defined libguestfs_buildnet} -%global buildnet %{libguestfs_buildnet} -%else -%global buildnet 0 -%endif - # Enable to run tests during check # Default is enabled %if %{defined libguestfs_runtests} @@ -217,6 +205,7 @@ Requires: zfs-fuse # These are only required if you want to build the bindings for # different languages: +BuildRequires: /usr/bin/ping BuildRequires: perl-devel BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) >= 1.00 @@ -687,39 +676,39 @@ grep -Ev '\budev\b' < appliance/packagelist.in.orig > appliance/packagelist.in %build -%if %{buildnet} -%define extra %{nil} -%else -mkdir repo -find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 cp -t repo -createrepo repo -cat > yum.conf < yum.conf <