Harald Hoyer fe68ba
From 1f50d5b86d3c9b5c212a9d2201483a1bddb19013 Mon Sep 17 00:00:00 2001
Harald Hoyer fe68ba
From: Lukas Nykryn <lnykryn@redhat.com>
Harald Hoyer fe68ba
Date: Mon, 19 Mar 2018 13:02:24 +0100
Harald Hoyer fe68ba
Subject: [PATCH] spec: merge fips subpackages to main package
Harald Hoyer fe68ba
Harald Hoyer fe68ba
---
Harald Hoyer fe68ba
 dracut.spec | 53 ++++++++++++-----------------------------------------
Harald Hoyer fe68ba
 1 file changed, 12 insertions(+), 41 deletions(-)
Harald Hoyer fe68ba
Harald Hoyer fe68ba
diff --git a/dracut.spec b/dracut.spec
Harald Hoyer fe68ba
index 9c2fc9d4..5a31a1f3 100644
Harald Hoyer fe68ba
--- a/dracut.spec
Harald Hoyer fe68ba
+++ b/dracut.spec
Harald Hoyer fe68ba
@@ -88,6 +88,12 @@ Requires: udev > 166
Harald Hoyer fe68ba
 Requires: util-linux-ng >= 2.21
Harald Hoyer fe68ba
 %endif
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
+Requires: hmaccalc
Harald Hoyer fe68ba
+Requires: nss
Harald Hoyer fe68ba
+Requires: nss-softokn-freebl
Harald Hoyer fe68ba
+%endif
Harald Hoyer fe68ba
+
Harald Hoyer fe68ba
 %description
Harald Hoyer fe68ba
 dracut contains tools to create bootable initramfses for the Linux
Harald Hoyer fe68ba
 kernel. Unlike previous implementations, dracut hard-codes as little
Harald Hoyer fe68ba
@@ -117,27 +123,6 @@ Provides:  dracut-generic = %{version}-%{release}
Harald Hoyer fe68ba
 This package requires everything which is needed to build a generic
Harald Hoyer fe68ba
 all purpose initramfs with network support with dracut.
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
-%package fips
Harald Hoyer fe68ba
-Summary: dracut modules to build a dracut initramfs with an integrity check
Harald Hoyer fe68ba
-Requires: %{name} = %{version}-%{release}
Harald Hoyer fe68ba
-Requires: hmaccalc
Harald Hoyer fe68ba
-Requires: nss
Harald Hoyer fe68ba
-Requires: nss-softokn-freebl
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
-%description fips
Harald Hoyer fe68ba
-This package requires everything which is needed to build an
Harald Hoyer fe68ba
-initramfs with dracut, which does an integrity check.
Harald Hoyer fe68ba
-%endif
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
-%package fips-aesni
Harald Hoyer fe68ba
-Summary: dracut modules to build a dracut initramfs with an integrity check with aesni-intel
Harald Hoyer fe68ba
-Requires: %{name}-fips = %{version}-%{release}
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
-%description fips-aesni
Harald Hoyer fe68ba
-This package requires everything which is needed to build an
Harald Hoyer fe68ba
-initramfs with dracut, which does an integrity check and adds the aesni-intel kernel module.
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
 %package caps
Harald Hoyer fe68ba
 Summary: dracut modules to build a dracut initramfs which drops capabilities
Harald Hoyer fe68ba
 Requires: %{name} = %{version}-%{release}
Harald Hoyer fe68ba
@@ -264,10 +249,6 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man?/*suse*
Harald Hoyer fe68ba
 install -m 0644 dracut.conf.d/suse.conf.example   $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
Harald Hoyer fe68ba
 %endif
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
-install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/40-fips.conf
Harald Hoyer fe68ba
-%endif
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
Harald Hoyer fe68ba
 rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
Harald Hoyer fe68ba
 rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
Harald Hoyer fe68ba
@@ -278,10 +259,6 @@ echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-i
Harald Hoyer fe68ba
 echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
Harald Hoyer fe68ba
 %endif
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
-> $RPM_BUILD_ROOT/etc/system-fips
Harald Hoyer fe68ba
-%endif
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
 %files
Harald Hoyer fe68ba
 %defattr(-,root,root,0755)
Harald Hoyer fe68ba
 %if %{with doc}
Harald Hoyer fe68ba
@@ -416,6 +393,12 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
Harald Hoyer fe68ba
 %{_prefix}/lib/kernel/install.d/50-dracut.install
Harald Hoyer fe68ba
 %endif
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
+%defattr(-,root,root,0755)
Harald Hoyer fe68ba
+%{dracutlibdir}/modules.d/01fips
Harald Hoyer fe68ba
+%{dracutlibdir}/modules.d/02fips-aesni
Harald Hoyer fe68ba
+%endif
Harald Hoyer fe68ba
+
Harald Hoyer fe68ba
 %files network
Harald Hoyer fe68ba
 %defattr(-,root,root,0755)
Harald Hoyer fe68ba
 %{dracutlibdir}/modules.d/02systemd-networkd
Harald Hoyer fe68ba
@@ -435,18 +418,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
Harald Hoyer fe68ba
 %endif
Harald Hoyer fe68ba
 %{dracutlibdir}/modules.d/99uefi-lib
Harald Hoyer fe68ba
 
Harald Hoyer fe68ba
-%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
Harald Hoyer fe68ba
-%files fips
Harald Hoyer fe68ba
-%defattr(-,root,root,0755)
Harald Hoyer fe68ba
-%{dracutlibdir}/modules.d/01fips
Harald Hoyer fe68ba
-%{dracutlibdir}/dracut.conf.d/40-fips.conf
Harald Hoyer fe68ba
-%config(missingok) /etc/system-fips
Harald Hoyer fe68ba
-%endif
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
-%files fips-aesni
Harald Hoyer fe68ba
-%defattr(-,root,root,0755)
Harald Hoyer fe68ba
-%{dracutlibdir}/modules.d/02fips-aesni
Harald Hoyer fe68ba
-
Harald Hoyer fe68ba
 %files caps
Harald Hoyer fe68ba
 %defattr(-,root,root,0755)
Harald Hoyer fe68ba
 %{dracutlibdir}/modules.d/02caps
Harald Hoyer fe68ba