Blame 0019-dracut.spec-fixed-rhel-fedora-version-checks.patch

Harald Hoyer 55891e
From 82dfee9960e6285bd2811c406f4b9347dcf4e733 Mon Sep 17 00:00:00 2001
Harald Hoyer 55891e
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 55891e
Date: Mon, 29 Aug 2011 13:11:49 +0200
Harald Hoyer 55891e
Subject: [PATCH] dracut.spec: fixed rhel/fedora version checks
Harald Hoyer 55891e
Harald Hoyer 55891e
---
Harald Hoyer 55891e
 dracut.spec |   22 +++++++++++-----------
Harald Hoyer 55891e
 1 files changed, 11 insertions(+), 11 deletions(-)
Harald Hoyer 55891e
Harald Hoyer 55891e
diff --git a/dracut.spec b/dracut.spec
Harald Hoyer 55891e
index 4a71942..76f4fe1 100644
Harald Hoyer 55891e
--- a/dracut.spec
Harald Hoyer 55891e
+++ b/dracut.spec
Harald Hoyer 55891e
@@ -11,7 +11,7 @@ Version: xxx
Harald Hoyer 55891e
 Release: xxx
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 Summary: Initramfs generator using udev
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 Group: System Environment/Base
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 %if 0%{?suse_version}
Harald Hoyer 55891e
@@ -25,14 +25,14 @@ Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 BuildArch: noarch
Harald Hoyer 55891e
 BuildRequires: dash bash
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 %if 0%{?suse_version}
Harald Hoyer 55891e
 BuildRoot: %{_tmppath}/%{name}-%{version}-build
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 BuildRequires: docbook-style-xsl docbook-dtds libxslt
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 
Harald Hoyer 55891e
@@ -73,7 +73,7 @@ Requires: sed
Harald Hoyer 55891e
 Requires: tar
Harald Hoyer 55891e
 Requires: udev
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 Requires: util-linux >= 2.16
Harald Hoyer 55891e
 Requires: initscripts >= 8.63-1
Harald Hoyer 55891e
 Requires: plymouth >= 0.8.0-0.2009.29.09.19.1
Harald Hoyer 55891e
@@ -101,7 +101,7 @@ Requires: nbd
Harald Hoyer 55891e
 Requires: iproute
Harald Hoyer 55891e
 Requires: bridge-utils
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 Requires: iscsi-initiator-utils
Harald Hoyer 55891e
 Requires: nfs-utils
Harald Hoyer 55891e
 Requires: dhclient
Harald Hoyer 55891e
@@ -119,7 +119,7 @@ Provides:  dracut-generic = %{version}-%{release}
Harald Hoyer 55891e
 This package requires everything which is needed to build a generic
Harald Hoyer 55891e
 all purpose initramfs with network support with dracut.
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 %package fips
Harald Hoyer 55891e
 Summary: Dracut modules to build a dracut initramfs with an integrity check
Harald Hoyer 55891e
 Requires: %{name} = %{version}-%{release}
Harald Hoyer 55891e
@@ -160,7 +160,7 @@ This package contains tools to assemble the local initrd and host configuration.
Harald Hoyer 55891e
 make
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 %install
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 rm -rf $RPM_BUILD_ROOT
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
Harald Hoyer 55891e
@@ -168,7 +168,7 @@ make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora} == 0
Harald Hoyer 55891e
+%if 0%{?fedora} == 0 && 0%{?rhel} == 0
Harald Hoyer 55891e
 rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 
Harald Hoyer 55891e
@@ -181,7 +181,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
Harald Hoyer 55891e
 touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
Harald Hoyer 55891e
 mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf
Harald Hoyer 55891e
 install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/40-fips.conf
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
@@ -214,7 +214,7 @@ rm -rf $RPM_BUILD_ROOT
Harald Hoyer 55891e
 %{_datadir}/dracut/dracut-functions
Harald Hoyer 55891e
 %{_datadir}/dracut/dracut-logger
Harald Hoyer 55891e
 %config(noreplace) /etc/dracut.conf
Harald Hoyer 55891e
-%if 0%{?fedora} || 0%{?suse_version}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} > 6
Harald Hoyer 55891e
 %config /etc/dracut.conf.d/01-dist.conf
Harald Hoyer 55891e
 %endif
Harald Hoyer 55891e
 %dir /etc/dracut.conf.d
Harald Hoyer 55891e
@@ -271,7 +271,7 @@ rm -rf $RPM_BUILD_ROOT
Harald Hoyer 55891e
 %{_datadir}/dracut/modules.d/45ifcfg
Harald Hoyer 55891e
 %{_datadir}/dracut/modules.d/95znet
Harald Hoyer 55891e
 
Harald Hoyer 55891e
-%if 0%{?fedora}
Harald Hoyer 55891e
+%if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 55891e
 %files fips
Harald Hoyer 55891e
 %defattr(-,root,root,0755)
Harald Hoyer 55891e
 %{_datadir}/dracut/modules.d/01fips