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