summaryrefslogtreecommitdiffstats
path: root/0015-dracut.spec-add-nohostonly-and-norescue-subpackages.patch
blob: 8817de27e8ac50b500b4e50ec041d68574dfd6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From e22eb857bef9eb1d927049b13d6d60afc1f69a0d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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