Accepting request 224246 from home:trenn:branches:Base:System
- Make sure that --add-drivers is not called with whitespace string which will lead to a "read line" user input request and things may get stuck at installation. - Add: dracut-fix-whitespace-add-drivers_call.patch - Remove s390 grub module again -> this will go into grub2 package (ask rw@suse.de for details) Delete/remove: s390_add-user-space-grub-rule.patch - Add installkernel script which installs the kernel when: make install is invoked. The script from mkinitrd has been taken over and adopted. Added source: dracut-installkernel bnc#862990 OBS-URL: https://build.opensuse.org/request/show/224246 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=105
This commit is contained in:
parent
d443be08bc
commit
d1cac4a2c4
77
dracut-fix-whitespace-add-drivers_call.patch
Normal file
77
dracut-fix-whitespace-add-drivers_call.patch
Normal file
@ -0,0 +1,77 @@
|
||||
Index: dracut-036/mkinitrd-suse.sh
|
||||
===================================================================
|
||||
--- dracut-036.orig/mkinitrd-suse.sh
|
||||
+++ dracut-036/mkinitrd-suse.sh
|
||||
@@ -70,10 +70,7 @@ usage () {
|
||||
$cmd " -j device Journal device"
|
||||
$cmd " -D interface Run dhcp on the specified interface."
|
||||
$cmd " -I interface Configure the specified interface statically."
|
||||
- $cmd " -a acpi_dsdt Attach compiled ACPI DSDT (Differentiated"
|
||||
- $cmd " System Description Table) to initrd. This"
|
||||
- $cmd " replaces the DSDT of the BIOS. Defaults to"
|
||||
- $cmd " the ACPI_DSDT variable in /etc/sysconfig/kernel."
|
||||
+ $cmd " -a acpi_dsdt Obsolete, do not use."
|
||||
$cmd " -s size Add splash animation and bootscreen to initrd."
|
||||
|
||||
[[ $1 = '-n' ]] && exit 0
|
||||
@@ -310,11 +307,10 @@ if [ -f /etc/sysconfig/kernel ] ; then
|
||||
. /etc/sysconfig/kernel
|
||||
fi
|
||||
[[ $module_list ]] || module_list="${INITRD_MODULES}"
|
||||
-basicmodules="$basicmodules ${module_list}"
|
||||
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
|
||||
-[[ $acpi_dsdt ]] || acpi_dsdt="${ACPI_DSDT}"
|
||||
+shopt -s extglob
|
||||
|
||||
-echo "Creating: target|kernel|dracut args|basicmodules "
|
||||
+echo "Creating: target|kernel|dracut args "
|
||||
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
||||
|
||||
if [[ $img_vers ]];then
|
||||
@@ -324,28 +320,30 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); d
|
||||
fi
|
||||
kernel="${kernels[$i]}"
|
||||
|
||||
+ if is_xen_kernel $kernel $rootfs ; then
|
||||
+ modules_all="${module_list} ${domu_module_list}"
|
||||
+ else
|
||||
+ modules_all="${module_list}"
|
||||
+ fi
|
||||
+
|
||||
+ # Remove leading and trailing spaces needs (set above): shopt -s extglob
|
||||
+ modules_all=${modules_all%%+([[:space:]])}
|
||||
+ modules_all=${modules_all##+([[:space:]])}
|
||||
+ if [ -n "${modules_all}" ];then
|
||||
+ dracut_args_all="$dracut_args --add-drivers \"${modules_all}\""
|
||||
+ else
|
||||
+ dracut_args_all="$dracut_args"
|
||||
+ fi
|
||||
+
|
||||
# Duplicate code: No way found how to redirect output based on $quiet
|
||||
if [[ $quiet == 1 ]];then
|
||||
- echo "$target|$kernel|$dracut_args|$basicmodules"
|
||||
+ echo "$target|$kernel|$dracut_args_all"
|
||||
if is_xen_kernel $kernel $rootfs ; then
|
||||
basicmodules="$basicmodules ${domu_module_list}"
|
||||
fi
|
||||
- if [[ $basicmodules ]]; then
|
||||
- $dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \
|
||||
- "$kernel" &>/dev/null
|
||||
- else
|
||||
- $dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
|
||||
- fi
|
||||
+ $dracut_cmd $dracut_args_all "$target" "$kernel" &>/dev/null
|
||||
else
|
||||
- if is_xen_kernel $kernel $rootfs ; then
|
||||
- basicmodules="$basicmodules ${domu_module_list}"
|
||||
- fi
|
||||
- if [[ $basicmodules ]]; then
|
||||
- $dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \
|
||||
- "$kernel"
|
||||
- else
|
||||
- $dracut_cmd $dracut_args "$target" "$kernel"
|
||||
- fi
|
||||
+ $dracut_cmd $dracut_args_all "$target" "$kernel"
|
||||
fi
|
||||
done
|
||||
|
107
dracut-installkernel
Normal file
107
dracut-installkernel
Normal file
@ -0,0 +1,107 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# /sbin/installkernel - written by tyson@rwii.com
|
||||
#
|
||||
# May 21, 2003 - agruen@suse.de
|
||||
# * Adapted for SuSE and cleaned up.
|
||||
#
|
||||
# This file is kept in the following CVS repository:
|
||||
#
|
||||
# $Source: /suse/yast2/cvsroot/mkinitrd/installkernel,v $
|
||||
# $Revision: 1.8 $
|
||||
#
|
||||
|
||||
: ${INSTALL_PATH:=/boot}
|
||||
KERNEL_VERSION=$1
|
||||
BOOTIMAGE=$2
|
||||
MAPFILE=$3
|
||||
|
||||
case "$(uname -m)" in
|
||||
s390|s390x)
|
||||
BOOTFILE=image
|
||||
;;
|
||||
ppc|ppc64)
|
||||
BOOTFILE=vmlinux
|
||||
;;
|
||||
*)
|
||||
BOOTFILE=vmlinuz
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Move away files from versions up to SuSE Linux 8.2
|
||||
#
|
||||
|
||||
if [ -f $INSTALL_PATH/$BOOTFILE -a ! -L $INSTALL_PATH/$BOOTFILE ]; then
|
||||
mv $INSTALL_PATH/$BOOTFILE $INSTALL_PATH/$BOOTFILE.old
|
||||
fi
|
||||
|
||||
if [ -L $INSTALL_PATH/System.map ]; then
|
||||
rm -f $INSTALL_PATH/System.map
|
||||
elif [ -f $INSTALLPATH/System.map ]; then
|
||||
mv $INSTALL_PATH/System.map $INSTALL_PATH/System.map.old
|
||||
fi
|
||||
|
||||
#
|
||||
# Move away files from after SuSE Linux 8.2
|
||||
#
|
||||
|
||||
if [ -f $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION ]; then
|
||||
mv $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION \
|
||||
$INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION.old;
|
||||
fi
|
||||
|
||||
if [ -f $INSTALL_PATH/System.map-$KERNEL_VERSION ]; then
|
||||
mv $INSTALL_PATH/System.map-$KERNEL_VERSION \
|
||||
$INSTALL_PATH/System.map-$KERNEL_VERSION.old;
|
||||
fi
|
||||
|
||||
#
|
||||
# Install new files
|
||||
#
|
||||
|
||||
cp -fp $BOOTIMAGE $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION
|
||||
cp -fp $MAPFILE $INSTALL_PATH/System.map-$KERNEL_VERSION
|
||||
|
||||
KERNTYPES=$(dirname $MAPFILE)/init/kerntypes.o
|
||||
if [ -e $KERNTYPES ]; then
|
||||
cp -fp $KERNTYPES $INSTALL_PATH/Kerntypes-$KERNEL_VERSION
|
||||
fi
|
||||
|
||||
case "$(uname -m)" in
|
||||
i?86 | x86_64)
|
||||
KERNBIN=$(dirname $MAPFILE)/vmlinux
|
||||
if [ -e $KERNBIN ]; then
|
||||
if [ -f $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz ]; then
|
||||
mv $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz \
|
||||
$INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz.old;
|
||||
fi
|
||||
gzip -c $KERNBIN > $INSTALL_PATH/vmlinux-$KERNEL_VERSION.gz
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -d /lib/modules/$KERNEL_VERSION ];then
|
||||
make modules_install
|
||||
fi
|
||||
|
||||
#
|
||||
# Generate initial ramdisk
|
||||
#
|
||||
if [ -x /usr/bin/dracut -a -d /lib/modules/$KERNEL_VERSION ]; then
|
||||
/usr/bin/dracut --hostonly --force $INSTALL_PATH/initrd-$KERNEL_VERSION
|
||||
else
|
||||
echo "You may need to create an initial ramdisk now."
|
||||
fi
|
||||
|
||||
#
|
||||
# Update boot loader
|
||||
#
|
||||
if [ -x /sbin/update-bootloader ]; then
|
||||
opt_initrd=
|
||||
[ -e $INSTALL_PATH/initrd-$KERNEL_VERSION ] \
|
||||
&& opt_initrd="--initrd $INSTALL_PATH/initrd-$KERNEL_VERSION"
|
||||
/sbin/update-bootloader --name $KERNEL_VERSION \
|
||||
--image $INSTALL_PATH/$BOOTFILE-$KERNEL_VERSION \
|
||||
$opt_initrd --add --force
|
||||
fi
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 27 14:08:56 UTC 2014 - trenn@suse.de
|
||||
|
||||
- Make sure that --add-drivers is not called with whitespace string which
|
||||
will lead to a "read line" user input request and things may get stuck at
|
||||
installation.
|
||||
- Add: dracut-fix-whitespace-add-drivers_call.patch
|
||||
- Remove s390 grub module again -> this will go into grub2 package
|
||||
(ask rw@suse.de for details)
|
||||
Delete/remove: s390_add-user-space-grub-rule.patch
|
||||
- Add installkernel script which installs the kernel when:
|
||||
make install
|
||||
is invoked. The script from mkinitrd has been taken over and adopted.
|
||||
Added source: dracut-installkernel
|
||||
bnc#862990
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 14:56:20 UTC 2014 - trenn@suse.de
|
||||
|
||||
|
14
dracut.spec
14
dracut.spec
@ -33,6 +33,7 @@ Source2: parse-suse-initrd.sh
|
||||
Source3: mkinitrd_setup_dummy
|
||||
Source4: purge-kernels
|
||||
Source5: purge-kernels.service
|
||||
Source6: dracut-installkernel
|
||||
Patch10: 0006-Install-bin-mount.patch
|
||||
Patch11: 0013-Correct-paths-for-openSUSE.patch
|
||||
Patch12: 0014-Check-for-plymouth-lib-directories.patch
|
||||
@ -41,9 +42,9 @@ Patch14: suse_grub_manpage.patch
|
||||
Patch15: replace_dhclient_with_wickedd_dhcp_supplicants.patch
|
||||
Patch16: fix-iscsi-firmware.patch
|
||||
Patch17: remove-iscsiuio.patch
|
||||
Patch18: s390_add-user-space-grub-rule.patch
|
||||
Patch19: 0015-add-new-s390x-specific-rule-files.patch
|
||||
Patch20: change_write_ifcfg_to_suse.patch
|
||||
Patch18: 0015-add-new-s390x-specific-rule-files.patch
|
||||
Patch19: change_write_ifcfg_to_suse.patch
|
||||
Patch20: dracut-fix-whitespace-add-drivers_call.patch
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: bash
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
@ -66,9 +67,6 @@ Requires: systemd-sysvinit
|
||||
Requires: udev > 166
|
||||
Requires: util-linux >= 2.21
|
||||
Requires: xz
|
||||
%ifarch s390x
|
||||
Requires: grub2
|
||||
%endif
|
||||
Recommends: binutils
|
||||
Recommends: logrotate
|
||||
Obsoletes: mkinitrd < 2.8.2
|
||||
@ -184,7 +182,7 @@ install -m 0644 dracut.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/dracut
|
||||
install -D -m 0755 %{SOURCE4} %{buildroot}/sbin/purge-kernels
|
||||
install -m 644 %{SOURCE5} %{buildroot}/%{_unitdir}/purge-kernels.service
|
||||
|
||||
chmod 755 %{buildroot}/%{dracutlibdir}/modules.d/95grub2/*
|
||||
install -D -m 0755 %{SOURCE6} %{buildroot}/sbin/installkernel
|
||||
|
||||
%if 0%{?suse_version}
|
||||
ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-suse.sh %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
|
||||
@ -203,6 +201,7 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
||||
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
|
||||
%{_bindir}/dracut
|
||||
/sbin/purge-kernels
|
||||
/sbin/installkernel
|
||||
/sbin/mkinitrd
|
||||
/sbin/mkinitrd_setup
|
||||
%{_bindir}/lsinitrd
|
||||
@ -277,7 +276,6 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
||||
%{dracutlibdir}/modules.d/95dasd_mod
|
||||
%{dracutlibdir}/modules.d/95dasd_rules
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95grub2
|
||||
%{dracutlibdir}/modules.d/95zfcp
|
||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
%{dracutlibdir}/modules.d/95terminfo
|
||||
|
@ -1,35 +0,0 @@
|
||||
Index: dracut-036/modules.d/95grub2/module-setup.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-036/modules.d/95grub2/module-setup.sh
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/bash
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+
|
||||
+# called by dracut
|
||||
+check() {
|
||||
+ local _arch=$(uname -m)
|
||||
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+install() {
|
||||
+ inst_hook cmdline 30 "$moddir/s390-grub2.sh"
|
||||
+ inst_multiple grub2-emu kexec
|
||||
+}
|
||||
+
|
||||
Index: dracut-036/modules.d/95grub2/s390-grub2.sh
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ dracut-036/modules.d/95grub2/s390-grub2.sh
|
||||
@@ -0,0 +1,8 @@
|
||||
+#!/bin/sh
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+if getargbool 0 initgrub ; then
|
||||
+ if [ -e /usr/bin/grub2-emu ]; then
|
||||
+ /usr/bin/grub2-emu
|
||||
+ fi
|
||||
+fi
|
Loading…
x
Reference in New Issue
Block a user