Accepting request 358317 from home:favogt:branches:Base:System

Fix 0208-no_forced_virtnet.patch:
  - On non-QEMU systems it returned non-zero, causing dracut to fail
  - Fixed boo#965477
  - dracut.spec: Remove 90qemu-net entirely instead of disabling
  - running_in_qemu was broken (reading output of >/dev/null)

OBS-URL: https://build.opensuse.org/request/show/358317
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=251
This commit is contained in:
Hannes Reinecke 2016-02-08 10:13:11 +00:00 committed by Git OBS Bridge
parent 42b06970c1
commit a9c213553c
3 changed files with 44 additions and 13 deletions

View File

@ -3,6 +3,7 @@ Subject: Don't include qemu network modules without reason
virtio-net without other network tools does not make sense
and causes various bugs, like bsc#960669.
This patch merges 90qemu-net into 90-kernel-network-modules.
---
modules.d/90kernel-network-modules/module-setup.sh | 24 ++++++++++++++++++++-
@ -19,7 +20,7 @@ Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
+running_in_qemu() {
+ if type -P systemd-detect-virt >/dev/null 2>&1; then
+ vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
+ vm=$(systemd-detect-virt --vm 2>&1)
+ (($? != 0)) && return 255
+ [[ $vm = "qemu" ]] && return 0
+ [[ $vm = "kvm" ]] && return 0
@ -39,24 +40,46 @@ Index: dracut-044/modules.d/90kernel-network-modules/module-setup.sh
# called by dracut
installkernel() {
# Include wired net drivers, excluding wireless
@@ -63,6 +82,8 @@ installkernel() {
@@ -63,6 +82,10 @@ installkernel() {
=drivers/net/ethernet \
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet
hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs
+
+ running_in_qemu && hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
+ if running_in_qemu; then
+ hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
+ fi
}
# called by dracut
Index: dracut-044/modules.d/90qemu-net/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/90qemu-net/module-setup.sh
+++ dracut-044/modules.d/90qemu-net/module-setup.sh
@@ -2,6 +2,7 @@
# called by dracut
check() {
+ return 255
if type -P systemd-detect-virt >/dev/null 2>&1; then
vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
(($? != 0)) && return 255
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# called by dracut
-check() {
- if type -P systemd-detect-virt >/dev/null 2>&1; then
- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
- (($? != 0)) && return 255
- [[ $vm = "qemu" ]] && return 0
- [[ $vm = "kvm" ]] && return 0
- [[ $vm = "bochs" ]] && return 0
- fi
-
- for i in /sys/class/dmi/id/*_vendor; do
- [[ -f $i ]] || continue
- read vendor < $i
- [[ "$vendor" == "QEMU" ]] && return 0
- [[ "$vendor" == "Bochs" ]] && return 0
- done
-
- return 255
-}
-
-# called by dracut
-installkernel() {
- # qemu specific modules
- hostonly='' instmods virtio_net e1000 8139cp pcnet32 e100 ne2k_pci
-}

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Feb 6 19:16:32 UTC 2016 - fvogt@suse.com
- Fix 0208-no_forced_virtnet.patch:
- On non-QEMU systems it returned non-zero, causing dracut to fail
- Fixed boo#965477
- dracut.spec: Remove 90qemu-net entirely instead of disabling
- running_in_qemu was broken (reading output of >/dev/null)
-------------------------------------------------------------------
Mon Feb 1 09:38:46 UTC 2016 - fvogt@suse.com

View File

@ -450,7 +450,6 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
%{dracutlibdir}/modules.d/80cms
%{dracutlibdir}/modules.d/81cio_ignore
%{dracutlibdir}/modules.d/90livenet
%{dracutlibdir}/modules.d/90qemu-net
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
%{dracutlibdir}/modules.d/90dm