import virt-viewer-7.0-9.el8

This commit is contained in:
CentOS Sources 2020-04-28 04:56:09 -04:00 committed by Andrew Lukoshko
parent cfcfb673ab
commit 4e0599f9c3
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 1397ef78ac43e971cef317893f9fe597bf7074ed Mon Sep 17 00:00:00 2001
From: Victor Toso <me@victortoso.com>
Date: Thu, 30 Aug 2018 13:51:17 +0200
Subject: [PATCH] app: Always add guest name comment
Even when the user adds comments, we should place the guest's name
unless it is present already.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623756
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
(cherry picked from commit 7ffb7f9cf485f6eefacccf6b20167b0d67521ebb)
---
src/virt-viewer-app.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index e90afe8..6f17842 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -258,9 +258,13 @@ virt_viewer_app_save_config(VirtViewerApp *self)
if (error) {
g_debug("Unable to get comment from key file: %s", error->message);
g_clear_error(&error);
- } else {
- if (!comment || *comment == '\0')
- g_key_file_set_comment(priv->config, priv->uuid, NULL, priv->guest_name, NULL);
+ }
+
+ if (comment == NULL ||
+ (comment != NULL && g_strstr_len(comment, -1, priv->guest_name) == NULL)) {
+ /* Note that this function appends the guest's name string as last
+ * comment in case there were comments there already */
+ g_key_file_set_comment(priv->config, priv->uuid, NULL, priv->guest_name, NULL);
}
g_free(comment);
}

View File

@ -19,7 +19,7 @@
Name: virt-viewer
Version: 7.0
Release: 8%{?dist}%{?extra_release}
Release: 9%{?dist}%{?extra_release}
Summary: Virtual Machine Viewer
Group: Applications/System
License: GPLv2+
@ -40,6 +40,7 @@ Patch011: 0011-virt-viewer-file-transfer-dialog-improve-error-messa.patch
Patch012: 0012-ovirt-foreign-menu-Factor-out-code-to-set-file-colle.patch
Patch013: 0013-Workaround-inconsistency-with-REST-API.patch
Patch014: 0014-remote-viewer-Set-admin-privileges-when-connecting-t.patch
Patch015: 0015-app-Always-add-guest-name-comment.patch
Requires: openssh-clients
@ -99,6 +100,7 @@ the display, and libvirt for looking up VNC/SPICE server details.
%patch012 -p1
%patch013 -p1
%patch014 -p1
%patch015 -p1
%build
@ -138,6 +140,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/remote-viewer.1*
%changelog
* Tue Dec 17 2019 Victor Toso <victortoso@redhat.com> - 7.0-9
- Always add vm's name to settings file
Related: rhbz#1750706
* Tue Aug 27 2019 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 7.0-8
- Request tolplevel storage domain API object
Related: rhbz#1717900