forked from pool/libguestfs
- Use fixed /etc/hosts and ibft_hostname to reduce build-compare noise
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=325
This commit is contained in:
parent
72ad8f1b19
commit
0cbaa4b386
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 24 16:52:12 UTC 2014 - ohering@suse.de
|
||||
|
||||
- Use fixed /etc/hosts and ibft_hostname to reduce build-compare noise
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 16 13:26:13 CEST 2014 - ohering@suse.de
|
||||
|
||||
|
@ -1,9 +1,81 @@
|
||||
---
|
||||
mkinitrd/scripts/setup-ibft.sh | 2
|
||||
mkinitrd/scripts/setup-network.sh | 11 +++-
|
||||
mkinitrd/scripts/setup-prepare.sh | 94 ++++++++++++++++++++++++++++-------
|
||||
mkinitrd/scripts/setup-progs.sh | 4 -
|
||||
mkinitrd/scripts/setup-sharedlibs.sh | 60 +++++++++++++---------
|
||||
3 files changed, 114 insertions(+), 44 deletions(-)
|
||||
5 files changed, 125 insertions(+), 46 deletions(-)
|
||||
|
||||
Index: 1110/mkinitrd/scripts/setup-ibft.sh
|
||||
===================================================================
|
||||
--- 1110.orig/mkinitrd/scripts/setup-ibft.sh
|
||||
+++ 1110/mkinitrd/scripts/setup-ibft.sh
|
||||
@@ -21,22 +21,22 @@ ibft_set_iface() {
|
||||
interface=$iface
|
||||
drvlink=$(get_network_module $interface)
|
||||
if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then
|
||||
nettype=dhcp
|
||||
read ibft_dhcp < $ibft_nic/dhcp
|
||||
[ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static
|
||||
else
|
||||
nettype=static
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ibft_nic=/sys/firmware/ibft/ethernet0
|
||||
-ibft_hostname=$(hostname)
|
||||
+ibft_hostname=localhost
|
||||
|
||||
if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then
|
||||
ibft_available=1
|
||||
ibft_set_iface
|
||||
fi
|
||||
save_var ibft_available
|
||||
save_var ibft_hostname
|
||||
save_var ibft_nic
|
||||
Index: 1110/mkinitrd/scripts/setup-network.sh
|
||||
===================================================================
|
||||
--- 1110.orig/mkinitrd/scripts/setup-network.sh
|
||||
+++ 1110/mkinitrd/scripts/setup-network.sh
|
||||
@@ -291,27 +291,36 @@ if [ "$nettype" = "ifup" ] ; then
|
||||
verbose "[NETWORK]\tifup: $interface"
|
||||
fi
|
||||
done
|
||||
interface=
|
||||
fi
|
||||
|
||||
# Copy the /etc/resolv.conf when the IP is static
|
||||
if test -n "$static_interfaces"; then
|
||||
verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
|
||||
cp /etc/resolv.conf $tmp_mnt/etc
|
||||
fi
|
||||
|
||||
# Copy netcfg files (bnc#468090, bnc#714945)
|
||||
-cp /etc/{hosts,protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cp /etc/{protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cat > $tmp_mnt/etc/hosts <<_EOH_
|
||||
+127.0.0.1 localhost
|
||||
+::1 localhost ipv6-localhost ipv6-loopback
|
||||
+fe00::0 ipv6-localnet
|
||||
+ff00::0 ipv6-mcastprefix
|
||||
+ff02::1 ipv6-allnodes
|
||||
+ff02::2 ipv6-allrouters
|
||||
+ff02::3 ipv6-allhosts
|
||||
+_EOH_
|
||||
|
||||
# Get static IP configuration if requested
|
||||
for iface in $static_interfaces; do
|
||||
static_ips="$static_ips $(get_ip_config $iface)"
|
||||
done
|
||||
|
||||
mkdir -p $tmp_mnt/var/lib/dhcpcd
|
||||
mkdir -p $tmp_mnt/var/run
|
||||
|
||||
cp_bin /lib/mkinitrd/bin/ipconfig.sh $tmp_mnt/bin/ipconfig
|
||||
if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
|
||||
cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
|
||||
fi
|
||||
Index: 1110/mkinitrd/scripts/setup-prepare.sh
|
||||
===================================================================
|
||||
--- 1110.orig/mkinitrd/scripts/setup-prepare.sh
|
||||
|
@ -1,9 +1,81 @@
|
||||
---
|
||||
mkinitrd/scripts/setup-ibft.sh | 2
|
||||
mkinitrd/scripts/setup-network.sh | 11 +++-
|
||||
mkinitrd/scripts/setup-prepare.sh | 94 ++++++++++++++++++++++++++++-------
|
||||
mkinitrd/scripts/setup-progs.sh | 17 +-----
|
||||
mkinitrd/scripts/setup-sharedlibs.sh | 60 +++++++++++++---------
|
||||
3 files changed, 115 insertions(+), 56 deletions(-)
|
||||
5 files changed, 126 insertions(+), 58 deletions(-)
|
||||
|
||||
Index: 1210/mkinitrd/scripts/setup-ibft.sh
|
||||
===================================================================
|
||||
--- 1210.orig/mkinitrd/scripts/setup-ibft.sh
|
||||
+++ 1210/mkinitrd/scripts/setup-ibft.sh
|
||||
@@ -9,22 +9,22 @@ ibft_set_iface() {
|
||||
interface=$if
|
||||
drvlink=$(get_network_module $interface)
|
||||
if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then
|
||||
nettype=dhcp
|
||||
read ibft_dhcp < $ibft_nic/dhcp
|
||||
[ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static
|
||||
else
|
||||
nettype=static
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
ibft_nic=/sys/firmware/ibft/ethernet0
|
||||
-ibft_hostname=$(hostname)
|
||||
+ibft_hostname=localhost
|
||||
|
||||
if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then
|
||||
ibft_available=1
|
||||
ibft_set_iface
|
||||
fi
|
||||
save_var ibft_available
|
||||
save_var ibft_hostname
|
||||
save_var ibft_nic
|
||||
Index: 1210/mkinitrd/scripts/setup-network.sh
|
||||
===================================================================
|
||||
--- 1210.orig/mkinitrd/scripts/setup-network.sh
|
||||
+++ 1210/mkinitrd/scripts/setup-network.sh
|
||||
@@ -277,27 +277,36 @@ if [ "$nettype" = "ifup" ] ; then
|
||||
verbose "[NETWORK]\tifup: $interface"
|
||||
fi
|
||||
done
|
||||
interface=
|
||||
fi
|
||||
|
||||
# Copy the /etc/resolv.conf when the IP is static
|
||||
if test -n "$static_interfaces"; then
|
||||
verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
|
||||
cp /etc/resolv.conf $tmp_mnt/etc
|
||||
fi
|
||||
|
||||
# Copy netcfg files (bnc#468090, bnc#714945)
|
||||
-cp /etc/{hosts,protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cp /etc/{protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cat > $tmp_mnt/etc/hosts <<_EOH_
|
||||
+127.0.0.1 localhost
|
||||
+::1 localhost ipv6-localhost ipv6-loopback
|
||||
+fe00::0 ipv6-localnet
|
||||
+ff00::0 ipv6-mcastprefix
|
||||
+ff02::1 ipv6-allnodes
|
||||
+ff02::2 ipv6-allrouters
|
||||
+ff02::3 ipv6-allhosts
|
||||
+_EOH_
|
||||
|
||||
# Get static IP configuration if requested
|
||||
for iface in $static_interfaces; do
|
||||
static_ips="$static_ips $(get_ip_config $iface)"
|
||||
done
|
||||
|
||||
mkdir -p $tmp_mnt/var/lib/dhcpcd
|
||||
mkdir -p $tmp_mnt/var/run
|
||||
|
||||
cp_bin /lib/mkinitrd/bin/ipconfig.sh $tmp_mnt/bin/ipconfig
|
||||
if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
|
||||
cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
|
||||
fi
|
||||
Index: 1210/mkinitrd/scripts/setup-prepare.sh
|
||||
===================================================================
|
||||
--- 1210.orig/mkinitrd/scripts/setup-prepare.sh
|
||||
|
@ -1,9 +1,81 @@
|
||||
---
|
||||
mkinitrd/scripts/setup-ibft.sh | 2
|
||||
mkinitrd/scripts/setup-network.sh | 11 ++-
|
||||
mkinitrd/scripts/setup-prepare.sh | 126 +++++++++++++++++++++--------------
|
||||
mkinitrd/scripts/setup-progs.sh | 17 ----
|
||||
mkinitrd/scripts/setup-sharedlibs.sh | 60 +++++++++-------
|
||||
3 files changed, 114 insertions(+), 89 deletions(-)
|
||||
5 files changed, 125 insertions(+), 91 deletions(-)
|
||||
|
||||
Index: 1220/mkinitrd/scripts/setup-ibft.sh
|
||||
===================================================================
|
||||
--- 1220.orig/mkinitrd/scripts/setup-ibft.sh
|
||||
+++ 1220/mkinitrd/scripts/setup-ibft.sh
|
||||
@@ -21,22 +21,22 @@ ibft_set_iface() {
|
||||
interface=$iface
|
||||
drvlink=$(get_network_module $interface)
|
||||
if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then
|
||||
nettype=dhcp
|
||||
read ibft_dhcp < $ibft_nic/dhcp
|
||||
[ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static
|
||||
else
|
||||
nettype=static
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ibft_nic=/sys/firmware/ibft/ethernet0
|
||||
-ibft_hostname=$(hostname)
|
||||
+ibft_hostname=localhost
|
||||
|
||||
if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then
|
||||
ibft_available=1
|
||||
ibft_set_iface
|
||||
fi
|
||||
save_var ibft_available
|
||||
save_var ibft_hostname
|
||||
save_var ibft_nic
|
||||
Index: 1220/mkinitrd/scripts/setup-network.sh
|
||||
===================================================================
|
||||
--- 1220.orig/mkinitrd/scripts/setup-network.sh
|
||||
+++ 1220/mkinitrd/scripts/setup-network.sh
|
||||
@@ -278,27 +278,36 @@ if [ "$nettype" = "ifup" ] ; then
|
||||
verbose "[NETWORK]\tifup: $interface"
|
||||
fi
|
||||
done
|
||||
interface=
|
||||
fi
|
||||
|
||||
# Copy the /etc/resolv.conf when the IP is static
|
||||
if test -n "$static_interfaces"; then
|
||||
verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
|
||||
cp /etc/resolv.conf $tmp_mnt/etc
|
||||
fi
|
||||
|
||||
# Copy netcfg files (bnc#468090, bnc#714945)
|
||||
-cp /etc/{hosts,protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cp /etc/{protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cat > $tmp_mnt/etc/hosts <<_EOH_
|
||||
+127.0.0.1 localhost
|
||||
+::1 localhost ipv6-localhost ipv6-loopback
|
||||
+fe00::0 ipv6-localnet
|
||||
+ff00::0 ipv6-mcastprefix
|
||||
+ff02::1 ipv6-allnodes
|
||||
+ff02::2 ipv6-allrouters
|
||||
+ff02::3 ipv6-allhosts
|
||||
+_EOH_
|
||||
|
||||
# Get static IP configuration if requested
|
||||
for iface in $static_interfaces; do
|
||||
static_ips="$static_ips $(get_ip_config $iface)"
|
||||
done
|
||||
|
||||
mkdir -p $tmp_mnt/var/lib/dhcpcd
|
||||
mkdir -p $tmp_mnt/var/run
|
||||
|
||||
cp_bin /lib/mkinitrd/bin/ipconfig.sh $tmp_mnt/bin/ipconfig
|
||||
if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
|
||||
cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
|
||||
fi
|
||||
Index: 1220/mkinitrd/scripts/setup-prepare.sh
|
||||
===================================================================
|
||||
--- 1220.orig/mkinitrd/scripts/setup-prepare.sh
|
||||
|
75
libguestfs.mkinitrd.1310.patch
Normal file
75
libguestfs.mkinitrd.1310.patch
Normal file
@ -0,0 +1,75 @@
|
||||
---
|
||||
mkinitrd/scripts/setup-ibft.sh | 2 +-
|
||||
mkinitrd/scripts/setup-network.sh | 11 ++++++++++-
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: 1310/mkinitrd/scripts/setup-ibft.sh
|
||||
===================================================================
|
||||
--- 1310.orig/mkinitrd/scripts/setup-ibft.sh
|
||||
+++ 1310/mkinitrd/scripts/setup-ibft.sh
|
||||
@@ -21,22 +21,22 @@ ibft_set_iface() {
|
||||
interface=$iface
|
||||
drvlink=$(get_network_module $interface)
|
||||
if [ ! "$nettype" -a -e $ibft_nic/dhcp ]; then
|
||||
nettype=dhcp
|
||||
read ibft_dhcp < $ibft_nic/dhcp
|
||||
[ "$ibft_dhcp" = "0.0.0.0" ] && nettype=static
|
||||
else
|
||||
nettype=static
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ibft_nic=/sys/firmware/ibft/ethernet0
|
||||
-ibft_hostname=$(hostname)
|
||||
+ibft_hostname=localhost
|
||||
|
||||
if [ "$root_iscsi" = 1 -a -d $ibft_nic ]; then
|
||||
ibft_available=1
|
||||
ibft_set_iface
|
||||
fi
|
||||
save_var ibft_available
|
||||
save_var ibft_hostname
|
||||
save_var ibft_nic
|
||||
Index: 1310/mkinitrd/scripts/setup-network.sh
|
||||
===================================================================
|
||||
--- 1310.orig/mkinitrd/scripts/setup-network.sh
|
||||
+++ 1310/mkinitrd/scripts/setup-network.sh
|
||||
@@ -278,27 +278,36 @@ if [ "$nettype" = "ifup" ] ; then
|
||||
verbose "[NETWORK]\tifup: $interface"
|
||||
fi
|
||||
done
|
||||
interface=
|
||||
fi
|
||||
|
||||
# Copy the /etc/resolv.conf when the IP is static
|
||||
if test -n "$static_interfaces"; then
|
||||
verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
|
||||
cp /etc/resolv.conf $tmp_mnt/etc
|
||||
fi
|
||||
|
||||
# Copy netcfg files (bnc#468090, bnc#714945)
|
||||
-cp /etc/{hosts,protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cp /etc/{protocols,services,netconfig} $tmp_mnt/etc
|
||||
+cat > $tmp_mnt/etc/hosts <<_EOH_
|
||||
+127.0.0.1 localhost
|
||||
+::1 localhost ipv6-localhost ipv6-loopback
|
||||
+fe00::0 ipv6-localnet
|
||||
+ff00::0 ipv6-mcastprefix
|
||||
+ff02::1 ipv6-allnodes
|
||||
+ff02::2 ipv6-allrouters
|
||||
+ff02::3 ipv6-allhosts
|
||||
+_EOH_
|
||||
|
||||
# Get static IP configuration if requested
|
||||
for iface in $static_interfaces; do
|
||||
static_ips="$static_ips $(get_ip_config $iface)"
|
||||
done
|
||||
|
||||
mkdir -p $tmp_mnt/var/lib/dhcpcd
|
||||
mkdir -p $tmp_mnt/var/run
|
||||
|
||||
cp_bin /lib/mkinitrd/bin/ipconfig $tmp_mnt/bin/ipconfig
|
||||
if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
|
||||
cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
|
||||
fi
|
@ -194,6 +194,7 @@ Source19: libguestfs.mkinitrd.setup-nfs.sh
|
||||
Source20: libguestfs.mkinitrd.boot-btrfs.sh
|
||||
Source21: libguestfs.mkinitrd.setup-btrfs.sh
|
||||
#
|
||||
Source1310: libguestfs.mkinitrd.1310.patch
|
||||
Source1220: libguestfs.mkinitrd.1220.patch
|
||||
Source1210: libguestfs.mkinitrd.1210.patch
|
||||
Source1110: libguestfs.mkinitrd.1110.patch
|
||||
@ -730,6 +731,7 @@ diff -u mkinitrd/scripts/boot-guestfs.sh~ mkinitrd/scripts/boot-guestfs.sh || :
|
||||
%if %suse_version < 1230
|
||||
patched=
|
||||
for p in \
|
||||
%{S:1310} \
|
||||
%{S:1220} \
|
||||
%{S:1210} \
|
||||
%{S:1110} \
|
||||
|
Loading…
Reference in New Issue
Block a user