From ab5f03e446f4a0dbca3ae883d8c5a9c1bc0f41f9b0485e29f4dd281b142832d9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 5 Feb 2021 23:31:15 +0000 Subject: [PATCH] Accepting request 869813 from home:oertel:branches:Virtualization - add patch supermin-kernel_version_compressed.patch find kernel module path even for compressed kernels like on aarch64 and s390x OBS-URL: https://build.opensuse.org/request/show/869813 OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=55 --- supermin-kernel_version_compressed.patch | 19 +++++++++++++++++++ supermin.changes | 7 +++++++ supermin.spec | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 supermin-kernel_version_compressed.patch diff --git a/supermin-kernel_version_compressed.patch b/supermin-kernel_version_compressed.patch new file mode 100644 index 0000000..eca43cd --- /dev/null +++ b/supermin-kernel_version_compressed.patch @@ -0,0 +1,19 @@ +--- supermin-5.2.0/src/format_ext2_kernel.ml 2021/02/05 16:10:36 1.1 ++++ supermin-5.2.0/src/format_ext2_kernel.ml 2021/02/05 16:12:46 +@@ -212,6 +212,16 @@ + | None -> + (* Try to work it out from the filename instead. *) + let basename = Filename.basename kernel_file in ++ let basename = ++ let len = String.length basename in ++ if Filename.check_suffix basename ".xz" || Filename.check_suffix basename ".gz" ++ then ( ++ let basename = String.sub basename 0 (len-3) in ++ basename ++ ) ++ else ( ++ basename ++ ) in + if string_prefix "vmlinuz-" basename || string_prefix "vmlinux-" basename + then ( + let version = String.sub basename 8 (String.length basename - 8) in diff --git a/supermin.changes b/supermin.changes index 5d26075..07c9930 100644 --- a/supermin.changes +++ b/supermin.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 5 16:59:34 CET 2021 - ro@suse.de + +- add patch supermin-kernel_version_compressed.patch + find kernel module path even for compressed kernels + like on aarch64 and s390x + ------------------------------------------------------------------- Fri Oct 23 18:45:45 UTC 2020 - Dirk Mueller diff --git a/supermin.spec b/supermin.spec index 6c4d194..d33a0f6 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,7 +1,7 @@ # # spec file for package supermin # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Source1: https://download.libguestfs.org/supermin/5.2-stable/supermin-5.2 Source9: supermin.keyring # Pending upstream review Patch0: suse_release.patch +Patch1: supermin-kernel_version_compressed.patch BuildRequires: augeas BuildRequires: autoconf BuildRequires: automake