Accepting request 243695 from home:trenn:branches:Base:System

- 99base: Increase initqueue timeout in non systemd case (bnc#887402)
  * Add: 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch
- 90lvm: Install dm-snapshot module (bnc#888530)
  * Add: 0128-90lvm-Install-dm-snapshot-module.patch
- Revert commit 6ecab258710d158a7a6 and only do not wait for swap via
 parameter (bnc#882812)
  * Add: 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch
- nfs: Always add all kernel modules for kdump (bnc#887906)
  * Add: 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
- 40network: handle prefixed IP addresses correctly (bnc#880108)
  * Add: 0131-40network-handle-prefixed-IP-addresses-correctly.patch
- 40network: fixup static network configuration
  * Add: 0132-40network-fixup-static-network-configuration.patch
- Remove 70-persistent-net.rules
  * Add: 0133-Remove-70-persistent-net.rules.patch

OBS-URL: https://build.opensuse.org/request/show/243695
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=176
This commit is contained in:
Thomas Renninger 2014-08-05 15:24:31 +00:00 committed by Git OBS Bridge
parent 5d2771c238
commit fba84bc647
9 changed files with 368 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 756b069dca4ea54265dade3028e2bddca3b90266 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Wed, 23 Jul 2014 15:34:00 +0200
Subject: 99base: Increase initqueue timeout in non systemd case
In case of systemd is used the timeout already is set to 180s, compare
with file: modules.d/98systemd/dracut-initqueue.sh
Do the same if systemd is not used, e.g. in kdump case.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
modules.d/99base/init.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
index a1232eb..a8ea054 100755
--- a/modules.d/99base/init.sh
+++ b/modules.d/99base/init.sh
@@ -155,7 +155,7 @@ make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab'
getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
RDRETRY=$(getarg rd.retry -d 'rd_retry=')
-RDRETRY=${RDRETRY:-30}
+RDRETRY=${RDRETRY:-180}
RDRETRY=$(($RDRETRY*2))
export RDRETRY
main_loop=0
--
1.8.4.5

View File

@ -0,0 +1,30 @@
From afa1ee56c79f45a648406b65d24234a54904f3ce Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Thu, 24 Jul 2014 10:41:14 +0200
Subject: 90lvm: Install dm-snapshot module
bnc#888530
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
modules.d/90lvm/module-setup.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index 2a5b392..77f9e9d 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -44,6 +44,10 @@ cmdline() {
done
}
+installkernel() {
+ instmods dm-snapshot
+}
+
# called by dracut
install() {
local _i
--
1.8.4.5

View File

@ -0,0 +1,90 @@
From 1a7b830200bcf2894c2e5a6d656e186bebd457d2 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Mon, 28 Jul 2014 15:45:22 +0200
Subject: Revert commit 6ecab258710d158a7a6 and only do not wait for swap via
parameter
bnc#882812
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.sh | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/dracut.sh b/dracut.sh
index 2d8be59..92b30bb 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -106,6 +106,7 @@ Creates initial ramdisk images for preloading modules
--noprelink Do not prelink binaries in the initramfs
--hardlink Hardlink files in the initramfs
--nohardlink Do not hardlink files in the initramfs
+ --nowaitforswap Do not wait for swap getting active on boot
--prefix [DIR] Prefix initramfs files with [DIR]
--noprefix Do not prefix initramfs files
--mdadmconf Include local /etc/mdadm.conf
@@ -341,6 +342,7 @@ rearrange_params()
--long noprelink \
--long hardlink \
--long nohardlink \
+ --long nowaitforswap \
--long noprefix \
--long mdadmconf \
--long nomdadmconf \
@@ -516,6 +518,7 @@ while :; do
--noprelink) do_prelink_l="no";;
--hardlink) do_hardlink_l="yes";;
--nohardlink) do_hardlink_l="no";;
+ --nowaitforswap) nowaitforswap_l="yes";;
--noprefix) prefix_l="/";;
--mdadmconf) mdadmconf_l="yes";;
--nomdadmconf) mdadmconf_l="no";;
@@ -776,6 +779,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $do_prelink ]] || do_prelink=yes
[[ $do_hardlink_l ]] && do_hardlink=$do_hardlink_l
[[ $do_hardlink ]] || do_hardlink=yes
+[[ $nowaitforswap_l ]] && nowaitforswap="yes"
[[ $prefix_l ]] && prefix=$prefix_l
[[ $prefix = "/" ]] && unset prefix
[[ $hostonly_l ]] && hostonly=$hostonly_l
@@ -1049,6 +1053,37 @@ if [[ $hostonly ]]; then
push host_devs "$_dev"
done
+ if [[ $nowaitforswap != yes ]] && [[ -f /proc/swaps ]] && [[ -f /etc/fstab ]]; then
+ while read dev type rest; do
+ [[ -b $dev ]] || continue
+ [[ "$type" == "partition" ]] || continue
+
+ while read _d _m _t _o _r; do
+ [[ "$_d" == \#* ]] && continue
+ [[ $_d ]] || continue
+ [[ $_t != "swap" ]] && continue
+ [[ $_m != "swap" ]] && [[ $_m != "none" ]] && continue
+ [[ "$_o" == *noauto* ]] && continue
+ _d=$(expand_persistent_dev "$_d")
+ [[ "$_d" -ef "$dev" ]] || continue
+
+ if [[ -f /etc/crypttab ]]; then
+ while read _mapper _a _p _o; do
+ [[ $_mapper = \#* ]] && continue
+ [[ "$_d" -ef /dev/mapper/"$_mapper" ]] || continue
+ [[ "$_o" ]] || _o="$_p"
+ # skip entries with password files
+ [[ "$_p" == /* ]] && [[ -f $_p ]] && continue 2
+ # skip mkswap swap
+ [[ $_o == *swap* ]] && continue 2
+ done < /etc/crypttab
+ fi
+
+ push host_devs "$(readlink -f "$dev")"
+ break
+ done < /etc/fstab
+ done < /proc/swaps
+ fi
# record all host modaliases
declare -A host_modalias
find /sys/devices/ -name uevent -print > "$initdir/.modalias"
--
1.8.4.5

View File

@ -0,0 +1,28 @@
From 520f0e9185774956e5739841ce87474fcee52594 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Mon, 28 Jul 2014 17:53:10 +0200
Subject: nfs: Always add all kernel modules for kdump
bnc#887906
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
modules.d/95nfs/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index dabf3b0..c126efc 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -28,7 +28,7 @@ depends() {
# called by dracut
installkernel() {
- instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files
+ hostonly='' instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files lockd rpcsec_gss_krb5 auth_rpcgss
}
# called by dracut
--
1.8.4.5

View File

@ -0,0 +1,43 @@
From fc03504435d8bf5d0a31b8c566c2e783fbb96ec6 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 30 Jul 2014 10:28:27 +0200
Subject: 40network: handle prefixed IP addresses correctly
If an IP address is given with prefix length ifup should be
parsing that correctly. And we should assume a prefix length
of /64 for IPv6 resp /24 for IPv4 if none were given.
References: bnc#880108
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/40network/ifup.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index e0bf035..0a485ec 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -224,11 +224,19 @@ do_static() {
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
[ -n "$mask" -a -z "$prefix" ] && prefix=$(mask_to_prefix $mask)
+ if [ "${ip##*/}" != "${ip}" ] ; then
+ prefix="${ip##*/}"
+ ip="${ip%/*}"
+ fi
if strglobin $ip '*:*:*'; then
+ # Always assume /64 prefix for IPv6
+ [ -z "$prefix" ] && prefix=64
# note no ip addr flush for ipv6
ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif
wait_for_ipv6_dad $netif
else
+ # Assume /24 prefix for IPv4
+ [ -z "$prefix" ] && prefix=24
ip addr flush dev $netif
ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
fi
--
1.8.4.5

View File

@ -0,0 +1,84 @@
From 6fd2c01a1cd2dcbd7d2fc3bbe6e62c7d8336bf24 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 31 Jul 2014 09:21:14 +0200
Subject: 40network: fixup static network configuration
The static network configuration was broken; the 'gateway' was
written as the complete 'ip' command line, but simply sourced
later on.
The patch fixes the gateway registration that the '.gw' file
holds entire 'ip route' command lines, which just needs to
be evaluated later on.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/40network/ifup.sh | 13 +++++++++++++
modules.d/40network/module-setup.sh | 2 ++
modules.d/40network/net-lib.sh | 6 +++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 0a485ec..84dc530 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -242,6 +242,19 @@ do_static() {
fi
[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
+
+ for ifroute in /etc/sysconfig/network/ifroute-${netif} /etc/sysconfig/network/routes ; do
+ [ -e ${ifroute} ] || continue
+ # Pull in existing routing configuration
+ read ifr_dest ifr_gw ifr_mask ifr_if < ${ifroute}
+ [ -z "$ifr_dest" -o -z "$ifr_gw" ] && continue
+ if [ "$ifr_if" = "-" ] ; then
+ echo ip route add $ifr_dest via $ifr_gw >> /tmp/net.$netif.gw
+ else
+ echo ip route add $ifr_dest via $ifr_gw dev $ifr_if >> /tmp/net.$netif.gw
+ fi
+ done
+
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
return 0
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 690ff08..9194b1a 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -103,6 +103,8 @@ install() {
[[ $hostonly ]] && {
inst_multiple /etc/sysconfig/network/ifcfg-*
+ inst_multiple /etc/sysconfig/network/ifroute-*
+ inst_simple /etc/sysconfig/network/routes
}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index a3b5030..fce845a 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -124,7 +124,6 @@ setup_net() {
[ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
[ -z "$IFACES" ] && IFACES="$netif"
# run the scripts written by ifup
- [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
[ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
@@ -137,6 +136,11 @@ setup_net() {
# Note: This assumes that if no router is present the
# root server is on the same subnet.
+ if [ -e /tmp/net.$netif.gw ] ; then
+ while read line ; do
+ eval $line
+ done < /tmp/net.$netif.gw
+ fi
# Get DHCP-provided router IP, or the cmdline-provided "gw=" argument
[ -n "$new_routers" ] && gw_ip=${new_routers%%,*}
[ -n "$gw" ] && gw_ip=$gw
--
1.8.4.5

View File

@ -0,0 +1,29 @@
From ad1ba7b1a48c2d6231ae11c2896fd3e05d41c9c8 Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Tue, 5 Aug 2014 17:00:18 +0200
Subject: Remove 70-persistent-net.rules
This is a revert of commit 577e9e8a0d5e060e14ac1cae
bnc#886669
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
modules.d/95udev-rules/module-setup.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index 059ad0d..864897f 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -34,7 +34,6 @@ install() {
60-pcmcia.rules \
50-udev.rules 95-late.rules \
50-firmware.rules \
- 70-persistent-net.rules \
59-scsi-sg3_utils.rules \
75-net-description.rules \
80-net-name-slot.rules 80-net-setup-link.rules \
--
1.8.4.5

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Tue Aug 5 15:08:57 UTC 2014 - trenn@suse.de
- 99base: Increase initqueue timeout in non systemd case (bnc#887402)
* Add: 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch
- 90lvm: Install dm-snapshot module (bnc#888530)
* Add: 0128-90lvm-Install-dm-snapshot-module.patch
- Revert commit 6ecab258710d158a7a6 and only do not wait for swap via
parameter (bnc#882812)
* Add: 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch
- nfs: Always add all kernel modules for kdump (bnc#887906)
* Add: 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
- 40network: handle prefixed IP addresses correctly (bnc#880108)
* Add: 0131-40network-handle-prefixed-IP-addresses-correctly.patch
- 40network: fixup static network configuration
* Add: 0132-40network-fixup-static-network-configuration.patch
- Remove 70-persistent-net.rules
* Add: 0133-Remove-70-persistent-net.rules.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 21 10:47:50 CEST 2014 - hare@suse.de Mon Jul 21 10:47:50 CEST 2014 - hare@suse.de

View File

@ -147,6 +147,13 @@ Patch123: 0123-95zfcp_rules-fix-typo-in-module_setup.patch
Patch124: 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch Patch124: 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch
Patch125: 0125-40network-separate-mask-and-prefix.patch Patch125: 0125-40network-separate-mask-and-prefix.patch
Patch126: 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch Patch126: 0126-01fips-Add-drbg-module-to-force-loaded-modules.patch
Patch127: 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch
Patch128: 0128-90lvm-Install-dm-snapshot-module.patch
Patch129: 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch
Patch130: 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch
Patch131: 0131-40network-handle-prefixed-IP-addresses-correctly.patch
Patch132: 0132-40network-fixup-static-network-configuration.patch
Patch133: 0133-Remove-70-persistent-net.rules.patch
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: bash BuildRequires: bash
@ -314,6 +321,13 @@ and its cryptography during startup.
%patch124 -p1 %patch124 -p1
%patch125 -p1 %patch125 -p1
%patch126 -p1 %patch126 -p1
%patch127 -p1
%patch128 -p1
%patch129 -p1
%patch130 -p1
%patch131 -p1
%patch132 -p1
%patch133 -p1
%build %build
%configure\ %configure\