git snapshot of pre-version 011

This commit is contained in:
Harald Hoyer 2011-05-20 15:26:54 +02:00
parent 63d4c1c895
commit a600099ac0
22 changed files with 37 additions and 545 deletions

12
.gitignore vendored
View File

@ -1,11 +1 @@
dracut-006.tar.bz2
dracut-007.tar.bz2
/dracut-008-353ef76.tar.bz2
/dracut-008-3871942.tar.bz2
/dracut-008-5e1898f.tar.bz2
/dracut-008-325d491.tar.bz2
/dracut-008-b2415f4.tar.bz2
/dracut-008.tar.bz2
/dracut-009-519d339.tar.bz2
/dracut-009.tar.bz2
/dracut-010.tar.bz2
/dracut-011-9b30d47.tar.bz2

View File

@ -1,29 +0,0 @@
From dbf381f7fb369bd6336272847da882d8ef0e5a30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Tue, 29 Mar 2011 01:21:56 +0200
Subject: [PATCH] dracut: don't skip zero-length string outfile argument
When '' was passed as outfile, dracut generated name with following
pattern:
/boot/initramfs-$kernel
With commit 486a1b9324d6fc7bc534d8147d64b8b259692c46 dracut skips ''
argument.
---
dracut | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index 6b67dc0..c16b222 100755
--- a/dracut
+++ b/dracut
@@ -237,7 +237,7 @@ while (($# > 0)); do
;;
-*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
*)
- if ! [[ $outfile ]]; then
+ if ! [[ ${outfile+x} ]]; then
outfile=$1
elif [[ $kernel = "unset" ]]; then
kernel=$1

View File

@ -1,39 +0,0 @@
From 8a5354a9a5264c67a84c4705c931c5f554d8d343 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 11:21:54 +0200
Subject: [PATCH] dracut: simplify $kernel version argument setting
---
dracut | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dracut b/dracut
index c16b222..0a96c66 100755
--- a/dracut
+++ b/dracut
@@ -187,7 +187,6 @@ push_arg() {
fi
}
-kernel="unset"
verbosity_mod_l=0
while (($# > 0)); do
@@ -239,7 +238,7 @@ while (($# > 0)); do
*)
if ! [[ ${outfile+x} ]]; then
outfile=$1
- elif [[ $kernel = "unset" ]]; then
+ elif ! [[ ${kernel+x} ]]; then
kernel=$1
else
usage; exit 1;
@@ -248,7 +247,7 @@ while (($# > 0)); do
esac
shift
done
-if ! [[ $kernel ]] || [[ $kernel = "unset" ]]; then
+if ! [[ $kernel ]]; then
kernel=$(uname -r)
fi
[[ $outfile ]] || outfile="/boot/initramfs-$kernel.img"

View File

@ -1,24 +0,0 @@
From 2aad23443e995b99dd1477ed018c5ac472a06aea Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 11:27:15 +0200
Subject: [PATCH] dracut: source reformat with line breaks
---
dracut | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index 0a96c66..c156cdb 100755
--- a/dracut
+++ b/dracut
@@ -222,7 +222,9 @@ while (($# > 0)); do
-H|--hostonly) hostonly_l="yes" ;;
--fstab) use_fstab_l="yes" ;;
-h|--help) usage; exit 1 ;;
- -i|--include) push include_src "$2"; push include_target "$3"; shift 2;;
+ -i|--include) push include_src "$2"
+ push include_target "$3"
+ shift 2;;
--bzip2) compress_l="bzip2";;
--lzma) compress_l="lzma";;
--xz) compress_l="xz";;

View File

@ -1,22 +0,0 @@
From a16ebfd56abfb02f28b72a74c68c24501e2a75d7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 11:30:27 +0200
Subject: [PATCH] dracut-functions: bashified ret=ret+$? to ret+=$?
---
dracut-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 2accaec..2fc2471 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -787,7 +787,7 @@ instmods() {
# it may require
for_each_kmod_dep install_kmod_with_fw $mod \
--set-version $kernel ${moddirname}
- ret=$((ret+$?))
+ ((ret+=$?))
;;
esac
shift

View File

@ -1,22 +0,0 @@
From ea216a650ef738e324253f27b59d74e3d8aa6062 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 14:45:08 +0200
Subject: [PATCH] dracut: removed extra char in "Including modules done"
---
dracut | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index c156cdb..404b9db 100755
--- a/dracut
+++ b/dracut
@@ -493,7 +493,7 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
fi
done
unset moddir
-dinfo "*** Including modules' done ***"
+dinfo "*** Including modules done ***"
## final stuff that has to happen

View File

@ -1,22 +0,0 @@
From 8bc650d9dc6dd50ea3b955d5068c2f805a5d1878 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 15:32:34 +0200
Subject: [PATCH] dracut: add "/lib/firmware/updates" to default firmware path
---
dracut | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index 404b9db..c6605bb 100755
--- a/dracut
+++ b/dracut
@@ -350,7 +350,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
[[ $lvmconf_l ]] && lvmconf=$lvmconf_l
[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut
-[[ $fw_dir ]] || fw_dir=/lib/firmware
+[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware"
[[ $do_strip ]] || do_strip=no
[[ $compress_l ]] && compress=$compress_l
[[ $show_modules_l ]] && show_modules=$show_modules_l

View File

@ -1,20 +0,0 @@
From 85323dcbb957e7fa3daebd3d5b2f9563ef379ca2 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 15:46:53 +0200
Subject: [PATCH] 40network/dhcp-root.sh: s#initqueue-finished#initqueue/finished#g
---
modules.d/40network/dhcp-root.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/dhcp-root.sh b/modules.d/40network/dhcp-root.sh
index 8c5d723..85c7f08 100755
--- a/modules.d/40network/dhcp-root.sh
+++ b/modules.d/40network/dhcp-root.sh
@@ -21,5 +21,5 @@ if [ "$root" = "dhcp" ] || [ "$root" = "dhcp6" ] || [ "$netroot" = "dhcp" ] ; th
# Shut up init error check
[ -z "$root" ] && root="dhcp"
- echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue-finished/dhcp.sh
+ echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue/finished/dhcp.sh
fi

View File

@ -1,26 +0,0 @@
From c174aea07decb62d264b40301ee944ba50244438 Mon Sep 17 00:00:00 2001
From: Jon Ander Hernandez <jonan.h@gmail.com>
Date: Fri, 18 Feb 2011 12:24:06 +0100
Subject: [PATCH] Ensure rpc_pipefs is mounted
While on some systems (like Fedora) rpc_pipefs is mounted
automatically when sunrpc module is loaded, on Debian based systems it
needs to be mounted manually.
---
modules.d/95nfs/nfsroot | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules.d/95nfs/nfsroot b/modules.d/95nfs/nfsroot
index 486c0e1..f4c5051 100755
--- a/modules.d/95nfs/nfsroot
+++ b/modules.d/95nfs/nfsroot
@@ -90,6 +90,9 @@ options=${options:+$options,}$nfsrw
[ -x /sbin/rpcbind ] && [ -z "$(pidof rpcbind)" ] && rpcbind
if [ "$nfs" = "nfs4" ]; then
+ [ ! -d /var/lib/nfs/rpc_pipefs/nfs ] && \
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+
# Start rpc.statd as mount won't let us use locks on a NFSv4
# filesystem without talking to it. NFSv4 does locks internally,
# rpc.lockd isn't needed

View File

@ -1,36 +0,0 @@
From 7931bf04204ab41d6e87890e172f2805718bb93a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Mar 2011 16:38:11 +0200
Subject: [PATCH] plymouth gensplash: check for console_init before calling it
Thanks Jon Ander Hernandez!
---
modules.d/50gensplash/gensplash-pretrigger.sh | 2 +-
modules.d/50plymouth/plymouth-pretrigger.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/50gensplash/gensplash-pretrigger.sh b/modules.d/50gensplash/gensplash-pretrigger.sh
index 5350405..b0330a4 100755
--- a/modules.d/50gensplash/gensplash-pretrigger.sh
+++ b/modules.d/50gensplash/gensplash-pretrigger.sh
@@ -9,7 +9,7 @@ if getargbool 1 rd.splash -n rd_NO_SPLASH; then
info "Starting Gentoo Splash"
- /lib/udev/console_init tty0
+ [ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
CDROOT=0
. /lib/gensplash-lib.sh
splash init
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
index eae0be2..d560d6f 100755
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
@@ -19,6 +19,6 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
info "Starting plymouth daemon"
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
>/run/initramfs/plymouth
- /lib/udev/console_init tty0
+ [ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
/bin/plymouth --show-splash 2>&1 | vinfo
fi

View File

@ -1,22 +0,0 @@
From e620bb01da5c957c311f336c2f963c9bd9f692c5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 00:01:00 +0200
Subject: [PATCH] base/init: fix cdrom polling
---
modules.d/99base/init | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index b6f4e92..a30706b 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -234,7 +234,7 @@ while :; do
strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
ID_CDROM_MEDIA && continue
- if [ -e "$cdrom"/events_poll_msecs -a -n -e "/tmp/.poll_${cdrom##*/}" ]; then
+ if [ -e "$cdrom"/events_poll_msecs -a ! -e "/tmp/.poll_${cdrom##*/}" ]; then
msecs=$(while read a; do echo $a;done < "$cdrom"/events_poll_msecs)
if [ "$msecs" = "-1" ]; then
echo 250 > "$cdrom"/events_poll_msecs

View File

@ -1,24 +0,0 @@
From 4ad453445a7c8695c774cbfd2f5bd863e47e78df Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 01:45:17 +0200
Subject: [PATCH] base/dracut-lib.sh: relax getargbool value parsing
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
---
modules.d/99base/dracut-lib.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index a5406ab..37b3e76 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -98,7 +98,7 @@ getargbool() {
_b=$(getarg "$@")
[ $? -ne 0 -a -z "$_b" ] && _b=$_default
if [ -n "$_b" ]; then
- [ $_b -eq 0 ] && return 1
+ [ $_b = "0" ] && return 1
[ $_b = "no" ] && return 1
fi
return 0

View File

@ -1,36 +0,0 @@
From 561d7f4d7c7f6245a45c0943c91518654284e457 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 03:22:14 +0200
Subject: [PATCH] doc: s#/init.log#/run/initramfs/init.log#g
---
dracut.kernel.7.xml | 2 +-
dracut.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.kernel.7.xml b/dracut.kernel.7.xml
index 0eba171..ced98f4 100644
--- a/dracut.kernel.7.xml
+++ b/dracut.kernel.7.xml
@@ -134,7 +134,7 @@ This parameter can be specified multiple times.</para>
<envar>rd.debug</envar>
</term>
<listitem>
- <para>set -x for the dracut shell and logs to dmesg, console and <filename>/init.log</filename></para>
+ <para>set -x for the dracut shell and logs to dmesg, console and <filename>/run/initramfs/init.log</filename></para>
</listitem>
</varlistentry>
<varlistentry>
diff --git a/dracut.xml b/dracut.xml
index 9b70f0c..4f71de5 100644
--- a/dracut.xml
+++ b/dracut.xml
@@ -307,7 +307,7 @@ rd.live.overlay/
<listitem>
<para>With dracut &gt;= 002-11, you can inspect the rd.debug output with:
</para>
- <screen># less /init.log
+ <screen># less /run/initramfs/init.log
# dmesg | less</screen>
</listitem>
</orderedlist>

View File

@ -1,33 +0,0 @@
From 249f8b5bfc90d9a8ec542e870a527a08e1da7cc3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 03:23:37 +0200
Subject: [PATCH] base/init: fixed compat /dev/.initramfs copy
---
modules.d/99base/init | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index a30706b..83d9568 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -379,13 +379,13 @@ if [ -d "$NEWROOT"/run ]; then
mount --move /run "$NEWROOT"/run
else
if [ -e /run/initramfs ]; then
- mkdir -m 0755 /dev/.initramfs
- cp -axr /run/initramfs/* /dev/.initramfs >/dev/null 2>&1
- fi
- if [ -e /run/mdadm ]; then
- mkdir -m 0755 /dev/.mdadm
- cp -axr /run/mdadm/* /dev/.mdadm >/dev/null 2>&1
+ cp -axr /run/initramfs /dev/.initramfs >/dev/null 2>&1
+ if [ -e /run/initramfs/live ]; then
+ mkdir -m 0755 /dev/.initramfs/live
+ mount --move /run/initramfs/live /dev/.initramfs/live
+ fi
fi
+ umount -l /run
fi
if [ -f /etc/capsdrop ]; then

View File

@ -1,41 +0,0 @@
From 01583ae4ad05519a78cf661ff1104cd9b2910aa7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 14:50:42 +0200
Subject: [PATCH] fips: fixed "boot=<dev>" handling
---
modules.d/01fips/fips.sh | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
index febe23e..857c355 100755
--- a/modules.d/01fips/fips.sh
+++ b/modules.d/01fips/fips.sh
@@ -4,20 +4,18 @@
do_fips()
{
FIPSMODULES=$(cat /etc/fipsmodules)
- BOOT=$(getarg boot=)
+ boot=$(getarg boot=)
KERNEL=$(uname -r)
case "$boot" in
- block:LABEL=*|LABEL=*)
- boot="${boot#block:}"
+ LABEL=*)
boot="$(echo $boot | sed 's,/,\\x2f,g')"
boot="/dev/disk/by-label/${boot#LABEL=}"
- bootok=1 ;;
- block:UUID=*|UUID=*)
- boot="${boot#block:}"
- boot="/dev/disk/by-uuid/${root#UUID=}"
- bootok=1 ;;
+ ;;
+ UUID=*)
+ boot="/dev/disk/by-uuid/${boot#UUID=}"
+ ;;
/dev/*)
- bootok=1 ;;
+ ;;
*)
die "You have to specify boot=<boot device> as a boot option for fips=1" ;;
esac

View File

@ -1,24 +0,0 @@
From 8ee30d09a44601d54567d7d51c84b2d714dd8e0f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 30 Mar 2011 16:24:57 +0200
Subject: [PATCH] plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth
---
modules.d/50plymouth/plymouth-pretrigger.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
index d560d6f..477975f 100755
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
@@ -17,8 +17,8 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
[ -e /dev/fb ] || ln -s fb0 /dev/fb
info "Starting plymouth daemon"
- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
- >/run/initramfs/plymouth
+ mkdir -m 0755 -p /run/plymouth
+ [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
[ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
/bin/plymouth --show-splash 2>&1 | vinfo
fi

View File

@ -1,23 +0,0 @@
From 98b108284cc62203d3f9cc392b287affdee35305 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 31 Mar 2011 08:24:15 +0200
Subject: [PATCH] dmsquash-live/dmsquash-live-genrules.sh: fixed udev rule location
Fixed the rule directory to $UDEVRULESD
---
.../90dmsquash-live/dmsquash-live-genrules.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
index 1128be4..404d1c5 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-genrules.sh
@@ -8,7 +8,7 @@ case "$root" in
${root#live:/dev/}
printf 'SYMLINK=="%s", SYMLINK+="live"\n' \
${root#live:/dev/}
- } >> /dev/.udev/rules.d/99-live-mount.rules
+ } >> $UDEVRULESD/99-live-mount.rules
{
printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
${root#live:/dev/}

View File

@ -1,43 +0,0 @@
From 79471f365e5f276ac5463404fbe739ddb2e12465 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 31 Mar 2011 13:12:38 +0200
Subject: [PATCH] base/dracut-lib.sh: changed kmgs log levels
New kernel/dmesg understands syslog levels, so we log with "+24" to indicate
that dracut is a daemon (current init).
---
modules.d/99base/dracut-lib.sh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 37b3e76..930138a 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -236,8 +236,8 @@ source_conf() {
die() {
{
- echo "<1>dracut: FATAL: $@";
- echo "<1>dracut: Refusing to continue";
+ echo "<24>dracut: FATAL: $@";
+ echo "<24>dracut: Refusing to continue";
} > /dev/kmsg
{
@@ -260,14 +260,14 @@ check_quiet() {
warn() {
check_quiet
- echo "<4>dracut Warning: $@" > /dev/kmsg
+ echo "<28>dracut Warning: $@" > /dev/kmsg
[ "$DRACUT_QUIET" != "yes" ] && \
echo "dracut Warning: $@" >&2
}
info() {
check_quiet
- echo "<6>dracut: $@" > /dev/kmsg
+ echo "<30>dracut: $@" > /dev/kmsg
[ "$DRACUT_QUIET" != "yes" ] && \
echo "dracut: $@"
}

View File

@ -1,30 +0,0 @@
From 985377435120ce2b2ba48c9236f3f788a5db822a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 31 Mar 2011 14:10:22 +0200
Subject: [PATCH] base/init: reset PATH after the /run move
---
modules.d/99base/init | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 83d9568..0f18b44 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -373,7 +373,6 @@ info "Switching root"
wait_for_loginit
-export PATH="$OLD_PATH"
if [ -d "$NEWROOT"/run ]; then
mount --move /run "$NEWROOT"/run
@@ -388,6 +387,8 @@ else
umount -l /run
fi
+export PATH="$OLD_PATH"
+
if [ -f /etc/capsdrop ]; then
. /etc/capsdrop
info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."

6
Makefile.git Normal file
View File

@ -0,0 +1,6 @@
Patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done
patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1";done

View File

@ -1,3 +1,4 @@
%define gittag 9b30d47
# Variables must be defined
%define with_nbd 1
@ -6,20 +7,30 @@
%define with_nbd 0
%endif
%if %{defined gittag}
%define rdist .git%{gittag}%{?dist}
%define dashgittag -%{gittag}
%else
%define rdist %{?dist}
%endif
Name: dracut
Version: 010
Release: 1%{?dist}
Version: 011
%define release_prefix 0.1%{?rdist}
Release: %{release_prefix}
Summary: Initramfs generator using udev
%if 0%{?fedora}
Group: System Environment/Base
Group: System Environment/Base
%endif
%if 0%{?suse_version}
Group: System/Base
%endif
License: GPLv2+
License: GPLv2+
URL: https://dracut.wiki.kernel.org/
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{?dashgittag};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}%{?dashgittag}.tar.bz2
BuildArch: noarch
@ -83,16 +94,16 @@ Requires: util-linux >= 2.16
%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
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
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
Requires: %{name} = %{version}-%{release}
Requires: rpcbind
Requires: rpcbind
%if %{with_nbd}
Requires: nbd
%endif
@ -101,7 +112,7 @@ Requires: bridge-utils
%if 0%{?fedora}
Requires: iscsi-initiator-utils
Requires: nfs-utils
Requires: nfs-utils
Requires: dhclient
%endif
@ -155,14 +166,14 @@ This package contains tools to assemble the local initrd and host configuration.
%setup -q -n %{name}-%{version}%{?dashgittag}
%build
make WITH_SWITCH_ROOT=0%{?with_switch_root}
make
%install
%if 0%{?fedora}
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}
sysconfdir=/etc mandir=%{_mandir}
echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{_datadir}/dracut/modules.d/10rpmversion/dracut-version
@ -203,9 +214,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
/sbin/dracut
%if 0%{?with_switch_root}
/sbin/switch_root
%endif
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
/sbin/mkinitrd
/sbin/lsinitrd
@ -239,6 +247,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/dracut/modules.d/90lvm
%{_datadir}/dracut/modules.d/90mdraid
%{_datadir}/dracut/modules.d/90multipath
%{_datadir}/dracut/modules.d/91crypt-gpg
%{_datadir}/dracut/modules.d/95debug
%{_datadir}/dracut/modules.d/95resume
%{_datadir}/dracut/modules.d/95rootfs-block
@ -278,7 +287,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,0755)
%{_datadir}/dracut/modules.d/02caps
%files tools
%files tools
%defattr(-,root,root,0755)
%{_mandir}/man8/dracut-gencmdline.8*
%{_mandir}/man8/dracut-catimages.8*
@ -289,6 +298,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Fri May 20 2011 Harald Hoyer <harald@redhat.com> 011-0.1%{?rdist}
- git snapshot of pre-version 011
* Fri Apr 01 2011 Harald Hoyer <harald@redhat.com> 010-1
- version 010

View File

@ -1 +1 @@
85775501c6995451d6dbf96bcfe9904e dracut-010.tar.bz2
927a7872904858049cb8d2131655ebc1 dracut-011-9b30d47.tar.bz2