Blob Blame History Raw
From 1f50d5b86d3c9b5c212a9d2201483a1bddb19013 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Mon, 19 Mar 2018 13:02:24 +0100
Subject: [PATCH] spec: merge fips subpackages to main package

---
 dracut.spec | 53 ++++++++++++-----------------------------------------
 1 file changed, 12 insertions(+), 41 deletions(-)

diff --git a/dracut.spec b/dracut.spec
index 9c2fc9d4..5a31a1f3 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -88,6 +88,12 @@ Requires: udev > 166
 Requires: util-linux-ng >= 2.21
 %endif
 
+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
+Requires: hmaccalc
+Requires: nss
+Requires: nss-softokn-freebl
+%endif
+
 %description
 dracut contains tools to create bootable initramfses for the Linux
 kernel. Unlike previous implementations, dracut hard-codes as little
@@ -117,27 +123,6 @@ 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} || 0%{?rhel} || 0%{?suse_version}
-%package fips
-Summary: dracut modules to build a dracut initramfs with an integrity check
-Requires: %{name} = %{version}-%{release}
-Requires: hmaccalc
-Requires: nss
-Requires: nss-softokn-freebl
-
-%description fips
-This package requires everything which is needed to build an
-initramfs with dracut, which does an integrity check.
-%endif
-
-%package fips-aesni
-Summary: dracut modules to build a dracut initramfs with an integrity check with aesni-intel
-Requires: %{name}-fips = %{version}-%{release}
-
-%description fips-aesni
-This package requires everything which is needed to build an
-initramfs with dracut, which does an integrity check and adds the aesni-intel kernel module.
-
 %package caps
 Summary: dracut modules to build a dracut initramfs which drops capabilities
 Requires: %{name} = %{version}-%{release}
@@ -264,10 +249,6 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man?/*suse*
 install -m 0644 dracut.conf.d/suse.conf.example   $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
 %endif
 
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
-install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/40-fips.conf
-%endif
-
 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
 rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
 rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
@@ -278,10 +259,6 @@ echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-i
 echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
 %endif
 
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
-> $RPM_BUILD_ROOT/etc/system-fips
-%endif
-
 %files
 %defattr(-,root,root,0755)
 %if %{with doc}
@@ -416,6 +393,12 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
 %{_prefix}/lib/kernel/install.d/50-dracut.install
 %endif
 
+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
+%defattr(-,root,root,0755)
+%{dracutlibdir}/modules.d/01fips
+%{dracutlibdir}/modules.d/02fips-aesni
+%endif
+
 %files network
 %defattr(-,root,root,0755)
 %{dracutlibdir}/modules.d/02systemd-networkd
@@ -435,18 +418,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
 %endif
 %{dracutlibdir}/modules.d/99uefi-lib
 
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
-%files fips
-%defattr(-,root,root,0755)
-%{dracutlibdir}/modules.d/01fips
-%{dracutlibdir}/dracut.conf.d/40-fips.conf
-%config(missingok) /etc/system-fips
-%endif
-
-%files fips-aesni
-%defattr(-,root,root,0755)
-%{dracutlibdir}/modules.d/02fips-aesni
-
 %files caps
 %defattr(-,root,root,0755)
 %{dracutlibdir}/modules.d/02caps