Blame 0015-dracut.spec-add-nohostonly-and-norescue-subpackages.patch

Harald Hoyer 22a1cb
From e22eb857bef9eb1d927049b13d6d60afc1f69a0d Mon Sep 17 00:00:00 2001
Harald Hoyer 22a1cb
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 22a1cb
Date: Tue, 12 Mar 2013 13:50:58 +0100
Harald Hoyer 22a1cb
Subject: [PATCH] dracut.spec: add nohostonly and norescue subpackages
Harald Hoyer 22a1cb
Harald Hoyer 22a1cb
we need rpm subpackages, to be able to pull them in the installation
Harald Hoyer 22a1cb
transaction for the initial %posttrans initramfs image creation.
Harald Hoyer 22a1cb
---
Harald Hoyer 22a1cb
 dracut.spec | 29 ++++++++++++++++++++++++++++-
Harald Hoyer 22a1cb
 1 file changed, 28 insertions(+), 1 deletion(-)
Harald Hoyer 22a1cb
Harald Hoyer 22a1cb
diff --git a/dracut.spec b/dracut.spec
Harald Hoyer 22a1cb
index 940d364..65112cb 100644
Harald Hoyer 22a1cb
--- a/dracut.spec
Harald Hoyer 22a1cb
+++ b/dracut.spec
Harald Hoyer 22a1cb
@@ -153,6 +153,22 @@ Requires: libcap
Harald Hoyer 22a1cb
 This package requires everything which is needed to build an
Harald Hoyer 22a1cb
 initramfs with dracut, which drops capabilities.
Harald Hoyer 22a1cb
 
Harald Hoyer 22a1cb
+%package nohostonly
Harald Hoyer 22a1cb
+Summary: dracut configuration to turn off hostonly image generation
Harald Hoyer 22a1cb
+Requires: %{name} = %{version}-%{release}
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
+%description nohostonly
Harald Hoyer 22a1cb
+This package provides the configuration to turn off the host specific initramfs
Harald Hoyer 22a1cb
+generation with dracut.
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
+%package norescue
Harald Hoyer 22a1cb
+Summary: dracut configuration to turn off rescue image generation
Harald Hoyer 22a1cb
+Requires: %{name} = %{version}-%{release}
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
+%description norescue
Harald Hoyer 22a1cb
+This package provides the configuration to turn off the rescue initramfs
Harald Hoyer 22a1cb
+generation with dracut.
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
 %package tools
Harald Hoyer 22a1cb
 Summary: dracut tools to build the local initramfs
Harald Hoyer 22a1cb
 Requires: %{name} = %{version}-%{release}
Harald Hoyer 22a1cb
@@ -235,10 +251,13 @@ rm $RPM_BUILD_ROOT%{_bindir}/mkinitrd
Harald Hoyer 22a1cb
 rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
Harald Hoyer 22a1cb
 %endif
Harald Hoyer 22a1cb
 
Harald Hoyer 22a1cb
-# FIXME: remove after F19
Harald Hoyer 22a1cb
 %if 0%{?fedora} || 0%{?rhel} > 6
Harald Hoyer 22a1cb
+# FIXME: remove after F19
Harald Hoyer 22a1cb
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
Harald Hoyer 22a1cb
 install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
+echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf
Harald Hoyer 22a1cb
+echo 'dracut_rescue_image="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-norescue.conf
Harald Hoyer 22a1cb
 %endif
Harald Hoyer 22a1cb
 
Harald Hoyer 22a1cb
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
Harald Hoyer 22a1cb
@@ -387,4 +406,12 @@ rm -rf $RPM_BUILD_ROOT
Harald Hoyer 22a1cb
 %dir /var/lib/dracut
Harald Hoyer 22a1cb
 %dir /var/lib/dracut/overlay
Harald Hoyer 22a1cb
 
Harald Hoyer 22a1cb
+%files nohostonly
Harald Hoyer 22a1cb
+%defattr(-,root,root,0755)
Harald Hoyer 22a1cb
+%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
+%files norescue
Harald Hoyer 22a1cb
+%defattr(-,root,root,0755)
Harald Hoyer 22a1cb
+%{dracutlibdir}/dracut.conf.d/02-norescue.conf
Harald Hoyer 22a1cb
+
Harald Hoyer 22a1cb
 %changelog