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