From 12670ec3f4b7d1ac38ff05211f76b203f3a106e7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 08 2021 16:41:31 +0000 Subject: import libguestfs-1.40.2-28.module+el8.5.0+10717+67be7ac4 --- diff --git a/SOURCES/0096-daemon-lvm-Use-lvcreate-yes-to-avoid-interactive-pro.patch b/SOURCES/0096-daemon-lvm-Use-lvcreate-yes-to-avoid-interactive-pro.patch new file mode 100644 index 0000000..a370479 --- /dev/null +++ b/SOURCES/0096-daemon-lvm-Use-lvcreate-yes-to-avoid-interactive-pro.patch @@ -0,0 +1,93 @@ +From 4e87c9e46f9a82f4b1c65a34602a939dcaa125eb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 22 Feb 2021 10:18:45 +0000 +Subject: [PATCH] daemon: lvm: Use lvcreate --yes to avoid interactive prompts. + +See https://bugzilla.redhat.com/show_bug.cgi?id=1930996#c1 + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1930996 +--- + daemon/lvm.c | 2 +- + tests/regressions/Makefile.am | 2 ++ + tests/regressions/rhbz1930996.sh | 36 ++++++++++++++++++++++++++++++++ + 3 files changed, 39 insertions(+), 1 deletion(-) + create mode 100755 tests/regressions/rhbz1930996.sh + +diff --git a/daemon/lvm.c b/daemon/lvm.c +index fa815e5c1..2911c1279 100644 +--- a/daemon/lvm.c ++++ b/daemon/lvm.c +@@ -219,7 +219,7 @@ do_lvcreate (const char *logvol, const char *volgroup, int mbytes) + snprintf (size, sizeof size, "%d", mbytes); + + r = command (NULL, &err, +- "lvm", "lvcreate", ++ "lvm", "lvcreate", "--yes", + "-L", size, "-n", logvol, volgroup, NULL); + if (r == -1) { + reply_with_error ("%s", err); +diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am +index fbd5c0ed7..7007bf167 100644 +--- a/tests/regressions/Makefile.am ++++ b/tests/regressions/Makefile.am +@@ -51,6 +51,7 @@ EXTRA_DIST = \ + rhbz1370424.sh \ + rhbz1370424.xml \ + rhbz1477623.sh \ ++ rhbz1930996.sh \ + test-noexec-stack.pl + + TESTS = \ +@@ -82,6 +83,7 @@ TESTS = \ + rhbz1285847.sh \ + rhbz1370424.sh \ + rhbz1477623.sh \ ++ rhbz1930996.sh \ + test-big-heap \ + test-noexec-stack.pl \ + $(SLOW_TESTS) +diff --git a/tests/regressions/rhbz1930996.sh b/tests/regressions/rhbz1930996.sh +new file mode 100755 +index 000000000..27089beaa +--- /dev/null ++++ b/tests/regressions/rhbz1930996.sh +@@ -0,0 +1,36 @@ ++#!/bin/bash - ++# libguestfs ++# Copyright (C) 2017-2021 Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# Regression test for: ++# https://bugzilla.redhat.com/show_bug.cgi?id=1930996#c1 ++# ++# Actually a bug/change in LVM, previously we failed to create an LV ++# if the underlying disk contained a filesystem signature. ++ ++set -e ++ ++$TEST_FUNCTIONS ++skip_if_skipped ++skip_unless_phony_guest fedora.img ++ ++f=rhbz1930996.img ++rm -f $f ++ ++guestfish -N $f=lvfs vgremove VG : vgcreate VG /dev/sda1 : lvcreate LV2 VG 100 ++ ++rm $f +-- +2.18.4 + diff --git a/SOURCES/copy-patches.sh b/SOURCES/copy-patches.sh index 0f2ab70..7a3ae91 100755 --- a/SOURCES/copy-patches.sh +++ b/SOURCES/copy-patches.sh @@ -6,7 +6,7 @@ set -e # directory. Use it like this: # ./copy-patches.sh -rhel_version=8.4.0 +rhel_version=8.5.0 # Check we're in the right directory. if [ ! -f libguestfs.spec ]; then diff --git a/SPECS/libguestfs.spec b/SPECS/libguestfs.spec index 91f50af..ff06bc1 100644 --- a/SPECS/libguestfs.spec +++ b/SPECS/libguestfs.spec @@ -36,7 +36,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.40.2 -Release: 27%{?dist} +Release: 28%{?dist} License: LGPLv2+ # Source and patches. @@ -149,6 +149,7 @@ Patch0092: 0092-lib-Increase-default-memsize-to-1280-RHBZ-1837765.patch Patch0093: 0093-tar-in-Add-workaround-because-tar-doesn-t-restore-ca.patch Patch0094: 0094-mlcustomize-Refactor-SELinux_relabel-code.patch Patch0095: 0095-mlcustomize-Fall-back-to-autorelabel-if-specfile-doe.patch +Patch0096: 0096-daemon-lvm-Use-lvcreate-yes-to-avoid-interactive-pro.patch # Use git for patch management. BuildRequires: git @@ -1279,6 +1280,10 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %changelog +* Tue Apr 20 2021 Richard W.M. Jones - 1:1.40.2-28 +- daemon: lvm: Use lvcreate --yes to avoid interactive prompts + resolves: rhbz#1933640 + * Tue Jan 05 2021 Richard W.M. Jones - 1:1.40.2-27 - selinux-relabel does not work if SELINUXTYPE != targeted - tar-in command does not allow restoring file capabilities