(For ARM) Don't crash if SUPERMIN_DTB is set and --dtb not specified.
This commit is contained in:
parent
e57a28875d
commit
e9f739554b
@ -0,0 +1,39 @@
|
|||||||
|
From a55d9cf1579f14545636b3d7a2f515c413603107 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Sun, 8 Sep 2013 11:13:24 +0100
|
||||||
|
Subject: [PATCH] helper: Don't crash if SUPERMIN_DTB is set and no --dtb on
|
||||||
|
the command line.
|
||||||
|
|
||||||
|
Libguestfs uses supermin-helper -f checksum w/o --dtb. Setting the
|
||||||
|
SUPERMIN_DTB environment variable would cause supermin-helper to
|
||||||
|
crash. Instead of crashing, just ignore SUPERMIN_DTB.
|
||||||
|
---
|
||||||
|
helper/kernel.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/helper/kernel.c b/helper/kernel.c
|
||||||
|
index 4ff207b..5c8175d 100644
|
||||||
|
--- a/helper/kernel.c
|
||||||
|
+++ b/helper/kernel.c
|
||||||
|
@@ -122,15 +122,15 @@ has_modpath (const char *kernel_name)
|
||||||
|
static void
|
||||||
|
get_dtb (const char *kernel, const char *dtb_wildcard, const char *dtb)
|
||||||
|
{
|
||||||
|
+ if (!dtb_wildcard)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
char *dtb_env = getenv ("SUPERMIN_DTB");
|
||||||
|
if (dtb_env) {
|
||||||
|
copy_or_symlink_file ("dtb", dtb_env, dtb);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!dtb_wildcard)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
assert (dtb); /* command line arg parsing should ensure this */
|
||||||
|
assert (kernel != NULL);
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Tool for creating supermin appliances
|
Summary: Tool for creating supermin appliances
|
||||||
Name: supermin
|
Name: supermin
|
||||||
Version: 4.1.5
|
Version: 4.1.5
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
|
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
@ -11,6 +11,10 @@ ExclusiveArch: x86_64
|
|||||||
URL: http://people.redhat.com/~rjones/supermin/
|
URL: http://people.redhat.com/~rjones/supermin/
|
||||||
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# (For ARM) Don't crash if SUPERMIN_DTB is set and --dtb not specified.
|
||||||
|
# Upstream since 2013-09-08.
|
||||||
|
Patch1: 0001-helper-Don-t-crash-if-SUPERMIN_DTB-is-set-and-no-dtb.patch
|
||||||
|
|
||||||
BuildRequires: /usr/bin/pod2man
|
BuildRequires: /usr/bin/pod2man
|
||||||
BuildRequires: yum >= 3.2
|
BuildRequires: yum >= 3.2
|
||||||
BuildRequires: /usr/sbin/mke2fs
|
BuildRequires: /usr/sbin/mke2fs
|
||||||
@ -61,6 +65,8 @@ Obsoletes: febootstrap-supermin-helper <= 3.21-1
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-network-tests
|
%configure --disable-network-tests
|
||||||
@ -95,6 +101,9 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 8 2013 Richard W.M. Jones <rjones@redhat.com> - 4.1.5-2
|
||||||
|
- (For ARM) Don't crash if SUPERMIN_DTB is set and --dtb not specified.
|
||||||
|
|
||||||
* Fri Sep 6 2013 Richard W.M. Jones <rjones@redhat.com> - 4.1.5-1
|
* Fri Sep 6 2013 Richard W.M. Jones <rjones@redhat.com> - 4.1.5-1
|
||||||
- New upstream version 4.1.5.
|
- New upstream version 4.1.5.
|
||||||
- Has (optionally) a new command line syntax.
|
- Has (optionally) a new command line syntax.
|
||||||
|
Loading…
Reference in New Issue
Block a user