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.
171 %package config
-generic
172 Summary: dracut configuration to turn off hostonly image generation
173 Requires: %{name} = %{version}-%{release}
174 Obsoletes
: dracut
-nohostonly
175 Provides: dracut
-nohostonly
177 %description config
-generic
178 This package provides the configuration to turn off the host specific initramfs
179 generation with dracut and generates a generic image by default.
181 %package config
-rescue
182 Summary: dracut configuration to turn on rescue image generation
183 Requires: %{name} = %{version}-%{release}
184 Obsoletes
: dracut
<= 029
186 %description config
-rescue
187 This package provides the configuration to turn on the rescue initramfs
188 generation with dracut.
191 Summary: dracut tools to build the
local initramfs
192 Requires: %{name} = %{version}-%{release}
195 This package contains tools to assemble the
local initrd and host configuration.
198 %setup -q
-n
%{name}-%{version}
201 %if %{defined PATCH1}
203 git config user.email "dracut
-maint@redhat.com"
204 git config user.name "Fedora dracut team"
206 git commit
-a
-q
-m "
%{version} baseline."
208 # Apply all the patches.
209 git am
-p1
%{patches}
213 %configure --systemdsystemunitdir
=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
215 --disable
-documentation
221 %if 0%{?fedora} || 0%{?rhel}
222 rm -rf
-- $RPM_BUILD_ROOT
224 make %{?_smp_mflags} install \
225 DESTDIR
=$RPM_BUILD_ROOT \
226 libdir
=%{_prefix}/lib
228 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
230 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
231 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
232 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/02fips
-aesni
235 %if %{defined _unitdir}
236 # for systemd, better use systemd-bootchart
237 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00bootchart
240 # we do not support dash in the initramfs
241 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
243 # remove gentoo specific modules
244 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
246 %if %{defined _unitdir}
247 # with systemd IMA and selinux modules do not make sense
248 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
249 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
250 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
253 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
254 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
255 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
256 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
257 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
259 %if 0%{?fedora} || 0%{?rhel}
260 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
261 rm -f $RPM_BUILD_ROOT
%{_mandir}/man?
/*suse
*
263 %if 0%{?suse_version}
264 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
267 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
268 install -m
0644 dracut.conf.d
/fips.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/40-fips.conf
271 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
272 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
273 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
276 %if 0%{?fedora} || 0%{?rhel} > 6
277 # FIXME: remove after F19
278 mkdir -p $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
279 install -m
0755 51-dracut
-rescue
-postinst.sh $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh
281 echo 'hostonly
="no"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
282 echo 'dracut_rescue_image
="yes"'
> $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/02-rescue.conf
285 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
286 > $RPM_BUILD_ROOT
/etc
/system
-fips
289 # create compat symlink
290 mkdir -p $RPM_BUILD_ROOT
%{_sbindir}
291 ln
-sr $RPM_BUILD_ROOT
%{_bindir}/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
294 rm -rf
-- $RPM_BUILD_ROOT
297 %defattr(-,root
,root
,0755)
299 %doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
301 %{!?_licensedir:%global license %%doc}
302 %license COPYING lgpl
-2.1.txt
306 %{_datadir}/bash
-completion
/completions
/dracut
307 %{_datadir}/bash
-completion
/completions
/lsinitrd
308 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
313 %dir %{dracutlibdir}/modules.d
314 %{dracutlibdir}/dracut
-functions.sh
315 %{dracutlibdir}/dracut
-functions
316 %{dracutlibdir}/dracut
-version.sh
317 %{dracutlibdir}/dracut
-logger.sh
318 %{dracutlibdir}/dracut
-initramfs
-restore
319 %{dracutlibdir}/dracut
-install
320 %{dracutlibdir}/skipcpio
321 %config(noreplace
) %{_sysconfdir}/dracut.conf
322 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
323 %{dracutlibdir}/dracut.conf.d
/01-dist.conf
325 %dir %{_sysconfdir}/dracut.conf.d
326 %dir %{dracutlibdir}/dracut.conf.d
329 %{_mandir}/man8
/dracut
.8*
330 %{_mandir}/man8
/*service
.8*
331 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
332 %{_mandir}/man8
/mkinitrd
.8*
333 %{_mandir}/man1
/lsinitrd
.1*
335 %{_mandir}/man7
/dracut.kernel
.7*
336 %{_mandir}/man7
/dracut.cmdline
.7*
337 %{_mandir}/man7
/dracut.modules
.7*
338 %{_mandir}/man7
/dracut.bootup
.7*
339 %{_mandir}/man5
/dracut.conf
.5*
342 %if %{defined _unitdir}
343 %{dracutlibdir}/modules.d
/00systemd
-bootchart
345 %{dracutlibdir}/modules.d
/00bootchart
347 %{dracutlibdir}/modules.d
/00bash
348 %{dracutlibdir}/modules.d
/03modsign
349 %{dracutlibdir}/modules.d
/03rescue
350 %{dracutlibdir}/modules.d
/04watchdog
351 %{dracutlibdir}/modules.d
/05busybox
352 %{dracutlibdir}/modules.d
/10i18n
353 %{dracutlibdir}/modules.d
/30convertfs
354 %{dracutlibdir}/modules.d
/45url
-lib
355 %{dracutlibdir}/modules.d
/50drm
356 %{dracutlibdir}/modules.d
/50plymouth
357 %{dracutlibdir}/modules.d
/80cms
358 %{dracutlibdir}/modules.d
/90btrfs
359 %{dracutlibdir}/modules.d
/90crypt
360 %{dracutlibdir}/modules.d
/90dm
361 %{dracutlibdir}/modules.d
/90dmraid
362 %{dracutlibdir}/modules.d
/90dmsquash
-live
363 %{dracutlibdir}/modules.d
/90kernel
-modules
364 %{dracutlibdir}/modules.d
/90lvm
365 %{dracutlibdir}/modules.d
/90mdraid
366 %{dracutlibdir}/modules.d
/90multipath
367 %{dracutlibdir}/modules.d
/90qemu
368 %{dracutlibdir}/modules.d
/91crypt
-gpg
369 %{dracutlibdir}/modules.d
/91crypt
-loop
370 %{dracutlibdir}/modules.d
/95debug
371 %{dracutlibdir}/modules.d
/95resume
372 %{dracutlibdir}/modules.d
/95rootfs
-block
373 %{dracutlibdir}/modules.d
/95dasd
374 %{dracutlibdir}/modules.d
/95dasd_mod
375 %{dracutlibdir}/modules.d
/95dasd_rules
376 %{dracutlibdir}/modules.d
/95fstab
-sys
377 %{dracutlibdir}/modules.d
/95zfcp
378 %{dracutlibdir}/modules.d
/95zfcp_rules
379 %{dracutlibdir}/modules.d
/95terminfo
380 %{dracutlibdir}/modules.d
/95udev
-rules
381 %{dracutlibdir}/modules.d
/95virtfs
382 %if %{undefined _unitdir}
383 %{dracutlibdir}/modules.d
/96securityfs
384 %{dracutlibdir}/modules.d
/97masterkey
385 %{dracutlibdir}/modules.d
/98integrity
387 %{dracutlibdir}/modules.d
/97biosdevname
388 %{dracutlibdir}/modules.d
/98ecryptfs
389 %{dracutlibdir}/modules.d
/98pollcdrom
390 %{dracutlibdir}/modules.d
/98selinux
391 %{dracutlibdir}/modules.d
/98syslog
392 %{dracutlibdir}/modules.d
/98systemd
393 %{dracutlibdir}/modules.d
/98usrmount
394 %{dracutlibdir}/modules.d
/99base
395 %{dracutlibdir}/modules.d
/99fs
-lib
396 %{dracutlibdir}/modules.d
/99img
-lib
397 %{dracutlibdir}/modules.d
/99shutdown
398 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
399 %dir %{_sharedstatedir}/initramfs
400 %if %{defined _unitdir}
401 %{_unitdir}/dracut
-shutdown.service
402 %{_unitdir}/sysinit.target.wants
/dracut
-shutdown.service
403 %{_unitdir}/dracut
-cmdline.service
404 %{_unitdir}/dracut
-initqueue.service
405 %{_unitdir}/dracut
-mount.service
406 %{_unitdir}/dracut
-pre
-mount.service
407 %{_unitdir}/dracut
-pre
-pivot.service
408 %{_unitdir}/dracut
-pre
-trigger.service
409 %{_unitdir}/dracut
-pre
-udev.service
410 %{_unitdir}/initrd.target.wants
/dracut
-cmdline.service
411 %{_unitdir}/initrd.target.wants
/dracut
-initqueue.service
412 %{_unitdir}/initrd.target.wants
/dracut
-mount.service
413 %{_unitdir}/initrd.target.wants
/dracut
-pre
-mount.service
414 %{_unitdir}/initrd.target.wants
/dracut
-pre
-pivot.service
415 %{_unitdir}/initrd.target.wants
/dracut
-pre
-trigger.service
416 %{_unitdir}/initrd.target.wants
/dracut
-pre
-udev.service
419 %if 0%{?fedora} || 0%{?rhel} > 6
420 %{_prefix}/lib
/kernel
/install.d
/50-dracut.
install
424 %defattr(-,root
,root
,0755)
425 %{dracutlibdir}/modules.d
/40network
426 %{dracutlibdir}/modules.d
/95fcoe
427 %{dracutlibdir}/modules.d
/95iscsi
428 %{dracutlibdir}/modules.d
/90livenet
429 %{dracutlibdir}/modules.d
/90qemu
-net
430 %{dracutlibdir}/modules.d
/95cifs
431 %{dracutlibdir}/modules.d
/95nbd
432 %{dracutlibdir}/modules.d
/95nfs
433 %{dracutlibdir}/modules.d
/95ssh
-client
434 %{dracutlibdir}/modules.d
/45ifcfg
435 %{dracutlibdir}/modules.d
/95znet
436 %{dracutlibdir}/modules.d
/95fcoe
-uefi
437 %{dracutlibdir}/modules.d
/99uefi
-lib
439 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
441 %defattr(-,root
,root
,0755)
442 %{dracutlibdir}/modules.d
/01fips
443 %{dracutlibdir}/dracut.conf.d
/40-fips.conf
444 %config(missingok
) /etc
/system
-fips
448 %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