1 %define dracutlibdir
%{_prefix}/lib
/dracut
4 # We ship a .pc file but don't want to have a dep on pkg-config. We
5 # strip the automatically generated dep here and instead co-own the
7 %global __requires_exclude pkg
-config
8 %define dist_free_release xxx
12 Release: %{dist_free_release}%{?dist}
14 Summary: Initramfs generator using udev
15 %if 0%{?fedora} || 0%{?rhel}
16 Group: System Environment
/Base
22 # The entire source code is GPLv2+
23 # except install/* which is LGPLv2+
24 License: GPLv2
+ and LGPLv2
+
26 URL: https
://dracut.wiki.kernel.org
/
28 # Source can be generated by
29 # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
30 Source0: http
://www.kernel.org
/pub
/linux
/utils
/boot
/dracut
/dracut
-%{version}.tar.xz
31 Source1: https
://www.gnu.org
/licenses
/lgpl
-2.1.txt
35 BuildRequires
: pkgconfig
(libkmod
) >= 23
38 %if 0%{?fedora} || 0%{?rhel}
39 BuildRequires
: pkgconfig
40 BuildRequires
: systemd
43 BuildRequires
: bash
-completion
47 %if 0%{?fedora} || 0%{?rhel}
48 BuildRequires
: docbook
-style
-xsl docbook
-dtds libxslt
52 BuildRequires
: docbook
-xsl
-stylesheets libxslt
55 BuildRequires
: asciidoc
58 %if 0%{?suse_version} > 9999
59 Obsoletes
: mkinitrd
< 2.6.1
60 Provides: mkinitrd
= 2.6.1
63 Obsoletes
: dracut
-fips
<= 047
64 Provides: dracut
-fips
= %{version}-%{release}
65 Obsoletes
: dracut
-fips
-aesni
<= 047
66 Provides: dracut
-fips
-aesni
= %{version}-%{release}
71 Requires: filesystem
>= 2.1.0
79 %if 0%{?fedora} || 0%{?rhel}
83 Requires: util
-linux
>= 2.21
84 Requires: systemd
>= 219
85 Requires: systemd
-udev
>= 219
92 Requires: util
-linux
-ng
>= 2.21
95 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
96 Requires: libkcapi
-hmaccalc
100 dracut contains tools to create bootable initramfses
for the Linux
101 kernel. Unlike previous implementations
, dracut hard
-codes as little
102 as possible into the initramfs. dracut contains various modules which
103 are driven by the event
-based udev. Having root on MD
, DM
, LVM2
, LUKS
104 is supported as well as NFS
, iSCSI
, NBD
, FCoE with the dracut
-network
108 Summary: dracut modules to build a dracut initramfs with network support
109 %if 0%{?_module_build}
110 # In the module-build-service, we have pieces of dracut provided by different
111 # modules ("base-runtime" provides most functionality, but we need
112 # dracut-network in "installer". Since these two modules build with separate
113 # dist-tags, we need to reduce this strict requirement to ignore the dist-tag.
114 Requires: %{name} >= %{version}-%{dist_free_release}
116 Requires: %{name} = %{version}-%{release}
120 Requires: (NetworkManager
>= 1.20 or dhclient
)
121 Suggests
: NetworkManager
122 Obsoletes
: dracut
-generic
< 008
123 Provides: dracut
-generic
= %{version}-%{release}
126 This package requires everything which is needed to build a generic
127 all purpose initramfs with network support with dracut.
130 Summary: dracut modules to build a dracut initramfs which drops capabilities
131 Requires: %{name} = %{version}-%{release}
135 This package requires everything which is needed to build an
136 initramfs with dracut
, which drops capabilities.
139 Summary: dracut modules to build a dracut initramfs with live image capabilities
140 %if 0%{?_module_build}
141 # See the network subpackage comment.
142 Requires: %{name} >= %{version}-%{dist_free_release}
144 Requires: %{name} = %{version}-%{release}
146 Requires: %{name}-network = %{version}-%{release}
147 Requires: tar gzip coreutils bash device
-mapper curl
149 Requires: fuse ntfs
-3g
153 This package requires everything which is needed to build an
154 initramfs with dracut
, with live image capabilities
, like Live CDs.
156 %package config
-generic
157 Summary: dracut configuration to turn off hostonly image generation
158 Requires: %{name} = %{version}-%{release}
159 Obsoletes
: dracut
-nohostonly
< 030
160 Provides: dracut
-nohostonly
= %{version}-%{release}
162 %description config
-generic
163 This package provides the configuration to turn off the host specific initramfs
164 generation with dracut and generates a generic image by default.
166 %package config
-rescue
167 Summary: dracut configuration to turn on rescue image generation
168 Requires: %{name} = %{version}-%{release}
169 Obsoletes
: dracut
< 030
171 %description config
-rescue
172 This package provides the configuration to turn on the rescue initramfs
173 generation with dracut.
176 Summary: dracut tools to build the
local initramfs
177 Requires: %{name} = %{version}-%{release}
180 This package contains tools to assemble the
local initrd and host configuration.
183 Summary: dracut module to build an initramfs with most files
in a squashfs image
184 Requires: %{name} = %{version}-%{release}
185 Requires: squashfs
-tools
188 This package provides a dracut module to build an initramfs
, but store most files
189 in a squashfs image
, result
in a smaller initramfs size and reduce runtime memory
193 %autosetup -n
%{name}-%{version} -S git_am
197 %configure --systemdsystemunitdir
=%{_unitdir} \
198 --bashcompletiondir
=$
(pkg
-config
--variable
=completionsdir bash
-completion
) \
199 --libdir
=%{_prefix}/lib \
201 --disable
-documentation \
208 make %{?_smp_mflags} install \
209 DESTDIR
=$RPM_BUILD_ROOT \
210 libdir
=%{_prefix}/lib
212 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
214 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
215 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
218 %if %{defined _unitdir}
219 # for systemd, better use systemd-bootchart
220 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00bootchart
223 # we do not support dash in the initramfs
224 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
226 # we do not support mksh in the initramfs
227 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00mksh
229 # remove gentoo specific modules
230 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
232 %if %{defined _unitdir}
233 # with systemd IMA and selinux modules do not make sense
234 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
235 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
236 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
240 # remove architecture specific modules
241 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/80cms
242 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/81cio_ignore
243 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/91zipl
244 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95dasd
245 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95dasd_mod
246 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95dasd_rules
247 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95dcssblk
248 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95qeth_rules
249 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95zfcp
250 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95zfcp_rules
251 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/95znet
253 rm -fr
-- $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00warpclock
256 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
257 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
258 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
259 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
260 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
262 %if 0%{?fedora} || 0%{?rhel}
263 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
265 %if 0%{?suse_version}
266 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
%{dracutlibdir}/dracut.conf.d
/01-dist.conf
268 rm -f $RPM_BUILD_ROOT
%{_mandir}/man?
/*suse
*
271 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
272 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
273 rm -f
-- $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
274 rm -f
-- $RPM_BUILD_ROOT
%{_mandir}/man8
/mkinitrd
.8*
275 rm -f
-- $RPM_BUILD_ROOT
%{_mandir}/man1
/lsinitrd
.1*
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
281 %if 0%{?fedora} || 0%{?rhel}
282 # FIXME: remove after F30
283 mkdir -p $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
284 install -m
0755 51-dracut
-rescue
-postinst.sh $RPM_BUILD_ROOT
%{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh
289 %doc README.md HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
291 %{!?_licensedir:%global license %%doc}
292 %license COPYING lgpl
-2.1.txt
294 %{_datadir}/bash
-completion
/completions
/dracut
295 %{_datadir}/bash
-completion
/completions
/lsinitrd
296 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
301 %dir %{dracutlibdir}/modules.d
302 %{dracutlibdir}/dracut
-functions.sh
303 %{dracutlibdir}/dracut
-init.sh
304 %{dracutlibdir}/dracut
-functions
305 %{dracutlibdir}/dracut
-version.sh
306 %{dracutlibdir}/dracut
-logger.sh
307 %{dracutlibdir}/dracut
-initramfs
-restore
308 %{dracutlibdir}/dracut
-install
309 %{dracutlibdir}/skipcpio
310 %config(noreplace
) %{_sysconfdir}/dracut.conf
311 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
312 %{dracutlibdir}/dracut.conf.d
/01-dist.conf
314 %dir %{_sysconfdir}/dracut.conf.d
315 %dir %{dracutlibdir}/dracut.conf.d
316 %dir %{_datadir}/pkgconfig
317 %{_datadir}/pkgconfig
/dracut.pc
320 %{_mandir}/man8
/dracut
.8*
321 %{_mandir}/man8
/*service
.8*
322 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
323 %{_mandir}/man8
/mkinitrd
.8*
324 %{_mandir}/man1
/lsinitrd
.1*
326 %if 0%{?suse_version}
327 %{_mandir}/man8
/mkinitrd
-suse
.8*
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 %{undefined _unitdir}
337 %{dracutlibdir}/modules.d
/00bootchart
339 %{dracutlibdir}/modules.d
/00bash
340 %{dracutlibdir}/modules.d
/00systemd
342 %{dracutlibdir}/modules.d
/00warpclock
344 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
345 %{dracutlibdir}/modules.d
/01fips
347 %{dracutlibdir}/modules.d
/01systemd
-initrd
348 %{dracutlibdir}/modules.d
/03modsign
349 %{dracutlibdir}/modules.d
/03rescue
350 %{dracutlibdir}/modules.d
/04watchdog
351 %{dracutlibdir}/modules.d
/05busybox
352 %{dracutlibdir}/modules.d
/06rngd
353 %{dracutlibdir}/modules.d
/10i18n
354 %{dracutlibdir}/modules.d
/30convertfs
355 %{dracutlibdir}/modules.d
/45url
-lib
356 %{dracutlibdir}/modules.d
/50drm
357 %{dracutlibdir}/modules.d
/50plymouth
358 %{dracutlibdir}/modules.d
/80lvmmerge
359 %{dracutlibdir}/modules.d
/90btrfs
360 %{dracutlibdir}/modules.d
/90crypt
361 %{dracutlibdir}/modules.d
/90dm
362 %{dracutlibdir}/modules.d
/90dmraid
363 %{dracutlibdir}/modules.d
/90kernel
-modules
364 %{dracutlibdir}/modules.d
/90kernel
-modules
-extra
365 %{dracutlibdir}/modules.d
/90lvm
366 %{dracutlibdir}/modules.d
/90mdraid
367 %{dracutlibdir}/modules.d
/90multipath
368 %{dracutlibdir}/modules.d
/90stratis
369 %{dracutlibdir}/modules.d
/90ppcmac
370 %{dracutlibdir}/modules.d
/90qemu
371 %{dracutlibdir}/modules.d
/91crypt
-gpg
372 %{dracutlibdir}/modules.d
/91crypt
-loop
373 %{dracutlibdir}/modules.d
/95debug
374 %{dracutlibdir}/modules.d
/95fstab
-sys
375 %{dracutlibdir}/modules.d
/95lunmask
376 %{dracutlibdir}/modules.d
/95resume
377 %{dracutlibdir}/modules.d
/95rootfs
-block
378 %{dracutlibdir}/modules.d
/95terminfo
379 %{dracutlibdir}/modules.d
/95udev
-rules
380 %{dracutlibdir}/modules.d
/95virtfs
382 %{dracutlibdir}/modules.d
/80cms
383 %{dracutlibdir}/modules.d
/81cio_ignore
384 %{dracutlibdir}/modules.d
/91zipl
385 %{dracutlibdir}/modules.d
/95dasd
386 %{dracutlibdir}/modules.d
/95dasd_mod
387 %{dracutlibdir}/modules.d
/95dasd_rules
388 %{dracutlibdir}/modules.d
/95dcssblk
389 %{dracutlibdir}/modules.d
/95qeth_rules
390 %{dracutlibdir}/modules.d
/95zfcp
391 %{dracutlibdir}/modules.d
/95zfcp_rules
393 %if %{undefined _unitdir}
394 %{dracutlibdir}/modules.d
/96securityfs
395 %{dracutlibdir}/modules.d
/97masterkey
396 %{dracutlibdir}/modules.d
/98integrity
398 %{dracutlibdir}/modules.d
/97biosdevname
399 %{dracutlibdir}/modules.d
/98dracut
-systemd
400 %{dracutlibdir}/modules.d
/98ecryptfs
401 %{dracutlibdir}/modules.d
/98pollcdrom
402 %{dracutlibdir}/modules.d
/98selinux
403 %{dracutlibdir}/modules.d
/98syslog
404 %{dracutlibdir}/modules.d
/98usrmount
405 %{dracutlibdir}/modules.d
/99base
406 %{dracutlibdir}/modules.d
/99fs
-lib
407 %{dracutlibdir}/modules.d
/99shutdown
408 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
409 %dir %{_sharedstatedir}/initramfs
410 %if %{defined _unitdir}
411 %{_unitdir}/dracut
-shutdown.service
412 %{_unitdir}/sysinit.target.wants
/dracut
-shutdown.service
413 %{_unitdir}/dracut
-cmdline.service
414 %{_unitdir}/dracut
-initqueue.service
415 %{_unitdir}/dracut
-mount.service
416 %{_unitdir}/dracut
-pre
-mount.service
417 %{_unitdir}/dracut
-pre
-pivot.service
418 %{_unitdir}/dracut
-pre
-trigger.service
419 %{_unitdir}/dracut
-pre
-udev.service
420 %{_unitdir}/initrd.target.wants
/dracut
-cmdline.service
421 %{_unitdir}/initrd.target.wants
/dracut
-initqueue.service
422 %{_unitdir}/initrd.target.wants
/dracut
-mount.service
423 %{_unitdir}/initrd.target.wants
/dracut
-pre
-mount.service
424 %{_unitdir}/initrd.target.wants
/dracut
-pre
-pivot.service
425 %{_unitdir}/initrd.target.wants
/dracut
-pre
-trigger.service
426 %{_unitdir}/initrd.target.wants
/dracut
-pre
-udev.service
428 %{_prefix}/lib
/kernel
/install.d
/50-dracut.
install
431 %{dracutlibdir}/modules.d
/02systemd
-networkd
432 %{dracutlibdir}/modules.d
/35network
-manager
433 %{dracutlibdir}/modules.d
/35network
-legacy
434 %{dracutlibdir}/modules.d
/40network
435 %{dracutlibdir}/modules.d
/45ifcfg
436 %{dracutlibdir}/modules.d
/90kernel
-network
-modules
437 %{dracutlibdir}/modules.d
/90qemu
-net
438 %{dracutlibdir}/modules.d
/95cifs
439 %{dracutlibdir}/modules.d
/95fcoe
440 %{dracutlibdir}/modules.d
/95fcoe
-uefi
441 %{dracutlibdir}/modules.d
/95iscsi
442 %{dracutlibdir}/modules.d
/95nbd
443 %{dracutlibdir}/modules.d
/95nfs
444 %{dracutlibdir}/modules.d
/95ssh
-client
446 %{dracutlibdir}/modules.d
/95znet
448 %{dracutlibdir}/modules.d
/99uefi
-lib
451 %{dracutlibdir}/modules.d
/02caps
454 %{dracutlibdir}/modules.d
/99img
-lib
455 %{dracutlibdir}/modules.d
/90dmsquash
-live
456 %{dracutlibdir}/modules.d
/90dmsquash
-live
-ntfs
457 %{dracutlibdir}/modules.d
/90livenet
461 %doc %{_mandir}/man8
/dracut
-catimages
.8*
464 %{_bindir}/dracut
-catimages
467 %dir /var
/lib
/dracut
/overlay
470 %{dracutlibdir}/modules.d
/99squash
472 %files config
-generic
473 %{dracutlibdir}/dracut.conf.d
/02-generic
-image.conf
476 %{dracutlibdir}/dracut.conf.d
/02-rescue.conf
477 %{_prefix}/lib
/kernel
/install.d
/51-dracut
-rescue.
install
478 %if 0%{?fedora} || 0%{?rhel}
479 # FIXME: remove after F30
480 %{_sysconfdir}/kernel
/postinst.d
/51-dracut
-rescue
-postinst.sh