Accepting request 246857 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/246857
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=57
This commit is contained in:
Stephan Kulow 2014-08-30 16:55:56 +00:00 committed by Git OBS Bridge
commit a8352f0c79
9 changed files with 312 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 077c4bc889733c6c38b767c99f56ef67a82ef432 Mon Sep 17 00:00:00 2001
From: jloeser <jloeser@suse.de>
Date: Fri, 22 Aug 2014 16:31:34 +0200
Subject: dracut.sh: corrected logfile check
---
dracut.sh | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index ffe4989..5bf41f2 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -803,9 +803,13 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
# eliminate IFS hackery when messing with fw_dir
fw_dir=${fw_dir//:/ }
-if [[ ! -f $logfile ]];then
- if [[ ! `touch $logfile > /dev/null 2>&1` ]];then
- printf "%s\n" "dracut: touch $logfile failed. Couldn't create logfile."
+# check for logfile and try to create one if it doesn't exist
+if [[ -n "$logfile" ]];then
+ if [[ ! -f "$logfile" ]];then
+ touch "$logfile"
+ if [ ! $? -eq 0 ] ;then
+ printf "%s\n" "dracut: touch $logfile failed." >&2
+ fi
fi
fi
--
1.7.6.1

View File

@ -0,0 +1,55 @@
From be3797f733ad5e956c73d0f17ba8bddc12b7f570 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Fri, 22 Aug 2014 18:52:22 +0200
Subject: dracut.sh: Fix UUID= fstab parsing in case --mount option is passed
Dracut parses /etc/fstab when --mount is option is passed (e.g. kdump).
In host_devs variable the real block device must be stored, not UUID=
There are other /etc/fstab syntax possibilities we now warn that they
are not correctly parsed. This will be fixed by another patch
when there is time to test this properly.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.sh | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 297c6bf..d087530 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1020,9 +1020,28 @@ declare -A host_fs_types
for line in "${fstab_lines[@]}"; do
set -- $line
+ dev="$1"
#dev mp fs fsopts
- push_host_devs "$1"
- host_fs_types["$1"]="$3"
+ case "$dev" in
+ UUID=*)
+ dev=/dev/disk/by-uuid/${dev#UUID=*}
+ ;;
+ LABEL=*)
+ dwarn "Not supported fstab line: $@"
+ ;;
+ PARTUUID=*)
+ dwarn "Not supported fstab line: $@"
+ ;;
+ PARTLABEL=*)
+ dwarn "Not supported fstab line: $@"
+ ;;
+ *)
+ dwarn "Not supported fstab line: $@"
+ ;;
+ esac
+ push_host_devs "$dev"
+ echo "$dev" "$3"
+ host_fs_types["$dev"]="$3"
done
for f in $add_fstab; do
--
1.7.6.1

View File

@ -0,0 +1,45 @@
From 445d0a70896485991ba8ccc763422eefcda1ba1e Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Mon, 25 Aug 2014 18:04:05 +0200
Subject: dracut.sh: Fix LABEL= and other fstab syntax
On my test system I had problem with -o device in combination with -l option,
but this must have been a blkid, or sysfs issue.
Patch should be correct.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.sh | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index d087530..2baacfd 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1024,19 +1024,16 @@ for line in "${fstab_lines[@]}"; do
#dev mp fs fsopts
case "$dev" in
UUID=*)
- dev=/dev/disk/by-uuid/${dev#UUID=*}
+ dev=$(blkid -l -t PARTLABEL="$dev" -o device)
;;
LABEL=*)
- dwarn "Not supported fstab line: $@"
+ dev=$(blkid -l -t LABEL="$dev" -o device)
;;
PARTUUID=*)
- dwarn "Not supported fstab line: $@"
+ dev=$(blkid -l -t PARTUUID="$dev" -o device)
;;
PARTLABEL=*)
- dwarn "Not supported fstab line: $@"
- ;;
- *)
- dwarn "Not supported fstab line: $@"
+ dev=$(blkid -l -t PARTLABEL="$dev" -o device)
;;
esac
push_host_devs "$dev"
--
1.7.6.1

View File

@ -0,0 +1,43 @@
From b444f676e0c3847a42e7cd360846c8b669b022c3 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Tue, 26 Aug 2014 17:31:33 +0200
Subject: dracut.sh: Fix fstab parsing again...
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 2baacfd..3a0c64b 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1024,20 +1024,20 @@ for line in "${fstab_lines[@]}"; do
#dev mp fs fsopts
case "$dev" in
UUID=*)
- dev=$(blkid -l -t PARTLABEL="$dev" -o device)
+ dev=$(blkid -l -t UUID=${dev#UUID=} -o device)
;;
LABEL=*)
- dev=$(blkid -l -t LABEL="$dev" -o device)
+ dev=$(blkid -l -t LABEL=${dev#LABEL=} -o device)
;;
PARTUUID=*)
- dev=$(blkid -l -t PARTUUID="$dev" -o device)
+ dev=$(blkid -l -t PARTUUID=${dev#PARTUUID=} -o device)
;;
PARTLABEL=*)
- dev=$(blkid -l -t PARTLABEL="$dev" -o device)
+ dev=$(blkid -l -t PARTLABEL=${dev#PARTLABEL=} -o device)
;;
esac
+ [ -z "$dev" ] && dwarn "Bad fstab entry $@" && continue
push_host_devs "$dev"
- echo "$dev" "$3"
host_fs_types["$dev"]="$3"
done
--
1.7.6.1

View File

@ -0,0 +1,26 @@
From b5a5fb4486dee09287df825ecd1d2f8b76a98682 Mon Sep 17 00:00:00 2001
From: Martin Wilck <martin.wilck@ts.fujitsu.com>
Date: Fri, 29 Aug 2014 15:42:51 +0200
Subject: Find kernel modules in extra and weak-updates path also
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut-functions.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 22e16ff..208c295 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1623,7 +1623,7 @@ find_kernel_modules_by_path () {
_OLDIFS=$IFS
IFS=:
while read a rest; do
- [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue
+ [[ $a = */$1/* ]] || [[ $a = updates/* ]] || [[ $a = extra/* ]] || [[ $a = weak-updates/* ]] || continue
printf "%s\n" "$srcmods/$a"
done < "$srcmods/modules.dep"
IFS=$_OLDIFS
--
1.7.6.1

View File

@ -0,0 +1,28 @@
From f25f24d6b13061b952d5420939898fe9d5496804 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Fri, 29 Aug 2014 16:17:50 +0200
Subject: Go back to xz again, pixz may use too much memory while compressing.
bnc#893981
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.conf.d/suse.conf.example | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example
index 818b59f..b0ef0e5 100644
--- a/dracut.conf.d/suse.conf.example
+++ b/dracut.conf.d/suse.conf.example
@@ -7,7 +7,7 @@
hostonly="yes"
hostonly_cmdline="yes"
-compress="pixz -6"
+compress="xz -0 --check=crc32 --memlimit-compress=50%"
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
omit_drivers+=" i2o_scsi"
--
1.7.6.1

View File

@ -0,0 +1,46 @@
From 9cbbca5888f657833e658fcfe1fc21e74c3a3507 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Fri, 29 Aug 2014 16:19:33 +0200
Subject: Add a comment to easily add debug modules, also add vi to debug
module
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.conf.d/suse.conf.example | 10 ++++++++++
modules.d/95debug/module-setup.sh | 2 +-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example
index b0ef0e5..37ffd72 100644
--- a/dracut.conf.d/suse.conf.example
+++ b/dracut.conf.d/suse.conf.example
@@ -12,3 +12,13 @@ compress="xz -0 --check=crc32 --memlimit-compress=50%"
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
omit_drivers+=" i2o_scsi"
+# Below adds additional tools to the initrd which are not urgently necessary to
+# bring up the system, but help to debug problems.
+# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
+# are installed and add more if you need them. This specifically helps if you
+# use:
+# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
+# mount|pre-pivot|cleanup]
+# boot parameter or if you are forced to enter the dracut emergency shell.
+
+# add_dracutmodules+=debug
diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh
index 1891fa8..cdc56dc 100755
--- a/modules.d/95debug/module-setup.sh
+++ b/modules.d/95debug/module-setup.sh
@@ -16,7 +16,7 @@ depends() {
# called by dracut
install() {
inst_multiple -o ps grep more cat rm strace free showmount \
- ping netstat rpcinfo vi scp ping6 ssh find \
+ ping netstat rpcinfo vi scp ping6 ssh find vi \
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
}
--
1.7.6.1

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Fri Aug 29 14:27:49 UTC 2014 - trenn@suse.de
- Do not blindly try to touch the logfile (bnc#893219)
* Add 0146-dracut.sh-corrected-logfile-check.patch
- Only fix UUID= fstab parsing
* Add 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch
- Also fix other parsing syntax in fstab like LABEL=
* Add 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch
- Fix up some bugs from previous commit
* Add 0149-dracut.sh-Fix-fstab-parsing-again.patch
- bnc#893615
* Add 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch
- pixz does need too much memory, go back to xz in a conservative way
(bnc#893981)
* Add 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch
- Add some default tools to initrd when debug module is included and
already provided an commented example line how to easily enable it.
No functional change by default.
* Add 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch
-------------------------------------------------------------------
Thu Aug 21 12:38:02 UTC 2014 - trenn@suse.de

View File

@ -166,6 +166,13 @@ Patch142: 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch
Patch143: 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch
Patch144: 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch
Patch145: 0145-40network-handle-ip-ifname-static-correctly.patch
Patch146: 0146-dracut.sh-corrected-logfile-check.patch
Patch147: 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch
Patch148: 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch
Patch149: 0149-dracut.sh-Fix-fstab-parsing-again.patch
Patch150: 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch
Patch151: 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch
Patch152: 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -185,10 +192,10 @@ Requires: pigz
Requires: sed
Requires: systemd >= 200
# systemd-sysvinit provides: poweroff, reboot, halt
Requires: pixz
Requires: systemd-sysvinit
Requires: udev > 166
Requires: util-linux >= 2.21
Requires: xz
Recommends: binutils
Recommends: logrotate
Obsoletes: mkinitrd < 2.8.2
@ -354,6 +361,13 @@ and its cryptography during startup.
%patch143 -p1
%patch144 -p1
%patch145 -p1
%patch146 -p1
%patch147 -p1
%patch148 -p1
%patch149 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
%build
%configure\