dracut-034-7.git20131008

- lvm: install thin utils for non-hostonly
- do not bail out, if kernel modules dir is missing
- dmsquash-live: add /dev/mapper/live-base
Resolves: rhbz#1016726
This commit is contained in:
Harald Hoyer 2013-10-08 17:09:59 +02:00
parent 0142f0711e
commit e7efcf337c
7 changed files with 5178 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From a3c0cef9a79608a45fee94ff6b31f9c63864923f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Oct 2013 10:30:00 +0200
Subject: [PATCH] lvm: install thin utils for non-hostonly
---
modules.d/90lvm/module-setup.sh | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index f98ffff..514addc 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -52,13 +52,17 @@ install() {
inst lvm
- get_host_lvs | while read line; do
- printf "%s" " rd.lvm.lv=$line"
- if ! [[ $_needthin ]]; then
- [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
- fi
- done >> "${initdir}/etc/cmdline.d/90lvm.conf"
- echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+ if [[ $hostonly ]]; then
+ get_host_lvs | while read line; do
+ printf "%s" " rd.lvm.lv=$line"
+ if ! [[ $_needthin ]]; then
+ [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1
+ fi
+ done >> "${initdir}/etc/cmdline.d/90lvm.conf"
+ echo >> "${initdir}/etc/cmdline.d/90lvm.conf"
+ else
+ _needthin=1
+ fi
inst_rules "$moddir/64-lvm.rules"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
From 6c8fc6e377b94e26e6d03cddbf174cb27caad0a6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Oct 2013 15:02:14 +0200
Subject: [PATCH] 10i18n/parse-i18n.sh: parse rd.vconsole and rd.locale
and removed systemd part, because parse-i18n.sh is not even installed in
systemd driven initramfs images.
---
modules.d/10i18n/parse-i18n.sh | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/modules.d/10i18n/parse-i18n.sh b/modules.d/10i18n/parse-i18n.sh
index 348c5bc..416a746 100755
--- a/modules.d/10i18n/parse-i18n.sh
+++ b/modules.d/10i18n/parse-i18n.sh
@@ -19,24 +19,18 @@ inst_key_val() {
unset _value
}
-inst_key_val '' /etc/vconsole.conf vconsole.keymap KEYMAP -d KEYTABLE
-inst_key_val '' /etc/vconsole.conf vconsole.font FONT -d SYSFONT
-inst_key_val '' /etc/vconsole.conf vconsole.font.map FONT_MAP -d CONTRANS
-inst_key_val '' /etc/vconsole.conf vconsole.font.unimap FONT_UNIMAP -d UNIMAP
-inst_key_val 1 /etc/vconsole.conf vconsole.font.unicode UNICODE vconsole.unicode
-inst_key_val '' /etc/vconsole.conf vconsole.keymap.ext EXT_KEYMAP
+inst_key_val '' /etc/vconsole.conf rd.vconsole.keymap vconsole.keymap KEYMAP -d KEYTABLE
+inst_key_val '' /etc/vconsole.conf rd.vconsole.font vconsole.font FONT -d SYSFONT
+inst_key_val '' /etc/vconsole.conf rd.vconsole.font.map vconsole.font.map FONT_MAP -d CONTRANS
+inst_key_val '' /etc/vconsole.conf rd.vconsole.font.unimap vconsole.font.unimap FONT_UNIMAP -d UNIMAP
+inst_key_val 1 /etc/vconsole.conf rd.vconsole.font.unicode vconsole.font.unicode UNICODE vconsole.unicode
+inst_key_val '' /etc/vconsole.conf rd.vconsole.keymap.ext vconsole.keymap.ext EXT_KEYMAP
-inst_key_val '' /etc/locale.conf locale.LANG LANG
-inst_key_val '' /etc/locale.conf locale.LC_ALL LC_ALL
+inst_key_val '' /etc/locale.conf rd.locale.LANG locale.LANG LANG
+inst_key_val '' /etc/locale.conf rd.locale.LC_ALL locale.LC_ALL LC_ALL
if [ -f /etc/locale.conf ]; then
. /etc/locale.conf
export LANG
export LC_ALL
fi
-
-if [ -n "$DRACUT_SYSTEMD" ]; then
- rm -f -- /etc/udev/rules.d/10-console.rules
- rm -f -- /lib/udev/rules.d/10-console.rules
- rm -f -- /lib/udev/console_init
-fi

View File

@ -0,0 +1,38 @@
From 05214a0bedc084a41c35a128609745ad04a0c6cf Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Oct 2013 15:03:40 +0200
Subject: [PATCH] dracut.sh: do not bail out, if kernel modules dir is missing
and only print a warning message
---
dracut.sh | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index e135dfc..d9533dd 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -496,17 +496,18 @@ if [[ $regenerate_all == "yes" ]]; then
((ret+=$?))
done
exit $ret
-elif [[ $kernel ]]; then
- if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then
- printf -- "Kernel version $kernel has no modules in /lib/modules/$kernel\n" >&2
- exit 1
- fi
fi
if ! [[ $kernel ]]; then
kernel=$(uname -r)
fi
+if [[ $kernel ]]; then
+ if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then
+ printf -- "Kernel version $kernel has no module directory /lib/modules/$kernel\n" >&2
+ fi
+fi
+
if ! [[ $outfile ]]; then
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
From 3622d6d7b0806023d60f62fc90b859adaefe5e59 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Tue, 8 Oct 2013 15:13:44 +0200
Subject: [PATCH] dmsquash-live: add /dev/mapper/live-base
This is similar to the reason for adding the
/run/initramfs/live-baseloop symlink -- access to the original live
image without overlays.
livemedia-creator does not create a osmin.img, so there is no mountable
device for it to use when rsyncing the live image to the target. It
needs a device that points to the original live image without overlays.
Note that lmc won't be creating osmin.img, since really isn't needed any
longer. Its purpose was to provide a minimal image that could be dd'd to
the target. Now that we use rsync this is no longer necessary.
The included patch adds a /dev/mapper/live-base device that Anaconda can
use whether or not there is an osmin present.
---
modules.d/90dmsquash-live/dmsquash-live-root.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
index 8951f80..5705e8d 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -144,6 +144,9 @@ do_live_overlay() {
over=$OVERLAY_LOOPDEV
fi
echo 0 $sz snapshot $base $over p 8 | dmsetup create live-rw
+
+ # Create a device that always points to a ro base image
+ echo 0 $sz linear $base 0 | dmsetup create --readonly live-base
}
# live cd helper function
@@ -225,9 +228,6 @@ if [ -n "$ROOTFLAGS" ]; then
ROOTFLAGS="-o $ROOTFLAGS"
fi
-if [ -b "$BASE_LOOPDEV" ]; then
- ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop
-fi
ln -s /dev/mapper/live-rw /dev/root
printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh

View File

@ -10,7 +10,7 @@
Name: dracut
Version: 034
Release: 1%{?dist}
Release: 7.git20131008%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -29,6 +29,12 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2
Patch1: 0001-lvm-install-thin-utils-for-non-hostonly.patch
Patch2: 0002-module-setup.sh-add-comments-for-dracut-called-funct.patch
Patch3: 0003-10i18n-parse-i18n.sh-parse-rd.vconsole-and-rd.locale.patch
Patch4: 0004-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch
Patch5: 0005-Doc-cleanup-extend-and-split-and-reuse.patch
Patch6: 0006-dmsquash-live-add-dev-mapper-live-base.patch
BuildRequires: bash git
@ -315,6 +321,7 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man7/dracut.cmdline.7*
%{_mandir}/man7/dracut.modules.7*
%{_mandir}/man7/dracut.bootup.7*
%{_mandir}/man5/dracut.conf.5*
%if %{defined _unitdir}
@ -448,6 +455,12 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Tue Oct 08 2013 Harald Hoyer <harald@redhat.com> 034-7.git20131008
- lvm: install thin utils for non-hostonly
- do not bail out, if kernel modules dir is missing
- dmsquash-live: add /dev/mapper/live-base
Resolves: rhbz#1016726
* Tue Oct 08 2013 Harald Hoyer <harald@redhat.com> 034-1
- version 034
- add option to turn on/off prelinking