From: Harald Hoyer Date: Mon, 25 Oct 2010 15:23:28 +0000 (+0200) Subject: dracut.spec: modified to build on opensuse X-Git-Tag: 008~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=228694e5a90d34688d3f2b4d3d1f15f14a16cae1;p=thirdparty%2Fdracut.git dracut.spec: modified to build on opensuse --- diff --git a/dracut.spec b/dracut.spec index 077786538..602d967a3 100644 --- a/dracut.spec +++ b/dracut.spec @@ -1,11 +1,6 @@ # Variables must be defined -%define with_switch_root 1 %define with_nbd 1 -# switchroot provided by util-linux-ng in F-12+ -%if 0%{?fedora} > 11 || 0%{?rhel} >= 6 || 0%{?suse_version} > 1110 -%define with_switch_root 0 -%endif # nbd in Fedora only %if 0%{?rhel} >= 6 %define with_nbd 0 @@ -20,15 +15,29 @@ Name: dracut Version: 008 -Release: 0.1%{?rdist} +%define release_prefix 0.4%{?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) +%endif +%if 0%{?suse_version} > 0 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif %if 0%{?fedora_version} > 0 BuildRequires: docbook-style-xsl docbook-dtds libxslt @@ -46,6 +55,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} @@ -77,10 +92,6 @@ Requires: util-linux >= 2.16 %endif -%if ! 0%{?with_switch_root} -BuildArch: noarch -%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 @@ -91,20 +102,31 @@ 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 + +%if 0%{?fedora_version} > 0 +Requires: iscsi-initiator-utils +Requires: nfs-utils +Requires: dhclient Requires: vconfig +%endif + +%if 0%{?suse_version} > 0 +Requires: dhcp-client +Requires: nfs-client +Requires: vlan +%endif %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} @@ -120,22 +142,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 @@ -148,13 +158,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 @@ -171,7 +188,7 @@ install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT/etc/dracut.con 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} > 0 +%if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999 rm $RPM_BUILD_ROOT/sbin/mkinitrd rm $RPM_BUILD_ROOT/sbin/lsinitrd %endif @@ -186,7 +203,7 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -243,13 +260,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) @@ -262,316 +277,3 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog -* Thu Jun 17 2010 Harald Hoyer 006-1 -- version 006 - -* Fri Jun 11 2010 Harald Hoyer -- Remove requirements, which are not really needed -Resolves: rhbz#598509 -- fixed copy of network config to /dev/.initramfs/ (patch 146) -Resolves: rhbz#594649 -- more password beauty (patch 142) -Resolves: rhbz#561092 -- support multiple iSCSI disks (patch 143) -Resolves: rbhz#580190 -- fixed selinux=0 (patch 130) -Resolves: rhbz#593080 -- add support for booting LVM snapshot root volume (patch 145) -Resolves: rbhz#602723 -- remove hardware field from BOOTIF= (patch 148) -Resolves: rhbz#599593 -- add aes kernel modules and fix crypt handling (patch 137, patch 140 and patch 147) -Resolves: rhbz#600170 - -* Thu May 27 2010 Harald Hoyer -- fixed Requirements -- fixed autoip6 -Resolves: rhbz#538388 -- fixed multipath -Resolves: rhbz#595719 - -* Thu May 06 2010 Harald Hoyer -- only display short password messages -Resolves: rhbz#561092 - -* Thu May 06 2010 Harald Hoyer -- fixed dracut manpages -Resolves: rhbz#589109 -- use ccw-init and ccw rules from s390utils -Resolves: rhbz#533494 -- fixed fcoe -Resolves: rhbz#486244 -- various other bugfixes seen in Fedora - -* Tue Apr 20 2010 Harald Hoyer -- fixed network with multiple nics -- fixed nfsidmap paths -- do not run blkid on non active container raids -- fixed cdrom polling mechanism -- update to latest git - -* Thu Apr 15 2010 Harald Hoyer -- fixed dracut manpages -- dmraid parse different error messages -- add cdrom polling mechanism for slow cdroms -- add module btrfs -- teach dmsquash live-root to use rootflags -- trigger udev with action=add -- fixed add_drivers handling -- add sr_mod -- use pigz instead of gzip, if available - -* Thu Mar 25 2010 Harald Hoyer -- removed firmware requirements (rhbz#572634) -- add /etc/dracut.conf.d -- Resolves: rhbz#572634 - -* Fri Mar 19 2010 Harald Hoyer -- version 005 - -* Fri Mar 19 2010 Harald Hoyer -- fixed rpmlint errors (rhbz#570547) -- removed firmware package from dracut-kernel (rhbz#572634) -- add dcb support to dracut's FCoE support (rhbz#563794) -- force install some modules in hostonly mode (rhbz#573094) -- various other bugfixes -- Resolves: rhbz#570547, rhbz#572634, rhbz#563794, rhbz#573094 - -* Thu Feb 18 2010 Harald Hoyer 004-15 -- fixed "selinux=0" booting (rhbz#566376) -- fixed internal IFS handling -- Resolves: rhbz#566376 - -* Fri Jan 29 2010 Harald Hoyer 004-5 -- fixed firmware.sh bug (#559975 #559597) - -* Tue Jan 26 2010 Harald Hoyer 004-4 -- add multipath check - -* Tue Jan 26 2010 Harald Hoyer 004-3 -- fix selinux handling if .autorelabel is present -- Resolves: rhbz#557744 - -* Wed Jan 20 2010 Harald Hoyer 004-2 -- fix emergency_shell argument parsing -- Related: rhbz#543948 - -* Fri Jan 15 2010 Harald Hoyer 004-1 -- version 004 -- Resolves: rhbz#529339 rhbz#533494 rhbz#548550 -- Resolves: rhbz#548555 rhbz#553195 - -* Wed Jan 13 2010 Harald Hoyer 003-3 -- add Obsoletes of mkinitrd/nash/libbdevid-python -- Related: rhbz#543948 - -* Wed Jan 13 2010 Warren Togami 003-2 -- nbd is Fedora only - -* Fri Nov 27 2009 Harald Hoyer 003-1 -- version 003 - -* Mon Nov 23 2009 Harald Hoyer 002-26 -- add WITH_SWITCH_ROOT make flag -- add fips requirement conditional -- add more device mapper modules (bug #539656) - -* Fri Nov 20 2009 Dennis Gregorovic - 002-25.1 -- nss changes for Alpha 3 - -* Thu Nov 19 2009 Harald Hoyer 002-25 -- add more requirements for dracut-fips (bug #539257) - -* Tue Nov 17 2009 Harald Hoyer 002-24 -- put fips module in a subpackage (bug #537619) - -* Tue Nov 17 2009 Harald Hoyer 002-23 -- install xdr utils for multipath (bug #463458) - -* Thu Nov 12 2009 Harald Hoyer 002-22 -- add module 90multipath -- add module 01fips -- renamed module 95ccw to 95znet (bug #533833) -- crypt: ignore devices in /etc/crypttab (root is not in there) -- dasd: only install /etc/dasd.conf in hostonly mode (bug #533833) -- zfcp: only install /etc/zfcp.conf in hostonly mode (bug #533833) -- kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc (bug #527750) -- dasd: use dasdconf.sh from s390utils (bug #533833) - -* Fri Nov 06 2009 Harald Hoyer 002-21 -- fix rd_DASD argument handling (bug #531720) -- Resolves: rhbz#531720 - -* Wed Nov 04 2009 Harald Hoyer 002-20 -- fix rd_DASD argument handling (bug #531720) -- Resolves: rhbz#531720 - -* Tue Nov 03 2009 Harald Hoyer 002-19 -- changed rd_DASD to rd_DASD_MOD (bug #531720) -- Resolves: rhbz#531720 - -* Tue Oct 27 2009 Harald Hoyer 002-18 -- renamed lvm/device-mapper udev rules according to upstream changes -- fixed dracut search path issue - -* Mon Oct 26 2009 Harald Hoyer 002-17 -- load dm_mod module (bug #530540) - -* Fri Oct 09 2009 Jesse Keating - 002-16 -- Upgrade plymouth to Requires(pre) to make it show up before kernel - -* Thu Oct 08 2009 Harald Hoyer 002-15 -- s390 ccw: s/layer1/layer2/g - -* Thu Oct 08 2009 Harald Hoyer 002-14 -- add multinic support -- add s390 zfcp support -- add s390 network support - -* Wed Oct 07 2009 Harald Hoyer 002-13 -- fixed init= handling -- kill loginit if "rdinitdebug" specified -- run dmsquash-live-root after udev has settled (bug #527514) - -* Tue Oct 06 2009 Harald Hoyer 002-12 -- add missing loginit helper -- corrected dracut manpage - -* Thu Oct 01 2009 Harald Hoyer 002-11 -- fixed dracut-gencmdline for root=UUID or LABEL - -* Thu Oct 01 2009 Harald Hoyer 002-10 -- do not destroy assembled raid arrays if mdadm.conf present -- mount /dev/shm -- let udevd not resolve group and user names -- preserve timestamps of tools on initramfs generation -- generate symlinks for binaries correctly -- moved network from udev to initqueue -- mount nfs3 with nfsvers=3 option and retry with nfsvers=2 -- fixed nbd initqueue-finished -- improved debug output: specifying "rdinitdebug" now logs - to dmesg, console and /init.log -- stop udev before killing it -- add ghost /var/log/dracut.log -- dmsquash: use info() and die() rather than echo -- strip kernel modules which have no x bit set -- redirect stdin, stdout, stderr all RW to /dev/console - so the user can use "less" to view /init.log and dmesg - -* Tue Sep 29 2009 Harald Hoyer 002-9 -- make install of new dm/lvm udev rules optionally -- correct dasd module typo - -* Fri Sep 25 2009 Warren Togami 002-8 -- revert back to dracut-002-5 tarball 845dd502 - lvm2 was reverted to pre-udev - -* Wed Sep 23 2009 Harald Hoyer 002-7 -- build with the correct tarball - -* Wed Sep 23 2009 Harald Hoyer 002-6 -- add new device mapper udev rules and dmeventd - bug 525319, 525015 - -* Wed Sep 23 2009 Warren Togami 002-5 -- Revert back to -3, Add umount back to initrd - This makes no functional difference to LiveCD. See Bug #525319 - -* Mon Sep 21 2009 Warren Togami 002-4 -- Fix LiveCD boot regression - -* Mon Sep 21 2009 Harald Hoyer 002-3 -- bail out if selinux policy could not be loaded and - selinux=0 not specified on kernel command line - (bug #524113) -- set finished criteria for dmsquash live images - -* Fri Sep 18 2009 Harald Hoyer 002-2 -- do not cleanup dmraids -- copy over lvm.conf - -* Thu Sep 17 2009 Harald Hoyer 002-1 -- version 002 -- set correct PATH -- workaround for broken mdmon implementation - -* Wed Sep 16 2009 Harald Hoyer 001-12 -- removed lvm/mdraid/dmraid lock files -- add missing ifname= files - -* Wed Sep 16 2009 Harald Hoyer 001-11 -- generate dracut-version during rpm build time - -* Tue Sep 15 2009 Harald Hoyer 001-10 -- add ifname= argument for persistent netdev names -- new /initqueue-finished to check if the main loop can be left -- copy mdadm.conf if --mdadmconf set or mdadmconf in dracut.conf - -* Wed Sep 09 2009 Harald Hoyer 001-9 -- added Requires: plymouth-scripts - -* Wed Sep 09 2009 Harald Hoyer 001-8 -- plymouth: use plymouth-populate-initrd -- add add_drivers for dracut and dracut.conf -- do not mount /proc and /selinux manually in selinux-load-policy - -* Wed Sep 09 2009 Harald Hoyer 001-7 -- add scsi_wait_scan to be sure everything was scanned - -* Tue Sep 08 2009 Harald Hoyer 001-6 -- fixed several problems with md raid containers -- fixed selinux policy loading - -* Tue Sep 08 2009 Harald Hoyer 001-5 -- patch does not honor file modes, fixed them manually - -* Mon Sep 07 2009 Harald Hoyer 001-4 -- fixed mdraid for IMSM - -* Mon Sep 07 2009 Harald Hoyer 001-3 -- fixed bug, which prevents installing 61-persistent-storage.rules (bug #520109) - -* Thu Sep 03 2009 Harald Hoyer 001-2 -- fixed missing grep for md -- reorder cleanup - -* Wed Sep 02 2009 Harald Hoyer 001-1 -- version 001 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Fri Aug 14 2009 Harald Hoyer 0.9-1 -- version 0.9 - -* Thu Aug 06 2009 Harald Hoyer 0.8-1 -- version 0.8 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Fri Jul 24 2009 Harald Hoyer 0.7-1 -- version 0.7 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Wed Jul 22 2009 Harald Hoyer 0.6-1 -- version 0.6 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Fri Jul 17 2009 Harald Hoyer 0.5-1 -- version 0.5 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Sat Jul 04 2009 Harald Hoyer 0.4-1 -- version 0.4 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Thu Jul 02 2009 Harald Hoyer 0.3-1 -- version 0.3 -- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=blob_plain;f=NEWS - -* Wed Jul 01 2009 Harald Hoyer 0.2-1 -- version 0.2 - -* Fri Jun 19 2009 Harald Hoyer 0.1-1 -- first release - -* Thu Dec 18 2008 Jeremy Katz - 0.0-1 -- Initial build -