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