Remove all RHEL-specific hacks since I've now branched RHEL 7.

This commit is contained in:
Richard W.M. Jones 2012-12-18 09:53:38 +00:00
parent bab3fc58ad
commit 4c50db6dd8
1 changed files with 6 additions and 61 deletions

View File

@ -22,13 +22,13 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs Name: libguestfs
Epoch: 1 Epoch: 1
Version: 1.21.1 Version: 1.21.1
Release: 2%{?dist} Release: 3%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
URL: http://libguestfs.org/ URL: http://libguestfs.org/
Source0: http://libguestfs.org/download/1.21-development/%{name}-%{version}.tar.gz Source0: http://libguestfs.org/download/1.21-development/%{name}-%{version}.tar.gz
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 17
Patch1: ruby-1.9-vendor-not-site.patch Patch1: ruby-1.9-vendor-not-site.patch
BuildRequires: autoconf, automake, libtool, gettext-devel BuildRequires: autoconf, automake, libtool, gettext-devel
%endif %endif
@ -37,10 +37,6 @@ BuildRequires: autoconf, automake, libtool, gettext-devel
# on i386 only. This works around a bug in 32-bit qemu (RHBZ#857026). # on i386 only. This works around a bug in 32-bit qemu (RHBZ#857026).
Patch3: 0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch Patch3: 0001-i386-Add-noapic-flag-to-work-around-a-qemu-or-kernel.patch
%if 0%{?rhel} >= 7
ExclusiveArch: x86_64
%endif
# Basic build requirements: # Basic build requirements:
BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Simple)
BuildRequires: perl(Pod::Man) BuildRequires: perl(Pod::Man)
@ -74,21 +70,13 @@ BuildRequires: netpbm-progs
BuildRequires: icoutils BuildRequires: icoutils
BuildRequires: perl(XML::XPath) BuildRequires: perl(XML::XPath)
BuildRequires: perl(XML::XPath::XMLParser) BuildRequires: perl(XML::XPath::XMLParser)
%if !0%{?rhel}
BuildRequires: libvirt-daemon-qemu BuildRequires: libvirt-daemon-qemu
%else
BuildRequires: libvirt-daemon-kvm
%endif
%if !0%{?rhel}
BuildRequires: perl(Expect) BuildRequires: perl(Expect)
%endif
BuildRequires: lua BuildRequires: lua
BuildRequires: lua-devel BuildRequires: lua-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
%if !0%{?rhel}
BuildRequires: libldm-devel BuildRequires: libldm-devel
%endif
# This is only needed for RHEL 5 because readline-devel doesn't # This is only needed for RHEL 5 because readline-devel doesn't
# properly depend on it, but doesn't do any harm on other platforms: # properly depend on it, but doesn't do any harm on other platforms:
@ -120,20 +108,14 @@ BuildRequires: grep
#%endif #%endif
BuildRequires: gzip BuildRequires: gzip
%ifnarch %{arm} %ifnarch %{arm}
%if !0%{?rhel}
BuildRequires: hfsplus-tools BuildRequires: hfsplus-tools
%endif %endif
%endif
BuildRequires: iproute BuildRequires: iproute
BuildRequires: iputils BuildRequires: iputils
%if !0%{?rhel}
BuildRequires: jfsutils BuildRequires: jfsutils
%endif
BuildRequires: kernel BuildRequires: kernel
BuildRequires: kmod BuildRequires: kmod
%if !0%{?rhel}
BuildRequires: libldm BuildRequires: libldm
%endif
BuildRequires: libselinux BuildRequires: libselinux
BuildRequires: libxml2 BuildRequires: libxml2
BuildRequires: lsof BuildRequires: lsof
@ -141,20 +123,16 @@ BuildRequires: lsscsi
BuildRequires: lvm2 BuildRequires: lvm2
BuildRequires: lzop BuildRequires: lzop
BuildRequires: mdadm BuildRequires: mdadm
%if !0%{?rhel}
BuildRequires: nilfs-utils BuildRequires: nilfs-utils
BuildRequires: ntfs-3g BuildRequires: ntfs-3g
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
BuildRequires: ntfsprogs BuildRequires: ntfsprogs
%endif %endif
%endif
BuildRequires: openssh-clients BuildRequires: openssh-clients
BuildRequires: parted BuildRequires: parted
BuildRequires: procps BuildRequires: procps
BuildRequires: psmisc BuildRequires: psmisc
%if !0%{?rhel}
BuildRequires: reiserfs-utils BuildRequires: reiserfs-utils
%endif
BuildRequires: rsync BuildRequires: rsync
BuildRequires: scrub BuildRequires: scrub
BuildRequires: strace BuildRequires: strace
@ -166,15 +144,11 @@ BuildRequires: vim-minimal
BuildRequires: xfsprogs BuildRequires: xfsprogs
BuildRequires: xz BuildRequires: xz
BuildRequires: yajl BuildRequires: yajl
%if !0%{?rhel}
BuildRequires: zerofree BuildRequires: zerofree
%endif
# Not supported on ARM http://zfs-fuse.net/issues/94 # Not supported on ARM http://zfs-fuse.net/issues/94
%ifnarch %{arm} %ifnarch %{arm}
%if !0%{?rhel}
BuildRequires: zfs-fuse BuildRequires: zfs-fuse
%endif %endif
%endif
# Must match the above set of BuildRequires exactly! # Must match the above set of BuildRequires exactly!
Requires: acl Requires: acl
@ -201,20 +175,14 @@ Requires: grep
#%endif #%endif
Requires: gzip Requires: gzip
%ifnarch %{arm} %ifnarch %{arm}
%if !0%{?rhel}
Requires: hfsplus-tools Requires: hfsplus-tools
%endif %endif
%endif
Requires: iproute Requires: iproute
Requires: iputils Requires: iputils
%if !0%{?rhel}
Requires: jfsutils Requires: jfsutils
%endif
Requires: kernel Requires: kernel
Requires: kmod Requires: kmod
%if !0%{?rhel}
Requires: libldm Requires: libldm
%endif
Requires: libselinux Requires: libselinux
Requires: libxml2 Requires: libxml2
Requires: lsof Requires: lsof
@ -222,20 +190,16 @@ Requires: lsscsi
Requires: lvm2 Requires: lvm2
Requires: lzop Requires: lzop
Requires: mdadm Requires: mdadm
%if !0%{?rhel}
Requires: nilfs-utils Requires: nilfs-utils
Requires: ntfs-3g Requires: ntfs-3g
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
Requires: ntfsprogs Requires: ntfsprogs
%endif %endif
%endif
Requires: openssh-clients Requires: openssh-clients
Requires: parted Requires: parted
Requires: procps Requires: procps
Requires: psmisc Requires: psmisc
%if !0%{?rhel}
Requires: reiserfs-utils Requires: reiserfs-utils
%endif
Requires: rsync Requires: rsync
Requires: scrub Requires: scrub
Requires: strace Requires: strace
@ -247,15 +211,11 @@ Requires: vim-minimal
Requires: xfsprogs Requires: xfsprogs
Requires: xz Requires: xz
Requires: yajl Requires: yajl
%if !0%{?rhel}
Requires: zerofree Requires: zerofree
%endif
# Not supported on ARM http://zfs-fuse.net/issues/94 # Not supported on ARM http://zfs-fuse.net/issues/94
%ifnarch %{arm} %ifnarch %{arm}
%if !0%{?rhel}
Requires: zfs-fuse Requires: zfs-fuse
%endif %endif
%endif
# These are only required if you want to build the bindings for # These are only required if you want to build the bindings for
# different languages: # different languages:
@ -275,10 +235,8 @@ BuildRequires: java >= 1.5.0
BuildRequires: jpackage-utils BuildRequires: jpackage-utils
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: php-devel BuildRequires: php-devel
%if !0%{?rhel}
BuildRequires: erlang-erts BuildRequires: erlang-erts
BuildRequires: erlang-erl_interface BuildRequires: erlang-erl_interface
%endif
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gjs BuildRequires: gjs
@ -302,9 +260,7 @@ Requires: icoutils
Requires: fuse Requires: fuse
# For libvirt attach method. # For libvirt attach method.
%if !0%{?rhel}
Requires: libvirt-daemon-qemu >= 0.10.2-3 Requires: libvirt-daemon-qemu >= 0.10.2-3
%endif
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
Requires: libvirt-daemon-kvm >= 0.10.2-3 Requires: libvirt-daemon-kvm >= 0.10.2-3
%endif %endif
@ -644,7 +600,6 @@ Requires: php
php-%{name} contains PHP bindings for %{name}. php-%{name} contains PHP bindings for %{name}.
%if !0%{?rhel}
%package -n erlang-%{name} %package -n erlang-%{name}
Summary: Erlang bindings for %{name} Summary: Erlang bindings for %{name}
Group: Development/Libraries Group: Development/Libraries
@ -653,7 +608,6 @@ Requires: erlang-erts
%description -n erlang-%{name} %description -n erlang-%{name}
erlang-%{name} contains Erlang bindings for %{name}. erlang-%{name} contains Erlang bindings for %{name}.
%endif
%package -n lua-guestfs %package -n lua-guestfs
@ -720,7 +674,7 @@ if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
chcon --reference=/tmp tmp chcon --reference=/tmp tmp
fi fi
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 17
%patch1 -p1 %patch1 -p1
autoreconf -i autoreconf -i
%endif %endif
@ -808,16 +762,6 @@ export SKIP_TEST_CHARSET_FIDELITY=1
# Disable virt-format test (RHBZ#872831). # Disable virt-format test (RHBZ#872831).
export SKIP_TEST_VIRT_FORMAT_SH=1 export SKIP_TEST_VIRT_FORMAT_SH=1
%if 0%{?rhel}
# Workaround for libvirt/KVM RHBZ#878406
cat > qemu-wrapper.sh <<'EOF'
#!/bin/sh -
exec /usr/libexec/qemu-kvm -machine accel=tcg "$@"
EOF
chmod +x qemu-wrapper.sh
export LIBGUESTFS_QEMU=`pwd`/qemu-wrapper.sh
%endif
%if %{runtests} %if %{runtests}
make check -k make check -k
%endif %endif
@ -1035,7 +979,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%{_libdir}/php/modules/guestfs_php.so %{_libdir}/php/modules/guestfs_php.so
%if !0%{?rhel}
%files -n erlang-%{name} %files -n erlang-%{name}
%doc erlang/README %doc erlang/README
%doc erlang/examples/*.erl %doc erlang/examples/*.erl
@ -1043,7 +986,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%{_bindir}/erl-guestfs %{_bindir}/erl-guestfs
%{_libdir}/erlang/lib/%{name}-%{version} %{_libdir}/erlang/lib/%{name}-%{version}
%{_mandir}/man3/guestfs-erlang.3* %{_mandir}/man3/guestfs-erlang.3*
%endif
%files -n lua-guestfs %files -n lua-guestfs
@ -1078,6 +1020,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs
%changelog %changelog
* Mon Dec 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.1-3
- Remove all RHEL-specific hacks since I've now branched RHEL 7.
* Mon Dec 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.1-2 * Mon Dec 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.21.1-2
- New upstream version 1.21.1 (development branch). - New upstream version 1.21.1 (development branch).
- Fix source URL. - Fix source URL.