1 %define dracutlibdir
%{_prefix}/lib
/dracut
4 # Variables must be defined
16 Summary: Initramfs generator using udev
17 %if 0%{?fedora} || 0%{?rhel}
18 Group: System Environment
/Base
24 # The entire source code is GPLv2+
25 # except install/* which is LGPLv2+
26 License: GPLv2
+ and LGPLv2
+
28 URL: https
://dracut.wiki.kernel.org
/
30 # Source can be generated by
31 # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
32 Source0: http
://www.kernel.org
/pub
/linux
/utils
/boot
/dracut
/dracut
-%{version}.tar.xz
33 Source1: https
://www.gnu.org
/licenses
/lgpl
-2.1.txt
36 BuildRequires
: bash git
38 %if 0%{?fedora} || 0%{?rhel}
39 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
40 BuildRequires
: pkgconfig
43 BuildRequires
: bash
-completion
44 BuildRequires
: pkgconfig
48 BuildRoot: %{_tmppath}/%{name}-%{version}-build
52 %if 0%{?fedora} || 0%{?rhel}
53 BuildRequires
: docbook
-style
-xsl docbook
-dtds libxslt
57 -BuildRequires
: docbook
-xsl
-stylesheets libxslt
60 BuildRequires
: asciidoc
64 %if 0%{?fedora} > 12 || 0%{?rhel}
65 # no "provides", because dracut does not offer
66 # all functionality of the obsoleted packages
67 Obsoletes
: mkinitrd
<= 6.0.93
68 Obsoletes
: mkinitrd
-devel
<= 6.0.93
69 Obsoletes
: nash
<= 6.0.93
70 Obsoletes
: libbdevid
-python
<= 6.0.93
73 %if 0%{?fedora} > 16 || 0%{?rhel} > 6
74 BuildRequires
: systemd
-units
77 %if 0%{?suse_version} > 9999
78 Obsoletes
: mkinitrd
< 2.6.1
79 Provides: mkinitrd
= 2.6.1
82 Obsoletes
: dracut
-kernel
< 005
83 Provides: dracut
-kernel
= %{version}-%{release}
85 Obsoletes
: dracut
<= 029
86 Obsoletes
: dracut
-norescue
87 Provides: dracut
-norescue
92 Requires: filesystem
>= 2.1.0
111 %if 0%{?fedora} || 0%{?rhel} > 6
112 Requires: util
-linux
>= 2.21
113 Requires: systemd
>= 199
115 Conflicts: grubby
< 8.23
116 Conflicts: initscripts
< 8.63-1
117 Conflicts: plymouth
< 0.8.0-0.2009.29.09.19.1
118 Conflicts: bcache
-tools
< 0-0.14.20130909git
121 Requires: util
-linux
-ng
>= 2.21
124 Conflicts: mdadm
< 3.2.6-14
127 dracut contains tools to create a bootable initramfs
for 2.6 Linux kernels.
128 Unlike existing implementations
, dracut does hard
-code as little as possible
129 into the initramfs. dracut contains various modules which are driven by the
130 event
-based udev. Having root on MD
, DM
, LVM2
, LUKS is supported as well as
131 NFS
, iSCSI
, NBD
, FCoE with the dracut
-network package.
134 Summary: dracut modules to build a dracut initramfs with network support
135 Requires: %{name} = %{version}-%{release}
139 Obsoletes
: dracut
-generic
< 008
140 Provides: dracut
-generic
= %{version}-%{release}
143 This package requires everything which is needed to build a generic
144 all purpose initramfs with network support with dracut.
146 %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
148 Summary: dracut modules to build a dracut initramfs with an integrity check
149 Requires: %{name} = %{version}-%{release}
152 # For Alpha 3, we want nss instead of nss-softokn
155 Requires: nss
-softokn
157 Requires: nss
-softokn
-freebl
160 This package requires everything which is needed to build an
161 initramfs with dracut
, which does an integrity check.
165 Summary: dracut modules to build a dracut initramfs with an integrity check with aesni
-intel
166 Requires: %{name}-fips = %{version}-%{release}
168 %description fips
-aesni
169 This package requires everything which is needed to build an
170 initramfs with dracut
, which does an integrity check and adds the aesni
-intel kernel module.
173 Summary: dracut modules to build a dracut initramfs which drops capabilities
174 Requires: %{name} = %{version}-%{release}
178 This package requires everything which is needed to build an
179 initramfs with dracut
, which drops capabilities.
182 Summary: dracut modules to build a dracut initramfs with live image capabilities
183 Requires: %{name} = %{version}-%{release}
184 Requires: %{name}-network = %{version}-%{release}
185 Requires: tar gzip coreutils bash device
-mapper curl
188 This package requires everything which is needed to build an
189 initramfs with dracut
, with live image capabilities
, like Live CDs.
191 %package config
-generic
192 Summary: dracut configuration to turn off hostonly image generation
193 Requires: %{name} = %{version}-%{release}
194 Obsoletes
: dracut
-nohostonly
195 Provides: dracut
-nohostonly
197 %description config
-generic
198 This package provides the configuration to turn off the host specific initramfs
199 generation with dracut and generates a generic image by default.
201 %package config
-rescue
202 Summary: dracut configuration to turn on rescue image generation
203 Requires: %{name} = %{version}-%{release}
204 Obsoletes
: dracut
<= 029
206 %description config
-rescue
207 This package provides the configuration to turn on the rescue initramfs
208 generation with dracut.
211 Summary: dracut tools to build the
local initramfs
212 Requires: %{name} = %{version}-%{release}
215 This package contains tools to assemble the
local initrd and host configuration.
218 %autosetup -n
%{name}-%{version} -S git_am
222 %configure --systemdsystemunitdir
=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
224 --disable
-documentation
230 %if 0%{?fedora} || 0%{?rhel}
231 rm -rf
-- $RPM_BUILD_ROOT
233 make %{?_smp_mflags} install \
234 DESTDIR
=$RPM_BUILD_ROOT \
235 libdir
=%{_prefix}/lib
237 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
239 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
240 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
241 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/02fips
-aesni
244 %if %{defined _unitdir}
245 # for systemd, better use systemd-bootchart
246 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00bootchart
249 # we do not support dash in the initramfs
250 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
252 # remove gentoo specific modules
253 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
255 %if %{defined _unitdir}
256 # with systemd IMA and selinux modules do not make sense
257 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
258 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
259 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
262 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
263 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
264 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
265 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
266 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
268 %if 0%{?fedora} || 0%{?rhel}
269 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
270 rm -f $RPM_BUILD_ROOT
%{_mandir}/man?
/*suse
*
272 %if 0%{?suse_version}
273 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
276 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
277 install -m
0644 dracut.conf.d
/fips.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/40-fips.conf
280 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
281 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
282 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
285 %if 0%{?fedora} || 0%{?rhel} > 6
286 # FIXME: remove after F19
287 mkdir -p $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
288 install -m
0755 51-dracut
-rescue
-postinst.sh $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh
290 echo 'hostonly
="no"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
291 echo 'dracut_rescue_image
="yes"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-rescue.conf
294 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
295 > $RPM_BUILD_ROOT
/etc
/system
-fips
299 rm -rf
-- $RPM_BUILD_ROOT
302 %defattr(-,root
,root
,0755)
304 %doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
306 %{!?_licensedir:%global license %%doc}
307 %license COPYING lgpl
-2.1.txt
309 %{_datadir}/bash
-completion
/completions
/dracut
310 %{_datadir}/bash
-completion
/completions
/lsinitrd
311 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
316 %dir %{dracutlibdir}/modules.d
317 %{dracutlibdir}/dracut
-functions.sh
318 %{dracutlibdir}/dracut
-functions
319 %{dracutlibdir}/dracut
-version.sh
320 %{dracutlibdir}/dracut
-logger.sh
321 %{dracutlibdir}/dracut
-initramfs
-restore
322 %{dracutlibdir}/dracut
-install
323 %{dracutlibdir}/skipcpio
324 %config(noreplace
) %{_sysconfdir}/dracut.conf
325 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
326 %{dracutlibdir}/dracut.conf.d
/01-dist.conf
328 %dir %{_sysconfdir}/dracut.conf.d
329 %dir %{dracutlibdir}/dracut.conf.d
330 %{_datadir}/pkgconfig
/dracut.pc
333 %{_mandir}/man8
/dracut
.8*
334 %{_mandir}/man8
/*service
.8*
335 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
336 %{_mandir}/man8
/mkinitrd
.8*
337 %{_mandir}/man1
/lsinitrd
.1*
339 %{_mandir}/man7
/dracut.kernel
.7*
340 %{_mandir}/man7
/dracut.cmdline
.7*
341 %{_mandir}/man7
/dracut.modules
.7*
342 %{_mandir}/man7
/dracut.bootup
.7*
343 %{_mandir}/man5
/dracut.conf
.5*
346 %if %{defined _unitdir}
347 %{dracutlibdir}/modules.d
/00systemd
-bootchart
349 %{dracutlibdir}/modules.d
/00bootchart
351 %{dracutlibdir}/modules.d
/00bash
352 %{dracutlibdir}/modules.d
/00systemd
353 %{dracutlibdir}/modules.d
/01systemd
-initrd
354 %{dracutlibdir}/modules.d
/03modsign
355 %{dracutlibdir}/modules.d
/03rescue
356 %{dracutlibdir}/modules.d
/04watchdog
357 %{dracutlibdir}/modules.d
/05busybox
358 %{dracutlibdir}/modules.d
/10i18n
359 %{dracutlibdir}/modules.d
/30convertfs
360 %{dracutlibdir}/modules.d
/45url
-lib
361 %{dracutlibdir}/modules.d
/50drm
362 %{dracutlibdir}/modules.d
/50plymouth
363 %{dracutlibdir}/modules.d
/80cms
364 %{dracutlibdir}/modules.d
/90btrfs
365 %{dracutlibdir}/modules.d
/90crypt
366 %{dracutlibdir}/modules.d
/90dm
367 %{dracutlibdir}/modules.d
/90dmraid
368 %{dracutlibdir}/modules.d
/90kernel
-modules
369 %{dracutlibdir}/modules.d
/90lvm
370 %{dracutlibdir}/modules.d
/90mdraid
371 %{dracutlibdir}/modules.d
/90multipath
372 %{dracutlibdir}/modules.d
/90qemu
373 %{dracutlibdir}/modules.d
/91crypt
-gpg
374 %{dracutlibdir}/modules.d
/91crypt
-loop
375 %{dracutlibdir}/modules.d
/95debug
376 %{dracutlibdir}/modules.d
/95resume
377 %{dracutlibdir}/modules.d
/95rootfs
-block
378 %{dracutlibdir}/modules.d
/95dasd
379 %{dracutlibdir}/modules.d
/95dasd_mod
380 %{dracutlibdir}/modules.d
/95dasd_rules
381 %{dracutlibdir}/modules.d
/95fstab
-sys
382 %{dracutlibdir}/modules.d
/95zfcp
383 %{dracutlibdir}/modules.d
/95zfcp_rules
384 %{dracutlibdir}/modules.d
/95terminfo
385 %{dracutlibdir}/modules.d
/95udev
-rules
386 %{dracutlibdir}/modules.d
/95virtfs
387 %if %{undefined _unitdir}
388 %{dracutlibdir}/modules.d
/96securityfs
389 %{dracutlibdir}/modules.d
/97masterkey
390 %{dracutlibdir}/modules.d
/98integrity
392 %{dracutlibdir}/modules.d
/97biosdevname
393 %{dracutlibdir}/modules.d
/98ecryptfs
394 %{dracutlibdir}/modules.d
/98pollcdrom
395 %{dracutlibdir}/modules.d
/98selinux
396 %{dracutlibdir}/modules.d
/98syslog
397 %{dracutlibdir}/modules.d
/98dracut
-systemd
398 %{dracutlibdir}/modules.d
/98usrmount
399 %{dracutlibdir}/modules.d
/99base
400 %{dracutlibdir}/modules.d
/99fs
-lib
401 %{dracutlibdir}/modules.d
/99shutdown
402 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
403 %dir %{_sharedstatedir}/initramfs
404 %if %{defined _unitdir}
405 %{_unitdir}/dracut
-shutdown.service
406 %{_unitdir}/sysinit.target.wants
/dracut
-shutdown.service
407 %{_unitdir}/dracut
-cmdline.service
408 %{_unitdir}/dracut
-initqueue.service
409 %{_unitdir}/dracut
-mount.service
410 %{_unitdir}/dracut
-pre
-mount.service
411 %{_unitdir}/dracut
-pre
-pivot.service
412 %{_unitdir}/dracut
-pre
-trigger.service
413 %{_unitdir}/dracut
-pre
-udev.service
414 %{_unitdir}/initrd.target.wants
/dracut
-cmdline.service
415 %{_unitdir}/initrd.target.wants
/dracut
-initqueue.service
416 %{_unitdir}/initrd.target.wants
/dracut
-mount.service
417 %{_unitdir}/initrd.target.wants
/dracut
-pre
-mount.service
418 %{_unitdir}/initrd.target.wants
/dracut
-pre
-pivot.service
419 %{_unitdir}/initrd.target.wants
/dracut
-pre
-trigger.service
420 %{_unitdir}/initrd.target.wants
/dracut
-pre
-udev.service
423 %if 0%{?fedora} || 0%{?rhel} > 6
424 %{_prefix}/lib
/kernel
/install.d
/50-dracut.
install
428 %defattr(-,root
,root
,0755)
429 %{dracutlibdir}/modules.d
/02systemd
-networkd
430 %{dracutlibdir}/modules.d
/40network
431 %{dracutlibdir}/modules.d
/90kernel
-network
-modules
432 %{dracutlibdir}/modules.d
/95fcoe
433 %{dracutlibdir}/modules.d
/95iscsi
434 %{dracutlibdir}/modules.d
/90qemu
-net
435 %{dracutlibdir}/modules.d
/95cifs
436 %{dracutlibdir}/modules.d
/95nbd
437 %{dracutlibdir}/modules.d
/95nfs
438 %{dracutlibdir}/modules.d
/95ssh
-client
439 %{dracutlibdir}/modules.d
/45ifcfg
440 %{dracutlibdir}/modules.d
/95znet
441 %{dracutlibdir}/modules.d
/95fcoe
-uefi
442 %{dracutlibdir}/modules.d
/99uefi
-lib
444 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
446 %defattr(-,root
,root
,0755)
447 %{dracutlibdir}/modules.d
/01fips
448 %{dracutlibdir}/dracut.conf.d
/40-fips.conf
449 %config(missingok
) /etc
/system
-fips
453 %defattr(-,root
,root
,0755)
454 %{dracutlibdir}/modules.d
/02fips
-aesni
457 %defattr(-,root
,root
,0755)
458 %{dracutlibdir}/modules.d
/02caps
461 %defattr(-,root
,root
,0755)
462 %{dracutlibdir}/modules.d
/99img
-lib
463 %{dracutlibdir}/modules.d
/90dmsquash
-live
464 %{dracutlibdir}/modules.d
/90livenet
467 %defattr(-,root
,root
,0755)
470 %doc %{_mandir}/man8
/dracut
-catimages
.8*
473 %{_bindir}/dracut
-catimages
476 %dir /var
/lib
/dracut
/overlay
478 %files config
-generic
479 %defattr(-,root
,root
,0755)
480 %{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
483 %defattr(-,root
,root
,0755)
484 %{dracutlibdir}/dracut.conf.d
/02-rescue.conf
485 %if 0%{?fedora} || 0%{?rhel} > 6
486 %{_prefix}/lib
/kernel
/install.d
/51-dracut
-rescue.
install
487 %{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh