1 %define dracutlibdir
%{_prefix}/lib
/dracut
3 # Variables must be defined
15 Summary: Initramfs generator using udev
16 %if 0%{?fedora} || 0%{?rhel}
17 Group: System Environment
/Base
23 # The entire source code is GPLv2+
24 # except install/* which is LGPLv2.1+
25 License: GPLv2
+ and LGPLv2.1
+
27 URL: https
://dracut.wiki.kernel.org
/
29 # Source can be generated by
30 # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
31 Source0: http
://www.kernel.org
/pub
/linux
/utils
/boot
/dracut
/dracut
-%{version}.tar.bz2
33 BuildRequires
: dash bash git
35 %if 0%{?fedora} || 0%{?rhel}
36 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
39 BuildRoot: %{_tmppath}/%{name}-%{version}-build
42 %if 0%{?fedora} || 0%{?rhel}
43 BuildRequires
: docbook
-style
-xsl docbook
-dtds libxslt
47 -BuildRequires
: docbook
-xsl
-stylesheets libxslt
50 BuildRequires
: asciidoc
52 %if 0%{?fedora} > 12 || 0%{?rhel}
53 # no "provides", because dracut does not offer
54 # all functionality of the obsoleted packages
55 Obsoletes
: mkinitrd
<= 6.0.93
56 Obsoletes
: mkinitrd
-devel
<= 6.0.93
57 Obsoletes
: nash
<= 6.0.93
58 Obsoletes
: libbdevid
-python
<= 6.0.93
61 %if 0%{?fedora} > 16 || 0%{?rhel} > 6
62 BuildRequires
: systemd
-units
65 %if 0%{?suse_version} > 9999
66 Obsoletes
: mkinitrd
< 2.6.1
67 Provides: mkinitrd
= 2.6.1
70 Obsoletes
: dracut
-kernel
< 005
71 Provides: dracut
-kernel
= %{version}-%{release}
76 Requires: filesystem
>= 2.1.0
81 Requires: module
-init
-tools
>= 3.7-9
86 %if 0%{?fedora} || 0%{?rhel} > 6
87 Requires: util
-linux
>= 2.21
88 Conflicts: systemd
< 187
90 Requires: util
-linux
-ng
>= 2.21
93 %if 0%{?fedora} || 0%{?rhel} > 6
94 Conflicts: initscripts
< 8.63-1
95 Conflicts: plymouth
< 0.8.0-0.2009.29.09.19.1
99 Dracut contains tools to create a bootable initramfs
for 2.6 Linux kernels.
100 Unlike existing implementations
, dracut does hard
-code as little as possible
101 into the initramfs. Dracut contains various modules which are driven by the
102 event
-based udev. Having root on MD
, DM
, LVM2
, LUKS is supported as well as
103 NFS
, iSCSI
, NBD
, FCoE with the dracut
-network package.
106 Summary: Dracut modules to build a dracut initramfs with network support
107 Requires: %{name} = %{version}-%{release}
108 Obsoletes
: dracut
-generic
< 008
109 Provides: dracut
-generic
= %{version}-%{release}
112 This package requires everything which is needed to build a generic
113 all purpose initramfs with network support with dracut.
115 %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
117 Summary: Dracut modules to build a dracut initramfs with an integrity check
118 Requires: %{name} = %{version}-%{release}
121 # For Alpha 3, we want nss instead of nss-softokn
124 Requires: nss
-softokn
126 Requires: nss
-softokn
-freebl
129 This package requires everything which is needed to build an
130 all purpose initramfs with dracut
, which does an integrity check.
134 Summary: Dracut modules to build a dracut initramfs with an integrity check with aesni
-intel
135 Requires: %{name}-fips = %{version}-%{release}
137 %description fips
-aesni
138 This package requires everything which is needed to build an
139 all purpose initramfs with dracut
, which does an integrity check
140 and adds the aesni
-intel kernel module.
143 Summary: Dracut modules to build a dracut initramfs which drops capabilities
144 Requires: %{name} = %{version}-%{release}
148 This package requires everything which is needed to build an
149 all purpose initramfs with dracut
, which drops capabilities.
152 Summary: Dracut tools to build the
local initramfs
153 Requires: %{name} = %{version}-%{release}
156 This package contains tools to assemble the
local initrd and host configuration.
159 %setup -q
-n
%{name}-%{version}
161 %if %{defined PATCH1}
163 git config user.email "dracut
-maint@redhat.com"
164 git config user.name "Fedora dracut team"
166 git commit
-a
-q
-m "
%{version} baseline."
168 # Apply all the patches.
169 git am
-p1
%{patches}
176 %if 0%{?fedora} || 0%{?rhel}
177 rm -rf $RPM_BUILD_ROOT
179 make install DESTDIR
=$RPM_BUILD_ROOT \
180 libdir
=%{_prefix}/lib \
182 %if %{defined _unitdir}
183 systemdsystemunitdir
=%{_unitdir} \
185 sysconfdir
=/etc mandir
=%{_mandir}
187 echo "DRACUT_VERSION
=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut
-version.sh
189 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
190 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/01fips
191 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/02fips
-aesni
194 # we do not support dash in the initramfs
195 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/00dash
197 # remove gentoo specific modules
198 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/50gensplash
200 %if %{defined _unitdir}
201 # with systemd IMA and selinux modules do not make sense
202 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/96securityfs
203 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/97masterkey
204 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98integrity
205 rm -fr $RPM_BUILD_ROOT
/%{dracutlibdir}/modules.d
/98selinux
208 mkdir -p $RPM_BUILD_ROOT
/boot
/dracut
209 mkdir -p $RPM_BUILD_ROOT
/var
/lib
/dracut
/overlay
210 mkdir -p $RPM_BUILD_ROOT
%{_localstatedir}/log
211 touch $RPM_BUILD_ROOT
%{_localstatedir}/log
/dracut.log
212 mkdir -p $RPM_BUILD_ROOT
%{_sharedstatedir}/initramfs
214 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
215 install -m
0644 dracut.conf.d
/fedora.conf.example $RPM_BUILD_ROOT
/etc
/dracut.conf.d
/01-dist.conf
216 install -m
0644 dracut.conf.d
/fips.conf.example $RPM_BUILD_ROOT
/etc
/dracut.conf.d
/40-fips.conf
219 %if 0%{?suse_version}
220 install -m
0644 dracut.conf.d
/suse.conf.example $RPM_BUILD_ROOT
/etc
/dracut.conf.d
/01-dist.conf
223 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
224 rm $RPM_BUILD_ROOT
%{_bindir}/mkinitrd
225 rm $RPM_BUILD_ROOT
%{_bindir}/lsinitrd
228 mkdir -p $RPM_BUILD_ROOT
/etc
/logrotate.d
229 install -m
0644 dracut.logrotate $RPM_BUILD_ROOT
/etc
/logrotate.d
/dracut_log
231 # create compat symlink
232 mkdir -p $RPM_BUILD_ROOT
/sbin
233 ln
-s
/usr
/bin
/dracut $RPM_BUILD_ROOT
/sbin
/dracut
236 rm -rf $RPM_BUILD_ROOT
239 %defattr(-,root
,root
,0755)
240 %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
244 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
249 %dir %{dracutlibdir}/modules.d
250 %{dracutlibdir}/dracut
-functions.sh
251 %{dracutlibdir}/dracut
-functions
252 %{dracutlibdir}/dracut
-version.sh
253 %{dracutlibdir}/dracut
-logger.sh
254 %{dracutlibdir}/dracut
-initramfs
-restore
255 %{dracutlibdir}/dracut
-install
256 %config(noreplace
) /etc
/dracut.conf
257 %if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
258 %config /etc
/dracut.conf.d
/01-dist.conf
260 %dir /etc
/dracut.conf.d
261 %{_mandir}/man8
/dracut
.8*
262 %{_mandir}/man8
/*service
.8*
263 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
264 %{_mandir}/man8
/mkinitrd
.8*
265 %{_mandir}/man1
/lsinitrd
.1*
267 %{_mandir}/man7
/dracut.kernel
.7*
268 %{_mandir}/man7
/dracut.cmdline
.7*
269 %{_mandir}/man5
/dracut.conf
.5*
270 %{dracutlibdir}/modules.d
/00bootchart
271 %{dracutlibdir}/modules.d
/04watchdog
272 %{dracutlibdir}/modules.d
/05busybox
273 %{dracutlibdir}/modules.d
/10i18n
274 %{dracutlibdir}/modules.d
/30convertfs
275 %{dracutlibdir}/modules.d
/45url
-lib
276 %{dracutlibdir}/modules.d
/50plymouth
277 %{dracutlibdir}/modules.d
/80cms
278 %{dracutlibdir}/modules.d
/90btrfs
279 %{dracutlibdir}/modules.d
/90crypt
280 %{dracutlibdir}/modules.d
/90dm
281 %{dracutlibdir}/modules.d
/90dmraid
282 %{dracutlibdir}/modules.d
/90dmsquash
-live
283 %{dracutlibdir}/modules.d
/90kernel
-modules
284 %{dracutlibdir}/modules.d
/90lvm
285 %{dracutlibdir}/modules.d
/90mdraid
286 %{dracutlibdir}/modules.d
/90multipath
287 %{dracutlibdir}/modules.d
/90qemu
288 %{dracutlibdir}/modules.d
/91crypt
-gpg
289 %{dracutlibdir}/modules.d
/91crypt
-loop
290 %{dracutlibdir}/modules.d
/95debug
291 %{dracutlibdir}/modules.d
/95resume
292 %{dracutlibdir}/modules.d
/95rootfs
-block
293 %{dracutlibdir}/modules.d
/95dasd
294 %{dracutlibdir}/modules.d
/95dasd_mod
295 %{dracutlibdir}/modules.d
/95fstab
-sys
296 %{dracutlibdir}/modules.d
/95zfcp
297 %{dracutlibdir}/modules.d
/95terminfo
298 %{dracutlibdir}/modules.d
/95udev
-rules
299 %{dracutlibdir}/modules.d
/95virtfs
300 %if %{undefined _unitdir}
301 %{dracutlibdir}/modules.d
/96securityfs
302 %{dracutlibdir}/modules.d
/97masterkey
303 %{dracutlibdir}/modules.d
/98selinux
304 %{dracutlibdir}/modules.d
/98integrity
306 %{dracutlibdir}/modules.d
/97biosdevname
307 %{dracutlibdir}/modules.d
/98ecryptfs
308 %{dracutlibdir}/modules.d
/98pollcdrom
309 %{dracutlibdir}/modules.d
/98syslog
310 %{dracutlibdir}/modules.d
/98systemd
311 %{dracutlibdir}/modules.d
/98usrmount
312 %{dracutlibdir}/modules.d
/99base
313 %{dracutlibdir}/modules.d
/99fs
-lib
314 %{dracutlibdir}/modules.d
/99img
-lib
315 %{dracutlibdir}/modules.d
/99shutdown
316 %config(noreplace
) /etc
/logrotate.d
/dracut_log
317 %attr(0644,root
,root
) %ghost %config(missingok
,noreplace
) %{_localstatedir}/log
/dracut.log
318 %dir %{_sharedstatedir}/initramfs
319 %if %{defined _unitdir}
320 %{_unitdir}/dracut
-shutdown.service
321 %{_unitdir}/shutdown.target.wants
/dracut
-shutdown.service
325 %defattr(-,root
,root
,0755)
326 %{dracutlibdir}/modules.d
/40network
327 %{dracutlibdir}/modules.d
/95fcoe
328 %{dracutlibdir}/modules.d
/95iscsi
329 %{dracutlibdir}/modules.d
/90livenet
330 %{dracutlibdir}/modules.d
/90qemu
-net
331 %{dracutlibdir}/modules.d
/95nbd
332 %{dracutlibdir}/modules.d
/95nfs
333 %{dracutlibdir}/modules.d
/95ssh
-client
334 %{dracutlibdir}/modules.d
/45ifcfg
335 %{dracutlibdir}/modules.d
/95znet
337 %if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
339 %defattr(-,root
,root
,0755)
340 %{dracutlibdir}/modules.d
/01fips
341 %config(noreplace
) /etc
/dracut.conf.d
/40-fips.conf
345 %defattr(-,root
,root
,0755)
347 %{dracutlibdir}/modules.d
/02fips
-aesni
350 %defattr(-,root
,root
,0755)
351 %{dracutlibdir}/modules.d
/02caps
354 %defattr(-,root
,root
,0755)
355 %{_mandir}/man8
/dracut
-catimages
.8*
356 %{_bindir}/dracut
-catimages
359 %dir /var
/lib
/dracut
/overlay