diff --git a/0001-helper-Don-t-crash-if-SUPERMIN_DTB-is-set-and-no-dtb.patch b/0001-helper-Don-t-crash-if-SUPERMIN_DTB-is-set-and-no-dtb.patch new file mode 100644 index 0000000..6de5782 --- /dev/null +++ b/0001-helper-Don-t-crash-if-SUPERMIN_DTB-is-set-and-no-dtb.patch @@ -0,0 +1,39 @@ +From a55d9cf1579f14545636b3d7a2f515c413603107 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +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 + diff --git a/supermin.spec b/supermin.spec index 2b917ac..746d8a9 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,7 +1,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 4.1.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ %if 0%{?rhel} >= 7 @@ -11,6 +11,10 @@ ExclusiveArch: x86_64 URL: http://people.redhat.com/~rjones/supermin/ 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: yum >= 3.2 BuildRequires: /usr/sbin/mke2fs @@ -61,6 +65,8 @@ Obsoletes: febootstrap-supermin-helper <= 3.21-1 %prep %setup -q +%patch1 -p1 + %build %configure --disable-network-tests @@ -95,6 +101,9 @@ make check %changelog +* Sun Sep 8 2013 Richard W.M. Jones - 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 - 4.1.5-1 - New upstream version 4.1.5. - Has (optionally) a new command line syntax.