Release: xxx
Summary: Initramfs generator using udev
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
Group: System Environment/Base
%endif
%if 0%{?suse_version}
BuildArch: noarch
BuildRequires: dash bash git
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif
%if 0%{?suse_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
BuildRequires: docbook-style-xsl docbook-dtds libxslt
%endif
BuildRequires: docbook-xsl-stylesheets libxslt
%endif
-%if 0%{?fedora} > 12 || 0%{?rhel} >= 6
+%if 0%{?fedora} > 12 || 0%{?rhel}
# no "provides", because dracut does not offer
# all functionality of the obsoleted packages
Obsoletes: mkinitrd <= 6.0.93
Requires: module-init-tools >= 3.7-9
Requires: sed
Requires: udev
+%if 0%{?fedora} || 0%{?rhel} > 6
Requires: util-linux >= 2.20
+%else
+Requires: util-linux-ng >= 2.17.2
+%endif
%if 0%{?fedora} || 0%{?rhel} > 6
Conflicts: initscripts < 8.63-1
This package requires everything which is needed to build a generic
all purpose initramfs with network support with dracut.
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel} >= 6
%package fips
Summary: Dracut modules to build a dracut initramfs with an integrity check
Requires: %{name} = %{version}-%{release}
%description fips-aesni
This package requires everything which is needed to build an
-all purpose initramfs with dracut, which does an integrity check
+all purpose initramfs with dracut, which does an integrity check
and adds the aesni-intel kernel module.
%package caps
make
%install
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
rm -rf $RPM_BUILD_ROOT
%endif
make install DESTDIR=$RPM_BUILD_ROOT \
libdir=%{_prefix}/lib \
bindir=%{_bindir} \
- sysconfdir=/etc mandir=%{_mandir} \
- systemdsystemunitdir=%{_unitdir}
+%if %{defined _unitdir}
+ systemdsystemunitdir=%{_unitdir} \
+%endif
+ sysconfdir=/etc mandir=%{_mandir}
echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/10rpmversion/dracut-version
touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
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
%{dracutlibdir}/dracut-logger.sh
%{dracutlibdir}/dracut-initramfs-restore
%config(noreplace) /etc/dracut.conf
-%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%config /etc/dracut.conf.d/01-dist.conf
%endif
%dir /etc/dracut.conf.d
%config(noreplace) /etc/logrotate.d/dracut_log
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%dir %{_sharedstatedir}/initramfs
-%if 0%{?fedora} > 16 || 0%{?rhel} > 6
+%if %{defined _unitdir}
%{_unitdir}/*.service
%{_unitdir}/*/*.service
%endif
%{dracutlibdir}/modules.d/45ifcfg
%{dracutlibdir}/modules.d/95znet
-%if 0%{?fedora} || 0%{?rhel} > 6
+%if 0%{?fedora} || 0%{?rhel}
%files fips
%defattr(-,root,root,0755)
%{dracutlibdir}/modules.d/01fips