dracut.spec: fixed rhel/fedora version checks
parent
1073b9f93a
commit
82dfee9960
22
dracut.spec
22
dracut.spec
|
|
@ -11,7 +11,7 @@ Version: xxx
|
|||
Release: xxx
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora}
|
||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||
Group: System Environment/Base
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
|
|
@ -25,14 +25,14 @@ Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar
|
|||
|
||||
BuildArch: noarch
|
||||
BuildRequires: dash bash
|
||||
%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
|
||||
|
||||
|
|
@ -73,7 +73,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
|
||||
|
|
@ -101,7 +101,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
|
||||
|
|
@ -119,7 +119,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}
|
||||
|
|
@ -160,7 +160,7 @@ This package contains tools to assemble the local initrd and host configuration.
|
|||
make
|
||||
|
||||
%install
|
||||
%if 0%{?fedora}
|
||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
|
||||
|
|
@ -168,7 +168,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
|
||||
|
||||
|
|
@ -181,7 +181,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
|
||||
|
|
@ -214,7 +214,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 /etc/dracut.conf.d/01-dist.conf
|
||||
%endif
|
||||
%dir /etc/dracut.conf.d
|
||||
|
|
@ -271,7 +271,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue