import supermin-5.1.19-10.module+el8.3.0+6423+e4cb6418

This commit is contained in:
CentOS Sources 2020-11-03 07:04:08 -05:00 committed by Andrew Lukoshko
parent ddc263e905
commit 13295a9dcc
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 6579cf5f72d5de345ae1cc97d0344dfa1771460a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 28 Jan 2019 22:20:33 +0000
Subject: [PATCH] Use external command mv to rename old output directory
(RHBZ#1670191).
See https://bugzilla.redhat.com/show_bug.cgi?id=1670191#c0
for explanation.
Thanks: Sam Eiderman
---
src/supermin.ml | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/supermin.ml b/src/supermin.ml
index 71d8b64..7c7135b3 100644
--- a/src/supermin.ml
+++ b/src/supermin.ml
@@ -264,12 +264,10 @@ appliance automatically.
(* Delete the old output directory if it exists. *)
let old_outputdir =
- try
- let old_outputdir = outputdir ^ "." ^ string_random8 () in
- rename outputdir old_outputdir;
- Some old_outputdir
- with
- Unix_error _ -> None in
+ let old_outputdir = outputdir ^ "." ^ string_random8 () in
+ let cmd = sprintf "mv %s %s 2>/dev/null"
+ (quote outputdir) (quote old_outputdir) in
+ if Sys.command cmd == 0 then Some old_outputdir else None in
if debug >= 1 then
printf "supermin: renaming %s to %s\n%!" new_outputdir outputdir;
--
2.22.0

View File

@ -9,7 +9,7 @@
Summary: Tool for creating supermin appliances
Name: supermin
Version: 5.1.19
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv2+
ExcludeArch: i686
@ -31,6 +31,9 @@ Patch1: 0001-Fix-Bytes-String-for-OCaml-4.06.patch
# Pass CFLAGS & LDFLAGS to final supermin link (RHBZ#1624175).
Patch2: 0002-build-Pass-CFLAGS-LDFLAGS-to-final-supermin-link-RHB.patch
# Upstream fix for supermin failing in docker.
Patch3: 0001-Use-external-command-mv-to-rename-old-output-directo.patch
BuildRequires: /usr/bin/pod2man
BuildRequires: /usr/bin/pod2html
BuildRequires: rpm
@ -145,6 +148,10 @@ make check || {
%changelog
* Mon Apr 27 2020 Danilo C. L. de Paula <ddepaula@redhat.com> - 5.1.19
- Resolves: bz#1810193
(Upgrade components in virt:rhel module:stream for RHEL-8.3 release)
* Fri Jun 28 2019 Danilo de Paula <ddepaula@redhat.com> - 5.1.19-9
- Rebuild all virt packages to fix RHEL's upgrade path
- Resolves: rhbz#1695587