dracut-functions: use /proc/self/mountinfo, instead of /proc/mounts
[dracut.git] / dracut.spec
blob375652ea957e044fc16114ac0473bbdf5c3cb3d1
1 # Variables must be defined
2 %define with_switch_root 1
3 %define with_nbd 1
5 # switchroot provided by util-linux-ng in F-12+
6 %if 0%{?fedora} > 11 || 0%{?rhel} >= 6
7 %define with_switch_root 0
8 %endif
9 # nbd in Fedora only
10 %if 0%{?rhel} >= 6
11 %define with_nbd 0
12 %endif
14 %if %{defined gittag}
15 %define rdist .git%{gittag}%{?dist}
16 %define dashgittag -%{gittag}
17 %else
18 %define rdist %{?dist}
19 %endif
21 Name: dracut
22 Version: 007
23 Release: 0.1%{?rdist}
24 Summary: Initramfs generator using udev
25 Group: System Environment/Base
26 License: GPLv2+
27 URL: http://apps.sourceforge.net/trac/dracut/wiki
28 # Source can be generated by
29 # http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=snapshot;h=%{?dashgittag};sf=tgz
30 Source0: dracut-%{version}%{?dashgittag}.tar.bz2
31 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
33 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6
34 # no "provides", because dracut does not offer
35 # all functionality of the obsoleted packages
36 Obsoletes: mkinitrd <= 6.0.93
37 Obsoletes: mkinitrd-devel <= 6.0.93
38 Obsoletes: nash <= 6.0.93
39 Obsoletes: libbdevid-python <= 6.0.93
40 %endif
41 Obsoletes: dracut-kernel < 005
42 Provides: dracut-kernel = %{version}-%{release}
44 Requires: bash
45 Requires: bzip2
46 Requires: coreutils
47 Requires: cpio
48 Requires: dash
49 Requires: filesystem >= 2.1.0
50 Requires: findutils
51 Requires: grep
52 Requires: gzip
53 Requires: initscripts >= 8.63-1
54 Requires: kbd
55 Requires: mktemp >= 1.5-5
56 Requires: module-init-tools >= 3.7-9
57 Requires: mount
58 Requires: plymouth >= 0.8.0-0.2009.29.09.19.1
59 Requires: sed
60 Requires: tar
61 Requires: udev
62 Requires: util-linux-ng >= 2.16
63 Requires: which
65 %if ! 0%{?with_switch_root}
66 BuildArch: noarch
67 %endif
69 %description
70 Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels.
71 Unlike existing implementations, dracut does hard-code as little as possible
72 into the initramfs. Dracut contains various modules which are driven by the
73 event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as
74 NFS, iSCSI, NBD, FCoE with the dracut-network package.
76 %package network
77 Summary: Dracut modules to build a dracut initramfs with network support
78 Requires: %{name} = %{version}-%{release}
79 Requires: rpcbind nfs-utils
80 Requires: iscsi-initiator-utils
81 Requires: dhclient
82 %if %{with_nbd}
83 Requires: nbd
84 %endif
85 Requires: net-tools iproute
86 Requires: bridge-utils
87 Requires: vconfig
89 %description network
90 This package requires everything which is needed to build a generic
91 all purpose initramfs with network support with dracut.
93 %package fips
94 Summary: Dracut modules to build a dracut initramfs with an integrity check
95 Requires: %{name} = %{version}-%{release}
96 Requires: hmaccalc
97 %if 0%{?rhel} > 5
98 # For Alpha 3, we want nss instead of nss-softokn
99 Requires: nss
100 %else
101 Requires: nss-softokn
102 %endif
103 Requires: nss-softokn-freebl
105 %description fips
106 This package requires everything which is needed to build an
107 all purpose initramfs with dracut, which does an integrity check.
109 %package generic
110 Summary: Metapackage to build a generic initramfs with dracut
111 Requires: %{name} = %{version}-%{release}
112 Requires: %{name}-network = %{version}-%{release}
114 %description generic
115 This package requires everything which is needed to build a generic
116 all purpose initramfs with dracut.
118 %package tools
119 Summary: Dracut tools to build the local initramfs
120 Requires: coreutils cryptsetup-luks device-mapper
121 Requires: diffutils dmraid findutils grep lvm2 gawk
122 Requires: module-init-tools sed
123 Requires: cpio gzip
124 Requires: %{name} = %{version}-%{release}
126 %description tools
127 This package contains tools to assemble the local initrd and host configuration.
129 %prep
130 %setup -q -n %{name}-%{version}%{?dashgittag}
132 %build
133 make WITH_SWITCH_ROOT=0%{?with_switch_root}
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
138 sysconfdir=/etc mandir=%{_mandir} WITH_SWITCH_ROOT=0%{?with_switch_root}
140 echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
141 rm $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips/check
143 mkdir -p $RPM_BUILD_ROOT/boot/dracut
144 mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
145 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
146 touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
147 install -m 0644 dracut.conf.d/fedora.conf $RPM_BUILD_ROOT/etc/dracut.conf.d/fedora.conf
149 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6
150 rm $RPM_BUILD_ROOT/sbin/mkinitrd
151 rm $RPM_BUILD_ROOT/sbin/lsinitrd
152 %endif
154 %clean
155 rm -rf $RPM_BUILD_ROOT
157 %files
158 %defattr(-,root,root,0755)
159 %doc README HACKING TODO COPYING AUTHORS NEWS
160 /sbin/dracut
161 %if 0%{?with_switch_root}
162 /sbin/switch_root
163 %endif
164 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6
165 /sbin/mkinitrd
166 /sbin/lsinitrd
167 %endif
168 %dir %{_datadir}/dracut
169 %{_datadir}/dracut/dracut-functions
170 %config(noreplace) /etc/dracut.conf
171 %config(noreplace) /etc/dracut.conf.d/fedora.conf
172 %dir /etc/dracut.conf.d
173 %{_mandir}/man8/dracut.8*
174 %{_mandir}/man5/dracut.conf.5*
175 %{_datadir}/dracut/modules.d/00bootchartd
176 %{_datadir}/dracut/modules.d/00dash
177 %{_datadir}/dracut/modules.d/10i18n
178 %{_datadir}/dracut/modules.d/10rpmversion
179 %{_datadir}/dracut/modules.d/50plymouth
180 %{_datadir}/dracut/modules.d/60xen
181 %{_datadir}/dracut/modules.d/90btrfs
182 %{_datadir}/dracut/modules.d/90crypt
183 %{_datadir}/dracut/modules.d/90dm
184 %{_datadir}/dracut/modules.d/90dmraid
185 %{_datadir}/dracut/modules.d/90dmsquash-live
186 %{_datadir}/dracut/modules.d/90kernel-modules
187 %{_datadir}/dracut/modules.d/90lvm
188 %{_datadir}/dracut/modules.d/90mdraid
189 %{_datadir}/dracut/modules.d/90multipath
190 %{_datadir}/dracut/modules.d/95debug
191 %{_datadir}/dracut/modules.d/95resume
192 %{_datadir}/dracut/modules.d/95rootfs-block
193 %{_datadir}/dracut/modules.d/95dasd
194 %{_datadir}/dracut/modules.d/95dasd_mod
195 %{_datadir}/dracut/modules.d/95zfcp
196 %{_datadir}/dracut/modules.d/95terminfo
197 %{_datadir}/dracut/modules.d/95udev-rules
198 %{_datadir}/dracut/modules.d/95uswsusp
199 %{_datadir}/dracut/modules.d/98selinux
200 %{_datadir}/dracut/modules.d/98syslog
201 %{_datadir}/dracut/modules.d/99base
202 # logfile needs no logrotate, because it gets overwritten
203 # for every dracut run
204 %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
206 %files network
207 %defattr(-,root,root,0755)
208 %{_datadir}/dracut/modules.d/40network
209 %{_datadir}/dracut/modules.d/95fcoe
210 %{_datadir}/dracut/modules.d/95iscsi
211 %{_datadir}/dracut/modules.d/95nbd
212 %{_datadir}/dracut/modules.d/95nfs
213 %{_datadir}/dracut/modules.d/45ifcfg
214 %{_datadir}/dracut/modules.d/95znet
216 %files fips
217 %defattr(-,root,root,0755)
218 %{_datadir}/dracut/modules.d/01fips
220 %files generic
221 %defattr(-,root,root,0755)
222 %doc README.generic
224 %files tools
225 %defattr(-,root,root,0755)
226 %{_mandir}/man8/dracut-gencmdline.8*
227 %{_mandir}/man8/dracut-catimages.8*
228 /sbin/dracut-gencmdline
229 /sbin/dracut-catimages
230 %dir /boot/dracut
231 %dir /var/lib/dracut
232 %dir /var/lib/dracut/overlay
234 %changelog
235 * Thu Jun 17 2010 Harald Hoyer <harald@redhat.com> 006-1
236 - version 006
238 * Fri Jun 11 2010 Harald Hoyer <harald@redhat.com>
239 - Remove requirements, which are not really needed
240 Resolves: rhbz#598509
241 - fixed copy of network config to /dev/.initramfs/ (patch 146)
242 Resolves: rhbz#594649
243 - more password beauty (patch 142)
244 Resolves: rhbz#561092
245 - support multiple iSCSI disks (patch 143)
246 Resolves: rbhz#580190
247 - fixed selinux=0 (patch 130)
248 Resolves: rhbz#593080
249 - add support for booting LVM snapshot root volume (patch 145)
250 Resolves: rbhz#602723
251 - remove hardware field from BOOTIF= (patch 148)
252 Resolves: rhbz#599593
253 - add aes kernel modules and fix crypt handling (patch 137, patch 140 and patch 147)
254 Resolves: rhbz#600170
256 * Thu May 27 2010 Harald Hoyer <harald@redhat.com>
257 - fixed Requirements
258 - fixed autoip6
259 Resolves: rhbz#538388
260 - fixed multipath
261 Resolves: rhbz#595719
263 * Thu May 06 2010 Harald Hoyer <harald@redhat.com>
264 - only display short password messages
265 Resolves: rhbz#561092
267 * Thu May 06 2010 Harald Hoyer <harald@redhat.com>
268 - fixed dracut manpages
269 Resolves: rhbz#589109
270 - use ccw-init and ccw rules from s390utils
271 Resolves: rhbz#533494
272 - fixed fcoe
273 Resolves: rhbz#486244
274 - various other bugfixes seen in Fedora
276 * Tue Apr 20 2010 Harald Hoyer <harald@redhat.com>
277 - fixed network with multiple nics
278 - fixed nfsidmap paths
279 - do not run blkid on non active container raids
280 - fixed cdrom polling mechanism
281 - update to latest git
283 * Thu Apr 15 2010 Harald Hoyer <harald@redhat.com>
284 - fixed dracut manpages
285 - dmraid parse different error messages
286 - add cdrom polling mechanism for slow cdroms
287 - add module btrfs
288 - teach dmsquash live-root to use rootflags
289 - trigger udev with action=add
290 - fixed add_drivers handling
291 - add sr_mod
292 - use pigz instead of gzip, if available
294 * Thu Mar 25 2010 Harald Hoyer <harald@redhat.com>
295 - removed firmware requirements (rhbz#572634)
296 - add /etc/dracut.conf.d
297 - Resolves: rhbz#572634
299 * Fri Mar 19 2010 Harald Hoyer <harald@redhat.com>
300 - version 005
302 * Fri Mar 19 2010 Harald Hoyer <harald@redhat.com>
303 - fixed rpmlint errors (rhbz#570547)
304 - removed firmware package from dracut-kernel (rhbz#572634)
305 - add dcb support to dracut's FCoE support (rhbz#563794)
306 - force install some modules in hostonly mode (rhbz#573094)
307 - various other bugfixes
308 - Resolves: rhbz#570547, rhbz#572634, rhbz#563794, rhbz#573094
310 * Thu Feb 18 2010 Harald Hoyer <harald@redhat.com> 004-15
311 - fixed "selinux=0" booting (rhbz#566376)
312 - fixed internal IFS handling
313 - Resolves: rhbz#566376
315 * Fri Jan 29 2010 Harald Hoyer <harald@redhat.com> 004-5
316 - fixed firmware.sh bug (#559975 #559597)
318 * Tue Jan 26 2010 Harald Hoyer <harald@redhat.com> 004-4
319 - add multipath check
321 * Tue Jan 26 2010 Harald Hoyer <harald@redhat.com> 004-3
322 - fix selinux handling if .autorelabel is present
323 - Resolves: rhbz#557744
325 * Wed Jan 20 2010 Harald Hoyer <harald@redhat.com> 004-2
326 - fix emergency_shell argument parsing
327 - Related: rhbz#543948
329 * Fri Jan 15 2010 Harald Hoyer <harald@redhat.com> 004-1
330 - version 004
331 - Resolves: rhbz#529339 rhbz#533494 rhbz#548550
332 - Resolves: rhbz#548555 rhbz#553195
334 * Wed Jan 13 2010 Harald Hoyer <harald@redhat.com> 003-3
335 - add Obsoletes of mkinitrd/nash/libbdevid-python
336 - Related: rhbz#543948
338 * Wed Jan 13 2010 Warren Togami <wtogami@redhat.com> 003-2
339 - nbd is Fedora only
341 * Fri Nov 27 2009 Harald Hoyer <harald@redhat.com> 003-1
342 - version 003
344 * Mon Nov 23 2009 Harald Hoyer <harald@redhat.com> 002-26
345 - add WITH_SWITCH_ROOT make flag
346 - add fips requirement conditional
347 - add more device mapper modules (bug #539656)
349 * Fri Nov 20 2009 Dennis Gregorovic <dgregor@redhat.com> - 002-25.1
350 - nss changes for Alpha 3
352 * Thu Nov 19 2009 Harald Hoyer <harald@redhat.com> 002-25
353 - add more requirements for dracut-fips (bug #539257)
355 * Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-24
356 - put fips module in a subpackage (bug #537619)
358 * Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-23
359 - install xdr utils for multipath (bug #463458)
361 * Thu Nov 12 2009 Harald Hoyer <harald@redhat.com> 002-22
362 - add module 90multipath
363 - add module 01fips
364 - renamed module 95ccw to 95znet (bug #533833)
365 - crypt: ignore devices in /etc/crypttab (root is not in there)
366 - dasd: only install /etc/dasd.conf in hostonly mode (bug #533833)
367 - zfcp: only install /etc/zfcp.conf in hostonly mode (bug #533833)
368 - kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc (bug #527750)
369 - dasd: use dasdconf.sh from s390utils (bug #533833)
371 * Fri Nov 06 2009 Harald Hoyer <harald@redhat.com> 002-21
372 - fix rd_DASD argument handling (bug #531720)
373 - Resolves: rhbz#531720
375 * Wed Nov 04 2009 Harald Hoyer <harald@redhat.com> 002-20
376 - fix rd_DASD argument handling (bug #531720)
377 - Resolves: rhbz#531720
379 * Tue Nov 03 2009 Harald Hoyer <harald@redhat.com> 002-19
380 - changed rd_DASD to rd_DASD_MOD (bug #531720)
381 - Resolves: rhbz#531720
383 * Tue Oct 27 2009 Harald Hoyer <harald@redhat.com> 002-18
384 - renamed lvm/device-mapper udev rules according to upstream changes
385 - fixed dracut search path issue
387 * Mon Oct 26 2009 Harald Hoyer <harald@redhat.com> 002-17
388 - load dm_mod module (bug #530540)
390 * Fri Oct 09 2009 Jesse Keating <jkeating@redhat.com> - 002-16
391 - Upgrade plymouth to Requires(pre) to make it show up before kernel
393 * Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-15
394 - s390 ccw: s/layer1/layer2/g
396 * Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-14
397 - add multinic support
398 - add s390 zfcp support
399 - add s390 network support
401 * Wed Oct 07 2009 Harald Hoyer <harald@redhat.com> 002-13
402 - fixed init=<command> handling
403 - kill loginit if "rdinitdebug" specified
404 - run dmsquash-live-root after udev has settled (bug #527514)
406 * Tue Oct 06 2009 Harald Hoyer <harald@redhat.com> 002-12
407 - add missing loginit helper
408 - corrected dracut manpage
410 * Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-11
411 - fixed dracut-gencmdline for root=UUID or LABEL
413 * Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-10
414 - do not destroy assembled raid arrays if mdadm.conf present
415 - mount /dev/shm
416 - let udevd not resolve group and user names
417 - preserve timestamps of tools on initramfs generation
418 - generate symlinks for binaries correctly
419 - moved network from udev to initqueue
420 - mount nfs3 with nfsvers=3 option and retry with nfsvers=2
421 - fixed nbd initqueue-finished
422 - improved debug output: specifying "rdinitdebug" now logs
423 to dmesg, console and /init.log
424 - stop udev before killing it
425 - add ghost /var/log/dracut.log
426 - dmsquash: use info() and die() rather than echo
427 - strip kernel modules which have no x bit set
428 - redirect stdin, stdout, stderr all RW to /dev/console
429 so the user can use "less" to view /init.log and dmesg
431 * Tue Sep 29 2009 Harald Hoyer <harald@redhat.com> 002-9
432 - make install of new dm/lvm udev rules optionally
433 - correct dasd module typo
435 * Fri Sep 25 2009 Warren Togami <wtogami@redhat.com> 002-8
436 - revert back to dracut-002-5 tarball 845dd502
437 lvm2 was reverted to pre-udev
439 * Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-7
440 - build with the correct tarball
442 * Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-6
443 - add new device mapper udev rules and dmeventd
444 bug 525319, 525015
446 * Wed Sep 23 2009 Warren Togami <wtogami@redaht.com> 002-5
447 - Revert back to -3, Add umount back to initrd
448 This makes no functional difference to LiveCD. See Bug #525319
450 * Mon Sep 21 2009 Warren Togami <wtogami@redhat.com> 002-4
451 - Fix LiveCD boot regression
453 * Mon Sep 21 2009 Harald Hoyer <harald@redhat.com> 002-3
454 - bail out if selinux policy could not be loaded and
455 selinux=0 not specified on kernel command line
456 (bug #524113)
457 - set finished criteria for dmsquash live images
459 * Fri Sep 18 2009 Harald Hoyer <harald@redhat.com> 002-2
460 - do not cleanup dmraids
461 - copy over lvm.conf
463 * Thu Sep 17 2009 Harald Hoyer <harald@redhat.com> 002-1
464 - version 002
465 - set correct PATH
466 - workaround for broken mdmon implementation
468 * Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-12
469 - removed lvm/mdraid/dmraid lock files
470 - add missing ifname= files
472 * Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-11
473 - generate dracut-version during rpm build time
475 * Tue Sep 15 2009 Harald Hoyer <harald@redhat.com> 001-10
476 - add ifname= argument for persistent netdev names
477 - new /initqueue-finished to check if the main loop can be left
478 - copy mdadm.conf if --mdadmconf set or mdadmconf in dracut.conf
480 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-9
481 - added Requires: plymouth-scripts
483 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-8
484 - plymouth: use plymouth-populate-initrd
485 - add add_drivers for dracut and dracut.conf
486 - do not mount /proc and /selinux manually in selinux-load-policy
488 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-7
489 - add scsi_wait_scan to be sure everything was scanned
491 * Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-6
492 - fixed several problems with md raid containers
493 - fixed selinux policy loading
495 * Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-5
496 - patch does not honor file modes, fixed them manually
498 * Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-4
499 - fixed mdraid for IMSM
501 * Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-3
502 - fixed bug, which prevents installing 61-persistent-storage.rules (bug #520109)
504 * Thu Sep 03 2009 Harald Hoyer <harald@redhat.com> 001-2
505 - fixed missing grep for md
506 - reorder cleanup
508 * Wed Sep 02 2009 Harald Hoyer <harald@redhat.com> 001-1
509 - version 001
510 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
512 * Fri Aug 14 2009 Harald Hoyer <harald@redhat.com> 0.9-1
513 - version 0.9
515 * Thu Aug 06 2009 Harald Hoyer <harald@redhat.com> 0.8-1
516 - version 0.8
517 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
519 * Fri Jul 24 2009 Harald Hoyer <harald@redhat.com> 0.7-1
520 - version 0.7
521 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
523 * Wed Jul 22 2009 Harald Hoyer <harald@redhat.com> 0.6-1
524 - version 0.6
525 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
527 * Fri Jul 17 2009 Harald Hoyer <harald@redhat.com> 0.5-1
528 - version 0.5
529 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
531 * Sat Jul 04 2009 Harald Hoyer <harald@redhat.com> 0.4-1
532 - version 0.4
533 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
535 * Thu Jul 02 2009 Harald Hoyer <harald@redhat.com> 0.3-1
536 - version 0.3
537 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
539 * Wed Jul 01 2009 Harald Hoyer <harald@redhat.com> 0.2-1
540 - version 0.2
542 * Fri Jun 19 2009 Harald Hoyer <harald@redhat.com> 0.1-1
543 - first release
545 * Thu Dec 18 2008 Jeremy Katz <katzj@redhat.com> - 0.0-1
546 - Initial build