[dracut/f15] fixed rhel/fedora version checks

Harald Hoyer harald at fedoraproject.org
Mon Aug 29 10:55:21 UTC 2011


commit bb087efa97740a7560d51525b83e327b30abfdf0
Author: Harald Hoyer <harald at redhat.com>
Date:   Mon Aug 29 12:54:26 2011 +0200

    fixed rhel/fedora version checks

 dracut.spec |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/dracut.spec b/dracut.spec
index 610850e..34f111d 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -8,10 +8,10 @@
 
 Name: dracut
 Version: 009
-Release: 12%{?dist}
+Release: 13%{?dist}
 
 Summary: Initramfs generator using udev
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 Group: System Environment/Base          
 %endif
 %if 0%{?suse_version}
@@ -58,14 +58,14 @@ Patch35: 0035-iscsi-find-iscsi-kernel-modules-by-symbol-names.patch
 
 BuildArch: noarch
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %endif
 %if 0%{?suse_version}
 BuildRoot: %{_tmppath}/%{name}-%{version}-build
 %endif
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 BuildRequires: docbook-style-xsl docbook-dtds libxslt
 %endif
 
@@ -106,7 +106,7 @@ Requires: sed
 Requires: tar
 Requires: udev
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 Requires: util-linux >= 2.16
 Requires: initscripts >= 8.63-1
 Requires: plymouth >= 0.8.0-0.2009.29.09.19.1
@@ -134,7 +134,7 @@ Requires: nbd
 Requires: iproute
 Requires: bridge-utils
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 Requires: iscsi-initiator-utils
 Requires: nfs-utils 
 Requires: dhclient
@@ -152,7 +152,7 @@ Provides:  dracut-generic = %{version}-%{release}
 This package requires everything which is needed to build a generic
 all purpose initramfs with network support with dracut.
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 %package fips
 Summary: Dracut modules to build a dracut initramfs with an integrity check
 Requires: %{name} = %{version}-%{release}
@@ -228,7 +228,7 @@ This package contains tools to assemble the local initrd and host configuration.
 make WITH_SWITCH_ROOT=0%{?with_switch_root}
 
 %install
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 rm -rf $RPM_BUILD_ROOT
 %endif
 make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
@@ -236,7 +236,7 @@ make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
 
 echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
 
-%if 0%{?fedora} == 0
+%if 0%{?fedora} == 0 && 0%{?rhel} == 0
 rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips
 %endif
 
@@ -249,7 +249,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
 touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
 mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf
 install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/40-fips.conf
 %endif
@@ -285,7 +285,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/dracut/dracut-functions
 %{_datadir}/dracut/dracut-logger
 %config(noreplace) /etc/dracut.conf
-%if 0%{?fedora} || 0%{?suse_version}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} > 6
 %config(noreplace) /etc/dracut.conf.d/01-dist.conf
 %endif
 %dir /etc/dracut.conf.d
@@ -335,7 +335,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/dracut/modules.d/45ifcfg
 %{_datadir}/dracut/modules.d/95znet
 
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 6
 %files fips
 %defattr(-,root,root,0755)
 %{_datadir}/dracut/modules.d/01fips
@@ -357,6 +357,9 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/lib/dracut/overlay
 
 %changelog
+* Mon Aug 29 2011 Harald Hoyer <harald at redhat.com> 009-13
+- fixed rhel/fedora version checks
+
 * Mon Jul 18 2011 Harald Hoyer <harald at redhat.com> 009-12
 - fixed logrotate
 Resolves: rhbz#722794


More information about the scm-commits mailing list