[node-patches] Change in ovirt-node[master]: Allow virt-who-password to be run and keep the key

rbarry at redhat.com rbarry at redhat.com
Tue Apr 7 16:23:32 UTC 2015


Ryan Barry has uploaded a new change for review.

Change subject: Allow virt-who-password to be run and keep the key
......................................................................

Allow virt-who-password to be run and keep the key

virt-who and its associated utilities keep using absolute paths
to python files that we strip. Patch yet another file, and persist
the key file it generates so it sticks between reboots

Change-Id: I24002f4298a84f228ca4f9f62590f63bd266e7ba
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209350
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M recipe/common-post.ks
M recipe/rhevh7-post.ks
2 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/24/39624/1

diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index d5d5266..4f765ea 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -108,6 +108,7 @@
 files	/var/cache/libvirt
 files	/var/empty/sshd/etc/localtime
 files	/var/lib/libvirt
+files   /var/lib/virt-who
 files   /var/lib/multipath
 files   /var/cache/multipathd
 empty	/mnt
diff --git a/recipe/rhevh7-post.ks b/recipe/rhevh7-post.ks
index f073b9a..d488bea 100644
--- a/recipe/rhevh7-post.ks
+++ b/recipe/rhevh7-post.ks
@@ -195,6 +195,31 @@
 EOF_virt_who
 fi
 
+# rhbz 1209350 virt-who keeps using absolute paths to uncompiled
+# python files. Change this to the compiled version as well, and
+# persist the generated key file
+
+patch -d /bin -p0 << \EOF_virt_who_password
+--- virt-who-password      2015-04-07 12:13:41.992000000 -0400
++++ virt-who-password       2015-04-07 12:14:33.909000000 -0400
+@@ -1,10 +1,12 @@
+ #!/bin/sh
+ 
+-if [ -f ./virtwhopassword.py ];
++if [ -f ./virtwhopassword.pyc ];
+ then
+     # Run it from local directory when available
+-    exec /usr/bin/python ./virtwhopassword.py "$@"
++    exec /usr/bin/python ./virtwhopassword.pyc "$@"
+ else
+     # Run it from /usr/share/virt-who
+-    exec /usr/bin/python /usr/share/virt-who/virtwhopassword.py "$@"
++    exec /usr/bin/python /usr/share/virt-who/virtwhopassword.pyc "$@"
+ fi
++
++persist /var/lib/virt-who/key
+EOF_virt_who_password
+
 # rhbz 1152947 fixing virt-who start dependancy syslog.socket
 # first of all fixing the missing link of syslog to rsyslog
 # depending service and socket for correct operation


-- 
To view, visit https://gerrit.ovirt.org/39624
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24002f4298a84f228ca4f9f62590f63bd266e7ba
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list