dracut.spec: moved znet to dracut-network
[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: 005
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: mktemp >= 1.5-5
55 Requires: module-init-tools >= 3.7-9
56 Requires: mount
57 Requires: sed
58 Requires: tar
59 Requires: udev
60 Requires: util-linux-ng >= 2.16
61 Requires: which
62
63 %if ! 0%{?with_switch_root}
64 BuildArch: noarch
65 %endif
66
67 %description
68 Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. 
69 Unlike existing implementations, dracut does hard-code as little as possible 
70 into the initramfs. Dracut contains various modules which are driven by the 
71 event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as 
72 NFS, iSCSI, NBD, FCoE with the dracut-network package.
73
74 %package network
75 Summary: Dracut modules to build a dracut initramfs with network support
76 Requires: %{name} = %{version}-%{release}
77 Requires: rpcbind nfs-utils 
78 Requires: iscsi-initiator-utils
79 Requires: dhclient
80 %if %{with_nbd}
81 Requires: nbd
82 %endif
83 Requires: net-tools iproute
84 Requires: bridge-utils
85
86 %description network
87 This package requires everything which is needed to build a generic
88 all purpose initramfs with network support with dracut.
89
90 %package fips
91 Summary: Dracut modules to build a dracut initramfs with an integrity check
92 Requires: %{name} = %{version}-%{release}
93 Requires: hmaccalc
94 %if 0%{?rhel} > 5
95 # For Alpha 3, we want nss instead of nss-softokn
96 Requires: nss
97 %else
98 Requires: nss-softokn
99 %endif
100 Requires: nss-softokn-freebl
101
102 %description fips
103 This package requires everything which is needed to build an
104 all purpose initramfs with dracut, which does an integrity check.
105
106 %package generic
107 Summary: Metapackage to build a generic initramfs with dracut
108 Requires: %{name} = %{version}-%{release}
109 Requires: %{name}-network = %{version}-%{release}
110
111 %description generic
112 This package requires everything which is needed to build a generic
113 all purpose initramfs with dracut.
114
115 %package tools
116 Summary: Dracut tools to build the local initramfs
117 Requires: coreutils cryptsetup-luks device-mapper
118 Requires: diffutils dmraid findutils grep lvm2 gawk
119 Requires: module-init-tools sed
120 Requires: cpio gzip
121
122 %description tools
123 This package contains tools to assemble the local initrd and host configuration.
124
125 %prep
126 %setup -q -n %{name}-%{version}%{?dashgittag}
127
128 %build
129 make WITH_SWITCH_ROOT=0%{?with_switch_root}
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \
134      sysconfdir=/etc mandir=%{_mandir} WITH_SWITCH_ROOT=0%{?with_switch_root}
135
136 echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
137 rm $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips/check
138
139 mkdir -p $RPM_BUILD_ROOT/boot/dracut
140 mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
141 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
142 touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
143
144 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6
145 rm $RPM_BUILD_ROOT/sbin/mkinitrd
146 rm $RPM_BUILD_ROOT/sbin/lsinitrd
147 %endif
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %files
153 %defattr(-,root,root,0755)
154 %doc README HACKING TODO COPYING AUTHORS NEWS
155 /sbin/dracut
156 %if 0%{?with_switch_root}
157 /sbin/switch_root
158 %endif
159 %if 0%{?fedora} > 12 || 0%{?rhel} >= 6
160 /sbin/mkinitrd
161 /sbin/lsinitrd
162 %endif
163 %dir %{_datadir}/dracut
164 %{_datadir}/dracut/dracut-functions
165 %config(noreplace) /etc/dracut.conf
166 %dir /etc/dracut.conf.d
167 %{_mandir}/man8/dracut.8*
168 %{_mandir}/man5/dracut.conf.5*
169 %{_datadir}/dracut/modules.d/00dash
170 %{_datadir}/dracut/modules.d/10redhat-i18n
171 %{_datadir}/dracut/modules.d/10rpmversion
172 %{_datadir}/dracut/modules.d/50plymouth
173 %{_datadir}/dracut/modules.d/60xen
174 %{_datadir}/dracut/modules.d/90btrfs
175 %{_datadir}/dracut/modules.d/90crypt
176 %{_datadir}/dracut/modules.d/90dm
177 %{_datadir}/dracut/modules.d/90dmraid
178 %{_datadir}/dracut/modules.d/90dmsquash-live
179 %{_datadir}/dracut/modules.d/90kernel-modules
180 %{_datadir}/dracut/modules.d/90lvm
181 %{_datadir}/dracut/modules.d/90mdraid
182 %{_datadir}/dracut/modules.d/90multipath
183 %{_datadir}/dracut/modules.d/95debug
184 %{_datadir}/dracut/modules.d/95resume
185 %{_datadir}/dracut/modules.d/95rootfs-block
186 %{_datadir}/dracut/modules.d/95dasd
187 %{_datadir}/dracut/modules.d/95dasd_mod
188 %{_datadir}/dracut/modules.d/95zfcp
189 %{_datadir}/dracut/modules.d/95terminfo
190 %{_datadir}/dracut/modules.d/95udev-rules
191 %{_datadir}/dracut/modules.d/95uswsusp
192 %{_datadir}/dracut/modules.d/98syslog
193 %{_datadir}/dracut/modules.d/99base
194 # logfile needs no logrotate, because it gets overwritten
195 # for every dracut run
196 %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
197
198 %files network
199 %defattr(-,root,root,0755)
200 %doc README HACKING TODO COPYING AUTHORS NEWS
201 %{_datadir}/dracut/modules.d/40network
202 %{_datadir}/dracut/modules.d/95fcoe
203 %{_datadir}/dracut/modules.d/95iscsi
204 %{_datadir}/dracut/modules.d/95nbd
205 %{_datadir}/dracut/modules.d/95nfs
206 %{_datadir}/dracut/modules.d/45ifcfg
207 %{_datadir}/dracut/modules.d/95znet
208
209 %files fips
210 %defattr(-,root,root,0755)
211 %doc COPYING
212 %{_datadir}/dracut/modules.d/01fips
213
214 %files generic
215 %defattr(-,root,root,0755)
216 %doc README.generic
217
218 %files tools 
219 %defattr(-,root,root,0755)
220 %doc COPYING NEWS
221 %{_mandir}/man8/dracut-gencmdline.8*
222 %{_mandir}/man8/dracut-catimages.8*
223 /sbin/dracut-gencmdline
224 /sbin/dracut-catimages
225 %dir /boot/dracut
226 %dir /var/lib/dracut
227 %dir /var/lib/dracut/overlay
228
229 %changelog
230 * Fri Jan 15 2010 Harald Hoyer <harald@redhat.com> 004-1
231 - version 004
232 - Resolves: rhbz#529339 rhbz#533494 rhbz#548550 
233 - Resolves: rhbz#548555 rhbz#553195
234
235 * Wed Jan 13 2010 Harald Hoyer <harald@redhat.com> 003-3
236 - add Obsoletes of mkinitrd/nash/libbdevid-python
237 - Related: rhbz#543948
238
239 * Wed Jan 13 2010 Warren Togami <wtogami@redhat.com> 003-2
240 - nbd is Fedora only
241
242 * Fri Nov 27 2009 Harald Hoyer <harald@redhat.com> 003-1
243 - version 003
244
245 * Mon Nov 23 2009 Harald Hoyer <harald@redhat.com> 002-26
246 - add WITH_SWITCH_ROOT make flag
247 - add fips requirement conditional
248 - add more device mapper modules (bug #539656)
249
250 * Fri Nov 20 2009 Dennis Gregorovic <dgregor@redhat.com> - 002-25.1
251 - nss changes for Alpha 3
252
253 * Thu Nov 19 2009 Harald Hoyer <harald@redhat.com> 002-25
254 - add more requirements for dracut-fips (bug #539257)
255
256 * Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-24
257 - put fips module in a subpackage (bug #537619)
258
259 * Tue Nov 17 2009 Harald Hoyer <harald@redhat.com> 002-23
260 - install xdr utils for multipath (bug #463458)
261
262 * Thu Nov 12 2009 Harald Hoyer <harald@redhat.com> 002-22
263 - add module 90multipath
264 - add module 01fips
265 - renamed module 95ccw to 95znet (bug #533833)
266 - crypt: ignore devices in /etc/crypttab (root is not in there)
267 - dasd: only install /etc/dasd.conf in hostonly mode (bug #533833)
268 - zfcp: only install /etc/zfcp.conf in hostonly mode (bug #533833)
269 - kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc (bug #527750)
270 - dasd: use dasdconf.sh from s390utils (bug #533833)
271
272 * Fri Nov 06 2009 Harald Hoyer <harald@redhat.com> 002-21
273 - fix rd_DASD argument handling (bug #531720)
274 - Resolves: rhbz#531720
275
276 * Wed Nov 04 2009 Harald Hoyer <harald@redhat.com> 002-20
277 - fix rd_DASD argument handling (bug #531720)
278 - Resolves: rhbz#531720
279
280 * Tue Nov 03 2009 Harald Hoyer <harald@redhat.com> 002-19
281 - changed rd_DASD to rd_DASD_MOD (bug #531720)
282 - Resolves: rhbz#531720
283
284 * Tue Oct 27 2009 Harald Hoyer <harald@redhat.com> 002-18
285 - renamed lvm/device-mapper udev rules according to upstream changes
286 - fixed dracut search path issue
287
288 * Mon Oct 26 2009 Harald Hoyer <harald@redhat.com> 002-17
289 - load dm_mod module (bug #530540)
290
291 * Fri Oct 09 2009 Jesse Keating <jkeating@redhat.com> - 002-16
292 - Upgrade plymouth to Requires(pre) to make it show up before kernel
293
294 * Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-15
295 - s390 ccw: s/layer1/layer2/g
296
297 * Thu Oct 08 2009 Harald Hoyer <harald@redhat.com> 002-14
298 - add multinic support
299 - add s390 zfcp support
300 - add s390 network support
301
302 * Wed Oct 07 2009 Harald Hoyer <harald@redhat.com> 002-13
303 - fixed init=<command> handling
304 - kill loginit if "rdinitdebug" specified
305 - run dmsquash-live-root after udev has settled (bug #527514)
306
307 * Tue Oct 06 2009 Harald Hoyer <harald@redhat.com> 002-12
308 - add missing loginit helper
309 - corrected dracut manpage
310
311 * Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-11
312 - fixed dracut-gencmdline for root=UUID or LABEL
313
314 * Thu Oct 01 2009 Harald Hoyer <harald@redhat.com> 002-10
315 - do not destroy assembled raid arrays if mdadm.conf present
316 - mount /dev/shm 
317 - let udevd not resolve group and user names
318 - preserve timestamps of tools on initramfs generation
319 - generate symlinks for binaries correctly
320 - moved network from udev to initqueue
321 - mount nfs3 with nfsvers=3 option and retry with nfsvers=2
322 - fixed nbd initqueue-finished
323 - improved debug output: specifying "rdinitdebug" now logs
324   to dmesg, console and /init.log
325 - stop udev before killing it
326 - add ghost /var/log/dracut.log
327 - dmsquash: use info() and die() rather than echo
328 - strip kernel modules which have no x bit set
329 - redirect stdin, stdout, stderr all RW to /dev/console
330   so the user can use "less" to view /init.log and dmesg
331
332 * Tue Sep 29 2009 Harald Hoyer <harald@redhat.com> 002-9
333 - make install of new dm/lvm udev rules optionally
334 - correct dasd module typo
335
336 * Fri Sep 25 2009 Warren Togami <wtogami@redhat.com> 002-8
337 - revert back to dracut-002-5 tarball 845dd502
338   lvm2 was reverted to pre-udev
339
340 * Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-7
341 - build with the correct tarball
342
343 * Wed Sep 23 2009 Harald Hoyer <harald@redhat.com> 002-6
344 - add new device mapper udev rules and dmeventd 
345   bug 525319, 525015
346
347 * Wed Sep 23 2009 Warren Togami <wtogami@redaht.com> 002-5
348 - Revert back to -3, Add umount back to initrd
349   This makes no functional difference to LiveCD.  See Bug #525319
350
351 * Mon Sep 21 2009 Warren Togami <wtogami@redhat.com> 002-4
352 - Fix LiveCD boot regression
353
354 * Mon Sep 21 2009 Harald Hoyer <harald@redhat.com> 002-3
355 - bail out if selinux policy could not be loaded and 
356   selinux=0 not specified on kernel command line 
357   (bug #524113)
358 - set finished criteria for dmsquash live images
359
360 * Fri Sep 18 2009 Harald Hoyer <harald@redhat.com> 002-2
361 - do not cleanup dmraids
362 - copy over lvm.conf
363
364 * Thu Sep 17 2009 Harald Hoyer <harald@redhat.com> 002-1
365 - version 002
366 - set correct PATH
367 - workaround for broken mdmon implementation
368
369 * Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-12
370 - removed lvm/mdraid/dmraid lock files
371 - add missing ifname= files
372
373 * Wed Sep 16 2009 Harald Hoyer <harald@redhat.com> 001-11
374 - generate dracut-version during rpm build time
375
376 * Tue Sep 15 2009 Harald Hoyer <harald@redhat.com> 001-10
377 - add ifname= argument for persistent netdev names
378 - new /initqueue-finished to check if the main loop can be left
379 - copy mdadm.conf if --mdadmconf set or mdadmconf in dracut.conf
380
381 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-9
382 - added Requires: plymouth-scripts
383
384 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-8
385 - plymouth: use plymouth-populate-initrd
386 - add add_drivers for dracut and dracut.conf
387 - do not mount /proc and /selinux manually in selinux-load-policy
388
389 * Wed Sep 09 2009 Harald Hoyer <harald@redhat.com> 001-7
390 - add scsi_wait_scan to be sure everything was scanned
391
392 * Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-6
393 - fixed several problems with md raid containers
394 - fixed selinux policy loading
395
396 * Tue Sep 08 2009 Harald Hoyer <harald@redhat.com> 001-5
397 - patch does not honor file modes, fixed them manually
398
399 * Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-4
400 - fixed mdraid for IMSM
401
402 * Mon Sep 07 2009 Harald Hoyer <harald@redhat.com> 001-3
403 - fixed bug, which prevents installing 61-persistent-storage.rules (bug #520109)
404
405 * Thu Sep 03 2009 Harald Hoyer <harald@redhat.com> 001-2
406 - fixed missing grep for md
407 - reorder cleanup
408
409 * Wed Sep 02 2009 Harald Hoyer <harald@redhat.com> 001-1
410 - version 001
411 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
412
413 * Fri Aug 14 2009 Harald Hoyer <harald@redhat.com> 0.9-1
414 - version 0.9
415
416 * Thu Aug 06 2009 Harald Hoyer <harald@redhat.com> 0.8-1
417 - version 0.8 
418 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
419
420 * Fri Jul 24 2009 Harald Hoyer <harald@redhat.com> 0.7-1
421 - version 0.7
422 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
423
424 * Wed Jul 22 2009 Harald Hoyer <harald@redhat.com> 0.6-1
425 - version 0.6
426 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
427
428 * Fri Jul 17 2009 Harald Hoyer <harald@redhat.com> 0.5-1
429 - version 0.5
430 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
431
432 * Sat Jul 04 2009 Harald Hoyer <harald@redhat.com> 0.4-1
433 - version 0.4
434 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
435
436 * Thu Jul 02 2009 Harald Hoyer <harald@redhat.com> 0.3-1
437 - version 0.3
438 - see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS
439
440 * Wed Jul 01 2009 Harald Hoyer <harald@redhat.com> 0.2-1
441 - version 0.2
442
443 * Fri Jun 19 2009 Harald Hoyer <harald@redhat.com> 0.1-1
444 - first release
445
446 * Thu Dec 18 2008 Jeremy Katz <katzj@redhat.com> - 0.0-1
447 - Initial build
448