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
101 %if 0%{?fedora} || 0%{?rhel} > 6
102 Requires: util
-linux
>= 2.21
103 Requires: systemd
>= 199
105 Conflicts: grubby
< 8.23
106 Conflicts: initscripts
< 8.63-1
107 Conflicts: plymouth
< 0.8.0-0.2009.29.09.19.1
108 Conflicts: bcache
-tools
< 0-0.14.20130909git
111 Requires: util
-linux
-ng
>= 2.21
114 Conflicts: mdadm
< 3.2.6-14
117 dracut contains tools to create a bootable initramfs
for 2.6 Linux kernels.
118 Unlike existing implementations
, dracut does hard
-code as little as possible
119 into the initramfs. dracut contains various modules which are driven by the
120 event
-based udev. Having root on MD
, DM
, LVM2
, LUKS is supported as well as
121 NFS
, iSCSI
, NBD
, FCoE with the dracut
-network package.
124 Summary: dracut modules to build a dracut initramfs with network support
125 Requires: %{name} = %{version}-%{release}
129 Obsoletes
: dracut
-generic
< 008
130 Provides: dracut
-generic
= %{version}-%{release}
133 This package requires everything which is needed to build a generic
134 all purpose initramfs with network support with dracut.
136 %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
138 Summary: dracut modules to build a dracut initramfs with an integrity check
139 Requires: %{name} = %{version}-%{release}
142 # For Alpha 3, we want nss instead of nss-softokn
145 Requires: nss
-softokn
147 Requires: nss
-softokn
-freebl
150 This package requires everything which is needed to build an
151 initramfs with dracut
, which does an integrity check.
155 Summary: dracut modules to build a dracut initramfs with an integrity check with aesni
-intel
156 Requires: %{name}-fips = %{version}-%{release}
158 %description fips
-aesni
159 This package requires everything which is needed to build an
160 initramfs with dracut
, which does an integrity check and adds the aesni
-intel kernel module.
163 Summary: dracut modules to build a dracut initramfs which drops capabilities
164 Requires: %{name} = %{version}-%{release}
168 This package requires everything which is needed to build an
169 initramfs with dracut
, which drops capabilities.
172 Summary: dracut modules to build a dracut initramfs with live image capabilities
173 Requires: %{name} = %{version}-%{release}
174 Requires: %{name}-network = %{version}-%{release}
175 Requires: tar gzip coreutils bash device
-mapper curl
178 This package requires everything which is needed to build an
179 initramfs with dracut
, with live image capabilities
, like Live CDs.
181 %package config
-generic
182 Summary: dracut configuration to turn off hostonly image generation
183 Requires: %{name} = %{version}-%{release}
184 Obsoletes
: dracut
-nohostonly
185 Provides: dracut
-nohostonly
187 %description config
-generic
188 This package provides the configuration to turn off the host specific initramfs
189 generation with dracut and generates a generic image by default.
191 %package config
-rescue
192 Summary: dracut configuration to turn on rescue image generation
193 Requires: %{name} = %{version}-%{release}
194 Obsoletes
: dracut
<= 029
196 %description config
-rescue
197 This package provides the configuration to turn on the rescue initramfs
198 generation with dracut.
201 Summary: dracut tools to build the
local initramfs
202 Requires: %{name} = %{version}-%{release}
205 This package contains tools to assemble the
local initrd and host configuration.
208 %autosetup -n
%{name}-%{version} -S git_am
212 %configure --systemdsystemunitdir
=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
214 --disable
-documentation
220 %if 0%{?fedora} || 0%{?rhel}
221 rm -rf
-- $RPM_BUILD_ROOT
223 make %{?_smp_mflags} install \
224 DESTDIR
=$RPM_BUILD_ROOT \
225 libdir
=%{_prefix}/lib
227 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
229 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
230 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
231 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/02fips
-aesni
234 %if %{defined _unitdir}
235 # for systemd, better use systemd-bootchart
236 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00bootchart
239 # we do not support dash in the initramfs
240 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
242 # remove gentoo specific modules
243 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
245 %if %{defined _unitdir}
246 # with systemd IMA and selinux modules do not make sense
247 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
248 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
249 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
252 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
253 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
254 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
255 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
256 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
258 %if 0%{?fedora} || 0%{?rhel}
259 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
260 rm -f $RPM_BUILD_ROOT
%{_mandir}/man?
/*suse
*
262 %if 0%{?suse_version}
263 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
266 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
267 install -m
0644 dracut.conf.d
/fips.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/40-fips.conf
270 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
271 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
272 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
275 %if 0%{?fedora} || 0%{?rhel} > 6
276 # FIXME: remove after F19
277 mkdir -p $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
278 install -m
0755 51-dracut
-rescue
-postinst.sh $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh
280 echo 'hostonly
="no"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
281 echo 'dracut_rescue_image
="yes"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-rescue.conf
284 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
285 > $RPM_BUILD_ROOT
/etc
/system
-fips
289 rm -rf
-- $RPM_BUILD_ROOT
292 %defattr(-,root
,root
,0755)
294 %doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
296 %{!?_licensedir:%global license %%doc}
297 %license COPYING lgpl
-2.1.txt
299 %{_datadir}/bash
-completion
/completions
/dracut
300 %{_datadir}/bash
-completion
/completions
/lsinitrd
301 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
306 %dir %{dracutlibdir}/modules.d
307 %{dracutlibdir}/dracut
-functions.sh
308 %{dracutlibdir}/dracut
-functions
309 %{dracutlibdir}/dracut
-version.sh
310 %{dracutlibdir}/dracut
-logger.sh
311 %{dracutlibdir}/dracut
-initramfs
-restore
312 %{dracutlibdir}/dracut
-install
313 %{dracutlibdir}/skipcpio
314 %config(noreplace
) %{_sysconfdir}/dracut.conf
315 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
316 %{dracutlibdir}/dracut.conf.d
/01-dist.conf
318 %dir %{_sysconfdir}/dracut.conf.d
319 %dir %{dracutlibdir}/dracut.conf.d
320 %{_datadir}/pkgconfig
/dracut.pc
323 %{_mandir}/man8
/dracut
.8*
324 %{_mandir}/man8
/*service
.8*
325 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
326 %{_mandir}/man8
/mkinitrd
.8*
327 %{_mandir}/man1
/lsinitrd
.1*
329 %{_mandir}/man7
/dracut.kernel
.7*
330 %{_mandir}/man7
/dracut.cmdline
.7*
331 %{_mandir}/man7
/dracut.modules
.7*
332 %{_mandir}/man7
/dracut.bootup
.7*
333 %{_mandir}/man5
/dracut.conf
.5*
336 %if %{defined _unitdir}
337 %{dracutlibdir}/modules.d
/00systemd
-bootchart
339 %{dracutlibdir}/modules.d
/00bootchart
341 %{dracutlibdir}/modules.d
/00bash
342 %{dracutlibdir}/modules.d
/00systemd
343 %{dracutlibdir}/modules.d
/01systemd
-initrd
344 %{dracutlibdir}/modules.d
/03modsign
345 %{dracutlibdir}/modules.d
/03rescue
346 %{dracutlibdir}/modules.d
/04watchdog
347 %{dracutlibdir}/modules.d
/05busybox
348 %{dracutlibdir}/modules.d
/10i18n
349 %{dracutlibdir}/modules.d
/30convertfs
350 %{dracutlibdir}/modules.d
/45url
-lib
351 %{dracutlibdir}/modules.d
/50drm
352 %{dracutlibdir}/modules.d
/50plymouth
353 %{dracutlibdir}/modules.d
/80cms
354 %{dracutlibdir}/modules.d
/90btrfs
355 %{dracutlibdir}/modules.d
/90crypt
356 %{dracutlibdir}/modules.d
/90dm
357 %{dracutlibdir}/modules.d
/90dmraid
358 %{dracutlibdir}/modules.d
/90kernel
-modules
359 %{dracutlibdir}/modules.d
/90lvm
360 %{dracutlibdir}/modules.d
/90mdraid
361 %{dracutlibdir}/modules.d
/90multipath
362 %{dracutlibdir}/modules.d
/90qemu
363 %{dracutlibdir}/modules.d
/91crypt
-gpg
364 %{dracutlibdir}/modules.d
/91crypt
-loop
365 %{dracutlibdir}/modules.d
/95debug
366 %{dracutlibdir}/modules.d
/95resume
367 %{dracutlibdir}/modules.d
/95rootfs
-block
368 %{dracutlibdir}/modules.d
/95dasd
369 %{dracutlibdir}/modules.d
/95dasd_mod
370 %{dracutlibdir}/modules.d
/95dasd_rules
371 %{dracutlibdir}/modules.d
/95fstab
-sys
372 %{dracutlibdir}/modules.d
/95zfcp
373 %{dracutlibdir}/modules.d
/95zfcp_rules
374 %{dracutlibdir}/modules.d
/95terminfo
375 %{dracutlibdir}/modules.d
/95udev
-rules
376 %{dracutlibdir}/modules.d
/95virtfs
377 %if %{undefined _unitdir}
378 %{dracutlibdir}/modules.d
/96securityfs
379 %{dracutlibdir}/modules.d
/97masterkey
380 %{dracutlibdir}/modules.d
/98integrity
382 %{dracutlibdir}/modules.d
/97biosdevname
383 %{dracutlibdir}/modules.d
/98ecryptfs
384 %{dracutlibdir}/modules.d
/98pollcdrom
385 %{dracutlibdir}/modules.d
/98selinux
386 %{dracutlibdir}/modules.d
/98syslog
387 %{dracutlibdir}/modules.d
/98dracut
-systemd
388 %{dracutlibdir}/modules.d
/98usrmount
389 %{dracutlibdir}/modules.d
/99base
390 %{dracutlibdir}/modules.d
/99fs
-lib
391 %{dracutlibdir}/modules.d
/99shutdown
392 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
393 %dir %{_sharedstatedir}/initramfs
394 %if %{defined _unitdir}
395 %{_unitdir}/dracut
-shutdown.service
396 %{_unitdir}/sysinit.target.wants
/dracut
-shutdown.service
397 %{_unitdir}/dracut
-cmdline.service
398 %{_unitdir}/dracut
-initqueue.service
399 %{_unitdir}/dracut
-mount.service
400 %{_unitdir}/dracut
-pre
-mount.service
401 %{_unitdir}/dracut
-pre
-pivot.service
402 %{_unitdir}/dracut
-pre
-trigger.service
403 %{_unitdir}/dracut
-pre
-udev.service
404 %{_unitdir}/initrd.target.wants
/dracut
-cmdline.service
405 %{_unitdir}/initrd.target.wants
/dracut
-initqueue.service
406 %{_unitdir}/initrd.target.wants
/dracut
-mount.service
407 %{_unitdir}/initrd.target.wants
/dracut
-pre
-mount.service
408 %{_unitdir}/initrd.target.wants
/dracut
-pre
-pivot.service
409 %{_unitdir}/initrd.target.wants
/dracut
-pre
-trigger.service
410 %{_unitdir}/initrd.target.wants
/dracut
-pre
-udev.service
413 %if 0%{?fedora} || 0%{?rhel} > 6
414 %{_prefix}/lib
/kernel
/install.d
/50-dracut.
install
418 %defattr(-,root
,root
,0755)
419 %{dracutlibdir}/modules.d
/02systemd
-networkd
420 %{dracutlibdir}/modules.d
/40network
421 %{dracutlibdir}/modules.d
/90kernel
-network
-modules
422 %{dracutlibdir}/modules.d
/95fcoe
423 %{dracutlibdir}/modules.d
/95iscsi
424 %{dracutlibdir}/modules.d
/90qemu
-net
425 %{dracutlibdir}/modules.d
/95cifs
426 %{dracutlibdir}/modules.d
/95nbd
427 %{dracutlibdir}/modules.d
/95nfs
428 %{dracutlibdir}/modules.d
/95ssh
-client
429 %{dracutlibdir}/modules.d
/45ifcfg
430 %{dracutlibdir}/modules.d
/95znet
431 %{dracutlibdir}/modules.d
/95fcoe
-uefi
432 %{dracutlibdir}/modules.d
/99uefi
-lib
434 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
436 %defattr(-,root
,root
,0755)
437 %{dracutlibdir}/modules.d
/01fips
438 %{dracutlibdir}/dracut.conf.d
/40-fips.conf
439 %config(missingok
) /etc
/system
-fips
443 %defattr(-,root
,root
,0755)
444 %{dracutlibdir}/modules.d
/02fips
-aesni
447 %defattr(-,root
,root
,0755)
448 %{dracutlibdir}/modules.d
/02caps
451 %defattr(-,root
,root
,0755)
452 %{dracutlibdir}/modules.d
/99img
-lib
453 %{dracutlibdir}/modules.d
/90dmsquash
-live
454 %{dracutlibdir}/modules.d
/90livenet
457 %defattr(-,root
,root
,0755)
460 %doc %{_mandir}/man8
/dracut
-catimages
.8*
463 %{_bindir}/dracut
-catimages
466 %dir /var
/lib
/dracut
/overlay
468 %files config
-generic
469 %defattr(-,root
,root
,0755)
470 %{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
473 %defattr(-,root
,root
,0755)
474 %{dracutlibdir}/dracut.conf.d
/02-rescue.conf
475 %if 0%{?fedora} || 0%{?rhel} > 6
476 %{_prefix}/lib
/kernel
/install.d
/51-dracut
-rescue.
install
477 %{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh