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
34 BuildRequires
: bash git
36 %if 0%{?fedora} || 0%{?rhel}
37 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
38 BuildRequires
: pkgconfig
41 BuildRequires
: bash
-completion
42 BuildRequires
: pkgconfig
46 BuildRoot: %{_tmppath}/%{name}-%{version}-build
50 %if 0%{?fedora} || 0%{?rhel}
51 BuildRequires
: docbook
-style
-xsl docbook
-dtds libxslt
55 -BuildRequires
: docbook
-xsl
-stylesheets libxslt
58 BuildRequires
: asciidoc
62 %if 0%{?fedora} > 12 || 0%{?rhel}
63 # no "provides", because dracut does not offer
64 # all functionality of the obsoleted packages
65 Obsoletes
: mkinitrd
<= 6.0.93
66 Obsoletes
: mkinitrd
-devel
<= 6.0.93
67 Obsoletes
: nash
<= 6.0.93
68 Obsoletes
: libbdevid
-python
<= 6.0.93
71 %if 0%{?fedora} > 16 || 0%{?rhel} > 6
72 BuildRequires
: systemd
-units
75 %if 0%{?suse_version} > 9999
76 Obsoletes
: mkinitrd
< 2.6.1
77 Provides: mkinitrd
= 2.6.1
80 Obsoletes
: dracut
-kernel
< 005
81 Provides: dracut
-kernel
= %{version}-%{release}
83 Obsoletes
: dracut
<= 029
84 Obsoletes
: dracut
-norescue
85 Provides: dracut
-norescue
90 Requires: filesystem
>= 2.1.0
99 %if 0%{?fedora} || 0%{?rhel} > 6
100 Requires: util
-linux
>= 2.21
101 Requires: systemd
>= 199
103 Conflicts: grubby
< 8.23
104 Conflicts: initscripts
< 8.63-1
105 Conflicts: plymouth
< 0.8.0-0.2009.29.09.19.1
106 Conflicts: bcache
-tools
< 0-0.14.20130909git
109 Requires: util
-linux
-ng
>= 2.21
112 Conflicts: mdadm
< 3.2.6-14
115 dracut contains tools to create a bootable initramfs
for 2.6 Linux kernels.
116 Unlike existing implementations
, dracut does hard
-code as little as possible
117 into the initramfs. dracut contains various modules which are driven by the
118 event
-based udev. Having root on MD
, DM
, LVM2
, LUKS is supported as well as
119 NFS
, iSCSI
, NBD
, FCoE with the dracut
-network package.
122 Summary: dracut modules to build a dracut initramfs with network support
123 Requires: %{name} = %{version}-%{release}
127 Obsoletes
: dracut
-generic
< 008
128 Provides: dracut
-generic
= %{version}-%{release}
131 This package requires everything which is needed to build a generic
132 all purpose initramfs with network support with dracut.
134 %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
136 Summary: dracut modules to build a dracut initramfs with an integrity check
137 Requires: %{name} = %{version}-%{release}
140 # For Alpha 3, we want nss instead of nss-softokn
143 Requires: nss
-softokn
145 Requires: nss
-softokn
-freebl
148 This package requires everything which is needed to build an
149 initramfs with dracut
, which does an integrity check.
153 Summary: dracut modules to build a dracut initramfs with an integrity check with aesni
-intel
154 Requires: %{name}-fips = %{version}-%{release}
156 %description fips
-aesni
157 This package requires everything which is needed to build an
158 initramfs with dracut
, which does an integrity check and adds the aesni
-intel kernel module.
161 Summary: dracut modules to build a dracut initramfs which drops capabilities
162 Requires: %{name} = %{version}-%{release}
166 This package requires everything which is needed to build an
167 initramfs with dracut
, which drops capabilities.
169 %package config
-generic
170 Summary: dracut configuration to turn off hostonly image generation
171 Requires: %{name} = %{version}-%{release}
172 Obsoletes
: dracut
-nohostonly
173 Provides: dracut
-nohostonly
175 %description config
-generic
176 This package provides the configuration to turn off the host specific initramfs
177 generation with dracut and generates a generic image by default.
179 %package config
-rescue
180 Summary: dracut configuration to turn on rescue image generation
181 Requires: %{name} = %{version}-%{release}
182 Obsoletes
: dracut
<= 029
184 %description config
-rescue
185 This package provides the configuration to turn on the rescue initramfs
186 generation with dracut.
189 Summary: dracut tools to build the
local initramfs
190 Requires: %{name} = %{version}-%{release}
193 This package contains tools to assemble the
local initrd and host configuration.
196 %setup -q
-n
%{name}-%{version}
198 %if %{defined PATCH1}
200 git config user.email "dracut
-maint@redhat.com"
201 git config user.name "Fedora dracut team"
203 git commit
-a
-q
-m "
%{version} baseline."
205 # Apply all the patches.
206 git am
-p1
%{patches}
210 %configure --systemdsystemunitdir
=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
212 --disable
-documentation
218 %if 0%{?fedora} || 0%{?rhel}
219 rm -rf
-- $RPM_BUILD_ROOT
221 make %{?_smp_mflags} install \
222 DESTDIR
=$RPM_BUILD_ROOT \
223 libdir
=%{_prefix}/lib
225 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
227 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
228 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
229 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/02fips
-aesni
232 %if %{defined _unitdir}
233 # for systemd, better use systemd-bootchart
234 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00bootchart
237 # we do not support dash in the initramfs
238 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
240 # remove gentoo specific modules
241 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
243 %if %{defined _unitdir}
244 # with systemd IMA and selinux modules do not make sense
245 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
246 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
247 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
250 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
251 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
252 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
253 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
254 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
256 %if 0%{?fedora} || 0%{?rhel}
257 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
258 rm -f $RPM_BUILD_ROOT
%{_mandir}/man?
/*suse
*
260 %if 0%{?suse_version}
261 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
264 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
265 install -m
0644 dracut.conf.d
/fips.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/40-fips.conf
268 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
269 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
270 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
273 %if 0%{?fedora} || 0%{?rhel} > 6
274 # FIXME: remove after F19
275 mkdir -p $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
276 install -m
0755 51-dracut
-rescue
-postinst.sh $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh
278 echo 'hostonly
="no"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
279 echo 'dracut_rescue_image
="yes"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-rescue.conf
282 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
283 > $RPM_BUILD_ROOT
/etc
/system
-fips
286 # create compat symlink
287 mkdir -p $RPM_BUILD_ROOT
%{_sbindir}
288 ln
-sr $RPM_BUILD_ROOT
%{_bindir}/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
291 rm -rf
-- $RPM_BUILD_ROOT
294 %defattr(-,root
,root
,0755)
296 %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
301 %{_datadir}/bash
-completion
/completions
/dracut
302 %{_datadir}/bash
-completion
/completions
/lsinitrd
303 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
308 %dir %{dracutlibdir}/modules.d
309 %{dracutlibdir}/dracut
-functions.sh
310 %{dracutlibdir}/dracut
-functions
311 %{dracutlibdir}/dracut
-version.sh
312 %{dracutlibdir}/dracut
-logger.sh
313 %{dracutlibdir}/dracut
-initramfs
-restore
314 %{dracutlibdir}/dracut
-install
315 %{dracutlibdir}/skipcpio
316 %config(noreplace
) %{_sysconfdir}/dracut.conf
317 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
318 %{dracutlibdir}/dracut.conf.d
/01-dist.conf
320 %dir %{_sysconfdir}/dracut.conf.d
321 %dir %{dracutlibdir}/dracut.conf.d
324 %{_mandir}/man8
/dracut
.8*
325 %{_mandir}/man8
/*service
.8*
326 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
327 %{_mandir}/man8
/mkinitrd
.8*
328 %{_mandir}/man1
/lsinitrd
.1*
330 %{_mandir}/man7
/dracut.kernel
.7*
331 %{_mandir}/man7
/dracut.cmdline
.7*
332 %{_mandir}/man7
/dracut.modules
.7*
333 %{_mandir}/man7
/dracut.bootup
.7*
334 %{_mandir}/man5
/dracut.conf
.5*
337 %if %{defined _unitdir}
338 %{dracutlibdir}/modules.d
/00systemd
-bootchart
340 %{dracutlibdir}/modules.d
/00bootchart
342 %{dracutlibdir}/modules.d
/00bash
343 %{dracutlibdir}/modules.d
/03modsign
344 %{dracutlibdir}/modules.d
/03rescue
345 %{dracutlibdir}/modules.d
/04watchdog
346 %{dracutlibdir}/modules.d
/05busybox
347 %{dracutlibdir}/modules.d
/10i18n
348 %{dracutlibdir}/modules.d
/30convertfs
349 %{dracutlibdir}/modules.d
/45url
-lib
350 %{dracutlibdir}/modules.d
/50drm
351 %{dracutlibdir}/modules.d
/50plymouth
352 %{dracutlibdir}/modules.d
/80cms
353 %{dracutlibdir}/modules.d
/90btrfs
354 %{dracutlibdir}/modules.d
/90crypt
355 %{dracutlibdir}/modules.d
/90dm
356 %{dracutlibdir}/modules.d
/90dmraid
357 %{dracutlibdir}/modules.d
/90dmsquash
-live
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
/98systemd
388 %{dracutlibdir}/modules.d
/98usrmount
389 %{dracutlibdir}/modules.d
/99base
390 %{dracutlibdir}/modules.d
/99fs
-lib
391 %{dracutlibdir}/modules.d
/99img
-lib
392 %{dracutlibdir}/modules.d
/99shutdown
393 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
394 %dir %{_sharedstatedir}/initramfs
395 %if %{defined _unitdir}
396 %{_unitdir}/dracut
-shutdown.service
397 %{_unitdir}/shutdown.target.wants
/dracut
-shutdown.service
398 %{_unitdir}/dracut
-cmdline.service
399 %{_unitdir}/dracut
-initqueue.service
400 %{_unitdir}/dracut
-mount.service
401 %{_unitdir}/dracut
-pre
-mount.service
402 %{_unitdir}/dracut
-pre
-pivot.service
403 %{_unitdir}/dracut
-pre
-trigger.service
404 %{_unitdir}/dracut
-pre
-udev.service
405 %{_unitdir}/initrd.target.wants
/dracut
-cmdline.service
406 %{_unitdir}/initrd.target.wants
/dracut
-initqueue.service
407 %{_unitdir}/initrd.target.wants
/dracut
-mount.service
408 %{_unitdir}/initrd.target.wants
/dracut
-pre
-mount.service
409 %{_unitdir}/initrd.target.wants
/dracut
-pre
-pivot.service
410 %{_unitdir}/initrd.target.wants
/dracut
-pre
-trigger.service
411 %{_unitdir}/initrd.target.wants
/dracut
-pre
-udev.service
414 %if 0%{?fedora} || 0%{?rhel} > 6
415 %{_prefix}/lib
/kernel
/install.d
/50-dracut.
install
419 %defattr(-,root
,root
,0755)
420 %{dracutlibdir}/modules.d
/40network
421 %{dracutlibdir}/modules.d
/95fcoe
422 %{dracutlibdir}/modules.d
/95iscsi
423 %{dracutlibdir}/modules.d
/90livenet
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)
449 %{dracutlibdir}/modules.d
/02fips
-aesni
452 %defattr(-,root
,root
,0755)
453 %{dracutlibdir}/modules.d
/02caps
456 %defattr(-,root
,root
,0755)
459 %doc %{_mandir}/man8
/dracut
-catimages
.8*
462 %{_bindir}/dracut
-catimages
465 %dir /var
/lib
/dracut
/overlay
467 %files config
-generic
468 %defattr(-,root
,root
,0755)
469 %{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
472 %defattr(-,root
,root
,0755)
473 %{dracutlibdir}/dracut.conf.d
/02-rescue.conf
474 %if 0%{?fedora} || 0%{?rhel} > 6
475 %{_prefix}/lib
/kernel
/install.d
/51-dracut
-rescue.
install
476 %{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh