]>
Commit | Line | Data |
---|---|---|
c5a65990 HH |
1 | %define dracutlibdir %{_prefix}/lib/dracut |
2 | ||
dc5bb506 | 3 | # Variables must be defined |
3592d868 | 4 | %define with_nbd 1 |
641eae0f | 5 | |
dc5bb506 WT |
6 | # nbd in Fedora only |
7 | %if 0%{?rhel} >= 6 | |
8 | %define with_nbd 0 | |
0aaa523c HH |
9 | %endif |
10 | ||
0aaa523c | 11 | Name: dracut |
0e6a94b3 HH |
12 | Version: xxx |
13 | Release: xxx | |
228694e5 | 14 | |
38672ee8 | 15 | Summary: Initramfs generator using udev |
82dfee99 | 16 | %if 0%{?fedora} || 0%{?rhel} > 6 |
3b403b32 | 17 | Group: System Environment/Base |
228694e5 | 18 | %endif |
5ce6642f | 19 | %if 0%{?suse_version} |
228694e5 HH |
20 | Group: System/Base |
21 | %endif | |
3b403b32 | 22 | License: GPLv2+ |
82794b4b | 23 | URL: https://dracut.wiki.kernel.org/ |
3b403b32 | 24 | # Source can be generated by |
0e6a94b3 HH |
25 | # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz |
26 | Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2 | |
82794b4b | 27 | |
228694e5 | 28 | BuildArch: noarch |
85cda6ae | 29 | BuildRequires: dash bash git |
82dfee99 | 30 | %if 0%{?fedora} || 0%{?rhel} > 6 |
38672ee8 | 31 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
228694e5 | 32 | %endif |
5ce6642f | 33 | %if 0%{?suse_version} |
228694e5 HH |
34 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
35 | %endif | |
d9416c0d | 36 | |
82dfee99 | 37 | %if 0%{?fedora} || 0%{?rhel} > 6 |
d9416c0d HH |
38 | BuildRequires: docbook-style-xsl docbook-dtds libxslt |
39 | %endif | |
40 | ||
5ce6642f | 41 | %if 0%{?suse_version} |
d9416c0d HH |
42 | BuildRequires: docbook-xsl-stylesheets libxslt |
43 | %endif | |
5c554bd2 | 44 | |
1b3bdcc1 | 45 | %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 |
0bc4ef1c HH |
46 | # no "provides", because dracut does not offer |
47 | # all functionality of the obsoleted packages | |
5c554bd2 HH |
48 | Obsoletes: mkinitrd <= 6.0.93 |
49 | Obsoletes: mkinitrd-devel <= 6.0.93 | |
50 | Obsoletes: nash <= 6.0.93 | |
0bc4ef1c | 51 | Obsoletes: libbdevid-python <= 6.0.93 |
1b3bdcc1 | 52 | %endif |
228694e5 HH |
53 | |
54 | %if 0%{?suse_version} > 9999 | |
55 | Obsoletes: mkinitrd < 2.6.1 | |
56 | Provides: mkinitrd = 2.6.1 | |
57 | %endif | |
58 | ||
8ef5ade7 HH |
59 | Obsoletes: dracut-kernel < 005 |
60 | Provides: dracut-kernel = %{version}-%{release} | |
5c554bd2 | 61 | |
7e33fa5b HH |
62 | Requires: bash |
63 | Requires: bzip2 | |
38672ee8 | 64 | Requires: coreutils |
7e33fa5b HH |
65 | Requires: cpio |
66 | Requires: dash | |
67 | Requires: filesystem >= 2.1.0 | |
38672ee8 JK |
68 | Requires: findutils |
69 | Requires: grep | |
7e33fa5b | 70 | Requires: gzip |
7d86d90d | 71 | Requires: kbd |
80aa303c | 72 | Requires: mktemp >= 1.5-5 |
7e33fa5b | 73 | Requires: module-init-tools >= 3.7-9 |
7e33fa5b HH |
74 | Requires: sed |
75 | Requires: tar | |
76 | Requires: udev | |
7c3a7bd1 | 77 | Requires: util-linux >= 2.20 |
d9416c0d | 78 | |
82dfee99 | 79 | %if 0%{?fedora} || 0%{?rhel} > 6 |
d9416c0d HH |
80 | Requires: initscripts >= 8.63-1 |
81 | Requires: plymouth >= 0.8.0-0.2009.29.09.19.1 | |
d9416c0d HH |
82 | %endif |
83 | ||
38672ee8 | 84 | %description |
3b403b32 HH |
85 | Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. |
86 | Unlike existing implementations, dracut does hard-code as little as possible | |
87 | into the initramfs. Dracut contains various modules which are driven by the | |
88 | event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as | |
c55b2080 | 89 | NFS, iSCSI, NBD, FCoE with the dracut-network package. |
38672ee8 | 90 | |
ec74fa87 | 91 | %package network |
8ec6bfcb | 92 | Summary: Dracut modules to build a dracut initramfs with network support |
78cd7629 | 93 | Requires: %{name} = %{version}-%{release} |
3b403b32 | 94 | Requires: rpcbind |
dc5bb506 | 95 | %if %{with_nbd} |
78cd7629 | 96 | Requires: nbd |
dc5bb506 | 97 | %endif |
7838d853 | 98 | Requires: iproute |
ec74fa87 | 99 | Requires: bridge-utils |
228694e5 | 100 | |
82dfee99 | 101 | %if 0%{?fedora} || 0%{?rhel} > 6 |
228694e5 | 102 | Requires: iscsi-initiator-utils |
3b403b32 | 103 | Requires: nfs-utils |
228694e5 | 104 | Requires: dhclient |
228694e5 HH |
105 | %endif |
106 | ||
5ce6642f | 107 | %if 0%{?suse_version} |
228694e5 HH |
108 | Requires: dhcp-client |
109 | Requires: nfs-client | |
110 | Requires: vlan | |
111 | %endif | |
353ef760 HH |
112 | Obsoletes: dracut-generic < 008 |
113 | Provides: dracut-generic = %{version}-%{release} | |
ec74fa87 HH |
114 | |
115 | %description network | |
116 | This package requires everything which is needed to build a generic | |
117 | all purpose initramfs with network support with dracut. | |
118 | ||
82dfee99 | 119 | %if 0%{?fedora} || 0%{?rhel} > 6 |
4d1661d3 | 120 | %package fips |
c55b2080 | 121 | Summary: Dracut modules to build a dracut initramfs with an integrity check |
4d1661d3 HH |
122 | Requires: %{name} = %{version}-%{release} |
123 | Requires: hmaccalc | |
124 | %if 0%{?rhel} > 5 | |
125 | # For Alpha 3, we want nss instead of nss-softokn | |
126 | Requires: nss | |
127 | %else | |
128 | Requires: nss-softokn | |
129 | %endif | |
130 | Requires: nss-softokn-freebl | |
131 | ||
132 | %description fips | |
133 | This package requires everything which is needed to build an | |
134 | all purpose initramfs with dracut, which does an integrity check. | |
228694e5 | 135 | %endif |
33ee031c | 136 | |
2e1b9171 HH |
137 | %package fips-aesni |
138 | Summary: Dracut modules to build a dracut initramfs with an integrity check with aesni-intel | |
139 | Requires: %{name}-fips = %{version}-%{release} | |
140 | ||
141 | %description fips-aesni | |
142 | This package requires everything which is needed to build an | |
143 | all purpose initramfs with dracut, which does an integrity check | |
144 | and adds the aesni-intel kernel module. | |
145 | ||
52881470 HH |
146 | %package caps |
147 | Summary: Dracut modules to build a dracut initramfs which drops capabilities | |
148 | Requires: %{name} = %{version}-%{release} | |
149 | Requires: libcap | |
150 | ||
151 | %description caps | |
152 | This package requires everything which is needed to build an | |
153 | all purpose initramfs with dracut, which drops capabilities. | |
154 | ||
21007cb6 | 155 | %package tools |
8ec6bfcb | 156 | Summary: Dracut tools to build the local initramfs |
a0af4fa5 | 157 | Requires: %{name} = %{version}-%{release} |
21007cb6 HH |
158 | |
159 | %description tools | |
160 | This package contains tools to assemble the local initrd and host configuration. | |
161 | ||
38672ee8 | 162 | %prep |
0e6a94b3 | 163 | %setup -q -n %{name}-%{version} |
85cda6ae HH |
164 | git init |
165 | git config user.email "dracut-maint@redhat.com" | |
166 | git config user.name "Fedora dracut team" | |
167 | git add . | |
168 | git commit -a -q -m "%{version} baseline." | |
169 | ||
170 | # Apply all the patches. | |
171 | git am -p1 %{patches} | |
38672ee8 JK |
172 | |
173 | %build | |
3b403b32 | 174 | make |
38672ee8 | 175 | |
38672ee8 | 176 | %install |
82dfee99 | 177 | %if 0%{?fedora} || 0%{?rhel} > 6 |
38672ee8 | 178 | rm -rf $RPM_BUILD_ROOT |
228694e5 | 179 | %endif |
c5a65990 HH |
180 | make install DESTDIR=$RPM_BUILD_ROOT \ |
181 | libdir=%{_prefix}/lib \ | |
ed919de0 | 182 | bindir=%{_bindir} \ |
3b403b32 | 183 | sysconfdir=/etc mandir=%{_mandir} |
38672ee8 | 184 | |
c5a65990 | 185 | echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/10rpmversion/dracut-version |
228694e5 | 186 | |
82dfee99 | 187 | %if 0%{?fedora} == 0 && 0%{?rhel} == 0 |
c5a65990 HH |
188 | rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips |
189 | rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni | |
228694e5 HH |
190 | %endif |
191 | ||
783721b3 | 192 | # remove gentoo specific modules |
c5a65990 | 193 | rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash |
95cf0a88 | 194 | |
21007cb6 HH |
195 | mkdir -p $RPM_BUILD_ROOT/boot/dracut |
196 | mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay | |
837a5a60 HH |
197 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log |
198 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log | |
41f90cbe | 199 | mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs |
21007cb6 | 200 | |
82dfee99 | 201 | %if 0%{?fedora} || 0%{?rhel} > 6 |
d9416c0d | 202 | install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf |
b151c3b1 | 203 | install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/40-fips.conf |
d9416c0d HH |
204 | %endif |
205 | ||
5ce6642f | 206 | %if 0%{?suse_version} |
d9416c0d HH |
207 | install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf |
208 | %endif | |
209 | ||
228694e5 | 210 | %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999 |
ed919de0 HH |
211 | rm $RPM_BUILD_ROOT%{_bindir}/mkinitrd |
212 | rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd | |
1b3bdcc1 HH |
213 | %endif |
214 | ||
d8bf119d HH |
215 | mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d |
216 | install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log | |
62d0c4e7 | 217 | |
38672ee8 JK |
218 | %clean |
219 | rm -rf $RPM_BUILD_ROOT | |
220 | ||
38672ee8 | 221 | %files |
78cd7629 | 222 | %defattr(-,root,root,0755) |
7c6eb152 | 223 | %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg |
ed919de0 | 224 | %{_bindir}/dracut |
228694e5 | 225 | %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 |
ed919de0 HH |
226 | %{_bindir}/mkinitrd |
227 | %{_bindir}/lsinitrd | |
1b3bdcc1 | 228 | %endif |
c5a65990 HH |
229 | %dir %{dracutlibdir} |
230 | %dir %{dracutlibdir}/modules.d | |
231 | %{dracutlibdir}/dracut-functions | |
232 | %{dracutlibdir}/dracut-logger | |
4579f5a8 | 233 | %config(noreplace) /etc/dracut.conf |
82dfee99 | 234 | %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} > 6 |
8e702c3d | 235 | %config /etc/dracut.conf.d/01-dist.conf |
d9416c0d | 236 | %endif |
2c2c4580 | 237 | %dir /etc/dracut.conf.d |
00f0a6e7 | 238 | %{_mandir}/man8/dracut.8* |
0d866147 | 239 | %{_mandir}/man7/dracut.kernel.7* |
6cc96b35 | 240 | %{_mandir}/man5/dracut.conf.5* |
c5a65990 HH |
241 | %{dracutlibdir}/modules.d/00bootchart |
242 | %{dracutlibdir}/modules.d/00dash | |
243 | %{dracutlibdir}/modules.d/05busybox | |
244 | %{dracutlibdir}/modules.d/10i18n | |
245 | %{dracutlibdir}/modules.d/10rpmversion | |
246 | %{dracutlibdir}/modules.d/50plymouth | |
247 | %{dracutlibdir}/modules.d/90btrfs | |
248 | %{dracutlibdir}/modules.d/90crypt | |
249 | %{dracutlibdir}/modules.d/90dm | |
250 | %{dracutlibdir}/modules.d/90dmraid | |
251 | %{dracutlibdir}/modules.d/90dmsquash-live | |
252 | %{dracutlibdir}/modules.d/90kernel-modules | |
253 | %{dracutlibdir}/modules.d/90lvm | |
254 | %{dracutlibdir}/modules.d/90mdraid | |
255 | %{dracutlibdir}/modules.d/90multipath | |
256 | %{dracutlibdir}/modules.d/91crypt-gpg | |
257 | %{dracutlibdir}/modules.d/95debug | |
258 | %{dracutlibdir}/modules.d/95resume | |
259 | %{dracutlibdir}/modules.d/95rootfs-block | |
260 | %{dracutlibdir}/modules.d/95dasd | |
261 | %{dracutlibdir}/modules.d/95dasd_mod | |
262 | %{dracutlibdir}/modules.d/95fstab-sys | |
263 | %{dracutlibdir}/modules.d/95zfcp | |
264 | %{dracutlibdir}/modules.d/95terminfo | |
265 | %{dracutlibdir}/modules.d/95udev-rules | |
266 | %{dracutlibdir}/modules.d/96securityfs | |
267 | %{dracutlibdir}/modules.d/97biosdevname | |
268 | %{dracutlibdir}/modules.d/97masterkey | |
269 | %{dracutlibdir}/modules.d/98ecryptfs | |
270 | %{dracutlibdir}/modules.d/98integrity | |
271 | %{dracutlibdir}/modules.d/98selinux | |
272 | %{dracutlibdir}/modules.d/98syslog | |
273 | %{dracutlibdir}/modules.d/98usrmount | |
274 | %{dracutlibdir}/modules.d/99base | |
275 | %{dracutlibdir}/modules.d/99fs-lib | |
276 | %{dracutlibdir}/modules.d/99shutdown | |
d8bf119d | 277 | %config(noreplace) /etc/logrotate.d/dracut_log |
837a5a60 | 278 | %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log |
41f90cbe | 279 | %dir %{_sharedstatedir}/initramfs |
ec74fa87 HH |
280 | |
281 | %files network | |
78cd7629 | 282 | %defattr(-,root,root,0755) |
c5a65990 HH |
283 | %{dracutlibdir}/modules.d/40network |
284 | %{dracutlibdir}/modules.d/95fcoe | |
285 | %{dracutlibdir}/modules.d/95iscsi | |
286 | %{dracutlibdir}/modules.d/90livenet | |
287 | %{dracutlibdir}/modules.d/95nbd | |
288 | %{dracutlibdir}/modules.d/95nfs | |
289 | %{dracutlibdir}/modules.d/45ifcfg | |
290 | %{dracutlibdir}/modules.d/95znet | |
78cd7629 | 291 | |
82dfee99 | 292 | %if 0%{?fedora} || 0%{?rhel} > 6 |
4d1661d3 HH |
293 | %files fips |
294 | %defattr(-,root,root,0755) | |
c5a65990 | 295 | %{dracutlibdir}/modules.d/01fips |
b151c3b1 | 296 | %config(noreplace) /etc/dracut.conf.d/40-fips.conf |
228694e5 | 297 | %endif |
ec74fa87 | 298 | |
2e1b9171 HH |
299 | %files fips-aesni |
300 | %defattr(-,root,root,0755) | |
301 | %doc COPYING | |
c5a65990 | 302 | %{dracutlibdir}/modules.d/02fips-aesni |
2e1b9171 | 303 | |
52881470 HH |
304 | %files caps |
305 | %defattr(-,root,root,0755) | |
c5a65990 | 306 | %{dracutlibdir}/modules.d/02caps |
52881470 | 307 | |
3b403b32 | 308 | %files tools |
21007cb6 | 309 | %defattr(-,root,root,0755) |
66e45737 HH |
310 | %{_mandir}/man8/dracut-gencmdline.8* |
311 | %{_mandir}/man8/dracut-catimages.8* | |
ed919de0 HH |
312 | %{_bindir}/dracut-gencmdline |
313 | %{_bindir}/dracut-catimages | |
21007cb6 HH |
314 | %dir /boot/dracut |
315 | %dir /var/lib/dracut | |
316 | %dir /var/lib/dracut/overlay | |
317 | ||
38672ee8 | 318 | %changelog |