virt-manager-2.1.0-2.fc31

Fix --initrd-inject with f30 URLs (bz #1686464)
This commit is contained in:
Cole Robinson 2019-04-03 20:34:20 -04:00
parent 3771558046
commit a909a54a92
3 changed files with 70 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 2 Apr 2019 15:02:47 -0400
Subject: [PATCH virt-manager] initrdinject: Use full option versions for cpio
Makes it more self documenting IMO
(cherry picked from commit 309840b9535b0e1965ed177b4558652faa256b36)
---
virtinst/initrdinject.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py
index 78c18c28..9a09f20c 100644
--- a/virtinst/initrdinject.py
+++ b/virtinst/initrdinject.py
@@ -30,7 +30,8 @@ def perform_initrd_injections(initrd, injections, scratchdir):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=tempdir)
- cpio_proc = subprocess.Popen(['cpio', '-o', '--null', '-Hnewc', '--quiet'],
+ cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet',
+ '--format=newc'],
stdin=find_proc.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,

View File

@ -0,0 +1,33 @@
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 3 Apr 2019 18:07:12 -0400
Subject: [PATCH virt-manager] initrdinject: Force added files to be owned as
root (bz 1686464)
systemd in fedora30 has some new security restriction about non-root
owned directories. Initrd inject would tickle this because the cpio
archive would cause the root dir in the initrd to be owned by the
uid that launched virt-install.
Pass --owner=+0:+0 to cpio to force root ownership
Suggested-by: James Szinger <jszinger@gmail.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1686464
(cherry picked from commit c6b5f22fa61d87557b5fab23be080073d2f7906e)
---
virtinst/initrdinject.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtinst/initrdinject.py b/virtinst/initrdinject.py
index 9a09f20c..4032f9ba 100644
--- a/virtinst/initrdinject.py
+++ b/virtinst/initrdinject.py
@@ -31,7 +31,7 @@ def perform_initrd_injections(initrd, injections, scratchdir):
stderr=subprocess.PIPE,
cwd=tempdir)
cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet',
- '--format=newc'],
+ '--format=newc', '--owner=+0:+0'],
stdin=find_proc.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,

View File

@ -17,7 +17,7 @@
Name: virt-manager
Version: 2.1.0
Release: 1%{?dist}
Release: 2%{?dist}
%global verrel %{version}-%{release}
Summary: Desktop tool for managing virtual machines via libvirt
@ -26,6 +26,10 @@ BuildArch: noarch
URL: https://virt-manager.org/
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
# Fix --initrd-inject with f30 URLs (bz #1686464)
Patch0001: 0001-initrdinject-Use-full-option-versions-for-cpio.patch
Patch0002: 0002-initrdinject-Force-added-files-to-be-owned-as-root-b.patch
Requires: virt-manager-common = %{verrel}
Requires: python3-gobject
@ -104,6 +108,10 @@ machine).
%prep
%setup -q
# Fix --initrd-inject with f30 URLs (bz #1686464)
%patch0001 -p1
%patch0002 -p1
%build
%if %{default_hvs}
@ -177,6 +185,9 @@ done
%changelog
* Wed Apr 03 2019 Cole Robinson <crobinso@redhat.com> - 2.1.0-2
- Fix --initrd-inject with f30 URLs (bz #1686464)
* Sun Feb 03 2019 Cole Robinson <crobinso@redhat.com> - 2.1.0-1
- Rebased to version 2.1.0
- Bash autocompletion support (Lin Ma, Cole Robinson)