[libvirt] [PATCH] run: Don't export unnecessary paths

Andrea Bolognani posted 1 patch 5 years ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190314091917.3012-1-abologna@redhat.com
run.in | 5 -----
1 file changed, 5 deletions(-)
[libvirt] [PATCH] run: Don't export unnecessary paths
Posted by Andrea Bolognani 5 years ago
We're using virFileFindResourceFull() to locate resources
nowadays, which makes exporting these information in the
environment unnecessary: see

  virDriverLoadModule() for LIBVIRT_DRIVER_DIR
  virLockManagerPluginNew() for LIBVIRT_LOCK_MANAGER_PLUGIN_DIR
  virLockManagerLockDaemonConnectionNew() for VIRTLOCKD_PATH
  doRemoteOpen() for LIBVIRTD_PATH

As further proof that we don't need to expose the information
this way anymore, we're not even exporting VIRTLOGD_PATH, which
would be necessary if virLogManagerConnect() didn't already
take care of that for us.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 run.in | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/run.in b/run.in
index 06ad54b62b..9a1c6ea11a 100644
--- a/run.in
+++ b/run.in
@@ -60,11 +60,6 @@ else
 fi
 export PKG_CONFIG_PATH
 
-export LIBVIRT_DRIVER_DIR="$b/src/.libs"
-export LIBVIRT_LOCK_MANAGER_PLUGIN_DIR="$b/src/.libs"
-export VIRTLOCKD_PATH="$b/src"
-export LIBVIRTD_PATH="$b/src"
-
 # This is a cheap way to find some use-after-free and uninitialized
 # read problems when using glibc.
 random_val="$(awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)"
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] run: Don't export unnecessary paths
Posted by Daniel P. Berrangé 5 years ago
On Thu, Mar 14, 2019 at 10:19:17AM +0100, Andrea Bolognani wrote:
> We're using virFileFindResourceFull() to locate resources
> nowadays, which makes exporting these information in the
> environment unnecessary: see
> 
>   virDriverLoadModule() for LIBVIRT_DRIVER_DIR
>   virLockManagerPluginNew() for LIBVIRT_LOCK_MANAGER_PLUGIN_DIR
>   virLockManagerLockDaemonConnectionNew() for VIRTLOCKD_PATH
>   doRemoteOpen() for LIBVIRTD_PATH
> 
> As further proof that we don't need to expose the information
> this way anymore, we're not even exporting VIRTLOGD_PATH, which
> would be necessary if virLogManagerConnect() didn't already
> take care of that for us.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  run.in | 5 -----
>  1 file changed, 5 deletions(-)

Yep, most of "run" dates from before we tried to automatically
"do the right thing".

For running anything in libvirt the "run" script isn't really
needed at all, except for making running commands like gdb
less verbose.

The main usefulness of "run" is for building language bindings
via a pkg-config

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list