SHA256
1
0
forked from pool/supermin

Restore detect-aarch64-kernel.patch with some porting effort.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=76
This commit is contained in:
Charles Arnold 2022-04-25 20:16:24 +00:00 committed by Git OBS Bridge
parent f0bd32279f
commit 7baaf7bf37
3 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,32 @@
References: bsc#1187532 - virt-make-fs hangs forever
Index: supermin-5.2.2/src/format_ext2_kernel.ml
===================================================================
--- supermin-5.2.2.orig/src/format_ext2_kernel.ml
+++ supermin-5.2.2/src/format_ext2_kernel.ml
@@ -129,7 +129,7 @@ and find_kernel_from_boot debug host_cpu
if files <> [] then files
else (
(* In original: ls -1dvr /boot/vmlinuz-* 2>/dev/null | grep -v xen *)
- let files = files_matching_globs ["vmlinu?-*"] all_files in
+ let files = files_matching_globs ["vmlinu?-*"; "Image-*"] all_files in
let files = ignore_unbootable_kernels host_cpu files in
files
) in
@@ -235,9 +235,14 @@ and get_kernel_version debug kernel_file
else (
basename
) in
- if string_prefix "vmlinuz-" basename || string_prefix "vmlinux-" basename
+ if string_prefix "vmlinuz-" basename || string_prefix "vmlinux-" basename || string_prefix "Image-" basename
then (
- let version = String.sub basename 8 (String.length basename - 8) in
+ let version =
+ if string_prefix "Image-" basename then (
+ String.sub basename 6 (String.length basename - 6)
+ ) else (
+ String.sub basename 8 (String.length basename - 8)
+ ) in
(* Does the version look reasonable? *)
let modpath = "/lib/modules" // version in
if has_modpath modpath then (

View File

@ -13,7 +13,6 @@ Mon Apr 25 13:03:38 MDT 2022 - carnold@suse.com
* maintainer: Add our usual maintainer rules
- Drop
Avoid-lstat-Value-too-large-for-defined-data-type.patch
detect-aarch64-kernel.patch
-------------------------------------------------------------------
Mon Mar 7 14:54:48 MST 2022 - carnold@suse.com

View File

@ -32,6 +32,7 @@ Patch11: supermin-kernel_version_compressed.patch
Patch12: disable-test-if-newer-ext2.patch
# Backport of https://github.com/libguestfs/supermin/commit/4306a131c6cde92f8d0a2dd9376f4096ee538eff.patch
Patch13: initrd_support_ztd-compressed_modules.patch
Patch14: detect-aarch64-kernel.patch
BuildRequires: augeas
BuildRequires: autoconf
BuildRequires: automake