forked from pool/libguestfs
- handle more architectures than just x86 when looking for guest kernel
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=178
This commit is contained in:
parent
d3fcbc97c1
commit
65e25759b6
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 3 14:01:47 CET 2013 - ohering@suse.de
|
||||
|
||||
- handle more architectures than just x86 when looking for guest kernel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 2 16:19:30 CET 2013 - ohering@suse.de
|
||||
|
||||
|
@ -49,6 +49,20 @@
|
||||
%define _configure_python --disable-python
|
||||
%define _configure_ruby --disable-ruby
|
||||
|
||||
#
|
||||
%define kernel_binary %{nil}
|
||||
%ifarch ia64 %ix86 x86_64
|
||||
%define kernel_binary /boot/vmlinuz
|
||||
%endif
|
||||
%ifarch ppc ppc64 sparc64
|
||||
%define kernel_binary /boot/vmlinux
|
||||
%endif
|
||||
%ifarch s390 s390x
|
||||
%define kernel_binary /boot/image
|
||||
%endif
|
||||
%ifarch %arm
|
||||
%define kernel_binary /boot/uImage
|
||||
%endif
|
||||
#
|
||||
%define guestfs_docdir %{_defaultdocdir}/%{name}
|
||||
#
|
||||
@ -410,7 +424,7 @@ CFLAGS="$RPM_OPT_FLAGS -Wno-unused"
|
||||
CXXFLAGS="$RPM_OPT_FLAGS -Wno-unused"
|
||||
# If the kernel happens to have no virtio-scsi force virtio-blk usage in the tools
|
||||
# This is true for kernel.rpm included in 12.1 and older
|
||||
if /sbin/modinfo -k `env PATH=/sbin:/usr/sbin:$PATH get_kernel_version /boot/vmlinuz` virtio-scsi
|
||||
if /sbin/modinfo -k "`env PATH=/sbin:/usr/sbin:$PATH get_kernel_version '%{kernel_binary}'`" virtio-scsi
|
||||
then
|
||||
: use virtio-scsi, which is the default in libguestfs
|
||||
else
|
||||
@ -586,7 +600,8 @@ test -n "$patched"
|
||||
-s $PWD/mkinitrd/scripts \
|
||||
-i $PWD/mkinitrd
|
||||
mkdir mkinitrd/boot_tmp
|
||||
kver=`env PATH=/sbin:/usr/sbin:$PATH get_kernel_version /boot/vmlinuz`
|
||||
kver=`env PATH=/sbin:/usr/sbin:$PATH get_kernel_version '%{kernel_binary}'`
|
||||
test -n "${kver}"
|
||||
arch=`arch`
|
||||
%ifarch %ix86
|
||||
arch=i586
|
||||
|
Loading…
Reference in New Issue
Block a user