]>
Commit | Line | Data |
---|---|---|
dc5bb506 | 1 | # Variables must be defined |
3592d868 | 2 | %define with_nbd 1 |
641eae0f | 3 | |
dc5bb506 WT |
4 | # nbd in Fedora only |
5 | %if 0%{?rhel} >= 6 | |
6 | %define with_nbd 0 | |
0aaa523c HH |
7 | %endif |
8 | ||
710322ec | 9 | %if %{defined gittag} |
c10d53bf | 10 | %define rdist .git%{gittag}%{?dist} |
710322ec HH |
11 | %define dashgittag -%{gittag} |
12 | %else | |
0aaa523c | 13 | %define rdist %{?dist} |
710322ec | 14 | %endif |
0aaa523c | 15 | |
0aaa523c | 16 | Name: dracut |
b99dc517 | 17 | Version: 011 |
4877bb51 | 18 | %define release_prefix 0%{?rdist} |
228694e5 HH |
19 | Release: %{release_prefix} |
20 | ||
38672ee8 | 21 | Summary: Initramfs generator using udev |
5ce6642f | 22 | %if 0%{?fedora} |
3592d868 | 23 | Group: System Environment/Base |
228694e5 | 24 | %endif |
5ce6642f | 25 | %if 0%{?suse_version} |
228694e5 HH |
26 | Group: System/Base |
27 | %endif | |
3592d868 | 28 | License: GPLv2+ |
82794b4b | 29 | URL: https://dracut.wiki.kernel.org/ |
f4f45af7 | 30 | # Source can be generated by |
82794b4b HH |
31 | # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{?dashgittag};sf=tgz |
32 | Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}%{?dashgittag}.tar.bz2 | |
33 | ||
228694e5 HH |
34 | BuildArch: noarch |
35 | ||
5ce6642f | 36 | %if 0%{?fedora} |
38672ee8 | 37 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
228694e5 | 38 | %endif |
5ce6642f | 39 | %if 0%{?suse_version} |
228694e5 HH |
40 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
41 | %endif | |
d9416c0d | 42 | |
5ce6642f | 43 | %if 0%{?fedora} |
d9416c0d HH |
44 | BuildRequires: docbook-style-xsl docbook-dtds libxslt |
45 | %endif | |
46 | ||
5ce6642f | 47 | %if 0%{?suse_version} |
d9416c0d HH |
48 | BuildRequires: docbook-xsl-stylesheets libxslt |
49 | %endif | |
5c554bd2 | 50 | |
1b3bdcc1 | 51 | %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 |
0bc4ef1c HH |
52 | # no "provides", because dracut does not offer |
53 | # all functionality of the obsoleted packages | |
5c554bd2 HH |
54 | Obsoletes: mkinitrd <= 6.0.93 |
55 | Obsoletes: mkinitrd-devel <= 6.0.93 | |
56 | Obsoletes: nash <= 6.0.93 | |
0bc4ef1c | 57 | Obsoletes: libbdevid-python <= 6.0.93 |
1b3bdcc1 | 58 | %endif |
228694e5 HH |
59 | |
60 | %if 0%{?suse_version} > 9999 | |
61 | Obsoletes: mkinitrd < 2.6.1 | |
62 | Provides: mkinitrd = 2.6.1 | |
63 | %endif | |
64 | ||
8ef5ade7 HH |
65 | Obsoletes: dracut-kernel < 005 |
66 | Provides: dracut-kernel = %{version}-%{release} | |
5c554bd2 | 67 | |
7e33fa5b HH |
68 | Requires: bash |
69 | Requires: bzip2 | |
38672ee8 | 70 | Requires: coreutils |
7e33fa5b HH |
71 | Requires: cpio |
72 | Requires: dash | |
73 | Requires: filesystem >= 2.1.0 | |
38672ee8 JK |
74 | Requires: findutils |
75 | Requires: grep | |
7e33fa5b | 76 | Requires: gzip |
7d86d90d | 77 | Requires: kbd |
80aa303c | 78 | Requires: mktemp >= 1.5-5 |
7e33fa5b | 79 | Requires: module-init-tools >= 3.7-9 |
7e33fa5b HH |
80 | Requires: sed |
81 | Requires: tar | |
82 | Requires: udev | |
d9416c0d | 83 | |
5ce6642f | 84 | %if 0%{?fedora} |
6ae5caf0 | 85 | Requires: util-linux >= 2.16 |
d9416c0d HH |
86 | Requires: initscripts >= 8.63-1 |
87 | Requires: plymouth >= 0.8.0-0.2009.29.09.19.1 | |
d9416c0d HH |
88 | %endif |
89 | ||
5ce6642f | 90 | %if 0%{?suse_version} |
d9416c0d HH |
91 | Requires: util-linux >= 2.16 |
92 | %endif | |
93 | ||
78cd7629 | 94 | |
38672ee8 | 95 | %description |
c55b2080 HH |
96 | Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. |
97 | Unlike existing implementations, dracut does hard-code as little as possible | |
98 | into the initramfs. Dracut contains various modules which are driven by the | |
99 | event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as | |
100 | NFS, iSCSI, NBD, FCoE with the dracut-network package. | |
38672ee8 | 101 | |
ec74fa87 | 102 | %package network |
8ec6bfcb | 103 | Summary: Dracut modules to build a dracut initramfs with network support |
78cd7629 | 104 | Requires: %{name} = %{version}-%{release} |
228694e5 | 105 | Requires: rpcbind |
dc5bb506 | 106 | %if %{with_nbd} |
78cd7629 | 107 | Requires: nbd |
dc5bb506 | 108 | %endif |
7838d853 | 109 | Requires: iproute |
ec74fa87 | 110 | Requires: bridge-utils |
228694e5 | 111 | |
5ce6642f | 112 | %if 0%{?fedora} |
228694e5 HH |
113 | Requires: iscsi-initiator-utils |
114 | Requires: nfs-utils | |
115 | Requires: dhclient | |
228694e5 HH |
116 | %endif |
117 | ||
5ce6642f | 118 | %if 0%{?suse_version} |
228694e5 HH |
119 | Requires: dhcp-client |
120 | Requires: nfs-client | |
121 | Requires: vlan | |
122 | %endif | |
353ef760 HH |
123 | Obsoletes: dracut-generic < 008 |
124 | Provides: dracut-generic = %{version}-%{release} | |
ec74fa87 HH |
125 | |
126 | %description network | |
127 | This package requires everything which is needed to build a generic | |
128 | all purpose initramfs with network support with dracut. | |
129 | ||
5ce6642f | 130 | %if 0%{?fedora} |
4d1661d3 | 131 | %package fips |
c55b2080 | 132 | Summary: Dracut modules to build a dracut initramfs with an integrity check |
4d1661d3 HH |
133 | Requires: %{name} = %{version}-%{release} |
134 | Requires: hmaccalc | |
135 | %if 0%{?rhel} > 5 | |
136 | # For Alpha 3, we want nss instead of nss-softokn | |
137 | Requires: nss | |
138 | %else | |
139 | Requires: nss-softokn | |
140 | %endif | |
141 | Requires: nss-softokn-freebl | |
142 | ||
143 | %description fips | |
144 | This package requires everything which is needed to build an | |
145 | all purpose initramfs with dracut, which does an integrity check. | |
228694e5 | 146 | %endif |
33ee031c | 147 | |
52881470 HH |
148 | %package caps |
149 | Summary: Dracut modules to build a dracut initramfs which drops capabilities | |
150 | Requires: %{name} = %{version}-%{release} | |
151 | Requires: libcap | |
152 | ||
153 | %description caps | |
154 | This package requires everything which is needed to build an | |
155 | all purpose initramfs with dracut, which drops capabilities. | |
156 | ||
21007cb6 | 157 | %package tools |
8ec6bfcb | 158 | Summary: Dracut tools to build the local initramfs |
a0af4fa5 | 159 | Requires: %{name} = %{version}-%{release} |
21007cb6 HH |
160 | |
161 | %description tools | |
162 | This package contains tools to assemble the local initrd and host configuration. | |
163 | ||
38672ee8 | 164 | %prep |
710322ec | 165 | %setup -q -n %{name}-%{version}%{?dashgittag} |
38672ee8 JK |
166 | |
167 | %build | |
e365864b | 168 | make |
38672ee8 | 169 | |
38672ee8 | 170 | %install |
5ce6642f | 171 | %if 0%{?fedora} |
38672ee8 | 172 | rm -rf $RPM_BUILD_ROOT |
228694e5 | 173 | %endif |
ec74fa87 | 174 | make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \ |
e365864b | 175 | sysconfdir=/etc mandir=%{_mandir} |
38672ee8 | 176 | |
95cf0a88 | 177 | echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version |
228694e5 | 178 | |
5ce6642f | 179 | %if 0%{?fedora} == 0 |
228694e5 HH |
180 | rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips |
181 | %endif | |
182 | ||
783721b3 HH |
183 | # remove gentoo specific modules |
184 | rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/50gensplash | |
95cf0a88 | 185 | |
21007cb6 HH |
186 | mkdir -p $RPM_BUILD_ROOT/boot/dracut |
187 | mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay | |
837a5a60 HH |
188 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log |
189 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log | |
41f90cbe | 190 | mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs |
21007cb6 | 191 | |
5ce6642f | 192 | %if 0%{?fedora} |
d9416c0d | 193 | install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf |
b151c3b1 | 194 | install -m 0644 dracut.conf.d/fips.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/40-fips.conf |
d9416c0d HH |
195 | %endif |
196 | ||
5ce6642f | 197 | %if 0%{?suse_version} |
d9416c0d HH |
198 | install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf |
199 | %endif | |
200 | ||
228694e5 | 201 | %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999 |
1b3bdcc1 HH |
202 | rm $RPM_BUILD_ROOT/sbin/mkinitrd |
203 | rm $RPM_BUILD_ROOT/sbin/lsinitrd | |
204 | %endif | |
205 | ||
62d0c4e7 HH |
206 | mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/dracut |
207 | install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut | |
208 | ||
38672ee8 JK |
209 | %clean |
210 | rm -rf $RPM_BUILD_ROOT | |
211 | ||
38672ee8 | 212 | %files |
78cd7629 | 213 | %defattr(-,root,root,0755) |
7c6eb152 | 214 | %doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg |
38672ee8 | 215 | /sbin/dracut |
228694e5 | 216 | %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 |
63d8d27b HH |
217 | /sbin/mkinitrd |
218 | /sbin/lsinitrd | |
1b3bdcc1 | 219 | %endif |
78cd7629 | 220 | %dir %{_datadir}/dracut |
490f98aa | 221 | %dir %{_datadir}/dracut/modules.d |
78cd7629 | 222 | %{_datadir}/dracut/dracut-functions |
f709fa43 | 223 | %{_datadir}/dracut/dracut-logger |
4579f5a8 | 224 | %config(noreplace) /etc/dracut.conf |
5ce6642f | 225 | %if 0%{?fedora} || 0%{?suse_version} |
d9416c0d HH |
226 | %config(noreplace) /etc/dracut.conf.d/01-dist.conf |
227 | %endif | |
2c2c4580 | 228 | %dir /etc/dracut.conf.d |
62d0c4e7 | 229 | %config(noreplace) /etc/logrotate.d/dracut |
00f0a6e7 | 230 | %{_mandir}/man8/dracut.8* |
0d866147 | 231 | %{_mandir}/man7/dracut.kernel.7* |
6cc96b35 | 232 | %{_mandir}/man5/dracut.conf.5* |
f6c76abe | 233 | %{_datadir}/dracut/modules.d/00bootchart |
ec74fa87 | 234 | %{_datadir}/dracut/modules.d/00dash |
325d4913 | 235 | %{_datadir}/dracut/modules.d/05busybox |
1246703b | 236 | %{_datadir}/dracut/modules.d/10i18n |
ec74fa87 HH |
237 | %{_datadir}/dracut/modules.d/10rpmversion |
238 | %{_datadir}/dracut/modules.d/50plymouth | |
9799e0ad | 239 | %{_datadir}/dracut/modules.d/60xen |
fede5bbc | 240 | %{_datadir}/dracut/modules.d/90btrfs |
ec74fa87 | 241 | %{_datadir}/dracut/modules.d/90crypt |
07db0def | 242 | %{_datadir}/dracut/modules.d/90dm |
ec74fa87 HH |
243 | %{_datadir}/dracut/modules.d/90dmraid |
244 | %{_datadir}/dracut/modules.d/90dmsquash-live | |
245 | %{_datadir}/dracut/modules.d/90kernel-modules | |
246 | %{_datadir}/dracut/modules.d/90lvm | |
247 | %{_datadir}/dracut/modules.d/90mdraid | |
8ec6bfcb | 248 | %{_datadir}/dracut/modules.d/90multipath |
ec74fa87 HH |
249 | %{_datadir}/dracut/modules.d/95debug |
250 | %{_datadir}/dracut/modules.d/95resume | |
251 | %{_datadir}/dracut/modules.d/95rootfs-block | |
837a5a60 | 252 | %{_datadir}/dracut/modules.d/95dasd |
5bde13f9 | 253 | %{_datadir}/dracut/modules.d/95dasd_mod |
771c2151 | 254 | %{_datadir}/dracut/modules.d/95fstab-sys |
07db0def | 255 | %{_datadir}/dracut/modules.d/95zfcp |
ec74fa87 HH |
256 | %{_datadir}/dracut/modules.d/95terminfo |
257 | %{_datadir}/dracut/modules.d/95udev-rules | |
534b0525 | 258 | %{_datadir}/dracut/modules.d/97biosdevname |
7d86d90d | 259 | %{_datadir}/dracut/modules.d/98selinux |
ec74fa87 HH |
260 | %{_datadir}/dracut/modules.d/98syslog |
261 | %{_datadir}/dracut/modules.d/99base | |
3592d868 HH |
262 | # logfile needs no logrotate, because it gets overwritten |
263 | # for every dracut run | |
837a5a60 | 264 | %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log |
41f90cbe | 265 | %dir %{_sharedstatedir}/initramfs |
ec74fa87 HH |
266 | |
267 | %files network | |
78cd7629 | 268 | %defattr(-,root,root,0755) |
ec74fa87 HH |
269 | %{_datadir}/dracut/modules.d/40network |
270 | %{_datadir}/dracut/modules.d/95fcoe | |
271 | %{_datadir}/dracut/modules.d/95iscsi | |
272 | %{_datadir}/dracut/modules.d/95nbd | |
273 | %{_datadir}/dracut/modules.d/95nfs | |
837a5a60 | 274 | %{_datadir}/dracut/modules.d/45ifcfg |
532b8c7a | 275 | %{_datadir}/dracut/modules.d/95znet |
78cd7629 | 276 | |
5ce6642f | 277 | %if 0%{?fedora} |
4d1661d3 HH |
278 | %files fips |
279 | %defattr(-,root,root,0755) | |
4d1661d3 | 280 | %{_datadir}/dracut/modules.d/01fips |
b151c3b1 | 281 | %config(noreplace) /etc/dracut.conf.d/40-fips.conf |
228694e5 | 282 | %endif |
ec74fa87 | 283 | |
52881470 HH |
284 | %files caps |
285 | %defattr(-,root,root,0755) | |
286 | %{_datadir}/dracut/modules.d/02caps | |
287 | ||
21007cb6 HH |
288 | %files tools |
289 | %defattr(-,root,root,0755) | |
66e45737 HH |
290 | %{_mandir}/man8/dracut-gencmdline.8* |
291 | %{_mandir}/man8/dracut-catimages.8* | |
21007cb6 HH |
292 | /sbin/dracut-gencmdline |
293 | /sbin/dracut-catimages | |
294 | %dir /boot/dracut | |
295 | %dir /var/lib/dracut | |
296 | %dir /var/lib/dracut/overlay | |
297 | ||
38672ee8 | 298 | %changelog |