- version 005

This commit is contained in:
Harald Hoyer 2010-03-19 16:49:22 +00:00
parent a4fab5421b
commit f3773a3251
6 changed files with 23 additions and 138 deletions

View File

@ -1,19 +0,0 @@
commit 5db587d7c118afc47b50b4872100b508c84646fa
Author: Harald Hoyer <harald@redhat.com>
Date: Wed Jan 20 16:04:55 2010 +0100
init: fixed emergency_shell argument parsing
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 8dc00a9..ab033a7 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -35,7 +35,7 @@ wait_for_loginit()
emergency_shell()
{
- if [ $1 = "-n" ]; then
+ if [ "$1" = "-n" ]; then
_rdshell_name=$2
shift 2
else

View File

@ -1,19 +0,0 @@
diff -up dracut-004/modules.d/95udev-rules/install.fw dracut-004/modules.d/95udev-rules/install
--- dracut-004/modules.d/95udev-rules/install.fw 2010-01-29 16:40:11.000000000 +0100
+++ dracut-004/modules.d/95udev-rules/install 2010-01-29 16:40:25.000000000 +0100
@@ -15,7 +15,6 @@ inst_rules "$moddir/01-ignore.rules"
# for firmware loading
inst_rules 50-firmware.rules
-dracut_install /lib/udev/firmware.sh
dracut_install cat uname
if [ ! -x /lib/udev/vol_id ]; then
@@ -31,6 +30,7 @@ ata_id \
cdrom_id \
create_floppy_devices \
edd_id \
+firmware \
firmware.sh \
fw_unit_symlinks.sh \
hid2hci \

View File

@ -1,12 +0,0 @@
diff -up dracut-004/modules.d/99base/selinux-loadpolicy.sh.load dracut-004/modules.d/99base/selinux-loadpolicy.sh
--- dracut-004/modules.d/99base/selinux-loadpolicy.sh.load 2010-01-15 14:07:54.000000000 +0100
+++ dracut-004/modules.d/99base/selinux-loadpolicy.sh 2010-01-26 11:23:56.000000000 +0100
@@ -37,6 +37,8 @@ rd_load_policy()
} 2>&1 | vinfo
if [ $ret -eq 0 -o $ret -eq 2 ]; then
+ # If machine requires a relabel, force to permissive mode
+ [ -e "$NEWROOT"/.autorelabel ] && ( echo 0 > "$NEWROOT"/selinux/enforce )
return 0
fi

View File

@ -1,48 +0,0 @@
From: Peter Jones <pjones@redhat.com>
Subject: [PATCH] Add a check file for multipath.
Date: Fri, 22 Jan 2010 10:56:40 -0500
If multipath isn't installed, don't use it. If we're in hostonly mode,
only install the multipath module if it's used for / . Otherwise, if
the user was dumb enough to install it, they get it during bootup.
---
modules.d/90multipath/check | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
create mode 100755 modules.d/90multipath/check
diff --git a/modules.d/90multipath/check b/modules.d/90multipath/check
new file mode 100755
index 0000000..d0cad4c
--- /dev/null
+++ b/modules.d/90multipath/check
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# if there's no multipath binary, no go.
+which multipath >/dev/null 2>&1 || exit 1
+
+[[ $1 = -d ]] && exit 0
+
+. $dracutfunctions
+[[ $debug ]] && set -x
+
+is_mpath() {
+ [ -e /sys/dev/block/$1/dm/uuid ] || return 1
+ [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0
+ return 1
+}
+
+# If we're in hostonly mode, do mpath if we appear to be using it for /
+if [[ $1 = -h ]]; then
+ rootdev=$(find_root_block_device)
+ if [[ $rootdev ]]; then
+ check_block_and_slaves is_mpath "$rootdev" && exit 0
+ fi
+ exit 1
+fi
+
+# the user installed it, they get it...
+exit 0
--
1.6.5.2

View File

@ -1,6 +1,6 @@
# Variables must be defined
%define with_switch_root 1
%define with_nbd 1
%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
@ -19,19 +19,15 @@
%endif
Name: dracut
Version: 004
Release: 5%{?rdist}
Version: 005
Release: 1%{?rdist}
Summary: Initramfs generator using udev
Group: System Environment/Base
License: GPLv2+
Group: System Environment/Base
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
Patch1: dracut-004-emergency.patch
Patch2: dracut-004-forcepermissive.patch
Patch3: dracut-004-multipath-check.patch
Patch4: dracut-004-firmware.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6
@ -42,6 +38,8 @@ Obsoletes: mkinitrd-devel <= 6.0.93
Obsoletes: nash <= 6.0.93
Obsoletes: libbdevid-python <= 6.0.93
%endif
Obsoletes: dracut-kernel < 005
Provides: dracut-kernel = %{version}-%{release}
Requires: udev
Requires: util-linux-ng
@ -60,7 +58,7 @@ Requires: /bin/sh
Requires: fileutils, gzip, tar
Requires: lvm2 >= 2.02.33-9, dhclient
Requires: filesystem >= 2.1.0, cpio, device-mapper, initscripts >= 8.63-1
Requires: e2fsprogs >= 1.38-12, libselinux, libsepol, coreutils
Requires: e2fsprogs >= 1.38-12, coreutils
Requires: mdadm, elfutils-libelf
Requires(pre): plymouth >= 0.8.0-0.2009.29.09.19.1
Requires: plymouth >= 0.8.0-0.2009.29.09.19.1
@ -77,7 +75,11 @@ BuildArch: noarch
%endif
%description
dracut is a new, event-driven initramfs infrastructure based around udev.
Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels.
Unlike existing implementations, dracut does hard-code as little as possible
into the initramfs. Dracut contains various modules which are driven by the
event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as
NFS, iSCSI, NBD, FCoE with the dracut-network package.
%package network
Summary: Dracut modules to build a dracut initramfs with network support
@ -95,7 +97,7 @@ This package requires everything which is needed to build a generic
all purpose initramfs with network support with dracut.
%package fips
Summary: dracut modules to build a dracut initramfs with an integrity check.
Summary: Dracut modules to build a dracut initramfs with an integrity check
Requires: %{name} = %{version}-%{release}
Requires: hmaccalc
%if 0%{?rhel} > 5
@ -119,23 +121,8 @@ Requires: %{name}-network = %{version}-%{release}
This package requires everything which is needed to build a generic
all purpose initramfs with dracut.
%package kernel
Summary: Metapackage to build generic initramfs with dracut with only kernel modules
Requires: %{name} = %{version}-%{release}
Requires: ql2100-firmware
Requires: ql2200-firmware
Requires: ql23xx-firmware
Requires: ql2400-firmware
Requires: ql2500-firmware
%description kernel
This package requires everything which is needed to build a initramfs with all
kernel modules and firmware files needed by dracut modules.
%package tools
Summary: Dracut tools to build the local initramfs
Requires: %{name} = %{version}-%{release}
Requires: coreutils cryptsetup-luks device-mapper
Requires: diffutils dmraid findutils gawk grep lvm2
Requires: module-init-tools sed
@ -146,12 +133,6 @@ This package contains tools to assemble the local initrd and host configuration.
%prep
%setup -q -n %{name}-%{version}%{?dashgittag}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
chmod 0755 modules.d/90multipath/check
chmod 0755 modules.d/60xen/check
%build
make WITH_SWITCH_ROOT=0%{?with_switch_root}
@ -191,6 +172,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/dracut
%{_datadir}/dracut/dracut-functions
%config(noreplace) /etc/dracut.conf
%dir /etc/dracut.conf.d
%{_mandir}/man8/dracut.8*
%{_mandir}/man5/dracut.conf.5*
%{_datadir}/dracut/modules.d/00dash
@ -218,11 +200,13 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/dracut/modules.d/95uswsusp
%{_datadir}/dracut/modules.d/98syslog
%{_datadir}/dracut/modules.d/99base
# logfile needs no logrotate, because it gets overwritten
# for every dracut run
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%files network
%doc README HACKING TODO COPYING AUTHORS NEWS
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS
%{_datadir}/dracut/modules.d/40network
%{_datadir}/dracut/modules.d/95fcoe
%{_datadir}/dracut/modules.d/95iscsi
@ -235,10 +219,6 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING
%{_datadir}/dracut/modules.d/01fips
%files kernel
%defattr(-,root,root,0755)
%doc README.kernel
%files generic
%defattr(-,root,root,0755)
%doc README.generic
@ -255,6 +235,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Fri Mar 19 2010 Harald Hoyer <harald@redhat.com> 005-1
- version 005
* Fri Jan 29 2010 Harald Hoyer <harald@redhat.com> 004-5
- fixed firmware.sh bug (#559975 #559597)

View File

@ -1 +1 @@
28a18c64b659be38567966aed84e7dc9 dracut-004.tar.bz2
c10b32b0b6402f740079f0d8728829bf dracut-005.tar.bz2