diff --git a/.gitignore b/.gitignore index c22e200..b12dd2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dracut-006.tar.bz2 dracut-007.tar.bz2 +/dracut-008-353ef76.tar.bz2 diff --git a/dracut.spec b/dracut.spec index 6acf4bb..361a231 100644 --- a/dracut.spec +++ b/dracut.spec @@ -1,19 +1,52 @@ +%define gittag 353ef76 # Variables must be defined -%define with_switch_root 0 %define with_nbd 1 +# nbd in Fedora only +%if 0%{?rhel} >= 6 +%define with_nbd 0 +%endif + +%if %{defined gittag} +%define rdist .git%{gittag}%{?dist} +%define dashgittag -%{gittag} +%else +%define rdist %{?dist} +%endif + Name: dracut -Version: 007 -Release: 1 +Version: 008 +%define release_prefix 0.5%{?rdist} +Release: %{release_prefix} + Summary: Initramfs generator using udev +%if 0%{?fedora_version} > 0 Group: System Environment/Base +%endif +%if 0%{?suse_version} > 0 +Group: System/Base +%endif License: GPLv2+ URL: http://apps.sourceforge.net/trac/dracut/wiki # Source can be generated by # http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=snapshot;h=%{?dashgittag};sf=tgz Source0: dracut-%{version}%{?dashgittag}.tar.bz2 +BuildArch: noarch + +%if 0%{?fedora_version} > 0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: docbook-style-xsl docbook-dtds docbook-style-xsl libxslt +%endif +%if 0%{?suse_version} > 0 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif + +%if 0%{?fedora_version} > 0 +BuildRequires: docbook-style-xsl docbook-dtds libxslt +%endif + +%if 0%{?suse_version} > 0 +BuildRequires: docbook-xsl-stylesheets libxslt +%endif %if 0%{?fedora} > 12 || 0%{?rhel} >= 6 # no "provides", because dracut does not offer @@ -23,6 +56,12 @@ Obsoletes: mkinitrd-devel <= 6.0.93 Obsoletes: nash <= 6.0.93 Obsoletes: libbdevid-python <= 6.0.93 %endif + +%if 0%{?suse_version} > 9999 +Obsoletes: mkinitrd < 2.6.1 +Provides: mkinitrd = 2.6.1 +%endif + Obsoletes: dracut-kernel < 005 Provides: dracut-kernel = %{version}-%{release} @@ -35,22 +74,25 @@ Requires: filesystem >= 2.1.0 Requires: findutils Requires: grep Requires: gzip -Requires: initscripts >= 8.63-1 Requires: kbd Requires: mktemp >= 1.5-5 Requires: module-init-tools >= 3.7-9 -Requires: mount -Requires: plymouth >= 0.8.0-0.2009.29.09.19.1 Requires: sed Requires: tar Requires: udev + +%if 0%{?fedora_version} > 0 Requires: util-linux-ng >= 2.16 -Requires: which +Requires: initscripts >= 8.63-1 +Requires: plymouth >= 0.8.0-0.2009.29.09.19.1 +Requires: mount +%endif -%if ! 0%{?with_switch_root} -BuildArch: noarch +%if 0%{?suse_version} > 0 +Requires: util-linux >= 2.16 %endif + %description Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels. Unlike existing implementations, dracut does hard-code as little as possible @@ -61,20 +103,32 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package. %package network Summary: Dracut modules to build a dracut initramfs with network support Requires: %{name} = %{version}-%{release} -Requires: rpcbind nfs-utils -Requires: iscsi-initiator-utils -Requires: dhclient +Requires: rpcbind %if %{with_nbd} Requires: nbd %endif Requires: net-tools iproute Requires: bridge-utils -Requires: vconfig + +%if 0%{?fedora_version} > 0 +Requires: iscsi-initiator-utils +Requires: nfs-utils +Requires: dhclient +%endif + +%if 0%{?suse_version} > 0 +Requires: dhcp-client +Requires: nfs-client +Requires: vlan +%endif +Obsoletes: dracut-generic < 008 +Provides: dracut-generic = %{version}-%{release} %description network This package requires everything which is needed to build a generic all purpose initramfs with network support with dracut. +%if 0%{?fedora_version} > 0 %package fips Summary: Dracut modules to build a dracut initramfs with an integrity check Requires: %{name} = %{version}-%{release} @@ -90,22 +144,10 @@ Requires: nss-softokn-freebl %description fips This package requires everything which is needed to build an all purpose initramfs with dracut, which does an integrity check. - -%package generic -Summary: Metapackage to build a generic initramfs with dracut -Requires: %{name} = %{version}-%{release} -Requires: %{name}-network = %{version}-%{release} - -%description generic -This package requires everything which is needed to build a generic -all purpose initramfs with dracut. +%endif %package tools Summary: Dracut tools to build the local initramfs -Requires: coreutils cryptsetup-luks device-mapper -Requires: diffutils dmraid findutils grep lvm2 gawk -Requires: module-init-tools sed -Requires: cpio gzip Requires: %{name} = %{version}-%{release} %description tools @@ -118,12 +160,20 @@ This package contains tools to assemble the local initrd and host configuration. make WITH_SWITCH_ROOT=0%{?with_switch_root} %install +%if 0%{?fedora_version} > 0 rm -rf $RPM_BUILD_ROOT +%endif make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin \ sysconfdir=/etc mandir=%{_mandir} WITH_SWITCH_ROOT=0%{?with_switch_root} echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version +rm $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/check rm $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips/check + +%if 0%{?fedora_version} == 0 +rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/01fips +%endif + # remove gentoo specific modules rm -fr $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/50gensplash @@ -131,9 +181,16 @@ mkdir -p $RPM_BUILD_ROOT/boot/dracut mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log -install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/fedora.conf -%if 0%{?fedora} <= 12 && 0%{?rhel} < 6 +%if 0%{?fedora_version} > 0 +install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf +%endif + +%if 0%{?suse_version} > 0 +install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT/etc/dracut.conf.d/01-dist.conf +%endif + +%if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999 rm $RPM_BUILD_ROOT/sbin/mkinitrd rm $RPM_BUILD_ROOT/sbin/lsinitrd %endif @@ -143,19 +200,22 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,0755) -%doc README HACKING TODO COPYING AUTHORS NEWS +%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html /sbin/dracut %if 0%{?with_switch_root} /sbin/switch_root %endif -%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 +%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999 /sbin/mkinitrd /sbin/lsinitrd %endif %dir %{_datadir}/dracut +%dir %{_datadir}/dracut/modules.d %{_datadir}/dracut/dracut-functions %config(noreplace) /etc/dracut.conf -%config(noreplace) /etc/dracut.conf.d/fedora.conf +%if 0%{?fedora_version} > 0 || 0%{?suse_version} > 0 +%config(noreplace) /etc/dracut.conf.d/01-dist.conf +%endif %dir /etc/dracut.conf.d %{_mandir}/man8/dracut.8* %{_mandir}/man7/dracut.kernel.7* @@ -180,10 +240,12 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/dracut/modules.d/95rootfs-block %{_datadir}/dracut/modules.d/95dasd %{_datadir}/dracut/modules.d/95dasd_mod +%{_datadir}/dracut/modules.d/95fstab-sys %{_datadir}/dracut/modules.d/95zfcp %{_datadir}/dracut/modules.d/95terminfo %{_datadir}/dracut/modules.d/95udev-rules %{_datadir}/dracut/modules.d/95uswsusp +%{_datadir}/dracut/modules.d/96insmodpost %{_datadir}/dracut/modules.d/98selinux %{_datadir}/dracut/modules.d/98syslog %{_datadir}/dracut/modules.d/99base @@ -201,13 +263,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/dracut/modules.d/45ifcfg %{_datadir}/dracut/modules.d/95znet +%if 0%{?fedora_version} > 0 %files fips %defattr(-,root,root,0755) %{_datadir}/dracut/modules.d/01fips - -%files generic -%defattr(-,root,root,0755) -%doc README.generic +%endif %files tools %defattr(-,root,root,0755) @@ -220,6 +280,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Fri Oct 29 2010 Harald Hoyer 008-0.5 +- dracut-008 pre git snapshot + * Mon Aug 09 2010 Harald Hoyer 007-1 - version 007 diff --git a/sources b/sources index e3b9714..8bbce7e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e052dda4bdfc4d03915458dce2d86822 dracut-007.tar.bz2 +50fc485c6976556e13c984e45ae6f916 dracut-008-353ef76.tar.bz2